Been on this forum for quite some time (since the beginning of my venture into 6502). I have finally completed my project in it's entirety and wanted to share it with you all, especially due to all the tips and tricks I've learned from the community along the way. My project will be completely open sourced (for the most part, I just have to upload my KiCad schematics and gerber files to github). Here was my design guidelines and the things I was able to tackle.
For the Main System
- 6502 CPU
- 32k SRAM
- Real Time Clock
- 6522 VIA
- PS2 Keyboard Support
- 16k ROM
- Custom Monitor
- EhBasic Ported
- SD Card support (Load/Save)
- Custom VGA GPU via FPGA
- Character based graphics
- 6-bit color
- Dual Port RAM (4k) for VRAM
- 32k SRAM for character RAM with programmable characters up to 256
- Custom ROM Flasher
- Device for stepping through the 65c02 and viewing ADDR bus & Data Bus
- cc65 target for compiling C code against it
Here are some of my milestones in pictures -
First time getting HSYNC and VSYNC working on the FPGA to get a 640x480 signal recognized by a monitor I got 6-bit color working! Displaying the full palette I have my pseudo registers working, and able to tell the VGA GPU to save my Characters to Character SRAM The Dual Port RAM is now interfacing with a VGA debugging device I created, It is accurately showing text on screen The day I placed the 65C02 on the breadboard, exciting moment Adding the SRAM, ROM, and the Glue Logic to select everything
I never really realized how important placement is on a bread board until months later Wiring the busses up
Months later I would realize using this type of wiring was horrible, I wish I cut hookup wire and did it all properly. All part of learning though Custom Debugging board
I created this custom debugging board to allow me to step the 65C02 and look at what is on the data bus as well as the address line through the 7 Segment LEDs Hello World
Another huge moment for me, getting some 6502 code assembled and have it print Hello World on screen The beginning of DANI-I Monitor
It had ROM functions for printing strings, clearing the screen and showing simple tile based graphics Keyboard Support!
At this point I had placed the VIA, used a Port on it, Set up a PIC16F1509 to translate keyboard scan codes into bytes that could pull the interrupt on the VIA and send it to an input buffer. I implemented simple commands like Peek & Poke and the monitor was really taking shape. Drive & RTC Implemented
At this point the sky was the limit, I had implemented a PIC18F that would communicate over i2c to a RTC & over SPI to a SDCard. Then a simple protocol that could talk to it over the VIA port. Suddenly the world opened up as I was able to Read / Write to SD Cards & have a working clock. Shortly after I ported over EhBasic and implemented LOAD & SAVE commands Version 2.0 Of The DANI-I Monitor
Introduced EhBasic, DUMP Command, WRITE commands, JMPR, LOAD, SAVE, DIR - basically everything i needed to load programs off of SDCARD as a binary, or from basic and execute them KiCAD & Schematics
Probably the most fulfilling point of this project was when these guys came in, I designed, routed and sent off for PCB's to be printed. I checked the mail every day for them to come in.
Solderfest 2022 The payoff
Hooking it up and booting up for the first time was insanely nerve wracking for some reason. It felt great to finally see this through tho. In action... via gif (Click on me to see it work!)
At this point I forked CC65 and created a target for my system. I started to build all sorts of small projects and games in C. Seeing it working and interfacing with my ROM functions felt out of this world What an incredible feeling guys. Like I said I am such a complete newbie at this but it was such a great learning experience. I will add my github repo's below, and as I said earlier, try not to laugh too much at my code, I am no way shape or form an experienced 6502 developer. And please leave me some questions or comments I'd love to discuss some things i've learned along the way.
Github: DANI-I-SYSTEM-ROM
Github: DANI-I-Keyboard Controller Firmware
Github: DANI-I-Drive Controller Firmware
Github: DANI-I-VGA VHDL FPGA Source
Github: CC65 Fork with DANI-I Support as a Target