Computer / Programmazione / Z80 · 30 March 2019 0

LM80C: first video tests

As soon as I finally was able to get some sort of video signal out of my LM80C computer, I started trying to get more from it. At least I would like to visualize a simple welcome message on my TV so that I could be sure that I was driving the TMS9918A correctly.  So, in the past days I started designing a charset and writing an init code. The results are shown below:

LM80C: first video tests

LM80C: first video tests

There are some issues. The fonts are not properly rendered. The charset seems rotated counterclockwise by 90°. In fact, the fonts used in text mode should be 6×8 pixels, with the 2 less significant bits of each row set to 0 because the TMS9918A, to display 40 chars per row, shrinks the chars from the standard size of 8×8 pixels to a smaller 6×8 pixels, ignoring the 2 bits to the far right. As we can see by looking at the picture, there are horizontal bands and this is not correct, because the bands correspond to the 2 less significant bits in each char but they shouldn’t appear on video since the TMS9918A should ignore these bits. Another symptom that the TMS9918A is rotating the fonts is represented by the alternating vertical blue & white lines that appear inside the blue bands. In fact I designed the first chars (empty VRAM cells contain value $00, so the TMS9918A is displaying the char pattern $00) by alternating empty and full lines that should appear horizontally, too. Another issue…

I must investigate the wirings and try to understand if I inverted some wire. Remember that I’m using an SRAM interface instead of using the DRAMs for which the TMS9918A was designed for. Another issue, that this is relatively less important than the first one, is the welcome message that is printed 2 times on screen, at different locations. I’m less concerned with it because this could be a mistake of mine into the code: keep in mind that these are my first attempts writing Z80 assembly code.