Hey there...
I know it's a bit of an internet no-no to make huge posts without lurking a bit on a forum. I just thought I would show off a project of mine and see if anyone out there can give me ideas on what to do.
It started with me wanting to make a 6502 computer for a friend of mine for his birthday. I started with a
Kim-1 kit which, sadly failed. After putting the whole thing together, all it did was light it's power light and nothing happened. I tried to troubleshoot it the best I could, only to find that I soldered two caps in the wrong place and bent a few IC pins. Well, that was a lesson learned.
Discouraged, I put the project away.
About a week ago I was cleaning my apartment and found my Arduino 2560 Mega. I decided as opposed to making a 6502 computer from ICs, I would make a software version of the same thing using my Arduino. It came out awesome!
I designed it to be a kind of "Super Kim". The code it's running in the picture is the following program.
Code:
.org $200
LDA $FD ;$FD is the read-only keypad register.
CMP #$00
BEQ ($0200)
STA $FC ;$FC is the write-only display register.
JMP $0200
Basically it takes whatever is input on the keypad and prints in on the display.
there are 5 "hardware" registers that hang out on the zero page.
Code:
$FB Bank_Switch (w)
$FC Display_out (w)
$FD Keypad_in (r)
$FE Serial_Write (w)
$FF Serial_Read (r)
The system emulates a 6502 with 512k of ram. the bottom 32k ($8000-$FFFF) is banked in depending on what is written to $FB ($00 to $0F) if you write a zero in $FB it will mirror the top half of memory ($0000-$7FFF) and I call this "32k mode".
When you plug in a USB, it becomes a com port on a computer and you can use this as a terminal running @ 9600-8-N-1.
The emulation code I used was found
here however, I did a rewrite the memory portion (The original only could use 1024 bytes of memory), added registers for my LCD display and keypad, and implemented the RESET interrupt. (The original code does not have interrupts implemented)
With everything now implemented how I want, I'm looking for a cute mini-assembler, something like the system monitor from the Apple II. This is so you can write short little programs using the keypad. The keypad matrix looks like this.
Code:
{'1','2','3','U'},
{'4','5','6','V'},
{'7','8','9','W'},
{'+','0','-','X'},
{'A','B','C','Y'},
{'D','E','F','Z'}
The letters down the right-hand side (U-Z) are just placeholders. You can make them whatever you want. I'll probably borrow from the Kim-1 keypad (GO, ST, RS, AD, DA, PC, and an extra one left over).
Programs are loaded via the USB Serial port. You load programs by transmitting a virtual punch-tape over the com port. You save you programs by doing the reverse. (I originally planned to have it load actual punch cards, but couldn't find/make a cheap punch card peripheral)
I'm going be mounting this into a black plastic case with fake wood grain detail to complete the 1977 look of it.
I'm intentionally not going to be using BASIC as my default program in the system. I'm keen on keeping it very close to the metal and then load applications the very old-fashioned way. I also have a few data pins left over so I can still interface something else.
Anyone have any ideas on what else I can come up with?