All docs

Emulators & Simulator

The emulators built into the IDE: JSVecX for the 6809, ARM emulators for the RP2350 cartridge and the UVMC2 multicart, the WASM simulator for C projects, and the video recorder.

Vectrex Studio runs your game inside the IDE, whatever it is built for. No hardware is needed: build, and the result loads into the Emulator panel and starts by itself.

Which engine runs it depends on the target:

TargetEngineSpeedRun with
m6809JSVecX, a cycle-accurate 6809 Vectrex emulatorFull speedF5
rp2350The RP2350 emulator: the cartridge's ARM code, its BIOS and the consoleSlower, faithfulF5
uvm2The UVM2 emulator: the multicart's RP2350 down to the wire, plus the consoleReal time by defaultF5
C projectsThe WASM simulator: your C game compiled for the browserFastShift+F5

A badge in the top-right corner of the display always says which one is running: SIMULATING (WASM), EMULATING RP2350 (ARM) or EMULATING UVM2 (halt-mode bus).


Emulator panel

The panel shows:

  • Vector display: the Vectrex picture, rendered as beams
  • CPU registers (m6809): PC, A, B, X, Y, U, S, DP, CC flags, updated live
  • Performance metrics: cycles per frame, instruction count, frame count, FPS
  • Cycle utilization chart, with a danger zone when a frame goes over its budget

On rp2350 and uvm2 a second overlay gives three numbers: host fps (how fast your computer renders), console Hz (the refresh rate the frame's bus cycles would allow on a real console, which is the number that matters) and the frame's cycles.

Controls

ButtonAction
PlayStart or resume emulation
PausePause emulation
ResetReset to the startup state

Joystick and buttons come from your keyboard or gamepad (see Input).


JSVecX (m6809)

The classic target. JSVecX emulates the 6809, the VIA, the AY-3-8910 sound chip and the vector display, and runs the .bin ROM the compiler produces, single-bank or multibank. The PSG is clocked at 1,500,000 Hz, as on the console, so music and effects play at their real pitch.


The ARM emulators (rp2350 and uvm2)

ARM targets run in emulators of the RP2350 chip itself, so you test the same image you would put on the cartridge.

RP2350 debug cartridge

The RP2350 emulator runs the cartridge's ARM code with its BIOS (the same svc system calls the real firmware answers) and boots the pico-sdk start-up path the way the chip does. It includes:

  • Simulated SD card: the game list and previews come from ~/VectrexStudio/sd, laid out like the real card. Romsets go in ~/VectrexStudio/sd/roms.
  • Audio samples: .vsmp samples play through Web Audio, as they do on the cartridge.

UVM2 (Ultimate Vectrex Multicart 2)

The UVM2 emulator does not fake the hardware's API. It emulates the wire: the RP2350's GPIO, PIO and DMA, and the VIA latching each write on the bus. A game fails in the emulator the same way it would fail on a console.

FeatureWhat it means for you
Both coresThe game's core and the drawing core both run, as on the multicart
PIO + DMA streamThe frame's command list goes out through the emulated PIO in bus time, next to the CPU, one word per bus cycle
Block translatorThe game's Thumb-2 code is translated into JavaScript blocks, checked against the interpreter (over 330,000 comparisons with no differences). Where generating code is not allowed it falls back to the interpreter
Real time by defaultThe two cores may run a few dozen cycles apart, which keeps even a heavy 3D game at about 50 emulated frames a second
Cycle-exact modeThe cores interleave cycle by cycle instead. Slower, and the reference for comparing two runs bit for bit
Simulated SD cardWith folders, for C games too. Large files are read only when the game opens them
PSRAMGames linked in PSRAM run from the emulated PSRAM window, like games far larger than the SRAM do on the multicart
Faults you can seeRAM starts filled with garbage, an access outside the memory map is reported, and a HardFault is visible instead of a silent hang

The joystick and buttons feed the emulated analog path: the game reads them by driving the DAC against the comparator, exactly as on hardware. The PSG plays through Web Audio. Opening a .um2 file from disk is detected by its header and runs here too.


WASM simulator (C projects)

Shift+F5 builds a C project for the browser (WebAssembly) and runs it in the Emulator panel. It is the fast way to iterate: no ARM emulation, just your game logic and its drawing, with samples playing through Web Audio. When you need to see what the cartridge will really do, switch to the rp2350 or uvm2 target and press F5.

The WASM simulator has no debugger. The MCP tool ide_run uses it by default on the ARM targets because the faithful emulators are slower (see Terminal, Claude Code & MCP).


Recording

Two buttons in the panel's toolbar record what the emulator shows:

ButtonRecordsResult
Vector recordingEach frame's list of vector segmentsA .vrec file in assets/recordings/, playable with DRAW_RECORDING and used for game previews. Capped at 60 seconds
Video recordingWhat is on screen, together with every live audio source, including the UVMC2's audio jackAn .mp4 video (H.264 / AAC), ready to upload

The video recorder taps the display canvas and every running audio context in parallel, so the sound you hear is never interrupted, and nothing is created until you press record.


Debugger

Every target except pitrex and the WASM simulator can be debugged from the editor: breakpoints in the gutter (or F9), Step Over / Into / Out (F10, F11, Shift+F11), Continue, the call stack, and variable values on hover. The ARM emulators also accept arm-none-eabi-gdb on localhost port 3333. The Debug, Trace, Memory, BIOS Calls and PSG Log panels show what the program prints, executes, stores, calls and plays.

Breakpoints, stepping, gdb, and debugging a game on the real cartridge are covered in Debugging.


AI assistant

PyPilot, the built-in AI assistant, and Claude Code in the integrated terminal are described in Terminal, Claude Code & MCP.