Search › A-Z › E › Elevator Action
Elevator Action
Elevator Action (Taito, 1983) is the arcade action-platformer in which spy Agent 17 parachutes onto the roof of a 30-storey building, rides its elevators and escalators down through the floors, shoots enemy agents, and collects secret documents from the red doors before escaping in a getaway car at the basement. This build is a from-scratch emulation of the Taito "SJ" arcade board in the browser: a Zilog Z80 main CPU at 4 MHz that runs the game, three independent scrolling character playfields drawn from RAM-resident tiles, a 16×16 sprite list with sprite/sprite and sprite/layer collision hardware, a 256×4 layer-priority PROM and a 64-colour RAM palette. It boots straight into attract mode and is wired to the emulators.org in-frame debugger, so you can single-step the main Z80, read and write its registers and the 64K memory, and set execution breakpoints and write watchpoints. The Zilog Z80 core is reused from the emulators.org 1942 build.
Runs on: Web browser
Elevator Action Online Emulator
Play Elevator Action using JavaScript directly in your browser.
Controls
Configurations
| Configuration | Emulator | Machine | OS | Legal | |
|---|---|---|---|---|---|
| Elevator Action | Elevator Action | Elevator Action | grey | Open ⛶ |
Machine emulated
The Elevator Action board (Taito, 1983) is a Taito "SJ" system design: a Zilog Z80 main CPU at 4 MHz running the game and a second Zilog Z80 sound CPU driving four AY-3-8910 PSGs and an R-2R DAC. The video hardware is three independent scrolling 32×32 playfields of 8×8 three-bit characters — each with a horizontal scroll and a per-column vertical scroll — plus up to 32 four-bit 16×16 sprites with per-sprite and global flip. The tile pixels live in a 12 KB character RAM the program streams from an 8 KB graphics ROM at run time; a 256×4 PROM orders the layers and sprites each field, and 64 nine-bit colours held in RAM are decoded through a 3-bit-per-gun resistor DAC. Dedicated hardware reports sprite/sprite and sprite/layer collisions. The board is upright (ROT0), scanned as a 256×224 raster.
Chips
Notes
Embedding
Elevator Action is Taito's 1983 arcade machine on the Taito "SJ" board: a Zilog Z80 main CPU at 4 MHz that runs the game, a second Zilog Z80 sound CPU driving four AY-3-8910 PSGs and an R-2R DAC, and a 68705 (M6805) security MCU. This build is a from-scratch JavaScript emulation whose board is a port of MAME's taito/taitosj.cpp and taitosj_v.cpp. The main Z80 core is Molly Howell's MIT Z80.js — the same core reused from the emulators.org 1942 build. The whole board runs from a host-owned loop, so the debugger can pause and single-step it.
Boot. Constructing the machine fetches the ROMs, wires up the layer-priority PROM, resets the main Z80 and starts the loop; the board comes up in attract mode:
var m = new ElevatorAction({ canvas, romBase, manifest });
m.boot(); // fetch ROMs, reset the Z80, run the loop
// each animation frame runs one 60Hz field of the main Z80, then draws the screen
The machine object. Everything the host and debugger need is a field or method on the machine:
| Member | Kind | What it does |
|---|---|---|
m.cpu | field | The main Z80 core. Registers are read with getReg(name) / written with setReg(name,v) for A F B C D E H L, the AF/BC/DE/HL pairs, IX IY SP PC, and I R. |
m.dbgRead(a) / m.dbgWrite(a,v) | method | Side-effect-free read of the main 64K bus and the CPU write path — what the debugger's memory views read and poke. The read never advances the gfx-ROM read pointer. |
m.setInput(id, down) | method | Drive a control (up, down, left, right, fire, jump, coin, start1, start2) into the input ports. |
EMU_BOOT.transport | field | The pause / resume / step / breakpoint / watchpoint surface the shared debugger drives. |
Video. The screen is three independent scrolling 32×32 playfields of 8×8 three-bit characters plus a list of up to 32 four-bit 16×16 sprites. Unusually, the tiles are not in ROM: the program copies graphics from an 8 KB gfx ROM (read one byte at a time through a pointer register) into a 12 KB character RAM, and the tilemaps index that RAM, so the pixel data is decoded live each frame. There is no palette ROM either — 64 colours are held in RAM and turned into RGB by a 3-bit-per-gun resistor DAC. Layer and sprite ordering is chosen every frame from a 256×4 priority PROM. The renderer draws the 256×224 raster upright (ROT0).
Debugger integration
Because the whole board is ordinary JavaScript and the host owns the run loop, the debugger's controls need no changes to the CPU core: the loop can pause, single-step and check breakpoints between any two instructions. window.EMU_BOOT.transport maps the shared debugger onto the main Z80:
- pause / resume / isPaused — stop or restart the
requestAnimationFrameloop. - stepInsn(n) — run exactly n Z80 instructions through the core's
run_instruction()entry. - step(n) — advance n whole 60 Hz fields of the main Z80, honouring the one vblank interrupt a field.
- breakpoints — a
Setof PC values checked before each instruction; a match pauses before the instruction runs. - watchpoints — the Z80's memory-write path flags a hit when a watched address is written, and the loop pauses on it.
The stock Z80.js keeps its registers in a closure and only exposes a whole-core getState()/setState(). To make the debugger's live register window cheap, the vendored core carries two extra hooks — get_pc() and set_pc() — so the loop can read PC before every instruction (for breakpoints) without allocating a state object, and the machine wraps getState/setState in focused getReg/setReg/getFlag/setFlag helpers the plug-in binds to. Memory reads use the machine's side-effect-free dbgRead: it returns work RAM, the three playfield RAMs, the sprite RAM, the character (tile-pixel) RAM, the fixed and banked program ROM and the input ports without side effects, and in particular it does not advance the graphics-ROM read pointer the way a real read of 0xd404 would, so inspecting memory never disturbs the game. The Z80 disassembler is the shared decoder at /debugger/src/cpus/z80.js — reused unchanged, since the Z80 is already a first-class debugger CPU.
Architecture
Elevator Action (Taito, 1983) runs on the Taito "SJ" system, an upright (ROT0) board built from two Z80s and Taito's RAM-based tile/sprite hardware:
- Main CPU — Zilog Z80 at 4 MHz (8 MHz / 2). Fixed program ROM at
0x0000–0x5fff, a banked 8 KB ROM window at0x6000–0x7fff, work RAM at0x8000, the 12 KB character (tile-pixel) RAM at0x9000–0xbfff, three 32×32 playfield RAMs at0xc400/0xc800/0xcc00, per-column vertical-scroll RAM at0xd000, sprite RAM at0xd100, the 64-colour palette RAM at0xd200, and the video / scroll / colour-bank / bank-select / gfx-pointer registers and the input ports through the0xd300–0xd600pages. This is the CPU the debugger targets. - Interrupts — the main Z80 takes a single maskable interrupt each field at vblank (mode 1, so
RST 38h). - Playfields — three independent 32×32 tilemaps of 8×8 three-bit characters, each with a horizontal scroll and a per-column vertical scroll, drawn from character RAM the program fills at run time out of the gfx ROM.
- Sprites — up to 32 four-bit 16×16 sprites from a two-page sprite RAM, with per-sprite X/Y flip and a global screen flip, drawn with horizontal wraparound.
- Priority & collision — a 256×4 PROM turns the priority register into a back-to-front order for the three layers and the sprites; dedicated hardware reports sprite/sprite and sprite/layer collisions into four collision registers the game polls.
- Palette — no colour ROM: 64 nine-bit colours live in RAM and are decoded through a 3-bit-per-gun resistor DAC.
- Sound & protection — a second Z80 with four AY-3-8910 PSGs and an R-2R DAC, and on factory boards a 68705 (M6805) security MCU. This build uses the protection-patched bootleg program, so the MCU is stubbed and audio is not synthesised; the main CPU never blocks on either.