Repository navigation
uBonPC 0.9 beta
Pre-releaseuBonPC 0.9 beta: a raster-exact Microbee emulator for Windows, Linux and macOS, with the Microbee Megademo
uBonPC is a Microbee emulator built around the Microbee Premium Plus (1 MB RAM, 32K colour PCG). It was made to run the Microbee Megademo, the demo that other Microbee emulators could not show properly, and to be a tool for writing new Premium Plus software. The Megademo is included: add the ROMs (below), then double-click Run Megademo.bat.
ROMs are not included. Download MAME's Microbee ROM set and extract it into the roms folder, keeping its one folder per machine (the Premium Plus boots roms\mbeepp\pp.bin). See roms\roms.txt.
Linux and macOS
uBonPC-SDL.exe is the same emulator on SDL2, running under .NET 8 (or Mono). Install the runtime and SDL2 (Ubuntu: sudo apt install dotnet-runtime-8.0 libsdl2-2.0-0 zenity; Fedora: sudo dnf install dotnet-runtime-8.0 SDL2 zenity; macOS: brew install dotnet sdl2), then run ./run-megademo.sh or ./ubonpc.sh (chmod +x *.sh first if needed). It has the same picture, visualiser, bezel, sound, keyboard, joystick and mouse support; menu options are Alt keys (Shift+F12 lists them). It is built and tested on Ubuntu by GitHub Actions on every change, but hasn't yet been tried on a Linux desktop or a Mac by a person.
Raster accuracy
- The 6545 CRTC is run character by character, two T-states at a time, in step with the Z80. Every character cell is drawn the moment the beam reaches it, so a register written mid-line, mid-row or mid-frame takes effect exactly where it would on the real screen.
- Row 0 re-reads the start address (R12/R13) on every scanline, R6 is compared on every line, and R4, R5 and R9 use the 6545's equality compares. Stacks of one-row CRTC frames build one picture, framed by VSYNC as a monitor frames it.
- The Premium Plus's video RAM wait states are modelled: the Z80 is held when it touches screen, attribute, colour or PCG RAM while a line is being drawn.
- The picture is positioned by HSYNC, as a real monitor does it. The Megademo sits centred, and has been compared against photos of a real Premium Plus and microbee MONITOR.
- Colour (Premium RGBI) and monochrome (green, amber or white, with half intensity) are emulated, side by side if you like. In full screen a microbee MONITOR bezel can be drawn round the picture.
System visualisers (F10, Shift+F10 for a second page)
- CPU: Z80 registers, the code being run, hot spots (CPU time per routine), opcode use, and a per-field frame budget split into busy, interrupt, video-wait and idle time.
- The 6545: all registers, the beam position, a whole-field map of what the CPU did at every T-state, and a line-by-line view of every scanline with the CRTC's row, scanline counter, start address and frame boundaries.
- Write log: every write that changes the picture (CRTC registers, colour, PCG bank, memory map), with the line and T-state the beam was at.
- Memory: the 64K the CPU sees, the whole 1 MB of banked RAM, screen cells, all 16 PCG banks, and video RAM waits per line.
- Devices: the Z80 PIO's pins as a logic analyser, the speaker waveform and spectrum, the light-pen keyboard scan, the floppy controller and all four drives, the real-time clock, and a colour-versus-mono check of the colours on screen.
Also
- Four floppy drives (A–D) for DS80, DS40, SS80 and DSK images, with optional real 300 rpm timing and floppy drive sounds.
- Run a CP/M .COM directly (F7): uBonPC builds a boot disk for it.
- A Microsoft serial mouse (as used by Empires), joysticks, symbol files and screenshots.
ubemu.exe: the same emulator without a window, driven by scripts, for automated testing.
Beta: what has and hasn't been tested
This is a beta. It has been developed and checked against one real machine, a Microbee Premium Plus. Its timing comes from that machine, the Megademo's own development model, ubee512 and MAME.
- Premium Plus: the Megademo runs every part in colour and mono, and 31 Premium Plus games run in an automated sweep.
- Other models are emulated from documentation and other emulators, and have had little testing against real hardware. The 256TC boots to its menu and passes its key test. The Premium PC85, PC85 and 32K IC boot to their menus or BASIC. The smaller Premium and standard disk models share the Premium Plus code. The 56K doesn't run yet.
- Not emulated: cassette, serial port and parallel printer.
- Calibrated rather than measured: the 40-column dot clock, wait timing within a character, the mono brightness levels and the monitor's horizontal position.
Reports of anything that looks or behaves differently from your real Microbee are very welcome.
Requires Windows with the .NET Framework 4 (included with Windows 10 and 11).