While I haven’t updated this site in quite a while, I have been making progress on a few different areas of Y Ddraig.
On the hardware front, I have finished testing 3 of expansion cards for the computer. A Saga Megadrive(Genesis) compatible joypad interface card, a Yamaha V9958 video card and a Yamaha V9990 video card.
Sega Joypad interface
This is the simplest of the expansion cards. It supports 2 controllers and consists of a Xilinx XC9536 CPLD for handling the bus interface and supplying the SELECT lines to the Joypads and 2 latches for reading back data.
Other than few false starts in understanding how the controllers are read, then it works very well. I’ve only tested it so far with the 6-button controllers as they are the only ones I have available but as they are the more complex ones to read, I’m fairly confident that the 3-button controllers will work fine.
Yamaha V9958 Video Display Processor
The Yamaha V9958 is the successor to the V9938 and TMS9918 that were commonly used in the MSX computer line with the V9958 appearing in the MSX2+.
It has the following specifications:
- VRAM: 128 KB + 64 KB of expanded VRAM
- Text modes: 80 x 24 and 32 x 24
- Resolution: 512 x 212 (16 colors out of 512) and 256 x 212 (19268 colors)
- Sprites: 32, 16 colors, max 8 per horizontal line
- Hardware acceleration for copy, line, fill, etc.
- Interlacing to double vertical resolution
- Horizontal and vertical scroll registers
The board has 3 different outputs. A composite output, S-Video output and a Xrgb Mini RGB compatible 8-pin mini DIN output aimed at SCART use. There is also an optional audio jack input that can supply audio the 8-pin din output so TV speakers can be used rather than an external speaker.
The V9958 board has 192K of RAM installed and uses a CXA2075M encoder to provide the video output signals.
This board was a challenge to get working under the operating system. I wrote several test programs that run under the monitor software to test the different video modes. Both graphics and text modes worked well. Unfortunately, when writing the driver for the OS I just could not get the text mode to display correctly. It was either a mix of some random characters or, more often than not, a black screen. Even though the OS code was mostly based on the code I wrote for the initial tests, it just didn’t seem to work. I eventually wrote some of the access routines for the V9958 in assembly and that did seem to fix the problem and it works reliably in text mode under the OS now.
I suspect that some of the issues that I’ve encountered here are down to timing in accessing the card and writing some of the code in assembler has improved things there. While the code worked well using the monitor software, for the most part there are no interrupts running unlike the OS. I still need to find the root cause of this as if it is a timing issue then as the OS evolves it could come back at some point.
V9958 Text Mode
V9958 Mode 7 - Mandelbrot
Yamaha V9990 Video Display Processor
The V9990 was intended as a successor to the V9958 (or supposedly a stripped down version of the never finished Yamaha V9978), but while the other chips in the range had backwards compatibility with the previous generation, the V9990 has some similar functionality but lacks the backwards compatibility.
Still, the V9990 has impressive specifications for the time, some of the features include:
For this type, there are two pattern display modes.
- P1 (Display resolution 256 x 212 2 screens)
- P2 (Display resolution 512 x 212)
Various highly advanced functions are available such as powerful sprite function and omnidirectional scroll function.
For this type, there are four kinds of bitmap display modes which can be displayed on the NTSC or PAL frequency monitor as follows.
- B1 (Display resolution 256 x 212)
- B2 (Display resolution 384 x 240)
- B3 (Display resolution 512 x 212)
- B4 (Display resolution 768 x 240)
Capable of doubling the resolution in the vertical direction by using interlace. Display is possible up to 32,768 colors/dot. Built-in color palette (64 colors selected out of 32,768 colors). Omnidirectional smooth scrolling is possible.
Like the V9958 card, the V9990 has Composite, S-Video and RGB output. The board has 518K of RAM installed and again uses CXA2075M encoder to provide the video output signals.
While the V9990 has support in my OS for the text mode it is currently far from perfect. Currently on the display driver, when the screen scrolls up, the entire page is invalidated and has to be fully redrawn. For all the other cards, they have a dedicated text mode so all you need to do it update a couple of KB of text data, unfortunately when it comes to the V9990, and the mode i’m using, it has to copy each character to the screen buffer one at a time. This can make the updating the screen quite slow when scrolling with a noticeable delay when updating the page.
It’s possible that my display driver can be updated to use some of the features of the V9990 to improve how the drawing is handled, or I can use the pattern mode of the V9990 to display text as how it’s handled on the Kiwi.
Performance and improvements to the OS drivers are things that I’m planning to work on over time. The initial goal when working on this was to be able to plug in any video card and the OS can use it. From that point of view I think it’s working well so far.
More details of the OS will be added in my next post and I may also find a better way of taking screenshots of text on a very reflective screen.
V9990 Text Mode
V9990 Pattern mode test