EN

Emulator · github.com/stella-emu/stella

Stella

The reference 2600 emulator. Since version 7.0 it loads ELF games with a loader and a vcsLib of its own, both written in C++, which imitate what the cartridge firmware does.

Christian Speckner (DirtyHairy) and the Stella team

Complete 33With differences 4Empty 0Missing 14

Specifications

Since7.0 (October 2024)
Sourcesrc/emucore/elf/ (VcsLib.cxx, ElfEnvironment.cxx, CartELF.cxx)
LicenceGPL-2
DebuggingThe -elf.dump option shows how the ROM was linked

Versions

2022202320242025202620277.0master
VersionDateChanges to vcsLib
7.02024-10-05The first ELF loader (the “ELF mapper”, written for Mattress Monkeys). Nearly all of vcsLib has been there since August 2024, bus stuffing and bus snooping included.
master2025-11-07vcsWrite4 (PR #1104), and since 2026 save states keep the last byte read from the bus. Neither change is in a release yet.

Errata

  1. vcsLdxForBusStuff2 and vcsLdyForBusStuff2 serve LDA (A9) instead of LDX (A2) and LDY (A0), and all three masks are 0 (VcsLib.cxx:163, 264, 268).
  2. vcsWrite3 always serves STA and writes the whole byte without simulating the fight over the bus, so a bus-stuffing kernel can look fine in Stella and wrong on a console.
  3. vcsPla4Ex, vcsPlp4Ex, vcsWaitForAddress and injectDmaData stop emulation with “unimplemented”.
  4. The DMA function is called injectDmaData, without the vcs prefix, and there’s no vcsSnoopRead.
  5. The transaction queue holds 10 entries. If the game gets further ahead than that, the ARM stalls until the 6507 catches up.
  6. If a symbol is missing the ROM doesn’t load (“symbol not found”).

On the differences page

Compatibility by version

● complete ◐ works with differences ○ exists but does nothing – missing ? no data

Function7.0masterNotes
Startup
elf_main●●It only looks for elf_main.
Flow control
vcsJmp3●●
vcsNop2●●
vcsNop2n●●It does nothing when count is 0.
vcsNop3––
vcsSleep●●
vcsJsr6●●
vcsTxs2●●
Loads and stores
vcsLda2●●
vcsLdx2●●
vcsLdy2●●
vcsSta3●●
vcsStx3●●
vcsSty3●●
vcsSax3●●
vcsSta4●●
vcsStx4●●
vcsSty4●●
vcsWrite5●●
vcsWrite6●●
Reads
vcsRead4●●
vcsRead6––
Bus stuffing
vcsLdaForBusStuff2◐◐It loads #$00.
vcsLdxForBusStuff2◐◐It serves LDA (A9) instead of LDX, and loads #$00.
vcsLdyForBusStuff2◐◐It serves LDA (A9) instead of LDY, and loads #$00.
vcsWrite3◐◐It always serves STA and writes the whole byte, so the fight over the bus isn’t simulated.
vcsWrite4––Only on the main branch since 7 November 2025, and not in any release yet.
Stack
vcsPha3●●It’s exported, even though the Chameleon header doesn’t declare it.
vcsPhp3●●
vcsPla4●●
vcsPlp4●●
vcsPla4Ex––It stops emulation with “unimplemented”.
vcsPlp4Ex––It stops emulation with “unimplemented”.
Overblank
vcsCopyOverblankToRiotRam●●
vcsStartOverblank●●
vcsEndOverblank●●
7800 bus
vcsJmpToRam3●●
vcsWaitForAddress––It stops emulation with “unimplemented”.
vcsSnoopRead––
vcsInjectDmaData––It’s called injectDmaData and it stops emulation.
Cartridge ROM
vcsPokeRomByte––
vcsSetNextAddress––
Saving
vcsInitNvStore––
vcsWriteNvChunk––
vcsProcessNvStoreEvents––
vcsIsNvBusy––
Utilities
randint●●
ReverseByte●●
ColorLookup●●
memset●●
memcpy●●