Search › A-Z › E › Enterprise 128
Enterprise 128
The Enterprise 128 (badged simply "Enterprise", made by Intelligent Software / Elan and launched in 1985) was a Z80 home computer with two custom chips: Nick, a flexible per-scanline display processor, and Dave, sound plus system timing. This build runs it in the browser with JSep, Gábor Lénárt's pure-JavaScript Enterprise emulator, whose Z80 core comes from JSSpeccy. It self-hosts the EXOS 2.1 and IS-BASIC 2.1 system ROMs and boots straight to the IS-BASIC prompt. The Z80, the paged 64K memory and the machine state are plain JavaScript, so the whole machine can be stepped and inspected live.
Runs on: Web browser
Enterprise 128 Online Emulator
Play Enterprise 128 using JavaScript directly in your browser.
Controls
Configurations
| Configuration | Emulator | Machine | OS | Legal | |
|---|---|---|---|---|---|
| Enterprise 128 IS-BASIC | Enterprise 128 | Enterprise 128 | grey | Open ⛶ |
Machines emulated
Chips
Notes
Embedding
The Enterprise 128 is emulated by JSep, a pure-JavaScript emulator by Gábor Lénárt (LGB). Its Z80 core is JSSpeccy's; everything Enterprise-specific - the Nick display chip, the Dave sound/timer chip, the four-register 16 KB memory paging and the I/O map - is original JavaScript. The engine was written to drive itself from an HTML page, so the only integration work is to take over its loop and feed it ROMs locally.
Boot. The engine keeps the whole machine in plain globals, so booting is: install the system ROMs into the guest memory map, initialise the Z80 tables, then call the engine's own enterpriseInitEmulation() - after which we run our own frame loop instead of its setTimeout one:
// self-host the ROMs (no CDN): a synchronous, side-effect-free binary read
window.installRom = function (name, segment) {
var xhr = new XMLHttpRequest();
xhr.open("GET", romBase + name, false);
xhr.overrideMimeType("text/plain; charset=x-user-defined");
xhr.send(null);
var s = xhr.responseText, off = segment << 14;
for (var i = 0; i < s.length; i++) memory[i + off] = s.charCodeAt(i) & 0xff;
};
z80_init();
enterpriseInitEmulation(); // ROMs in, Nick/Dave reset, palette built
The machine is plain objects. Everything the debugger needs is a live global. There is no wasm heap to reach into:
| Member | Kind | What it does |
|---|---|---|
z80_do_opcodes() | fn | Runs Z80 opcodes while tstates < event_next_event. Setting event_next_event = tstates + 1 makes it execute exactly one instruction, the single-step primitive. |
emulatorIteration() | fn | Runs one whole PAL video frame (Nick + Dave + interrupts), painting the canvas at VSYNC. Our frame-step primitive. |
z80 | object | The CPU: 8-bit halves a f b c d e h l (plus shadows), ixh/ixl, iyh/iyl, pc, sp, i, r, im. |
readbyte_internal(a) | fn | Side-effect-free read of the 64 KB the Z80 sees, through Nick's page registers (memory[pageBases[a>>14] | (a&0x3FFF)]). |
writebyte_internal(a, v) | fn | The guest memory-write path; we wrap it once to implement watchpoints. |
keyStates[10] | array | The hardware key matrix (one byte per row, active-low). The on-screen keyboard clears/sets bits here directly. |
Debugger integration
The plug-in (ep128-debug.js) describes the machine to the shared debugger and nothing more:
- Registers are assembled live each refresh from the Z80's byte halves - PC, SP, AF, BC, DE, HL, IX, IY, the shadow set, I, R, IM and the S Z H P/V N C flags - and written back into the same fields.
- Disassembly uses the shared
z80decoder. - Memory is the 64 KB the CPU currently sees, read side-effect-free through Nick's paging, so you watch exactly what the Z80 does - EXOS in segment 0, IS-BASIC paged in, RAM above.
- Single step runs one Z80 instruction (
event_next_event = tstates + 1); frame step runs one video frame. Breakpoints are a PC set checked once per instruction inside a breakpoint-aware frame (Nick and Dave stay live so the machine keeps making progress); watchpoints are a host-side check wrapped around the single guest memory-write path. When no breakpoints or watchpoints are set the loop runs a whole frame at full speed with no per-instruction overhead.
Architecture
The Enterprise 64/128 (badged "Enterprise", by Intelligent Software / Elan, 1985) is a Z80 home computer built around two custom Hungarian-designed gate arrays and a paged memory map:
- Z80A @ 4 MHz - the CPU. It sees 64 KB at a time as four 16 KB pages; each page register (ports
0xB0–0xB3) selects one of up to 256 16 KB segments of the 4 MB address space, mixing ROM and RAM freely. - Nick - the display chip. It reads a Line Parameter Table from RAM and can change resolution, colour mode (2/4/16/256) and palette per scanline, giving the Enterprise its flexible, colourful screen.
- Dave - sound and system timing: three tone channels plus noise, the 1 Hz/50 Hz/1 kHz interrupt sources that drive EXOS, and part of the memory decoding.
- EXOS - the Enterprise Operating System in ROM: a device/channel-based OS. With the IS-BASIC ROM paged in, a cold machine boots straight into IS-BASIC, an unusually complete structured BASIC.
This build boots EXOS 2.1 with IS-BASIC 2.1 in a 128 KB machine, landing at the IS-BASIC prompt with no disk.