ATARI 64 KB MEMORY ARCHITECTURE
Call of the Wintermon operates strictly within the official Atari XL/XE memory boundaries under the standard
OS ROM configuration (PORTB = $FF, Bit 0 = 1). The 40 KB User RAM space ($2000–$BFFF)
is tightly partitioned into deterministically placed display buffers, sprite memory, audio drivers, and SoA game tables.
> FULL 64 KB ATARI XL/XE ADDRESS SPACE ($0000 - $FFFF)
PORTB = $FF (Bit 0 = 1, OS ROM enabled below $D000 and above $D7FF).
> GAME USER RAM PARTITION ($2000 - $BFFF)
Total: 40,960 Bytes · Allocated: 40,473 B (98.81%) · Free Headroom: 487 B
> ZERO PAGE ARCHITECTURE ($00 - $FF, 256 BYTES)
Zero Page addressing saves 1 cycle and 1 byte per memory instruction on MOS 6502.
Reserved for Atari OS Kernel
Registers & temporary pointers (zp_temp, zp_ptr_src/dst)
Game states, title card fade counters, fire debouncing
POKEY Audio Player base pointers (PLAYER_ZP_BASE)
Scene renderer table pointers & parameters
DLI registers save, pas counters & PMG pattern ptr
Lives, HUD specials, Player 0 physics, platforms, secrets, killer mode
Unallocated Zero Page available for engine expansion
> HISTORICAL MEMORY CONSUMPTION TREND
Empirical measurements from release binaries across versions.
| RELEASE | BINARY SIZE | USER RAM USED | FREE HEADROOM | UTILIZATION |
|---|---|---|---|---|
| v0.1.0 | 40,554 B | 40,484 B | 476 B | 98.84% |
| v0.2.0 | 40,554 B | 40,484 B | 476 B | 98.84% |
| v0.2.1 | 40,543 B | 40,473 B (-11 B) | 487 B | 98.81% |
| v0.3.0 | 40,543 B | 40,473 B | 487 B | 98.81% |
> DETAILED USER RAM ALLOCATION DIRECTORY ($2000 - $BFFF)
Full contiguous, non-overlapping partition verified by check_memory.py.
| RANGE (HEX) | RANGE (DEC) | SIZE | CATEGORY | SEGMENT NAME | TECHNICAL DETAILS & FUNCTION |
|---|---|---|---|---|---|
| $2000 - $23D3 | 8192 - 9171 | 980 B | CODE | Engine & State Code | Main loop, Game state machine, Game Over logic |
| $23D4 - $23FF | 9172 - 9215 | 44 B | FREE | FREE RAM (44 B) | Free headroom in $2000 block before Intro Font ($2400) — vacated by title code |
| $2400 - $29DF | 9216 - 10719 | 1,504 B | GRAPHICS | Intro Font & VRAM | Custom 1 KB font ($2400) + Intro text ($2800) |
| $29E0 - $29FF | 10720 - 10751 | 32 B | FREE | FREE RAM (32 B) | Unallocated headroom: 32 bytes |
| $2A00 - $2A21 | 10752 - 10785 | 34 B | DLIST | Intro Display List | 10-line ANTIC Mode 2 Display List |
| $2A22 - $2A2F | 10786 - 10799 | 14 B | FREE | FREE RAM (14 B) | Unallocated headroom: 14 bytes |
| $2A30 - $2FFA | 10800 - 12282 | 1,483 B | METADATA | Tileset Metadata, Status Line & SFX | Row offset lookup tables, HUD status line & victory fanfare |
| $2FFB - $2FFF | 12283 - 12287 | 5 B | FREE | FREE RAM (5 B) | Low RAM gap before Gameplay VRAM ($3000) — vacated by scenes data |
| $3000 - $3FED | 12288 - 16365 | 4,078 B | GRAPHICS | Gameplay VRAM & DLISTs | Mode D 160x96 ($3000) + dlist_game & dlist_scene_title |
| $3FEE - $3FFF | 16366 - 16383 | 18 B | FREE | FREE RAM (18 B) | Unallocated headroom: 18 bytes |
| $4000 - $5BBD | 16384 - 23485 | 7,102 B | GRAPHICS | Title VScroll VRAM & Text | Vertical scroll VRAM ($4000) + Centered text lines ($4078) |
| $5BBE - $5BFF | 23486 - 23551 | 66 B | FREE | FREE RAM (66 B) | Unallocated headroom: 66 bytes |
| $5C00 - $5FDE | 23552 - 24542 | 991 B | DATA | Game Over / Victory Module | Game Over & Victory module (display lists, DLI chain, builder) |
| $5FDF - $5FFF | 24543 - 24575 | 33 B | FREE | FREE RAM (33 B) | Free expansion headroom in the $5000 block before Title DLIST ($6000) |
| $6000 - $60E8 | 24576 - 24808 | 233 B | DLIST | Title Display List | Procedural 2bpp Title Display List with Mode 2 VScroller |
| $60E9 - $60FF | 24809 - 24831 | 23 B | FREE | FREE RAM (23 B) | Free space after Title DLIST before DLI double buffers ($6100) |
| $6100 - $67AA | 24832 - 26538 | 1,707 B | CODE | Unified DLI Engine & Buffers | Double-buffered DLI tables and 3-phase DLI interrupt handler |
| $67AB - $67FF | 26539 - 26623 | 85 B | FREE | FREE RAM (85 B) | Unallocated headroom: 85 bytes |
| $6800 - $6ADF | 26624 - 27359 | 736 B | CODE | Render Tables + Intro Handler | 2bpp flip LUT + row offsets (MEM-006) and the relocated Intro screen code |
| $6AE0 - $6AFF | 27360 - 27391 | 32 B | FREE | FREE RAM (32 B) | Free headroom in PMG block ($6800-$6AFF) before PMG missiles ($6B00) |
| $6B00 - $6FFF | 27392 - 28671 | 1,280 B | PMG | Player-Missile Active Buffer | 1.25 KB active PMG DMA buffer ($6B00-$6FFF) |
| $7000 - $79EF | 28672 - 31215 | 2,544 B | AUDIO | Audio Player & Music | POKEY Player engine & Title track ($7000-$79EF) |
| $79F0 - $79FF | 31216 - 31231 | 16 B | FREE | FREE RAM (16 B) | Unallocated headroom: 16 bytes |
| $7A00 - $7FBE | 31232 - 32702 | 1,471 B | CODE | Playfield Blitter & Sprites | Playfield blitter engine & sprite bitmaps |
| $7FBF - $7FFF | 32703 - 32767 | 65 B | FREE | FREE RAM (65 B) | Free headroom in $7000 block before ANTIC Mode E Tilesets ($8000) |
| $8000 - $9DFB | 32768 - 40443 | 7,676 B | BITMAPS | ANTIC Mode E Tilesets | Bitmapped sheets: Castles, Depths, Hell, Trees (16.2 KB) |
| $9DFC - $9DFD | 40444 - 40445 | 2 B | FREE | FREE RAM (2 B) | Tile headroom before the Scene Data Tables — keep the tilesets below |
| $9DFE - $BFCB | 40446 - 49099 | 8,654 B | METADATA | Scene SoA Tables & DLI Blocks | Scene definitions, platforms, objects, pointer tables & per-scene DLI blocks (grows with the scene count) |
| $BFCC - $BFFF | 49100 - 49151 | 52 B | FREE | FREE RAM (52 B) | Headroom below OS ROM Kernel boundary ($C000) |
| CONSERVATION TOTAL ($2000 - $BFFF): | 40,960 B | Allocated: 40,473 B · Free: 487 B (Balance Check: [OK] EXACT MATCH) | |||