Platform Hector - z88dk/z88dk GitHub Wiki

Micronique Hector

There are many models in the range, the following have been tested.

Hector 1

  • Z80 @ 1.75Mhz
  • 8kb RAM
  • 4kb ROM
  • 112x77 px display with 4 colours / 8 available
  • sn76477 sound generator (unsupported)

Hector HR / Hector HRX

  • Z80 @ 5Mhz
  • 32kb RAM
  • 16kb ROM
  • 240x226px display with 4 colours / 8 available
  • sn76477 sound generator (unsupported)

Classic library support (+hector)

  • Native console output
  • Native console input
  • ANSI vt100 engine
  • Generic console
    • Redefinable font
    • UDG support
    • Paper colour
    • Ink colour
    • Inverse attribute
    • (Hector1 only) font height 6/8
    • Bold attribute
    • Underline attribute
  • Lores graphics
  • Hires graphics
  • PSG sound
  • One bit sound
  • Inkey driver
  • Hardware joystick
  • File I/O
  • Interrupts
  • RS232

Compilation

zcc +hector program.c -create-app

A .k7 file is created suitable for loading into a Hector1 emulator.

zcc +hector -clib=hectorhr program.c -create-app

A .k7 file is created suitable for loading into an emulator.

Hector 1 notes

The Hector 1 is extremely resource constrained with the default memory map providing only around 4k of program space.

The screen is located at 0x4000 and takes up 1k of memory. The firmware appears to force loading of a bootstrap to 0x4c00, setting sp to 0x5fc0 with the main program loaded to 0x5000.

Further experimentation with -pragma-define:CRT_ORG_CODE=nnn may yield more space.

Because of the low resolution, the generic console within the Hector1 library utilises 4x8 fonts. No default font is configured, use. for example -pragma-redirect:CRT_FONT_64=_font_4x8_default to specify one.

Hector HR notes

Compared to the Hector1, the HR provides a more comfortable programming environment. The firmware appears to force loading of a bootstrap to 0x4c00, setting sp to 0xc000 with the main program loaded to 0x6000. This provides around 24kb of available memory.

The VRAM is located at 0xc000.

Hector HRX notes

The updated ROM on the HRX is not supported. --generic-console must be used to print to the screen and --hardware-keyboard must be used to read from the keyboard.

Library notes

Joysticks

Two hardware joysticks are supported, the fire button for Joystick 1 is SPACE, and for Joystick 2 is TAB. Emulated keyboard joysticks are also available.

Palette

The Hector variants support a modifiable palette - each of the 4 pens can be set to one of 8 colours. By default z88dk sets the palette to "black, blue, red, white" which provides a good-enough mapping of the ANSI colours defined in <conio.h>. A function has been provided in <arch/hector.h> to allow the palette to be redefined. Should you do this, it's recommended that the ANSI palette normalisation code is removed. This can be disabled using the pragma -pragma-define:CLIB_CONIO_NATIVE_COLOUR=1

Screen dimensions

The screensize of both models is unusual with the result that the hires graphics area is not the same as the generic console area. This has a further knock-on effect that detecting the screen resolution for the c_plot() family must be calculated as follows:

int maxx;
int maxy;

if ( (maxy % 4) == 0 ) maxy = maxy/4; else maxy - (maxy/4)-1;
if ( (maxx % 4) == 0 ) maxx = maxx/4; else maxx - (maxx/4)-1;

Issues

  • The target is untested against other models in the range

Links

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