Emulator · github.com/JetSetIlly/Gopher2600
Gopher2600
A 2600 emulator written in Go, with a cycle-accurate ARM. It has loaded ELF games since 2022 and is usually the first to get new functions. If the ELF carries DWARF information, you can debug the ARM code against the C source.
Stephen Illingworth (JetSetIlly)
Complete 46With differences 3Empty 0Missing 2
Specifications
| Since | June 2022 |
|---|---|
| Source | hardware/memory/cartridge/elf/strongarm_vcslib.go |
| Licence | GPL-3 |
| Debugging | C source debugging and ARM cycle profiling |
Versions
2022202320242025202620272022-20232025-04v0.51.0v0.53.0master
| Version | Date | Changes to vcsLib |
|---|---|---|
| 2022-2023 | 2022-06-25 | First support for UnoCart and PlusCart ELF files. The stack functions, vcsSax3 and randint arrived in November 2022, and ColorLookup in September 2023. |
| 2025-04 | 2025-04-08 | vcsJmpToRam3, vcsPokeRomByte, vcsSetNextAddress and vcsWrite6. |
| v0.51.0 | 2025-11-08 | vcsWrite4. |
| v0.53.0 | 2025-12-04 | vcsPha3, vcsRead6, non-volatile saving and vcsNop3. |
| master | 2026-11-25 | vcsJmpToRam3 no longer moves the address the cartridge expects to the RAM address. Since 28 November 2026 a long overblank doesn’t count towards the cycle check either. |
Errata
- vcsSta4, vcsStx4 and vcsSty4 only use the low byte and serve 00 as the high byte, so they only work on zero page.
- vcsNop3 only serves the 04 opcode, so the operand is whatever byte gets served next. What that does still needs checking.
- Nothing guards against vcsNop2n(0), and vcsWaitForAddress has no guard either.
- Bus snooping doesn’t wait for the peripheral to answer, which the real firmware does.
- Until 25 November 2026, vcsJmpToRam3 expected the 6507 to come back at the RAM address instead of the cartridge’s.
- There’s no vcsInjectDmaData or vcsSnoopRead. Those two are in Test7800.
On the differences page
- vcsJmpToRam3 on the Chameleon Cart expects the return one byte earlier: JMP + 3 since 25 November 2026, and the RAM address before that.
- Some implementations of vcsSta4 only use the low byte: Low byte, with 00 as the high byte.
- vcsRead4 doesn’t take the same number of cycles everywhere: 4 cycles.
- You can’t test bus stuffing in Stella: It picks the opcode like the firmware, and the whole byte gets written.
- Where the game code runs: No restrictions, but it warns about branch distances.
Compatibility by version
● complete ◐ works with differences ○ exists but does nothing – missing ? no data
| Function | 2022-2023 | 2025-04 | v0.51.0 | v0.53.0 | master | Notes |
|---|---|---|---|---|---|---|
| Startup | ||||||
| elf_main | ● | ● | ● | ● | ● | |
| Flow control | ||||||
| vcsJmp3 | ● | ● | ● | ● | ● | |
| vcsNop2 | ● | ● | ● | ● | ● | |
| vcsNop2n | ● | ● | ● | ● | ● | It doesn’t check for count = 0. |
| vcsNop3 | – | – | – | ● | ● | It only serves the opcode, so the operand is whatever byte gets served next (still to be confirmed). |
| vcsSleep | ● | ● | ● | ● | ● | |
| vcsJsr6 | ● | ● | ● | ● | ● | |
| vcsTxs2 | ● | ● | ● | ● | ● | |
| Loads and stores | ||||||
| vcsLda2 | ● | ● | ● | ● | ● | |
| vcsLdx2 | ● | ● | ● | ● | ● | |
| vcsLdy2 | ● | ● | ● | ● | ● | |
| vcsSta3 | ● | ● | ● | ● | ● | |
| vcsStx3 | ● | ● | ● | ● | ● | |
| vcsSty3 | ● | ● | ● | ● | ● | |
| vcsSax3 | ● | ● | ● | ● | ● | |
| vcsSta4 | ◐ | ◐ | ◐ | ◐ | ◐ | It only uses the low byte and serves 00 as the high byte, so it only works on zero page. |
| vcsStx4 | ◐ | ◐ | ◐ | ◐ | ◐ | It only uses the low byte and serves 00 as the high byte, so it only works on zero page. |
| vcsSty4 | ◐ | ◐ | ◐ | ◐ | ◐ | It only uses the low byte and serves 00 as the high byte, so it only works on zero page. |
| vcsWrite5 | ● | ● | ● | ● | ● | |
| vcsWrite6 | – | ● | ● | ● | ● | |
| Reads | ||||||
| vcsRead4 | ● | ● | ● | ● | ● | |
| vcsRead6 | – | – | – | ● | ● | |
| Bus stuffing | ||||||
| vcsLdaForBusStuff2 | ● | ● | ● | ● | ● | |
| vcsLdxForBusStuff2 | ● | ● | ● | ● | ● | |
| vcsLdyForBusStuff2 | ● | ● | ● | ● | ● | |
| vcsWrite3 | ● | ● | ● | ● | ● | |
| vcsWrite4 | – | – | ● | ● | ● | |
| Stack | ||||||
| vcsPha3 | – | – | – | ● | ● | |
| vcsPhp3 | ● | ● | ● | ● | ● | |
| vcsPla4 | ● | ● | ● | ● | ● | |
| vcsPlp4 | ● | ● | ● | ● | ● | |
| vcsPla4Ex | ● | ● | ● | ● | ● | |
| vcsPlp4Ex | ● | ● | ● | ● | ● | |
| Overblank | ||||||
| vcsCopyOverblankToRiotRam | ● | ● | ● | ● | ● | |
| vcsStartOverblank | ● | ● | ● | ● | ● | |
| vcsEndOverblank | ● | ● | ● | ● | ● | Since 28 November 2026 a long overblank no longer counts towards the cycle check. |
| 7800 bus | ||||||
| vcsJmpToRam3 | – | ◐ | ◐ | ◐ | ● | Until 25 November 2026 it expected the return at the RAM address (fixed in 0082998a3). |
| vcsWaitForAddress | ● | ● | ● | ● | ● | |
| vcsSnoopRead | – | – | – | – | – | |
| vcsInjectDmaData | – | – | – | – | – | It’s missing. |
| Cartridge ROM | ||||||
| vcsPokeRomByte | – | ● | ● | ● | ● | |
| vcsSetNextAddress | – | ● | ● | ● | ● | |
| Saving | ||||||
| vcsInitNvStore | – | – | – | ● | ● | |
| vcsWriteNvChunk | – | – | – | ● | ● | |
| vcsProcessNvStoreEvents | – | – | – | ● | ● | |
| vcsIsNvBusy | – | – | – | ● | ● | |
| Utilities | ||||||
| randint | ● | ● | ● | ● | ● | |
| ReverseByte | ● | ● | ● | ● | ● | |
| ColorLookup | ● | ● | ● | ● | ● | |
| memset | ● | ● | ● | ● | ● | Also __aeabi_memcpy and the other __aeabi_mem* functions. |
| memcpy | ● | ● | ● | ● | ● | Also __aeabi_memcpy and the other __aeabi_mem* functions. |