Platform Nabu - z88dk/z88dk GitHub Wiki

Machine Specifications

  • CPU: Z80 @ 3.57Mhz
  • VDP: TMS99x8, 16k VRAM
  • PSG: AY-3-8910
  • RAM: 64k
  • ROM: 4k/8k IPL

Classic library support (+nabu)

  • 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

Code is shared between the native target and CP/M subtype. Both versions are working correctly.

Compilation

zcc +nabu world.c -create-app

A .nabu file will be generated which can be transferred using a Nabu internet gateway. The stack location defaults to $ff00 but can be adjusted using -pragma-define:REGISTER_SP=nnnn.

CP/M target

Floppy disc image (-subtype=nabu)

The Nabu can also run as a CP/M machine, and configuration is available by compiling with: zcc +cpm -subtype=nabu -create-app. With this configuration a raw disc image suitable for usage in mame is generated.

The disc based CP/M has a few issues in the BDOS which can cause odd effects when the BDOS is used to read the keyboard and z88dk graphics are being used. To mitigate this, link the library -lnabu_int which takes over the interrupts and rectifies this behaviour.

Harddrive image (-subtype=naburn)

Cloud CP/M fixes the issues found in the floppy based CP/M so the nabu_int library isn't used. However it doesn't seem to support mounting floppy disc images. To create a disc image suitable for use with Cloud CP/M, use the -subtype=naburn option.

Ishkur CP/M image (-subtype=nabu-nshd8)

Using the -subtype=nabu-nshd8 will create a hard disc image that is compatible with Ishkur CP/M.

Mame usage

To start Mame in floppy based CP/M mode:

 mame -window nabupc -option1 fdc -flop1 ~/leo1.img -bios ver14 -flop2 ~/z88dk/a.img

To start Mame in non-CP/M mode and use a gateway:

 mame -window nabupc -hcca null_modem -bitb socket.127.0.0.1:5816

This has been successfully tested using NabuNetworkEmulator

Support

The NabuPC uses a TMS99x8 and such, many MSX examples will work.

The WYZ and VT2 PSG engines are supported by this target.

F18A FPGA VDP replacement

The Nabu library is built with support for the F18A FPGA VDP replacement. The most used feature is probably the 80 column text mode, the following snippet detects its presence and switches to 80 column text mode, or 40 column mode if it's not present.

#include <video/tms99x8.h>

...
vdp_f18a_unlock();
int f18_present = vdp_f18a_detect();

vdp_set_mode( f18_present ? 80 : 0);

Retronet

The retronet functionality is available in <arch/nabu/retronet.h>, low-level HCCA access is available in <arch/nabu/hcca.h>. Access to the HCCA port is driven by interrupts and is available by default in the +nabu target.

Links