Game loops, state machines, interrupts
Simple frame-synchronised game loop using the raster register. Foundation for all C64 games.
Frame-synchronised game loop using the HALT instruction. Locks to 50Hz for consistent timing across all Spectrums.
Organise game flow with distinct states (title, playing, game over). Clean separation of game phases.
Frame-synchronised game loop using the NMI interrupt for VBlank timing and OAM DMA transfer.
Standard NES initialisation: disable interrupts, wait for PPU, clear RAM. Required boilerplate for every NES program.
Disable AmigaOS interrupts and DMA to take full control of the hardware. Required for bare-metal game programming.
Frame-synchronised game loop that waits for vertical blank using the VPOSR register. 50Hz timing on PAL systems.
Linear Feedback Shift Register for fast, deterministic pseudo-random numbers.