Platform Spectravideo - z88dk/z88dk GitHub Wiki

Spectravideo SVI

Classic library support (+svi)

  • Native console output
  • Native console input
  • ANSI vt100 engine
  • Generic console
    • Redefinable font
    • UDG support
    • Paper colour
    • Ink colour
    • Inverse attribute
    • Bold attribute
    • Underline attribute
  • Lores graphics
  • Hires graphics
  • PSG sound
    • ETracker (SAA tracker)
    • PSG Lib (SN76489)
    • Arkos2 Player (AY)
    • WYZ Player (AY)
    • Vortex tracker (AY)
  • One bit sound
  • Inkey driver
  • Hardware joystick
  • File I/O
  • Interrupts
  • RS232

Quick start

zcc  +svi -lm -create-app program.c

This will create a .CAS file. Once compiled, run the SVI emulator and load the "tape" with the /r option.

If you are using the Jimmy Mårdell's "SVI" emulator, you can specify the autoload option: svi -tapa adv.cas

Other emulators, in example BlueMSX need the full BASIC command to be typed in: bload "cas:",r

A WAV audio file can be created too, with the following option:

zcc  +svi -lm -create-app -subtype=wav program.c

16K model

To run on a 16K machine, you need to move the code origin to the upper half. '-zorg=49200' should be a good option for you zcc command line. Any working address for the 16k model will still work on the 32k models.

ROM cartridge

A ROM cartridge for the SVI-328 can be generated with:

zcc  +svi -lm -create-app -subtype=rom program.c

and similarly for the SVI-318 as follows:

zcc  +svi -lm -create-app -subtype=rom318 program.c

It should be noted that the SVI-318 has a different memory layout to the SVI-328.

When generating ROMs, the firmware isn't available so to read the keyboard you must add the option --hardware-keyboard to redirect calls to the "inkey" keyboard reading routines.

Autoboot floppy

An auto booting disk can be generated with:

zcc  +svi -lm -create-app -subtype=disk program.c

The .svi image created is a raw image file that is understood by mame. You can load it in Mame with the following options:

./mame64 svi328 -exp sv601 -exp:sv601:1 sv801 -flop1 a.svi

80 Column mode with the SV-806 expansion card

The SV-806 card is supported by the generic console. In a similar manner to the Einstein, switch to mode 10 using console_ioctl

You'll need to start mame with the following options (this includes the floppy interface):

./mame64 svi328 -exp sv601 -exp:sv601:1 sv801 -exp:sv601:2 sv806

Note, in this mode the standard fgetc_cons() driver appears to not work. So you'll need to switch to the inkey driver using: --hardware-keyboard

Serial port with the SV-805 RS232 expansion card

The SV-805 card contains an 8250 UART and is supported using the z88dk libraries using the API defined in <rs232.h>.

For Mame usage, start with:

./mame64 svi328 -exp sv601 -exp:sv601:1 sv801 -exp:sv601:2 sv805 -exp:sv601:2:sv805:rs232 null_modem -bitb socket.localhost:25233 -flop1 a.svi

Which will boot an SVI floppy containing your application. You can connect to the serial port by telnetting to port 25233

Keyboard handling

When z88dk uses the firmware to read the keyboard, to disable the click emitted when a key is pressed add the following pragma: -pragma-define:CLIB_FIRMWARE_KEYBOARD_CLICK=0.

The TMS9918a library

z88dk provides a TMS9918a library that allows hardware access to the VDP chip. All graphical functionality supplied by z88dk uses these functions and such is hardware independent.

⚠️ **GitHub.com Fallback** ⚠️