Prev: 33610 Up: Map Next: 33792
33682: Game state scratchpad RAM
110 bytes of mixed 1- and 2-byte variables stamped inline within the code region. The initial byte values come from the tape image, but every byte is treated as RAM by the running game: written by the main-loop subsystems and read back on subsequent frames. Despite living inside the code segment, none of these bytes are executed.
Input
Key variables:
#R33682 AlienFlags bit-packed input (R,L,D,U,Fire)
#R33683 CorridorCursor current corridor index (0..18)
#R33688 SpriteDestAddr sprite blitter screen pointer
#R33690 FrameCounterB free-running 50Hz counter
#R33699 SoundRequest one-shot sound trigger
#R33700 CrewIndex current crew member (0..6)
#R33701 AlienTargetPtr pointer to current crew record
#R33703 AlienTargetID crew ID being targeted (255=none)
#R33704 AlienActiveFlag alien is loose flag
#R33706 JonesRoom Jones the cat's current room (255 = off-map)
#R33731 SoundReqFlag pending sound parameters
#R33734 SprScreenAddrA crew sprite A destination
#R33736 SprScreenAddrB crew sprite B destination
#R33737 MusicActiveFlag music phrase is playing
#R33739 AnimFrameCnt crew animation tick
All cells in this block now carry meaningful labels; the message-queue cluster (MsgDrawnCol through MsgLastEnqueued) is documented at TickMessageQueue (37363).
33682 DEFB 0 Keyboard/joystick scan bitmask (bit 0=R, 1=L, 2=D, 3=U, 4=Fire)
33683 DEFB 17 Currently selected corridor / cursor position (0-18)
33684 DEFB 0 attribute saved from under the menu-cursor highlight (HighlightMenuRow $8842 / UnhighlightMenuRow $882B)
33685 DEFB 0 CorridorPosTable cell value under the cursor ($8395): what the action key dispatches on
33686 DEFB 0
33687 DEFB 64 high byte of SprDestA (marker A screen address)
33688 DEFW 16384 Screen destination pointer used by sprite blitter
33690 DEFB 25 Free-running frame counter (low byte, ~50 Hz)
33691 DEFB 25 frame counter for marker channel A (reset to 10)
33692 DEFB 255,255,255 3-room scratch list ($FF = empty), matched against actor rooms at $8E30
33695 DEFB 255 third nearest-crew slot; $839F-$83A1 are also iterated as a 3-list
33696 DEFB 255 nearest crew ID, slot A (255 = none)
33697 DEFB 255 nearest crew ID, slot B (255 = none)
33698 DEFB 0 running distance/count accumulator for the nearest-crew scan
33699 DEFB 0 One-shot sound request (255 = idle)
33700 DEFB 1 Current crew member index (0-6)
33701 DEFB 134,115 pointer to the alien-target / Android ActorRecords slot
33703 DEFB 9 In the Long Game this is the **Android** slot index (1..7): the dormant traitor crew member that UpdateAlien (40826) activates on first encounter with the alien (the first frame AlienActiveFlag is set and the slot still has its template +0=+7=0). Once activated, the Android enters action state 7 and wounds nearby crew via CrewAction7_Handler (40757). Values >= 8 (e.g. ShortGameInit's hard-wired 9) disable the mechanic — TriggerAlienEvent (41264) treats them as "no valid target".
33704 DEFB 0 Non-zero when the alien is loose in corridors
33705 DEFB 0 SoundPending: nonzero = a sound effect is queued; PlayMusic (44880) plays and clears it
33706 DEFB 6 Jones the cat's current room (255 = off-map)
33707 DEFB 255 frames until Jones's next move
33708 DEFB 0 message line: column reached by the renderer (bit 7 set)
33709 DEFB 0 frames the current message stays on screen
33710 DEFB 224,90 pointer into the message line's attribute row ($5AE0)
33712 DEFB 255 current message parameter 1 (254 = actor name, 252 = room name)
33713 DEFB 255 current message parameter 2 (253 = target name)
33714 DEFB 0,0,0 message queue: 3-byte entries (msg#, param1, param2),
33717 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0 ...rest of the queue buffer (write ptr at $83CD)
33731 DEFB 0,0,0 Sound request word (3 bytes incl. frequency / duration)
33734 DEFB 0,0 Screen destination for crew sprite A
33736 DEFB 0 Screen destination low byte for crew sprite B
33737 DEFB 0 Non-zero when background music phrase is playing
33738 DEFB 255
33739 DEFB 255 Frame counter for crew sprite animation timing
33740 DEFB 255
33741 DEFB 178,131 message-queue write pointer (starts at MessageQueue $83B2)
33743 DEFB 255,255 last enqueued (msg#, param1) pair - suppresses duplicates
33745 DEFB 15 corridor cell at which the walking alien stops (fires $AC5D)
33746 DEFB 0,0,0,0,0,0,0,0 per-item charge counters, items 0-7 (prods, incinerators, trackers): consumed at $9344
33754 DEFB 3,3,3,3,1,8,8,8 ...items 8-15: extinguishers 3 charges, Harpoon Gun 1, laser pistols 8
33762 DEFB 0,14,14,13,13,13,15,14 per-slot Get Jones threshold: the catch succeeds when the next script nibble beats it ($8C13; -4 when using the Net rather than the Cat Box)
33770 DEFB 0,100,120,180,100,180,80,80 per-slot RmveGrille base time in frames (StartGrilleRemoval $8BD3): Dallas 100, Kane 120, Ripley 180, Ash 100, Lambert 180, Parker/Brett 80
33778 DEFB 0,0,48,16,0,0,0,0 SetActionTimer ($8BE6) adjustment by strength (IX+4)&7: Wounded (2) +48, strength 3 +16, else +0
33786 DEFB 0,7,5,0,7,3 SetActionTimer per-slot adjustment. Only 6 bytes: slots 6-7 read past the end into TileTableBounds (10 and 5)
Prev: 33610 Up: Map Next: 33792