Platform Krokha - z88dk/z88dk GitHub Wiki

Hardware summary

  • К580ВМ80А@ 2Mhz
  • 2k RAM including 1.5k VRAM
  • 48x32 character mapped display

Classic library support (+krokha)

  • 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
  • One bit sound
  • Inkey driver
  • Hardware joystick
  • File I/O
  • Interrupts
  • RS232

Compilation

zcc +krokha world.c -create-app

This will create a rom file suitable for loading into mame.

Mame usage

The rom file generated by z88dk needs to be copied in place of bios.bin in the Mame romset. To load a tape, press return and then hit play on the tape

Memory usage

This machine is incredibly tight for memory usage, it has just 2k of RAM and the screen VRAM takes up 1.5k of that. This leaves just 512 bytes for stack and program data.

The default CRT reduces size of various things, but more can be saved by:

  • Compile with -pragma-define:CRT_ENABLE_STDIO=0 this will prevent usage of printf/fgetc(), but alternatives are available in <conio.h> - cprintf() and getch()
  • Mark static data as const

Links

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