65816: Working to Improve Speeds
Updated: Apr 15, 2022
Now that I have my 65816 motherboard working, I would like to improve speeds. The symptom that I see (and would like to improve) is that when I am using my video card, I need to drop the speed of the overall system.
To help me better understand the root cause of the issue, I have setup a simple test that writes characters to the LCD screen. I then try different combinations of clock speeds, with and without the video card. If the characters show up on the LCD screen, I count that as a success. If the LCD screen does not initialize or I do not see the character on the LCD screen, I count that as a failure.
Without the full video card installed, I can run the system at 14.16 MHz, using a 28.32 MHz oscillator.
With the video card installed, I have to drop the system speed down to 10 MHz, using a 20 MHz oscillator. (I don't have any oscillators on-hand that are between 28.32 MHz and 20 MHz.)
If I remove the memory daughter cards from the video card, I can run at the full speed of 14.16 MHz.
Both the motherboard and video card have resistor networks, where I can pull up or pull down address and data lines, or I can disconnect the resistor networks. On the motherboard, I can quickly swap the resistor networks with different resistor networks (e.g., for different resistances). The testing done above is without any resistors in place, both for the motherboard and the video card.
Since I can run full speed without the daughter cards installed, I am going to focus my attention on what impact the daughter cards are having on the system. Looking at the schematic for the daughter cards, the incoming signals to the daughter cards from the system are A0-A14, D0-D7, MEMOEB, and MEMWEB. These signals are used to write to the dual-port memory. These signals are highlighted below.
The outgoing signals from the daughter card back to the video card are VA0-VA14 and VD0-VD7. These signals are used by the video card to retrieve pixel data from the dual-port memory and generate the analog video output. Here are the connections on the blade of the video card that connects to the motherboard:
I have not tried pull-up or pull-down resistors on MEMOEB or MEMWEB. These signals are coming from a 74HC00 on the motherboard.
I may need to experiment with different pull-up/down resistor values on the video card, since the daughter cards are tapping into address and data lines.
✔ COMPLETE - I am still using version 1.0 of the daughter cards. They required some trace cutting and bodge wires to deal with a backwards header in the design. I have version 1.1 (with the corrected header connections) of the PCBs on-hand. I plan to assemble a second video card using the updated daughter cards. Possibly, there's something amiss with my trace cuts and bodge work. 🤔
Plenty of scoping: voltages, clocks, address/data lines -- without and without daughter cards.
If you have suggestions on things I should look into or test, please let me know! 😃 Thank you!
I was able to get the LCD to work, with the VGA card installed, and the processor running at 14.16 MHz. Changes that I made:
Swapped out the 1.0 daughter cards with the 1.1 daughter cards (images below). I don't think this made much of a difference by itself. As part of this, I used better pin headers (not sure if it made a difference).
Changed the SN74HC573N to a CD74AC573E. This improved the upper address signals. I saw a fair amount of noise with the HC. The AC looks quite a bit better. I did also try a DM74AS573N; the signals looked the best, but the LCD would not initialize when at full speed.
Changed the SN74HC245N to a 74AC245PC. With this change, the LCD worked fine, with the video card installed, and the processor at 14.16 MHz.
Not Done Yet Though
At this point, the 65816 is running fine at 14.16 MHz, with the video card and daughter cards installed. However, the video card itself only works up to 8 MHz. At 10 MHz it starts to misbehave (mostly works). To be fair, my initial goal was 8 MHz, so I am happy to have the full systems, including video running at 8 MHz. However, I think there's still room to go faster. :) I will continue to look for ways to go faster. (see Planned Troubleshooting above)
I changed the SN74AHC00N that's driving MEMOEB and MEMWEB to a CD74AC00E. Now the video runs fine at 10 MHz.
Up to this point, I have been testing without any pull-up or pull-down resistors on the bus or VGA internal bus. I just pulled all lines up, and it appears to be helping. I tracked down a 25.175 MHz oscillator (12.59 MHz at the processor), and with the bus pulled up, it's painting some of the screen. Unfortunately, I only have 10K resistor networks for my motherboard, so I set both sets of resistor networks per line as pull-ups (resulting in a 5K equivalent pull-up), and it's better. I have some 1K pull-ups on the way; I think they may help.
Here's the video output when running at 10 MHz:
I now have the system running at full speed (14.161 MHz), with video output working well! The final change I made was to change the ROM. For the simple LCD test, I was using an SST39SF040-70. For the VGA test I was using an AT49F040A-70PI. I put the VGA program on the SST, and all is good! I'm stoked!
Updated EasyEDA schematics and PCB designs have been posted to rehsd/PC-65816: PC based on 65816 (github.com).