How sergetsyba/rayracer works
Ray Racer is a macOS Atari 2600 emulator with a debugger; the README notes that emulation is partial. The main workflow is to open a cartridge, hand it to the console for emulation, and display generated fields in the screen window. Users can also inspect disassembly and system state, set breakpoints, and step execution. The graph preserves the documented emulator domains, but their internal call wiring is not established by the sampled C sources, so those links are omitted.
Main entry points: MainMenuController.swift Main menu · ScreenWindowController.swift Screen window · Atari2600.swift Console wrapper · DebuggerWindowController.swift Debugger window
Components 24
macOS App
- Main menu
RayRacer/MainMenuController.swift - Screen window
RayRacer/Screen/ScreenWindowController.swift - Metal renderer
RayRacer/Screen/Renderer.swift - Field buffer
RayRacer/Screen/ScreenWindowController.swift
Cartridge Handling
- Cartridge
RayRacer/RayRacerKit/Cartridge.swift - Cartridge kind
RayRacer/RayRacerKit/CartridgeKind.swift - Cartridge collection
RayRacer/RayRacerKit/Atari2600.swift - Recent cartridges
RayRacer/RayRacerKit/Cartridge.swift
Emulation Core
- Console wrapper
RayRacer/RayRacerKit/Atari2600.swift - Console core
librayracer/atari2600.c - 6507 CPU
librayracer/mcs6507.c - 6532 RIOT
librayracer/mcs6532.c - TIA video
librayracer/tia.c - Graphics
librayracer/graphics.c - Cartridge mapping
librayracer/cartridge.c - Joystick input
librayracer/controller.c - Emulation thread
librayracer/thread.c
Debugger
- Debugger window
RayRacer/Debugger/DebuggerWindowController.swift - Assembly view
RayRacer/Debugger/AssemblyViewController.swift - Disassembler
RayRacer/Debugger/AssemblyViewController+Disassembly.swift - System state view
RayRacer/Debugger/SystemStateViewController.swift - Step controls
RayRacer/Debugger/MultiStepperViewController.swift
Other components
- User
- Cartridge file
Connections 21
- User → Main menu: selects
- User → Cartridge file: chooses
- Main menu → Cartridge: opens
- Cartridge → Cartridge file: reads
- Cartridge → Cartridge kind: classifies
- Main menu → Cartridge collection: plays cartridge
- Cartridge collection → Console wrapper: selects game
- Main menu → Recent cartridges: clears recents
- Recent cartridges → Main menu: supplies recents
- Main menu → Console wrapper: sets switches
- Main menu → Console wrapper: resets
- Screen window → Emulation thread: creates thread
- Screen window → Console wrapper: passes console
- Emulation thread → Field buffer: writes fields
- Screen window → Emulation thread: pauses and resumes
- Screen window → Metal renderer: configures view
- Metal renderer → Field buffer: renders fields
- Debugger window → Assembly view: hosts
- Debugger window → System state view: hosts
- Debugger window → Step controls: dispatches stepping
- Assembly view → Disassembler: decodes instructions