Platform NEC PC8801 - z88dk/z88dk GitHub Wiki
It's complicated, see https://en.wikipedia.org/wiki/PC-8800_series for details
- 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
zcc +pc88 -create-app -Cz--audio program.c
This will generate three files, a.bin (a pure binary block), a.t88 (a file valid on many emulators), and a.wav, never tested but meant to be loaded on the real hardware.
zcc +pc88 -subtype=disk program.c -create-app
This will create a .d88 image suitable for booting in FD1 on a PC88 emulator. With this model, allram mode is used, resulting in about 48k of usable space. As a downside, the firmware is not available.
The screen mode can be switched using the console_ioctl()
function. The following modes are supported:
- Mode 0: 80x25, 640x200 graphics
- Mode 1: 40x25, 640x200 graphics
- Mode 2: 80x25 (bitmap characters), 640x200 graphics
- Mode 32: 80x25, 160x100 semigraphics
- Mode 33: 40x25, broken graphics
- Mode 34: 80x25 (bitmap characters), 160x100 semigraphics
The targets starts up in mode 0. It's recommended that mode 2 is used for applications: it provides more functionality and is hardware accelerated so is actually faster.
Mode 0 (32) and 1 (33) support setting attributes for both colour and for character decoration. However, due to the way the attributes are handled on the PC8800 it does feel slower than text mode on other targets.
The PC-8800 target supports two different graphic modes:
- 640x200 multicolour pixels
- 160x100 semi-graphics.
As a result of the text attribute handling, text based graphics are slower than that implemented on other targets. As such it is recommended that multicolour graphics is used: as a result it is the default graphics mode.
The multicolour graphics library by default takes advantage of the ALU and as such is "hardware accelerated", to disable the acceleration use the option -clib=v1
or -pragma-define:CLIB_PC8800_V2_ENABLED=0
.
The 640x200 graphics mode presents non-square pixels, the function gfx_set_fatpix(1)
switches to square pixels for line/shape drawing with the resolution being reduced to 320x200.
Target specific extras are listed in the <pc88.h> header file along with __sfr
and documentation for the PC88 hardware.
An emulator capable of loading the T88 cassette file format is necessary, the default ORG address is $8A00, it was chosen peeping into the original software written in the eighties.
To run an appmake created program, first start N88 BASIC (on the M88 emulator the cpu clock must be set to 8mhz) or N80 BASIC, get to the prompt (answering first to the question about the "files?" number), then:
MON
R (or L if you are using the N80 BASIC)
G8A00
(CTRL-b would return to BASIC from monitor)
Please note that the M88 emulator and possibly also others require the correct CPU speed setting (usually 4 or 8 Mhz) to load correctly the program from the tape file.
The audio file can be slightly accelerated with the -Cz--fast build option.
Appmake can be also run in 'dumb mode' to convert any T88 file to wav:
appmake -b program.t88 --audio --fast --dumb
https://web.archive.org/web/20190130002453/http://www.geocities.jp/retro_zzz/machines/nec/index.html