V9958

Sorting Demo

To share my fascination for the numerous sorting algorithm videos on youtube, I took some sorting algorithm examples in C from https://www.geeksforgeeks.org/sorting and visualized them using our BGI compatible C graphics library (more about that later).

The algorithms shown are:

  • Bubble Sort
  • Cocktail shaker Sort
  • Gnome Sort
  • Insertion Sort
  • Comb Sort
  • Heap Sort
  • Shell Sort
  • Selection Sort
  • Quick Sort
  • Merge Sort
  • Radix Sort

The code examples from https://www.geeksforgeeks.org/sorting are only slightly adapted and could be compiled with cc65 almost instantly. The trick was only to find the places in the code where the interesting search array accesses happen.

V9958 YJK (YUV) mode

Some time ago we introduced a tiny tool called ppmview.prg in our collection of tools and progs for our Steckschwein. The ppmview.prg, as the name already tells, is able to load an image in ppm (Portable BitMap) format with a maximum size of 256x212px and displays it on the screen.

The first version of ppmview was released in 2018 and since then we just use the SCREEN 8 (MSX) also known as graphic mode 7 (RGB).
Mode 7 is a bitmap mode where we have 256 colors available and each pixel requires 1 Byte for their color information. The 1 Byte color information must be stored in VRAM encoded as GRB 3:3:2 (green, red, blue), which means 3 Bit green, 3 Bit red and 2 Bit blue.
On the other side we have the PPM color information - which is 24Bit RGB - so we have to adapt or map the 24Bit to our 8 Bit GRB color value in some way.
It becomes apparent that this comes with a price, namely the loss of color information. Especially the blue part of the pixel is just 2 Bit, hence we have 4 levels of blue per pixel available only. The following screenshot from our Emulator shows the loss of color information.

V9958+OPL2-Boards are there

The newly made boards made their way from China to Munich. Starting now, the multi board version of the Steckschwein is made up of 3 Boards: CPU/Memory, IO/UART and V9958-OPL2.

New V9958-Board with integrated OPL2

It’s time for another hardware upgrade. Since we really want to get our single board Steckschwein done, we are going for higher integration of our multiboard prototype. After integrating the UART to the IO-Board, we integrate the OPL2 sound part onto the V9958 video board, so the current Steckschwein multi board incarnations are reduced to three boards. We did postpone our plan to upgrade sound to OPL3 because Daniel Illgen, which we met at VCFb, convinced us with some awesome OPL2 tunes that OPL2 is still cool. Also, we save the extra oscillator, since the OPL2 can be clocked using the CPUCLK-Pin from the V9958, which happens to provide 3.58MHz.

V9958 - "The WAIT" - investigation of the CPU/VDP /WAIT interface

… on the way back to munich, we had some time to do a little code review of our gfx library. thinking about the cpu to video chip timings and again read the well known datasheets of the V9938/V9958. suddenly i got an enlightenment and we came to the following conclusion.

as described in the datasheet (V9958-Technical-manual_v1.0.pdf) of the V9958 there are different timings given for different kind of writes. so as far as we understand there are the following timings

V9958 - Es ist vollbracht

Da ist sie nun, die neuen Videoplatine. Nach einigen Umwegen hat der Packen Boards uns erreicht (die erste Lieferung ist versehentlich in Spanien gelandet, während wir die Platinen des spanischen Bastlers erhalten haben. Inzwischen hat jeder Ersatz erhalten).

Wir haben ja bekanntlich unsere Vorgehensweise geändert, indem wir schneller Platinen anfertigen lassen. Aber zu unserer großen Freude funktionierte die erste Platine nach Bestückung auf Anhieb. Selbstverständlich haben sich aber auch ein paar Patzer eingeschlichen.