Run the BIT90 BASIC/GAME system or Colecovision games on a Z80/Z180 retrocomputer.
In GAME mode the system works with many Coleco cartridge game ROMs up to 24KB.
It is not a perfect solution that will run all games on any hardware. The main purpose is to be able to use BIT90 BASIC and optionally run a selection of games on retrocomputer hardware with add-on video and sound cards that are Colecovision compatible.
The Z180 Colecovision loader is built for a specific hardware configuration.
BIT90 system loader for:
MSX computers
RomWBW CP/M system
Colecovision loader for:
Z180 system
Tested configurations
This software has been tested and confirmed working (with minor caveats) on:
- MSX1 and MSX2 computers
- SC720 Z80 with TN9K TMS9918 FPGA, Coleco gamecontroller and sound card
- SC203 Z180 with TN9K V9958/32K FPGA
Tested games
Following games are tested and playable on above systems: donkey kong, donkey kong jr, gorf, lady bug, cosmic avenger, frogger, time pilot, burgertime.
BIOS and hardware
The BIT90 GAME system ROM is structurally different from the Coleco OS7/BIOS ROM to avoid legal issues. Consequently some (third-party) games that rely on specific OS7 behaviors will not function. Game ROMs or BASIC programs that directly acces physical hardware instead of utilizing the system's ROM BIOS routines may also not work as expected.
BIT90 system documentation, programs and utilities can be found in my bit90 repository.
BASIC binary files that can be used with the loader are in the bit90/binary folder.
The loader embeds both the 16KB BASIC and 8KB GAME system ROM. It also includes a custom patch module containing replacement system subroutines.
When HBIT90 is executed, it:
- Optionally loads the specified file
- Copies the system code and patch module to the execution location in RAM.
- Patches hardware routines and variables, using the configuration reported by HBIOS.
- Loads the custom interrupt handler.
- Performs a system reboot into the modified environment.
The BIT90 and Coleco architectures feature elements incompatible with MSX and RomWBW systems. Most notably, the VDP generated interrupt routing directly to the Z80's Non-Maskable Interrupt (NMI), divergent I/O ports, unique keyboard matrices and distinct RAM/ROM mapping.
To bridge these gaps, the system software includes the following modifications (see source code comments for full details).
Baseline
Built using custom version 3.2 of the system software.
Interrupts
A custom interrupt handler is installed that hooks RomWBW's / MSX KEYINT handler first, then calls the BIT90 handler if enabled. On Z80 systems (interrupt mode 1) the VDP generated interrupt is enabled, on Z180 systems (interrupt mode 2), the VDP generated interrupt is disabled. The BIT90 NMI is simulated, using the HBIOS timer / MSX VDP interrupt.
VDP routines
BASIC/GAME patched routines to manage VDP registers and VRAM read/writes. These disable/enable interrupts and introduce software delays to ensure compatibility with faster Z80/Z180 clocks.
PSG routines
If an AY-3-8910 sound card is used then the SN76489A sound is converted, the noise emulation is limited.
Controller Input
Use the keyboard or MSX joystick as a controller.
Boot process
Utilize a custom init sequence that skips hardware RAM test and expansion ROM search, and optionally initializes the loaded file.
Tape load/save
BASIC commands for loading and saving to cassette tape are disabled.
Keyboard Input
Map the (serial) console input from RomWBW / MSX CHGET routine to the keyboard/controller buffer.
Memory map
| Memory area | BIT90 system | HBIT90 CP/M |
|---|---|---|
| 0000-1fff | BASIC1/GAME ROM | BASIC1 ROM (1) |
| 2000-3fff | BASIC2 ROM | BASIC2 ROM |
| 4000-5fff | Unused | GAME ROM (1) |
| 6000-67ff | Mirrored system RAM | Patch module |
| 6800-6fff | Mirrored system RAM | Swap buffer |
| 7000-74ff | System RAM | System RAM |
| 7500-7fff | Mirrored system RAM | Unused |
| 8000-fdaf | BASIC RAM / Cart ROM | BASIC/GAME binary |
| fdb0-fdff | BASIC RAM / Cart ROM | BIT90/HBIOS (2) |
| fe00-ffff | BASIC RAM / Cart ROM | RomWBW HBIOS (2) |
(1) Bank switching between the BASIC and GAME ROMs is simulated by swapping the execution code blocks in the 0000-1fff and 4000-5fff segments.
(2) On MSX the memory area f380-ffff is reserved for the MSX BIOS workarea.
Please create an issue if you want to report a bug or have any requests or suggestions. Pull requests from forks are currently not supported.
This is a low priority experimental project and it may take a while before requests are reviewed and/or implemented.
The Creative Commons license terms apply to all material, with the exception of code that is based on existing work by others. The origins of these parts are mentioned in the source code. It is believed that these works are being used in accordance with the intentions and/or licensing of their creators.
The material is shared here for educational and non commercial purposes only. It is provided freely and "as it is" in the hope that it will be useful, but without any warranty of any kind, either expressed or implied. Use at own risk!