Hello everyone!
I've been working on my new Xilinx CPLD project, but wanting to go a different route than normal. Introducing the mess o' wires that somehow is running 6502 assembly code on an Arduino!
First, the memory map is:
$0000-$03FF = 1K of direct access RAM on Arduino, duplicated from $0000-$7FFF
and
$F000-$F7FF = 2K of display RAM for text characters through VGA
$F800-$FFFF = 2K of code RAM loaded from the SD Card, both of these are duplicated from $8000-$FFFF
The Arduino loads the first 2K from the SD Card, puts it in $F800. It assumes this is 6502 assembly code, and (currently) runs it immediately. My testing code is small:
Code:
.65C02
.ORG $F800
LDY #$00
LDX #$02
loop
LDA #'T'
STA $F000,Y
INY
LDA #'e'
STA $F000,Y
INY
LDA #'s'
STA $F000,Y
INY
LDA #'t'
STA $F000,Y
INY
DEX
BNE loop
LDA #'!'
STA $F020
STP
.ORG $FFFC
.BYTE $00,$F8
.BYTE $00,$F8
After that, it goes into "scratchpad" mode, where I can just type whatever I want from the PS/2 keyboard onto the screen. I plan to creating a little menu where it will run the assembly code on command, instead of simply being a bootloader only.
I completely despise using this breadboard, it has failed me multiple times and has been more of a problem than a solution. Yet, it works *right now* and that's good enough. I plan on making an SMT style board for this very soon.
More updates when I have them. Thanks everyone!
Chad