> SYSTEM ARCHITECTURE / MEMORY SUBSYSTEM

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).

User RAM (40 KB) Hardware I/O (2 KB) OS ROM (14 KB)
$0000 - $07FF 2,048 B
$0800 - $1FFF 6,144 B
$2000 - $BFFF 40,960 B
$C000 - $CFFF 4,096 B
$D000 - $D7FF 2,048 B
$D800 - $FFFF 10,240 B
$0000 (0) $4000 (16 KB) $8000 (32 KB) $C000 (48 KB) $FFFF (64 KB)
System RAM (ZP / Stack / OS)
$0000 - $07FF
2,048 B
DOS & Buffer RAM
$0800 - $1FFF
6,144 B
Game User RAM ($2000 - $BFFF)
$2000 - $BFFF
40,960 B
Atari OS ROM (Math / Char)
$C000 - $CFFF
4,096 B
Hardware Registers (GTIA/POKEY/ANTIC)
$D000 - $D7FF
2,048 B
Atari OS ROM (Kernel & Vectors)
$D800 - $FFFF
10,240 B

> GAME USER RAM PARTITION ($2000 - $BFFF)

Total: 40,960 Bytes · Allocated: 40,473 B (98.81%) · Free Headroom: 487 B

HEADROOM: 487 B
Gameplay VRAM & DLISTs 4,078 B
Title VScroll VRAM & Text 7,102 B
Audio Player & Music 2,544 B
ANTIC Mode E Tilesets 7,676 B
Scene SoA Tables & DLI Blocks 8,654 B
$2000 (8,192) $5000 (20,480) $8000 (32,768) $BFFF (49,151)
CATEGORY DISTRIBUTION:
CODE
4,894 B
12.1%
GRAPHICS
12,684 B
31.3%
BITMAPS
7,676 B
19.0%
DLIST
267 B
0.7%
PMG
1,280 B
3.2%
AUDIO
2,544 B
6.3%
METADATA
10,137 B
25.0%
DATA
991 B
2.4%

> ZERO PAGE ARCHITECTURE ($00 - $FF, 256 BYTES)

Zero Page addressing saves 1 cycle and 1 byte per memory instruction on MOS 6502.

OS Reserved: 128 B Game Used: 103 B Free: 25 B
SYSTEM (OS)
RENDERER
GAMEPLAY
FREE
$00 (OS Base) $80 (User Base) $C0 (DLI / Player) $FF (Top)
SYSTEM (OS) $00 - $7F
Footprint: 128 Bytes

Reserved for Atari OS Kernel

ENGINE $80 - $87
Footprint: 8 Bytes

Registers & temporary pointers (zp_temp, zp_ptr_src/dst)

STATE $88 - $8F
Footprint: 8 Bytes

Game states, title card fade counters, fire debouncing

AUDIO $90 - $99
Footprint: 10 Bytes

POKEY Audio Player base pointers (PLAYER_ZP_BASE)

RENDERER $9A - $B7
Footprint: 30 Bytes

Scene renderer table pointers & parameters

DLI ENGINE $B8 - $C0
Footprint: 9 Bytes

DLI registers save, pas counters & PMG pattern ptr

GAMEPLAY $C1 - $E6
Footprint: 38 Bytes

Lives, HUD specials, Player 0 physics, platforms, secrets, killer mode

FREE $E7 - $FF
Footprint: 25 Bytes

Unallocated Zero Page available for engine expansion

> HISTORICAL MEMORY CONSUMPTION TREND

Empirical measurements from release binaries across versions.

Allocated RAM 40 KB Limit
41,000 B MAX RAM: 40,960 B 40,500 B 40,000 B 40484 B v0.1.0 40484 B v0.2.0 40473 B v0.2.1 40473 B v0.3.0
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.

Showing 29 Regions (15 Allocated, 14 Free Gaps)
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)