With over 24 hours to go before the end of July deadline the final piece of the puzzle fell in to place!
But, first, a quick catchup from the last blog post;
On Sunday I successfully burned BASIC to a couple of 8k slots on a 64k EEPROM, and that worked great. So, on Monday, I figured there was no more putting it off, I had to finish my Assembler Code program and give it a go. So, I removed the Spectrum specific bits that I’d used to debug it, added bits specific to my hardware and wrote the actual display code loop. Then burned it to the EEPROM, held my breath and plugged it in….
This left me with a dilemma. Apart from the LED matrix, how could I debug code on a Z80 that had no form of input or output? Then I realised the serial port must have an address. So I hunted through the source code and found stuff being sent to port 0x81 (129). So I added a few OUT (129),a commands and tried again. Nope. Still nothing. Ahhh… I hadn’t initialised the stack pointer. Ok, do that and try again… No. Still nothing. Check BASIC still works. Yup, that’s fine. My code? No, nothing.
Then I swapped between BASIC and my code with the jumpers without turning it off. After hitting reset the serial port spewed out a load of .Owen# all over the screen! So, my code was doing something.
Finally today I noticed a huge glaring mistake. I was JUMPing out of the main loop to a delay subroutine when I should have CALLed it. Doh! I made the change, burned the code to EPROM, fired it up and… BINGO! It worked!
Well, it was mirrored, but otherwise it worked! My name was written in LEDs being driven by a Z80 based computer I built myself from scratch running my own code written in Assembly Language. That, I believe, is challenge complete!
Well, almost complete. Tomorrow I will write a closing blog, as well as publish the code, schematics, PCB layouts on GitHub and share the PCB files on OSHPark so that everyone else can play along at home.