Disassembled by D.C.Devenport ZEROPAGE ADDRESSES ------------------ 00 : sprite dest1 lsb 01 : sprite dest1 msb 02 : sprite dest2 lsb 03 : sprite dest2 msb 04 : 05 : sprite height 06 : 07 : 08 : 09 : 0A : 0B : 0C : wave data LSB 0D : wave data MSB 0E : stars position LSB base - 68 last one (30 stars in total) 0F : stars position MSB base - 69 last one 10 : stars colour base - 6a last one 6B : random seed 1 6C : random seed 2 6D : random seed 3 6E : stars plotting base offset number 6F : incremented every game loop 70 : number of times processed all aliens counter counter 75 : 79 : 7D : 81 : 85 : 89 : 8D : 91 : 95 : 99 : total visible aliens 9A : next free visible alien slot FC : FF : ABSOLUTE ADDRESSES ------------------ 0000 : 0004 : 0220 : 0221 : 0240 : 02A1 : 0400 : Alien X behavior flags (bit 7 = 1 sprite visible flag ) 0428 : alien X sprite type lookup offset value? 0448 : 0450 : alien pattern LSBs 0478 : alien pattern MSBs 04A0 : alien X position in alien pattern 04C8 : alien X Current number of hits required to kill it remaining 04F0 : alien repeat move counter 0500 : 0518 : alien move action 0540 : alien sprite X coords 0568 : alien sprite Y coords 0590 : alien pattern loop counter 05B8 : alien pattern loop start index value 05E0 : alien spawn pattern number that spawned this alien (the spawner type) 0600 : 0608 : bullet X pos' (3) 608/609/60a 060B : bullet Y pos' (3) 60b/60c/60d 060E : bullet slot flags (3) 60e/60f/610 (negative means slot used) 0611 : bomb sprite position X's 0617 : bomb sprite position Y's 061D : bomb alive flags (0=no bomb,$ff=bomb) 0623 : bomb flags (bit 7 = 7 fast bomb) 0629 : lives left 062A : player X pos 062B : player Y pos 062C : player dying flag - starts off zero has 1 ROR into it if dying 062D : 8 score digits 0634 : 8 hiscore digits 0636 : default hiscore digit 063B : wave number of the current zone 063C : number of spawned aliens? 063D : current zone number 063E : current alien processing counter? 063F : number of player bullets? 0640 : number of bombs on the screen? 0641 : timers running counter? 0642 : bullet auto firing counter 0643 : demo tune section counter 0644 : sound is on flag ($80=on 0=off) 0645 : Keyboard/Joystick flag... NEGATIVE=keyboard 0646 : playing game flag NEGATIVE means not playing (doing demo!) 0647 : demo random movement length counter (decrements while doing demo) 0648 : demo random movement flags 0649 : counter for checking for joystick/keyboard toggle 064A : extra life flag (NEGATIVE=already had extra life) 064B : Showing entering zone message flag (positive means displaying) 064C : paused flag NEGATIVE means not paused 064D : Hiscores, score names 10 chars max (highest score first) 0657 : Hiscores, score names 10 chars max (second highest score first) 069D : Hiscores, 7 score digits (highest score first) 06A4 : Hiscores, 7 score digits (second highest score first) 0700 : text byte lookups 0A00 : number sprites 0B4F : 0B50 : 0B56 : 0B57 : 0B60 : 0B61 : 0B67 : 0B68 : 0B71 : 0B72 : 0B78 : 0B79 : 0B82 : 0B83 : 0B89 : 0B8A : 0B93 : 0B94 : 0B9A : 0B9B : 0BA4 : 0BA5 : 0BAB : 0BAC : 0DC4 : 0E19 : 10E4 : lookup values to reverse relative movements 10EC : jump table LSB 10ED : jump table MSB 132F : pattern byte move table X 1367 : pattern byte move table Y 139F : screen address lookup lsb 13BF : screen address look up msb 1521 : Base number of hits required to kill alien of each type 1603 : 1607 : 1619 : 16BE : lookups for number sprite src LSBs 1712 : lookups for alien type scores? 1900 : 19A3 : bullet sprite 1A00 : 1AD7 : 1B1F : Encoded message colour 1B5B : Display message lookup table LSB's start (interleaved) 1B5C : Display message lookup table MSB's start (interleaved) 1BA5 : 1BA6 : 1BFB : 1C00 : message 12 letter to display ($13 = J, $14 = K) 1C34 : hiscore entered char LSB 1C35 : hiscore entered char MSB 1C38 : hiscore entered char to display 1C39 : hiscore row display LSB 1C3A : hiscore row display MSB 1C3D : hiscore row display - highscore rank# 1C3F : hiscore row display - highscore score 1C48 : hiscore row display - highscore name = entered text -> message buffer to display it 1D2C : 1D7D : 1E06 : tune base LSB 1E07 : tune base MSB 1E68 : 1E69 : 1E89 : tune note CHANNEL 1E8B : tune note AMPLITUDE (volume) 1E8D : tune note PITCH 1E8F : tune note DURATION 1E91 : 1E92 : music channel play clock (plays at zero) 1E94 : 1E95 : music channel playing pointer base 1E96 : music channel 2 playing pointer base 1E97 : music channel 3 playing pointer base 1E98 : music note tempos? 1E9C : music channel tempos 1EB8 : music channel volumes 1EBB : music channel volumes 1ECA : music channel note durations 1ECD : music channel durations 217D : tune data setup lookups 217E : 217F : 2180 : 2181 : base tempo offsets 2182 : base volume offsets 2183 : base duration offsets 2240 : GALAFORCE letters 23F1 : lookup table: offsets for hiscore digits (offset*7-1) 23F9 : lookup table: offsets for hiscore names (offset*10-1) 288B : zone data lookup LSB table (16 zones total) 289B : zone data lookup MSB table (16 zones total) 28AB : wave lookup LSB table 28D9 : wave lookup MSB table 2907 : pattern lookup LSB table 2925 : pattern lookup MSB table 297A : alien sprite data lookup table LSB 297B : alien sprite data lookup table MSB 299E : player sprite data LSB 299F : player sprite data MSB 308F : score on screen position LABELS (ROUTINES) ----------------- 0B00 : Sprite Routine (src1 in (?&04*256)+A->dest in (&00), src2 Y*256+X ->dest in (&02)) 0B4C : 0BBA : 0BCA : move dest1 down a line 0BDA : move dest2 down a line (stop if last line) 0BEE : 0BEF : ENTRY POINT 0C05 : 0C4C : Start game at zone Y 0C78 : ok start the first wave of the zone 0C8A : lose a life (there is at least 1 left) 0CA7 : restart a wave in zone 0CC3 : 0D17 : show attract screens, waiting for key press - if don't start the game A=0, returns with A = random number 0-7 demo level 0D1E : 0D2E : start game from attract screen2 0D40 : 0D4A : 0D50 : 0D63 : 0D78 : Do player demo movement counters (change L/R direction after random length of time) 0DAE : 0DBF : 0DCC : if not playing the demo, update the stars, and deal with pause/sound/key/joystick key presses (Play dying tune) 0DD6 : 0DEF : pause a while, move stars, deal with k/j/q/s/p (used in attract screens) 0DFA : if player is not dying, all aliens/bombs/timers are expired, progress to next wave in zone (or next zone) 0E00 : 0E20 : 0E47 : 0E4A : Entering a new zone, start wave 0 of the new zone 0E63 : Show wave A 0E6E : Start wave A 0E80 : Fill wave spawners - Wave spawner loop - find an empty spawner slot 0E82 : 0E8D : 0E95 : 0EC9 : run alien spawn timers if not dying 0ED3 : 0ED5 : 0EDF : continue processing spawn timers 0EE3 : 0EE9 : 0EF3 : 0F46 : 0F49 : 0F59 : 0F5E : 0F67 : 0F7F : plot an alien ?&08 at X,Y (this either plots, or unplots an alien, never both) 0F9B : process 6 aliens 0FA2 : 0FAA : process next alien in loop 0FC1 : process next alien of 6 0FC6 : alien X is visible so process it 0FCF : alien X not exploding and visible - process it 0FEB : 100D : 100F : 1012 : 1033 : 103A : 1043 : 1054 : remove old sprite and plot new position (A=x coord, Y=y coord) 1076 : jump to alien movement routine in table at &10EC, offset A 1089 : every other loop - explode alien X animation? (start exploding if not, otherwise animate) 10C1 : 10D7 : 112A : 1134 : 11E5 : ADVAL X positive check 11ED : ADVAL X negative check 11F9 : check for P key pressed 11FB : do inkey X, Z/C set = pressed 1205 : pause for some time (as though displaying a sprite?) 1207 : do a pause with time in X 122D : 1232 : 1240 : initialise variables (dying flag/spawn/alien counters/bullets/bombs etc/reset player position/init random seed) 1259 : 1261 : 1268 : 1270 : 1280 : reset random seeds 1295 : calc screen address of X,Y (but make sure X=X mod 80, also Y>=17) otherwise screen address=&c000 1296 : 129F : 12A7 : calc X,Y into screen coords 12CB : work out screen address of player sprite into (&00) and set the sprite height 12DD : check for joystick/keyboard/sound on toggle 130B : print Message 10 Col 03 String Offset 1BF7 = "S" at $7FD0 (54,200) 1310 : toggle keyboard/joystick check 1327 : set Keyboard/Joystick flag... NEGATIVE=keyboard, and print Message 12 Col 3C String Offset 1BFC = K (or J) - displays the input device letter 132A : print Message 12 Col 3C String Offset 1BFC = K (or J) - displays the input device letter 13DF : check alien collisions with player and bullets, then player with bombs 13E7 : 13EE : process next alien collision 13F6 : 140A : 1417 : 1428 : 1432 : kill the player 1438 : 1462 : no collision with the player - check for collision with a bullet 146A : 1473 : check next bullet 147B : 1499 : 14A4 : 14B7 : 14D4 : check if player has collided with a bomb? 14D6 : 14DD : check next bomb collision 14E3 : 1501 : 150C : 152D : play explosion sound 154B : Deal with player movement 1551 : 1566 : 156B : get input from human player (&08=X movement, &09=Y movement) 158F : 15AB : common player movement code (player and computer controlled) 15BE : 15D2 : 15E8 : start/dest addresses not same (player sprite has moved) so lets unplot/plot it 15F8 : start/dest addresses ARE same (player sprite has not moved) toggle demo left/right movement direction 160B : display a digit at &62d,X 1618 : 1623 : zero score and display "0", display hiscore 1626 : display hiscore 162E : 1637 : 163E : 1649 : 164F : player shot alien X code - gain score 1664 : 166E : 1671 : 168B : 16C8 : update hiscore digits - copy score to hiscore if greater than... 16CF : 16DE : 16EA : zero score and wipe it, display a "0" 16EE : 16F6 : 171E : Display entering zone message (do zone transition) and bonus word / show a while/ delete the messages 172A : 1733 : 1742 : 1762 : 176B : Display/remove "GALAFORCE" "by kevin edwards" "superior software" "press space or fire" "to play" messages 1782 : check for space to start game (kill player, end demo), or escape to end game (kill player, end game) 178D : check for escape to end game? 1794 : 17A5 : If human playing, play tune, display game over, wait a while, remove message 17B4 : 17C9 : check for space bar or fire button (C set=keyboard clear=joystick button, z clear = neither) 17DE : Display zone name - (c clear means don't set flag at #&064b) 16=SATURN 32=BATTERY 48=TURBO 1805 : 1807 : calc and plot original stars 1813 : 1835 : 1849 : update the stars (unplot 16, move them down, and replot) 1850 : 1878 : 187A : replot new star position 1891 : 1894 : get random star position at top of screen (address will lie upon row1) 18AE : 18B5 : 18B8 : random number to A 18CB : process player bullets 18D3 : 18DA : 18E1 : process next alive bullet 18E8 : 1909 : 1914 : check for player firing 1917 : 1937 : 193E : 1945 : 194C : 1955 : fire a bullet (using slot X) 1987 : plot/remove bullet at (X,Y) 1990 : 19B3 : play a sound @ Y*256+X (if not in demo and sound is on) 19C2 : process bombs (random chance of bombing + process falling bombs) 19E0 : do 1 in 16 chance of dropping a bomb 19EF : Alien slot number A to drop a bomb (either random or 32(COZENAGE)) 19FB : process the bombs falling 1A02 : 1A09 : process next bomb 1A0F : 1A1A : 1A3E : 1A55 : 1A6E : 1A73 : display new bomb position 1A7B : make alien X drop a bomb if slot free and zone>=3 1A84 : 1A8D : 1AA9 : 1AAC : 1AC3 : display/remove a bomb sprite on the screen 1ACC : 1AE1 : print/remove Message Y (at fixed position) 1B00 : 1B17 : Do a vertical column of char pixels loop 1B1E : 1B28 : 1B49 : 1B54 : do next char in message 1C65 : display/remove extra lives 1C72 : 1C74 : 1C89 : draw zone flags 1C9F : draw flags loop 1CAE : 1CB0 : 1CC4 : 1D16 : 1D23 : 1D9A : setup to play tune/section Y? 1DC0 : 1DD2 : 1DE9 : 1DF5 : play a tune routine? 1DFA : channel playing loop 1E3C : 1E4C : 1E52 : see if tune finished? 1E63 : 1E70 : Initialise tune to blank, and flush keyboard buffer 1E7E : 21BC : Display big GALAFORCE letters in red 21D0 : 21E3 : 21EE : 2200 : 2214 : 2229 : 2234 : 224A : Do Hiscore entry if not demo (and score high enough) 2253 : 225F : 2273 : 227C : enter new hiscore (score is greater than or equal to a hiscore table entry) 2284 : 2291 : 229C : 22A1 : 22B8 : 22EB : display the hiscore table 22F9 : display hiscore table row loop 2308 : copy digits to high score display message 2315 : 2318 : 2329 : 234C : Enter name for hiscore at highscore name offset X 2350 : error, do a beep, enter new char 2355 : enter a char loop 2360 : 238C : 2398 : 23A2 : valid char entered 23B9 : 23BE : 23D0 : 23E3 : display/remove char of entered text MEMORY START 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 01A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 01B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 01C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 01D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 01E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 01F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0270 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0280 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0290 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 02A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 02B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 02C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 02D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 02E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 02F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0310 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0320 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0330 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0340 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0350 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0360 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0370 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0380 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0390 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 03A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 03B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 03C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 03D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 03E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 03F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0460 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0470 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0480 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0490 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 04A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 04B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 04C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 04D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 04E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 04F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0510 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0520 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0540 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0550 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0560 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0570 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0580 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0590 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 05A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 05B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 05C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 05D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 05E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 05F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0620 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0630 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0640 00 00 00 00 00 00 00 00 00 00 00 00 00 1C 1E 19 ................ 0650 0E 1B 12 18 1B 26 26 1C 1E 19 0E 1B 12 18 1B 26 .....&&........& 0660 26 1C 1E 19 0E 1B 12 18 1B 26 26 1C 1E 19 0E 1B &........&&..... 0670 12 18 1B 26 26 1C 1E 19 0E 1B 12 18 1B 26 26 1C ...&&........&&. 0680 1E 19 0E 1B 12 18 1B 26 26 1C 1E 19 0E 1B 12 18 .......&&....... 0690 1B 26 26 1C 1E 19 0E 1B 12 18 1B 26 26 00 00 03 .&&........&&... 06A0 00 00 00 00 00 00 02 05 00 00 00 00 00 02 00 00 ................ 06B0 00 00 00 00 01 05 00 00 00 00 00 01 00 00 00 00 ................ 06C0 00 00 00 05 00 00 00 00 00 00 03 00 00 00 00 00 ................ 06D0 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 06E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 06F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ text byte lookups 5 bytes/pixels wide, each byte is a vertical columns of pixels (top down) chars='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.- ()' 0700 7F 41 41 79 7F 00 78 7F 00 00 79 79 49 49 4F 63 .AAy..x...yyIIOc 0710 49 49 7F 78 1F 11 71 7F 10 6F 49 49 79 79 7F 49 II.x..q..oIIyy.I 0720 49 49 7B 01 01 01 79 7F 78 4F 49 7F 78 0F 09 09 II{...y.xOI.x... 0730 79 7F 78 7F 09 0F 78 7F 79 49 4F 78 7F 79 41 41 y.x...x.yIOx.yAA 0740 63 7F 79 41 41 7F 7F 79 49 49 49 7F 79 09 09 09 c.yAA..yIII.y... 0750 7F 79 41 49 7B 7F 78 08 08 7F 00 7F 78 00 00 70 .yAI{.x.....x..p 0760 40 40 7F 78 7F 78 08 0F 78 7F 78 40 40 40 7F 01 @@.x.x..x.x@@@.. 0770 7F 01 7F 7F 79 01 01 7F 7F 41 41 43 7F 7F 79 09 ....y....AAC..y. 0780 09 0F 7F 41 61 61 7F 7F 79 09 0F 78 4F 49 49 79 ...Aaa..y..xOIIy 0790 79 01 01 7F 79 01 7F 78 40 40 7F 0F 7F 40 70 0F y...y..x@@...@p. 07A0 7F 40 7F 40 7F 77 78 08 08 77 0F 08 78 08 0F 7B .@.@.wx..w..x..{ 07B0 79 49 49 6F 00 00 60 00 00 08 08 08 08 08 00 00 yIIo..`......... 07C0 00 00 00 00 3C 42 81 00 00 81 42 3C 00 26 41 34 ....dest in (&00), src2 Y*256+X ->dest in (&02)) - height in &05 always 12 pixels (6 bytes) wide 0B00 8D 4F 0B .O. STA &0B4F .src1 data lsb1 B03 8D 60 0B .`. STA &0B60 .src1 data lsb2 B06 8D 71 0B .q. STA &0B71 .src1 data lsb3 B09 8D 82 0B ... STA &0B82 .src1 data lsb4 B0C 8D 93 0B ... STA &0B93 .src1 data lsb5 B0F 8D A4 0B ... STA &0BA4 .src1 data lsb6 B12 8E 56 0B .V. STX &0B56 .src2 data lsb1 B15 8E 67 0B .g. STX &0B67 .src2 data lsb2 B18 8E 78 0B .x. STX &0B78 .src2 data lsb3 B1B 8E 89 0B ... STX &0B89 .src2 data lsb4 B1E 8E 9A 0B ... STX &0B9A .src2 data lsb5 B21 8E AB 0B ... STX &0BAB .src2 data lsb6 B24 A5 04 .. LDA &04 . B26 8D 50 0B .P. STA &0B50 .src1 data msb1 B29 8D 61 0B .a. STA &0B61 .src1 data msb2 B2C 8D 72 0B .r. STA &0B72 .src1 data msb3 B2F 8D 83 0B ... STA &0B83 .src1 data msb4 B32 8D 94 0B ... STA &0B94 .src1 data msb5 B35 8D A5 0B ... STA &0BA5 .src1 data msb6 B38 8C 57 0B .W. STY &0B57 .src2 data msb1 B3B 8C 68 0B .h. STY &0B68 .src2 data msb2 B3E 8C 79 0B .y. STY &0B79 .src2 data msb3 B41 8C 8A 0B ... STY &0B8A .src2 data msb4 B44 8C 9B 0B ... STY &0B9B .src2 data msb5 B47 8C AC 0B ... STY &0BAC .src2 data msb6 B4A A2 00 .. LDX #&00 (0) .00000000 src data offset row plotting loop B4C A0 00 .. LDY #&00 (0) .00000000 (pixels 0+1 across) B4E BD FF FF ... LDA &FFFF,X .src1 data1 B51 51 00 Q. EOR (&00),Y . B53 91 00 .. STA (&00),Y . B55 BD FF FF ... LDA &FFFF,X .src2 data1 B58 51 02 Q. EOR (&02),Y . B5A 91 02 .. STA (&02),Y . B5C E8 . INX .src data offset++ B5D A0 08 .. LDY #&08 (8) .00001000 (pixels 2+3 across) B5F BD FF FF ... LDA &FFFF,X .src1 data2 B62 51 00 Q. EOR (&00),Y . B64 91 00 .. STA (&00),Y . B66 BD FF FF ... LDA &FFFF,X .src2 data2 B69 51 02 Q. EOR (&02),Y . B6B 91 02 .. STA (&02),Y . B6D E8 . INX .src data offset++ B6E A0 10 .. LDY #&10 (16) .00010000 (pixels 4+5 across) B70 BD FF FF ... LDA &FFFF,X .src1 data3 B73 51 00 Q. EOR (&00),Y . B75 91 00 .. STA (&00),Y . B77 BD FF FF ... LDA &FFFF,X .src2 data3 B7A 51 02 Q. EOR (&02),Y . B7C 91 02 .. STA (&02),Y . B7E E8 . INX .src data offset++ B7F A0 18 .. LDY #&18 (24) .00011000 (pixels 6+7 across) B81 BD FF FF ... LDA &FFFF,X .src1 data4 B84 51 00 Q. EOR (&00),Y . B86 91 00 .. STA (&00),Y . B88 BD FF FF ... LDA &FFFF,X .src2 data4 B8B 51 02 Q. EOR (&02),Y . B8D 91 02 .. STA (&02),Y . B8F E8 . INX .src data offset++ B90 A0 20 . LDY #&20 (32) .00100000 (pixels 8+9 across) B92 BD FF FF ... LDA &FFFF,X .src1 data5 B95 51 00 Q. EOR (&00),Y . B97 91 00 .. STA (&00),Y . B99 BD FF FF ... LDA &FFFF,X .src2 data5 (pixels A+B across) B9C 51 02 Q. EOR (&02),Y . B9E 91 02 .. STA (&02),Y . BA0 E8 . INX .src data offset++ BA1 A0 28 .( LDY #&28 (40) .00101000 (pixels C+D across) BA3 BD FF FF ... LDA &FFFF,X .src1 data6 BA6 51 00 Q. EOR (&00),Y . BA8 91 00 .. STA (&00),Y . BAA BD FF FF ... LDA &FFFF,X .src2 data6 BAD 51 02 Q. EOR (&02),Y . BAF 91 02 .. STA (&02),Y . BB1 E8 . INX .src data offset++ BB2 A5 00 .. LDA &00 .sprite dest1 lsb BB4 29 07 ). AND #&07 (7) .00000111 BB6 F0 12 .. BEQ &0BCA .(if at top of row) move dest1 up a line BB8 C6 00 .. DEC &00 .sprite dest1 lsb-- BBA A5 02 .. LDA &02 .sprite dest2 lsb BBC 29 07 ). AND #&07 (7) .00000111 BBE F0 1A .. BEQ &0BDA .(if at top of row) move dest2 up a line (stop if last line) BC0 C6 02 .. DEC &02 .sprite dest2 lsb-- BC2 C6 05 .. DEC &05 .sprite height BC4 D0 86 .. BNE &0B4C .branch if there is another row to plot BC6 4C EE 0B L.. JMP &0BEE .RTS (maybe did some extra stuff originally?) BC9 60 ` RTS . move dest1 up a line BCA 38 8 SEC . BCB A5 00 .. LDA &00 .sprite dest1 lsb BCD E9 79 .y SBC #&79 (121) .01111001 BCF 85 00 .. STA &00 .sprite dest1 lsb BD1 A5 01 .. LDA &01 .sprite dest1 msb BD3 E9 02 .. SBC #&02 (2) .00000010 BD5 85 01 .. STA &01 .sprite dest1 msb BD7 4C BA 0B L.. JMP &0BBA . move dest2 up a line (stop if last line) BDA 38 8 SEC . BDB A5 02 .. LDA &02 .sprite dest2 lsb BDD E9 79 .y SBC #&79 (121) .01111001 BDF 85 02 .. STA &02 .sprite dest2 lsb BE1 A5 03 .. LDA &03 .sprite dest2 msb BE3 E9 02 .. SBC #&02 (2) .00000010 BE5 85 03 .. STA &03 .sprite dest2 msb BE7 C6 05 .. DEC &05 .sprite height BE9 F0 03 .. BEQ &0BEE .(RTS) BEB 4C 4C 0B LL. JMP &0B4C . BEE 60 ` RTS . ENTRY POINT.. START OF THE GAME BEF A2 FF .. LDX #&FF (255=-1) .11111111 BF1 9A . TXS .reset stack BF2 20 70 1E p. JSR &1E70 .Initialise tune to blank, and flush keyboard buffer BF5 78 x SEI . BF6 A9 8F .. LDA #&8F (143=-113) .10001111 BF8 8D 20 02 . . STA &0220 .EVENTV vector lo address BFB A9 0D .. LDA #&0D (13) .00001101 BFD 8D 21 02 .!. STA &0221 .EVENTV vector hi address C00 58 X CLI . C01 A0 0E .. LDY #&0E (14) .00001110 C03 A9 00 .. LDA #&00 (0) .00000000 C05 99 2C 06 .,. STA &062C,Y .cleared $62d-$63b (score+hiscore) 062D=8 score digits 0634=8 hiscore digits C08 88 . DEY . C09 D0 FA .. BNE &0C05 .clear another if not zero C0B A9 03 .. LDA #&03 (3) .00000011 C0D 8D 36 06 .6. STA &0636 .Default high score digit 3 = 3 (30000) C10 A9 16 .. LDA #&16 (22) .00010110 MODE C12 20 EE FF .. JSR &FFEE .OSWRCH output a character to the VDU stream C15 A9 02 .. LDA #&02 (2) .00000010 MODE 2 C17 20 EE FF .. JSR &FFEE .OSWRCH output a character to the VDU stream C1A A9 0A .. LDA #&0A (10) .00001010 R10 cursor start register C1C 8D 00 FE ... STA &FE00 .6845 CTRC address register C1F A9 20 . LDA #&20 (32) .00100000 turn off the cursor C21 8D 01 FE ... STA &FE01 .6845 CTRC data register C24 20 80 12 .. JSR &1280 .reset random seeds C27 20 07 18 .. JSR &1807 .calc and plot original stars C2A A0 02 .. LDY #&02 (2) .Message 02 Col 33 String Offset 1B86 = "SCR" at $3030 (6,0) C2C 20 E1 1A .. JSR &1AE1 .print/remove Message Y (at fixed position) C2F A0 04 .. LDY #&04 (4) .Message 04 Col 33 String Offset 1B8D = "HI" at $3150 (42,0) C31 20 E1 1A .. JSR &1AE1 .print/remove Message Y (at fixed position) C34 A9 80 .. LDA #&80 (128=-128) .10000000 C36 8D 44 06 .D. STA &0644 .sound is on flag ($80=on 0=off) = SOUND ON C39 8D 4C 06 .L. STA &064C .paused flag NEGATIVE means not paused = NOT PAUSED C3C 8D 45 06 .E. STA &0645 .Keyboard/Joystick flag... NEGATIVE=keyboard = KEYBOARD ON C3F 20 0B 13 .. JSR &130B .print Message 10 Col 03 String Offset 1BF7 = "S" at $7FD0 (54,200) C42 20 2A 13 *. JSR &132A .Message 12 Col 3C String Offset 1BFC = K (or J) - displays the input device letter (plot it) C45 20 23 16 #. JSR &1623 .zero score and display "0", display hiscore C48 20 17 0D .. JSR &0D17 .show attract screens, waiting for key press - if don't start the game A=0, returns with A = random number 0-7 demo level C4B A8 . TAY .Y = zone to display (demo/start game) Start game at zone Y C4C A9 03 .. LDA #&03 (3) .00000011 C4E 8D 29 06 .). STA &0629 .lives left C51 8D 4B 06 .K. STA &064B .set Showing entering zone message flag (positive means displaying) C54 8D 4A 06 .J. STA &064A .extra life flag (NEGATIVE=already had extra life) - clear it so we can gain one C57 8C 3D 06 .=. STY &063D .store current zone number (from Y) C5A B9 8B 28 ..( LDA &288B,Y .zone data lookup LSB table (16 zones total) C5D 85 0C .. STA &0C .zone data start LSB C5F B9 9B 28 ..( LDA &289B,Y .zone data lookup MSB table (16 zones total) C62 85 0D .. STA &0D .zone data start MSB C64 20 89 1C .. JSR &1C89 .draw zone flags (plot them) C67 A9 0E .. LDA #&0E (14) .00001110 *FX14,4 enable VSync event C69 A2 04 .. LDX #&04 (4) .00000100 C6B 20 F4 FF .. JSR &FFF4 .OSBYTE C6E AD 46 06 .F. LDA &0646 .playing game flag NEGATIVE means not playing (doing demo!) C71 30 05 0. BMI &0C78 (< signed) .branch if the demo (don't play the theme tune) human is playing - kick off the main theme tune C73 A0 00 .. LDY #&00 (0) .00000000 (main theme tune - dum dum diddly tune) C75 20 9A 1D .. JSR &1D9A .setup to play tune/section Y? ok start the first wave of the current zone C78 A9 00 .. LDA #&00 (0) .00000000 C7A 8D 3B 06 .;. STA &063B .wave number of the current zone C7D A0 06 .. LDY #&06 (6) .00000110 C7F 84 99 .. STY &99 .total visible aliens C81 88 . DEY .-1 C82 84 9A .. STY &9A .Last visible alien offset (always ?&99-1) C84 20 23 16 #. JSR &1623 .zero score and display "0", display hiscore C87 4C A7 0C L.. JMP &0CA7 .restart a wave in zone lose a life (there is at least 1 left) C8A 20 65 1C e. JSR &1C65 .display/remove extra lives (remove them) C8D A0 00 .. LDY #&00 (0) .00000000 C8F B1 0C .. LDA (&0C),Y .first byte of zone data C91 85 99 .. STA &99 .total visible aliens C93 38 8 SEC . C94 E9 01 .. SBC #&01 (1) .00000001 C96 85 9A .. STA &9A .Last visible alien offset (always ?&99-1) C98 CE 3B 06 .;. DEC &063B .wave number of the current zone (restart the current wave) C9B CE 29 06 .). DEC &0629 .lives left-- C9E D0 07 .. BNE &0CA7 .branch if some lives left to plot (restart a wave in zone) just starting last life, play an alarm noise CA0 A2 E7 .. LDX #&E7 (231=-25) .11100111 CA2 A0 0D .. LDY #&0D (13) .00001101 CA4 20 B3 19 .. JSR &19B3 .play a sound @ Y*256+X (if not in demo and sound is on) restart a wave in zone ( but not necessarily the first wave of the zone) CA7 20 65 1C e. JSR &1C65 .display/remove extra lives (plot them) CAA 20 40 12 @. JSR &1240 .initialise variables (dying flag/spawn/alien counters/bullets/bombs etc/reset player position/init random seed) CAD 20 CB 12 .. JSR &12CB .work out screen address of player sprite into (&00) and set the sprite height CB0 A9 C0 .. LDA #&C0 (192=-64) .11000000 CB2 85 03 .. STA &03 .sprite dest2 msb (make offscreen - unplot position - nothing to unplot) CB4 AD 9E 29 ..) LDA &299E .src1 lsb player sprite CB7 AA . TAX .src2 lsb CB8 AC 9F 29 ..) LDY &299F .src2 msb player sprite CBB 84 04 .. STY &04 .src1 msb CBD 20 00 0B .. JSR &0B00 .Sprite Routine (src1 in (?&04*256)+A->dest in (&00), src2 Y*256+X ->dest in (&02)) original ship plot CC0 20 1E 17 .. JSR &171E .Display entering zone message (do zone transition) and bonus word / show a while/ delete the messages Main game loop CC3 58 X CLI . CC4 E6 6F .o INC &6F .incremented every game loop counter CC6 20 82 17 .. JSR &1782 .check for space to start game (kill player, end demo), or escape to end game (kill player, end game) CC9 20 B8 18 .. JSR &18B8 .random number to A CCC 20 4B 15 K. JSR &154B .Deal with player movement CCF 20 49 18 I. JSR &1849 .update the stars (unplot 16, move them down, and replot) CD2 20 FA 0D .. JSR &0DFA .if player is not dying, all aliens/bombs/timers are expired, progress to next wave in zone (or next zone) CD5 20 9B 0F .. JSR &0F9B .process 6 aliens CD8 20 CB 18 .. JSR &18CB .process player bullets CDB 20 C2 19 .. JSR &19C2 .process bombs (random chance of bombing + process falling bombs) CDE 20 DF 13 .. JSR &13DF .check alien collisions with player and bullets, then player with bombs CE1 AD 2C 06 .,. LDA &062C .player dying flag - starts off zero has 1 ROR into it if dying CE4 10 DD .. BPL &0CC3 (>= signed) .branch if player is not dying - do main game loop again player is dying CE6 AD 3C 06 .<. LDA &063C .number of spawned aliens? CE9 10 D8 .. BPL &0CC3 (>= signed) .branch if there are some still exploding - do main game loop again player/aliens all exploded CEB AD 40 06 .@. LDA &0640 .number of bombs on the screen? CEE 0D 3F 06 .?. ORA &063F .number of player bullets? CF1 D0 D0 .. BNE &0CC3 .branch if there are bombs or bullets on the screen - do main game loop again ok everything on the screen has exploded/ been removed CF3 20 CC 0D .. JSR &0DCC .if not playing the demo, update the stars, and deal with pause/sound/key/joystick key presses (Play dying tune) CF6 AD 29 06 .). LDA &0629 .lives left CF9 D0 8F .. BNE &0C8A .branch to lose a life (there is at least 1 left) no lives left (game over) CFB 20 C8 16 .. JSR &16C8 .update hiscore digits - copy score to hiscore if greater than... CFE A9 31 .1 LDA #&31 (49) .00110001 D00 85 01 .. STA &01 .sprite dest1 msb D02 20 26 16 &. JSR &1626 .display hiscore D05 20 A5 17 .. JSR &17A5 .If human playing, play tune, display game over, wait a while, remove message D08 20 4A 22 J" JSR &224A .Do Hiscore entry if not demo (and score high enough) D0B 20 17 0D .. JSR &0D17 .show attract screens, waiting for key press - if don't start the game A=0, returns with A = random number 0-7 demo level D0E 48 H PHA .save random demo zone (or zero if human started game) D0F 20 89 1C .. JSR &1C89 .draw zone flags (unplot them) D12 68 h PLA .restore random demo zone (or zero if human started game) D13 A8 . TAY .Zone to Y D14 4C 4C 0C LL. JMP &0C4C .Start game at zone Y show attract screens, waiting for key press - if don't start the game A=0, returns with A = random number 0-7 demo level D17 20 6B 17 k. JSR &176B .Display/remove "GALAFORCE" "by kevin edwards" "superior software" "press space or fire" "to play" messages (plot) D1A A9 00 .. LDA #&00 (0) .00000000 zero D1C 85 6F .o STA &6F .incremented every game loop counter attract screen loop D1E 20 EF 0D .. JSR &0DEF .pause a while, move stars, deal with k/j/q/s/p (used in attract screens) D21 E6 6F .o INC &6F .incremented every game loop counter D23 F0 25 .% BEQ &0D4A .do it 256 times branch if attract screen times out D25 20 C9 17 .. JSR &17C9 .check for space bar or fire button (C set=keyboard clear=joystick button, z clear = neither) D28 D0 F4 .. BNE &0D1E .branch if not pressed space bar or fire button pressed - start game D2A 08 . PHP .save C flag set=keyboard clear=joystick button D2B 20 6B 17 k. JSR &176B .Display/remove "GALAFORCE" "by kevin edwards" "superior software" "press space or fire" "to play" messages (remove) start game from attract screen2 (hiscore table) D2E 20 2A 13 *. JSR &132A .Message 12 Col 3C String Offset 1BFC = K (or J) - displays the input device letter (remove it) D31 28 ( PLP .restore C flag set=keyboard clear=joystick button D32 A9 00 .. LDA #&00 (0) .00000000 D34 69 13 i. ADC #&13 (19) .00010011 A = #&13 joystick #&14 keyboard D36 8D 00 1C ... STA &1C00 .adjust message 12 letter to display ($13 = J, $14 = K) D39 A2 FF .. LDX #&FF (255=-1) .11111111 D3B C9 14 .. CMP #&14 (20) .00010100 D3D F0 01 .. BEQ &0D40 .branch if the keyboard (X=#&ff) D3F E8 . INX .make X zero (joystick input) D40 8A . TXA .A = 0 joystick, =$ff keyboard D41 20 27 13 '. JSR &1327 .set Keyboard/Joystick flag... NEGATIVE=keyboard, and Message 12 Col 3C String Offset 1BFC = K (or J) - displays the input device letter (plot it) D44 A9 00 .. LDA #&00 (0) .00000000 D46 8D 46 06 .F. STA &0646 .playing game flag NEGATIVE means not playing (doing demo!) make it playing the game D49 60 ` RTS .A=0 attract screen time out - do attract screen2 (hiscore table) D4A 20 6B 17 k. JSR &176B .Display/remove "GALAFORCE" "by kevin edwards" "superior software" "press space or fire" "to play" messages (remove it) D4D 20 EB 22 ." JSR &22EB .display the hiscore table (plot it) attract screen2 loop D50 20 EF 0D .. JSR &0DEF .pause a while, move stars, deal with k/j/q/s/p (used in attract screens) D53 E6 6F .o INC &6F .incremented every game loop counter D55 F0 0C .. BEQ &0D63 .do it 256 times branch if attract screen2 times out D57 20 C9 17 .. JSR &17C9 .check for space bar or fire button (C set=keyboard clear=joystick button, z clear = neither) D5A D0 F4 .. BNE &0D50 .branch if not pressed D5C 08 . PHP .save C flag set=keyboard clear=joystick button D5D 20 EB 22 ." JSR &22EB .display the hiscore table (unplot it) D60 4C 2E 0D L.. JMP &0D2E .start game from attract screen2 attract screen2 time out D63 20 EB 22 ." JSR &22EB .display the hiscore table (unplot it) D66 A2 FF .. LDX #&FF (255=-1) .11111111 D68 8E 46 06 .F. STX &0646 .playing game flag NEGATIVE means not playing (doing demo!) D6B 8E 47 06 .G. STX &0647 .demo random movement length counter (decrements while doing demo) =#&ff D6E E8 . INX .X=0 D6F 8E 43 06 .C. STX &0643 .demo tune section counter (make it zero, so it times out immediately, and resets to 7) D72 20 B8 18 .. JSR &18B8 .random number to A D75 29 07 ). AND #&07 (7) .00000111 make 0-7 D77 60 ` RTS . Do player demo movement counters (change L/R direction after random length of time) D78 AD 46 06 .F. LDA &0646 .playing game flag NEGATIVE means not playing (doing demo!) D7B 10 11 .. BPL &0D8E (>= signed) .(RTS) branch if not the demo D7D CE 47 06 .G. DEC &0647 .demo random movement length counter (decrements while doing demo) D80 10 0C .. BPL &0D8E (>= signed) .(RTS) move in same direction a while D82 A5 6C .l LDA &6C .random byte D84 8D 48 06 .H. STA &0648 .demo random movement flags D87 29 0F ). AND #&0F (15) .00001111 in range 0-15 D89 69 0A i. ADC #&0A (10) .00001010 in range 10-25 D8B 8D 47 06 .G. STA &0647 .demo random movement length counter (decrements while doing demo) D8E 60 ` RTS . EVENT ROUTINE D8F C9 04 .. CMP #&04 (4) .00000100 D91 D0 30 .0 BNE &0DC3 .(RTS) end if not VSYNC D93 2C 4C 06 ,L. BIT &064C .paused flag NEGATIVE means not paused D96 10 2B .+ BPL &0DC3 (>= signed) .(RTS) end if game is paused ok its a VSYNC and the game isn't paused D98 8A . TXA . D99 48 H PHA .save X D9A 98 . TYA . D9B 48 H PHA .save Y Lets play the music :) D9C 20 F5 1D .. JSR &1DF5 .play a tune routine? D9F 20 52 1E R. JSR &1E52 .see if tune finished? DA2 D0 1B .. BNE &0DBF .branch if tune not finished (end of event routine) if its finished playing a tune , (update the demo tune section counter) DA4 CE 43 06 .C. DEC &0643 .demo tune section counter DA7 10 05 .. BPL &0DAE (>= signed) .branch if not timed out demo tune section counter timed out DA9 A9 07 .. LDA #&07 (7) .00000111 reset to 7 DAB 8D 43 06 .C. STA &0643 .demo tune section counter not timed out, or reset to 7 (timer runs range 7 down to 0) DAE AE 43 06 .C. LDX &0643 .demo tune section counter DB1 BC C4 0D ... LDY &0DC4,X .lookup the tune section to play DB4 AD 46 06 .F. LDA &0646 .playing game flag NEGATIVE means not playing (doing demo!) DB7 10 06 .. BPL &0DBF (>= signed) .branch if playing game (end of event routine) doing demo... so start next demo tune section DB9 20 9A 1D .. JSR &1D9A .setup to play tune/section Y? DBC 20 F5 1D .. JSR &1DF5 .(do this again?)play a tune routine? end of event routine DBF 68 h PLA . DC0 A8 . TAY .restore Y DC1 68 h PLA . DC2 AA . TAX .restore X DC3 60 ` RTS . demo tune music if made up of the following sections (plays in order end -> start which is really 15 15 2A 2A 31 31 38 38) 00 01 02 03 04 05 06 07 DC4 38 38 31 31 2A 2A 15 15 if not playing the demo, update the stars, and deal with pause/sound/key/joystick key presses (Play dying tune) DCC 2C 46 06 ,F. BIT &0646 .playing game flag NEGATIVE means not playing (doing demo!) DCF 30 15 0. BMI &0DE6 (< signed) .(RTS) human is playing DD1 A0 1C .. LDY #&1C (28) .00011100 DYING TUNE DD3 20 9A 1D .. JSR &1D9A .setup to play tune/section Y? tune loop DD6 20 49 18 I. JSR &1849 .update the stars (unplot 16, move them down, and replot) DD9 20 10 12 .. JSR &1210 .deal with K/J/Q/S/P key presses DDC A2 16 .. LDX #&16 (22) .00010110 DDE 20 07 12 .. JSR &1207 .do a pause with time in X DE1 20 52 1E R. JSR &1E52 .see if tune finished? DE4 D0 F0 .. BNE &0DD6 .branch if tune not finished - play it to the finish DE6 60 ` RTS . 0DE0 ** ** ** ** ** ** ** 13 00 09 00 A0 00 32 ** ** ......2 pause a while, move stars, deal with k/j/q/s/p (used in attract screens) DEF A2 18 .. LDX #&18 (24) .00011000 DF1 20 07 12 .. JSR &1207 .do a pause with time in X DF4 20 49 18 I. JSR &1849 .update the stars (unplot 16, move them down, and replot) DF7 4C 10 12 L.. JMP &1210 .deal with K/J/Q/S/P key presses if player is not dying, all aliens/bombs/timers are expired, progress to next wave in zone (or next zone) DFA AD 2C 06 .,. LDA &062C .player dying flag DFD 10 01 .. BPL &0E00 (>= signed) .branch if player is not dying DFF 60 ` RTS . player is not dying E00 AD 41 06 .A. LDA &0641 .spawn timers running counter? E03 0D 3C 06 .<. ORA &063C .number of spawned aliens? E06 0D 40 06 .@. ORA &0640 .number of bombs on the screen? E09 D0 57 .W BNE &0E62 .(RTS) if still some bombs or aliens on the screen (wait till they're all destroyed) no timers running/no aliens spawned/no bombs left E0B AC 3B 06 .;. LDY &063B .wave number of the current zone E0E D0 10 .. BNE &0E20 .branch if not first in zone (not started a new zone) started a new zone, on first byte of zone data, which is the number of visible aliens E10 B1 0C .. LDA (&0C),Y .first byte of zone data E12 85 99 .. STA &99 .total visible aliens E14 8C 3E 06 .>. STY &063E .current alien processing counter? E17 38 8 SEC . E18 E9 01 .. SBC #&01 (1) .00000001 E1A 85 9A .. STA &9A .Last visible alien offset (always ?&99-1) E1C EE 3B 06 .;. INC &063B .wave number of the current zone++ E1F C8 . INY .goto next byte past first byte of zone data, rest = list of waves (so grab a wave number - negative means all waves in zone done) E20 EE 3B 06 .;. INC &063B .wave number of the current zone++ (points to next wave now) E23 B1 0C .. LDA (&0C),Y .get zone data byte (alien wave number) E25 10 3C .< BPL &0E63 (>= signed) .branch if not the end of the zone (show wave A) negative value means, all alien waves in zone are finished - so goto the next zone E27 20 89 1C .. JSR &1C89 .draw zone flags (remove them) E2A EE 3D 06 .=. INC &063D .current zone number++ E2D A9 00 .. LDA #&00 (0) .00000000 E2F 8D 4B 06 .K. STA &064B .Set Showing entering zone message flag (positive means displaying) E32 20 89 1C .. JSR &1C89 .draw zone flags (plot new ones) check if is demo or human E35 2C 46 06 ,F. BIT &0646 .playing game flag NEGATIVE means not playing (doing demo!) E38 30 10 0. BMI &0E4A (< signed) .branch if doing demo (skip the tune - Entering a new zone, start wave 0 of the new zone) not doing demo (play a tune) if zone mod 16==0 do dum dum tiddly tune, else do wahhh wahhh tune E3A A0 07 .. LDY #&07 (7) .00000111 (wahhhh wahhh tune) E3C AD 3D 06 .=. LDA &063D .current zone number E3F F0 06 .. BEQ &0E47 .branch if zone zero play (wahhhh wahhh tune) only happens if clock the game? E41 29 0F ). AND #&0F (15) .00001111 zone number mod 16 E43 D0 02 .. BNE &0E47 .branch if zone zero (wahhhh wahhh tune) zone mod 16 is zero (do salute tune) E45 A0 23 .# LDY #&23 (35) .00100011 (SALUTE) if zone mod 16 is non zero Y=#&07 (wahhh wahhh tune) else Y=#&23 (SALUTE) E47 20 9A 1D .. JSR &1D9A .setup to play tune/section Y? Entering a new zone, start wave 0 of the new zone E4A 20 1E 17 .. JSR &171E .Display entering zone message (do zone transition) and bonus word / show a while/ delete the messages E4D AD 3D 06 .=. LDA &063D .zone E50 29 0F ). AND #&0F (15) .00001111 mod 16 E52 A8 . TAY .zone mod 16 to Y E53 A2 00 .. LDX #&00 (0) .00000000 E55 8E 3B 06 .;. STX &063B .wave number of the current zone E58 B9 8B 28 ..( LDA &288B,Y .zone data lookup LSB table (16 zones total) E5B 85 0C .. STA &0C .zone data LSB E5D B9 9B 28 ..( LDA &289B,Y .zone data lookup MSB table (16 zones total) E60 85 0D .. STA &0D .wave data MSB E62 60 ` RTS . Show wave A - first check for special case E63 C9 2D .- CMP #&2D (45) .00101101 E65 D0 07 .. BNE &0E6E .branch if not wave #&2d (special case) on wave #&2d special case (the big invaders one - pack of cards) E67 A2 21 .! LDX #&21 (33) .00100001 E69 86 99 .. STX &99 .overwrite the total visible aliens E6B CA . DEX . E6C 86 9A .. STX &9A .Last visible alien offset (always ?&99-1) Start wave A E6E A8 . TAY .Wave number to Y E6F B9 AB 28 ..( LDA &28AB,Y .wave lookup LSB table E72 85 04 .. STA &04 .current alien wave lsb E74 B9 D9 28 ..( LDA &28D9,Y .wave lookup MSB table E77 85 05 .. STA &05 .current alien wave msb E79 A0 00 .. LDY #&00 (0) .00000000 E7B B1 04 .. LDA (&04),Y .first byte of wave E7D 85 06 .. STA &06 .&06 number of spawners in wave to decode E7F C8 . INY .next wave byte (Y=1) Fill wave spawners - Wave spawner loop - find an empty spawner slot E80 A2 00 .. LDX #&00 (0) .00000000 find spawner loop E82 B5 71 .q LDA &71,X .spawn timer running flags? positive = not running E84 10 07 .. BPL &0E8D (>= signed) .branch if a flag is positive, not running (slot empty) E86 E8 . INX . E87 E0 04 .. CPX #&04 (4) .00000100 E89 D0 F7 .. BNE &0E82 .do another spawner loop E8B F0 3C .< BEQ &0EC9 .branch always - run alien spawn timers if not dying (just to stop overflow if buggy) timer not running flags X was positive (slot X empty) E8D B1 04 .. LDA (&04),Y .next wave byte Y=1 (1/8 if positive X coord) E8F 10 04 .. BPL &0E95 (>= signed) . next wave byte was negative (show a copy of wave A mod &7f) E91 29 7F ). AND #&7F (127) .01111111 mod 128 E93 10 CE .. BPL &0E63 (>= signed) .branch always - show copy of wave value mod 128 instead wave byte was positive (its an X coord) E95 C8 . INY .Y=2 offset++ E96 95 75 .u STA &75,X .alien spawn X coords (1/8) E98 B1 04 .. LDA (&04),Y .get next wave byte (2/8 Y coord) E9A C8 . INY .Y=3 offset++ E9B 95 79 .y STA &79,X .alien spawn Y Coords (2/8) E9D B1 04 .. LDA (&04),Y .get next wave byte (3/8 start timer value) E9F C8 . INY .Y=4 offset++ EA0 95 7D .} STA &7D,X .start spawn timer values (3/8) EA2 95 81 .. STA &81,X .spawn timer values EA4 B1 04 .. LDA (&04),Y .get next wave byte (4/8) EA6 C8 . INY .Y=5 offset++ EA7 95 85 .. STA &85,X .aliens spawn in wave counter? (4/8) EA9 B1 04 .. LDA (&04),Y .get next wave byte (5/8) EAB C8 . INY .Y=6 offset++ EAC 95 89 .. STA &89,X .Alien spawn X velocity (5/8) EAE B1 04 .. LDA (&04),Y .get next wave byte (6/8) EB0 C8 . INY .Y=7 offset++ EB1 95 8D .. STA &8D,X .alien spawn Y velocity (6/8) EB3 B1 04 .. LDA (&04),Y .get next wave byte (7/8) EB5 C8 . INY .Y=8 offset++ EB6 95 91 .. STA &91,X .alien spawn type (7/8) EB8 B1 04 .. LDA (&04),Y .get next wave byte (8/8) EBA C8 . INY .Y=9 first offset in next spawner EBB 95 95 .. STA &95,X .alien spawn pattern number (8/8) EBD A9 80 .. LDA #&80 (128=-128) .10000000 set timer running EBF 95 71 .q STA &71,X .spawn timer running flags? positive = not running EC1 EE 41 06 .A. INC &0641 .increment spawn timers running counter EC4 C6 06 .. DEC &06 .number of spawners in wave to decode-- EC6 D0 B8 .. BNE &0E80 .branch if there are any left to decode (Fill Wave spawner loop) EC8 60 ` RTS . run alien spawn timers if not dying.... EC9 AD 2C 06 .,. LDA &062C .player dying flag ECC 10 05 .. BPL &0ED3 (>= signed) .branch if player is not dying if we're dying, just pause a bit (to keep the game at a consistant speed) ECE A2 0C .. LDX #&0C (12) .00001100 ED0 4C 07 12 L.. JMP &1207 .do a pause with time in X player is not dying - spawn an alien? ED3 A2 03 .. LDX #&03 (3) .00000011 decrement 4 spawn timers loop ED5 B5 71 .q LDA &71,X .spawn timer running flags? positive = not running ED7 10 06 .. BPL &0EDF (>= signed) .branch if timer not running? continue processing spawn timers spawn timer X is running ED9 B5 81 .. LDA &81,X .spawn timer X value EDB F0 06 .. BEQ &0EE3 .branch if timer has timed out we only decrement the timer if it's not expired EDD D6 81 .. DEC &81,X .decrement spawn timer X value continue processing spawn timers EDF CA . DEX . EE0 10 F3 .. BPL &0ED5 (>= signed) .if there are still timers to run - do another decrement 4 spawn timers loop EE2 60 ` RTS . Spawn timer X is zero (timed out) EE3 B5 7D .} LDA &7D,X .start spawn timer X value EE5 95 81 .. STA &81,X .reset spawn timer X value EE7 A4 9A .. LDY &9A .Last visible alien offset (always ?&99-1) find empty alien slot loop EE9 B9 00 04 ... LDA &0400,Y .Alien Y behavior flags bit 7 = visible #&01= EEC 10 05 .. BPL &0EF3 (>= signed) .branch if alien Y is not visible EEE 88 . DEY . EEF 10 F8 .. BPL &0EE9 (>= signed) .branch if there are some slots to check - find empty alien slot loop EF1 30 EC 0. BMI &0EDF (< signed) .branch always (no free alien spawn slots) - continue processing spawn timers Alien Y is not visible (spawn one in this slot) EF3 A9 00 .. LDA #&00 (0) .00000000 EF5 99 A0 04 ... STA &04A0,Y .alien Y position in alien pattern (zero it) EF8 99 F0 04 ... STA &04F0,Y .alien repeat move counter EFB A9 80 .. LDA #&80 (128=-128) .10000000 make it alive EFD 99 00 04 ... STA &0400,Y .Alien behavior flags F00 B5 75 .u LDA &75,X .alien spawn X coords F02 99 40 05 .@. STA &0540,Y .alien sprite X coords F05 48 H PHA .push spawn X coord F06 B5 79 .y LDA &79,X .alien spawn Y Coords F08 99 68 05 .h. STA &0568,Y .alien sprite Y coords F0B B5 91 .. LDA &91,X .alien spawn type F0D 99 28 04 .(. STA &0428,Y .alien X sprite type lookup offset value? F10 85 08 .. STA &08 .this alien type (the spawning alien) convert alien sprite type to base type F12 38 8 SEC . F13 E9 0C .. SBC #&0C (12) .00001100 (remove explosions from type - first 6 sprites are explosions) F15 4A J LSR A /2 ./2 to get a real alien base number F16 86 07 .. STX &07 .temp save X (spawn timer number) F18 AA . TAX .real alien base type to X F19 BD 21 15 .!. LDA &1521,X .Base number of hits required to kill alien of type X? F1C 99 C8 04 ... STA &04C8,Y .Current number of hits required to kill this alien F1F A6 07 .. LDX &07 .restore temp saved X F21 B5 95 .. LDA &95,X .alien spawn pattern number F23 99 E0 05 ... STA &05E0,Y .alien spawn pattern number that spawned this alien (the spawner type) F26 29 7F ). AND #&7F (127) .01111111 bits 0-6 (remove extra bit 7) F28 AA . TAX .to X F29 BD 07 29 ..) LDA &2907,X .pattern lookup LSB table F2C 99 50 04 .P. STA &0450,Y .alien pattern LSBs F2F BD 25 29 .%) LDA &2925,X .pattern lookup MSB table F32 99 78 04 .x. STA &0478,Y .alien pattern MSBs F35 68 h PLA .pop spawn X coord F36 AA . TAX .to X F37 20 B8 18 .. JSR &18B8 .random number to A F3A 29 1F ). AND #&1F (31) .00011111 random number 0 - 31 (LHS of screen) F3C E0 4E .N CPX #&4E (78) .01001110 F3E F0 06 .. BEQ &0F46 .branch if spawn X coord is 78 (special case make X random 0-31 position LHS) F40 E0 4F .O CPX #&4F (79) .01001111 F42 D0 05 .. BNE &0F49 .branch if its not 78 or 79 (leave it where it spawned) spawn X coord was 79, so make it spawn randomly 40-71 (C set) (RHS) F44 69 28 i( ADC #&28 (40) .00101000 (make it spawn 40 to the right) F46 99 40 05 .@. STA &0540,Y .new random alien sprite X coord F49 A6 07 .. LDX &07 .restore X (spawn timer number) F4B EE 3C 06 .<. INC &063C .number of spawned aliens++ F4E D6 85 .. DEC &85,X .aliens spawn in wave counter F50 D0 07 .. BNE &0F59 .branch if aliens in wave not exhausted aliens in wave exhausted - stop the spawn counter F52 A9 00 .. LDA #&00 (0) .00000000 F54 95 71 .q STA &71,X .stop spawn timer running flags? positive = not running F56 CE 41 06 .A. DEC &0641 .spawn timers running counter-- move the spawn point (wrapping it onto the screen X) first move the X spawn coord F59 18 . CLC . F5A B5 75 .u LDA &75,X .alien spawn X coords F5C 75 89 u. ADC &89,X .Alien spawn X velocity F5E C9 50 .P CMP #&50 (80) .01010000 F60 90 05 .. BCC &0F67 (< unsigned) .branch if less than 80 F62 E9 50 .P SBC #&50 (80) .01010000 remove 80 (c set) F64 4C 5E 0F L^. JMP &0F5E .re check F67 95 75 .u STA &75,X .alien spawn X coords now move the Y spawn coord F69 18 . CLC . F6A B5 79 .y LDA &79,X .alien spawn Y Coords F6C 75 8D u. ADC &8D,X .alien spawn Y velocity F6E 95 79 .y STA &79,X .alien spawn Y Coords now plot the new alien sprite F70 BE 40 05 .@. LDX &0540,Y .alien sprite X coords F73 B9 68 05 .h. LDA &0568,Y .alien sprite Y coords F76 A8 . TAY .to Y F77 20 7F 0F .. JSR &0F7F .initial plot an alien ?&08 at X,Y (this either plots, or unplots an alien, never both) F7A A6 07 .. LDX &07 .restore X (spawn timer number) F7C 4C DF 0E L.. JMP &0EDF .continue processing spawn timers plot an alien ?&08 at X,Y (this either plots, or unplots an alien, never both) F7F 20 95 12 .. JSR &1295 .calc screen address of X,Y (but make sure X=X mod 80, also Y>=17) otherwise screen address=&c000 F82 85 01 .. STA &01 .sprite dest1 msb F84 86 00 .. STX &00 .sprite dest1 lsb F86 A9 10 .. LDA #&10 (16) .00010000 F88 85 05 .. STA &05 .sprite height F8A A9 C0 .. LDA #&C0 (192=-64) .11000000 dest2 = off the screen! (nothing to unplot) F8C 85 03 .. STA &03 .sprite dest2 msb (make offscreen - unplot position - nothing to unplot) F8E A6 08 .. LDX &08 .sprite number to plot? F90 BD 7A 29 .z) LDA &297A,X .alien sprite data lookup table LSB ->sprite src1 lsb F93 BC 7B 29 .{) LDY &297B,X .alien sprite data lookup table MSB ->sprite src2 msb F96 84 04 .. STY &04 .same MSB in src1 and src2 F98 4C 00 0B L.. JMP &0B00 .Sprite Routine (src1 in (?&04*256)+A->dest in (&00), src2 Y*256+X ->dest in (&02)) process 6 aliens F9B A9 06 .. LDA #&06 (6) .00000110 process 6 aliens F9D 85 0A .. STA &0A .process 6 aliens counter F9F AE 3E 06 .>. LDX &063E .current alien processing counter process an alien loop (one of 6 loop) FA2 BD 00 04 ... LDA &0400,X .Alien X behavior flags FA5 30 1F 0. BMI &0FC6 (< signed) .branch if alien X is visible - process it alien is not visible (just delay as though we were processing one) FA7 20 05 12 .. JSR &1205 .pause for some time (as though displaying a sprite/processing it?) process next alien FAA EE 3E 06 .>. INC &063E .current alien processing counter? FAD AE 3E 06 .>. LDX &063E .current alien processing counter? FB0 E4 99 .. CPX &99 .total visible aliens FB2 D0 0D .. BNE &0FC1 .branch if not at end of aliens list - process another of the 6 aliens processed all aliens for wave - run spawn timers/reset the current alien processing counter FB4 20 C9 0E .. JSR &0EC9 .run alien spawn timers if not dying FB7 20 10 12 .. JSR &1210 .deal with K/J/Q/S/P key presses FBA A2 00 .. LDX #&00 (0) .00000000 FBC 8E 3E 06 .>. STX &063E .reset current alien processing counter? FBF E6 70 .p INC &70 .number of times processed all aliens counter process another of the 6 aliens FC1 C6 0A .. DEC &0A .process 6 aliens counter-- FC3 D0 DD .. BNE &0FA2 .do next alien, if not done 6 FC5 60 ` RTS . Aliens X is visible - process it (A=behavior flags) FC6 4A J LSR A /2 .bit 0 to C exploding flag FC7 90 06 .. BCC &0FCF (< unsigned) .branch if not exploding alien X is exploding - do the explosion animation/kill it FC9 20 89 10 .. JSR &1089 .every other loop - explode alien X animation? (start exploding if not, otherwise animate) FCC 4C AA 0F L.. JMP &0FAA .process next alien alien X not exploding and visible - process it FCF BD F0 04 ... LDA &04F0,X .alien repeat move counter (mostly zero?) FD2 D0 3E .> BNE &1012 .branch if its not timed out Alien X repeat move counter is zero (get a new move) FD4 BD 50 04 .P. LDA &0450,X .alien pattern LSBs FD7 85 06 .. STA &06 .this alien pattern LSB FD9 BD 78 04 .x. LDA &0478,X .alien pattern MSBs FDC 85 07 .. STA &07 .this alien pattern MSB FDE BC A0 04 ... LDY &04A0,X .alien X position in alien pattern (get current index value) FE1 FE A0 04 ... INC &04A0,X .alien X position in alien pattern++ (skip current value) FE4 B1 06 .. LDA (&06),Y .get pattern byte FE6 30 03 0. BMI &0FEB (< signed) .branch if a negative pattern (value in A) positive pattern byte = do action routine A (not repeated - 4f0 is still zero) jump 0 = jump to position in pattern, next byte = new pattern index jump 2 = jump to start of new pattern, next byte = pattern number jump 4 = spawn alien, next byte = spawned alien pattern number (random QUAZAR or ENJAR) jump 6 = alien starts to die jump 8 = 1 in 4 chance of dropping a bomb jump a = new pattern loop start, next byte = loop counter, loop starts after the counter jump c = do loop (while counter>=0), jump back to loop start jump e = move sprite back to top (y=72) left (x=0) for pack of cards pattern FE8 4C 76 10 Lv. JMP &1076 .jump to routine in table at &10EC, routine offset A,Y points to offset of A negative pattern byte (new repeated move) FEB 29 7F ). AND #&7F (127) .01111111 get lower 7 bits (make positive) FED 9D F0 04 ... STA &04F0,X .new alien repeat move counter value FF0 C8 . INY .next pattern pointer++ FF1 FE A0 04 ... INC &04A0,X .alien X position in alien pattern++ (skip next byte after the negative byte/counter value) FF4 B1 06 .. LDA (&06),Y .get next pattern byte into A FF6 BC E0 05 ... LDY &05E0,X .alien spawn pattern number that spawned this alien (the spawner type) FF9 10 14 .. BPL &100F (>= signed) .branch if positive (don't flip any bits) Y=alien spawn pattern number that spawned this alien (the spawner type) (with extra bit from the spawners) was negative (means reverse the move X wards) FFB C9 30 .0 CMP #&30 (48) .00110000 is new pattern >=48? FFD B0 0E .. BCS &100D (>= unsigned) .branch if >=48, just flip bottom 3 bits (values 0x30 - 0x3f) pattern byte <48 (adjust then flip bottom 3 bits) - REVERSE THE RELATIVE X/Y COORDS (kind of) FFF A8 . TAY .save pattern byte in Y 1000 29 F8 ). AND #&F8 (248=-8) .11111000 top 5 bits 1002 85 04 .. STA &04 .save top 5 in &04 1004 98 . TYA .restore pattern byte from Y 1005 29 07 ). AND #&07 (7) .00000111 bottom 3 bits 1007 A8 . TAY .to Y 1008 B9 E4 10 ... LDA &10E4,Y .10E4 values = 07 04 05 06 00 01 02 03 transform bottom 3 bits with lookup 100B 05 04 .. ORA &04 .restore top 5 bits for reversed values ($0-$2f) bottom 3 bits, otherwise the bottom 3 bits reversed are just xor 7 0 becomes 7 xor 7 = 0 1 becomes 4 xor 7 = 3 2 becomes 5 xor 7 = 2 3 becomes 6 xor 7 = 1 4 becomes 0 xor 7 = 7 5 becomes 1 xor 7 = 6 6 becomes 2 xor 7 = 5 7 becomes 3 xor 7 = 4 100D 49 07 I. EOR #&07 (7) .00000111 reverse bottom 3 bits 100F 9D 18 05 ... STA &0518,X .alien move action (to be repeated 4f0 times) alien repeat move counter still running ($4f0) or new value applied to move action... ($518) or last pattern number positive Get old sprite position 1012 BD 40 05 .@. LDA &0540,X .alien sprite X coords 1015 BC 68 05 .h. LDY &0568,X .alien sprite Y coords 1018 AA . TAX .X coord to X 1019 20 95 12 .. JSR &1295 .calc screen address of X,Y (but make sure X=X mod 80, also Y>=17) otherwise screen address=&c000 101C 85 01 .. STA &01 .sprite dest1 msb (old position) 101E 86 00 .. STX &00 .sprite dest1 lsb (old position) 1020 AE 3E 06 .>. LDX &063E .current alien processing counter? 1023 DE F0 04 ... DEC &04F0,X .decrement alien repeat move counter 1026 BC 18 05 ... LDY &0518,X .alien move action 1029 C0 40 .@ CPY #&40 (64) .01000000 102B 90 06 .. BCC &1033 (< unsigned) . alien action byte >=64 sprite stays where it is (this happens on the later zones 13+) 102D 20 05 12 .. JSR &1205 .pause for some time (as though displaying a sprite?) 1030 4C AA 0F L.. JMP &0FAA .process next alien alien action byte <64 (64 actions adjust X&Y according to tables at 132f and 1367) Adjust X Coord (wrap it on screen) 1033 18 . CLC . 1034 BD 40 05 .@. LDA &0540,X .alien sprite X coords 1037 79 2F 13 y/. ADC &132F,Y .alien pattern relative move X 103A C9 50 .P CMP #&50 (80) .01010000 see if >=80 103C 90 05 .. BCC &1043 (< unsigned) .branch if in range 0-79 103E E9 50 .P SBC #&50 (80) .01010000 reduce by 80 (C is set) 1040 4C 3A 10 L:. JMP &103A .check again if its too big alien sprite X coord <80 now 1043 9D 40 05 .@. STA &0540,X .alien sprite X coords MOD 80 Adjust Y Coord 1046 18 . CLC . 1047 BD 68 05 .h. LDA &0568,X .alien sprite Y coords 104A 79 67 13 yg. ADC &1367,Y .alien patter relative move Y 104D 9D 68 05 .h. STA &0568,X .alien sprite Y coords Now remove old sprite and plot new position 1050 A8 . TAY .Y coord to Y 1051 BD 40 05 .@. LDA &0540,X .alien sprite X coords remove old sprite and plot new position (A=new x coord, Y=new y coord) 1054 AA . TAX .X coord to X 1055 20 95 12 .. JSR &1295 .calc screen address of X,Y (but make sure X=X mod 80, also Y>=17) otherwise screen address=&c000 1058 85 03 .. STA &03 .sprite dest2 msb 105A 86 02 .. STX &02 .sprite dest2 lsb 105C A9 10 .. LDA #&10 (16) .00010000 105E 85 05 .. STA &05 .sprite height 1060 AE 3E 06 .>. LDX &063E .current alien processing counter 1063 BC 28 04 .(. LDY &0428,X .alien X sprite type lookup offset value 1066 BE 7A 29 .z) LDX &297A,Y .alien sprite data lookup table LSB ->sprite src2 lsb 1069 B9 7B 29 .{) LDA &297B,Y .alien sprite data lookup table MSB ->sprite src1 msb 106C 85 04 .. STA &04 .sprite src1 msb 106E A8 . TAY .sprite src2 msb=same as src1 msb 106F 8A . TXA .sprite src1 lsb=same as src2 lsb 1070 20 00 0B .. JSR &0B00 .Sprite Routine (src1 in (?&04*256)+A->dest in (&00), src2 Y*256+X ->dest in (&02)) 1073 4C AA 0F L.. JMP &0FAA .process next alien jump to alien movement routine in table at &10EC, routine offset A,Y points to offset of A 1076 C8 . INY . 1077 84 09 .. STY &09 .save Y value 1079 A8 . TAY .offset from A to Y 107A B9 EC 10 ... LDA &10EC,Y .jump table LSB 107D 85 04 .. STA &04 . 107F B9 ED 10 ... LDA &10ED,Y .jump table MSB 1082 85 05 .. STA &05 .sprite height 1084 A4 09 .. LDY &09 .restore Y 1086 6C 04 00 l.. JMP (&0004) .Jump to routine every other loop thru all aliens - explode alien X animation? (start exploding if not, otherwise animate) 1089 A5 70 .p LDA &70 .number of times processed all aliens counter 108B 29 01 ). AND #&01 (1) .00000001 108D D0 54 .T BNE &10E3 .(RTS) every other time we process all the aliens, we exploding them 108F BD 40 05 .@. LDA &0540,X .alien sprite X coords 1092 BC 68 05 .h. LDY &0568,X .alien sprite Y coords 1095 AA . TAX . 1096 20 95 12 .. JSR &1295 .calc screen address of X,Y (but make sure X=X mod 80, also Y>=17) otherwise screen address=&c000 1099 85 01 .. STA &01 .sprite dest1 msb 109B 86 00 .. STX &00 .sprite dest1 lsb 109D 85 03 .. STA &03 .sprite dest2 msb 109F 86 02 .. STX &02 .sprite dest2 lsb 10A1 A9 10 .. LDA #&10 (16) .00010000 10A3 85 05 .. STA &05 .sprite height 10A5 AE 3E 06 .>. LDX &063E .current alien processing counter 10A8 BC 28 04 .(. LDY &0428,X .alien X sprite type lookup offset value (old sprite frame) 10AB B9 7B 29 .{) LDA &297B,Y .alien sprite data lookup table MSB ->sprite src1 msb 10AE 85 04 .. STA &04 . 10B0 B9 7A 29 .z) LDA &297A,Y .alien sprite data lookup table LSB ->sprite src1 lsb 10B3 85 08 .. STA &08 .sprite number to plot? 10B5 C0 0C .. CPY #&0C (12) .00001100 was the old sprite frame, an explosion frame? 10B7 90 08 .. BCC &10C1 (< unsigned) .sprite in exploding range - animate it (first 6 sprites are explosion frames) Old sprite frame wasn't an explosion - so make sprite first frame of explosion 10B9 A9 00 .. LDA #&00 (0) .00000000 (first frame of explosion) 10BB 9D 28 04 .(. STA &0428,X .alien X sprite type lookup offset value? 10BE A8 . TAY .Y=0 10BF F0 16 .. BEQ &10D7 .branch always animate it - point to next sprite offset in the table 10C1 C8 . INY .offset +1 (skip table LSB) 10C2 C8 . INY .offset +2 (skip table MSB) 10C3 98 . TYA . 10C4 9D 28 04 .(. STA &0428,X .alien X sprite lookup offset value? 10C7 C0 0C .. CPY #&0C (12) .00001100 has it finished exploding? 10C9 90 0C .. BCC &10D7 (< unsigned) .branch if next frame is an explosion sprite finished exploding - make it unplotting the sprite only/make the alien invisible 10CB A9 C0 .. LDA #&C0 (192=-64) .11000000 10CD 85 03 .. STA &03 .sprite dest2 msb (make offscreen - unplot position - nothing to unplot) 10CF A9 00 .. LDA #&00 (0) .00000000 10D1 9D 00 04 ... STA &0400,X .Alien X behavior flags (make sprite invisible) 10D4 CE 3C 06 .<. DEC &063C .number of spawned aliens-- remove old explosion and plot new (if applicable) 10D7 BE 7A 29 .z) LDX &297A,Y .alien sprite data lookup table LSB ->sprite src2 lsb 10DA B9 7B 29 .{) LDA &297B,Y .alien sprite data lookup table MSB -> 10DD A8 . TAY .sprite src2 msb 10DE A5 08 .. LDA &08 .sprite src1 lsb 10E0 4C 00 0B L.. JMP &0B00 .Sprite Routine (src1 in (?&04*256)+A->dest in (&00), src2 Y*256+X ->dest in (&02)) 10E3 60 ` RTS . lookup values to reverse relative movements 10E4 07 04 05 06 00 01 02 03 ........ 10EC 10FC jump table routine A=&00 = jump to position in pattern, next byte = new pattern index 10EE 1107 jump table routine A=&02 = jump to start of new pattern, next byte = pattern number 10F0 1121 jump table routine A=&04 = spawn alien, next byte = spawned alien pattern number (random QUAZAR or ENJAR) 10F2 118D jump table routine A=&06 = alien starts to die 10F4 1198 jump table routine A=&08 = 1 in 4 chance of dropping a bomb 10F6 11A8 jump table routine A=&0A = new pattern loop start, next byte = loop counter, loop starts after the counter 10F8 11B8 jump table routine A=&0C = do loop (while counter>=0), jump back to loop start 10FA 11C6 jump table routine A=&0E = move sprite back to top (y=72) left (x=0) for pack of cards pattern alien movement jump table 10EC FC 10 07 11 .... 10F0 21 11 8D 11 98 11 A8 11 B8 11 C6 11 ** ** ** ** !............ alien movement jump table routine A=&00 (just use next byte as an new pattern index) 10FC FE A0 04 ... INC &04a0,X .alien X position in alien pattern++ (skip byte after the zero - has extra data byte) 10FF B1 06 .. LDA (&06),Y .byte after the zero 1101 9D A0 04 ... STA &04A0,X .alien X position in alien pattern 1104 4C CF 0F L.. JMP &0FCF .alien X not exploding and visible - process it alien movement jump table routine A=&02 (use next byte as another pattern to jump to) 1107 FE A0 04 ... INC &04A0,X .alien X position in alien pattern++ (skip byte after the 2 - has extra data byte) 110A B1 06 .. LDA (&06),Y .byte after the 2 110C A8 . TAY .to Y 110D B9 07 29 ..) LDA &2907,Y .pattern lookup LSB table 1110 9D 50 04 .P. STA &0450,X .alien pattern LSBs 1113 B9 25 29 .%) LDA &2925,Y .pattern lookup MSB table 1116 9D 78 04 .x. STA &0478,X .alien pattern MSBs 1119 A9 00 .. LDA #&00 (0) .00000000 reset 111B 9D A0 04 ... STA &04A0,X .alien X position in alien pattern 111E 4C CF 0F L.. JMP &0FCF .alien X not exploding and visible - process it alien movement jump table routine A=&04 (spawns an alien random type #c or #e - at position of the other) 1121 FE A0 04 ... INC &04A0,X .alien X position in alien pattern++ (skip byte after the 4 - has extra data byte) 1124 B1 06 .. LDA (&06),Y .byte after the 4 1126 85 04 .. STA &04 .save next byte (pattern number to apply to spawned sprite) find a free slot Y 1128 A4 9A .. LDY &9A .Last visible alien offset (always ?&99-1) 112A B9 00 04 ... LDA &0400,Y .Alien Y behavior flags 112D 10 05 .. BPL &1134 (>= signed) .branch if sprite is invisible 112F 88 . DEY . 1130 10 F8 .. BPL &112A (>= signed) .check for another slot 1132 30 56 0V BMI &118A (< signed) .(JMP &0FAA) branch always...process next alien at free slot Y - spawn one (from alien X) 1134 A9 80 .. LDA #&80 (128=-128) .10000000 1136 99 00 04 ... STA &0400,Y .Alien Y behavior flags (make sprite visible) 1139 0A . ASL A *2 .A=0 113A 99 F0 04 ... STA &04F0,Y .blank alien repeat move counter 113D 99 A0 04 ... STA &04A0,Y .blank alien Y's position in alien pattern++ 1140 20 B8 18 .. JSR &18B8 .random number to A 1143 29 02 ). AND #&02 (2) .00000010 random number 0 or 2 now 1145 85 05 .. STA &05 .temp store random type 1147 18 . CLC . 1148 69 0C i. ADC #&0C (12) .00001100 adjust lookup type to #&0c or #&0e types spawned (QUAZAR or ENJAR) 114A 99 28 04 .(. STA &0428,Y .alien Y sprite lookup offset value 114D 85 08 .. STA &08 .sprite number to plot 114F BD E0 05 ... LDA &05E0,X .alien spawn pattern number that spawned this alien (the spawner type) 1152 99 E0 05 ... STA &05E0,Y .duplicate alien spawn pattern number that spawned this alien (the spawner type) 1155 BD 40 05 .@. LDA &0540,X .alien sprite X coords 1158 48 H PHA .save X coord 1159 99 40 05 .@. STA &0540,Y .duplicate alien sprite X coords (spawn at same X coord) 115C BD 68 05 .h. LDA &0568,X .alien sprite Y coords 115F 69 08 i. ADC #&08 (8) .00001000 +8 1161 99 68 05 .h. STA &0568,Y .copy alien sprite Y coords (spawn at same Y coord, slightly down +8) 1164 48 H PHA .save Y coord 1165 A6 04 .. LDX &04 .restore pattern to apply to spawned sprite 1167 BD 07 29 ..) LDA &2907,X .pattern lookup LSB table 116A 99 50 04 .P. STA &0450,Y .alien pattern LSBs 116D BD 25 29 .%) LDA &2925,X .pattern lookup MSB table 1170 99 78 04 .x. STA &0478,Y .alien pattern MSBs 1173 A5 05 .. LDA &05 .temp store of random type (0 or 2) 1175 4A J LSR A /2 .now (0 or 1) 1176 AA . TAX .to X (QUAZAR or ENJAR) 1177 BD 21 15 .!. LDA &1521,X .Base number of hits required to kill alien of type X? 117A 99 C8 04 ... STA &04C8,Y .Current number of hits required to kill this alien 117D 68 h PLA .Y coord 117E A8 . TAY .to Y 117F 68 h PLA .X coord 1180 AA . TAX .to X 1181 EE 3C 06 .<. INC &063C .number of spawned aliens++ 1184 20 7F 0F .. JSR &0F7F .plot an alien ?&08 at X,Y first plot 1187 AE 3E 06 .>. LDX &063E .current alien processing counter 118A 4C AA 0F L.. JMP &0FAA .process next alien alien movement jump table routine A=&06 (start alien exploding) 118D BD 00 04 ... LDA &0400,X .Alien X behavior flags 1190 09 01 .. ORA #&01 (1) .00000001 start alien exploding 1192 9D 00 04 ... STA &0400,X . 1195 4C AA 0F L.. JMP &0FAA .process next alien alien movement jump table routine A=&08 (1 in 4 chance of dropping a bomb) 1198 20 B8 18 .. JSR &18B8 .random number to A 119B 29 03 ). AND #&03 (3) .00000011 119D D0 06 .. BNE &11A5 .(JMP &0FCF) alien X not exploding and visible - process it 119F 20 7B 1A {. JSR &1A7B .make alien X drop a bomb if slot free and zone>=3 11A2 AE 3E 06 .>. LDX &063E .current alien processing counter? 11A5 4C CF 0F L.. JMP &0FCF .alien X not exploding and visible - process it alien movement jump table routine A=&0A (store alien pattern loop counter/destination offset) 11A8 FE A0 04 ... INC &04A0,X .alien X position in alien pattern++ (skip the byte after the $a - has extra data byte) 11AB B1 06 .. LDA (&06),Y .byte after the $a 11AD 9D 90 05 ... STA &0590,X .alien pattern loop counter 11B0 C8 . INY . 11B1 98 . TYA .offset the first byte after loop counter 11B2 9D B8 05 ... STA &05B8,X .alien pattern loop start index value 11B5 4C CF 0F L.. JMP &0FCF .alien X not exploding and visible - process it alien movement jump table routine A=&0C (do pattern loop until expired) 11B8 DE 90 05 ... DEC &0590,X .decrement alien pattern loop counter 11BB 30 06 0. BMI &11C3 (< signed) .branch if timed out (JMP &0FCF) alien X not exploding and visible - process it counter not expired so go back and do loop again 11BD BD B8 05 ... LDA &05B8,X .restore alien pattern loop start index value 11C0 9D A0 04 ... STA &04A0,X .alien X position in alien pattern 11C3 4C CF 0F L.. JMP &0FCF .alien X not exploding and visible - process it alien movement jump table routine A=&0E (sprite moves to middle of LHS - pack of cards behaviour? - to move back to top left hand side) 11C6 BD 40 05 .@. LDA &0540,X .alien sprite X coords 11C9 BC 68 05 .h. LDY &0568,X .alien sprite Y coords 11CC AA . TAX .X to X 11CD 20 95 12 .. JSR &1295 .calc screen address of X,Y (but make sure X=X mod 80, also Y>=17) otherwise screen address=&c000 11D0 85 01 .. STA &01 .sprite dest1 msb 11D2 86 00 .. STX &00 .sprite dest1 lsb 11D4 AE 3E 06 .>. LDX &063E .current alien processing counter? 11D7 A9 48 .H LDA #&48 (72) .01001000 11D9 9D 68 05 .h. STA &0568,X .alien sprite Y coords = 72 11DC A8 . TAY . 11DD A9 00 .. LDA #&00 (0) .00000000 11DF 9D 40 05 .@. STA &0540,X .alien sprite X coords = 0 11E2 4C 54 10 LT. JMP &1054 .remove old sprite and plot new position (A=x coord, Y=y coord) ADVAL X positive check 11E5 A9 80 .. LDA #&80 (128=-128) .10000000 11E7 20 F4 FF .. JSR &FFF4 .OSBYTE 11EA C0 C0 .. CPY #&C0 (192=-64) .11000000 11EC 60 ` RTS . ADVAL X negative check 11ED A9 80 .. LDA #&80 (128=-128) .10000000 11EF 20 F4 FF .. JSR &FFF4 .OSBYTE 11F2 C0 40 .@ CPY #&40 (64) .01000000 11F4 6A j ROR A . 11F5 49 80 I. EOR #&80 (128=-128) .10000000 11F7 2A * ROL A . 11F8 60 ` RTS . check for P key pressed 11F9 A2 C8 .. LDX #&C8 (200=-56) .11001000 P key do inkey X, Z/C set = pressed 11FB A9 81 .. LDA #&81 (129=-127) .10000001 11FD A0 FF .. LDY #&FF (255=-1) .11111111 11FF 20 F4 FF .. JSR &FFF4 .OSBYTE 1202 C0 FF .. CPY #&FF (255=-1) .11111111 1204 60 ` RTS . pause for some time (as though displaying a sprite?) 1205 A2 03 .. LDX #&03 (3) .00000011 do a pause with time in X 1207 A0 00 .. LDY #&00 (0) .00000000 1209 88 . DEY . 120A D0 FD .. BNE &1209 .pause inner loop 120C CA . DEX . 120D D0 F8 .. BNE &1207 .pause outer loop 120F 60 ` RTS . deal with K/J/Q/S/P key presses 1210 20 DD 12 .. JSR &12DD .check for joystick/keyboard/sound on toggle 1213 20 F9 11 .. JSR &11F9 .check for P key pressed 1216 D0 F7 .. BNE &120F .(RTS) 1218 18 . CLC . 1219 6E 4C 06 nL. ROR &064C .paused flag NEGATIVE means not paused -> make positive, paused 121C A9 0F .. LDA #&0F (15) .00001111 121E A2 00 .. LDX #&00 (0) .00000000 1220 20 F4 FF .. JSR &FFF4 .OSBYTE 1223 20 F9 11 .. JSR &11F9 .check for P key pressed 1226 F0 FB .. BEQ &1223 .wait till P released 1228 A0 00 .. LDY #&00 (0) .Message 00 Col 3C String Offset 1B81 = "P" at $7FE8 (57,200) 122A 20 E1 1A .. JSR &1AE1 .print/remove Message Y (at fixed position) 122D 20 F9 11 .. JSR &11F9 .check for P key pressed 1230 D0 FB .. BNE &122D .wait till P pressed again 1232 20 F9 11 .. JSR &11F9 .check for P key pressed 1235 F0 FB .. BEQ &1232 .wait till P released again 1237 38 8 SEC .unpause the game 1238 6E 4C 06 nL. ROR &064C .paused flag NEGATIVE means not paused -> make negative not paused 123B A0 00 .. LDY #&00 (0) .Message 00 Col 3C String Offset 1B81 = "P" at $7FE8 (57,200) 123D 4C E1 1A L.. JMP &1AE1 .print/remove Message Y (at fixed position) initialise variables (dying flag/spawn/alien counters/bullets/bombs etc/reset player position/init random seed) 1240 A9 00 .. LDA #&00 (0) .00000000 1242 8D 2C 06 .,. STA &062C .player dying flag (not dying) 1245 8D 3C 06 .<. STA &063C .number of spawned aliens? 1248 8D 3E 06 .>. STA &063E .current alien processing counter? 124B 8D 3F 06 .?. STA &063F .number of player bullets? 124E 8D 40 06 .@. STA &0640 .number of bombs on the screen? 1251 8D 42 06 .B. STA &0642 .bullet auto firing counter 1254 8D 41 06 .A. STA &0641 .spawn timers running counter? 1257 A0 27 .' LDY #&27 (39) .00100111 1259 99 00 04 ... STA &0400,Y .Alien X behavior flags (make sprite invisible) 125C 88 . DEY . 125D 10 FA .. BPL &1259 (>= signed) . 125F A2 03 .. LDX #&03 (3) .00000011 1261 95 71 .q STA &71,X .stop all spawn timer running flags? positive = not running 1263 CA . DEX . 1264 10 FB .. BPL &1261 (>= signed) . 1266 A0 02 .. LDY #&02 (2) .00000010 clear bullet slots 1268 99 0E 06 ... STA &060E,Y .bullet slot flags (3) 60e/60f/610 (negative means slot used) 126B 88 . DEY . 126C 10 FA .. BPL &1268 (>= signed) . 126E A0 05 .. LDY #&05 (5) .00000101 clear all bomb slots 1270 99 1D 06 ... STA &061D,Y .bomb alive flags (0=no bomb,$ff=bomb) 1273 88 . DEY . 1274 10 FA .. BPL &1270 (>= signed) . 1276 A9 26 .& LDA #&26 (38) .00100110 1278 8D 2A 06 .*. STA &062A .player X pos 127B A9 E3 .. LDA #&E3 (227=-29) .11100011 127D 8D 2B 06 .+. STA &062B .player Y pos reset random seeds 1280 AD 44 FE .D. LDA &FE44 .6522 System VIA reg 4 T1C-L 1283 09 01 .. ORA #&01 (1) .00000001 1285 85 6B .k STA &6B .random byte seed 1287 AD 40 02 .@. LDA &0240 .OSBYTE &b0 value CFS timeout counter 128A 09 01 .. ORA #&01 (1) .00000001 128C 85 6C .l STA &6C .random byte seed 128E A5 FC .. LDA &FC .interrupt Acc save register 1290 09 01 .. ORA #&01 (1) .00000001 1292 85 6D .m STA &6D .random seed 1294 60 ` RTS . calc screen address of X,Y (but make sure X=X mod 80, also Y>=17) otherwise screen address=&c000 1295 8A . TXA . make sure X=X MOD 80 1296 C9 50 .P CMP #&50 (80) .01010000 1298 90 05 .. BCC &129F (< unsigned) . 129A E9 50 .P SBC #&50 (80) .01010000 129C 4C 96 12 L.. JMP &1296 . 129F AA . TAX . 12A0 C0 17 .. CPY #&17 (23) .00010111 12A2 B0 03 .. BCS &12A7 (>= unsigned) . 12A4 A9 C0 .. LDA #&C0 (192=-64) .11000000 make sure Y>=23 otherwise make Address =&c000 12A6 60 ` RTS . calc X,Y into screen coords 12A7 A9 00 .. LDA #&00 (0) .00000000 12A9 85 05 .. STA &05 . 12AB 98 . TYA . 12AC 29 07 ). AND #&07 (7) .00000111 12AE 85 04 .. STA &04 . 12B0 98 . TYA . 12B1 4A J LSR A /2 . 12B2 4A J LSR A /2 . 12B3 4A J LSR A /2 . 12B4 A8 . TAY . 12B5 8A . TXA . 12B6 0A . ASL A *2 . 12B7 26 05 &. ROL &05 . 12B9 0A . ASL A *2 . 12BA 26 05 &. ROL &05 . 12BC 0A . ASL A *2 . 12BD 26 05 &. ROL &05 . 12BF 05 04 .. ORA &04 . 12C1 79 9F 13 y.. ADC &139F,Y .screen address lookup lsb 12C4 AA . TAX . 12C5 A5 05 .. LDA &05 . 12C7 79 BF 13 y.. ADC &13BF,Y .screen address look up msb 12CA 60 ` RTS . Screen address lookup table Offset 00 Address 3000 Offset 01 Address 3280 Offset 02 Address 3500 Offset 03 Address 3780 Offset 04 Address 3A00 Offset 05 Address 3C80 Offset 06 Address 3F00 Offset 07 Address 4180 Offset 08 Address 4400 Offset 09 Address 4680 Offset 0A Address 4900 Offset 0B Address 4B80 Offset 0C Address 4E00 Offset 0D Address 5080 Offset 0E Address 5300 Offset 0F Address 5580 Offset 10 Address 5800 Offset 11 Address 5A80 Offset 12 Address 5D00 Offset 13 Address 5F80 Offset 14 Address 6200 Offset 15 Address 6480 Offset 16 Address 6700 Offset 17 Address 6980 Offset 18 Address 6C00 Offset 19 Address 6E80 Offset 1A Address 7100 Offset 1B Address 7380 Offset 1C Address 7600 Offset 1D Address 7880 Offset 1E Address 7B00 Offset 1F Address 7D80 work out screen address of player sprite into (&00) and set the sprite height 12CB AE 2A 06 .*. LDX &062A .player X pos 12CE AC 2B 06 .+. LDY &062B .player Y pos 12D1 20 95 12 .. JSR &1295 .calc screen address of X,Y (but make sure X=X mod 80, also Y>=17) otherwise screen address=&c000 12D4 86 00 .. STX &00 .sprite dest1 lsb 12D6 85 01 .. STA &01 .sprite dest1 msb 12D8 A0 10 .. LDY #&10 (16) .00010000 12DA 84 05 .. STY &05 .sprite height 12DC 60 ` RTS . check for joystick/keyboard/sound on toggle 12DD EE 49 06 .I. INC &0649 .counter for checking for joystick/keyboard toggle 12E0 AD 49 06 .I. LDA &0649 .counter for checking for joystick/keyboard toggle 12E3 29 0F ). AND #&0F (15) .00001111 12E5 D0 F5 .. BNE &12DC .(RTS) 12E7 20 10 13 .. JSR &1310 .toggle keyboard/joystick check 12EA A2 AE .. LDX #&AE (174=-82) .10101110 S key 12EC 20 FB 11 .. JSR &11FB .do inkey X, Z/C set = pressed 12EF D0 EB .. BNE &12DC .(RTS) branch if not S pressed 12F1 20 0B 13 .. JSR &130B .print Message 10 Col 03 String Offset 1BF7 = "S" at $7FD0 (54,200) 12F4 AD FB 1B ... LDA &1BFB . 12F7 49 06 I. EOR #&06 (6) .00000110 12F9 8D FB 1B ... STA &1BFB . 12FC AD 44 06 .D. LDA &0644 .sound is on flag ($80=on 0=off) 12FF 49 80 I. EOR #&80 (128=-128) .toggle between on and off 1301 8D 44 06 .D. STA &0644 .sound is on flag ($80=on 0=off) 1304 A9 0F .. LDA #&0F (15) .00001111 1306 A2 00 .. LDX #&00 (0) .00000000 1308 20 F4 FF .. JSR &FFF4 .OSBYTE print message #&10 at fixed point (S for sound on/off) 2nd plot removes it 130B A0 10 .. LDY #&10 (16) .Message 10 Col 03 String Offset 1BF7 = "S" at $7FD0 (54,200) 130D 4C E1 1A L.. JMP &1AE1 .print/remove Message Y (at fixed position) toggle keyboard/joystick 1310 A2 B9 .. LDX #&B9 (185=-71) .10111001 K Key 1312 20 FB 11 .. JSR &11FB .do inkey X, Z/C set = pressed 1315 D0 C5 .. BNE &12DC .(RTS) if not pressed 1317 20 2A 13 *. JSR &132A .Message 12 Col 3C String Offset 1BFC = K (or J) - displays the input device letter (unplot) 131A AD 00 1C ... LDA &1C00 .message 12 letter to display ($13 = J, $14 = K) 131D 49 07 I. EOR #&07 (7) .00000111 toggle $13 to $14 or vice-versa 131F 8D 00 1C ... STA &1C00 .message 12 letter to display ($13 = J, $14 = K) 1322 AD 45 06 .E. LDA &0645 .Keyboard/Joystick flag... NEGATIVE=keyboard 1325 49 80 I. EOR #&80 (128=-128) .10000000 1327 8D 45 06 .E. STA &0645 .Keyboard/Joystick flag... NEGATIVE=keyboard print message #&12 at fixed position (K for keyboard on/off) 2nd plot removes it 132A A0 12 .. LDY #&12 (18) .Message 12 Col 3C String Offset 1BFC = K (or J) - displays the input device letter (replot) 132C 4C E1 1A L.. JMP &1AE1 .print/remove Message Y (at fixed position) Pattern Adjust relative X 1320 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 00 . 1330 01 00 FF 01 01 FF FF 00 02 00 FE 02 02 FE FE 00 ................ 1340 03 00 FD 03 03 FD FD 00 04 00 FC 04 04 FC FC 00 ................ 1350 05 00 FB 05 05 FB FB 00 06 00 FA 06 06 FA FA 02 ................ 1360 02 FE FE 02 02 FE FE ....... Pattern Adjust relative Y 1367 FC 00 04 00 FC 04 04 FC F8 ......... 1370 00 08 00 F8 08 08 F8 F4 00 0C 00 F4 0C 0C F4 F0 ................ 1380 00 10 00 F0 10 10 F0 EC 00 14 00 EC 14 14 EC E8 ................ 1390 00 18 00 E8 18 18 E8 F0 04 10 FC FC 10 04 F0 Pattern Adjustment table 00 ( 0) Move Relative X = 00 Y = FC ( 0, -4) opposite = 0 toggle bit 1 = 2? 01 ( 1) Move Relative X = 01 Y = 00 ( 1, 0) opposite = 3 toggle bit 1 = 2? 02 ( 2) Move Relative X = 00 Y = 04 ( 0, 4) opposite = 2 toggle bit 1 = 2? 03 ( 3) Move Relative X = FF Y = 00 (-1, 0) opposite = 1 toggle bit 1 = 2? 04 ( 4) Move Relative X = 01 Y = FC ( 1, -4) opposite = 6 toggle bit 1 = 2? 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) opposite = 7 toggle bit 1 = 2? 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) opposite = 4 toggle bit 1 = 2? 07 ( 7) Move Relative X = FF Y = FC (-1, -4) opposite = 5 toggle bit 1 = 2? 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) 0B (11) Move Relative X = FE Y = 00 (-2, 0) 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) 0E (14) Move Relative X = FE Y = 08 (-2, 8) 0F (15) Move Relative X = FE Y = F8 (-2, -8) 10 (16) Move Relative X = 00 Y = F4 ( 0,-12) 11 (17) Move Relative X = 03 Y = 00 ( 3, 0) 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) 13 (19) Move Relative X = FD Y = 00 (-3, 0) 14 (20) Move Relative X = 03 Y = F4 ( 3,-12) 15 (21) Move Relative X = 03 Y = 0C ( 3, 12) 16 (22) Move Relative X = FD Y = 0C (-3, 12) 17 (23) Move Relative X = FD Y = F4 (-3,-12) 18 (24) Move Relative X = 00 Y = F0 ( 0,-16) 19 (25) Move Relative X = 04 Y = 00 ( 4, 0) 1A (26) Move Relative X = 00 Y = 10 ( 0, 16) 1B (27) Move Relative X = FC Y = 00 (-4, 0) 1C (28) Move Relative X = 04 Y = F0 ( 4,-16) 1D (29) Move Relative X = 04 Y = 10 ( 4, 16) 1E (30) Move Relative X = FC Y = 10 (-4, 16) 1F (31) Move Relative X = FC Y = F0 (-4,-16) 20 (32) Move Relative X = 00 Y = EC ( 0,-20) 21 (33) Move Relative X = 05 Y = 00 ( 5, 0) 22 (34) Move Relative X = 00 Y = 14 ( 0, 20) 23 (35) Move Relative X = FB Y = 00 (-5, 0) 24 (36) Move Relative X = 05 Y = EC ( 5,-20) 25 (37) Move Relative X = 05 Y = 14 ( 5, 20) 26 (38) Move Relative X = FB Y = 14 (-5, 20) 27 (39) Move Relative X = FB Y = EC (-5,-20) 28 (40) Move Relative X = 00 Y = E8 ( 0,-24) 29 (41) Move Relative X = 06 Y = 00 ( 6, 0) 2A (42) Move Relative X = 00 Y = 18 ( 0, 24) 2B (43) Move Relative X = FA Y = 00 (-6, 0) 2C (44) Move Relative X = 06 Y = E8 ( 6,-24) 2D (45) Move Relative X = 06 Y = 18 ( 6, 24) 2E (46) Move Relative X = FA Y = 18 (-6, 24) 2F (47) Move Relative X = FA Y = E8 (-6,-24) 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) 32 (50) Move Relative X = FE Y = 10 (-2, 16) 33 (51) Move Relative X = FE Y = FC (-2, -4) 34 (52) Move Relative X = 02 Y = FC ( 2, -4) 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) 36 (54) Move Relative X = FE Y = 04 (-2, 4) 37 (55) Move Relative X = FE Y = F0 (-2,-16) screen address lookup lsb 139F 00 ................ 13A0 80 00 80 00 80 00 80 00 80 00 80 00 80 00 80 00 ................ 13B0 80 00 80 00 80 00 80 00 80 00 80 00 80 00 80 screen address look up msb 13BF 30 ...............0 13C0 32 35 37 3A 3C 3F 41 44 46 49 4B 4E 50 53 55 58 257:= signed) .branch if player not dying 13E4 60 ` RTS . player not dying 13E5 A6 9A .. LDX &9A .Last visible alien offset (always ?&99-1) alien loop 13E7 86 0A .. STX &0A .store alien counter 13E9 BD 00 04 ... LDA &0400,X .Alien X behavior flags 13EC 30 08 0. BMI &13F6 (< signed) .branch if sprite visible process next alien collision 13EE A6 0A .. LDX &0A .alien counter 13F0 CA . DEX . 13F1 10 F4 .. BPL &13E7 (>= signed) .process next alien 13F3 4C D4 14 L.. JMP &14D4 .check if player has collided with a bomb? alien is visible, check if it's exploding 13F6 4A J LSR A /2 .bit 0 to C flag (exploding flag) 13F7 B0 F5 .. BCS &13EE (>= unsigned) .branch if alien is exploding (no collision) - process next alien collision alien is visible and not exploding, check for collision with player 13F9 BD 68 05 .h. LDA &0568,X .alien sprite Y coords 13FC CD 2B 06 .+. CMP &062B .player Y pos 13FF 90 09 .. BCC &140A (< unsigned) .alien Y=player Y 1401 ED 2B 06 .+. SBC &062B .player Y pos 1404 C9 10 .. CMP #&10 (16) .00010000 compare difference to player height 1406 B0 5A .Z BCS &1462 (>= unsigned) .no Y overlap = no collision with the player - check for collision with a bullet 1408 90 0D .. BCC &1417 (< unsigned) .branch always - Y overlap alien Y= unsigned) .no overlap = no collision with the player - check for collision with a bullet Y coords overlap, check X coords 1417 BD 40 05 .@. LDA &0540,X .alien sprite X coords 141A CD 2A 06 .*. CMP &062A .player X pos 141D 90 09 .. BCC &1428 (< unsigned) .alien X=player X 141F ED 2A 06 .*. SBC &062A .player X pos 1422 C9 06 .. CMP #&06 (6) .00000110 1424 B0 3C .< BCS &1462 (>= unsigned) .no X overlap = no collision with the player - check for collision with a bullet 1426 90 0A .. BCC &1432 (< unsigned) .branch always - collision with player! kill the player 1428 AD 2A 06 .*. LDA &062A .player X pos 142B FD 40 05 .@. SBC &0540,X .alien sprite X coords 142E C9 06 .. CMP #&06 (6) .00000110 1430 B0 30 .0 BCS &1462 (>= unsigned) .no X overlap = no collision with the player - check for collision with a bullet player collision with alien, kill the player 1432 38 8 SEC .set bit 7 - player dying flag 1433 6E 2C 06 n,. ROR &062C .set player dying flag now kill all aliens 1436 A0 27 .' LDY #&27 (39) .00100111 set alien Y exploding loop 1438 B9 00 04 ... LDA &0400,Y .Alien X behavior flags 143B 09 01 .. ORA #&01 (1) .00000001 start it exploding? 143D 99 00 04 ... STA &0400,Y . 1440 88 . DEY . 1441 10 F5 .. BPL &1438 (>= signed) .set next alien exploding add an extra exploding alien, which is our ship explosion 1443 E6 99 .. INC &99 .total visible aliens++ (our explosion is an alien explosion) 1445 E6 9A .. INC &9A .Last visible alien offset++ (always ?&99-1) 1447 A4 9A .. LDY &9A .Last visible alien offset (always ?&99-1) 1449 A9 81 .. LDA #&81 (129=-127) .10000001 (make alien visible and exploding) 144B 99 00 04 ... STA &0400,Y .Alien behavior flags 144E AD 2B 06 .+. LDA &062B .player Y pos 1451 99 68 05 .h. STA &0568,Y .alien sprite Y coords 1454 AD 2A 06 .*. LDA &062A .player X pos 1457 99 40 05 .@. STA &0540,Y .alien sprite X coords 145A A9 24 .$ LDA #&24 (36) .00100100 explosion type 145C 99 28 04 .(. STA &0428,Y .alien X sprite lookup offset value? 145F 4C 2D 15 L-. JMP &152D .play explosion sound no collision with the player - check for collision with a bullet 1462 BD 00 04 ... LDA &0400,X .Alien X behavior flags 1465 4A J LSR A /2 .bit 0 (exploding flag) to C 1466 B0 86 .. BCS &13EE (>= unsigned) .branch if already exploding - process next alien collision check if a bullet collides with the alien 1468 A0 02 .. LDY #&02 (2) .00000010 number of bullets check bullets collision loop 146A 84 0B .. STY &0B . 146C A6 0A .. LDX &0A .alien counter 146E B9 0E 06 ... LDA &060E,Y .bullet slot flags (3) 60e/60f/610 (negative means slot used) 1471 30 08 0. BMI &147B (< signed) .bullet Y exists check next bullet 1473 A4 0B .. LDY &0B . 1475 88 . DEY . 1476 10 F2 .. BPL &146A (>= signed) .do another 1478 4C EE 13 L.. JMP &13EE .process next alien collision bullet Y exists - check if it collides with the alien 147B BD 68 05 .h. LDA &0568,X .alien sprite Y coords 147E D9 0B 06 ... CMP &060B,Y .bullet Y pos' (3) 60b/60c/60d 1481 90 F0 .. BCC &1473 (< unsigned) .no collision, try next bullet 1483 F9 0B 06 ... SBC &060B,Y .bullet Y pos' (3) 60b/60c/60d 1486 C9 10 .. CMP #&10 (16) .00010000 alien height 1488 B0 E9 .. BCS &1473 (>= unsigned) .no collision, try next bullet 148A BD 40 05 .@. LDA &0540,X .alien sprite X coords 148D D9 08 06 ... CMP &0608,Y .bullet X pos' (3) 608/609/60a 1490 90 07 .. BCC &1499 (< unsigned) . 1492 F9 08 06 ... SBC &0608,Y .bullet X pos' (3) 608/609/60a 1495 D0 DC .. BNE &1473 .no collision, try next bullet 1497 F0 0B .. BEQ &14A4 .branch always - collision 1499 B9 08 06 ... LDA &0608,Y .bullet X pos' (3) 608/609/60a 149C 38 8 SEC . 149D FD 40 05 .@. SBC &0540,X .alien sprite X coords 14A0 C9 06 .. CMP #&06 (6) .00000110 alien width 14A2 B0 CF .. BCS &1473 (>= unsigned) .no collision, try next bullet Collision occurs 14A4 A9 00 .. LDA #&00 (0) .00000000 14A6 99 0E 06 ... STA &060E,Y .bullet slot flags (3) 60e/60f/610 (negative means slot used) clear this bullet 14A9 DE C8 04 ... DEC &04C8,X .Current number of hits required to kill this alien-- 14AC 08 . PHP .save flags (Z = set alien was killed) 14AD D0 08 .. BNE &14B7 .Branch if alien not been killed alien is toast, start it dying 14AF BD 00 04 ... LDA &0400,X .Alien X behavior flags 14B2 09 01 .. ORA #&01 (1) .00000001 -> start alien dying? 14B4 9D 00 04 ... STA &0400,X .Alien X behavior flags remove bullet 14B7 A4 0B .. LDY &0B . 14B9 BE 08 06 ... LDX &0608,Y .bullet X pos' (3) 608/609/60a 14BC B9 0B 06 ... LDA &060B,Y .bullet Y pos' (3) 60b/60c/60d 14BF A8 . TAY . 14C0 20 87 19 .. JSR &1987 .plot/remove bullet at (X,Y) (remove it) 14C3 CE 3F 06 .?. DEC &063F .number of player bullets-- 14C6 28 ( PLP .pull flags (Z = set alien was killed) 14C7 D0 08 .. BNE &14D1 .(JMP &1473) branch if alien not dying - try next bullet alien is toast - get some score 14C9 A6 0A .. LDX &0A .alien counter 14CB 20 4F 16 O. JSR &164F .player shot alien X code - gain score 14CE 20 2D 15 -. JSR &152D .play explosion sound 14D1 4C 73 14 Ls. JMP &1473 .try next bullet check if player has collided with a bomb? 14D4 A0 05 .. LDY #&05 (5) .00000101 14D6 84 0B .. STY &0B . 14D8 B9 1D 06 ... LDA &061D,Y .bomb alive flags (0=no bomb,$ff=bomb) 14DB 30 06 0. BMI &14E3 (< signed) .branch if bomb alive check next bomb collision 14DD A4 0B .. LDY &0B . 14DF 88 . DEY . 14E0 10 F4 .. BPL &14D6 (>= signed) .check next bomb 14E2 60 ` RTS . 14E3 AD 2B 06 .+. LDA &062B .player Y pos 14E6 D9 17 06 ... CMP &0617,Y .bomb sprite position Y's 14E9 90 F2 .. BCC &14DD (< unsigned) .no collision check next bomb collision 14EB F9 17 06 ... SBC &0617,Y .bomb sprite position Y's 14EE C9 10 .. CMP #&10 (16) .00010000 player height 14F0 B0 EB .. BCS &14DD (>= unsigned) .no overlap, check next bomb collision 14F2 AD 2A 06 .*. LDA &062A .player X pos 14F5 D9 11 06 ... CMP &0611,Y .bomb sprite position X's 14F8 90 07 .. BCC &1501 (< unsigned) . 14FA F9 11 06 ... SBC &0611,Y .bomb sprite position X's 14FD D0 DE .. BNE &14DD .no overlap, check next bomb collision 14FF F0 0B .. BEQ &150C . 1501 B9 11 06 ... LDA &0611,Y .bomb sprite position X's 1504 38 8 SEC . 1505 ED 2A 06 .*. SBC &062A .player X pos 1508 C9 06 .. CMP #&06 (6) .00000110 player width 150A B0 D1 .. BCS &14DD (>= unsigned) .no overlap, check next bomb collision bomb has collided with player, so explode the bomb? 150C A9 00 .. LDA #&00 (0) .00000000 150E 99 1D 06 ... STA &061D,Y .bomb alive flags (0=no bomb,$ff=bomb) 1511 BE 11 06 ... LDX &0611,Y .bomb sprite position X's 1514 B9 17 06 ... LDA &0617,Y .bomb sprite position Y's 1517 A8 . TAY .Y to Y 1518 20 C3 1A .. JSR &1AC3 .display/remove a bomb sprite on the screen 151B CE 40 06 .@. DEC &0640 .number of bombs on the screen? 151E 4C 32 14 L2. JMP &1432 .kill the player Name Points value Hits Required QUAZAR 20 1 DIONE 20 1 PATERA 40 1 EJNAR 20 1 MAADI 20 1 NEXOD 60 1 COZENAGE 80 10 PLANTIA 40 2 SERVITOR 60 5 MINION 40 5 NEANDER 80 2 DEVIANT 40 2 CALLISTON 80 2 number of hits to kill an alien of each type? 0 1 2 3 4 5 6 7 8 9 a b 1521 01 01 01 01 01 0A 02 05 05 02 02 02 ** ** ** ............ QUAZAR ENJAR DIONE MAADI PATERA COZENAGE PLANITIA MINION SERVITOR CALLISON1-3 play explosion sound 152D A2 3B .; LDX #&3B (59) .00111011 152F A0 15 .. LDY #&15 (21) .00010101 1531 20 B3 19 .. JSR &19B3 .play a sound @ Y*256+X (if not in demo and sound is on) 1534 A2 43 .C LDX #&43 (67) .01000011 1536 A0 15 .. LDY #&15 (21) .00010101 1538 4C B3 19 L.. JMP &19B3 .play a sound @ Y*256+X (if not in demo and sound is on) Explosion sound #1 1530 ** ** ** ** ** ** ** ** ** ** ** 10 00 F1 FF 07 ..... 1540 00 04 00 Explosion sound #2 1543 11 00 01 00 96 00 04 00 ** ** ** ** ** ........... Deal with player movement 154B AD 2C 06 .,. LDA &062C .player dying flag 154E 10 01 .. BPL &1551 (>= signed) .branch if player not dying 1550 60 ` RTS . player is not dying 1551 20 78 0D x. JSR &0D78 .Do player demo movement counters (change L/R direction after random length of time) 1554 A0 00 .. LDY #&00 (0) .00000000 zero both: 1556 84 09 .. STY &09 .player Y movement 1558 84 08 .. STY &08 .player X movement 155A 2C 46 06 ,F. BIT &0646 .playing game flag NEGATIVE means not playing (doing demo!) 155D 10 0C .. BPL &156B (>= signed) .get input from human player (&08=X movement, &09=Y movement) doing demo so fake player input (player moves left/right all the time, never up and down) 155F C8 . INY .Y=1 1560 2C 48 06 ,H. BIT &0648 .demo random movement flags 1563 10 01 .. BPL &1566 (>= signed) .50% chance of left or right movement 1565 C8 . INY .Y=2 1566 84 08 .. STY &08 .X movement = 1 or 2 in demo (which means RIGHT or LEFT) 1568 4C AB 15 L.. JMP &15AB .common player movement code (player and computer controlled) get input from human player (&08=X movement, &09=Y movement) 156B 2C 45 06 ,E. BIT &0645 .Keyboard/Joystick flag... NEGATIVE=keyboard 156E 30 1F 0. BMI &158F (< signed) .branch if keyboard joystick input 1570 A2 01 .. LDX #&01 (1) .00000001 1572 20 E5 11 .. JSR &11E5 ADVAL X positive check (going left) 1575 26 08 &. ROL &08 . 1577 A2 01 .. LDX #&01 (1) .00000001 1579 20 ED 11 .. JSR &11ED .ADVAL X negative check (going right) 157C 26 08 &. ROL &08 . 157E A2 02 .. LDX #&02 (2) .00000010 1580 20 E5 11 .. JSR &11E5 .ADVAL X positive check (going up) 1583 26 09 &. ROL &09 . 1585 A2 02 .. LDX #&02 (2) .00000010 1587 20 ED 11 .. JSR &11ED .ADVAL X negative check (going down) 158A 26 09 &. ROL &09 . 158C 4C AB 15 L.. JMP &15AB .common player movement code (player and computer controlled) keyboard input 158F A2 9E .. LDX #&9E (158=-98) .10011110 Z Key 1591 20 FB 11 .. JSR &11FB .do inkey X, Z/C set = pressed (going left) 1594 26 08 &. ROL &08 . 1596 A2 BD .. LDX #&BD (189=-67) .10111101 X Key 1598 20 FB 11 .. JSR &11FB .do inkey X, Z/C set = pressed (going right) 159B 26 08 &. ROL &08 . 159D A2 B7 .. LDX #&B7 (183=-73) .10110111 : Key 159F 20 FB 11 .. JSR &11FB .do inkey X, Z/C set = pressed (going up) 15A2 26 09 &. ROL &09 . 15A4 A2 97 .. LDX #&97 (151=-105) .10010111 / Key 15A6 20 FB 11 .. JSR &11FB .do inkey X, Z/C set = pressed (going down) 15A9 26 09 &. ROL &09 . common player movement code (player and computer controlled) 15AB 20 CB 12 .. JSR &12CB .work out screen address of player sprite into (&00) and set the sprite height 15AE A4 08 .. LDY &08 . 15B0 B9 07 16 ... LDA &1607,Y . 00 01 FF 00 (none, right, left, both) 15B3 18 . CLC . 15B4 6D 2A 06 m*. ADC &062A .player X pos 15B7 C9 4B .K CMP #&4B (75) .01001011 15B9 B0 03 .. BCS &15BE (>= unsigned) .branch if at RHS (don't store new X pos) 15BB 8D 2A 06 .*. STA &062A .player X pos 15BE A4 09 .. LDY &09 . 15C0 B9 03 16 ... LDA &1603,Y . 00 03 FD 00 (none, down, up, both) 15C3 18 . CLC . 15C4 6D 2B 06 m+. ADC &062B .player Y pos 15C7 C9 A5 .. CMP #&A5 (165=-91) .10100101 15C9 90 07 .. BCC &15D2 (< unsigned) .branch if too high (don't store new Y pos) 15CB C9 EB .. CMP #&EB (235=-21) .11101011 15CD B0 03 .. BCS &15D2 (>= unsigned) .branch if too low (don't store new Y pos) 15CF 8D 2B 06 .+. STA &062B .player Y pos 15D2 AC 2B 06 .+. LDY &062B .player Y pos 15D5 AE 2A 06 .*. LDX &062A .player X pos 15D8 20 95 12 .. JSR &1295 .calc screen address of X,Y (but make sure X=X mod 80, also Y>=17) otherwise screen address=&c000 15DB 85 03 .. STA &03 .sprite dest2 msb 15DD 86 02 .. STX &02 .sprite dest2 lsb 15DF 45 01 E. EOR &01 .sprite dest1 msb 15E1 D0 05 .. BNE &15E8 .branch if start/dest address MSB's not same 15E3 8A . TXA . 15E4 45 00 E. EOR &00 .sprite dest1 lsb 15E6 F0 10 .. BEQ &15F8 .branch if start/dest address LSB's are same (toggle demo left/right movement direction) got stuck at edge of screen start/dest addresses not same (player sprite has moved) so lets unplot/plot it 15E8 A9 10 .. LDA #&10 (16) .00010000 15EA 85 05 .. STA &05 .sprite height 15EC AD 9E 29 ..) LDA &299E .player sprite data LSB 15EF AA . TAX . 15F0 AC 9F 29 ..) LDY &299F .player sprite data MSB 15F3 84 04 .. STY &04 . 15F5 4C 00 0B L.. JMP &0B00 .Sprite Routine (src1 in (?&04*256)+A->dest in (&00), src2 Y*256+X ->dest in (&02)) start/dest addresses ARE same (player sprite has not moved) toggle demo left/right movement direction 15F8 AD 48 06 .H. LDA &0648 .demo random movement flags 15FB 49 80 I. EOR #&80 (128=-128) .10000000 toggle left/right demo movement 15FD 8D 48 06 .H. STA &0648 .demo random movement flags 1600 4C 05 12 L.. JMP &1205 .pause for some time (as though displaying a sprite - mimic plot/unplot) 1600 ** ** ** 00 03 FD 00 00 01 FF 00 ** ** ** ** ** ........ display a digit at &62d,X 160B 86 04 .. STX &04 . 160D BC 2D 06 .-. LDY &062D,X .score digits (8) 1610 BE BE 16 ... LDX &16BE,Y .lookups for number sprite src LSBs 1613 8E 19 16 ... STX &1619 . 1616 A0 17 .. LDY #&17 (23) .00010111 1618 B9 00 0A ... LDA &0A00,Y . copy a number sprite 161B 91 00 .. STA (&00),Y . 161D 88 . DEY . 161E 10 F8 .. BPL &1618 (>= signed) . 1620 A6 04 .. LDX &04 . 1622 60 ` RTS . zero score and display "0", display hiscore 1623 20 EA 16 .. JSR &16EA .zero score and wipe it, display a "0" display hiscore 1626 A9 98 .. LDA #&98 (152=-104) .10011000 1628 85 00 .. STA &00 .sprite dest1 lsb 162A A2 07 .. LDX #&07 (7) .00000111 162C 86 06 .. STX &06 .displaying zeros flag = 0 = display them display digit loop 162E BD 2D 06 .-. LDA &062D,X .display score, ignore leading zeroes &062d+6=&0634 to &62d+&e 1631 D0 04 .. BNE &1637 .branch if a non zero digit digit is zero 1633 A4 06 .. LDY &06 .displaying zeros flag = 0 = display them 1635 D0 07 .. BNE &163E .branch if not displaying leading zeroes display a digit 1637 A9 00 .. LDA #&00 (0) .00000000 set 1639 85 06 .. STA &06 .displaying zeroes flag (0 = display them) 163B 20 0B 16 .. JSR &160B .display a digit at &62d,X skip to next digit 163E A5 00 .. LDA &00 .sprite dest1 lsb 1640 18 . CLC . 1641 69 18 i. ADC #&18 (24) .00011000 + 3 columns (6 pixels) 1643 85 00 .. STA &00 .sprite dest1 lsb 1645 90 02 .. BCC &1649 (< unsigned) . 1647 E6 01 .. INC &01 .sprite dest1 msb 1649 E8 . INX . 164A E0 0E .. CPX #&0E (14) .00001110 164C D0 E0 .. BNE &162E . 164E 60 ` RTS . player shot alien X code - gain score 164F A9 20 . LDA #&20 (32) .00100000 1651 85 00 .. STA &00 .score units position LSB 1653 A9 31 .1 LDA #&31 (49) .00110001 1655 85 01 .. STA &01 .score units position MSB 1657 BD 28 04 .(. LDA &0428,X .alien X sprite lookup offset value? 165A 38 8 SEC . 165B E9 0C .. SBC #&0C (12) .00001100 (remove explosions from type - first 6 sprites are explosions) 165D 4A J LSR A /2 ./2 to get a real alien base number 165E AA . TAX .real alien base type to X 165F BD 12 17 ... LDA &1712,X .lookups for alien type scores? 1662 A2 05 .. LDX #&05 (5) .00000101 (number of digits to process - start on the tens offset) add digits loop 1664 85 04 .. STA &04 .temp save digit to add skip back a digits position 1666 A5 00 .. LDA &00 .score units position LSB 1668 38 8 SEC . 1669 E9 18 .. SBC #&18 (24) .00011000 left a digit 166B 85 00 .. STA &00 .score units position LSB 166D B0 02 .. BCS &1671 (>= unsigned) . 166F C6 01 .. DEC &01 .score units position MSB-- 1671 A5 04 .. LDA &04 .restore digit to add 1673 18 . CLC . 1674 7D 2D 06 }-. ADC &062D,X .score digits (8) add it 1677 C9 0A .. CMP #&0A (10) .00001010 1679 90 10 .. BCC &168B (< unsigned) .no overflow digit over flowed 167B E9 0A .. SBC #&0A (10) .00001010 (c set) 167D 9D 2D 06 .-. STA &062D,X .score digits (8) store it 1680 20 0B 16 .. JSR &160B .display a digit at &62d,X 1683 A9 01 .. LDA #&01 (1) .00000001 (add a 1 to next column) 1685 CA . DEX . 1686 10 DC .. BPL &1664 (>= signed) .do next digit we clocked the score!! 1688 4C EA 16 L.. JMP &16EA .zero score and wipe it, display a "0" last digit didn't overflow 168B 9D 2D 06 .-. STA &062D,X .score digits (8) store it 168E E0 02 .. CPX #&02 (2) .00000010 1690 D0 21 .! BNE &16B3 .(JMP &160B) display a digit at &62d,X 1692 2C 4A 06 ,J. BIT &064A .extra life flag (NEGATIVE=already had extra life) 1695 30 1C 0. BMI &16B3 (< signed) .branch if already had an extra life(JMP &160B) display a digit at &62d,X 1697 C9 02 .. CMP #&02 (2) .00000010 1699 D0 18 .. BNE &16B3 .(JMP &160B) display a digit at &62d,X We get an extra life 169B 38 8 SEC . 169C 6E 4A 06 nJ. ROR &064A .set extra life flag (NEGATIVE=already had extra life) make negative 169F 8A . TXA . 16A0 48 H PHA .save X lucky us, extra life!! 16A1 20 65 1C e. JSR &1C65 .display lives left (Remove them) 16A4 EE 29 06 .). INC &0629 .extra life! 16A7 20 65 1C e. JSR &1C65 .display lives left (plot them) 16AA A2 B6 .. LDX #&B6 (182=-74) .10110110 16AC A0 16 .. LDY #&16 (22) .00010110 16AE 20 B3 19 .. JSR &19B3 .play a sound @ Y*256+X (if not in demo and sound is on) 16B1 68 h PLA .restore X 16B2 AA . TAX . 16B3 4C 0B 16 L.. JMP &160B .display a digit at &62d,X EXTRA LIFE SOUND 16B6 13 00 03 00 81 00 1E 00 ........ lookups for number sprite src LSBs 16BE 00 18 .. 16C0 30 48 60 78 90 A8 C0 D8 ** ** ** ** ** ** ** ** 0H` update hiscore digits - copy score to hiscore if greater than... 16C8 2C 46 06 ,F. BIT &0646 .playing game flag NEGATIVE means not playing (doing demo!) 16CB 30 1C 0. BMI &16E9 (< signed) .(RTS) 16CD A2 FF .. LDX #&FF (255=-1) .11111111 compare digit loop 16CF E8 . INX . 16D0 E0 07 .. CPX #&07 (7) .00000111 16D2 F0 15 .. BEQ &16E9 .(RTS) last digit 16D4 BD 2D 06 .-. LDA &062D,X .score digits (8) 16D7 DD 34 06 .4. CMP &0634,X .hiscore digits (8) 16DA F0 F3 .. BEQ &16CF .branch if equal compare another 16DC 90 0B .. BCC &16E9 (< unsigned) .(RTS) if less than ok we have new digits greater than so copy all the remaining digits to the hiscore 16DE BD 2D 06 .-. LDA &062D,X .score digits (8) 16E1 9D 34 06 .4. STA &0634,X .hiscore digits (8) 16E4 E8 . INX . 16E5 E0 07 .. CPX #&07 (7) .00000111 16E7 90 F5 .. BCC &16DE (< unsigned) .copy another number 16E9 60 ` RTS . zero score and wipe it, display a "0" 16EA A0 06 .. LDY #&06 (6) .00000110 16EC A9 00 .. LDA #&00 (0) .00000000 zero score loop 16EE 99 2D 06 .-. STA &062D,Y .score digits (8) last one is always zero 16F1 88 . DEY . 16F2 10 FA .. BPL &16EE (>= signed) . remove displayed score 16F4 A2 91 .. LDX #&91 (145=-111) .10010001 remove displayed score loop 16F6 9D 8F 30 ..0 STA &308F,X .blank score on screen loop 16F9 CA . DEX . 16FA D0 FA .. BNE &16F6 . 16FC A9 20 . LDA #&20 (32) .00100000 16FE 85 00 .. STA &00 .digit dest lsb 1700 A9 31 .1 LDA #&31 (49) .00110001 1702 85 01 .. STA &01 .digit dest msb 1704 A2 06 .. LDX #&06 (6) .00000110 1706 4C 0B 16 L.. JMP &160B .display a digit at &62d,X never called 1709 AD 48 06 .H. LDA &0648 .demo random movement flags 170C 49 80 I. EOR #&80 (128=-128) .10000000 toggle left/right demo movement 170E 8D 48 06 .H. STA &0648 .demo random movement flags 1711 60 ` RTS . lookups for alien type scores (in tens) 1712 02 02 02 02 04 08 04 04 06 08 08 08 QUAZAR ENJAR DIONE MAADI PATERA COZENAGE PLANITIA MINION SERVITOR CALLISON1-3 Display entering zone message (do zone transition) and bonus word / show a while/ delete the messages 171E A0 FF .. LDY #&FF (255=-1) .11111111 1720 A9 00 .. LDA #&00 (0) .00000000 1722 85 0A .. STA &0A .Entering zone display timer 1724 38 8 SEC . 1725 AE 3D 06 .=. LDX &063D .current zone number 1728 E8 . INX .+1 1729 8A . TXA .new zone in A and X 172A C8 . INY . 172B C9 0A .. CMP #&0A (10) .00001010 172D 90 04 .. BCC &1733 (< unsigned) .branch if <10 172F E9 0A .. SBC #&0A (10) .00001010 -10 (c set) 1731 B0 F7 .. BCS &172A (>= unsigned) .branch always A=(zone+1) MOD 10 now... 1733 8C A5 1B ... STY &1BA5 .zone decimal MSB 1736 8D A6 1B ... STA &1BA6 .zone decimal LSB 1739 A0 06 .. LDY #&06 (6) .Message 06 Col 3F String Offset 1B93 = "ENTERING ZONE " at $5108 (57,80) 173B 20 E1 1A .. JSR &1AE1 .print/remove Message Y (at fixed position) 173E 18 . CLC .clear C - don't set flag (PLOT THE WORD) 173F 20 DE 17 .. JSR &17DE .Display zone name - (c clear means don't set flag at #&064b) 16=SATURN 32=BATTERY 48=TURBO Entering zone loop start 1742 20 82 17 .. JSR &1782 .check for space to start game (kill player, end demo), or escape to end game (kill player, end game) 1745 AD 2C 06 .,. LDA &062C .player dying flag 1748 30 18 0. BMI &1762 (< signed) .branch if player is dying (if player pressed escape) player is not dying (escape not pressed?) 174A 20 4B 15 K. JSR &154B .Deal with player movement 174D 20 49 18 I. JSR &1849 .update the stars (unplot 16, move them down, and replot) 1750 20 B8 18 .. JSR &18B8 .random number to A 1753 20 CB 18 .. JSR &18CB .process player bullets 1756 20 10 12 .. JSR &1210 .deal with K/J/Q/S/P key presses 1759 A2 14 .. LDX #&14 (20) .00010100 175B 20 07 12 .. JSR &1207 .do a pause with time in X 175E C6 0A .. DEC &0A .Entering zone display timer 1760 D0 E0 .. BNE &1742 .back to entering zone loop start zone end of transition (either timed out or escape) 1762 38 8 SEC .set C - set flag (REMOVE THE WORD) 1763 20 DE 17 .. JSR &17DE .Display zone name - (c clear means don't set flag at #&064b) 16=SATURN 32=BATTERY 48=TURBO 2nd plot to remove the text 1766 A0 06 .. LDY #&06 (6) .Message 06 Col 3F String Offset 1B93 = "ENTERING ZONE " at $5108 (57,80) 1768 4C E1 1A L.. JMP &1AE1 .print/remove Message Y (at fixed position) Display/remove "GALAFORCE" "by kevin edwards" "superior software" "press space or fire" "to play" messages 176B 20 BC 21 .! JSR &21BC .Display big GALAFORCE letters in red 176E A0 0E .. LDY #&0E (14) .Message 0E Col 3C String Offset 1BE3 = "BY KEVIN EDWARDS" at $4488 (57,48) 1770 20 E1 1A .. JSR &1AE1 .print/remove Message Y (at fixed position) 1773 A0 0A .. LDY #&0A (10) .Message 0A Col 0C String Offset 1BB4 = "PRESS SPACE OR FIRE" at $6760 (72,136) 1775 20 E1 1A .. JSR &1AE1 .print/remove Message Y (at fixed position) 1778 A0 1E .. LDY #&1E (30) .Message 1E Col 33 String Offset 1C1F = "SUPERIOR SOFTWARE" at $7678 (55,176) 177A 20 E1 1A .. JSR &1AE1 .print/remove Message Y (at fixed position) 177D A0 14 .. LDY #&14 (20) .Message 14 Col 0C String Offset 1BCB = "TO PLAY" at $6CF0 (50,152) 177F 4C E1 1A L.. JMP &1AE1 .print/remove Message Y (at fixed position) check for space to start game (kill player, end demo), or escape to end game (kill player, end game) 1782 AD 46 06 .F. LDA &0646 .playing game flag NEGATIVE means not playing (doing demo!) 1785 10 06 .. BPL &178D (>= signed) .if playing game then check for escape to end game? otherwise check for space/fire button to start it 1787 20 C9 17 .. JSR &17C9 .check for space bar or fire button (C set=keyboard clear=joystick button, z clear = neither) 178A F0 08 .. BEQ &1794 .branch if pressed 178C 60 ` RTS . doing demo, check for escape to end game? 178D A2 8F .. LDX #&8F (143=-113) .10001111 ESCAPE key 178F 20 FB 11 .. JSR &11FB .do inkey X, Z/C set = pressed 1792 D0 10 .. BNE &17A4 .(RTS) branch if not pressed ESCAPE PRESSED or space/fire pressed 1794 AD 2C 06 .,. LDA &062C .player dying flag 1797 30 0B 0. BMI &17A4 (< signed) .(RTS) if player is dying already start player dying with zero lives (end demo) 1799 20 65 1C e. JSR &1C65 .display lives left (remove them) 179C A9 00 .. LDA #&00 (0) .00000000 179E 8D 29 06 .). STA &0629 .make 0 lives left 17A1 4C 32 14 L2. JMP &1432 .kill the player 17A4 60 ` RTS . If human playing, play tune, display game over, wait a while, remove message 17A5 2C 46 06 ,F. BIT &0646 .playing game flag NEGATIVE means not playing (doing demo!) 17A8 30 FA 0. BMI &17A4 (< signed) .(RTS) playing demo, do nothing not demo 17AA A0 0E .. LDY #&0E (14) .00001110 (game over tune) 17AC 20 9A 1D .. JSR &1D9A .setup to play tune/section Y? Display the GAME OVER text 17AF A0 08 .. LDY #&08 (8) .Message 08 Col 3C String Offset 1BA7 = "GAME OVER" at $4C58 (7,72) 17B1 20 E1 1A .. JSR &1AE1 .print/remove Message Y (at fixed position) game over loop 17B4 20 49 18 I. JSR &1849 .update the stars (unplot 16, move them down, and replot) 17B7 20 10 12 .. JSR &1210 .deal with K/J/Q/S/P key presses 17BA A2 19 .. LDX #&19 (25) .00011001 17BC 20 07 12 .. JSR &1207 .do a pause with time in X 17BF 20 52 1E R. JSR &1E52 .see if tune finished? 17C2 D0 F0 .. BNE &17B4 .branch if tune not finished - game over loop 2nd plot to remove the text 17C4 A0 08 .. LDY #&08 (8) .Message 08 Col 3C String Offset 1BA7 = "GAME OVER" at $4C58 (7,72) 17C6 4C E1 1A L.. JMP &1AE1 .print/remove Message Y (at fixed position) check for space bar or fire button (C set=keyboard clear=joystick button, z clear = neither) 17C9 A2 9D .. LDX #&9D (157=-99) .10011101 space bar key 17CB 20 FB 11 .. JSR &11FB .do inkey X, Z/C set = pressed 17CE F0 0D .. BEQ &17DD .(RTS) branch if space bar pressed (C = set) A=zero? 17D0 A2 00 .. LDX #&00 (0) .00000000 read joystick buttons into bits 0 and 1 of A 17D2 A9 80 .. LDA #&80 (128=-128) .10000000 17D4 20 F4 FF .. JSR &FFF4 .OSBYTE 17D7 18 . CLC .clear carry 17D8 8A . TXA .save buttons into X 17D9 29 01 ). AND #&01 (1) .00000001 17DB 49 01 I. EOR #&01 (1) .00000001 invert button 0 (A=0 means pressed) 17DD 60 ` RTS . Display zone name - (c clear means don't set flag at #&064b) 16=SATURN 32=BATTERY 48=TURBO 17DE 08 . PHP .push carry flag 17DF AD 3D 06 .=. LDA &063D .current zone number 17E2 AA . TAX .current zone number to X 17E3 29 0F ). AND #&0F (15) .00001111 mod 16 17E5 D0 1E .. BNE &1805 .branch if zone mod 16 <> 0 (PLP/RTS) display nothing zone mod 16 == 0 (zone = 0/16/32/48) 17E7 8A . TXA .zone to A 17E8 4A J LSR A /2 . 17E9 4A J LSR A /4 . 17EA 4A J LSR A /8 . 17EB F0 18 .. BEQ &1805 .branch if zone div 8 = 0 (PLP/RTS) display nothing A = 2 4 or 6 (zone 16/32/48) 17ED 2C 4B 06 ,K. BIT &064B .Word displayed Flag (Saturn/Battery/Turbo) 17F0 30 13 0. BMI &1805 (< signed) .branch if word already displayed (PLP/RTS) display nothing 17F2 18 . CLC . 17F3 69 14 i. ADC #&14 (20) .00010100 A = 16 18 or 1a (zone 16/32/48) 17F5 A8 . TAY . 17F6 C0 1C .. CPY #&1C (28) .00011100 17F8 B0 0B .. BCS &1805 (>= unsigned) .zone too high nothing to display (PLP/RTS) A = 16 18 or 1a (zone 16/32/48) Message 16 Col C3 String Offset 1C01 = "SATURN" at $5900 (12,104) Message 18 Col C3 String Offset 1C0B = "BATTERY" at $58F0 (10,104) Message 1A Col C3 String Offset 1C16 = "TURBO" at $5910 (14,104) 17FA 28 ( PLP . 17FB 90 05 .. BCC &1802 (< unsigned) .(JMP &1AE1) print/remove Message Y (at fixed position) note word is displayed 17FD A9 FF .. LDA #&FF (255=-1) .11111111 17FF 8D 4B 06 .K. STA &064B .set Word displayed Flag (Saturn/Battery/Turbo) 1802 4C E1 1A L.. JMP &1AE1 .print/remove Message Y (at fixed position) 1805 28 ( PLP . 1806 60 ` RTS . calc and plot original stars 1807 A2 5A .Z LDX #&5A (90) .01011010 30*3 bytes of data for stars 1809 A0 1E .. LDY #&1E (30) .00011110 30 stars total 180B A9 00 .. LDA #&00 (0) .00000000 180D 85 08 .. STA &08 .(&08)=0 180F 85 09 .. STA &09 . 1811 85 6E .n STA &6E .stars plotting base offset number initialising stars loop 1813 20 94 18 .. JSR &1894 .get random star position at top of screen (address will lie upon row1) 1816 20 B8 18 .. JSR &18B8 .random number to A 1819 29 04 ). AND #&04 (4) .00000100 random top of row or half way down row even distribute stars vertically on the screen 181B 05 08 .. ORA &08 . 181D 18 . CLC . 181E 75 0E u. ADC &0E,X .star position LSB 1820 95 0E .. STA &0E,X . 1822 A5 09 .. LDA &09 . 1824 75 0F u. ADC &0F,X .star position MSB 1826 95 0F .. STA &0F,X . next offset down a char row 1828 A5 08 .. LDA &08 .move (&08) down a row +#&280 182A 18 . CLC . 182B 69 80 i. ADC #&80 (128=-128) .10000000 182D 85 08 .. STA &08 . 182F A5 09 .. LDA &09 . 1831 69 02 i. ADC #&02 (2) .00000010 1833 85 09 .. STA &09 . get a random pixel colour (not black) loop 1835 20 B8 18 .. JSR &18B8 .random number to A 1838 29 15 ). AND #&15 (21) .00010101 (16/4/1) 183A F0 F9 .. BEQ &1835 .branch if RHS pixel colour is black - get another colour random number - colour in A 01 red/04 green/05 yellow/16 blue/17 magenta/20 cyan/21 white 183C 95 10 .. STA &10,X .star colour 183E 41 0E A. EOR (&0E,X) .plot star 1840 81 0E .. STA (&0E,X) . 1842 CA . DEX .skip previous star colour 1843 CA . DEX .skip previous star msb 1844 CA . DEX .skip previous star lsb 1845 88 . DEY .stars to go -- 1846 10 CB .. BPL &1813 (>= signed) .branch if there is another star to initialise 1848 60 ` RTS . update the stars (unplot 16, move them down, and replot) 1849 A0 10 .. LDY #&10 (16) .00010000 (number of stars to plot) 184B A6 6E .n LDX &6E .stars plotting base offset number 184D F0 01 .. BEQ &1850 .branch if first star (do stars 0-15 - 16 stars) else we do stars (16-30 - 15 stars) 184F 88 . DEY .number of stars to plot-1 (1 less) 1850 B5 10 .. LDA &10,X .star colour 1852 41 0E A. EOR (&0E,X) .remove old star 1854 81 0E .. STA (&0E,X) . 1856 B5 0E .. LDA &0E,X . 1858 29 07 ). AND #&07 (7) .00000111 185A C9 07 .. CMP #&07 (7) .00000111 185C D0 1A .. BNE &1878 .branch if not at bottom of char row star at bottom of char row 185E B5 0E .. LDA &0E,X .move down a char row 1860 49 40 I@ EOR #&40 (64) .01000000 move it somewhere 50% on next char row (appear to flash) 1862 69 79 iy ADC #&79 (121) .01111001 1864 29 F8 ). AND #&F8 (248=-8) .11111000 1866 95 0E .. STA &0E,X . 1868 B5 0F .. LDA &0F,X . 186A 49 01 I. EOR #&01 (1) .00000001 move it somewhere 50% on next char row (appear to flash) 186C 69 02 i. ADC #&02 (2) .00000010 186E 95 0F .. STA &0F,X . 1870 10 08 .. BPL &187A (>= signed) .branch if not off bottom of screen (replot new star position) new position is off the bottom of the screen 1872 20 94 18 .. JSR &1894 .get random star position at top of screen (address will lie upon char row 1, pixel row 0) 1875 4C 7A 18 Lz. JMP &187A .replot new star position not at bottom of char row 1878 F6 0E .. INC &0E,X .move it down a pixel replot new star position 187A B5 10 .. LDA &10,X .star colour 187C 41 0E A. EOR (&0E,X) .replot star 187E 81 0E .. STA (&0E,X) . 1880 E8 . INX .skip star address lsb 1881 E8 . INX .skip star address msb 1882 E8 . INX .skip star colour 1883 88 . DEY .number of stars to plot-1 1884 D0 CA .. BNE &1850 .plot next star (we normally do 16 = 16*3 data bytes = 48 or 15 = 15*3 data bytes = 45) 1886 A5 6E .n LDA &6E .stars plotting base offset number 1888 18 . CLC . 1889 69 30 i0 ADC #&30 (48) .00110000 next star base is (16*3 data bytes forward) 188B C9 60 .` CMP #&60 (96) .01100000 are we at last star? 188D D0 02 .. BNE &1891 .branch if we're not 188F A9 00 .. LDA #&00 (0) .00000000 reset next star base to to zero 1891 85 6E .n STA &6E .store stars plotting base offset number 1893 60 ` RTS . screen rows Offset 00 Address 3000 (not on the top row) Offset 01 Address 3280 3300 3400 all are on row 1 Offset 02 Address 3500 get random star position at top of screen (address will lie upon row1) 1894 20 B8 18 .. JSR &18B8 .random number to A 1897 29 03 ). AND #&03 (3) .00000011 1899 C9 03 .. CMP #&03 (3) .00000011 189B F0 F7 .. BEQ &1894 .get random number 0,1 or 2 A = random number 0,1 or 2 189D 18 . CLC . 189E 69 32 i2 ADC #&32 (50) .00110010 +32= 32, 33 or 34 (up 18A0 95 0F .. STA &0F,X . store at star msb 18A2 C9 32 .2 CMP #&32 (50) .00110010 18A4 F0 08 .. BEQ &18AE .branch #&32 (make sure the value is >&3280.. 18A6 20 B8 18 .. JSR &18B8 .random number to A 18A9 29 F8 ). AND #&F8 (248=-8) .11111000 (make it top of a char row) 18AB 4C B5 18 L.. JMP &18B5 .store the LSB 18AE 20 B8 18 .. JSR &18B8 .random number to A 18B1 29 78 )x AND #&78 (120) .01111000 (make it top of a char row) 18B3 09 80 .. ORA #&80 (128=-128) .10000000 make sure LSB >=&80 store the LSB 18B5 95 0E .. STA &0E,X . 18B7 60 ` RTS . random number to A 18B8 A5 6B .k LDA &6B . 18BA 29 48 )H AND #&48 (72) .01001000 18BC 45 FC E. EOR &FC .interrupt Acc save register 18BE 69 38 i8 ADC #&38 (56) .00111000 18C0 0A . ASL A *2 . 18C1 0A . ASL A *2 . 18C2 26 6D &m ROL &6D . 18C4 26 6C &l ROL &6C . 18C6 26 6B &k ROL &6B . 18C8 A5 6B .k LDA &6B . 18CA 60 ` RTS . process player bullets 18CB AD 42 06 .B. LDA &0642 .bullet auto firing counter 18CE F0 03 .. BEQ &18D3 .branch if already timed out 18D0 CE 42 06 .B. DEC &0642 .bullet auto firing counter-- 18D3 AD 3F 06 .?. LDA &063F .number of player bullets 18D6 F0 3F .? BEQ &1917 .branch if none process the alive bullets 18D8 A2 02 .. LDX #&02 (2) .00000010 process alive bullets loop 18DA 86 06 .. STX &06 .bullet process counter 18DC BD 0E 06 ... LDA &060E,X .bullet slot flags (3) 60e/60f/610 (negative means slot used) 18DF 30 07 0. BMI &18E8 (< signed) .branch if this bullet is "alive" process next alive bullet 18E1 A6 06 .. LDX &06 .bullet process counter 18E3 CA . DEX . 18E4 10 F4 .. BPL &18DA (>= signed) .process another alive bullet 18E6 30 2C 0, BMI &1914 (< signed) .branch always - check for player firing bullet X is alive remove old bullet 18E8 BC 0B 06 ... LDY &060B,X .bullet Y pos' (3) 60b/60c/60d 18EB BD 08 06 ... LDA &0608,X .bullet X pos' (3) 608/609/60a 18EE AA . TAX .X pos to X 18EF 20 87 19 .. JSR &1987 .plot/remove bullet at (X,Y) -> wipe bullet move bullet 18F2 A6 06 .. LDX &06 .bullet process counter 18F4 BD 0B 06 ... LDA &060B,X .bullet Y pos' (3) 60b/60c/60d 18F7 38 8 SEC .move bullet up screen 18F8 E9 08 .. SBC #&08 (8) .00001000 -8 18FA 9D 0B 06 ... STA &060B,X .bullet Y pos' (3) 60b/60c/60d 18FD D0 0A .. BNE &1909 .branch if bullet not at top of screen bullet off screen , remove it entirely 18FF CE 3F 06 .?. DEC &063F .number of player bullets-- 1902 A9 00 .. LDA #&00 (0) .00000000 1904 9D 0E 06 ... STA &060E,X .bullet slot flags (3) 60e/60f/610 (negative means slot used) 1907 F0 D8 .. BEQ &18E1 .branch always - process next alive bullet replot bullet on screen 1909 A8 . TAY . 190A BD 08 06 ... LDA &0608,X .bullet X pos' (3) 608/609/60a 190D AA . TAX . 190E 20 87 19 .. JSR &1987 .plot/remove bullet at (X,Y)-> plot bullet again 1911 4C E1 18 L.. JMP &18E1 .process next alive bullet check for player firing 1914 AD 3F 06 .?. LDA &063F .number of player bullets? 1917 C9 03 .. CMP #&03 (3) .00000011 1919 F0 39 .9 BEQ &1954 .(RTS) rts if already 3 on the screen, can't fire more! there is a slot available 191B AD 2C 06 .,. LDA &062C .player dying flag 191E 30 34 04 BMI &1954 (< signed) .(RTS) branch if player is dying slot available and we're not dying 1920 AD 46 06 .F. LDA &0646 .playing game flag NEGATIVE means not playing (doing demo!) 1923 30 20 0 BMI &1945 (< signed) .branch if doing demo (it autofires) its the player 1925 2C 45 06 ,E. BIT &0645 .Keyboard/Joystick flag... NEGATIVE=keyboard 1928 30 0D 0. BMI &1937 (< signed) .branch if keyboard using joystick - check fire button 192A A9 80 .. LDA #&80 (128=-128) .10000000 adval to check buttons 192C A2 00 .. LDX #&00 (0) .00000000 192E 20 F4 FF .. JSR &FFF4 .OSBYTE 1931 8A . TXA . 1932 4A J LSR A /2 . 1933 90 09 .. BCC &193E (< unsigned) .fire button not pressed 1935 B0 0E .. BCS &1945 (>= unsigned) .brach always - FIRE 1937 A2 B6 .. LDX #&B6 (182=-74) .10110110 RETURN key 1939 20 FB 11 .. JSR &11FB .do inkey X, Z/C set = pressed 193C F0 07 .. BEQ &1945 .return pressed - FIRE return not pressed (not firing 193E A9 00 .. LDA #&00 (0) .00000000 1940 8D 42 06 .B. STA &0642 .zero bullet auto firing counter 1943 F0 0F .. BEQ &1954 .(RTS) branch always FIRE 1945 AD 42 06 .B. LDA &0642 .bullet auto firing counter 1948 D0 0A .. BNE &1954 .(RTS) cant fire again yet so quickly yet find an empty slot for bullet 194A A2 02 .. LDX #&02 (2) .00000010 find and empty slot for bullet loop 194C BD 0E 06 ... LDA &060E,X .bullet slot flags (3) 60e/60f/610 (negative means slot used) 194F 10 04 .. BPL &1955 (>= signed) .fire a bullet (using slot X) 1951 CA . DEX . 1952 10 F8 .. BPL &194C (>= signed) .check next slot 1954 60 ` RTS . fire a bullet (using slot X) 1955 A9 FF .. LDA #&FF (255=-1) .11111111 make bullet slot used 1957 9D 0E 06 ... STA &060E,X .bullet slot flags (3) 60e/60f/610 (negative means slot used) 195A A9 07 .. LDA #&07 (7) .00000111 195C 8D 42 06 .B. STA &0642 .set bullet auto firing counter (cant fire again immediately) 195F 86 06 .. STX &06 .save bullet firing slot (not needed?) 1961 EE 3F 06 .?. INC &063F .number of player bullets++ generate bullet at players gun position 1964 AD 2A 06 .*. LDA &062A .player X pos 1967 18 . CLC . 1968 69 02 i. ADC #&02 (2) .00000010 196A 9D 08 06 ... STA &0608,X .bullet X pos' (3) 608/609/60a 196D 85 04 .. STA &04 .save bullet X pos 196F AD 2B 06 .+. LDA &062B .player Y pos 1972 38 8 SEC . 1973 E9 17 .. SBC #&17 (23) .00010111 1975 29 F8 ). AND #&F8 (248=-8) .11111000 1977 9D 0B 06 ... STA &060B,X .bullet Y pos' (3) 60b/60c/60d 197A A8 . TAY .Y to Y 197B A6 04 .. LDX &04 .restore bullet X pos 197D 20 87 19 .. JSR &1987 .plot/remove bullet at (X,Y) (initial plot) 1980 A2 AB .. LDX #&AB (171=-85) .10101011 1982 A0 19 .. LDY #&19 (25) .00011001 1984 4C B3 19 L.. JMP &19B3 .play a sound @ Y*256+X (if not in demo and sound is on) plot/remove bullet at (X,Y) 1987 20 A7 12 .. JSR &12A7 .calc X,Y into screen coords 198A 85 01 .. STA &01 .sprite dest1 msb 198C 86 00 .. STX &00 .sprite dest1 lsb 198E A0 07 .. LDY #&07 (7) .00000111 1990 B9 A3 19 ... LDA &19A3,Y .bullet sprite 1993 51 00 Q. EOR (&00),Y . 1995 91 00 .. STA (&00),Y . 1997 88 . DEY . 1998 10 F6 .. BPL &1990 (>= signed) . 199A A9 22 ." LDA #&22 (34) .00100010 extra bit of the sprite at the bottom row-1, next column 199C A0 0E .. LDY #&0E (14) .00001110 199E 51 00 Q. EOR (&00),Y . 19A0 91 00 .. STA (&00),Y . 19A2 60 ` RTS . bullet sprite (plus an extra 2 pixels manually drawn) 19A3 15 15 15 15 15 15 33 01 bullet firing sound 19AB 12 00 02 00 73 ......3.....s 19B0 00 04 00 ** ** ** ** ** ** ** ** ** ** ** ** ** ... play a sound @ Y*256+X (if not in demo and sound is on) 19B3 2C 44 06 ,D. BIT &0644 .check if sound is on ($80) 19B6 10 EA .. BPL &19A2 (>= signed) .(RTS) nope, do nothing 19B8 2C 46 06 ,F. BIT &0646 .playing game flag NEGATIVE means not playing (doing demo!) 19BB 30 E5 0. BMI &19A2 (< signed) .(RTS) not playing, do nothing 19BD A9 07 .. LDA #&07 (7) .00000111 19BF 4C F1 FF L.. JMP &FFF1 .OSWORD process bombs (random chance of bombing + process falling bombs) 19C2 AD 40 06 .@. LDA &0640 .number of bombs on the screen? 19C5 C9 06 .. CMP #&06 (6) .00000110 19C7 F0 32 .2 BEQ &19FB .branch if max bombs (6) on the screen - just process the bombs falling there is at least one empty slot, attempt to drop a bomb 19C9 A5 9A .. LDA &9A .Last visible alien offset (always ?&99-1) 19CB C9 14 .. CMP #&14 (20) .00010100 19CD 90 11 .. BCC &19E0 (< unsigned) .branch if there are less than 20 visible aliens (do 1 in 16 chance of dropping a bomb) for a random alien 20 or more aliens visible (pack of cards level?) 1/16 chance cozenage bombs 19CF AD 48 04 .H. LDA &0448 .alien #&20 (32) (cozenage slot) 19D2 C9 16 .. CMP #&16 (22) .00010110 is it type COZENAGE - alive (not exploding/dead) 19D4 D0 0A .. BNE &19E0 .branch if (do 1 in 16 chance of dropping a bomb) for a random alien COZENAGE exists - 1 in 16 chance of it dropping bomb 19D6 A5 6C .l LDA &6C .random byte LSB (re uses last value - so can batch bomb?) 19D8 29 0F ). AND #&0F (15) .00001111 19DA D0 04 .. BNE &19E0 .branch if (do 1 in 16 chance of dropping a bomb) for a random alien COZENAGE bombs - make alien 32 drop a bomb 19DC A9 20 . LDA #&20 (32) .00100000 make alien slot 32 drop a bomb... (the cozenage) 19DE D0 0F .. BNE &19EF .Alien slot number A to drop a bomb (the cozenage) do 1 in 16 chance of dropping a bomb for a random alien 19E0 20 B8 18 .. JSR &18B8 .random number to A (full random number) 19E3 29 0F ). AND #&0F (15) .00001111 19E5 D0 14 .. BNE &19FB .not a zero, so process the bombs falling ok we're bombing - pick a random alien to bomb 19E7 A5 6C .l LDA &6C .random byte get a random alien within range loop 19E9 29 3F )? AND #&3F (63) .00111111 19EB C5 99 .. CMP &99 .total visible aliens 19ED B0 0C .. BCS &19FB (>= unsigned) .random alien out of range, so no bombing - process the bombs falling Alien slot number A to drop a bomb (either random or 32(COZENAGE)) 19EF AA . TAX .alien slot number to X 19F0 BD 00 04 ... LDA &0400,X .Alien behavior flags 19F3 10 06 .. BPL &19FB (>= signed) .branch if alien is not visible - process the bombs falling The alien in X is visible, make sure its alive 19F5 4A J LSR A /2 .bit 0 to C flag (exploding flag) 19F6 B0 03 .. BCS &19FB (>= unsigned) .branch if alien is exploding (process the bombs falling) ok drop a bomb! alien X is visible and not exploding 19F8 20 7B 1A {. JSR &1A7B .make alien X drop a bomb if slot free and zone>=3 process the bombs falling 19FB AD 40 06 .@. LDA &0640 .number of bombs on the screen? 19FE F0 0E .. BEQ &1A0E .(RTS) branch if no bombs to process there are bombs to fall 1A00 A2 05 .. LDX #&05 (5) .00000101 bomb falling loop 1A02 86 06 .. STX &06 .bomb counter 1A04 BD 1D 06 ... LDA &061D,X .bomb alive flags (0=no bomb,$ff=bomb) 1A07 30 06 0. BMI &1A0F (< signed) .process bomb X if alive process next bomb 1A09 A6 06 .. LDX &06 .bomb counter 1A0B CA . DEX . 1A0C 10 F4 .. BPL &1A02 (>= signed) . 1A0E 60 ` RTS . process bomb X, its alive 1A0F BD 23 06 .#. LDA &0623,X .bomb flags (bit 7 = 7 fast bomb) 1A12 30 06 0. BMI &1A1A (< signed) .branch if bit 7 set - bomb falls fast bit 7 clear - not a fast bomb, so only move every other loop 1A14 A9 01 .. LDA #&01 (1) .00000001 1A16 24 6F $o BIT &6F .incremented every game loop counter 1A18 D0 EF .. BNE &1A09 .process next bomb (if bit 0 not set) every other loop process slow bombs, every loop for fast ones 1A1A BC 17 06 ... LDY &0617,X .bomb sprite position Y's 1A1D BD 11 06 ... LDA &0611,X .bomb sprite position X's 1A20 AA . TAX .X to X 1A21 86 07 .. STX &07 .save X pos 1A23 20 C3 1A .. JSR &1AC3 .display/remove a bomb sprite on the screen (remove it) 1A26 A6 06 .. LDX &06 .bomb counter 1A28 BD 17 06 ... LDA &0617,X .bomb sprite position Y's 1A2B 18 . CLC . 1A2C 69 08 i. ADC #&08 (8) .00001000 move bomb down 1A2E 9D 17 06 ... STA &0617,X .bomb sprite position Y's 1A31 90 0B .. BCC &1A3E (< unsigned) .branch if bomb not at bottom of screen bomb reached the bottom of the screen, kill it 1A33 A9 00 .. LDA #&00 (0) .00000000 kill the bomb 1A35 9D 1D 06 ... STA &061D,X .bomb alive flags (0=no bomb,$ff=bomb) 1A38 CE 40 06 .@. DEC &0640 .number of bombs on the screen? 1A3B 4C 09 1A L.. JMP &1A09 .process next bomb new bomb Y position not off the bottom of the screen 1A3E A8 . TAY .Y pos to Y 1A3F A5 9A .. LDA &9A .Last visible alien offset (always ?&99-1) 1A41 C9 14 .. CMP #&14 (20) .00010100 1A43 B0 2E .. BCS &1A73 (>= unsigned) .branch if there are >=20 visible aliens (pack of cards?) - display new bomb position (no swerving) there are <20 visible aliens - not a pack of cards level 1A45 AD 3D 06 .=. LDA &063D .zone 1A48 C9 0D .. CMP #&0D (13) .00001101 1A4A 90 27 .' BCC &1A73 (< unsigned) .branch if zone <13 (no swerving) - display new bomb position (no swerving) zone >=13 1A4C C9 1D .. CMP #&1D (29) .00011101 1A4E B0 05 .. BCS &1A55 (>= unsigned) .branch if zone >28 - all bombs always do swerve (even on fast ones) - except pack of cards level zone is 14-28... fast bombs dont swerve yet 1A50 BD 23 06 .#. LDA &0623,X .bomb flags (bit 7 = 7 fast bomb) 1A53 30 1E 0. BMI &1A73 (< signed) .branch if bit 7 set fast bomb - display new bomb position (no swerving) ok this bomb is allowed to swerve 1A55 A5 6C .l LDA &6C .random byte 1A57 30 1A 0. BMI &1A73 (< signed) .branch if random 50% chance of not swerving - display new bomb position (no swerving) it's swerving!! allow bombs to home in (left/right?) 1A59 AD 2A 06 .*. LDA &062A .player X pos 1A5C 18 . CLC . 1A5D 69 02 i. ADC #&02 (2) .00000010 +2 (middle of player) 1A5F DD 11 06 ... CMP &0611,X .bomb sprite position X's 1A62 F0 0F .. BEQ &1A73 .at correct X position no need to swerve - display new bomb position 1A64 B0 08 .. BCS &1A6E (>= unsigned) .branch if player is to the right (bomb drifts right) bomb drifts left (player is to the left) 1A66 C6 07 .. DEC &07 .bomb X pos 1A68 DE 11 06 ... DEC &0611,X .bomb sprite position X's 1A6B 4C 73 1A Ls. JMP &1A73 .display new bomb position bomb drifts right (player is to the right) 1A6E E6 07 .. INC &07 .bomb X pos 1A70 FE 11 06 ... INC &0611,X .bomb sprite position X's display new bomb position 1A73 A6 07 .. LDX &07 .restore X pos 1A75 20 C3 1A .. JSR &1AC3 .display/remove a bomb sprite on the screen (plot) 1A78 4C 09 1A L.. JMP &1A09 .process next bomb alien X drop a bomb if slot free and zone>=3 1A7B AD 3D 06 .=. LDA &063D .zone 1A7E C9 03 .. CMP #&03 (3) .00000011 1A80 90 0A .. BCC &1A8C (< unsigned) .(RTS) if zone <3 (no bombing) find a free bomb slot.... 1A82 A0 05 .. LDY #&05 (5) .00000101 find a free bomb slot loop 1A84 B9 1D 06 ... LDA &061D,Y .bomb alive flags (0=no bomb,$ff=bomb) 1A87 10 04 .. BPL &1A8D (>= signed) .free slot Y found 1A89 88 . DEY . 1A8A 10 F8 .. BPL &1A84 (>= signed) .check another slot 1A8C 60 ` RTS . free bomb slot Y found, drop a bomb ? 1A8D BD 68 05 .h. LDA &0568,X .alien sprite Y coords 1A90 C9 18 .. CMP #&18 (24) .00011000 1A92 90 F8 .. BCC &1A8C (< unsigned) .(RTS) if alien is offscreen, can't bomb (off top of screen) 1A94 C9 F0 .. CMP #&F0 (240=-16) .11110000 1A96 B0 F4 .. BCS &1A8C (>= unsigned) .(RTS) if alien is at bottom, can't bomb (at bottom of screen) adjust Y value 1A98 69 08 i. ADC #&08 (8) .00001000 +8 to alien bottom 1A9A 29 F8 ). AND #&F8 (248=-8) .11111000 (round it to a char row) 1A9C 99 17 06 ... STA &0617,Y .bomb sprite position Y's 1A9F 85 06 .. STA &06 .save Y pos 1AA1 C9 50 .P CMP #&50 (80) .01010000 1AA3 90 04 .. BCC &1AA9 (< unsigned) .branch if <80 (high up so get random bomb flag - may fall fast) 1AA5 29 7F ). AND #&7F (127) .01111111 otherwise its slow all the time - clear bit 7 1AA7 B0 03 .. BCS &1AAC (>= unsigned) .branch always (value >=80 and <127) - bomb always slow bomb was dropped high up so get random bomb flag (may fall fast) 1AA9 20 B8 18 .. JSR &18B8 .random number to A (if bit 7 is set it'll be fast - if not, not) 1AAC 99 23 06 .#. STA &0623,Y .bomb flags (bit 7 = 7 fast bomb) 1AAF A9 FF .. LDA #&FF (255=-1) .11111111 1AB1 99 1D 06 ... STA &061D,Y .bomb alive flags (0=no bomb,$ff=bomb) 1AB4 EE 40 06 .@. INC &0640 .number of bombs on the screen? 1AB7 BD 40 05 .@. LDA &0540,X .alien sprite X coords 1ABA 18 . CLC . 1ABB 69 02 i. ADC #&02 (2) .00000010 +2 make middle of alien 1ABD 99 11 06 ... STA &0611,Y .bomb sprite position X's 1AC0 AA . TAX .to X 1AC1 A4 06 .. LDY &06 .restore Y pos fall thru and initially plot the bomb display/remove a bomb sprite on the screen 1AC3 20 A7 12 .. JSR &12A7 .calc X,Y into screen coords 1AC6 85 01 .. STA &01 .sprite dest1 msb 1AC8 86 00 .. STX &00 .sprite dest1 lsb 1ACA A0 09 .. LDY #&09 (9) .00001001 1ACC B9 D7 1A ... LDA &1AD7,Y . 1ACF 51 00 Q. EOR (&00),Y . 1AD1 91 00 .. STA (&00),Y . 1AD3 88 . DEY . 1AD4 10 F6 .. BPL &1ACC (>= signed) . 1AD6 60 ` RTS . bomb sprite (7 high in first column and 2 high in second column) 1AD7 08 0C 14 14 14 14 14 14 08 1B5B 81 1B = &1B81 Message/offset=00 1B5D 86 1B = &1B86 Message/offset=02 1B5F 8D 1B = &1B8D Message/offset=04 1B61 93 1B = &1B93 Message/offset=06 1B63 A7 1B = &1BA7 Message/offset=08 1B65 B4 1B = &1BB4 Message/offset=0A 1B67 D6 1B = &1BD6 Message/offset=0C 1B69 E3 1B = &1BE3 Message/offset=0E 1B6B F7 1B = &1BF7 Message/offset=10 1B6D FC 1B = &1BFC Message/offset=12 1B6F CB 1B = &1BCB Message/offset=14 1B71 01 1C = &1C01 Message/offset=16 1B73 0B 1C = &1C0B Message/offset=18 1B75 16 1C = &1C16 Message/offset=1A 1B77 1F 1C = &1C1F Message/offset=1C 1B79 1F 1C = &1C1F Message/offset=1E 1B7B 34 1C = &1C34 Message/offset=20 1B7D 39 1C = &1C39 Message/offset=22 1B7F 52 1C = &1C52 Message/offset=24 0700 7F 41 41 79 7F 00 78 7F 00 00 79 79 49 49 4F 63 .AAy..x...yyIIOc 0710 49 49 7F 78 1F 11 71 7F 10 6F 49 49 79 79 7F 49 II.x..q..oIIyy.I 0720 49 49 7B 01 01 01 79 7F 78 4F 49 7F 78 0F 09 09 II{...y.xOI.x... 0730 79 7F 78 7F 09 0F 78 7F 79 49 4F 78 7F 79 41 41 y.x...x.yIOx.yAA 0740 63 7F 79 41 41 7F 7F 79 49 49 49 7F 79 09 09 09 c.yAA..yIII.y... 0750 7F 79 41 49 7B 7F 78 08 08 7F 00 7F 78 00 00 70 .yAI{.x.....x..p 0760 40 40 7F 78 7F 78 08 0F 78 7F 78 40 40 40 7F 01 @@.x.x..x.x@@@.. 0770 7F 01 7F 7F 79 01 01 7F 7F 41 41 43 7F 7F 79 09 ....y....AAC..y. 0780 09 0F 7F 41 61 61 7F 7F 79 09 0F 78 4F 49 49 79 ...Aaa..y..xOIIy 0790 79 01 01 7F 79 01 7F 78 40 40 7F 0F 7F 40 70 0F y...y..x@@...@p. 07A0 7F 40 7F 40 7F 77 78 08 08 77 0F 08 78 08 0F 7B .@.@.wx..w..x..{ 07B0 79 49 49 6F 00 00 60 00 00 08 08 08 08 08 00 00 yIIo..`......... 07C0 00 00 00 00 3C 42 81 00 00 81 42 3C 00 26 41 34 ....= signed) .do next row The encoded 5 bytes columns wide 1B2B E8 . INX .char sprite data pointer++ 1B2C C6 06 .. DEC &06 .char sprite width counter 1B2E F0 19 .. BEQ &1B49 .finished doing sprite width (goto next column 6th row blank) do next column 1B30 AD 1F 1B ... LDA &1B1F .self modifying byte colour (the LHS half of the pixels) 1B33 45 00 E. EOR &00 .Colour byte (left EOR left+right = right) (right EOR left+right = left) 1B35 8D 1F 1B ... STA &1B1F .self modifying byte colour (the RHS half of the pixels now) 1B38 29 AA ). AND #&AA (170=-86) .10101010 left pixel only (is it blank) 1B3A F0 DB .. BEQ &1B17 .if it is we're doing the right column (the other half of the pixel colour) - Do a vertical column of char pixels loop left pixel not blank, so move to next char column 1B3C A5 08 .. LDA &08 .goto next column to print in 1B3E 18 . CLC . 1B3F 69 08 i. ADC #&08 (8) .00001000 1B41 85 08 .. STA &08 . 1B43 90 D2 .. BCC &1B17 (< unsigned) .branch if no overflow - Do a vertical column of char pixels loop 1B45 E6 09 .. INC &09 . 1B47 D0 CE .. BNE &1B17 .branch always - Do a vertical column of char pixels loop done pixels across - finished doing across (goto next column 6th row blank) 1B49 A5 08 .. LDA &08 .goto next column 1B4B 18 . CLC . 1B4C 69 08 i. ADC #&08 (8) .00001000 1B4E 85 08 .. STA &08 . 1B50 90 02 .. BCC &1B54 (< unsigned) .do next char in message 1B52 E6 09 .. INC &09 . do next char in message 1B54 A4 01 .. LDY &01 .restore "char" offset in message 1B56 C6 05 .. DEC &05 .message length-- 1B58 D0 A6 .. BNE &1B00 .branch if more to print 1B5A 60 ` RTS . 1B5B 81 1B = &1B81 Message/offset=00 1B5D 86 1B = &1B86 Message/offset=02 1B5F 8D 1B = &1B8D Message/offset=04 1B61 93 1B = &1B93 Message/offset=06 1B63 A7 1B = &1BA7 Message/offset=08 1B65 B4 1B = &1BB4 Message/offset=0A 1B67 D6 1B = &1BD6 Message/offset=0C 1B69 E3 1B = &1BE3 Message/offset=0E 1B6B F7 1B = &1BF7 Message/offset=10 1B6D FC 1B = &1BFC Message/offset=12 1B6F CB 1B = &1BCB Message/offset=14 1B71 01 1C = &1C01 Message/offset=16 1B73 0B 1C = &1C0B Message/offset=18 1B75 16 1C = &1C16 Message/offset=1A 1B77 1F 1C = &1C1F Message/offset=1C 1B79 1F 1C = &1C1F Message/offset=1E 1B7B 34 1C = &1C34 Message/offset=20 1B7D 39 1C = &1C39 Message/offset=22 1B7F 52 1C = &1C52 Message/offset=24 Message Lookups 1B50 ** ** ** ** ** ** ** ** ** ** ** 81 1B 86 1B 8D ..... 1B60 1B 93 1B A7 1B B4 1B D6 1B E3 1B F7 1B FC 1B CB ................ 1B70 1B 01 1C 0B 1C 16 1C 1F 1C 1F 1C 34 1C 39 1C 52 ...........4.9.R 1B80 1C . Messages - Pos LSB, Pos MSB, Len, Colour, Characters 1B81 E8 7F 01 3C 19 ...< 1B86 30 30 03 33 1C 0C 1B .00.3...P 1B8D 50 31 02 1. 1B90 33 11 12 1B93 08 51 10 3F 0E 17 1D 0E 1B 12 17 10 26 3...Q.?........& 1BA0 23 18 17 0E 26 26 26 1BA7 58 4C 09 3C 10 0A 16 0E 26 #...&&&XL.<....& 1BB0 18 1F 0E 1B 1BB4 60 67 13 0C 19 1B 0E 1C 1C 26 1C 19 ....`g.......&.. 1BC0 0A 0C 0E 26 18 1B 26 0F 12 1B 0E 1BCB F0 6C 07 0C 1D ...&..&.....l... 1BD0 18 26 19 15 0A 22 1BD6 D8 3F 09 0F 10 0A 15 0A 0F 18 .&...".?........ 1BE0 1B 0C 0E 1BE3 88 44 10 3C 0B 22 26 14 0E 1F 12 17 26 ....D.<."&.....& 1BF0 0E 0D 20 0A 1B 0D 1C 1BF7 D0 7F 01 03 1C 1BFC B8 7F 01 3C .. ............< 1C00 14 message 12 letter to display ($13 = J, $14 = K) 1C01 00 59 06 C3 1C 0A 1D 1E 1B 17 1C0B F0 58 07 C3 0B ..Y.........X... 1C10 0A 1D 1D 0E 1B 22 10 1C16 59 05 C3 1D 1E 1B 0B 18 1C1F 78 .....".Y.......x 1C20 76 11 33 1C 1E 19 0E 1B 12 18 1B 26 1C 18 0F 1D v.3........&.... 1C30 20 0A 1B 0E 1C34 FF FF 01 03 FF 1C39 FF FF 15 03 00 26 31 .............&1 1C40 32 33 34 35 36 37 26 26 31 32 33 34 35 36 37 38 234567&&12345678 1C50 39 30 1C52 00 3D 0F 3C 0E 17 1D 0E 1B 26 22 18 1E 1B 90.=.<.....&"... 1C60 26 17 0A 16 0E ** ** ** ** ** ** ** ** ** ** ** &.... Message 00 Col 3C String Offset 1B81 = P Message 02 Col 33 String Offset 1B86 = SCR Message 04 Col 33 String Offset 1B8D = HI Message 06 Col 3F String Offset 1B93 = ENTERING ZONE Message 08 Col 3C String Offset 1BA7 = GAME OVER Message 0A Col 0C String Offset 1BB4 = PRESS SPACE OR FIRE Message 0C Col 0F String Offset 1BD6 = GALAFORCE Message 0E Col 3C String Offset 1BE3 = BY KEVIN EDWARDS Message 10 Col 03 String Offset 1BF7 = S Message 12 Col 3C String Offset 1BFC = K (or J) - displays the input device letter Message 14 Col 0C String Offset 1BCB = TO PLAY Message 16 Col C3 String Offset 1C01 = SATURN Message 18 Col C3 String Offset 1C0B = BATTERY Message 1A Col C3 String Offset 1C16 = TURBO Message 1C Col 33 String Offset 1C1F = SUPERIOR SOFTWARE Message 1E Col 33 String Offset 1C1F = SUPERIOR SOFTWARE Message 20 Col 03 String Offset 1C34 = * (display a hiscore table input char) Message 22 Col 03 String Offset 1C39 = 0 ******* ********** (display a hiscore table row) Message 24 Col 3C String Offset 1C52 = ENTER YOUR NAME Message 00 Col 3C String Offset 1B81 = "P" at $7FE8 (154,248) Message 02 Col 33 String Offset 1B86 = "SCR" at $3030 (12,0) Message 04 Col 33 String Offset 1B8D = "HI" at $3150 (84,0) Message 06 Col 3F String Offset 1B93 = "ENTERING ZONE " at $5108 (34,104) Message 08 Col 3C String Offset 1BA7 = "GAME OVER" at $4C58 (54,88) Message 0A Col 0C String Offset 1BB4 = "PRESS SPACE OR FIRE" at $6760 (24,176) Message 0C Col 0F String Offset 1BD6 = "GALAFORCE" at $3FD8 (54,48) Message 0E Col 3C String Offset 1BE3 = "BY KEVIN EDWARDS" at $4488 (34,64) Message 10 Col 03 String Offset 1BF7 = "S" at $7FD0 (148,248) Message 12 Col 3C String Offset 1BFC = "K" at $7FB8 (142,248) Message 14 Col 0C String Offset 1BCB = "TO PLAY" at $6CF0 (60,192) Message 16 Col C3 String Offset 1C01 = "SATURN" at $5900 (64,128) Message 18 Col C3 String Offset 1C0B = "BATTERY" at $58F0 (60,128) Message 1A Col C3 String Offset 1C16 = "TURBO" at $5910 (68,128) Message 1C Col 33 String Offset 1C1F = "SUPERIOR SOFTWARE" at $7678 (30,224) Message 1E Col 33 String Offset 1C1F = "SUPERIOR SOFTWARE" at $7678 (30,224) Message 20 Col 03 String Offset 1C34 = "*" at $FFFF (30,664) Message 22 Col 03 String Offset 1C39 = "0 ******* **********" at $FFFF (30,664) Message 24 Col 3C String Offset 1C52 = "ENTER YOUR NAME" at $3D00 (32,40) display/remove extra lives 1C65 AE 29 06 .). LDX &0629 .lives left 1C68 F0 1E .. BEQ &1C88 .(RTS) if none 1C6A A9 7D .} LDA #&7D (125) .01111101 1C6C 85 09 .. STA &09 . 1C6E A9 63 .c LDA #&63 (99) .01100011 1C70 85 08 .. STA &08 .sprite destination (&08)=#&7d63 1C72 A0 1C .. LDY #&1C (28) .00011100 1C74 B9 7D 1D .}. LDA &1D7D,Y .display an "life" sprite 1C77 51 08 Q. EOR (&08),Y . 1C79 91 08 .. STA (&08),Y . 1C7B 88 . DEY . 1C7C 10 F6 .. BPL &1C74 (>= signed) . 1C7E A5 08 .. LDA &08 . 1C80 38 8 SEC . 1C81 E9 20 . SBC #&20 (32) .00100000 move left 32 bytes, 4 columns 1C83 85 08 .. STA &08 . 1C85 CA . DEX . 1C86 D0 EA .. BNE &1C72 .print another life (if there is one!) 1C88 60 ` RTS . draw zone flags 1C89 AC 3D 06 .=. LDY &063D .zone 1C8C C8 . INY .+1 1C8D 84 04 .. STY &04 .zone total (with flags drawn subtracted) 1C8F A9 7B .{ LDA #&7B (123) .01111011 (&08)=#&7b00 top char row 1C91 85 09 .. STA &09 . 1C93 A9 00 .. LDA #&00 (0) .00000000 1C95 85 08 .. STA &08 . 1C97 A9 7D .} LDA #&7D (125) .01111101 (&0a)=#&7d80 bottom char row 1C99 85 0B .. STA &0B . 1C9B A9 80 .. LDA #&80 (128=-128) .10000000 1C9D 85 0A .. STA &0A . draw flags loop 1C9F A5 04 .. LDA &04 .zone total (with flags drawn subtracted) 1CA1 F0 72 .r BEQ &1D15 .(RTS) no more flags left 1CA3 C9 0A .. CMP #&0A (10) .00001010 1CA5 90 6F .o BCC &1D16 (< unsigned) .branch if less than 10 10 or more left 1CA7 38 8 SEC . 1CA8 E9 0A .. SBC #&0A (10) .00001010 -10 1CAA 85 04 .. STA &04 .zone total (with flags drawn subtracted) 1CAC A2 00 .. LDX #&00 (0) .00000000 draw a single flag (either a 10,5 or 1) display a "zones flag" X=0="10 zones flag" X=#&1B="5 zones flag" X=#&36="single zone flag" 1CAE A0 1F .. LDY #&1F (31) .00011111 1CB0 BD 2C 1D .,. LDA &1D2C,X . 1CB3 51 08 Q. EOR (&08),Y .copy top of flag sprite 1CB5 91 08 .. STA (&08),Y . 1CB7 E8 . INX . 1CB8 88 . DEY . 1CB9 C0 08 .. CPY #&08 (8) .00001000 1CBB D0 F3 .. BNE &1CB0 . Y=8 1CBD A9 33 .3 LDA #&33 (51) .00110011 2 pixels on bottom row (colour 5/5 magenta magenta) 1CBF 51 0A Q. EOR (&0A),Y . 1CC1 91 0A .. STA (&0A),Y . 1CC3 88 . DEY .Y=7 do for Y=7 to Y=0 loop (do red flag pole on the left hand side) 1CC4 A9 01 .. LDA #&01 (1) .00000001 1 pixel on top row 1CC6 51 08 Q. EOR (&08),Y . 1CC8 91 08 .. STA (&08),Y . 1CCA A9 01 .. LDA #&01 (1) .00000001 1 pixel on bottom row 1CCC 51 0A Q. EOR (&0A),Y . 1CCE 91 0A .. STA (&0A),Y . 1CD0 88 . DEY . 1CD1 10 F1 .. BPL &1CC4 (>= signed) . 1CD3 A0 09 .. LDY #&09 (9) .00001001 column 2 row 2 1CD5 BD 2C 1D .,. LDA &1D2C,X . 1CD8 E8 . INX . 1CD9 51 0A Q. EOR (&0A),Y . 1CDB 91 0A .. STA (&0A),Y . 1CDD A0 10 .. LDY #&10 (16) .00010000 column 3 row 1 1CDF BD 2C 1D .,. LDA &1D2C,X . 1CE2 E8 . INX . 1CE3 51 0A Q. EOR (&0A),Y . 1CE5 91 0A .. STA (&0A),Y . 1CE7 C8 . INY .column 3 row 2 1CE8 BD 2C 1D .,. LDA &1D2C,X . 1CEB E8 . INX . 1CEC 51 0A Q. EOR (&0A),Y . 1CEE 91 0A .. STA (&0A),Y . 1CF0 A0 18 .. LDY #&18 (24) .00011000 column 4 row 1 1CF2 BD 2C 1D .,. LDA &1D2C,X . 1CF5 51 0A Q. EOR (&0A),Y . 1CF7 91 0A .. STA (&0A),Y . 1CF9 A5 08 .. LDA &08 . 1CFB 18 . CLC . 1CFC 69 20 i ADC #&20 (32) .00100000 move flag dest pointer right 3 columns (gap between flags) 1CFE 85 08 .. STA &08 . 1D00 A5 09 .. LDA &09 . 1D02 69 00 i. ADC #&00 (0) .00000000 1D04 85 09 .. STA &09 . 1D06 A5 0A .. LDA &0A . 1D08 18 . CLC . 1D09 69 20 i ADC #&20 (32) .00100000 move flag dest pointer right 3 columns (gap between flags) 1D0B 85 0A .. STA &0A . 1D0D A5 0B .. LDA &0B . 1D0F 69 00 i. ADC #&00 (0) .00000000 1D11 85 0B .. STA &0B . 1D13 D0 8A .. BNE &1C9F .branch always -> draw flags loop (draw any remaining flags) 1D15 60 ` RTS . less than 10 left.... 1D16 C9 05 .. CMP #&05 (5) .00000101 1D18 90 09 .. BCC &1D23 (< unsigned) .branch if less than 5 5 or more 1D1A 38 8 SEC . 1D1B E9 05 .. SBC #&05 (5) .00000101 -5 1D1D 85 04 .. STA &04 .zone total (with flags drawn subtracted) 1D1F A2 1B .. LDX #&1B (27) .00011011 1D21 D0 8B .. BNE &1CAE .branch always drag a 5 zone flag less than 5 left 1D23 38 8 SEC . 1D24 E9 01 .. SBC #&01 (1) .00000001 -1 1D26 85 04 .. STA &04 .zone total (with flags drawn subtracted) 1D28 A2 36 .6 LDX #&36 (54) .00110110 1D2A D0 82 .. BNE &1CAE .branch always draw a single flag top of 10's flag sprite +0 = 10's flag +#&1b = 5's flag +#&36 = 1's flag 1D2C 31 31 31 31 1111 1D30 31 22 00 00 30 31 31 31 30 33 22 00 31 31 31 31 1"..011103".1111 1D40 31 33 33 33 33 22 22 top of 5's flag 1D47 00 22 22 22 00 00 00 00 31 13333""."""....1 1D50 31 31 33 31 22 00 00 32 33 32 32 32 33 33 33 22 1131"..23222333" 1D60 00 00 top of single flag 1D62 00 00 22 00 00 00 00 00 22 33 33 33 22 00 ...."....."333". 1D70 00 00 32 32 32 32 32 33 22 22 00 00 00 02 3F 3F ..222223""....?? 1D80 2E 08 11 15 1E 38 3C 3C 0F 0A 00 00 0A 28 3D 3D .....8<<.....(== 1D90 0E 0A 00 00 00 02 2A 2A 2A ** ** ** ** ** ** ** ......*** tune stuff? Y= 0 7 E 15 1C 23 2A 31 38 | | | | | | | | | 217D,Y 63 13 E8 AB DC EC AB F4 40 LSB 217E,Y 1F 1F 1E 1F 1E 20 1F 1F 20 MSB 217F,Y 18 17 01 49 0E 29 49 24 8A -> 1e96 music channel 2 playing pointer base 2180,Y 30 32 02 6D 2C 6B 93 4B 69 -> 1E97 music channel 3 playing pointer base 2181,Y 17 07 17 1B 03 03 1B 1B 1B -> X offset 1E9C,X base tempo offsets 2182,Y 05 08 0B 0E 02 05 0E 0E 0E -> X offset 1EBB,X base volumes offsets 2183,Y 05 08 05 0B 02 05 0B 0B 0E -> X offset &1ECD,X base duration offsets ** ** sections same with different channel 3 playing pointer bases 00 = main game theme tune - dum dum diddly tune 07 = wahhhh wahhh tune (wave start, if zone mod 16<>0) 0e = game over theme tune 15 = demo theme section 1 (played x2) 1c = dying tune 23 = salute tune (game wave start, if zone mod 16=0) 2a = demo theme section 2 (played x2) 31 = demo theme section 3 (played x2) 38 = demo theme section 4 (played x2) demo tune music if made up of the following tune sections (plays in order which is 15 15 2A 2A 31 31 38 38) setup to play tune/section Y? 1D9A 78 x SEI . 1D9B 8C 91 1E ... STY &1E91 .tune to play 1D9E B9 7D 21 .}! LDA &217D,Y .self modifying address 1DA1 8D 06 1E ... STA &1E06 .tune base LSB 1DA4 B9 7E 21 .~! LDA &217E,Y .self modifying address 1DA7 8D 07 1E ... STA &1E07 .tune base MSB 1DAA A9 00 .. LDA #&00 (0) .00000000 1DAC 8D 95 1E ... STA &1E95 .music channel playing pointer base start value is always 0 1DAF B9 7F 21 ..! LDA &217F,Y . 1DB2 8D 96 1E ... STA &1E96 .music channel 2 playing pointer base start value is looked up 1DB5 B9 80 21 ..! LDA &2180,Y . 1DB8 8D 97 1E ... STA &1E97 .music channel 3 playing pointer base start value is looked up 1DBB BE 81 21 ..! LDX &2181,Y .base tempo offsets 1DBE A0 03 .. LDY #&03 (3) .00000011 tempo loop 1DC0 BD 9C 1E ... LDA &1E9C,X .base tempos 1DC3 99 98 1E ... STA &1E98,Y .music note tempos? 1DC6 CA . DEX . 1DC7 88 . DEY . 1DC8 10 F6 .. BPL &1DC0 (>= signed) . 1DCA AC 91 1E ... LDY &1E91 .Y=tune to play 1DCD BE 82 21 ..! LDX &2182,Y .base volume offsets 1DD0 A0 02 .. LDY #&02 (2) .00000010 loop 1DD2 BD BB 1E ... LDA &1EBB,X .music channel volumes 1DD5 99 B8 1E ... STA &1EB8,Y .music channel volumes 1DD8 A9 01 .. LDA #&01 (1) .00000001 make all channel clocks 1, so they play immediately 1DDA 99 92 1E ... STA &1E92,Y .music channel play clock (plays at zero) 1DDD CA . DEX . 1DDE 88 . DEY . 1DDF 10 F1 .. BPL &1DD2 (>= signed) . 1DE1 AC 91 1E ... LDY &1E91 .Y=tune to play 1DE4 BE 83 21 ..! LDX &2183,Y .base duration offsets 1DE7 A0 02 .. LDY #&02 (2) .00000010 1DE9 BD CD 1E ... LDA &1ECD,X .music channel durations 1DEC 99 CA 1E ... STA &1ECA,Y .music channel note durations 1DEF CA . DEX . 1DF0 88 . DEY . 1DF1 10 F6 .. BPL &1DE9 (>= signed) . 1DF3 58 X CLI . 1DF4 60 ` RTS . called in event routine (playing a tune?) 1DF5 A2 02 .. LDX #&02 (2) .00000010 (use channels 1-3 for tune) 1DF7 8E 91 1E ... STX &1E91 .channels to play counter? channel playing loop 1DFA AE 91 1E ... LDX &1E91 .channels to play counter? 1DFD DE 92 1E ... DEC &1E92,X .music channel play clock (plays at zero) 1E00 D0 4A .J BNE &1E4C .branch if not zero, don't play - play next channel 1E02 BC 95 1E ... LDY &1E95,X .music channel playing pointer base 1E05 B9 DD DD ... LDA &DDDD,Y .self modifying address (set to #&1EE7 at &1e74) 1E08 F0 42 .B BEQ &1E4C .zero means the end of the tune... (play next channel) A = note to play (non zero) 1E0A FE 95 1E ... INC &1E95,X .music channel playing pointer base++ (skip the note) 1E0D 48 H PHA .save the note 1E0E 29 3F )? AND #&3F (63) .00111111 get bits 0-5 (the note to play) 1E10 C9 3F .? CMP #&3F (63) .00111111 1E12 F0 28 .( BEQ &1E3C .branch if the bottom 6 bits are all 1 (no note to play) ok A is note, X = channel 1E14 68 h PLA .restore the note 1E15 48 H PHA .save it again 1E16 0A . ASL A *2 . 1E17 0A . ASL A *4 .note *4 = pitch (lose bits 0+1) 1E18 8D 8D 1E ... STA &1E8D .tune note PITCH 1E1B 8A . TXA .adjust channel number 1E1C 18 . CLC . 1E1D 69 11 i. ADC #&11 (17) .00010001 flush channel and play note on channel 1+X 1E1F 8D 89 1E ... STA &1E89 .tune note CHANNEL 1E22 BD B8 1E ... LDA &1EB8,X .music channel volumes 1E25 8D 8B 1E ... STA &1E8B .tune note AMPLITUDE (volume) 1E28 BD CA 1E ... LDA &1ECA,X .music channel note durations 1E2B 8D 8F 1E ... STA &1E8F .tune note DURATION 1E2E 2C 44 06 ,D. BIT &0644 .sound is on flag ($80=on 0=off) 1E31 10 09 .. BPL &1E3C (>= signed) .branch if sound is off - after note play play a note 1E33 A2 89 .. LDX #&89 (137=-119) .10001001 1E35 A0 1E .. LDY #&1E (30) .00011110 1E37 A9 07 .. LDA #&07 (7) .00000111 1E39 20 F1 FF .. JSR &FFF1 .OSWORD after not play (or not) - use bits (6+7) they're the note tempo/length? 1E3C 68 h PLA .restore the note 1E3D 2A * ROL A .bit 7 -> C 1E3E 2A * ROL A .bit 6 -> C -> bit 0 1E3F 2A * ROL A .bit 5 -> C -> bit 1 1E40 29 03 ). AND #&03 (3) .00000011 (bits 6+7, now in bits 0+1) 1E42 AA . TAX .to X 1E43 BD 98 1E ... LDA &1E98,X .music note tempos? (delay for next note play) 1E46 AE 91 1E ... LDX &1E91 .channels to play counter? 1E49 9D 92 1E ... STA &1E92,X .music channel play clock (plays at zero) play next channel 1E4C CE 91 1E ... DEC &1E91 .channels to play counter? 1E4F 10 A9 .. BPL &1DFA (>= signed) .branch if a channel left to play (channel playing loop) 1E51 60 ` RTS . see if tune finished? basically see if the latest note pointed to on all channels is zero.... returns Z=0 if done 1E52 AD 06 1E ... LDA &1E06 .tune base LSB 1E55 8D 68 1E .h. STA &1E68 .copy tune base LSB 1E58 AD 07 1E ... LDA &1E07 .tune base MSB 1E5B 8D 69 1E .i. STA &1E69 .copy tune base MSB 1E5E A2 02 .. LDX #&02 (2) .00000010 1E60 A9 00 .. LDA #&00 (0) .00000000 1E62 08 . PHP .push zero flag set test note loop 1E63 BC 95 1E ... LDY &1E95,X .music channel playing pointer base 1E66 28 ( PLP .pop zero flag set 1E67 19 FF FF ... ORA &FFFF,Y .self modifying address copy of tune base, see if the next note is zero (finished tune) or not 1E6A 08 . PHP .push zero flag set 1E6B CA . DEX . 1E6C 10 F5 .. BPL &1E63 (>= signed) .try next channel 1E6E 28 ( PLP .pop zero flag set 1E6F 60 ` RTS . Initialise tune to blank, and flush keyboard buffer 1E70 A2 E7 .. LDX #&E7 (231=-25) .11100111 1E72 A0 1E .. LDY #&1E (30) .00011110 1E74 8E 06 1E ... STX &1E06 .adjust self modifying address to be #&1EE7 (which is zero) 1E77 8C 07 1E ... STY &1E07 .tune base MSB 1E7A A9 00 .. LDA #&00 (0) .00000000 1E7C A2 03 .. LDX #&03 (3) .00000011 make all music channel playing pointer base values be zero too 1E7E 9D 94 1E ... STA &1E94,X .blank &1e95-1e97 inclusive (reset the music channel playing pointer bases) 1E81 CA . DEX . 1E82 D0 FA .. BNE &1E7E . 1E84 A9 0F .. LDA #&0F (15) .00001111 *FX 15,0 1E86 4C F4 FF L.. JMP &FFF4 .OSBYTE sound for tune 1E89 DD 00 CHANNEL 1E8B DD 00 AMPLITUDE (volume) 1E8D DD 00 PITCH 1E8F DD DURATION 1E90 00 . 1E91 00 . music channel play clock (plays at zero) 1E92 30 31 32 012 music channel playing pointer base's 1E95 30 31 32 012 music note tempos? 1E98 30 31 32 33 channel tempos 1E9C 05 0A 0F 14 0123.... 1EA0 64 60 5D 01 07 0E 15 1C 08 10 18 20 09 12 1B 24 d`]........ ...$ 1EB0 04 08 0C 10 03 06 09 0C 30 31 32 channel volumes 1EBB 05 06 07 06 06 ........012..... 1EC0 06 04 04 04 08 08 08 06 06 05 30 31 32 channel durations 1ECD 0A 01 01 ..........012... 1ED0 05 03 02 32 32 32 01 03 0A 02 03 0E 1EDC 73 74 73 71 ...222......stsq 1EE0 73 71 6F 6E EC E7 20 1EE7 00 Game over tune data 1EE8 7F 7F 33 2F 2C 27 2F 2C sqon.. ...3/,'/, 1EF0 27 23 2C 27 23 20 27 23 20 1B 23 20 1B 17 1B 19 '#,'# '# .# .... 1F00 17 16 14 08 08 08 08 00 C8 D4 48 48 D4 48 48 54 ..........HH.HHT 1F10 48 48 00 Wahhh Wahhh tune data 1F13 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC HH.............. 1F20 CD CE CF D0 D1 D2 D3 14 D5 00 C0 C1 C2 C3 C4 C5 ................ 1F30 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 ................ 1F40 D6 D7 58 D9 00 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA ..X............. 1F50 CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA ................ 1F60 9B DC 00 Main game theme (dum dum diddly tune) tune data 1F63 88 08 48 88 08 C8 48 48 48 48 48 8B 0B .....H...HHHHH.. 1F70 4B 8B 0B CB 4D 4D 4D 4D 4D 08 00 8B 0B 4B 8B 0B K...MMMMM....K.. 1F80 CB 4B 4B 4B 4B 4B 8F 0F 4F 8F 0F CF 51 51 51 51 .KKKKK..O...QQQQ 1F90 51 0B 00 8F 0F 4F 8F 0F CF 4F 4F 4F 4F 4F 92 12 Q....O...OOOOO.. 1FA0 52 92 12 D2 54 54 54 54 54 0F 00 Demo theme section 1+2 tune data (channel 3 base differs) 1FAB 14 14 14 14 14 R...TTTTT....... 1FB0 14 14 14 54 54 54 54 D4 54 D4 54 D4 20 20 20 20 ...TTTT.T.T. 1FC0 20 20 20 20 60 60 60 60 E0 60 E0 60 E0 1E 1E 1E ````.`.`.... 1FD0 1E 1E 1E 1E 1E 5E 5E 5E 5E DE 5E DB 5B D9 1B 1B .....^^^^.^.[... 1FE0 1B 1B 1B 1B 1B 1B 1B 1B 1B 1B 1B 1B 1B 1B DB DB ................ 1FF0 5B 5B DB 00 Demo theme section 3 tune data 1FF4 C8 FF CF FF C8 C8 CF FF D0 FF D7 FF [[.............. 2000 D0 D0 D7 FF CB FF D7 FF CB CB D7 FF CF FF DB FF ................ 2010 4F 5B 4F 4D CB CA 3F 00 D4 FF D7 FF DB FF DE FF O[OM..?......... 2020 DC FF FF FF FF FF FF 5E 60 DE FF FF FF DB D9 D7 .......^`....... 2030 D4 D6 FF FF FF D3 FF CF 10 11 12 13 3F 00 00 00 ............?... Demo theme section 4 tune data 2040 2C 28 25 20 28 25 20 1C 25 20 1C 19 20 1C 19 14 ,(% (% .% .. ... 2050 1C 19 14 10 19 14 10 0D 14 10 0D 08 10 0D 08 04 ................ 2060 06 0B 0F 12 0B 0F 12 17 0F 12 17 1B 12 17 1B 1E ................ 2070 17 1B 1E 23 1B 1E 23 27 1E 23 27 2A 23 27 2A 2F ...#..#'.#'*#'*/ 2080 2D 28 25 21 28 25 21 1C 25 21 1C 19 21 1C 19 15 -(%!(%!.%!..!... 2090 1C 19 15 10 19 15 10 0D 15 10 0D 09 10 0D 09 04 ................ 20A0 E8 EA E8 E7 E8 E7 E5 E3 00 D9 FF FF FF FF DB DC ................ 20B0 DE FF DC FF DB FF D7 FF D9 FF FF FF FF FF FF FF ................ 20C0 FF DC DE FF E0 FF E3 FF FF 00 CD FF D9 FF CD CD ................ 20D0 D9 FF CB FF D7 FF CB CB D7 FF C9 FF D5 FF C9 C9 ................ 20E0 D5 FF C4 D0 C5 D1 C6 D2 C7 D3 3F 00 dying tune data 20EC 48 48 14 48 ..........?.HH.H 20F0 08 48 48 14 48 08 4B 4B 12 4B 0B 4B 4B 12 4B 0B .HH.H.KK.K.KK.K. 2100 4D 4D 14 4D 0D 4D 4D 14 4D 0D 50 50 14 50 10 50 MM.M.MM.M.PP.P.P 2110 50 14 50 10 00 03 08 0B 0F 14 0F 0B 08 03 08 0B P.P............. 2120 0F 14 0F 0B 08 03 06 0B 0F 12 0F 0B 06 03 06 0B ................ 2130 0F 12 0F 0B 06 04 08 0D 10 14 10 0D 08 04 08 0D ................ 2140 10 14 10 0D 08 04 08 0B 10 14 10 0B 08 04 08 0B ................ 2150 10 14 10 0B 08 3F 00 60 A0 60 1E 60 A0 1B 1E 20 .....?.`.`.`... 2160 63 A3 63 1E 63 A3 1E 20 23 65 A5 65 25 65 A5 65 c.c.c.. #e.e%e.e 2170 24 63 A3 63 22 63 23 22 23 25 23 22 00 $c.c"c#"#%#". tune data setup lookups 217D 63 1F 18 c.. 2180 30 17 05 05 13 1F 17 32 07 08 08 E8 1E 01 02 17 0......2........ 2190 0B 05 AB 1F 49 6D 1B 0E 0B DC 1E 0E 2C 03 02 02 ....Im......,... 21A0 EC 20 29 6B 03 05 05 AB 1F 49 93 1B 0E 0B F4 1F . )k.....I...... 21B0 24 4B 1B 0E 0B 40 20 8A 69 1B 0E 0E $K...@ .i... Y= 0 7 E 15 1C 23 2A 31 38 tune values | | | | | | | | | 217D,Y 63 13 E8 AB DC EC AB F4 40 LSB 217E,Y 1F 1F 1E 1F 1E 20 1F 1F 20 MSB 217F,Y 18 17 01 49 0E 29 49 24 8A -> 1e96 music channel 2 playing pointer base 2180,Y 30 32 02 6D 2C 6B 93 4B 69 -> 1E97 music channel 3 playing pointer base 2181,Y 17 07 17 1B 03 03 1B 1B 1B -> X offset 1E9C,X base tempo offsets 2182,Y 05 08 0B 0E 02 05 0E 0E 0E -> X offset 1EBB,X base volumes offsets 2183,Y 05 08 05 0B 02 05 0B 0B 0E -> X offset &1ECD,X base duration offsets ** ** sections same with different channel 3 playing pointer bases Display big GALAFORCE letters in red 21BC A9 70 LDA #&70 21BE 85 06 STA &06 21C0 A9 F0 LDA #&F0 21C2 85 08 STA &08 21C4 A9 3A .: LDA #&3A (58) .00111010 21C6 85 07 .. STA &07 .(&06) = 3A70 21C8 A9 3C .< LDA #&3C (60) .00111100 21CA 85 09 .. STA &09 .(&08) = 3CF0 21CC A2 00 .. LDX #&00 (0) .00000000 21CE 86 0B .. STX &0B .char offset 21D0 A6 0B .. LDX &0B .char offset 21D2 BD 40 22 .@" LDA &2240,X .get letter at offset 21D5 30 68 0h BMI &223F (< signed) .(RTS) 21D7 85 04 .. STA &04 .save letter byte 21D9 0A . ASL A *2 . 21DA 0A . ASL A *4 . 21DB 18 . CLC . 21DC 65 04 e. ADC &04 .letter byte *5 21DE AA . TAX .to X 21DF A9 05 .. LDA #&05 (5) .00000101 21E1 85 0A .. STA &0A .columns left to plot 21E3 BD 00 07 ... LDA &0700,X .text byte lookups 21E6 85 04 .. STA &04 .save text byte 21E8 A9 04 .. LDA #&04 (4) .00000100 21EA 85 05 .. STA &05 .rows left to plot (does 2 lots of 4 pixels (doubles width + height) 21EC A0 00 .. LDY #&00 (0) .00000000 21EE 46 04 F. LSR &04 .text btye right most pixel to C 21F0 90 0E .. BCC &2200 (< unsigned) .branch if no pixel plot 2 red pixels across, 2 red pixels down (top half) 21F2 A9 03 .. LDA #&03 (3) .00000011 2 red pixels 21F4 51 06 Q. EOR (&06),Y . 21F6 91 06 .. STA (&06),Y . 21F8 C8 . INY .to next row 21F9 A9 03 .. LDA #&03 (3) .00000011 2 red pixels 21FB 51 06 Q. EOR (&06),Y . 21FD 91 06 .. STA (&06),Y . 21FF 88 . DEY .back to first row 2200 A9 08 .. LDA #&08 (8) .00001000 2202 25 04 %. AND &04 .is text byte bit 4 set? 2204 F0 0E .. BEQ &2214 .branch if not plot 2 red pixels across, 2 red pixels down (bottom half) 2206 A9 03 .. LDA #&03 (3) .00000011 2 red pixels 2208 51 08 Q. EOR (&08),Y . 220A 91 08 .. STA (&08),Y . 220C C8 . INY .to next row 220D A9 03 .. LDA #&03 (3) .00000011 2 red pixels 220F 51 08 Q. EOR (&08),Y . 2211 91 08 .. STA (&08),Y . 2213 88 . DEY .back to first row 2214 C8 . INY .skip first row 2215 C8 . INY .skip second row 2216 C6 05 .. DEC &05 .rows left to plot-- 2218 D0 D4 .. BNE &21EE .do more pixels 221A 20 29 22 )" JSR &2229 .move to next columns on screen 221D E8 . INX . 221E C6 0A .. DEC &0A .columns left to plot-- 2220 D0 C1 .. BNE &21E3 . 2222 20 29 22 )" JSR &2229 .move to next column on screen (character gap) 2225 E6 0B .. INC &0B .move to next char (char offset++) 2227 D0 A7 .. BNE &21D0 .branch always move to next columns on screen 2229 A5 06 .. LDA &06 . 222B 18 . CLC . 222C 69 08 i. ADC #&08 (8) .00001000 222E 85 06 .. STA &06 . 2230 90 02 .. BCC &2234 (< unsigned) . 2232 E6 07 .. INC &07 . 2234 A5 08 .. LDA &08 . 2236 18 . CLC . 2237 69 08 i. ADC #&08 (8) .00001000 2239 85 08 .. STA &08 . 223B 90 02 .. BCC &223F (< unsigned) .(RTS) 223D E6 09 .. INC &09 . 223F 60 ` RTS . G A L A F O R C E END 2240 10 0A 15 0A 0F 18 1B 0C 0E FF ** ** ** ** ** ** .......... Do Hiscore entry if not demo (and score high enough) 224A 2C 46 06 ,F. BIT &0646 .playing game flag NEGATIVE means not playing (doing demo!) 224D 30 2C 0, BMI &227B (< signed) .(RTS) demo won't get a hiscore entry! (was) playing game - check for new hiscore 224F A2 00 .. LDX #&00 (0) .00000000 2251 86 04 .. STX &04 .Hiscore score table entry counter = 0 Hiscore score loop 2253 BD F9 23 ..# LDA &23F9,X .lookup table: offsets for hiscore names (offset*10-1) 2256 85 06 .. STA &06 .offset for this hiscore name 2258 BC F1 23 ..# LDY &23F1,X .lookup table: offsets for hiscore digits (offset*7-1) 225B 84 05 .. STY &05 .offset for this hiscore digits 225D A2 FF .. LDX #&FF (255=-1) .11111111 offset for score digits check digits loop 225F C8 . INY .offsets for hiscore digits++ 2260 E8 . INX .offset for score digits++ 2261 E0 07 .. CPX #&07 (7) .00000111 2263 F0 17 .. BEQ &227C .we got to the last digit, and they're all equal... so enter new hiscore 2265 BD 2D 06 .-. LDA &062D,X .score digits (8) 2268 29 7F ). AND #&7F (127) .01111111 226A D9 9D 06 ... CMP &069D,Y .Hiscores, 7 score digits (highest score first) 226D F0 F0 .. BEQ &225F .equal, check another digit loop 226F 90 02 .. BCC &2273 (< unsigned) .less than, check next hiscore 2271 D0 09 .. BNE &227C .digit greater than, so enter new hiscore check next hiscore 2273 E6 04 .. INC &04 .Hiscore score table entry counter++ 2275 A6 04 .. LDX &04 .Hiscore score table entry counter 2277 E0 08 .. CPX #&08 (8) .00001000 done all hiscores? 2279 90 D8 .. BCC &2253 (< unsigned) .do another Hiscore score loop 227B 60 ` RTS .RTS if score not high enough for a place in the table lookup table: offsets for hiscore digits (offset*7-1) 23F1 FF 06 0D 14 1B 22 29 30 .....")0 lookup table: offsets for hiscore names (offset*10-1) 23F9 FF 09 13 1D 27 31 3B 45 ....'1;E enter new hiscore (score is greater than or equal to a hiscore table entry) 227C A5 05 .. LDA &05 .offset for this hiscore digits 227E C9 30 .0 CMP #&30 (48) .00110000 2280 F0 1A .. BEQ &229C .branch if it is the last score in the table shuffle the scores, make room for the new hiscore 2282 A0 30 .0 LDY #&30 (48) .00110000 last digit of high scores offset shuffle digits loop 2284 B9 9D 06 ... LDA &069D,Y .Hiscores, 7 score digits (highest score first) 2287 99 A4 06 ... STA &06A4,Y .Hiscores, 7 score digits (second highest score first) 228A 88 . DEY . 228B C4 05 .. CPY &05 .offset for this hiscore digits 228D D0 F5 .. BNE &2284 .if not copied all digits to new hiscore space, shuffle another digit 228F A0 45 .E LDY #&45 (69) .01000101 last char of the high score names shuffle chars loop 2291 B9 4D 06 .M. LDA &064D,Y .Hiscores, score names (highest score first) 2294 99 57 06 .W. STA &0657,Y .Hiscores, score names 10 chars max (second highest score first) 2297 88 . DEY . 2298 C4 06 .. CPY &06 .offset for this hiscore name 229A D0 F5 .. BNE &2291 .if not copied all chars to new hiscore space, shuffle another character ok hiscores are shuffled 229C A2 00 .. LDX #&00 (0) .00000000 229E A4 05 .. LDY &05 .offset for this hiscore digits 22A0 C8 . INY .+1 copy score to hiscore gap loop 22A1 BD 2D 06 .-. LDA &062D,X .score digits (8) 22A4 29 7F ). AND #&7F (127) .01111111 22A6 99 9D 06 ... STA &069D,Y .Hiscores, 7 score digits (highest score first) 22A9 C8 . INY . 22AA E8 . INX . 22AB E0 07 .. CPX #&07 (7) .00000111 22AD D0 F2 .. BNE &22A1 .branch if we haven't copied all 7 digits 22AF A2 09 .. LDX #&09 (9) .00001001 10 chars 22B1 A4 06 .. LDY &06 .offset for this hiscore name 22B3 C8 . INY .+1 22B4 98 . TYA .offset to A 22B5 48 H PHA .push offset 22B6 A9 26 .& LDA #&26 (38) .00100110 space character blank the high score name loop 22B8 99 4D 06 .M. STA &064D,Y .Hiscores, score names (highest score first) - entered text "string" 22BB C8 . INY . 22BC CA . DEX . 22BD 10 F9 .. BPL &22B8 (>= signed) .blank all 10 name chars 22BF A5 04 .. LDA &04 .Hiscore score counter 22C1 0A . ASL A *2 . 22C2 0A . ASL A *4 . 22C3 0A . ASL A *8 . 22C4 0A . ASL A *16 .*16 22C5 18 . CLC . 22C6 69 48 iH ADC #&48 (72) .01001000 22C8 48 H PHA .push Y pos on screen of the highscore row 22C9 20 EB 22 ." JSR &22EB .display the hiscore table plot it 22CC A0 24 .$ LDY #&24 (36) .Message 24 Col 3C String Offset 1C52 = "ENTER YOUR NAME" at $3D00 (16,32) 22CE 20 E1 1A .. JSR &1AE1 .print/remove Message Y (at fixed position) [display it] 22D1 68 h PLA .pop Y pos on screen of the highscore row 22D2 A8 . TAY .to Y 22D3 A2 29 .) LDX #&29 (41) .00101001 X pos = 29 22D5 20 A7 12 .. JSR &12A7 .calc X,Y into screen coords 22D8 8D 35 1C .5. STA &1C35 .hiscore entered char MSB 22DB 8E 34 1C .4. STX &1C34 .hiscore entered char LSB 22DE 68 h PLA .pop offset 22DF AA . TAX .offset to X 22E0 20 4C 23 L# JSR &234C .Enter name for hiscore at highscore name offset X 22E3 A0 24 .$ LDY #&24 (36) .Message 24 Col 3C String Offset 1C52 = "ENTER YOUR NAME" at $3D00 (16,32) 22E5 20 E1 1A .. JSR &1AE1 .print/remove Message Y (at fixed position) [remove it] 22E8 4C EB 22 L." JMP &22EB .display the hiscore table remove it display the hiscore table (plot/remove) 22EB A9 00 .. LDA #&00 (0) .00000000 22ED 85 0C .. STA &0C .zero highscore display counter 22EF A9 46 .F LDA #&46 (70) .01000110 22F1 8D 3A 1C .:. STA &1C3A .hiscore row display MSB 22F4 A9 C0 .. LDA #&C0 (192=-64) .11000000 22F6 8D 39 1C .9. STA &1C39 .hiscore row display LSB display hiscore table row loop 22F9 A6 0C .. LDX &0C .highscore display counter 22FB E8 . INX .+1 22FC 8E 3D 1C .=. STX &1C3D .hiscore row display - highscore rank# 22FF CA . DEX .-1 2300 BC F1 23 ..# LDY &23F1,X .lookup table: offsets for hiscore digits (offset*7-1) 2303 C8 . INY .+1 2304 A2 00 .. LDX #&00 (0) .00000000 2306 86 0D .. STX &0D .found non zero digit flag copy digits to high score display message 2308 B9 9D 06 ... LDA &069D,Y .Hiscores, 7 score digits (highest score first) 230B D0 08 .. BNE &2315 .branch if the digit Y isn't zero (display the digit) digit Y is zero 230D C5 0D .. CMP &0D .found non zero digit flag 230F D0 04 .. BNE &2315 .branch if we have (display the digit) if we haven't found a non zero digit yet, display leading spaces 2311 A9 26 .& LDA #&26 (38) .00100110 SPACE 2313 D0 03 .. BNE &2318 .branch always (display the space) digit Y is not zero 2315 38 8 SEC . 2316 66 0D f. ROR &0D .set found non zero digit flag 2318 9D 3F 1C .?. STA &1C3F,X .hiscore row display - highscore score (put char in high score display row message) 231B C8 . INY . 231C E8 . INX . 231D E0 07 .. CPX #&07 (7) .00000111 231F D0 E7 .. BNE &2308 .branch if not copied all digits to display message copy chars to high score name display message 2321 A6 0C .. LDX &0C .highscore display counter 2323 BC F9 23 ..# LDY &23F9,X .lookup table: offsets for hiscore names (offset*10-1) 2326 C8 . INY .+1 2327 A2 00 .. LDX #&00 (0) .00000000 copy names loop 2329 B9 4D 06 .M. LDA &064D,Y .Hiscores, score names (highest score first) - entered text "string" 232C 9D 48 1C .H. STA &1C48,X .entered text -> message buffer to display it 232F C8 . INY . 2330 E8 . INX . 2331 E0 0A .. CPX #&0A (10) .00001010 copy input chars to print message buffer 2333 D0 F4 .. BNE &2329 .do loop again if not copied all the high score name chars 2335 A0 22 ." LDY #&22 (34) .Message 22 Col 03 String Offset 1C39 = "0 ******* **********" at $FFFF (55,528) (display a hiscore table row) 2337 20 E1 1A .. JSR &1AE1 .print/remove Message Y (at fixed position) 233A AD 3A 1C .:. LDA &1C3A .hiscore row display MSB 233D 18 . CLC . 233E 69 05 i. ADC #&05 (5) .00000101 (move down 2 rows &500) 2340 8D 3A 1C .:. STA &1C3A .hiscore row display MSB do next high score row display 2343 E6 0C .. INC &0C .highscore display counter 2345 A5 0C .. LDA &0C .highscore display counter 2347 C9 08 .. CMP #&08 (8) .00001000 2349 90 AE .. BCC &22F9 (< unsigned) .branch if we haven't displayed all the rows, display hiscore table row loop 234B 60 ` RTS . Enter name for hiscore at highscore name offset X 234C A0 0A .. LDY #&0A (10) .00001010 y=chars left to enter 234E D0 05 .. BNE &2355 .branch always error, do a beep, enter new char 2350 A9 07 .. LDA #&07 (7) .00000111 beep 2352 20 EE FF .. JSR &FFEE .OSWRCH output a character to the VDU stream enter a char loop 2355 86 0C .. STX &0C .chars left to enter 2357 84 0D .. STY &0D .high score name char offset 2359 A9 15 .. LDA #&15 (21) .00010101 235B A2 00 .. LDX #&00 (0) .00000000 235D 20 F4 FF .. JSR &FFF4 .OSBYTE clear keyboard buffer no key pressed loop 2360 20 49 18 I. JSR &1849 .update the stars (unplot 16, move them down, and replot) 2363 A9 7E .~ LDA #&7E (126) .01111110 2365 20 F4 FF .. JSR &FFF4 .OSBYTE acknowldge ESCAPE 2368 A9 81 .. LDA #&81 (129=-127) .10000001 236A A2 02 .. LDX #&02 (2) .00000010 wait 200 centiseconds for a key press 236C A0 00 .. LDY #&00 (0) .00000000 236E 20 F4 FF .. JSR &FFF4 .OSBYTE 2371 B0 ED .. BCS &2360 (>= unsigned) .branch if no key pressed 2373 8A . TXA .char to A 2374 A6 0C .. LDX &0C .chars left to enter 2376 A4 0D .. LDY &0D .high score name char offset 2378 C9 0D .. CMP #&0D (13) .00001101 237A F0 41 .A BEQ &23BD .(RTS) - name entered 237C C9 7F .. CMP #&7F (127) .01111111 237E F0 3E .> BEQ &23BE .delete char a char entered, not delete or return 2380 C0 00 .. CPY #&00 (0) .00000000 2382 F0 CC .. BEQ &2350 . error, do a beep, enter new char (entered max number of chars) a char entered, not delete or return, and room for a char 2384 C9 20 . CMP #&20 (32) .00100000 2386 D0 04 .. BNE &238C .branch if not space entered its a space - convert it to display space 2388 A9 26 .& LDA #&26 (38) .00100110 #&26= a space to display 238A D0 16 .. BNE &23A2 .branch always - valid char entered check if its a char 238C C9 41 .A CMP #&41 (65) .01000001 238E 90 08 .. BCC &2398 (< unsigned) .branch < a letter, check if its a digit 2390 C9 5B .[ CMP #&5B (91) .01011011 2392 B0 BC .. BCS &2350 (>= unsigned) .if >Z.... error, do a beep, enter new char its a char 2394 E9 36 .6 SBC #&36 (54) .00110110 adjust the char to display it (c clear) 2396 D0 0A .. BNE &23A2 .branch always letters = 11-37 &b-&25 - valid char entered check if its a digit 2398 C9 30 .0 CMP #&30 (48) .00110000 239A 90 B4 .. BCC &2350 (< unsigned) .error, do a beep, enter new char 239C C9 3A .: CMP #&3A (58) .00111010 239E B0 B0 .. BCS &2350 (>= unsigned) .error, do a beep, enter new char its a digit 23A0 E9 2F ./ SBC #&2F (47) .00101111 (c clear) valid char entered 23A2 8D 38 1C .8. STA &1C38 .numbers = 1-10 (to display 0-9) hiscore entered char to display 23A5 9D 4D 06 .M. STA &064D,X .Hiscores, score names (highest score first) - entered text "string" 23A8 20 E3 23 .# JSR &23E3 .display/remove char of entered text (show char) move cursor to next char position 23AB AD 34 1C .4. LDA &1C34 .hiscore entered char LSB 23AE 18 . CLC . 23AF 69 18 i. ADC #&18 (24) .00011000 move to next char position 23B1 8D 34 1C .4. STA &1C34 .hiscore entered char LSB 23B4 90 03 .. BCC &23B9 (< unsigned) . 23B6 EE 35 1C .5. INC &1C35 .hiscore entered char MSB 23B9 E8 . INX .buffer offset for next char++ 23BA 88 . DEY .y=chars left to enter -- 23BB 10 98 .. BPL &2355 (>= signed) .branch always - enter a char loop 23BD 60 ` RTS . delete char 23BE C0 0A .. CPY #&0A (10) .00001010 y=chars left to enter 23C0 F0 8E .. BEQ &2350 .nothing to delete error, do a beep, enter new char move cursor to previous char position 23C2 AD 34 1C .4. LDA &1C34 .hiscore entered char LSB 23C5 38 8 SEC . 23C6 E9 18 .. SBC #&18 (24) .00011000 move to previous char position 23C8 8D 34 1C .4. STA &1C34 .hiscore entered char LSB 23CB B0 03 .. BCS &23D0 (>= unsigned) . 23CD CE 35 1C .5. DEC &1C35 .hiscore entered char MSB 23D0 C8 . INY . 23D1 CA . DEX . 23D2 BD 4D 06 .M. LDA &064D,X .Hiscores, score names (highest score first) - entered text "string" 23D5 8D 38 1C .8. STA &1C38 .hiscore entered char to display 23D8 20 E3 23 .# JSR &23E3 .display/remove char of entered text (remove char) 23DB A9 26 .& LDA #&26 (38) .00100110 space 23DD 9D 4D 06 .M. STA &064D,X .Hiscores, score names (highest score first) - entered text "string" (blank char in name) 23E0 4C 55 23 LU# JMP &2355 .enter a char loop display/remove char of entered text 23E3 8A . TXA . 23E4 48 H PHA .save X 23E5 98 . TYA . 23E6 48 H PHA .save Y 23E7 A0 20 . LDY #&20 (32) .Message 20 Col 03 String Offset 1C34 = "*" at $FFFF (55,528) (display a hiscore table input char) 23E9 20 E1 1A .. JSR &1AE1 .print/remove Message Y (at fixed position) 23EC 68 h PLA . 23ED A8 . TAY .restore X 23EE 68 h PLA . 23EF AA . TAX .restore Y 23F0 60 ` RTS . lookup table: offsets for hiscore digits (offset*7-1) 23F1 FF 06 0D 14 1B 22 29 30 .....")0 lookup table: offsets for hiscore names (offset*10-1) 23F9 FF 09 13 1D 27 31 3B 45 ....'1;E ZONES (first number, number of aliens) wave numbers ($ff) Zone 0 2401 0A 00 02 2B 01 0B 0A FF Zone 1 2409 08 06 07 06 07 04 FF E...+........... Zone 2 2410 0A 05 08 09 0D 0E FF Zone 3 2417 08 0A 0B 17 18 02 03 2D FF ..............-. Zone 4 (pack of cards last bit) 2420 0A 10 11 12 0F 05 1B FF Zone 5 2428 0A 06 07 06 07 0C 13 14 ................ 2430 FF Zone 6 2431 08 0A 0B 0A 0B 02 03 FF Zone 7 2439 08 0D 0E 15 16 17 18 ................ 2440 2D FF Zone 8 2442 0A 04 04 00 01 05 11 12 FF Zone 9 244B 07 08 09 0C 2C -.............., 2450 02 FF Zone 10 2452 08 19 1A 0F 10 1D FF Zone 11 2459 0A 1B 1C 0C 25 26 1C .............%&. 2460 2D FF Zone 12 2462 0A 1D 1E 08 09 1F 20 FF Zone 13 246A 08 21 22 0F 10 19 -....... ..!"... 2470 1A FF Zone 14 2472 08 17 18 23 24 15 16 FF Zone 15 247A 08 27 28 03 0A 0B .....#$....'(... 2480 29 2A 2D FF waves :number spawners if spawn X is negative then copy wave (# and #&7f) instead Spawn X, Spawn Y, Timer, number of aliens, Spawn X Velocity, Spawn Y Velocity, Spawn alien type, spawn alien pattern Wave 0 2484 01 00 32 05 14 00 05 0C 00 )*-...2...... Wave 1 248D 01 49 32 .I2 2490 05 14 00 05 0C 80 Wave 2 2496 01 0C 18 04 1E 00 00 12 01 ............... Wave 3 249F 01 . 24A0 3E 18 04 1E 00 00 12 81 >....... Wave 4 24A8 02 00 FF 14 02 08 E8 14 ........ 24B0 02 4A FF 14 02 F8 E8 14 82 .J....... Wave 5 24B9 01 06 28 32 04 00 10 ..(2... 24C0 18 04 .. Wave 6 24C2 02 00 E7 08 0A 00 00 18 05 07 E7 08 0A 00 .............. 24D0 00 14 05 ... Wave 7 24D3 02 49 E7 08 0A 00 00 18 85 42 E7 08 0A .I.......B... 24E0 00 00 14 85 .... Wave 8 24E4 01 24 20 06 0F 00 00 14 06 .J....... Wave 9 24ED 01 26 20 ..& 24F0 06 0F 00 00 14 86 ...... Wave 10 24F6 01 00 20 05 08 00 00 10 07 .. ...... Wave 11 24FF 01 . 2500 49 20 05 08 00 00 10 87 I ...... Wave 12 2508 02 21 20 06 0C 00 00 1E .! ..... 2510 08 29 20 06 0C 00 00 1E 88 .) ...... Wave 13 2519 01 00 82 06 10 00 00 ....... 2520 0C 09 .. Wave 14 2522 01 4A 82 06 10 00 00 0C 89 .J....... Wave 15 252B 01 00 D2 05 0C ..... 2530 00 00 12 0A .... Wave 16 2534 01 4A D2 05 0C 00 00 12 8A .J....... Wave 17 253D 01 00 20 .. 2540 07 0C 00 00 0E 0B ...... Wave 18 2546 01 4A 20 07 0C 00 00 0E 8B .J ...... Wave 19 254F 01 . 2550 30 20 05 0A 00 00 10 0D 0 ...... Wave 20 2558 01 1B 20 05 0A 00 00 10 .. ..... 2560 8D . Wave 21 2561 01 00 20 05 08 00 00 14 0E .. ...... Wave 22 256A 01 4A 20 05 08 00 .J ... 2570 00 14 8E ... Wave 23 2573 01 02 FF 03 14 00 00 14 0F ......... Wave 24 257C 01 48 FF 03 .H.. 2580 14 00 00 14 8F ..... Wave 25 2585 01 06 FF 03 10 00 00 10 10 ......... Wave 26 258E 01 45 .E 2590 FF 03 10 00 00 10 90 ....... Wave 27 2597 01 00 20 04 0E 00 00 12 11 .. ...... Wave 28 25A0 01 4A 20 04 0E 00 00 12 91 .J ...... Wave 29 25A9 01 00 20 02 15 03 00 .. .... 25B0 14 12 .. Wave 30 25B2 01 4A 20 02 15 FD 00 14 92 .J ...... Wave 31 25BB 01 49 20 04 0C .I .. 25C0 00 00 20 13 Wave 32 25C4 01 01 20 04 0C 00 00 20 93 .. ... .... . Wave 33 25CD 01 4E 20 .N 25D0 08 14 00 00 12 14 ...... Wave 34 25D6 01 4F 20 08 14 00 00 12 94 .O ...... Wave 35 25DF 01 . 25E0 4A 20 04 0E 00 00 22 15 J ....". Wave 36 25E8 01 00 20 04 0E 00 00 22 .. ...." 25F0 95 . Wave 37 25F1 01 02 20 04 12 00 00 10 16 .. ...... Wave 38 25FA 01 48 20 04 12 00 .H ... 2600 00 10 96 ... Wave 39 2603 01 4E 20 05 0C 00 00 14 17 .N ...... Wave 40 260C 01 4F 20 05 .O . 2610 0C 00 00 14 97 ..... Wave 41 2615 01 00 20 04 13 02 00 0C 18 .. ...... Wave 42 261E 01 4A .J 2620 20 04 13 FE 00 0C 98 ...... Wave 43 2627 02 4E 20 10 14 00 00 10 19 .N ...... 2630 4F 20 0E 14 00 00 10 99 O ...... Wave 44 2638 02 4E 20 08 14 00 00 12 .N ..... 2640 1A 4F 20 08 14 00 00 12 9A .O ...... Wave 45 2649 03 00 28 01 01 00 00 ..(.... 2650 16 1D 00 48 04 10 00 00 1A 1B 00 60 04 0F 00 00 ...H.......`.... 2660 1C 1C .. Pattern #0 2662 86 09 83 0C 0A 01 86 0D 86 0C 0C 83 0D 06 .............. Pattern #1 2670 97 0D 94 0B 98 0C 06 ....... Pattern #2 2677 88 0C 88 0F 88 0C 0A 64 84 .......d. 2680 01 04 03 84 03 0C 06 ....... Pattern #3 2687 88 09 83 0A 88 0B 83 0A 00 ......... 2690 00 . Pattern #4 2691 0A 02 87 09 04 0C 0C 87 09 87 0B 0A 02 04 0C ............... 26A0 87 0B 0C 00 00 ..... Pattern #5 26A5 8D 0C 88 00 84 03 88 06 88 05 8D ........... 26B0 14 06 .. Pattern #6 26B2 84 12 85 09 86 12 88 09 85 12 86 09 06 ............. Pattern #7 26BF 93 . 26C0 0D 88 09 82 04 87 07 86 0F 87 17 06 ............ Pattern #8 26CC 88 0A 84 15 .... 26D0 86 0A 84 05 82 01 84 04 88 0C 84 08 8B 0F 06 ............... Pattern #9 26DF 85 . 26E0 09 85 0C 85 08 85 07 85 03 87 06 86 02 8E 0D 89 ................ 26F0 11 8A 0D 06 .... Pattern #10 26F4 83 14 83 18 84 10 84 08 84 04 84 01 ............ 2700 82 09 88 05 8A 0D 87 15 85 0A 06 ........... Pattern #11 270B 86 0D 84 05 85 ..... 2710 09 86 34 89 09 89 31 84 0A 84 0E 85 36 87 0B 93 ..4...1.....6... 2720 33 06 3. Pattern #12 2722 88 06 85 01 8F 05 8F 06 88 05 85 03 00 00 .............. Pattern #13 2730 88 0E 85 36 85 0B 84 33 85 08 85 34 83 09 87 0D ...6...3...4.... 2740 85 15 87 1D 06 ..... Pattern #14 2745 0A 01 8C 0D 83 31 82 09 82 34 81 .....1...4. 2750 0B 82 30 81 08 82 37 82 0F 83 0B 82 36 81 0E 82 ..0...7.....6... 2760 32 82 35 0C 87 0D 06 2.5.... Pattern #15 2767 87 10 85 30 83 0C 85 34 86 ...0...4. 2770 11 85 31 83 0D 85 35 88 12 06 ..1...5... Pattern #16 277A 8D 30 82 34 82 09 .0.4.. 2780 82 31 82 0D 82 35 82 0A 82 32 82 0E 82 36 82 0B .1...5...2...6.. 2790 82 33 82 0F 82 37 82 08 82 30 82 0C 82 34 82 09 .3...7...0...4.. 27A0 82 31 8E 35 06 Pattern #17 27A5 8D 15 83 31 84 09 85 0C 84 08 83 .1.5....1....... 27B0 0F 83 17 84 0F 83 0B 84 0E 83 16 83 0E 84 0A 85 ................ 27C0 0D 84 09 83 34 8D 14 82 08 06 ....4...... Pattern #18 27CA 86 0D 86 0E 00 00 ..... Pattern #19 27D0 0A 03 83 12 81 32 0C 85 36 84 0B 96 40 0A 01 85 .....2..6...@... 27E0 0F 84 08 84 0C 83 34 83 09 83 0D 83 0A 83 0E 84 ......4......... 27F0 36 88 0B 0C 83 0F 84 37 8C 08 06 6......7.. Pattern #20 27FB 8C 0A 0A 03 81 ...... 2800 40 08 81 40 0C 89 14 06 @..@.... Pattern #21 2808 94 0E 84 36 85 0B 83 0F ...6.... 2810 83 37 84 08 82 30 84 0C 82 34 8C 09 84 31 83 0D .7...0...4...1.. 2820 83 35 83 0A 83 32 84 0E 83 36 86 13 84 33 86 13 .5...2...6...3.. 2830 06 . Pattern #22 2831 87 12 85 35 83 0D 85 31 86 11 85 34 83 0C 85 ...5...1...4... 2840 30 88 10 06 0... Pattern #23 2844 9D 05 86 09 9D 06 86 0B 00 00 .......... Pattern #24 284E 82 0A .. 2850 83 0D 8D 31 83 0D 82 0A 83 0E 8D 36 83 0E 00 00 ...1.......6.... Pattern #25 2860 90 02 83 09 A0 02 8D 30 06 .......0. Pattern #26 2869 A5 05 90 06 84 01 90 ....... 2870 04 A8 07 06 .... Pattern #27 2874 A4 09 83 0A A4 ..... Pattern #28 (pack of cards?) 287A 0B 83 0A A4 09 83 0A ....... 2880 A4 0B 0E 02 1B ..... Pattern #29 2885 C5 01 C5 03 00 00 ...... Zone data lookup LSB table (16 zones total) 288B 01 09 10 17 20 .... 2890 28 31 39 42 4B 52 59 62 6A 72 7A (19BKRYbjrz Zone data lookup MSB table (16 zones total) 289B 24 24 24 24 24 $$$$$ 28A0 24 24 24 24 24 24 24 24 24 24 24 $$$$$$$$$$$ Zone lookups (16 zones total) 289B=24 288B=01 offset=00 Address = &2401 289C=24 288C=09 offset=01 Address = &2409 289D=24 288D=10 offset=02 Address = &2410 289E=24 288E=17 offset=03 Address = &2417 289F=24 288F=20 offset=04 Address = &2420 28A0=24 2890=28 offset=05 Address = &2428 28A1=24 2891=31 offset=06 Address = &2431 28A2=24 2892=39 offset=07 Address = &2439 28A3=24 2893=42 offset=08 Address = &2442 28A4=24 2894=4B offset=09 Address = &244B 28A5=24 2895=52 offset=0A Address = &2452 28A6=24 2896=59 offset=0B Address = &2459 28A7=24 2897=62 offset=0C Address = &2462 28A8=24 2898=6A offset=0D Address = &246A 28A9=24 2899=72 offset=0E Address = &2472 28AA=24 289A=7A offset=0F Address = &247A Wave loopups LSB (45 waves total) 28AB 84 8D 96 9F A8 ..... 28B0 B9 C2 D3 E4 ED F6 FF 08 19 22 2B 34 3D 46 4F 58 ........."+4=FOX 28C0 61 6A 73 7C 85 8E 97 A0 A9 B2 BB C4 CD D6 DF E8 ajs|............ 28D0 F1 FA 03 0C 15 1E 27 38 49 ......'8I Wave lookups MSB (45 waves total) 28D9 24 24 24 24 24 24 24 $$$$$$$ 28E0 24 24 24 24 24 25 25 25 25 25 25 25 25 25 25 25 $$$$$%%%%%%%%%%% 28F0 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 %%%%%%%%%%%%%%%% 2900 26 26 26 26 26 26 26 &&&&&&& Wave lookups 28D9=24 28AB=84 offset=00 Address = &2484 28DA=24 28AC=8D offset=01 Address = &248D 28DB=24 28AD=96 offset=02 Address = &2496 28DC=24 28AE=9F offset=03 Address = &249F 28DD=24 28AF=A8 offset=04 Address = &24A8 28DE=24 28B0=B9 offset=05 Address = &24B9 28DF=24 28B1=C2 offset=06 Address = &24C2 28E0=24 28B2=D3 offset=07 Address = &24D3 28E1=24 28B3=E4 offset=08 Address = &24E4 28E2=24 28B4=ED offset=09 Address = &24ED 28E3=24 28B5=F6 offset=0A Address = &24F6 28E4=24 28B6=FF offset=0B Address = &24FF 28E5=25 28B7=08 offset=0C Address = &2508 28E6=25 28B8=19 offset=0D Address = &2519 28E7=25 28B9=22 offset=0E Address = &2522 28E8=25 28BA=2B offset=0F Address = &252B 28E9=25 28BB=34 offset=10 Address = &2534 28EA=25 28BC=3D offset=11 Address = &253D 28EB=25 28BD=46 offset=12 Address = &2546 28EC=25 28BE=4F offset=13 Address = &254F 28ED=25 28BF=58 offset=14 Address = &2558 28EE=25 28C0=61 offset=15 Address = &2561 28EF=25 28C1=6A offset=16 Address = &256A 28F0=25 28C2=73 offset=17 Address = &2573 28F1=25 28C3=7C offset=18 Address = &257C 28F2=25 28C4=85 offset=19 Address = &2585 28F3=25 28C5=8E offset=1A Address = &258E 28F4=25 28C6=97 offset=1B Address = &2597 28F5=25 28C7=A0 offset=1C Address = &25A0 28F6=25 28C8=A9 offset=1D Address = &25A9 28F7=25 28C9=B2 offset=1E Address = &25B2 28F8=25 28CA=BB offset=1F Address = &25BB 28F9=25 28CB=C4 offset=20 Address = &25C4 28FA=25 28CC=CD offset=21 Address = &25CD 28FB=25 28CD=D6 offset=22 Address = &25D6 28FC=25 28CE=DF offset=23 Address = &25DF 28FD=25 28CF=E8 offset=24 Address = &25E8 28FE=25 28D0=F1 offset=25 Address = &25F1 28FF=25 28D1=FA offset=26 Address = &25FA 2900=26 28D2=03 offset=27 Address = &2603 2901=26 28D3=0C offset=28 Address = &260C 2902=26 28D4=15 offset=29 Address = &2615 2903=26 28D5=1E offset=2A Address = &261E 2904=26 28D6=27 offset=2B Address = &2627 2905=26 28D7=38 offset=2C Address = &2638 2906=26 28D8=49 offset=2D Address = &2649 pattern lookup LSB table (29 total) copied to 450 2907 62 70 77 87 91 A5 B2 BF CC bpw...... 2910 DF F4 0B 22 30 45 67 7A A5 CA D0 FB 08 31 44 4E ..."0Egz.....1DN 2920 60 69 74 7A 85 `itz. pattern lookup MSB table (29 total) copied to 478 2925 26 26 26 26 26 26 26 26 26 26 26 &&&&&&&&&&& 2930 27 27 27 27 27 27 27 27 27 27 28 28 28 28 28 28 ''''''''''(((((( 2940 28 28 28 Pattern lookups 2925=26 2907=62 offset=00 Address = &2662 2926=26 2908=70 offset=01 Address = &2670 2927=26 2909=77 offset=02 Address = &2677 2928=26 290A=87 offset=03 Address = &2687 2929=26 290B=91 offset=04 Address = &2691 292A=26 290C=A5 offset=05 Address = &26A5 292B=26 290D=B2 offset=06 Address = &26B2 292C=26 290E=BF offset=07 Address = &26BF 292D=26 290F=CC offset=08 Address = &26CC 292E=26 2910=DF offset=09 Address = &26DF 292F=26 2911=F4 offset=0A Address = &26F4 2930=27 2912=0B offset=0B Address = &270B 2931=27 2913=22 offset=0C Address = &2722 2932=27 2914=30 offset=0D Address = &2730 2933=27 2915=45 offset=0E Address = &2745 2934=27 2916=67 offset=0F Address = &2767 2935=27 2917=7A offset=10 Address = &277A 2936=27 2918=A5 offset=11 Address = &27A5 2937=27 2919=CA offset=12 Address = &27CA 2938=27 291A=D0 offset=13 Address = &27D0 2939=27 291B=FB offset=14 Address = &27FB 293A=28 291C=08 offset=15 Address = &2808 293B=28 291D=31 offset=16 Address = &2831 293C=28 291E=44 offset=17 Address = &2844 293D=28 291F=4E offset=18 Address = &284E 293E=28 2920=60 offset=19 Address = &2860 293F=28 2921=69 offset=1A Address = &2869 2940=28 2922=74 offset=1B Address = &2874 2941=28 2923=7A offset=1C Address = &287A 2942=28 2924=85 offset=1D Address = &2885 2943 00 00 00 00 00 00 00 00 00 00 00 00 00 (((............. 2950 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 2960 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 2970 00 00 00 00 00 00 00 00 00 00 Sprite lookup table 297A A0 29 = &29A0 start of explosion (0) 297C 00 2A = &2A00 explosion2 (2) 297E 60 2A = &2A60 explosion3 (4) 2980 C0 2A = &2AC0 explosion4 (6) 2982 20 2B = &2B20 explosion5 (8) 2984 80 2B = &2B80 end of explosion (a) 2986 E0 2B = &2BE0 QUAZAR (c) 2988 40 2C = &2C40 EJNAR (e) 298A A0 2C = &2CA0 DIONE (10) 298C 00 2D = &2D00 MAADI (12) 298E 60 2D = &2D60 PATERA (14) 2990 C0 2D = &2DC0 COZENAGE (16) 2992 20 2E = &2E20 PLANITIA (18) 2994 80 2E = &2E80 MINION (1a) 2996 E0 2E = &2EE0 SERVITOR (1c) 2998 40 2F = &2F40 CALLISTON 1 (1e) 299A 40 2F = &2F40 CALLISTON 2 (20) 299C 40 2F = &2F40 CALLISTON 3 (22) 299E A0 2F = &2FA0 player sprite data (24) Sprite lookup table 297A A0 29 00 2A 60 2A ...........).*`* 2980 C0 2A 20 2B 80 2B E0 2B 40 2C A0 2C 00 2D 60 2D .* +.+.+@,.,.-`- 2990 C0 2D 20 2E 80 2E E0 2E 40 2F 40 2F 40 2F A0 2F .- .....@/@/@/./ SPRITE DATA 29A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 29B0 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 00 ................ 29C0 05 0A 00 00 00 00 0F 2F 0B 00 00 07 2A 05 0A 00 ......./....*... 29D0 00 00 0A 15 00 00 00 00 1F 0F 00 00 00 00 0B 05 ................ 29E0 00 00 00 00 0A 00 00 00 00 00 00 00 00 00 00 00 ................ 29F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 2A00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 ................ 2A10 00 00 00 00 05 00 00 00 00 00 0F 0A 00 00 00 00 ................ 2A20 02 0F 00 00 00 05 2A 15 0F 0A 01 0F 00 00 0B 00 ......*......... 2A30 00 0F 0A 00 2A 00 00 00 0A 2A 0A 00 00 00 0F 0F ....*....*...... 2A40 00 00 00 00 0F 05 00 00 00 00 0A 01 00 00 00 00 ................ 2A50 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 2A60 00 00 01 00 00 00 00 00 05 0A 00 00 00 00 0F 0A ................ 2A70 00 00 00 00 0A 0A 00 00 00 00 0A 2F 00 00 00 05 .........../.... 2A80 2A 05 0F 00 00 0F 00 00 2F 0B 0F 0A 2A 2A 05 0A *......./...**.. 2A90 07 0A 15 2A 0F 00 00 1F 00 00 0A 00 00 05 00 2A ...*...........* 2AA0 0A 00 00 05 05 0F 0A 00 00 05 0F 05 0A 00 00 05 ................ 2AB0 0A 05 02 00 00 05 0A 05 00 00 00 01 00 00 00 00 ................ 2AC0 00 00 01 00 00 00 00 00 05 0A 00 00 00 00 0A 0A ................ 2AD0 00 00 00 00 0A 0A 00 00 00 00 0A 05 00 00 00 01 ................ 2AE0 00 00 0F 02 05 0A 15 00 00 05 0A 00 2A 2F 00 0A ............*/.. 2AF0 07 00 15 0A 01 00 00 0A 05 00 0A 00 00 05 05 00 ................ 2B00 0A 00 00 05 00 00 0A 00 00 05 00 0A 0A 00 00 05 ................ 2B10 05 05 0A 00 00 05 0A 05 02 00 00 01 0A 05 00 00 ................ 2B20 00 00 00 00 00 00 00 00 00 01 00 00 00 00 0A 00 ................ 2B30 00 00 00 00 00 0A 00 00 00 00 00 0A 05 00 00 0A ................ 2B40 05 00 00 00 00 00 0A 2F 00 00 02 0A 00 00 2F 00 ......./....../. 2B50 0A 15 00 00 0A 05 00 00 00 00 00 00 00 05 15 0A ................ 2B60 0A 00 00 00 0A 05 0A 00 00 0A 0A 00 01 00 00 00 ................ 2B70 00 0A 00 00 00 00 00 00 00 00 00 01 00 00 0A 00 ................ 2B80 00 00 01 00 00 00 00 00 00 00 00 00 00 00 02 0A ................ 2B90 00 00 00 00 0A 00 00 00 00 00 00 05 00 00 00 00 ................ 2BA0 00 00 00 02 00 0A 00 00 00 01 02 00 00 00 00 0A ................ 2BB0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 2BC0 00 00 00 00 00 00 0A 00 00 0A 00 00 00 00 00 00 ................ 2BD0 0A 05 01 00 00 0B 00 00 0B 00 00 02 00 00 00 00 ................ 2BE0 00 3C 00 14 28 00 14 30 28 38 34 00 00 38 34 30 .<..(..0(84..840 2BF0 28 00 00 14 34 34 00 00 14 14 30 34 14 00 38 38 (...44....04..88 2C00 30 30 38 28 38 30 30 30 30 28 14 38 30 30 3C 00 008(80000(.800<. 2C10 00 14 30 34 00 00 00 38 30 30 28 00 14 30 30 30 ..04...800(..000 2C20 34 00 14 30 32 32 34 00 00 3A 30 30 2A 00 00 3F 4..0224..:00*..? 2C30 3F 3F 2A 00 00 15 3E 3F 00 00 00 00 14 00 00 00 ??*...>?........ 2C40 00 0C 08 14 3C 00 04 0C 28 04 0C 28 0C 1C 00 00 ....<...(..(.... 2C50 0C 1C 0C 28 00 00 04 1C 0C 1C 3C 0C 0C 1C 04 0C ...(......<..... 2C60 0C 0C 0C 28 00 08 00 00 14 00 00 04 09 06 08 00 ...(............ 2C70 00 1D 03 03 2E 00 00 08 03 03 04 00 00 08 00 00 ................ 2C80 04 00 00 0C 2A 15 0C 00 04 0C 0C 0C 0C 08 0C 05 ....*........... 2C90 0C 0C 0A 0C 0C 00 08 04 00 0C 04 0C 00 00 0C 08 ................ 2CA0 00 33 00 00 33 00 11 30 22 11 30 22 32 30 28 14 .3..3..0".0"20(. 2CB0 30 31 32 34 14 28 38 31 14 28 3C 3C 14 28 00 14 0124.(81.(<<.(.. 2CC0 3C 3C 28 00 00 00 3C 3C 00 00 00 00 14 28 00 00 <<(...<<.....(.. 2CD0 00 00 14 28 00 00 00 00 14 28 00 00 00 00 38 34 ...(.....(....84 2CE0 00 00 00 14 30 30 28 00 00 14 30 30 28 00 00 14 ....00(...00(... 2CF0 12 21 28 00 00 14 38 34 28 00 00 00 3C 3C 00 00 .!(...84(...<<.. 2D00 00 11 00 11 00 00 00 23 22 23 22 00 11 03 13 03 .......#"#"..... 2D10 13 00 23 03 03 03 03 22 11 03 12 03 13 00 00 23 ..#....".......# 2D20 30 21 22 00 11 12 3C 38 13 00 23 03 30 21 03 22 0!"...<8..#.0!." 2D30 11 03 12 03 13 00 00 23 03 03 22 00 11 12 0B 30 .......#.."....0 2D40 13 00 23 12 21 1A 03 22 11 03 21 21 13 00 00 23 ..#.!.."..!!...# 2D50 03 03 22 00 00 11 13 13 00 00 00 00 22 22 00 00 .."........."".. 2D60 00 0A 00 00 05 00 05 0D 00 00 0E 0A 0E 0C 0A 05 ................ 2D70 0C 0D 0E 0C 0D 0E 0C 0D 05 0E 0C 0C 0D 0A 00 05 ................ 2D80 0C 0C 0A 00 00 00 0E 0D 00 00 00 0F 0C 0C 0F 00 ................ 2D90 05 0C 0C 0C 0C 0A 0E 0C 0C 0C 0C 0D 0E 08 00 00 ................ 2DA0 04 0D 0E 14 22 11 28 0D 0E 14 28 14 28 0D 05 08 ....".(...(.(... 2DB0 00 00 04 0A 00 0E 0C 0C 0D 00 00 05 0F 0F 0A 00 ................ 2DC0 00 00 11 00 00 00 00 00 15 00 00 00 00 00 15 00 ................ 2DD0 00 00 00 01 15 01 00 00 00 15 2F 3F 00 00 00 15 ........../?.... 2DE0 0F 1F 00 00 00 05 1E 0F 00 00 22 05 3C 2D 00 22 ..........".<-." 2DF0 2A 0F 38 2D 0A 2A 2F 1F 38 3D 0F 2A 2F 3F 3C 3D *.8-.*/.8=.*/?<= 2E00 2F 2A 2F 15 3C 3D 05 2A 2F 1F 3E 3F 0F 2A 2F 0D /*/.<=.*/.>?.*/. 2E10 3F 2F 0D 2A 0E 04 0F 0E 04 0A 08 00 0A 0A 00 08 ?/.*............ 2E20 03 02 00 00 03 02 01 23 00 01 23 00 00 13 02 13 .......#..#..... 2E30 02 00 00 01 23 23 00 00 00 01 33 23 00 00 00 13 ....##....3#.... 2E40 23 33 02 00 01 33 03 13 23 00 13 03 23 23 13 02 #3...3..#...##.. 2E50 23 0B 13 03 0B 22 23 0F 13 07 0B 22 11 03 23 23 #...."#...."..## 2E60 13 00 00 13 23 33 02 00 00 01 23 23 00 00 00 13 ....#3....##.... 2E70 02 13 02 00 01 23 00 01 23 00 03 02 00 00 03 02 .....#..#....... 2E80 14 28 00 00 3C 00 38 3C 00 14 34 28 38 34 00 14 .(..<.8<..4(84.. 2E90 30 28 14 28 3C 28 3C 00 00 14 3C 3C 00 00 00 3C 0(.(<(<...<<...< 2EA0 3C 3C 28 00 00 38 3C 3C 28 00 00 38 3C 3C 28 00 <<(..8<<(..8<<(. 2EB0 00 38 34 3C 28 00 00 38 34 3C 28 00 00 38 30 3C .84<(..84<(..80< 2EC0 28 00 00 14 30 34 00 00 14 28 3C 28 3C 00 38 3C (...04...(<(<.8< 2ED0 00 14 34 28 38 34 00 14 20 28 14 28 00 00 3C 00 ..4(84.. (.(..<. 2EE0 03 02 01 00 03 02 12 02 12 02 12 02 03 01 30 21 ..............0! 2EF0 01 02 00 12 30 30 02 00 01 30 03 12 21 00 12 21 ....00...0..!..! 2F00 0C 09 30 02 12 30 03 12 30 02 16 30 30 30 30 02 ..0..0..0..0000. 2F10 16 30 03 12 30 02 16 21 0C 09 30 02 16 21 0C 09 .0..0..!..0..!.. 2F20 30 02 01 38 03 12 21 00 00 16 30 30 02 00 03 01 0..8..!...00.... 2F30 38 21 01 02 12 02 16 02 12 02 03 02 01 00 03 02 8!.............. 2F40 00 16 00 00 39 00 01 22 00 00 01 22 13 00 02 01 ....9.."...".... 2F50 00 13 13 22 33 33 01 33 11 11 03 03 22 22 00 23 ..."33.3...."".# 2F60 21 12 13 00 11 12 03 03 21 22 00 23 16 29 13 00 !.......!".#.).. 2F70 00 23 16 29 13 00 11 12 03 03 21 22 00 23 21 12 .#.)......!".#!. 2F80 13 00 11 11 03 03 22 22 13 22 33 33 01 33 13 00 ......""."33.3.. 2F90 02 01 00 13 01 22 00 00 01 22 00 16 00 00 39 00 ....."..."....9. 2FA0 08 00 0A 0A 00 08 0E 04 0F 0E 04 0A 2F 0D 3F 2F ............/.?/ 2FB0 0D 2A 2F 1F 3E 3F 0F 2A 2F 15 3C 3D 05 2A 2F 3F .*/.>?.*/.<=.*/? 2FC0 3C 3D 2F 2A 2F 1F 38 3D 0F 2A 2A 0F 38 2D 0A 2A <=/*/.8=.**.8-.* 2FD0 22 05 3C 2D 00 22 00 05 1E 0F 00 00 00 15 0F 1F ".<-.".......... 2FE0 00 00 00 15 2F 3F 00 00 00 01 15 01 00 00 00 00 ..../?.......... 2FF0 15 00 00 00 00 00 15 00 00 00 00 00 11 00 00 00 ................ MOVE MEMORY CODE 4000 A9 8C .. LDA #&8C (140=-116) .10001100 4002 20 F4 FF .. JSR &FFF4 .OSBYTE 4005 A9 04 .. LDA #&04 (4) .00000100 4007 A2 01 .. LDX #&01 (1) .00000001 4009 20 F4 FF .. JSR &FFF4 .OSBYTE 400C A2 9F .. LDX #&9F (159=-97) .10011111 400E A9 00 .. LDA #&00 (0) .00000000 4010 95 00 .. STA &00,X . 4012 CA . DEX . 4013 D0 FB .. BNE &4010 . 4015 85 00 .. STA &00 . 4017 A9 00 .. LDA #&00 (0) .00000000 4019 9D 00 04 ... STA &0400,X .Alien behavior flags 401C 9D 00 05 ... STA &0500,X . 401F 9D 00 06 ... STA &0600,X . 4022 BD 00 19 ... LDA &1900,X . 4025 9D 00 07 ... STA &0700,X . 4028 E8 . INX . 4029 D0 EC .. BNE &4017 . 402B A0 27 .' LDY #&27 (39) .00100111 402D BD 00 1A ... LDA &1A00,X . 4030 9D 00 0A ... STA &0A00,X . 4033 E8 . INX . 4034 D0 F7 .. BNE &402D . 4036 EE 2F 40 ./@ INC &402F . 4039 EE 32 40 .2@ INC &4032 . 403C 88 . DEY . 403D D0 EE .. BNE &402D . 403F A0 37 .7 LDY #&37 (55) .00110111 4041 B9 62 40 .b@ LDA &4062,Y . 4044 99 9D 06 ... STA &069D,Y .Hiscores, 7 score digits (highest score first) 4047 88 . DEY . 4048 10 F7 .. BPL &4041 (>= signed) . 404A A0 4F .O LDY #&4F (79) .01001111 404C B9 9A 40 ..@ LDA &409A,Y . 404F 99 4D 06 .M. STA &064D,Y .Hiscores, score names (highest score first) - entered text "string" 4052 88 . DEY . 4053 10 F7 .. BPL &404C (>= signed) . 4055 A2 0F .. LDX #&0F (15) .00001111 4057 A9 00 .. LDA #&00 (0) .00000000 4059 9D A1 02 ... STA &02A1,X .paged ROM 0 type number 405C CA . DEX . 405D 10 FA .. BPL &4059 (>= signed) . 405F 4C EF 0B L.. JMP &0BEF . ENTRY POINT 4060 ** ** 00 00 03 00 00 00 00 00 00 02 05 00 00 00 .............. 4070 00 00 02 00 00 00 00 00 00 01 05 00 00 00 00 00 ................ 4080 01 00 00 00 00 00 00 00 05 00 00 00 00 00 00 03 ................ 4090 00 00 00 00 00 00 01 00 00 00 1C 1E 19 0E 1B 12 ................ 40A0 18 1B 26 26 1C 1E 19 0E 1B 12 18 1B 26 26 1C 1E ..&&........&&.. 40B0 19 0E 1B 12 18 1B 26 26 1C 1E 19 0E 1B 12 18 1B ......&&........ 40C0 26 26 1C 1E 19 0E 1B 12 18 1B 26 26 1C 1E 19 0E &&........&&.... 40D0 1B 12 18 1B 26 26 1C 1E 19 0E 1B 12 18 1B 26 26 ....&&........&& 40E0 1C 1E 19 0E 1B 12 18 1B 26 26 00 00 00 00 00 00 ........&&...... 40F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 8-directional movement of the player's spaceship; fast and slow-speed bombs which home in when later zones are reached; keyboard and joystick control; self-play demo mode; high score table and superb atmospheric music. In the midst of the 25th century, the United Cosmological Federation declared war on the savage, belligerent aliens inhabiting the Magellanic galaxy. Only the most experienced of the U.C.F. pilots were chosen to embark upon the perilous mission of conquering and overthrowing the hordes of Magelian, the Galaforce." The Galaforce aliens attack in precise preconceived formations with each zone comprising several such formations. You must pilot your spaceship carefully avoiding the aliens, or shooting them whenever possible. Some aliens have to be hit more than once to destroy them; the score for killing each type of alien and the number of hits required is shown in the Identity Parade of Aliens*. You have four spaceships and an extra spaceship is awarded if your score reaches 20,000 points. Pilot's Briefing In Zone 1 (The Perimeter) you will encounter the following formations: (a) Quazars in Zig-Zag formations, (b) Maadis in a Criss-Cross formation (c) a Shower of Diones, (d) Deviants in U-Turn formations. This is a warning zone. If you keep to the edge of the zonal screen these aliens are quite harmless; but you should attack them - the Federation abhors cowardice. Zone 2 (The Spearhead) has Pateras and Planitias in Paired Loop formations - harmless if you keep to the centre. Also, Pateras appear with Quazars and Ejnars in a Multiplier formation. To complete this zone you must shoot these aliens. Zone 3 (The Offensive) you may find it useful to use vertical as well as horizontal movement. The Staircase and Big Dipper formations are used for the first time. From Zone 4 onwards the aliens drop bombs towards you. At the end of Zone 4, the aliens assemble into the inciting Deck of Cards formation. In Zone 5 (The Annihilator) the aliens use the Switchback, Poisson and Corkscrew formations. The Federation has not issued any official information about Zone 6 or later zones. However, it is known that the dreaded snaker formation first occurs at Zone 11, and it is reported that the aliens start to drop homing bombs in Zone 14 (The Impossible). Identity Parade Of Aliens* Name Points value Hits Required QUAZAR 20 1 DIONE 20 1 PATERA 40 1 PLANTIA 40 2 SERVITOR 60 5 NEANDER 80 2 EJNAR 20 1 MAADI 20 1 DEVIANT 40 2 MINION 40 5 NEXOD 60 1 CALLISTON 80 2 COZENAGE 80 10 * Original inlay includes sketches of the aliens to accompany this data. Game Controls Z - Left, X - Right, * - Up, ? - Down, RETURN - Fire ESCAPE - Exit from game, SPACE - Start game S - Sound on/off, H - Halt on/off K - Toggle joystick/keyboard, J - Toggle joystick type: D = Digital, P = Plus 1 Standard joystick movements apply. The type of joystick interface is shown at the bottom of the screen. The digital interface recommended is First Byte. Title Page Controls C - Change colours Press the "C" key on the title pages before restarting the game. You can then change the three foreground colours to any colour except black by pressing the "1", "2" or "3" keys. Encoded Char #&00 @&0700 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1 1 Col 02 1 1 Col 03 1111 1 Col 04 1111111 Encoded Char #&01 @&0705 Rotated 90 degrees anti-clockwise Col 00 Col 01 1111 Col 02 1111111 Col 03 Col 04 Encoded Char #&02 @&070A Rotated 90 degrees anti-clockwise Col 00 1111 1 Col 01 1111 1 Col 02 1 1 1 Col 03 1 1 1 Col 04 1 1111 Encoded Char #&03 @&070F Rotated 90 degrees anti-clockwise Col 00 11 11 Col 01 1 1 1 Col 02 1 1 1 Col 03 1111111 Col 04 1111 Encoded Char #&04 @&0714 Rotated 90 degrees anti-clockwise Col 00 11111 Col 01 1 1 Col 02 111 1 Col 03 1111111 Col 04 1 Encoded Char #&05 @&0719 Rotated 90 degrees anti-clockwise Col 00 11 1111 Col 01 1 1 1 Col 02 1 1 1 Col 03 1111 1 Col 04 1111 1 Encoded Char #&06 @&071E Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1 1 1 Col 02 1 1 1 Col 03 1 1 1 Col 04 1111 11 Encoded Char #&07 @&0723 Rotated 90 degrees anti-clockwise Col 00 1 Col 01 1 Col 02 1 Col 03 1111 1 Col 04 1111111 Encoded Char #&08 @&0728 Rotated 90 degrees anti-clockwise Col 00 1111 Col 01 1 1111 Col 02 1 1 1 Col 03 1111111 Col 04 1111 Encoded Char #&09 @&072D Rotated 90 degrees anti-clockwise Col 00 1111 Col 01 1 1 Col 02 1 1 Col 03 1111 1 Col 04 1111111 Encoded Char #&0A @&0732 Rotated 90 degrees anti-clockwise Col 00 1111 Col 01 1111111 Col 02 1 1 Col 03 1111 Col 04 1111 Encoded Char #&0B @&0737 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 1 Col 02 1 1 1 Col 03 1 1111 Col 04 1111 Encoded Char #&0C @&073C Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 1 Col 02 1 1 Col 03 1 1 Col 04 11 11 Encoded Char #&0D @&0741 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 1 Col 02 1 1 Col 03 1 1 Col 04 1111111 Encoded Char #&0E @&0746 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 1 Col 02 1 1 1 Col 03 1 1 1 Col 04 1 1 1 Encoded Char #&0F @&074B Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 1 Col 02 1 1 Col 03 1 1 Col 04 1 1 Encoded Char #&10 @&0750 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 1 Col 02 1 1 Col 03 1 1 1 Col 04 1111 11 Encoded Char #&11 @&0755 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 Col 02 1 Col 03 1 Col 04 1111111 Encoded Char #&12 @&075A Rotated 90 degrees anti-clockwise Col 00 Col 01 1111111 Col 02 1111 Col 03 Col 04 Encoded Char #&13 @&075F Rotated 90 degrees anti-clockwise Col 00 111 Col 01 1 Col 02 1 Col 03 1111111 Col 04 1111 Encoded Char #&14 @&0764 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 Col 02 1 Col 03 1111 Col 04 1111 Encoded Char #&15 @&0769 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 Col 02 1 Col 03 1 Col 04 1 Encoded Char #&16 @&076E Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1 Col 02 1111111 Col 03 1 Col 04 1111111 Encoded Char #&17 @&0773 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 1 Col 02 1 Col 03 1 Col 04 1111111 Encoded Char #&18 @&0778 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1 1 Col 02 1 1 Col 03 1 11 Col 04 1111111 Encoded Char #&19 @&077D Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 1 Col 02 1 1 Col 03 1 1 Col 04 1111 Encoded Char #&1A @&0782 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1 1 Col 02 11 1 Col 03 11 1 Col 04 1111111 Encoded Char #&1B @&0787 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 1 Col 02 1 1 Col 03 1111 Col 04 1111 Encoded Char #&1C @&078C Rotated 90 degrees anti-clockwise Col 00 1 1111 Col 01 1 1 1 Col 02 1 1 1 Col 03 1111 1 Col 04 1111 1 Encoded Char #&1D @&0791 Rotated 90 degrees anti-clockwise Col 00 1 Col 01 1 Col 02 1111111 Col 03 1111 1 Col 04 1 Encoded Char #&1E @&0796 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1111 Col 02 1 Col 03 1 Col 04 1111111 Encoded Char #&1F @&079B Rotated 90 degrees anti-clockwise Col 00 1111 Col 01 1111111 Col 02 1 Col 03 111 Col 04 1111 Encoded Char #&20 @&07A0 Rotated 90 degrees anti-clockwise Col 00 1111111 Col 01 1 Col 02 1111111 Col 03 1 Col 04 1111111 Encoded Char #&21 @&07A5 Rotated 90 degrees anti-clockwise Col 00 111 111 Col 01 1111 Col 02 1 Col 03 1 Col 04 111 111 Encoded Char #&22 @&07AA Rotated 90 degrees anti-clockwise Col 00 1111 Col 01 1 Col 02 1111 Col 03 1 Col 04 1111 Encoded Char #&23 @&07AF Rotated 90 degrees anti-clockwise Col 00 1111 11 Col 01 1111 1 Col 02 1 1 1 Col 03 1 1 1 Col 04 11 1111 Encoded Char #&24 @&07B4 Rotated 90 degrees anti-clockwise Col 00 Col 01 Col 02 11 Col 03 Col 04 Encoded Char #&25 @&07B9 Rotated 90 degrees anti-clockwise Col 00 1 Col 01 1 Col 02 1 Col 03 1 Col 04 1 Encoded Char #&26 @&07BE Rotated 90 degrees anti-clockwise Col 00 Col 01 Col 02 Col 03 Col 04 Encoded Char #&27 @&07C3 Rotated 90 degrees anti-clockwise Col 00 Col 01 1111 Col 02 1 1 Col 03 1 1 Col 04 Encoded Char #&28 @&07C8 Rotated 90 degrees anti-clockwise Col 00 Col 01 1 1 Col 02 1 1 Col 03 1111 Col 04 Zone 00 (0) @ (&2401) Byte 00 Zone has 0A (10) maximum visible aliens Byte 01=00 Wave 00 (0) L->R /\/\/\/\ Quazars in Zig-Zag formations Byte 02=02 Wave 02 (2) TL -> BR -> BL -> TR Maadis in a Criss-Cross formation Byte 03=2B Wave 2B (43) diones thing Shower of Diones Byte 04=01 Wave 01 (1) reverse of wave 0 Quazars in Zig-Zag formations Byte 05=0B Wave 0B (11) TR start diagonal Deviants in U-Turn formations Byte 06=0A Wave 0A (10) TL reverse of wave 0B Deviants in U-Turn formations Byte 07=FF End of Zone Zone 01 (1) @ (&2409) Byte 00 Zone has 08 (8) maximum visible aliens Byte 01=06 Wave 06 (6) BL circular 2 lots Pateras and Planitias in Paired Loop formations Byte 02=07 Wave 07 (7) BR reverse of 6 Pateras and Planitias in Paired Loop formations Byte 03=06 Wave 06 (6) BL circular 2 lots Pateras and Planitias in Paired Loop formations Byte 04=07 Wave 07 (7) BR reverse of 6 Pateras and Planitias in Paired Loop formations Byte 05=04 Wave 04 (4) spawners move to stop then start spawning Pateras appear with Quazars and Ejnars in a Multiplier formation Byte 06=FF End of Zone Zone 02 (2) @ (&2410) Byte 00 Zone has 0A (10) maximum visible aliens Byte 01=05 Wave 05 (5) 4 L to R spawners Big Dipper formations Byte 02=08 Wave 08 (8) middle march down/right The Staircase Byte 03=09 Wave 09 (9) middle march down/left The Staircase Byte 04=0D Wave 0D (13) spin in from left Byte 05=0E Wave 0E (14) spin in from right Byte 06=FF End of Zone Zone 03 (3) @ (&2417) Byte 00 Zone has 08 (8) maximum visible aliens Byte 01=0A Wave 0A (10) TL start diagonal Byte 02=0B Wave 0B (11) TR start diagonal Byte 03=17 Wave 17 (23) BL rotate in arc to BR Byte 04=18 Wave 18 (24) BR rotate in arc to BL Byte 05=02 Wave 02 (2) TL -> BR -> BL -> TR Byte 06=03 Wave 03 (3) TR -> BL -> BR -> TL Byte 07=2D Wave 2D (45) Deck of Cards formation Byte 08=FF End of Zone Zone 04 (4) @ (&2420) aliens use the Switchback, Poisson and Corkscrew formations. Byte 00 Zone has 0A (10) maximum visible aliens Byte 01=10 Wave 10 (16) Byte 02=11 Wave 11 (17) Byte 03=12 Wave 12 (18) Byte 04=0F Wave 0F (15) Byte 05=05 Wave 05 (5) Byte 06=1B Wave 1B (27) Byte 07=FF End of Zone Zone 05 (5) @ (&2428) Byte 00 Zone has 0A (10) maximum visible aliens Byte 01=06 Wave 06 (6) Byte 02=07 Wave 07 (7) Byte 03=06 Wave 06 (6) Byte 04=07 Wave 07 (7) Byte 05=0C Wave 0C (12) Byte 06=13 Wave 13 (19) Byte 07=14 Wave 14 (20) Byte 08=FF End of Zone Zone 06 (6) @ (&2431) Byte 00 Zone has 08 (8) maximum visible aliens Byte 01=0A Wave 0A (10) Byte 02=0B Wave 0B (11) Byte 03=0A Wave 0A (10) Byte 04=0B Wave 0B (11) Byte 05=02 Wave 02 (2) Byte 06=03 Wave 03 (3) Byte 07=FF End of Zone Zone 07 (7) @ (&2439) Byte 00 Zone has 08 (8) maximum visible aliens Byte 01=0D Wave 0D (13) Byte 02=0E Wave 0E (14) Byte 03=15 Wave 15 (21) Byte 04=16 Wave 16 (22) Byte 05=17 Wave 17 (23) Byte 06=18 Wave 18 (24) Byte 07=2D Wave 2D (45) Byte 08=FF End of Zone Zone 08 (8) @ (&2442) Byte 00 Zone has 0A (10) maximum visible aliens Byte 01=04 Wave 04 (4) Byte 02=04 Wave 04 (4) Byte 03=00 Wave 00 (0) Byte 04=01 Wave 01 (1) Byte 05=05 Wave 05 (5) Byte 06=11 Wave 11 (17) Byte 07=12 Wave 12 (18) Byte 08=FF End of Zone Zone 09 (9) @ (&244B) Byte 00 Zone has 07 (7) maximum visible aliens Byte 01=08 Wave 08 (8) Byte 02=09 Wave 09 (9) Byte 03=0C Wave 0C (12) Byte 04=2C Wave 2C (44) Byte 05=02 Wave 02 (2) Byte 06=FF End of Zone Zone 0A (10) @ (&2452) dreaded snaker formation first occurs at Zone 11 Byte 00 Zone has 08 (8) maximum visible aliens Byte 01=19 Wave 19 (25) Byte 02=1A Wave 1A (26) Byte 03=0F Wave 0F (15) Byte 04=10 Wave 10 (16) Byte 05=1D Wave 1D (29) Byte 06=FF End of Zone Zone 0B (11) @ (&2459) Byte 00 Zone has 0A (10) maximum visible aliens Byte 01=1B Wave 1B (27) Byte 02=1C Wave 1C (28) Byte 03=0C Wave 0C (12) Byte 04=25 Wave 25 (37) Byte 05=26 Wave 26 (38) Byte 06=1C Wave 1C (28) Byte 07=2D Wave 2D (45) Byte 08=FF End of Zone Zone 0C (12) @ (&2462) Byte 00 Zone has 0A (10) maximum visible aliens Byte 01=1D Wave 1D (29) Byte 02=1E Wave 1E (30) Byte 03=08 Wave 08 (8) Byte 04=09 Wave 09 (9) Byte 05=1F Wave 1F (31) Byte 06=20 Wave 20 (32) Byte 07=FF End of Zone Zone 0D (13) @ (&246A) Byte 00 Zone has 08 (8) maximum visible aliens Byte 01=21 Wave 21 (33) Byte 02=22 Wave 22 (34) Byte 03=0F Wave 0F (15) Byte 04=10 Wave 10 (16) Byte 05=19 Wave 19 (25) Byte 06=1A Wave 1A (26) Byte 07=FF End of Zone Zone 0E (14) @ (&2472) Byte 00 Zone has 08 (8) maximum visible aliens Byte 01=17 Wave 17 (23) Byte 02=18 Wave 18 (24) Byte 03=23 Wave 23 (35) Byte 04=24 Wave 24 (36) Byte 05=15 Wave 15 (21) Byte 06=16 Wave 16 (22) Byte 07=FF End of Zone Zone 0F (15) @ (&247A) Byte 00 Zone has 08 (8) maximum visible aliens Byte 01=27 Wave 27 (39) Byte 02=28 Wave 28 (40) Byte 03=03 Wave 03 (3) Byte 04=0A Wave 0A (10) Byte 05=0B Wave 0B (11) Byte 06=29 Wave 29 (41) Byte 07=2A Wave 2A (42) Byte 08=2D Wave 2D (45) Byte 09=FF End of Zone Wave 00 (0) @ (&2484) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:05 (5) Spawns:14 (20) aliens Spawn Type:0C (12) QUAZAR Spawn Pattern:00 (0) Spawn X:00 (0) Spawn Y:32 (50) Spawn X Velocity:00 (0) Spawn Y Velocity:05 (5) Wave 01 (1) @ (&248D) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:05 (5) Spawns:14 (20) aliens Spawn Type:0C (12) QUAZAR Spawn Pattern:00 (0) REVERSED Spawn X:49 (73) Spawn Y:32 (50) Spawn X Velocity:00 (0) Spawn Y Velocity:05 (5) Wave 02 (2) @ (&2496) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:04 (4) Spawns:1E (30) aliens Spawn Type:12 (18) MAADI Spawn Pattern:01 (1) Spawn X:0C (12) Spawn Y:18 (24) STATIC Wave 03 (3) @ (&249F) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:04 (4) Spawns:1E (30) aliens Spawn Type:12 (18) MAADI Spawn Pattern:01 (1) REVERSED Spawn X:3E (62) Spawn Y:18 (24) STATIC Wave 04 (4) @ (&24A8) Byte 00 Wave has 02 (2) spawners Spawner 01 Timer:14 (20) Spawns:02 (2) aliens Spawn Type:14 (20) PATERA Spawn Pattern:02 (2) Spawn X:00 (0) Spawn Y:FF (255) Spawn X Velocity:08 (8) Spawn Y Velocity:E8 (232) Spawner 02 Timer:14 (20) Spawns:02 (2) aliens Spawn Type:14 (20) PATERA Spawn Pattern:02 (2) REVERSED Spawn X:4A (74) Spawn Y:FF (255) Spawn X Velocity:F8 (248) Spawn Y Velocity:E8 (232) Wave 05 (5) @ (&24B9) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:32 (50) Spawns:04 (4) aliens Spawn Type:18 (24) PLANITIA Spawn Pattern:04 (4) Spawn X:06 (6) Spawn Y:28 (40) Spawn X Velocity:00 (0) Spawn Y Velocity:10 (16) Wave 06 (6) @ (&24C2) Byte 00 Wave has 02 (2) spawners Spawner 01 Timer:08 (8) Spawns:0A (10) aliens Spawn Type:18 (24) PLANITIA Spawn Pattern:05 (5) Spawn X:00 (0) Spawn Y:E7 (231) STATIC Spawner 02 Timer:08 (8) Spawns:0A (10) aliens Spawn Type:14 (20) PATERA Spawn Pattern:05 (5) Spawn X:07 (7) Spawn Y:E7 (231) STATIC Wave 07 (7) @ (&24D3) Byte 00 Wave has 02 (2) spawners Spawner 01 Timer:08 (8) Spawns:0A (10) aliens Spawn Type:18 (24) PLANITIA Spawn Pattern:05 (5) REVERSED Spawn X:49 (73) Spawn Y:E7 (231) STATIC Spawner 02 Timer:08 (8) Spawns:0A (10) aliens Spawn Type:14 (20) PATERA Spawn Pattern:05 (5) REVERSED Spawn X:42 (66) Spawn Y:E7 (231) STATIC Wave 08 (8) @ (&24E4) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:06 (6) Spawns:0F (15) aliens Spawn Type:14 (20) PATERA Spawn Pattern:06 (6) Spawn X:24 (36) Spawn Y:20 (32) STATIC Wave 09 (9) @ (&24ED) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:06 (6) Spawns:0F (15) aliens Spawn Type:14 (20) PATERA Spawn Pattern:06 (6) REVERSED Spawn X:26 (38) Spawn Y:20 (32) STATIC Wave 0A (10) @ (&24F6) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:05 (5) Spawns:08 (8) aliens Spawn Type:10 (16) DIONE Spawn Pattern:07 (7) Spawn X:00 (0) Spawn Y:20 (32) STATIC Wave 0B (11) @ (&24FF) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:05 (5) Spawns:08 (8) aliens Spawn Type:10 (16) DIONE Spawn Pattern:07 (7) REVERSED Spawn X:49 (73) Spawn Y:20 (32) STATIC Wave 0C (12) @ (&2508) Byte 00 Wave has 02 (2) spawners Spawner 01 Timer:06 (6) Spawns:0C (12) aliens Spawn Type:1E (30) CALLISON1 Spawn Pattern:08 (8) Spawn X:21 (33) Spawn Y:20 (32) STATIC Spawner 02 Timer:06 (6) Spawns:0C (12) aliens Spawn Type:1E (30) CALLISON1 Spawn Pattern:08 (8) REVERSED Spawn X:29 (41) Spawn Y:20 (32) STATIC Wave 0D (13) @ (&2519) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:06 (6) Spawns:10 (16) aliens Spawn Type:0C (12) QUAZAR Spawn Pattern:09 (9) Spawn X:00 (0) Spawn Y:82 (130) STATIC Wave 0E (14) @ (&2522) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:06 (6) Spawns:10 (16) aliens Spawn Type:0C (12) QUAZAR Spawn Pattern:09 (9) REVERSED Spawn X:4A (74) Spawn Y:82 (130) STATIC Wave 0F (15) @ (&252B) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:05 (5) Spawns:0C (12) aliens Spawn Type:12 (18) MAADI Spawn Pattern:0A (10) Spawn X:00 (0) Spawn Y:D2 (210) STATIC Wave 10 (16) @ (&2534) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:05 (5) Spawns:0C (12) aliens Spawn Type:12 (18) MAADI Spawn Pattern:0A (10) REVERSED Spawn X:4A (74) Spawn Y:D2 (210) STATIC Wave 11 (17) @ (&253D) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:07 (7) Spawns:0C (12) aliens Spawn Type:0E (14) ENJAR Spawn Pattern:0B (11) Spawn X:00 (0) Spawn Y:20 (32) STATIC Wave 12 (18) @ (&2546) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:07 (7) Spawns:0C (12) aliens Spawn Type:0E (14) ENJAR Spawn Pattern:0B (11) REVERSED Spawn X:4A (74) Spawn Y:20 (32) STATIC Wave 13 (19) @ (&254F) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:05 (5) Spawns:0A (10) aliens Spawn Type:10 (16) DIONE Spawn Pattern:0D (13) Spawn X:30 (48) Spawn Y:20 (32) STATIC Wave 14 (20) @ (&2558) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:05 (5) Spawns:0A (10) aliens Spawn Type:10 (16) DIONE Spawn Pattern:0D (13) REVERSED Spawn X:1B (27) Spawn Y:20 (32) STATIC Wave 15 (21) @ (&2561) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:05 (5) Spawns:08 (8) aliens Spawn Type:14 (20) PATERA Spawn Pattern:0E (14) Spawn X:00 (0) Spawn Y:20 (32) STATIC Wave 16 (22) @ (&256A) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:05 (5) Spawns:08 (8) aliens Spawn Type:14 (20) PATERA Spawn Pattern:0E (14) REVERSED Spawn X:4A (74) Spawn Y:20 (32) STATIC Wave 17 (23) @ (&2573) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:03 (3) Spawns:14 (20) aliens Spawn Type:14 (20) PATERA Spawn Pattern:0F (15) Spawn X:02 (2) Spawn Y:FF (255) STATIC Wave 18 (24) @ (&257C) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:03 (3) Spawns:14 (20) aliens Spawn Type:14 (20) PATERA Spawn Pattern:0F (15) REVERSED Spawn X:48 (72) Spawn Y:FF (255) STATIC Wave 19 (25) @ (&2585) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:03 (3) Spawns:10 (16) aliens Spawn Type:10 (16) DIONE Spawn Pattern:10 (16) Spawn X:06 (6) Spawn Y:FF (255) STATIC Wave 1A (26) @ (&258E) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:03 (3) Spawns:10 (16) aliens Spawn Type:10 (16) DIONE Spawn Pattern:10 (16) REVERSED Spawn X:45 (69) Spawn Y:FF (255) STATIC Wave 1B (27) @ (&2597) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:04 (4) Spawns:0E (14) aliens Spawn Type:12 (18) MAADI Spawn Pattern:11 (17) Spawn X:00 (0) Spawn Y:20 (32) STATIC Wave 1C (28) @ (&25A0) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:04 (4) Spawns:0E (14) aliens Spawn Type:12 (18) MAADI Spawn Pattern:11 (17) REVERSED Spawn X:4A (74) Spawn Y:20 (32) STATIC Wave 1D (29) @ (&25A9) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:02 (2) Spawns:15 (21) aliens Spawn Type:14 (20) PATERA Spawn Pattern:12 (18) Spawn X:00 (0) Spawn Y:20 (32) Spawn X Velocity:03 (3) Spawn Y Velocity:00 (0) Wave 1E (30) @ (&25B2) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:02 (2) Spawns:15 (21) aliens Spawn Type:14 (20) PATERA Spawn Pattern:12 (18) REVERSED Spawn X:4A (74) Spawn Y:20 (32) Spawn X Velocity:FD (253) Spawn Y Velocity:00 (0) Wave 1F (31) @ (&25BB) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:04 (4) Spawns:0C (12) aliens Spawn Type:20 (32) CALLISON2 Spawn Pattern:13 (19) Spawn X:49 (73) Spawn Y:20 (32) STATIC Wave 20 (32) @ (&25C4) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:04 (4) Spawns:0C (12) aliens Spawn Type:20 (32) CALLISON2 Spawn Pattern:13 (19) REVERSED Spawn X:01 (1) Spawn Y:20 (32) STATIC Wave 21 (33) @ (&25CD) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:08 (8) Spawns:14 (20) aliens Spawn Type:12 (18) MAADI Spawn Pattern:14 (20) Spawn X:4E (78) Spawn Y:20 (32) STATIC Wave 22 (34) @ (&25D6) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:08 (8) Spawns:14 (20) aliens Spawn Type:12 (18) MAADI Spawn Pattern:14 (20) REVERSED Spawn X:4F (79) Spawn Y:20 (32) STATIC Wave 23 (35) @ (&25DF) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:04 (4) Spawns:0E (14) aliens Spawn Type:22 (34) CALLISON3 Spawn Pattern:15 (21) Spawn X:4A (74) Spawn Y:20 (32) STATIC Wave 24 (36) @ (&25E8) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:04 (4) Spawns:0E (14) aliens Spawn Type:22 (34) CALLISON3 Spawn Pattern:15 (21) REVERSED Spawn X:00 (0) Spawn Y:20 (32) STATIC Wave 25 (37) @ (&25F1) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:04 (4) Spawns:12 (18) aliens Spawn Type:10 (16) DIONE Spawn Pattern:16 (22) Spawn X:02 (2) Spawn Y:20 (32) STATIC Wave 26 (38) @ (&25FA) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:04 (4) Spawns:12 (18) aliens Spawn Type:10 (16) DIONE Spawn Pattern:16 (22) REVERSED Spawn X:48 (72) Spawn Y:20 (32) STATIC Wave 27 (39) @ (&2603) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:05 (5) Spawns:0C (12) aliens Spawn Type:14 (20) PATERA Spawn Pattern:17 (23) Spawn X:4E (78) Spawn Y:20 (32) STATIC Wave 28 (40) @ (&260C) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:05 (5) Spawns:0C (12) aliens Spawn Type:14 (20) PATERA Spawn Pattern:17 (23) REVERSED Spawn X:4F (79) Spawn Y:20 (32) STATIC Wave 29 (41) @ (&2615) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:04 (4) Spawns:13 (19) aliens Spawn Type:0C (12) QUAZAR Spawn Pattern:18 (24) Spawn X:00 (0) Spawn Y:20 (32) Spawn X Velocity:02 (2) Spawn Y Velocity:00 (0) Wave 2A (42) @ (&261E) Byte 00 Wave has 01 (1) spawners Spawner 01 Timer:04 (4) Spawns:13 (19) aliens Spawn Type:0C (12) QUAZAR Spawn Pattern:18 (24) REVERSED Spawn X:4A (74) Spawn Y:20 (32) Spawn X Velocity:FE (254) Spawn Y Velocity:00 (0) Wave 2B (43) @ (&2627) Byte 00 Wave has 02 (2) spawners Spawner 01 Timer:10 (16) Spawns:14 (20) aliens Spawn Type:10 (16) DIONE Spawn Pattern:19 (25) Spawn X:4E (78) Spawn Y:20 (32) STATIC Spawner 02 Timer:0E (14) Spawns:14 (20) aliens Spawn Type:10 (16) DIONE Spawn Pattern:19 (25) REVERSED Spawn X:4F (79) Spawn Y:20 (32) STATIC Wave 2C (44) @ (&2638) Byte 00 Wave has 02 (2) spawners Spawner 01 Timer:08 (8) Spawns:14 (20) aliens Spawn Type:12 (18) MAADI Spawn Pattern:1A (26) Spawn X:4E (78) Spawn Y:20 (32) STATIC Spawner 02 Timer:08 (8) Spawns:14 (20) aliens Spawn Type:12 (18) MAADI Spawn Pattern:1A (26) REVERSED Spawn X:4F (79) Spawn Y:20 (32) STATIC Wave 2D (45) @ (&2649) pack of cards Byte 00 Wave has 03 (3) spawners Spawner 01 Timer:01 (1) Spawns:01 (1) aliens Spawn Type:16 (22) COZENAGE Spawn Pattern:1D (29) Spawn X:00 (0) Spawn Y:28 (40) STATIC Spawner 02 Timer:04 (4) Spawns:10 (16) aliens Spawn Type:1A (26) MINION Spawn Pattern:1B (27) Spawn X:00 (0) Spawn Y:48 (72) STATIC Spawner 03 Timer:04 (4) Spawns:0F (15) aliens Spawn Type:1C (28) SERVITOR Spawn Pattern:1C (28) Spawn X:00 (0) Spawn Y:60 (96) STATIC Pattern 00 (0) @ (&2662) Index 00 Byte 86 (134) repeat 06 ( 6) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 6 Index 01 Byte 83 (131) repeat 03 ( 3) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 3 Index 02 Byte 0A (10) perform loop starting at index (03), counter = 01 ( 1), next byte = number of times Index 03 Byte 86 (134) repeat 06 ( 6) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 6 Index 04 Byte 86 (134) repeat 06 ( 6) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 6 Index 05 Byte 0C (12) while loop counter>=0 jump to start of loop Index 06 Byte 83 (131) repeat 03 ( 3) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 3 Index 07 Byte 06 ( 6) start alien exploding Pattern 00 (0) @ (&2662) [REVERSED] Index 00 Byte 86 (134) repeat 06 ( 6) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 6 Index 01 Byte 83 (131) repeat 03 ( 3) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 3 Index 02 Byte 0A (10) perform loop starting at index (03), counter = 01 ( 1), next byte = number of times Index 03 Byte 86 (134) repeat 06 ( 6) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 6 Index 04 Byte 86 (134) repeat 06 ( 6) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 6 Index 05 Byte 0C (12) while loop counter>=0 jump to start of loop Index 06 Byte 83 (131) repeat 03 ( 3) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 3 Index 07 Byte 06 ( 6) start alien exploding Pattern 01 (1) @ (&2670) Index 00 Byte 97 (151) repeat 17 (23) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 23 Index 01 Byte 94 (148) repeat 14 (20) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 20 Index 02 Byte 98 (152) repeat 18 (24) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 24 Index 03 Byte 06 ( 6) start alien exploding Pattern 01 (1) @ (&2670) [REVERSED] Index 00 Byte 97 (151) repeat 17 (23) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 23 Index 01 Byte 94 (148) repeat 14 (20) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 20 Index 02 Byte 98 (152) repeat 18 (24) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 24 Index 03 Byte 06 ( 6) start alien exploding Pattern 02 (2) @ (&2677) Index 00 Byte 88 (136) repeat 08 ( 8) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 8 Index 01 Byte 88 (136) repeat 08 ( 8) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 8 Index 02 Byte 88 (136) repeat 08 ( 8) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 8 Index 03 Byte 0A (10) perform loop starting at index (04), counter = 64 (100), next byte = number of times Index 04 Byte 84 (132) repeat 04 ( 4) times do move 01 ( 1) Move Relative X = 01 Y = 00 ( 1, 0) x 4 Index 05 Byte 04 ( 4) spawn alien, next byte = spawned alien pattern number 03 ( 3) (random QUAZAR or ENJAR) Index 06 Byte 84 (132) repeat 04 ( 4) times do move 03 ( 3) Move Relative X = FF Y = 00 (-1, 0) x 4 Index 07 Byte 0C (12) while loop counter>=0 jump to start of loop Index 08 Byte 06 ( 6) start alien exploding Pattern 02 (2) @ (&2677) [REVERSED] Index 00 Byte 88 (136) repeat 08 ( 8) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 8 Index 01 Byte 88 (136) repeat 08 ( 8) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 8 Index 02 Byte 88 (136) repeat 08 ( 8) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 8 Index 03 Byte 0A (10) perform loop starting at index (04), counter = 64 (100), next byte = number of times Index 04 Byte 84 (132) repeat 04 ( 4) times do move 03 ( 3) Move Relative X = FF Y = 00 (-1, 0) x 4 Index 05 Byte 04 ( 4) spawn alien, next byte = spawned alien pattern number 03 ( 3) (random QUAZAR or ENJAR) Index 06 Byte 84 (132) repeat 04 ( 4) times do move 01 ( 1) Move Relative X = 01 Y = 00 ( 1, 0) x 4 Index 07 Byte 0C (12) while loop counter>=0 jump to start of loop Index 08 Byte 06 ( 6) start alien exploding Pattern 03 (3) @ (&2687) Index 00 Byte 88 (136) repeat 08 ( 8) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 8 Index 01 Byte 83 (131) repeat 03 ( 3) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 3 Index 02 Byte 88 (136) repeat 08 ( 8) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 8 Index 03 Byte 83 (131) repeat 03 ( 3) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 3 Index 04 Byte 00 ( 0) jump to position in pattern 00 ( 0), next byte = new pattern index Pattern 04 (4) @ (&2691) Index 00 Byte 0A (10) perform loop starting at index (01), counter = 02 ( 2), next byte = number of times Index 01 Byte 87 (135) repeat 07 ( 7) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 7 Index 02 Byte 04 ( 4) spawn alien, next byte = spawned alien pattern number 0C (12) (random QUAZAR or ENJAR) Index 03 Byte 0C (12) while loop counter>=0 jump to start of loop Index 04 Byte 87 (135) repeat 07 ( 7) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 7 Index 05 Byte 87 (135) repeat 07 ( 7) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 7 Index 06 Byte 0A (10) perform loop starting at index (07), counter = 02 ( 2), next byte = number of times Index 07 Byte 04 ( 4) spawn alien, next byte = spawned alien pattern number 0C (12) (random QUAZAR or ENJAR) Index 08 Byte 87 (135) repeat 07 ( 7) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 7 Index 09 Byte 0C (12) while loop counter>=0 jump to start of loop Index 0A Byte 00 ( 0) jump to position in pattern 00 ( 0), next byte = new pattern index Pattern 05 (5) @ (&26A5) Index 00 Byte 8D (141) repeat 0D (13) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 13 Index 01 Byte 88 (136) repeat 08 ( 8) times do move 00 ( 0) Move Relative X = 00 Y = FC ( 0, -4) x 8 Index 02 Byte 84 (132) repeat 04 ( 4) times do move 03 ( 3) Move Relative X = FF Y = 00 (-1, 0) x 4 Index 03 Byte 88 (136) repeat 08 ( 8) times do move 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) x 8 Index 04 Byte 88 (136) repeat 08 ( 8) times do move 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) x 8 Index 05 Byte 8D (141) repeat 0D (13) times do move 14 (20) Move Relative X = 03 Y = F4 ( 3,-12) x 13 Index 06 Byte 06 ( 6) start alien exploding Pattern 05 (5) @ (&26A5) [REVERSED] Index 00 Byte 8D (141) repeat 0D (13) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 13 Index 01 Byte 88 (136) repeat 08 ( 8) times do move 00 ( 0) Move Relative X = 00 Y = FC ( 0, -4) x 8 Index 02 Byte 84 (132) repeat 04 ( 4) times do move 01 ( 1) Move Relative X = 01 Y = 00 ( 1, 0) x 4 Index 03 Byte 88 (136) repeat 08 ( 8) times do move 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) x 8 Index 04 Byte 88 (136) repeat 08 ( 8) times do move 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) x 8 Index 05 Byte 8D (141) repeat 0D (13) times do move 17 (23) Move Relative X = FD Y = F4 (-3,-12) x 13 Index 06 Byte 06 ( 6) start alien exploding Pattern 06 (6) @ (&26B2) Index 00 Byte 84 (132) repeat 04 ( 4) times do move 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) x 4 Index 01 Byte 85 (133) repeat 05 ( 5) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 5 Index 02 Byte 86 (134) repeat 06 ( 6) times do move 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) x 6 Index 03 Byte 88 (136) repeat 08 ( 8) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 8 Index 04 Byte 85 (133) repeat 05 ( 5) times do move 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) x 5 Index 05 Byte 86 (134) repeat 06 ( 6) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 6 Index 06 Byte 06 ( 6) start alien exploding Pattern 06 (6) @ (&26B2) [REVERSED] Index 00 Byte 84 (132) repeat 04 ( 4) times do move 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) x 4 Index 01 Byte 85 (133) repeat 05 ( 5) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 5 Index 02 Byte 86 (134) repeat 06 ( 6) times do move 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) x 6 Index 03 Byte 88 (136) repeat 08 ( 8) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 8 Index 04 Byte 85 (133) repeat 05 ( 5) times do move 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) x 5 Index 05 Byte 86 (134) repeat 06 ( 6) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 6 Index 06 Byte 06 ( 6) start alien exploding Pattern 07 (7) @ (&26BF) Index 00 Byte 93 (147) repeat 13 (19) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 19 Index 01 Byte 88 (136) repeat 08 ( 8) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 8 Index 02 Byte 82 (130) repeat 02 ( 2) times do move 04 ( 4) Move Relative X = 01 Y = FC ( 1, -4) x 2 Index 03 Byte 87 (135) repeat 07 ( 7) times do move 07 ( 7) Move Relative X = FF Y = FC (-1, -4) x 7 Index 04 Byte 86 (134) repeat 06 ( 6) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 6 Index 05 Byte 87 (135) repeat 07 ( 7) times do move 17 (23) Move Relative X = FD Y = F4 (-3,-12) x 7 Index 06 Byte 06 ( 6) start alien exploding Pattern 07 (7) @ (&26BF) [REVERSED] Index 00 Byte 93 (147) repeat 13 (19) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 19 Index 01 Byte 88 (136) repeat 08 ( 8) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 8 Index 02 Byte 82 (130) repeat 02 ( 2) times do move 07 ( 7) Move Relative X = FF Y = FC (-1, -4) x 2 Index 03 Byte 87 (135) repeat 07 ( 7) times do move 04 ( 4) Move Relative X = 01 Y = FC ( 1, -4) x 7 Index 04 Byte 86 (134) repeat 06 ( 6) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 6 Index 05 Byte 87 (135) repeat 07 ( 7) times do move 14 (20) Move Relative X = 03 Y = F4 ( 3,-12) x 7 Index 06 Byte 06 ( 6) start alien exploding Pattern 08 (8) @ (&26CC) Index 00 Byte 88 (136) repeat 08 ( 8) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 8 Index 01 Byte 84 (132) repeat 04 ( 4) times do move 15 (21) Move Relative X = 03 Y = 0C ( 3, 12) x 4 Index 02 Byte 86 (134) repeat 06 ( 6) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 6 Index 03 Byte 84 (132) repeat 04 ( 4) times do move 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) x 4 Index 04 Byte 82 (130) repeat 02 ( 2) times do move 01 ( 1) Move Relative X = 01 Y = 00 ( 1, 0) x 2 Index 05 Byte 84 (132) repeat 04 ( 4) times do move 04 ( 4) Move Relative X = 01 Y = FC ( 1, -4) x 4 Index 06 Byte 88 (136) repeat 08 ( 8) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 8 Index 07 Byte 84 (132) repeat 04 ( 4) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 4 Index 08 Byte 8B (139) repeat 0B (11) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 11 Index 09 Byte 06 ( 6) start alien exploding Pattern 08 (8) @ (&26CC) [REVERSED] Index 00 Byte 88 (136) repeat 08 ( 8) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 8 Index 01 Byte 84 (132) repeat 04 ( 4) times do move 16 (22) Move Relative X = FD Y = 0C (-3, 12) x 4 Index 02 Byte 86 (134) repeat 06 ( 6) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 6 Index 03 Byte 84 (132) repeat 04 ( 4) times do move 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) x 4 Index 04 Byte 82 (130) repeat 02 ( 2) times do move 03 ( 3) Move Relative X = FF Y = 00 (-1, 0) x 2 Index 05 Byte 84 (132) repeat 04 ( 4) times do move 07 ( 7) Move Relative X = FF Y = FC (-1, -4) x 4 Index 06 Byte 88 (136) repeat 08 ( 8) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 8 Index 07 Byte 84 (132) repeat 04 ( 4) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 4 Index 08 Byte 8B (139) repeat 0B (11) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 11 Index 09 Byte 06 ( 6) start alien exploding Pattern 09 (9) @ (&26DF) Index 00 Byte 85 (133) repeat 05 ( 5) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 5 Index 01 Byte 85 (133) repeat 05 ( 5) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 5 Index 02 Byte 85 (133) repeat 05 ( 5) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 5 Index 03 Byte 85 (133) repeat 05 ( 5) times do move 07 ( 7) Move Relative X = FF Y = FC (-1, -4) x 5 Index 04 Byte 85 (133) repeat 05 ( 5) times do move 03 ( 3) Move Relative X = FF Y = 00 (-1, 0) x 5 Index 05 Byte 87 (135) repeat 07 ( 7) times do move 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) x 7 Index 06 Byte 86 (134) repeat 06 ( 6) times do move 02 ( 2) Move Relative X = 00 Y = 04 ( 0, 4) x 6 Index 07 Byte 8E (142) repeat 0E (14) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 14 Index 08 Byte 89 (137) repeat 09 ( 9) times do move 11 (17) Move Relative X = 03 Y = 00 ( 3, 0) x 9 Index 09 Byte 8A (138) repeat 0A (10) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 10 Index 0A Byte 06 ( 6) start alien exploding Pattern 09 (9) @ (&26DF) [REVERSED] Index 00 Byte 85 (133) repeat 05 ( 5) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 5 Index 01 Byte 85 (133) repeat 05 ( 5) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 5 Index 02 Byte 85 (133) repeat 05 ( 5) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 5 Index 03 Byte 85 (133) repeat 05 ( 5) times do move 04 ( 4) Move Relative X = 01 Y = FC ( 1, -4) x 5 Index 04 Byte 85 (133) repeat 05 ( 5) times do move 01 ( 1) Move Relative X = 01 Y = 00 ( 1, 0) x 5 Index 05 Byte 87 (135) repeat 07 ( 7) times do move 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) x 7 Index 06 Byte 86 (134) repeat 06 ( 6) times do move 02 ( 2) Move Relative X = 00 Y = 04 ( 0, 4) x 6 Index 07 Byte 8E (142) repeat 0E (14) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 14 Index 08 Byte 89 (137) repeat 09 ( 9) times do move 13 (19) Move Relative X = FD Y = 00 (-3, 0) x 9 Index 09 Byte 8A (138) repeat 0A (10) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 10 Index 0A Byte 06 ( 6) start alien exploding Pattern 0A (10) @ (&26F4) Index 00 Byte 83 (131) repeat 03 ( 3) times do move 14 (20) Move Relative X = 03 Y = F4 ( 3,-12) x 3 Index 01 Byte 83 (131) repeat 03 ( 3) times do move 18 (24) Move Relative X = 00 Y = F0 ( 0,-16) x 3 Index 02 Byte 84 (132) repeat 04 ( 4) times do move 10 (16) Move Relative X = 00 Y = F4 ( 0,-12) x 4 Index 03 Byte 84 (132) repeat 04 ( 4) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 4 Index 04 Byte 84 (132) repeat 04 ( 4) times do move 04 ( 4) Move Relative X = 01 Y = FC ( 1, -4) x 4 Index 05 Byte 84 (132) repeat 04 ( 4) times do move 01 ( 1) Move Relative X = 01 Y = 00 ( 1, 0) x 4 Index 06 Byte 82 (130) repeat 02 ( 2) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 2 Index 07 Byte 88 (136) repeat 08 ( 8) times do move 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) x 8 Index 08 Byte 8A (138) repeat 0A (10) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 10 Index 09 Byte 87 (135) repeat 07 ( 7) times do move 15 (21) Move Relative X = 03 Y = 0C ( 3, 12) x 7 Index 0A Byte 85 (133) repeat 05 ( 5) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 5 Index 0B Byte 06 ( 6) start alien exploding Pattern 0A (10) @ (&26F4) [REVERSED] Index 00 Byte 83 (131) repeat 03 ( 3) times do move 17 (23) Move Relative X = FD Y = F4 (-3,-12) x 3 Index 01 Byte 83 (131) repeat 03 ( 3) times do move 18 (24) Move Relative X = 00 Y = F0 ( 0,-16) x 3 Index 02 Byte 84 (132) repeat 04 ( 4) times do move 10 (16) Move Relative X = 00 Y = F4 ( 0,-12) x 4 Index 03 Byte 84 (132) repeat 04 ( 4) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 4 Index 04 Byte 84 (132) repeat 04 ( 4) times do move 07 ( 7) Move Relative X = FF Y = FC (-1, -4) x 4 Index 05 Byte 84 (132) repeat 04 ( 4) times do move 03 ( 3) Move Relative X = FF Y = 00 (-1, 0) x 4 Index 06 Byte 82 (130) repeat 02 ( 2) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 2 Index 07 Byte 88 (136) repeat 08 ( 8) times do move 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) x 8 Index 08 Byte 8A (138) repeat 0A (10) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 10 Index 09 Byte 87 (135) repeat 07 ( 7) times do move 16 (22) Move Relative X = FD Y = 0C (-3, 12) x 7 Index 0A Byte 85 (133) repeat 05 ( 5) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 5 Index 0B Byte 06 ( 6) start alien exploding Pattern 0B (11) @ (&270B) Index 00 Byte 86 (134) repeat 06 ( 6) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 6 Index 01 Byte 84 (132) repeat 04 ( 4) times do move 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) x 4 Index 02 Byte 85 (133) repeat 05 ( 5) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 5 Index 03 Byte 86 (134) repeat 06 ( 6) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 6 Index 04 Byte 89 (137) repeat 09 ( 9) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 9 Index 05 Byte 89 (137) repeat 09 ( 9) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 9 Index 06 Byte 84 (132) repeat 04 ( 4) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 4 Index 07 Byte 84 (132) repeat 04 ( 4) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 4 Index 08 Byte 85 (133) repeat 05 ( 5) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 5 Index 09 Byte 87 (135) repeat 07 ( 7) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 7 Index 0A Byte 93 (147) repeat 13 (19) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 19 Index 0B Byte 06 ( 6) start alien exploding Pattern 0B (11) @ (&270B) [REVERSED] Index 00 Byte 86 (134) repeat 06 ( 6) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 6 Index 01 Byte 84 (132) repeat 04 ( 4) times do move 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) x 4 Index 02 Byte 85 (133) repeat 05 ( 5) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 5 Index 03 Byte 86 (134) repeat 06 ( 6) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 6 Index 04 Byte 89 (137) repeat 09 ( 9) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 9 Index 05 Byte 89 (137) repeat 09 ( 9) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 9 Index 06 Byte 84 (132) repeat 04 ( 4) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 4 Index 07 Byte 84 (132) repeat 04 ( 4) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 4 Index 08 Byte 85 (133) repeat 05 ( 5) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 5 Index 09 Byte 87 (135) repeat 07 ( 7) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 7 Index 0A Byte 93 (147) repeat 13 (19) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 19 Index 0B Byte 06 ( 6) start alien exploding Pattern 0C (12) @ (&2722) Index 00 Byte 88 (136) repeat 08 ( 8) times do move 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) x 8 Index 01 Byte 85 (133) repeat 05 ( 5) times do move 01 ( 1) Move Relative X = 01 Y = 00 ( 1, 0) x 5 Index 02 Byte 8F (143) repeat 0F (15) times do move 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) x 15 Index 03 Byte 8F (143) repeat 0F (15) times do move 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) x 15 Index 04 Byte 88 (136) repeat 08 ( 8) times do move 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) x 8 Index 05 Byte 85 (133) repeat 05 ( 5) times do move 03 ( 3) Move Relative X = FF Y = 00 (-1, 0) x 5 Index 06 Byte 00 ( 0) jump to position in pattern 00 ( 0), next byte = new pattern index Pattern 0D (13) @ (&2730) Index 00 Byte 88 (136) repeat 08 ( 8) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 8 Index 01 Byte 85 (133) repeat 05 ( 5) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 5 Index 02 Byte 85 (133) repeat 05 ( 5) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 5 Index 03 Byte 84 (132) repeat 04 ( 4) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 4 Index 04 Byte 85 (133) repeat 05 ( 5) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 5 Index 05 Byte 85 (133) repeat 05 ( 5) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 5 Index 06 Byte 83 (131) repeat 03 ( 3) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 3 Index 07 Byte 87 (135) repeat 07 ( 7) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 7 Index 08 Byte 85 (133) repeat 05 ( 5) times do move 15 (21) Move Relative X = 03 Y = 0C ( 3, 12) x 5 Index 09 Byte 87 (135) repeat 07 ( 7) times do move 1D (29) Move Relative X = 04 Y = 10 ( 4, 16) x 7 Index 0A Byte 06 ( 6) start alien exploding Pattern 0D (13) @ (&2730) [REVERSED] Index 00 Byte 88 (136) repeat 08 ( 8) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 8 Index 01 Byte 85 (133) repeat 05 ( 5) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 5 Index 02 Byte 85 (133) repeat 05 ( 5) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 5 Index 03 Byte 84 (132) repeat 04 ( 4) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 4 Index 04 Byte 85 (133) repeat 05 ( 5) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 5 Index 05 Byte 85 (133) repeat 05 ( 5) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 5 Index 06 Byte 83 (131) repeat 03 ( 3) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 3 Index 07 Byte 87 (135) repeat 07 ( 7) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 7 Index 08 Byte 85 (133) repeat 05 ( 5) times do move 16 (22) Move Relative X = FD Y = 0C (-3, 12) x 5 Index 09 Byte 87 (135) repeat 07 ( 7) times do move 1E (30) Move Relative X = FC Y = 10 (-4, 16) x 7 Index 0A Byte 06 ( 6) start alien exploding Pattern 0E (14) @ (&2745) Index 00 Byte 0A (10) perform loop starting at index (01), counter = 01 ( 1), next byte = number of times Index 01 Byte 8C (140) repeat 0C (12) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 12 Index 02 Byte 83 (131) repeat 03 ( 3) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 3 Index 03 Byte 82 (130) repeat 02 ( 2) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 2 Index 04 Byte 82 (130) repeat 02 ( 2) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 2 Index 05 Byte 81 (129) repeat 01 ( 1) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 1 Index 06 Byte 82 (130) repeat 02 ( 2) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 2 Index 07 Byte 81 (129) repeat 01 ( 1) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 1 Index 08 Byte 82 (130) repeat 02 ( 2) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 2 Index 09 Byte 82 (130) repeat 02 ( 2) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 2 Index 0A Byte 83 (131) repeat 03 ( 3) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 3 Index 0B Byte 82 (130) repeat 02 ( 2) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 2 Index 0C Byte 81 (129) repeat 01 ( 1) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 1 Index 0D Byte 82 (130) repeat 02 ( 2) times do move 32 (50) Move Relative X = FE Y = 10 (-2, 16) x 2 Index 0E Byte 82 (130) repeat 02 ( 2) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 2 Index 0F Byte 0C (12) while loop counter>=0 jump to start of loop Index 10 Byte 87 (135) repeat 07 ( 7) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 7 Index 11 Byte 06 ( 6) start alien exploding Pattern 0E (14) @ (&2745) [REVERSED] Index 00 Byte 0A (10) perform loop starting at index (01), counter = 01 ( 1), next byte = number of times Index 01 Byte 8C (140) repeat 0C (12) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 12 Index 02 Byte 83 (131) repeat 03 ( 3) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 3 Index 03 Byte 82 (130) repeat 02 ( 2) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 2 Index 04 Byte 82 (130) repeat 02 ( 2) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 2 Index 05 Byte 81 (129) repeat 01 ( 1) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 1 Index 06 Byte 82 (130) repeat 02 ( 2) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 2 Index 07 Byte 81 (129) repeat 01 ( 1) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 1 Index 08 Byte 82 (130) repeat 02 ( 2) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 2 Index 09 Byte 82 (130) repeat 02 ( 2) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 2 Index 0A Byte 83 (131) repeat 03 ( 3) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 3 Index 0B Byte 82 (130) repeat 02 ( 2) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 2 Index 0C Byte 81 (129) repeat 01 ( 1) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 1 Index 0D Byte 82 (130) repeat 02 ( 2) times do move 32 (50) Move Relative X = FE Y = 10 (-2, 16) x 2 Index 0E Byte 82 (130) repeat 02 ( 2) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 2 Index 0F Byte 0C (12) while loop counter>=0 jump to start of loop Index 10 Byte 87 (135) repeat 07 ( 7) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 7 Index 11 Byte 06 ( 6) start alien exploding Pattern 0F (15) @ (&2767) Index 00 Byte 87 (135) repeat 07 ( 7) times do move 10 (16) Move Relative X = 00 Y = F4 ( 0,-12) x 7 Index 01 Byte 85 (133) repeat 05 ( 5) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 5 Index 02 Byte 83 (131) repeat 03 ( 3) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 3 Index 03 Byte 85 (133) repeat 05 ( 5) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 5 Index 04 Byte 86 (134) repeat 06 ( 6) times do move 11 (17) Move Relative X = 03 Y = 00 ( 3, 0) x 6 Index 05 Byte 85 (133) repeat 05 ( 5) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 5 Index 06 Byte 83 (131) repeat 03 ( 3) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 3 Index 07 Byte 85 (133) repeat 05 ( 5) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 5 Index 08 Byte 88 (136) repeat 08 ( 8) times do move 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) x 8 Index 09 Byte 06 ( 6) start alien exploding Pattern 0F (15) @ (&2767) [REVERSED] Index 00 Byte 87 (135) repeat 07 ( 7) times do move 10 (16) Move Relative X = 00 Y = F4 ( 0,-12) x 7 Index 01 Byte 85 (133) repeat 05 ( 5) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 5 Index 02 Byte 83 (131) repeat 03 ( 3) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 3 Index 03 Byte 85 (133) repeat 05 ( 5) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 5 Index 04 Byte 86 (134) repeat 06 ( 6) times do move 13 (19) Move Relative X = FD Y = 00 (-3, 0) x 6 Index 05 Byte 85 (133) repeat 05 ( 5) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 5 Index 06 Byte 83 (131) repeat 03 ( 3) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 3 Index 07 Byte 85 (133) repeat 05 ( 5) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 5 Index 08 Byte 88 (136) repeat 08 ( 8) times do move 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) x 8 Index 09 Byte 06 ( 6) start alien exploding Pattern 10 (16) @ (&277A) Index 00 Byte 8D (141) repeat 0D (13) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 13 Index 01 Byte 82 (130) repeat 02 ( 2) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 2 Index 02 Byte 82 (130) repeat 02 ( 2) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 2 Index 03 Byte 82 (130) repeat 02 ( 2) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 2 Index 04 Byte 82 (130) repeat 02 ( 2) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 2 Index 05 Byte 82 (130) repeat 02 ( 2) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 2 Index 06 Byte 82 (130) repeat 02 ( 2) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 2 Index 07 Byte 82 (130) repeat 02 ( 2) times do move 32 (50) Move Relative X = FE Y = 10 (-2, 16) x 2 Index 08 Byte 82 (130) repeat 02 ( 2) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 2 Index 09 Byte 82 (130) repeat 02 ( 2) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 2 Index 0A Byte 82 (130) repeat 02 ( 2) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 2 Index 0B Byte 82 (130) repeat 02 ( 2) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 2 Index 0C Byte 82 (130) repeat 02 ( 2) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 2 Index 0D Byte 82 (130) repeat 02 ( 2) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 2 Index 0E Byte 82 (130) repeat 02 ( 2) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 2 Index 0F Byte 82 (130) repeat 02 ( 2) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 2 Index 10 Byte 82 (130) repeat 02 ( 2) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 2 Index 11 Byte 82 (130) repeat 02 ( 2) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 2 Index 12 Byte 82 (130) repeat 02 ( 2) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 2 Index 13 Byte 82 (130) repeat 02 ( 2) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 2 Index 14 Byte 8E (142) repeat 0E (14) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 14 Index 15 Byte 06 ( 6) start alien exploding Pattern 10 (16) @ (&277A) [REVERSED] Index 00 Byte 8D (141) repeat 0D (13) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 13 Index 01 Byte 82 (130) repeat 02 ( 2) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 2 Index 02 Byte 82 (130) repeat 02 ( 2) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 2 Index 03 Byte 82 (130) repeat 02 ( 2) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 2 Index 04 Byte 82 (130) repeat 02 ( 2) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 2 Index 05 Byte 82 (130) repeat 02 ( 2) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 2 Index 06 Byte 82 (130) repeat 02 ( 2) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 2 Index 07 Byte 82 (130) repeat 02 ( 2) times do move 32 (50) Move Relative X = FE Y = 10 (-2, 16) x 2 Index 08 Byte 82 (130) repeat 02 ( 2) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 2 Index 09 Byte 82 (130) repeat 02 ( 2) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 2 Index 0A Byte 82 (130) repeat 02 ( 2) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 2 Index 0B Byte 82 (130) repeat 02 ( 2) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 2 Index 0C Byte 82 (130) repeat 02 ( 2) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 2 Index 0D Byte 82 (130) repeat 02 ( 2) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 2 Index 0E Byte 82 (130) repeat 02 ( 2) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 2 Index 0F Byte 82 (130) repeat 02 ( 2) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 2 Index 10 Byte 82 (130) repeat 02 ( 2) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 2 Index 11 Byte 82 (130) repeat 02 ( 2) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 2 Index 12 Byte 82 (130) repeat 02 ( 2) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 2 Index 13 Byte 82 (130) repeat 02 ( 2) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 2 Index 14 Byte 8E (142) repeat 0E (14) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 14 Index 15 Byte 06 ( 6) start alien exploding Pattern 11 (17) @ (&27A5) Index 00 Byte 8D (141) repeat 0D (13) times do move 15 (21) Move Relative X = 03 Y = 0C ( 3, 12) x 13 Index 01 Byte 83 (131) repeat 03 ( 3) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 3 Index 02 Byte 84 (132) repeat 04 ( 4) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 4 Index 03 Byte 85 (133) repeat 05 ( 5) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 5 Index 04 Byte 84 (132) repeat 04 ( 4) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 4 Index 05 Byte 83 (131) repeat 03 ( 3) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 3 Index 06 Byte 83 (131) repeat 03 ( 3) times do move 17 (23) Move Relative X = FD Y = F4 (-3,-12) x 3 Index 07 Byte 84 (132) repeat 04 ( 4) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 4 Index 08 Byte 83 (131) repeat 03 ( 3) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 3 Index 09 Byte 84 (132) repeat 04 ( 4) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 4 Index 0A Byte 83 (131) repeat 03 ( 3) times do move 16 (22) Move Relative X = FD Y = 0C (-3, 12) x 3 Index 0B Byte 83 (131) repeat 03 ( 3) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 3 Index 0C Byte 84 (132) repeat 04 ( 4) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 4 Index 0D Byte 85 (133) repeat 05 ( 5) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 5 Index 0E Byte 84 (132) repeat 04 ( 4) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 4 Index 0F Byte 83 (131) repeat 03 ( 3) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 3 Index 10 Byte 8D (141) repeat 0D (13) times do move 14 (20) Move Relative X = 03 Y = F4 ( 3,-12) x 13 Index 11 Byte 82 (130) repeat 02 ( 2) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 2 Index 12 Byte 06 ( 6) start alien exploding Pattern 11 (17) @ (&27A5) [REVERSED] Index 00 Byte 8D (141) repeat 0D (13) times do move 16 (22) Move Relative X = FD Y = 0C (-3, 12) x 13 Index 01 Byte 83 (131) repeat 03 ( 3) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 3 Index 02 Byte 84 (132) repeat 04 ( 4) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 4 Index 03 Byte 85 (133) repeat 05 ( 5) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 5 Index 04 Byte 84 (132) repeat 04 ( 4) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 4 Index 05 Byte 83 (131) repeat 03 ( 3) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 3 Index 06 Byte 83 (131) repeat 03 ( 3) times do move 14 (20) Move Relative X = 03 Y = F4 ( 3,-12) x 3 Index 07 Byte 84 (132) repeat 04 ( 4) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 4 Index 08 Byte 83 (131) repeat 03 ( 3) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 3 Index 09 Byte 84 (132) repeat 04 ( 4) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 4 Index 0A Byte 83 (131) repeat 03 ( 3) times do move 15 (21) Move Relative X = 03 Y = 0C ( 3, 12) x 3 Index 0B Byte 83 (131) repeat 03 ( 3) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 3 Index 0C Byte 84 (132) repeat 04 ( 4) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 4 Index 0D Byte 85 (133) repeat 05 ( 5) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 5 Index 0E Byte 84 (132) repeat 04 ( 4) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 4 Index 0F Byte 83 (131) repeat 03 ( 3) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 3 Index 10 Byte 8D (141) repeat 0D (13) times do move 17 (23) Move Relative X = FD Y = F4 (-3,-12) x 13 Index 11 Byte 82 (130) repeat 02 ( 2) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 2 Index 12 Byte 06 ( 6) start alien exploding Pattern 12 (18) @ (&27CA) Index 00 Byte 86 (134) repeat 06 ( 6) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 6 Index 01 Byte 86 (134) repeat 06 ( 6) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 6 Index 02 Byte 00 ( 0) jump to position in pattern 00 ( 0), next byte = new pattern index Pattern 12 (18) @ (&27CA) [REVERSED] Index 00 Byte 86 (134) repeat 06 ( 6) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 6 Index 01 Byte 86 (134) repeat 06 ( 6) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 6 Index 02 Byte 00 ( 0) jump to position in pattern 00 ( 0), next byte = new pattern index Pattern 13 (19) @ (&27D0) Index 00 Byte 0A (10) perform loop starting at index (01), counter = 03 ( 3), next byte = number of times Index 01 Byte 83 (131) repeat 03 ( 3) times do move 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) x 3 Index 02 Byte 81 (129) repeat 01 ( 1) times do move 32 (50) Move Relative X = FE Y = 10 (-2, 16) x 1 Index 03 Byte 0C (12) while loop counter>=0 jump to start of loop Index 04 Byte 85 (133) repeat 05 ( 5) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 5 Index 05 Byte 84 (132) repeat 04 ( 4) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 4 Index 06 Byte 96 (150) repeat 16 (22) times do move 40 (64) Move Relative X = F8 Y = 00 (-8, 0) x 22 Index 07 Byte 0A (10) perform loop starting at index (08), counter = 01 ( 1), next byte = number of times Index 08 Byte 85 (133) repeat 05 ( 5) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 5 Index 09 Byte 84 (132) repeat 04 ( 4) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 4 Index 0A Byte 84 (132) repeat 04 ( 4) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 4 Index 0B Byte 83 (131) repeat 03 ( 3) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 3 Index 0C Byte 83 (131) repeat 03 ( 3) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 3 Index 0D Byte 83 (131) repeat 03 ( 3) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 3 Index 0E Byte 83 (131) repeat 03 ( 3) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 3 Index 0F Byte 83 (131) repeat 03 ( 3) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 3 Index 10 Byte 84 (132) repeat 04 ( 4) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 4 Index 11 Byte 88 (136) repeat 08 ( 8) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 8 Index 12 Byte 0C (12) while loop counter>=0 jump to start of loop Index 13 Byte 83 (131) repeat 03 ( 3) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 3 Index 14 Byte 84 (132) repeat 04 ( 4) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 4 Index 15 Byte 8C (140) repeat 0C (12) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 12 Index 16 Byte 06 ( 6) start alien exploding Pattern 13 (19) @ (&27D0) [REVERSED] Index 00 Byte 0A (10) perform loop starting at index (01), counter = 03 ( 3), next byte = number of times Index 01 Byte 83 (131) repeat 03 ( 3) times do move 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) x 3 Index 02 Byte 81 (129) repeat 01 ( 1) times do move 32 (50) Move Relative X = FE Y = 10 (-2, 16) x 1 Index 03 Byte 0C (12) while loop counter>=0 jump to start of loop Index 04 Byte 85 (133) repeat 05 ( 5) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 5 Index 05 Byte 84 (132) repeat 04 ( 4) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 4 Index 06 Byte 96 (150) repeat 16 (22) times do move 40 (64) Move Relative X = F8 Y = 00 (-8, 0) x 22 Index 07 Byte 0A (10) perform loop starting at index (08), counter = 01 ( 1), next byte = number of times Index 08 Byte 85 (133) repeat 05 ( 5) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 5 Index 09 Byte 84 (132) repeat 04 ( 4) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 4 Index 0A Byte 84 (132) repeat 04 ( 4) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 4 Index 0B Byte 83 (131) repeat 03 ( 3) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 3 Index 0C Byte 83 (131) repeat 03 ( 3) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 3 Index 0D Byte 83 (131) repeat 03 ( 3) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 3 Index 0E Byte 83 (131) repeat 03 ( 3) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 3 Index 0F Byte 83 (131) repeat 03 ( 3) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 3 Index 10 Byte 84 (132) repeat 04 ( 4) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 4 Index 11 Byte 88 (136) repeat 08 ( 8) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 8 Index 12 Byte 0C (12) while loop counter>=0 jump to start of loop Index 13 Byte 83 (131) repeat 03 ( 3) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 3 Index 14 Byte 84 (132) repeat 04 ( 4) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 4 Index 15 Byte 8C (140) repeat 0C (12) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 12 Index 16 Byte 06 ( 6) start alien exploding Pattern 14 (20) @ (&27FB) Index 00 Byte 8C (140) repeat 0C (12) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 12 Index 01 Byte 0A (10) perform loop starting at index (02), counter = 03 ( 3), next byte = number of times Index 02 Byte 81 (129) repeat 01 ( 1) times do move 40 (64) Move Relative X = F8 Y = 00 (-8, 0) x 1 Index 03 Byte 08 ( 8) 1/4 chance of dropping a bomb Index 04 Byte 81 (129) repeat 01 ( 1) times do move 40 (64) Move Relative X = F8 Y = 00 (-8, 0) x 1 Index 05 Byte 0C (12) while loop counter>=0 jump to start of loop Index 06 Byte 89 (137) repeat 09 ( 9) times do move 14 (20) Move Relative X = 03 Y = F4 ( 3,-12) x 9 Index 07 Byte 06 ( 6) start alien exploding Pattern 14 (20) @ (&27FB) [REVERSED] Index 00 Byte 8C (140) repeat 0C (12) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 12 Index 01 Byte 0A (10) perform loop starting at index (02), counter = 03 ( 3), next byte = number of times Index 02 Byte 81 (129) repeat 01 ( 1) times do move 40 (64) Move Relative X = F8 Y = 00 (-8, 0) x 1 Index 03 Byte 08 ( 8) 1/4 chance of dropping a bomb Index 04 Byte 81 (129) repeat 01 ( 1) times do move 40 (64) Move Relative X = F8 Y = 00 (-8, 0) x 1 Index 05 Byte 0C (12) while loop counter>=0 jump to start of loop Index 06 Byte 89 (137) repeat 09 ( 9) times do move 17 (23) Move Relative X = FD Y = F4 (-3,-12) x 9 Index 07 Byte 06 ( 6) start alien exploding Pattern 15 (21) @ (&2808) Index 00 Byte 94 (148) repeat 14 (20) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 20 Index 01 Byte 84 (132) repeat 04 ( 4) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 4 Index 02 Byte 85 (133) repeat 05 ( 5) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 5 Index 03 Byte 83 (131) repeat 03 ( 3) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 3 Index 04 Byte 83 (131) repeat 03 ( 3) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 3 Index 05 Byte 84 (132) repeat 04 ( 4) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 4 Index 06 Byte 82 (130) repeat 02 ( 2) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 2 Index 07 Byte 84 (132) repeat 04 ( 4) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 4 Index 08 Byte 82 (130) repeat 02 ( 2) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 2 Index 09 Byte 8C (140) repeat 0C (12) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 12 Index 0A Byte 84 (132) repeat 04 ( 4) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 4 Index 0B Byte 83 (131) repeat 03 ( 3) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 3 Index 0C Byte 83 (131) repeat 03 ( 3) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 3 Index 0D Byte 83 (131) repeat 03 ( 3) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 3 Index 0E Byte 83 (131) repeat 03 ( 3) times do move 32 (50) Move Relative X = FE Y = 10 (-2, 16) x 3 Index 0F Byte 84 (132) repeat 04 ( 4) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 4 Index 10 Byte 83 (131) repeat 03 ( 3) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 3 Index 11 Byte 86 (134) repeat 06 ( 6) times do move 13 (19) Move Relative X = FD Y = 00 (-3, 0) x 6 Index 12 Byte 84 (132) repeat 04 ( 4) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 4 Index 13 Byte 86 (134) repeat 06 ( 6) times do move 13 (19) Move Relative X = FD Y = 00 (-3, 0) x 6 Index 14 Byte 06 ( 6) start alien exploding Pattern 15 (21) @ (&2808) [REVERSED] Index 00 Byte 94 (148) repeat 14 (20) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 20 Index 01 Byte 84 (132) repeat 04 ( 4) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 4 Index 02 Byte 85 (133) repeat 05 ( 5) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 5 Index 03 Byte 83 (131) repeat 03 ( 3) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 3 Index 04 Byte 83 (131) repeat 03 ( 3) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 3 Index 05 Byte 84 (132) repeat 04 ( 4) times do move 08 ( 8) Move Relative X = 00 Y = F8 ( 0, -8) x 4 Index 06 Byte 82 (130) repeat 02 ( 2) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 2 Index 07 Byte 84 (132) repeat 04 ( 4) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 4 Index 08 Byte 82 (130) repeat 02 ( 2) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 2 Index 09 Byte 8C (140) repeat 0C (12) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 12 Index 0A Byte 84 (132) repeat 04 ( 4) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 4 Index 0B Byte 83 (131) repeat 03 ( 3) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 3 Index 0C Byte 83 (131) repeat 03 ( 3) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 3 Index 0D Byte 83 (131) repeat 03 ( 3) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 3 Index 0E Byte 83 (131) repeat 03 ( 3) times do move 32 (50) Move Relative X = FE Y = 10 (-2, 16) x 3 Index 0F Byte 84 (132) repeat 04 ( 4) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 4 Index 10 Byte 83 (131) repeat 03 ( 3) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 3 Index 11 Byte 86 (134) repeat 06 ( 6) times do move 11 (17) Move Relative X = 03 Y = 00 ( 3, 0) x 6 Index 12 Byte 84 (132) repeat 04 ( 4) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 4 Index 13 Byte 86 (134) repeat 06 ( 6) times do move 11 (17) Move Relative X = 03 Y = 00 ( 3, 0) x 6 Index 14 Byte 06 ( 6) start alien exploding Pattern 16 (22) @ (&2831) Index 00 Byte 87 (135) repeat 07 ( 7) times do move 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) x 7 Index 01 Byte 85 (133) repeat 05 ( 5) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 5 Index 02 Byte 83 (131) repeat 03 ( 3) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 3 Index 03 Byte 85 (133) repeat 05 ( 5) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 5 Index 04 Byte 86 (134) repeat 06 ( 6) times do move 11 (17) Move Relative X = 03 Y = 00 ( 3, 0) x 6 Index 05 Byte 85 (133) repeat 05 ( 5) times do move 34 (52) Move Relative X = 02 Y = FC ( 2, -4) x 5 Index 06 Byte 83 (131) repeat 03 ( 3) times do move 0C (12) Move Relative X = 02 Y = F8 ( 2, -8) x 3 Index 07 Byte 85 (133) repeat 05 ( 5) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 5 Index 08 Byte 88 (136) repeat 08 ( 8) times do move 10 (16) Move Relative X = 00 Y = F4 ( 0,-12) x 8 Index 09 Byte 06 ( 6) start alien exploding Pattern 16 (22) @ (&2831) [REVERSED] Index 00 Byte 87 (135) repeat 07 ( 7) times do move 12 (18) Move Relative X = 00 Y = 0C ( 0, 12) x 7 Index 01 Byte 85 (133) repeat 05 ( 5) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 5 Index 02 Byte 83 (131) repeat 03 ( 3) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 3 Index 03 Byte 85 (133) repeat 05 ( 5) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 5 Index 04 Byte 86 (134) repeat 06 ( 6) times do move 13 (19) Move Relative X = FD Y = 00 (-3, 0) x 6 Index 05 Byte 85 (133) repeat 05 ( 5) times do move 37 (55) Move Relative X = FE Y = F0 (-2,-16) x 5 Index 06 Byte 83 (131) repeat 03 ( 3) times do move 0F (15) Move Relative X = FE Y = F8 (-2, -8) x 3 Index 07 Byte 85 (133) repeat 05 ( 5) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 5 Index 08 Byte 88 (136) repeat 08 ( 8) times do move 10 (16) Move Relative X = 00 Y = F4 ( 0,-12) x 8 Index 09 Byte 06 ( 6) start alien exploding Pattern 17 (23) @ (&2844) Index 00 Byte 9D (157) repeat 1D (29) times do move 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) x 29 Index 01 Byte 86 (134) repeat 06 ( 6) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 6 Index 02 Byte 9D (157) repeat 1D (29) times do move 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) x 29 Index 03 Byte 86 (134) repeat 06 ( 6) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 6 Index 04 Byte 00 ( 0) jump to position in pattern 00 ( 0), next byte = new pattern index Pattern 17 (23) @ (&2844) [REVERSED] Index 00 Byte 9D (157) repeat 1D (29) times do move 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) x 29 Index 01 Byte 86 (134) repeat 06 ( 6) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 6 Index 02 Byte 9D (157) repeat 1D (29) times do move 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) x 29 Index 03 Byte 86 (134) repeat 06 ( 6) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 6 Index 04 Byte 00 ( 0) jump to position in pattern 00 ( 0), next byte = new pattern index Pattern 18 (24) @ (&284E) Index 00 Byte 82 (130) repeat 02 ( 2) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 2 Index 01 Byte 83 (131) repeat 03 ( 3) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 3 Index 02 Byte 8D (141) repeat 0D (13) times do move 31 (49) Move Relative X = 02 Y = 04 ( 2, 4) x 13 Index 03 Byte 83 (131) repeat 03 ( 3) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 3 Index 04 Byte 82 (130) repeat 02 ( 2) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 2 Index 05 Byte 83 (131) repeat 03 ( 3) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 3 Index 06 Byte 8D (141) repeat 0D (13) times do move 36 (54) Move Relative X = FE Y = 04 (-2, 4) x 13 Index 07 Byte 83 (131) repeat 03 ( 3) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 3 Index 08 Byte 00 ( 0) jump to position in pattern 00 ( 0), next byte = new pattern index Pattern 18 (24) @ (&284E) [REVERSED] Index 00 Byte 82 (130) repeat 02 ( 2) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 2 Index 01 Byte 83 (131) repeat 03 ( 3) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 3 Index 02 Byte 8D (141) repeat 0D (13) times do move 33 (51) Move Relative X = FE Y = FC (-2, -4) x 13 Index 03 Byte 83 (131) repeat 03 ( 3) times do move 0E (14) Move Relative X = FE Y = 08 (-2, 8) x 3 Index 04 Byte 82 (130) repeat 02 ( 2) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 2 Index 05 Byte 83 (131) repeat 03 ( 3) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 3 Index 06 Byte 8D (141) repeat 0D (13) times do move 35 (53) Move Relative X = 02 Y = 10 ( 2, 16) x 13 Index 07 Byte 83 (131) repeat 03 ( 3) times do move 0D (13) Move Relative X = 02 Y = 08 ( 2, 8) x 3 Index 08 Byte 00 ( 0) jump to position in pattern 00 ( 0), next byte = new pattern index Pattern 19 (25) @ (&2860) Index 00 Byte 90 (144) repeat 10 (16) times do move 02 ( 2) Move Relative X = 00 Y = 04 ( 0, 4) x 16 Index 01 Byte 83 (131) repeat 03 ( 3) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 3 Index 02 Byte A0 (160) repeat 20 (32) times do move 02 ( 2) Move Relative X = 00 Y = 04 ( 0, 4) x 32 Index 03 Byte 8D (141) repeat 0D (13) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 13 Index 04 Byte 06 ( 6) start alien exploding Pattern 19 (25) @ (&2860) [REVERSED] Index 00 Byte 90 (144) repeat 10 (16) times do move 02 ( 2) Move Relative X = 00 Y = 04 ( 0, 4) x 16 Index 01 Byte 83 (131) repeat 03 ( 3) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 3 Index 02 Byte A0 (160) repeat 20 (32) times do move 02 ( 2) Move Relative X = 00 Y = 04 ( 0, 4) x 32 Index 03 Byte 8D (141) repeat 0D (13) times do move 30 (48) Move Relative X = 02 Y = F0 ( 2,-16) x 13 Index 04 Byte 06 ( 6) start alien exploding Pattern 1A (26) @ (&2869) Index 00 Byte A5 (165) repeat 25 (37) times do move 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) x 37 Index 01 Byte 90 (144) repeat 10 (16) times do move 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) x 16 Index 02 Byte 84 (132) repeat 04 ( 4) times do move 01 ( 1) Move Relative X = 01 Y = 00 ( 1, 0) x 4 Index 03 Byte 90 (144) repeat 10 (16) times do move 04 ( 4) Move Relative X = 01 Y = FC ( 1, -4) x 16 Index 04 Byte A8 (168) repeat 28 (40) times do move 07 ( 7) Move Relative X = FF Y = FC (-1, -4) x 40 Index 05 Byte 06 ( 6) start alien exploding Pattern 1A (26) @ (&2869) [REVERSED] Index 00 Byte A5 (165) repeat 25 (37) times do move 06 ( 6) Move Relative X = FF Y = 04 (-1, 4) x 37 Index 01 Byte 90 (144) repeat 10 (16) times do move 05 ( 5) Move Relative X = 01 Y = 04 ( 1, 4) x 16 Index 02 Byte 84 (132) repeat 04 ( 4) times do move 03 ( 3) Move Relative X = FF Y = 00 (-1, 0) x 4 Index 03 Byte 90 (144) repeat 10 (16) times do move 07 ( 7) Move Relative X = FF Y = FC (-1, -4) x 16 Index 04 Byte A8 (168) repeat 28 (40) times do move 04 ( 4) Move Relative X = 01 Y = FC ( 1, -4) x 40 Index 05 Byte 06 ( 6) start alien exploding Pattern 1B (27) @ (&2874) Index 00 Byte A4 (164) repeat 24 (36) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 36 Index 01 Byte 83 (131) repeat 03 ( 3) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 3 Index 02 Byte A4 (164) repeat 24 (36) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 36 Index 03 Byte 83 (131) repeat 03 ( 3) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 3 Index 04 Byte A4 (164) repeat 24 (36) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 36 Index 05 Byte 83 (131) repeat 03 ( 3) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 3 Index 06 Byte A4 (164) repeat 24 (36) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 36 Index 07 Byte 0E (14) move sprite back to top (y=72) left (x=0) for pack of cards pattern Index 08 Byte 02 ( 2) jump to start of new pattern 1B (27), next byte = pattern number Pattern 1C (28) @ (&287A) Index 00 Byte 83 (131) repeat 03 ( 3) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 3 Index 01 Byte A4 (164) repeat 24 (36) times do move 09 ( 9) Move Relative X = 02 Y = 00 ( 2, 0) x 36 Index 02 Byte 83 (131) repeat 03 ( 3) times do move 0A (10) Move Relative X = 00 Y = 08 ( 0, 8) x 3 Index 03 Byte A4 (164) repeat 24 (36) times do move 0B (11) Move Relative X = FE Y = 00 (-2, 0) x 36 Index 04 Byte 0E (14) move sprite back to top (y=72) left (x=0) for pack of cards pattern Index 05 Byte 02 ( 2) jump to start of new pattern 1B (27), next byte = pattern number Pattern 1D (29) @ (&2885) Index 00 Byte C5 (197) repeat 45 (69) times do move 01 ( 1) Move Relative X = 01 Y = 00 ( 1, 0) x 69 Index 01 Byte C5 (197) repeat 45 (69) times do move 03 ( 3) Move Relative X = FF Y = 00 (-1, 0) x 69 Index 02 Byte 00 ( 0) jump to position in pattern 00 ( 0), next byte = new pattern index