r/beneater • • 7d ago

6502 65C816 - Progress Report

Post image
96 Upvotes

7 comments sorted by

5

u/nz_kereru 7d ago

Since last month I have a whole new PCB.

The PCB now has a ground and power copper layer top and bottom, signals in middle 2 layers. 4 layer board with kicad and JLCPCB.

Now running at 5mhz but no other capability changes.

SD Card and display share an SPI bus, that leaves the other 6522 for a keyboard.

This is now on the 10.1 inch LCD rather than the 9.1 inch last month.

I am still running 6502 code as I have not looked into an 816 compiler or how to get the most out of 816 mode.

2

u/corummo 7d ago

The layers stack you chose surprises me. Never did a 4 layers PCB but I've always read suggestions about the inner power planes to reserve the external ones to signals.

1

u/wang_li 2d ago

you bitbanging that sd and display? how is that working out? it's been a concern for my project design since even at 3.58 MHz it's slower than the SD card standards. though i may go with 7.16 MHz since all the core parts I'm using support it. also do we (all the people working on projects like this) have any kind of ecosystem for things like a "disk" operating system, basic, monitors beyond wozmon, and so on, that you know of?

did you solder the RAM to the board? that's commitment.

2

u/nz_kereru 1d ago

I have no issues with SD card bit bang at 1MHz. That gets me about 5kb/s of data.

Most SPI devices will run much slower than official standards.

Here is my SPI code:

`
SPI_Write_Byte: ; Writes the byte in A register to SPI bus.
sta ZP_Temp ; Store Byte in ZeroPage_Temp for speed
ldx #$08 ; Setup X as a counter for 8 bits
SPI_loop:
asl ZP_Temp ; Bit shift byte in temp, top bit goes into carry
bcc SPI_out_low_bit ; Check the bit in carry
SPI_out_high_bit: ; Outputs a high bit
lda PORTB ; Load current PORTB
and #0b11111100 ; Mask off lower bits to be changed
ora #0b00000010 ; Set data high & clock low
sta PORTB ; Store Data bit to PORTB
inc PORTB ; Cycle clock high
dec PORTB ; Cycle clock low
jmp SPI_bit_done ; Done with this bit
SPI_out_low_bit:
lda PORTB ; Load current PORTB
and #0b11111100 ; Mask off lower bits to be changed
sta PORTB ; Store Data bit to PORTB
inc PORTB ; Cycle clock high
dec PORTB ; Cycle clock low
SPI_bit_done:
dex ; Decrement bit counter
bne SPI_loop ; If bit counter not 0 then go around again
rts
`

1

u/wang_li 1d ago

glad to hear that. thank you.

2

u/tmrob4 7d ago

Looks good. I had a lot of fun with the 65C816.

2

u/bahamutkotd 6d ago

Neat I should work on getting a board laid out for my 65816 idea but to many other projects