Platform Casio PV1000 - z88dk/z88dk GitHub Wiki
- Z80 @ 3.579Mhz
- 3k RAM, 0k ROM
- VDP: D65010G031
- Audio: On ports 0xf8, 0xf9, 0xfa - D65010G031 (not supported)
- 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)
- PSGLib
- One bit sound
- Inkey driver
- Hardware joystick
- File I/O
- Interrupts
- RS232
- Joysticks: 2x on 0xfd
zcc +pv1000 world.c -create-app
The resulting .rom file can then be loaded into the emulator.
The default configuration is to create a 16k ROM. If your application is larger then you can supply -subtype=32k
to create a 32k ROM.
The PV1000 port has the following features:
- VT52 console
- joystick() from
<games.h>
. Controller 0 is joystick 1, Controller 1 is joystick 2 - Lores graphics
The PV-1000 has no ROM and hence all tiles need to be supplied in the user's ROM. The format used defines the RGB value for each of the pixels, as such each 8x8 tile will consume 32 bytes within the ROM. A maximum of 224 tiles can be configured in the ROM.
By default, a z88dk ROM builds with the following character set (starting at code 0xa and ending at 0x7f):
Byte codes 0x10 - 0x1f are used to implement lores graphics.
The colour information is embedded within the tileset, so changing the colours requires rebuilding the tileset, for this purpose the font2pv1000 is provided.
This method directly includes the tileset files into the crt0 file. It works well for smaller projects, but with larger projects filenames may clash.
First of all convert a font using font2pv1000
, to replicate the default font the command line would be:
font2pv1000 -f 6 -b 0 -c 32 {z88dk}/libsrc/_DEVELOPMENT/font/font_8x8/font_8x8_cpc_system.bin > tileset.asm
If you then supply the option -pragma-define:PV1000_CUSTOM_TILESET=1
to the compilation line your tileset will be included.
To redefine characters points 0x0a - 0x1f, follow a similar recipe but use -pragma-define:PV1000_CUSTOM_LORES=1
on the command line.
This newer method works better for larger projects and is the recommended approach. The crt0 provides two sections pv1000_lores
for codes 0x0a - 0x1f and pv1000_tileset
for codes from 0x20.
First of all convert a font using font2pv1000
, to replicate the default font the command line would be:
font2pv1000 -f 6 -b 0 -c 32 -s {z88dk}/libsrc/_DEVELOPMENT/font/font_8x8/font_8x8_cpc_system.bin > mytiles.asm
Note the addition of the -s
option to write a section header. You can then include mytiles.asm with the rest of the files in your project. Add -pragma-define:PV1000_CUSTOM_TILESET=2
to stop the default tileset from being included.
The default section that font2pv1000
writes the tiles into pv1000_tileset
. To define the lores set specify -s pv1000_lores
. Add -pragma-define:PV1000_CUSTOM_TILESET=2
to stop the default lores tiles from being included.