Hello guys,
I have some news about my project. While I can not get a real 6502, I'm using 6507 taken from an old Atari. The processor is responding correctly, for example when I use the data bus as "EA" (NOP). I made the connection to the EEPROM and it worked correctly.
Now, following the project [url]
http://www.grappendorf.net/projects/650 ... world.html [/ url], I called the ACIA and a FTI232 to receive a string (Hello World) via serial.
It turns out that I only receive garbage according to the attached image.
My schematics is:
Since the 6507 has only 12 bits of address, my code used is:
Segments
Code:
MEMORY
{
ROM: start=$2000, size=$2000, type=ro, define=yes, fill=yes, file=%O;
}
SEGMENTS
{
CODE: load=ROM, type=ro;
VECTORS: load=ROM, type=ro, offset=$1ffa;
}
Principal Code:
Code:
.setcpu "6502"
ACIA_DATA = $0000
ACIA_STATUS = $0001
ACIA_COMMAND = $0002
ACIA_CONTROL = $0003
.segment "VECTORS"
.word nmi
.word reset
.word irq
.code
reset: jmp main
nmi: rti
irq: rti
main:
init_acia: lda #%00001011 ;No parity, no echo, no interrupt
sta ACIA_COMMAND
lda #%00011111 ;1 stop bit, 8 data bits, 19200 baud
sta ACIA_CONTROL
write: ldx #0
next_char:
wait_txd_empty: lda ACIA_STATUS
and #$10
beq wait_txd_empty
lda text,x
beq read
sta ACIA_DATA
inx
jmp next_char
read:
wait_rxd_full: lda ACIA_STATUS
and #$08
beq wait_rxd_full
lda ACIA_DATA
jmp write
text: .byte "Hello World!", $0d, $0a, $00
Any tips?
Regards.