• Contact
  • Journal
  • Home
  • CoCo
  • Mega-Bug
  • RAMUse
  • Site
  • Page
  • Amiga
    • Rainbow Islands
      • 1loader-dec
      • 1loader
      • boot
      • orig-boot
      • Journal
  • Arcade
    • Asteroids 80%
      • Hardware
      • RAMUse
      • Code

      • DVG
      • VectorROM

      • Journal
    • Crazy Climber 1%
      • BigSpriteGraphics.pdf
      • Buildings.pdf
      • cclimber.asm
      • CharEnc.inc
      • CrazyClimberMemoryMapInfo.pdf
      • GraphicsAndCharacterAssetInfo.pdf
      • MemoryMap.inc
    • Defender 75%
      • RAMUse
      • Hardware
      • Bank1
      • Bank2
      • Bank3
      • Bank7
      • BankFixed
      • Mapping.txt
      • SoundHardware
      • SoundRAMUse
      • SoundCode
      • Defender-Theory-Early.pdf
      • Defender-Theory-Later.pdf
      • Defender.CPU.jpg
      • Defender.ROM.B&W.jpg
      • Defender.Vid.B&W.jpg
      • SoundROM.txt
    • Frogger (Sound)
      • SoundHardware
      • SoundRAMUse
      • SoundCode

      • Hardware
      • RAMUse
      • Code

      • GFX

      • Journal
    • Galaga 5%
      • CPU1 (Main)
      • CPU2 (Secondary)
      • CPU3 (Sound)
      • GFX1 (Characters)
      • GFX2 (Sprites)
      • PROMcolors
      • PROMpaletteChar
      • PROMpaletteSprite

      • CPU1Fix

      • Journal
    • Moon Patrol 75%
      • Hardware
      • RAMUse
      • Code

      • GFX1 (Text)
      • GFX2 (Sprites)
      • GFX3 (Mountains)
      • GFX4 (Hills)
      • GFX5 (City)
      • ImageBackgroundColors
      • SpriteColors
      • SpriteColorSets
      • TextColors

      • MoonPatrolSound
      • SoundHardware
      • SoundRAMUse
      • SoundCode

      • Journal
    • Omega Race 10%
      • Hardware
      • RAMUse
      • MainBoard

      • SoundHardware
      • SoundRAMUse
      • SoundBoard

      • DVGPROM
      • VectorROM

      • Journal
    • Phoenix 35%
      • Hardware
      • RAMUse
      • Code

      • Background
      • Foreground

      • Journal

      • Scramble HHi
        • phoenixj-func-main2.pdf
        • phoenixj-func-main2.scap
        • phoenixj.asm-may2025.txt
        • phoenixj.asm-may2025.txt.pdf
    • Space Invaders
      • Hardware
      • RAMUse
      • Code

      • Journal
    • Time Pilot (Sound)
      • SoundHardware
      • SoundRAMUse
      • SoundCode

      • Hardware
      • RAMUse
      • Code

      • Journal
    • Sea Wolf 1%
      • Hardware
      • RAMUse
      • Code

      • Journal
    • Scramble 1%
      • SoundHardware
      • SoundRAMUse
      • SoundCode

      • Journal
  • Atari2600
    • Stella (Hardware Info)
    • Asteroids 5%
      • RAMUse
      • Code

      • Journal
    • Battle Zone 1%
      • RAMUse
      • Code

      • Journal
    • Chess 1%
      • RAMUse
      • Code

      • Journal
    • Combat 10%
      • RAMUse
      • Code
      • CodePAL

      • Journal
    • Double Gap
      • Code
      • DoubleGap.asm

      • Journal
    • Entombed 1%
      • RAMUse
      • Code

      • Journal
    • ET 1%
      • RAMUse
      • Code

      • Journal
    • Burger Time 1%
      • RAMUse
      • CodeBank0
      • CodeBank1
      • CodeBank2
      • CodeBank3
      • CodeBank4
      • CodeBank5
      • CodeBank6
      • CodeBank7

      • Journal
    • Missile Command 1%
      • RAMUse
      • Code

      • Journal
    • Space Invaders 1%
      • RAMUse
      • Code

      • Journal
  • CoCo
    • Hardware
    • Early Work
    • Pyramid
      • RAMUse
      • Code

      • Journal
    • Raaka Tu
      • RAMUse
      • Code

      • Journal
    • Bedlam
      • RAMUse
      • Code

      • Journal
    • Madness & Minotaur
      • Walk Through
        • after_start.txt
        • after_start.cas
        • after_1.txt
        • after_1.cas
        • after_2.txt
        • after_2.cas
        • after_3.txt
        • after_3.cas
        • after_4.txt
        • after_4.cas
        • after_5.txt
        • after_5.cas
        • after_6.txt
        • after_6.cas
        • after_7.txt
        • after_7.cas
        • after_8.txt
        • after_8.cas
        • after_9.txt
        • after_9.cas
        • after_10.txt
        • after_10.cas
        • after_11.txt
        • after_11.cas
        • after_12.txt
        • after_12.cas
        • after_13.txt
        • after_13.cas
        • after_14.txt
        • after_14.cas
        • after_15.txt
        • after_15.cas
        • after_16.txt
        • after_16.cas
        • after_17.txt
        • after_17.cas
        • after_18.txt
        • after_18.cas
        • after_19.txt
        • after_19.cas
        • after_20.txt
        • after_20.cas
        • after_21.txt
        • after_21.cas
        • after_22.txt
        • after_22.cas
        • after_23.txt
        • after_23.cas
        • after_24.txt
        • after_24.cas
        • after_25.txt
        • after_25.cas
      • RAMUse
      • Code

      • SaveGameViewer

      • Journal
    • Mega-Bug
      • RAMUse
      • Code

      • Journal
    • Daggorath
      • RAMUse
      • Code

      • Level Maps

      • Journal
    • Downland 5%
      • RAMUse
      • Code

      • Journal
    • Audio Analyzer 5%
      • RAMUse
      • Code

      • Journal
    • Doubleback
      • RAMUse
      • Code

      • Journal
  • NES
    • Zelda 5%
      • Hardware
      • RAMUse
      • Bank0
      • Bank1
      • Bank2
      • Bank3
      • Bank4
      • Bank5
      • Bank6
      • Bank7

      • Journal
    • Kid Icarus 1%
      • Hardware
      • RAMUse
      • Bank0
      • Bank1
      • Bank2
      • Bank3
      • Bank4
      • Bank5
      • Bank6
      • Bank7

      • Journal
  • Gameboy
    • Hardware
    • Link's Awakening 1%
      • RAMUse
      • Bank00
      • Bank01
      • Bank02
      • Bank03
      • Bank04
      • Bank05
      • Bank06
      • Bank07
      • Bank08
      • Bank09
      • Bank0A
      • Bank0B
      • Bank0C
      • Bank0D
      • Bank0E
      • Bank0F
      • Bank10
      • Bank11
      • Bank12
      • Bank13
      • Bank14
      • Bank15
      • Bank16
      • Bank17
      • Bank18
      • Bank19
      • Bank1A
      • Bank1B
      • Bank1C
      • Bank1D
      • Bank1E
      • Bank1F

      • Journal
    • Tetris 1%
      • RAMUse
      • Code

      • Journal
  • TRS80
    • Hardware
    • HauntedHouse
      • RAMUse1
      • Code1
      • RAMUse2
      • Code2

      • Journal
    • Pyramid
      • RAMUse
      • Code

      • RAMUse1
      • Code1

      • Journal
    • RaakaTu
      • RAMUse
      • Code

      • Journal
    • Bedlam
      • RAMUse
      • Code

      • Journal
  • Virus
    • Morris Worm 1%
      • Journal
    • Stoned
      • Journal

  • Tools
    • Blend
      • blend.zip

      • Journal
  • Game variables

Game variables

80:81 Note1 Tone value for note 1
82:83 Note2 Tone value for note 2
84:85 NoteC1 Note1 tally count
86:87 NoteC2 Note2 tally count
88 BitPos Pixel position while printing, neighbor count in maze generation
89 BitPosSrc Pixel position of the source while drawing the magnifier
8A:8B HeadCellList Start of the list of cells needing visiting in the maze draw
8C:8D EndCellList End of the list (+1) of cells needing visiting
8E:8F Temp1 Used to check coordinates and other
90:91 RndSeed Used to fetch bytes from ROM as random numbers
92 RequestedPage Upper byte of address of visible screen page (04, 10, or 1C)
93:94 GenDirection Current direction in maze generation
95:96 TargetCell The target cell last used by the open-cell-wall function
97 WallOpened Maze generation. 00 if a wall was opened during the dig run
98 Temp2 General use
99 Temp3 General use (used as a counter in finding possible directions for a bug)
9A:9B DrawingScreenPtr The screen that is currently being drawn on (1000 or 1C00)
9C:9D VisibleScreenPtr The screen that is currently being shown (1000 or 1C00)
9E:9F ScreenPtr Pointer to the screen buffer being drawn on (1000, 1C00, or 0400)
A0 NumBugs Number of bugs in game
A1 MouthOpen 0 if mouth is open or 1 if mouth is closed. Used as a temporary between rounds.
A2:A3 PlayerCoords Player's coordinates on the screen (y,x)
A4 PlayerDir Player's facing direction
A5 HorzDoubler Flag used to double the horizontal pixels when magnified
A6 Temp4 Used with A5 as a temporary word
A7:A8 MagnifierStart Starting point screen pointer of the magnifier
A9:AA MagnifierEnd The last screen pointer of the magnifier
AB:AC PixCoords Coordinates on the screen (y,x)
AD ColorMask A color mask for printing characters
AE ChangeColor Rotate the color mask after every character (for splash)
AF NumMinutes Number of minutes in game time BCD
B0 NumSeconds Number of seconds in game time BCD
B1:B2 Score Game score BCD
B3:B4 HighScore High score BDC
B5 LiveOrDemo 0 if demo game, not 0 if live game
B6 ISRCountScore Counts ISRs in live game mode to decrement score once a second
B7 ISRCountTime Counts ISRs in live game to increment the time once a second
B8 DrawScore 0 to skip drawing the score or non-zero to draw it
B9 DrawCountSecs 0 to skip drawing seconds-count or non-zero to draw it
BA MakeEatSound Non-zero to play the eat-dot-sound
BB EatSnd1 Used in timing the sound effect for eating-a-dot
BC EatSnd2 Used in timing the sound effect for eating-a-dot
BD EatSnd3 Used in timing the sound effect for eating-a-dot
BE:BF DotsLeft Number of dots left to be eaten in the maze
C0 MazeLoopiness Controls the loopiness of the maze. If RND>=<$C0 then dead-end, otherwise a loop. Starts at $C0 and divides by two each level (more dead-ends)
C1 ShowingGame FF if game screen is showing. 00 if other things are being shown.
C2 JoyOrKey FF if player is using joystick or 00 if player is using keyboard
C3:C4 DemoTimer Count-down by the ISR used to time the demo play (and direct restart after losing)
C5 NumStartBugs Hold ENTER down at powerup to start the game with 16 bugs
C6 PlayShortSong 00 if we should play the long song or FF if we already have (and should play the short song)
C7 VisiblePage Upper byte of address of visible screen page

Graphics pages (3K each)

  • 0400 - 0FFF
  • 1000 - 1BFF
  • 1C00 - 27FF

The data on the bugs is kept in an array at $2808. 3 bytes each: y,x,dir

  • 2800:2807: during maze generation, list of unvisited neighbors (2 bytes * 4 possible)
  • 2808:2868: 1st set of data on up to 32 bugs ... 3 bytes each (y,x,dir)
  • 2868:28C7: 2nd set (starts as a duplicate of 1st) of bug data (y,x,dir). Two sets of data for mouth open/close times
  • 28C8:28E7: column-has-content flags set by the draw-magnifier routine and read by the draw-bug routine
  • 28E8:2A27: array of bytes, one per cell, 20*10 cells. 00=not visited, FF=visited
  • 2A28:? : array of words, coordinates of cells we need to revisit in the maze generation