SearchA-ZJ › Jape (Psion Organiser II)

Jape (Psion Organiser II)

2016 Freeware Online

Jape (Javascript Psion Emulator) by Jaap Scherphuis runs a Psion Organiser II entirely in the web browser, having been rewritten from an earlier Java applet. It emulates the CM/XP two-line models and the LZ/LZ64 four-line models, supports state snapshots and can load .opk memory-pack images.

Visit the official site ↗

Runs on: Web browser

Jape (Psion Organiser II) Online Emulator

Play Jape (Psion Organiser II) using JavaScript directly in your browser.

Configurations

ConfigurationEmulatorMachineOSLegal
Psion Organiser II (XP)Jape (Psion Organiser II)Psion Organiser IIgreyOpen ⛶

Machines emulated

Chips

Notes

Embedding

Jape is a set of plain-global JavaScript modules with no bundler. Vendor the whole src/** tree (the nine scripts, the system ROM under roms/, the device images under images/ and the flash-file driver other/fdrive19.bin) and load the scripts in dependency order. Build the machine with new Psion(canvasId), then choose a model and reset:

var psion = new Psion("screen");
psion.reset({                                // XP (32K), English Rom 3.6
  rom: J+"roms/36-la.rom", ram: 32, screen: 2,
  keyboard: KeyboardLayout.Normal,
  screenImage:   J+"images/disp_2xp.gif",
  keyboardImage: J+"images/keyb_norm.gif",
  coverImage:    J+"images/cover_org2.gif"
});

Booting. The Organiser starts switched off. It powers on the way the real machine does: hold the ON/CLEAR key and let an output-compare interrupt fire, and the semi-custom chip calls switchOn(), which resets the HD6303 to the ROM vector and boots to the menu. Our loop presses ON at startup and releases it once bus.isSwitchedOff() clears.

We own the loop. Instead of psion.startRunning() (an internal real-time loop we cannot step), we call the HD6303 ourselves. Asset paths are made absolute through a global window.JAPE_BASE so the ROM and image requests resolve from the emulator folder rather than the play page.

MemberKindWhat it does
cpu.execute(ticks)methodRun the HD6303 for a budget of clock ticks. execute(1) runs exactly one instruction, our single-step primitive.
cpu.dbgRegs()methodLive registers A, B, D, X, PC, SP, the P byte and the six condition flags.
cpu.dbgSetReg(name,v)methodWrite a register back from the debugger.
memory.read(a)methodSide-effect-free bus read: RAM below $8000, banked ROM above. Feeds the hex and disassembly views.
bus.write(a,v)methodThe CPU write path; we wrap it to implement write watchpoints.
psion.paint()methodRedraw the device shell and the live LCD onto the canvas after each frame or step.

The registers, memory and single-step are the only hooks the debugger needs, and they are added as a small dbg* shim on the vendored HD6303 and Psion objects.

Debugger integration

The machine plug-in jape-psion-debug.js reads window.EMU_BOOT and calls EmuKit.defineMachine with the transport, the HD6303 register set and one 64 KB address-space view disassembled by the hd6301 decoder.

A new CPU decoder. The HD6301/6303 is a Motorola 6800-family part, so none of the existing decoders fit. /debugger/src/cpus/hd6301.js adds a flat opcode table for the 6801 set plus the 6303 extras: the read-modify-write immediates AIM, OIM, EIM and TIM, plus XGDX and SLP. It handles the inherent, immediate (8 and 16 bit, big-endian), direct, extended, indexed and relative modes, and prints unknown bytes as .byte.

EmuKit.registerDecoder('hd6301', function(read, addr){
  var op = read(addr) & 0xff, e = M[op];
  if (!e) return { length: 1, mnem: '.byte', text: '.byte 

  

© 2026 emulators.org

Made by Lewpen

+hex(op,2) }; // … split "MNEM mode", read 1–2 operand bytes, format … });

Breakpoints and watchpoints. When breakpoints are set the loop steps one instruction at a time and compares PC against the set; otherwise it runs a whole frame at once. Watchpoints wrap bus.write and pause the moment a watched address is written.

Architecture

Jape models the Psion Organiser II as a set of cooperating plain objects, which is what makes it a clean debugging target:

  • HD6303 - the Hitachi 6303 CPU (a 6800-family core with the 6301/6303 additions). execute() is a fetch/decode/execute switch over all 256 opcodes.
  • Bus - the semi-custom gate array: it decodes the processor ports, the display registers, the datapack control lines, the keyboard/clock counter and the on/off and interrupt logic.
  • Memory - processor RAM, banked main RAM and the banked system ROM.
  • Display - the two or four line HD44780-style LCD, drawn straight onto the canvas from its own character generator.
  • Keyboard - the 6-by-6 membrane matrix, scanned through port 5 and the counter, including the ON key.
  • Pack - datapack and Flashpak images (EPROM, RAM and flash), not loaded in the default boot.

The system ROM is a Psion copyright work, redistributed here under an unclear licence and treated as grey. It is self-hosted, its source is cited in README.txt, and takedown requests will be honoured.