So I'm making a homebrew z80 system with a video card that has a v9958 on it. It has 4 41464 ram chips on it for a total of 128k of video ram. Not an msx, I know, but hopefully someone here will be able to help or give me ideas of stuff to try that I haven't already. I am completely out of additional ideas of things to try. This will be a long post as I am going to type every single little thing I have tried and what results, if any that happened because of it.
I have some information including schematics of both my z80 system's mainboard and my v9958 board here (the most recent post is at the bottom). The github repository for my code is here which also has schematics posted.
Anyway, so I'm trying to get my v9958 to work. So far, I have got it to output a solid color but nothing else. I can change the color by modifying the palette register but if I change the text1 or text2 mode colors in register 7 to anything, nothing different happens. It refuses to do anything except make the entire screen a solid color of whatever is in the palette register 0. I can also access the status registers and print them to my 20x2 character lcd screen and the results make sense according to the v9938 programmers guide.
Here are pictures of a solid red screen and a solid green screen:
blank red screen
blank green screen
In my current code on github, I put the color green into palette 0 and as a result, it shows a green screen entirely regardless of what's in register 7.
My schematic is largely based off of that one primrose bank schematic with the CXA1645P.
Anyway so the first problem I had was I was getting no video at all - turned out I had the composite and the s-video on backwards. I fixed that and suddenly, a solid color showed up on the screen. This then began my long and fruitless process of trying to get it to do anything other than show 1 solid color.
In a nutshell what my code does is set the video mode, set up registers 0, 1, 8 and 9, set palette registers, set register 7 and then set up registers 2, 3, 4 and 10 to have the correct vram addresses for when I type the command to copy over the font and/or type the command to try to display text on the screen. I have tried setting the registers in all kinds of different orders and have found that it doesn't seem to make a difference.
I don't even get garbage on the screen as expected. Shouldn't there be a bunch of random stuff in the vram, or doesd the vdp clear it? Since this seems like a vram issue, that's the first thing I started investigating.
One of the first things I noticed was that I forgot to attach RAS (pin 62 of the vdp) to RAS of the 41464 ram (pin 5). I fixed that which caused nothing different to happen. I tested every different pin of each of my 4 41464 chips and found that that they all had perfect continuity to where they were supposed to go. I hooked up a logic analyzer to see if the vdp was indeed sending and receiving data to the ram and indeed it was. Here is a screenshot of my logic analyzer screen when writing data to vram. and here is a screenshot of the vdp reading from vram.
I tried putting a 10k resistor on r3 instead of a 1k resistor. This resulted in video no longer coming out so I put it back. I tried replacing C33 with a 30pf ceramic disc capacitor which resulted in nothing being different. I then put back on a different variable capacitor which resulted in nothing different happening no matter what I adjusted it to (as before when I had a variable capacitor on). At one point I had a 300ohm resistor between xtal 2 and c16. I took that out and jumped the connection with the shortest ide cable wire possible to reduce interferance and nothing different happened. I tried hreset and vreset directly to 5v. I put a 10k resistor between vreset and +5v and then hreset and +5v. This made no difference. I tried putting in a different v9958 chip and nothing happened. I have NOT tried putting in different ram chips yet (which I am doing to try when I get different ones) but I have taken them all out of their dip sockets, put them back and tested for continuity again.
The address decoding logic I had on there wasn't correct at first but I fixed it. I can successfully read data from the vdp as well as write to the vdp on all ports and have confirmed this with a logic analyzer. My z80 cpu is clocked at 1MHz so there's no way it's going too fast for the vdp. Also note that I forgot to connect ioreq, wr and rd on my mainboard which I fixed even though I haven't updated it in the schematics.
The CXA1645P will output to the s-video and the composite plug. When I switch j4 to use the composite signal straight from the v9958 and not the video encoder, it's just a blank white screen each time.
I have thoroughly checked my code thinking the palette register subroutine or the font copying subrountine wasn't working but nothing I ever did programming wise has made a difference (other than when I load a different color into palette register 0). While I am quite certain my code should be correct as far as setting up the vdp goes, I am open to any suggestions you may find by looking at it. The relevant stuff is is "9958driver.asm" and a little bit of relevant stuff is at "commands.asm". I have tried text 1, text 2 and graphics 1. In all of those modes, it has been just a solid screen of whatever color is in palette register 0. No graphical garbage. No random font sprites. Just a solid screen. It doesn't matter if I run the "loadfonts" command (the one that loads the font data into vram) or "vprint" which loads a bunch of random stuff onto the screen. It's always just a blank solid screen.
I feel like I have done and tried every single thing there is to try. Does anyone have any other ideas? Anything I'm missing or forgetting? Any help would be greatly appreciated and if anyone would like me to post the results of any additional data or tests, let me know.