├── sid.asm ├── c128_ui.png ├── gfxfont.prg ├── items.png ├── level-a-128 ├── level-b-128 ├── level-c-128 ├── level-d-128 ├── level-e-128 ├── level-f-128 ├── level-g-128 ├── level-h-128 ├── level-i-128 ├── level-j-128 ├── level-k-128 ├── level-l-128 ├── level-m-128 ├── level-n-128 ├── level-o-128 ├── music-128 ├── music.c64 ├── tileset-128 ├── tileset.gfx ├── weapons.png ├── face_sheet.png ├── intro screen.gif ├── weapons-items.gif ├── vdc-intro-dither.gif ├── vdc-intro-solid.gif ├── game over screen 11.png ├── c128_tileset_07-06-2022.gif ├── README.md ├── todo-list.txt ├── bootsect.asm ├── 128-robots-weapons.xpm ├── memmap.inc ├── loader.asm ├── 128-robots-items.xpm ├── common.asm ├── vdc-intro-dither.xpm ├── vdc-intro-solid.xpm ├── macro.inc ├── praddrs.inc ├── boot.asm ├── 128-robots-faces.xpm ├── vdc.asm ├── const.inc ├── faces.asm ├── sprites.asm └── LICENSE /sid.asm: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /c128_ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/c128_ui.png -------------------------------------------------------------------------------- /gfxfont.prg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/gfxfont.prg -------------------------------------------------------------------------------- /items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/items.png -------------------------------------------------------------------------------- /level-a-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-a-128 -------------------------------------------------------------------------------- /level-b-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-b-128 -------------------------------------------------------------------------------- /level-c-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-c-128 -------------------------------------------------------------------------------- /level-d-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-d-128 -------------------------------------------------------------------------------- /level-e-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-e-128 -------------------------------------------------------------------------------- /level-f-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-f-128 -------------------------------------------------------------------------------- /level-g-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-g-128 -------------------------------------------------------------------------------- /level-h-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-h-128 -------------------------------------------------------------------------------- /level-i-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-i-128 -------------------------------------------------------------------------------- /level-j-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-j-128 -------------------------------------------------------------------------------- /level-k-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-k-128 -------------------------------------------------------------------------------- /level-l-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-l-128 -------------------------------------------------------------------------------- /level-m-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-m-128 -------------------------------------------------------------------------------- /level-n-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-n-128 -------------------------------------------------------------------------------- /level-o-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/level-o-128 -------------------------------------------------------------------------------- /music-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/music-128 -------------------------------------------------------------------------------- /music.c64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/music.c64 -------------------------------------------------------------------------------- /tileset-128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/tileset-128 -------------------------------------------------------------------------------- /tileset.gfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/tileset.gfx -------------------------------------------------------------------------------- /weapons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/weapons.png -------------------------------------------------------------------------------- /face_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/face_sheet.png -------------------------------------------------------------------------------- /intro screen.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/intro screen.gif -------------------------------------------------------------------------------- /weapons-items.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/weapons-items.gif -------------------------------------------------------------------------------- /vdc-intro-dither.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/vdc-intro-dither.gif -------------------------------------------------------------------------------- /vdc-intro-solid.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/vdc-intro-solid.gif -------------------------------------------------------------------------------- /game over screen 11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/game over screen 11.png -------------------------------------------------------------------------------- /c128_tileset_07-06-2022.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeropolis79/PETSCIIRobots-C128/HEAD/c128_tileset_07-06-2022.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PETSCIIRobots-C128 2 | Attack of the Petscii Robots - C128 3 | The Attack of the PETSCII Robots source code has been provided by David Murray for the 4 | 5 | purposes of study and also to provide information to those who would like to port the game 6 | 7 | to other systems. This code may NOT be used to produce unofficial copies for sale and the 8 | 9 | code must NOT be modified in anyway unless adding a feature, in which both the source and 10 | 11 | compiled versions must be sent to David Murray. 12 | 13 | Due to time constraints, David Murray will NOT be prodiving support. He has gladly given 14 | 15 | permission for me to host this. 16 | 17 | The Commodore 64 REU and Commodore 128 versions were coded by Scott Robison, who sadly 18 | 19 | passsed away in August 2022, so please do not attempt to contact his family to ask 20 | 21 | questions about it. His widow found the folder containing the source code to these 22 | 23 | versions but we have no way of knowing if these are the latest builds. 24 | -------------------------------------------------------------------------------- /todo-list.txt: -------------------------------------------------------------------------------- 1 | Performance improvement by drawing only changed tiles 2 | 3 | convert weapons/items display and keycards to bit-map graphics (I can help with this) 4 | 5 | use 4 freed-up sprites to represent units 28 - 31 which can be weapons fire, bombs, small explosion, or magnet. 6 | 7 | replace title screen with bit-mapped graphic 8 | 9 | redesign the parts of the game screen that used to be character graphics into something bitmapped (I can do this) 10 | 11 | Work out some form of animation for water, air conditioner, etc 12 | 13 | I need to find more places where text is supposed to be drawn and fix it up to draw on the bitmap. For example, the win/lose screen has practically no information on it at the moment. 14 | 15 | *** DONE *** redesign player character so that it contrasts better with new graphics (I can do this) 16 | 17 | *** DONE *** It still might be useful to see where goat tracker can relocate the music to, so that we can reclaim a VIC bank in ram block 0. Starting at $9000 instead of $A000 would probably be ideal if it is possible. 18 | 19 | 71 20 | -------------------------------------------------------------------------------- /bootsect.asm: -------------------------------------------------------------------------------- 1 | !TO "bootsect.bin", PLAIN 2 | !SYMBOLLIST "bootsect.sym" 3 | 4 | !SOURCE "const.inc" 5 | 6 | * = ADDR_BOOTSECT 7 | 8 | ; signature that identifies this as a boot sector 9 | !PET "cbm" 10 | 11 | ; load address for extra sectors (not used) 12 | !WORD 0 13 | 14 | ; ram block for extra sectors (not used) 15 | !BYTE 0 16 | 17 | ; number of extra sectors to load (none) 18 | !BYTE 0 19 | 20 | ; message to display after BOOT text 21 | !PET "128-robots", 0 22 | 23 | ; file to load (not used) 24 | !PET 0 25 | 26 | ; boot routine 27 | LDA $BA 28 | AND #3 29 | TAY 30 | 31 | LDA .CMD_LO,Y 32 | TAX 33 | LDA .CMD_HI,Y 34 | TAY 35 | 36 | JMP J_EXECUTE_A_LINE 37 | 38 | ; BASIC commands to execute 39 | .CMD_8 !PET "run", $22, "boot-128", $22, ",u8", $00 40 | .CMD_9 !PET "run", $22, "boot-128", $22, ",u9", $00 41 | .CMD_10 !PET "run", $22, "boot-128", $22, ",u10", $00 42 | .CMD_11 !PET "run", $22, "boot-128", $22, ",u11", $00 43 | 44 | .CMD_LO !BYTE <(.CMD_8-1),<(.CMD_9-1),<(.CMD_10-1),<(.CMD_11-1) 45 | .CMD_HI !BYTE >(.CMD_8-1),>(.CMD_9-1),>(.CMD_10-1),>(.CMD_11-1) 46 | 47 | ; pad the remaining bytes in the sector with nul 48 | !FILL (SIZE_BOOTSECT-(*-ADDR_BOOTSECT)), 0 49 | 50 | -------------------------------------------------------------------------------- /128-robots-weapons.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * pixmap_weapons[] = { 3 | "48 48 11 1", 4 | " c #000000", 5 | ". c #352879", 6 | "+ c #91C6D5", 7 | "@ c #8E82CA", 8 | "# c #FFFFFF", 9 | "$ c #747474", 10 | "% c #4D4D4D", 11 | "& c #B8B8B8", 12 | "* c #BB8A45", 13 | "= c #715E03", 14 | "- c #FFFFA5", 15 | " ", 16 | " ", 17 | " ", 18 | " ", 19 | " ", 20 | " ", 21 | " ..++ ", 22 | " .. ++++ ", 23 | " @@@@ @@@@ @@@@++++++........ ", 24 | " @@++@@++##@@++++########++++.. ", 25 | " .... .... ....++++++++.... ", 26 | " $$ %%%%%%%%%% ", 27 | " $$ %%&&##%% ", 28 | " ##$$%%$$ ", 29 | " &&##$$ ", 30 | " %%$$&& ", 31 | " $$&&## ", 32 | " %%$$ ", 33 | " ", 34 | " ", 35 | " ", 36 | " ", 37 | " ", 38 | " ", 39 | " ", 40 | " ", 41 | " ", 42 | " ", 43 | " $$ %%%%%%%%%% $$$$ ", 44 | " &&&&$$ %%%%%%$$##$$ ", 45 | " ..................................$$$$ ", 46 | " &&&&&&####++##########++####....**$$%%%%%% ", 47 | " ++++++++++++++++++++++++........==&&##&&&&++ ", 48 | " $$$$$$..$$$$....................--$$%%%%%%##..", 49 | " %% %%%%%%%%%% %%..==&&##&&&&....", 50 | " %%%%............................$$%%%%%%.. ", 51 | " %% %%%% %%%%%%$$$$ ", 52 | " %%%%$$$$$$..%%%%$$&& ", 53 | " %%$$ $$....%% ", 54 | " && %%$$&&## ", 55 | " &&&&%%.... ", 56 | " %%&&$$&&%% ", 57 | " %%%%..%% ", 58 | " %%%%%% ", 59 | " ", 60 | " ", 61 | " ", 62 | " "}; 63 | -------------------------------------------------------------------------------- /memmap.inc: -------------------------------------------------------------------------------- 1 | ;;; 2 | ;;; !set IS_FOUND = 0 3 | ;;; !ifdef IS_64GFX !set IS_FOUND = IS_FOUND + 1 4 | ;;; !ifdef IS_128VIC !set IS_FOUND = IS_FOUND + 1 5 | ;;; !ifdef IS_128VDC !set IS_FOUND = IS_FOUND + 1 6 | ;;; 7 | ;;; !if IS_FOUND <> 1 { 8 | ;;; !serious "TOO MANY IS_x DEFINES SPECIFIED" 9 | ;;; } 10 | ;;; 11 | ;;; !ifdef IS_64GFX { 12 | ;;; !serious "IS_64GFX NOT YET SUPPORTED" 13 | ;;; } 14 | ;;; 15 | ;;; !ifdef IS_128VIC { 16 | ;;; } 17 | ;;; 18 | ;;; !ifdef IS_128VDC { 19 | ;;; !serious "IS_128VDC NOT YET SUPPORTED" 20 | ;;; } 21 | ;;; 22 | ;;; !source "MMRAM0.SYM" 23 | ;;; !source "MMRAM1.SYM" 24 | ;;; 25 | ;;; R6510 = $01 26 | ;;; CINV = $0314 27 | ;;; 28 | ;;; SP0X = $D000 29 | ;;; SP0Y = $D001 30 | ;;; SP1X = $D002 31 | ;;; SP1Y = $D003 32 | ;;; SP2X = $D004 33 | ;;; SP2Y = $D005 34 | ;;; SP3X = $D006 35 | ;;; SP3Y = $D007 36 | ;;; SP4X = $D008 37 | ;;; SP4Y = $D009 38 | ;;; SP5X = $D00A 39 | ;;; SP5Y = $D00B 40 | ;;; SP6X = $D00C 41 | ;;; SP6Y = $D00D 42 | ;;; SP7X = $D00E 43 | ;;; SP7Y = $D00F 44 | ;;; MSIGX = $D010 45 | ;;; SPENA = $D015 46 | ;;; SCROLX = $D016 47 | ;;; YXPAND = $D017 48 | ;;; VMCSB = $D018 49 | ;;; SPMC = $D01C 50 | ;;; EXTCOL = $D020 51 | ;;; BGCOL0 = $D021 52 | ;;; SPMC0 = $D025 53 | ;;; SPMC1 = $D026 54 | ;;; SP0COL = $D027 55 | ;;; SP1COL = $D028 56 | ;;; SP2COL = $D029 57 | ;;; SP3COL = $D02A 58 | ;;; SP4COL = $D02B 59 | ;;; SP5COL = $D02C 60 | ;;; SP6COL = $D02D 61 | ;;; SP7COL = $D02E 62 | ;;; 63 | ;;; SIGVOL = $D418 64 | ;;; CI2PRA = $DD00 65 | ;;; CI2PRB = $DD01 66 | ;;; C2DDRB = $DD03 67 | ;;; IRQ = $FA65 68 | ;;; JSETBNK = $FF68 69 | ;;; SETLFS = $FFBA 70 | ;;; SETNAM = $FFBD 71 | ;;; CLOSE = $FFC3 72 | ;;; CHROUT = $FFD2 73 | ;;; LOAD = $FFD5 74 | ;;; GETIN = $FFE4 75 | ;;; 76 | ;;; !ifdef IS_64GFX { 77 | ;;; NO_KEY_PRESSED = 64 78 | ;;; 79 | ;;; LSTX = $C5 80 | ;;; NDX = $C6 81 | ;;; XMAX = $0289 82 | ;;; RPTFLG = $028A 83 | ;;; DELAY = $028C 84 | ;;; MODE = $0291 85 | ;;; BASIC_PROGRAM_TEXT = $0801 86 | ;;; GET_KEY = $F142 87 | ;;; } 88 | ;;; 89 | ;;; !ifndef IS_64GFX { 90 | ;;; NO_KEY_PRESSED = 88 91 | ;;; 92 | ;;; NDX = $D0 93 | ;;; LSTX = $D5 94 | ;;; GRAPHM = $D8 95 | ;;; MODE = $F7 96 | ;;; KEYCHK = $033C 97 | ;;; INIT_STATUS = $0A04 98 | ;;; XMAX = $0A20 99 | ;;; RPTFLG = $0A22 100 | ;;; DELAY = $0A24 101 | ;;; IRQ_WRAP_FLAG = $12FD 102 | ;;; BASIC_PROGRAM_TEXT = $1C01 103 | ;;; MMURCR = $D506 104 | ;;; GET_KEY = $EEEF 105 | ;;; MMU = $FF00 106 | ;;; } 107 | ;;; 108 | ;;; 109 | 110 | -------------------------------------------------------------------------------- /loader.asm: -------------------------------------------------------------------------------- 1 | !TO "loader-128", CBM 2 | !SYMBOLLIST "loader.sym" 3 | 4 | !SOURCE "const.inc" 5 | !SOURCE "macro.inc" 6 | !SOURCE "intro.sym" 7 | 8 | ; disk order 9 | ; ---------- 10 | ; bootsect at T1S0 11 | ; boot-128 12 | ; loader-128 13 | ; intro-128 (BITMAP ONLY) 14 | ; common-128 15 | ; faces-128 (BITMAP ONLY) 16 | ; game0-128 17 | ; graphics-128 (BITMAP ONLY) 18 | ; music.c64 (CHARMAP ONLY) 19 | ; music-128 (BITMAP ONLY) 20 | ; game1-128 21 | ; tileset.gfx (CHARMAP ONLY) 22 | ; tileset-128 (BITMAP ONLY) 23 | ; gfxfont.prg (CHARMAP ONLY) 24 | ; sprites-128 25 | ; level-a-128 26 | ; level-b-128 27 | ; level-c-128 28 | ; level-d-128 29 | ; level-e-128 30 | ; level-f-128 31 | ; level-g-128 32 | ; level-h-128 33 | ; level-i-128 34 | ; level-j-128 35 | ; level-k-128 36 | ; level-l-128 37 | ; level-m-128 38 | 39 | * = ADDR_LOADER 40 | 41 | LOADER 42 | 43 | ;;; INTRO_MSG = "loading intro" 44 | INTRO_FILE = "intro-128" 45 | +LDCFILE INTRO_FILE, FAR_ADDR_INTRO, SIZE_INTRO 46 | JSR copy_intro_bitmap 47 | 48 | +STI CI2PRA, %10010100 ; MOVE VIC-II TO $C000-$FFFF REGION via CIA2 PORT A 49 | 50 | +STI VMCSB, %10000000 ; MOVE SCREEN RAM to $E000 & CHARSET/BITMAP AT $C000 51 | !IF VIC_BITMAP { 52 | +STI SCROLY, %00111011 ; enable bitmap mode 53 | +STI SCROLX, %00011000 ; enable multicolor mode 54 | +MORAI $01, 4 ; disable charset rom 55 | } 56 | 57 | +STI MMURCR, %00000101 ; 00=VICBLOCK 00=NA 01=COMMONBOTTOM 01=COMMON4K 58 | +STI SCROLX, %00001000 ; enable high resolution mode 59 | 60 | +STIW $FB, $C000+(7*320)+(1*8) 61 | 62 | JSR PROGRESS 63 | 64 | ;;; GRAPHICS_MSG = "loading graphics" 65 | GRAPHICS_FILE = "graphics-128" 66 | +LDCFILE GRAPHICS_FILE, FAR_ADDR_GRAPHICS, SIZE_GRAPHICS 67 | 68 | JSR PROGRESS 69 | JSR PROGRESS 70 | JSR PROGRESS 71 | 72 | ;;; COMMON_MSG = "loading common" 73 | COMMON_FILE = "common-128" 74 | +LDCFILE COMMON_FILE, FAR_ADDR_COMMON, SIZE_COMMON 75 | 76 | JSR PROGRESS 77 | 78 | ;;; FACES_MSG = "loading faces" 79 | FACES_FILE = "faces-128" 80 | +LDCFILE FACES_FILE, FAR_ADDR_FACES, SIZE_FACES 81 | JSR C_COPY_FACES 82 | 83 | JSR PROGRESS 84 | 85 | ;;; GAME0_MSG = "loading game0" 86 | GAME0_FILE = "game0-128" 87 | +LDCFILE GAME0_FILE, FAR_ADDR_GAME0, SIZE_GAME0 88 | 89 | JSR PROGRESS 90 | 91 | !IF VIC_CHARMAP { 92 | SOUND_MSG = "loading music" 93 | SOUND_FILE = "music.c64" 94 | +LDCFILE SOUND_MSG, SOUND_FILE, FAR_ADDR_SOUND, SIZE_SOUND 95 | } 96 | 97 | !IF VIC_BITMAP { 98 | ;;; SOUND_MSG = "loading music" 99 | SOUND_FILE = "music-128" 100 | +LDCFILE SOUND_FILE, FAR_ADDR_SOUND, SIZE_SOUND 101 | } 102 | 103 | JSR PROGRESS 104 | JSR PROGRESS 105 | 106 | ;;; GAME1_MSG = "loading game1" 107 | GAME1_FILE = "game1-128" 108 | +LDCFILE GAME1_FILE, FAR_ADDR_GAME1, SIZE_GAME1 109 | 110 | JSR PROGRESS 111 | JSR PROGRESS 112 | JSR PROGRESS 113 | JSR PROGRESS 114 | JSR PROGRESS 115 | 116 | JSR C_PREINIT 117 | 118 | ;;; TILE_MSG = "loading tiles" 119 | TILE_FILE = "tileset-128" 120 | +LDCFILE TILE_FILE, FAR_ADDR_TILE, SIZE_TILE 121 | 122 | JSR PROGRESS 123 | 124 | !IF VIC_CHARMAP { 125 | CHARSET_MSG = "loading charset" 126 | CHARSET_FILE = "gfxfont.prg" 127 | +LDCFILE CHARSET_MSG, CHARSET_FILE, FAR_ADDR_CHARSET, SIZE_CHARSET 128 | } 129 | 130 | ;;; SPRITE_MSG = "loading sprites" 131 | SPRITE_FILE = "sprites-128" 132 | +LDCFILE SPRITE_FILE, FAR_ADDR_SPRITE, SIZE_SPRITE 133 | 134 | JSR PROGRESS 135 | 136 | ;;; +STI MMURCR, %01000101 ; 01=VICBLOCK 00=NA 01=COMMONBOTTOM 01=COMMON4K 137 | 138 | SEI ; Disable interrupt routine 139 | +STIW CINV, C_RUNIRQ ; Setup IRQ to visit my routine RUNIRQ before system IRQ routine 140 | +STIW $DC06, 17041 ; 1/60 of a second (cycles NTSC: 17041.58, PAL: 16501.65) 141 | LDA $0A03 142 | BEQ + 143 | +STIW $DC06, 16501 144 | + +STI $DC0D, %10000010 145 | +STI $DC0F, %00000001 146 | +STIW NMINV, C_RUNNMI ; Setup NMI to visit my routine RUNIRQ as NMI vs IRQ 147 | CLI ; Reenable routine. 148 | 149 | JMP C_START_GAME 150 | 151 | PROGRESS SEI 152 | +PH MMU ; save MMU 153 | +STI MMU, %00111111 ; disable ROMs & IO 154 | 155 | LDY #0 156 | LDA ($FB),Y 157 | EOR #$FF 158 | STA ($FB),Y 159 | INY 160 | LDA ($FB),Y 161 | EOR #$FF 162 | STA ($FB),Y 163 | INY 164 | LDA ($FB),Y 165 | EOR #$FF 166 | STA ($FB),Y 167 | INY 168 | LDA ($FB),Y 169 | EOR #$FF 170 | STA ($FB),Y 171 | INY 172 | LDA ($FB),Y 173 | EOR #$FF 174 | STA ($FB),Y 175 | INY 176 | LDA ($FB),Y 177 | EOR #$FF 178 | STA ($FB),Y 179 | INY 180 | LDA ($FB),Y 181 | EOR #$FF 182 | STA ($FB),Y 183 | INY 184 | LDA ($FB),Y 185 | EOR #$FF 186 | STA ($FB),Y 187 | CLC 188 | LDA $FB 189 | ADC #8 190 | STA $FB 191 | LDA $FC 192 | ADC #0 193 | STA $FC 194 | 195 | +PL MMU 196 | CLI 197 | 198 | RTS 199 | 200 | ;PROGRESS LDY #5 201 | ; LDA #%00011000 202 | ; STA ($FB),Y 203 | ; INY 204 | ; STA ($FB),Y 205 | ; CLC 206 | ; LDA $FB 207 | ; ADC #8 208 | ; STA $FB 209 | ; LDA $FC 210 | ; ADC #0 211 | ; STA $FC 212 | ; RTS 213 | 214 | !if * > ADDR_LOADER+SIZE_LOADER { 215 | !serious "LOADER TOO BIG" 216 | } 217 | 218 | -------------------------------------------------------------------------------- /128-robots-items.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * pixmap_items[] = { 3 | "48 128 13 1", 4 | " c #000000", 5 | ". c #BB8A45", 6 | "+ c #715E03", 7 | "@ c #8E82CA", 8 | "# c #4D4D4D", 9 | "$ c #FFFFA5", 10 | "% c #9A6759", 11 | "& c #91C6D5", 12 | "* c #352879", 13 | "= c #924634", 14 | "- c #B8B8B8", 15 | "; c #747474", 16 | "> c #FFFFFF", 17 | " ", 18 | " ", 19 | " ", 20 | " ", 21 | " ", 22 | " ********************** ", 23 | " **@@@@&&&&@@&&&&&&>>&&** ", 24 | " **********************&&** ", 25 | " @@####################**** ", 26 | " @@ **** ", 27 | " ##;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;## ", 28 | " ;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;; ", 29 | " ;;>>;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>;;>>;;## ", 30 | " ;;>>>>>>>>>>>>%%%%>>>>%%%%>>>>>>>>>>>>;;;; ", 31 | " ;;>>>>>>>>>>>>%%%%>>>>%%%%>>>>>>>>>>>>;;-- ", 32 | " ;;>>>>>>>>>>>>%%%%>>>>%%%%>>>>>>>>>>>>;;;; ", 33 | " ;;-->>>>>>>>>>%%%%%%%%%%%%>>>>>>>>>>>>;;-- ", 34 | " ;;>>>>>>>>>>>>%%%%>>>>%%%%>>>>>>>>>>>>;;-- ", 35 | " ;;-->>>>>>>>>>%%%%>>>>%%%%>>>>>>>>>>>>;;-- ", 36 | " ;;---->>>>>>>>%%%%>>>>%%%%>>>>>>>>>>>>;;;; ", 37 | " ;;--;;---->>>>>>>>>>>>>>>>>>>>>>>>;;>>;;-- ", 38 | " ;;---------->>>>>>>>>>>>>>>>>>>>>>>>>>;;;; ", 39 | " ##;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;--;; ", 40 | " ############################ ", 41 | " ########;;##;;;;;;;;;;;;;;;;;;;;######;; ", 42 | " ###################################### ", 43 | " ", 44 | " ", 45 | " ", 46 | " ", 47 | " ", 48 | " ", 49 | " ", 50 | " ", 51 | " ", 52 | " ", 53 | " ", 54 | " %%%%%%%%%%%% ", 55 | " %%%% %%%% ", 56 | " %%%% %%%% ", 57 | " %% %% ", 58 | " %%%% ======== %%%% ", 59 | " %% ============ %% ", 60 | "-->>>>>> %% ============ %% ##>>----;;", 61 | "##;;---->> %% ==========>>==== %%##>>----;;##", 62 | ";;-->>---->>%% ============--== %%>>---->>;;##", 63 | "-->>>>>>---->> ============>>== >>-->>>>>>--;;", 64 | ";;------------**==--========--==&&------------##", 65 | "**&&------&&&& ==>>============ &&&&&&&&&&&&**", 66 | "**&&&&&&&&&&%% ==--============ %%------&&****", 67 | ";;>>>>>>** %% ====>>========== %%**---->>--;;", 68 | "******** %% ============ %% **********", 69 | " ## %% ============ %%## ", 70 | "******## %%%% ======== %%%% ##**** ", 71 | " %% %% ", 72 | " %%%% %%%% ", 73 | " %%%% %%%% ", 74 | " %%%%%%%%%%%% ", 75 | " ", 76 | " ", 77 | " ", 78 | " ", 79 | " ", 80 | " ", 81 | " ", 82 | " ", 83 | " ", 84 | " ", 85 | " ", 86 | " ", 87 | " ** ", 88 | " ** ", 89 | " ** ;;-->> -->>>> ** ", 90 | " @@ ;;;;-- -->>>> ** ", 91 | " @@ ;;---- ;;-->> @@ ", 92 | " ** ;;;;-- ---->> ** ", 93 | " ;;--;; ;;;;-- ", 94 | " ==..-- ;;;;.. ", 95 | " ==..== ...... ", 96 | " ==..== ====== ", 97 | " ****@@**** ==..== ==.... ****@@@@** ", 98 | " ==..== ====== ", 99 | " ====.. ==.... ", 100 | " ==..============== ", 101 | " ++====....====..++ ", 102 | " ** ============== ** ", 103 | " ** ++==========++ @@ ", 104 | " @@ ++======++ ** ", 105 | " ** ** ** ", 106 | " ** ", 107 | " ", 108 | " ", 109 | " ", 110 | " ", 111 | " ", 112 | " ", 113 | " ", 114 | " ", 115 | " ", 116 | " ", 117 | " ", 118 | " ###### ", 119 | " ## ###### ++....++ ", 120 | " ##;;######## .. .. ", 121 | " ##;;--###### .. -- ", 122 | " ##;;;;## ;; ++ .. ", 123 | " ;;###### -- ++ .. ", 124 | " ##;;;;;;;; >>## ++ $$ ", 125 | " ######;;;; --;;++ ..>>.. ", 126 | " ##;;;;----####----++ ++>>++ ", 127 | " ##------;;;; ;;++ ++$$>>$$++ ", 128 | " ##;;-->>--;;## ++++ ++>>++ ", 129 | " ##-->>>>--;;####..--++ ..>>.. ", 130 | " ##-->>>>--;;;;####..++ $$ ", 131 | " ##;;-->>--;;####..-- ++ ++ ++ ", 132 | " ##;;----;;;;;;####.. ++ ", 133 | " ;;;;----######.... ", 134 | " ##;;;;;;;;######++ ", 135 | " ##############.. ", 136 | " ##;;;;## #### ", 137 | " ########## ", 138 | " ", 139 | " ", 140 | " ", 141 | " ", 142 | " ", 143 | " ", 144 | " "}; 145 | -------------------------------------------------------------------------------- /common.asm: -------------------------------------------------------------------------------- 1 | !TO "common-128", CBM 2 | !SYMBOLLIST "common.sym" 3 | 4 | !SOURCE "const.inc" 5 | !SOURCE "macro.inc" 6 | !SOURCE "faces.sym" 7 | !SOURCE "game0.sym" 8 | !SOURCE "game1.sym" 9 | 10 | * = ADDR_COMMON 11 | 12 | ;****************************************************************************** 13 | ; Jump Table 14 | 15 | .J_PREINIT 16 | JMP .X_PREINIT 17 | 18 | .J_RUNIRQ 19 | JMP .X_RUNIRQ 20 | 21 | .J_START_GAME 22 | JMP .X_START_GAME 23 | 24 | .J_MUSIC_START 25 | JMP .X_MUSIC_START 26 | 27 | .J_MUSIC_PLAY 28 | JMP .X_MUSIC_PLAY 29 | 30 | .J_PLAY_SOUND 31 | JMP .X_PLAY_SOUND 32 | 33 | .J_INIT_GAME 34 | JMP .X_INIT_GAME 35 | 36 | .J_SET_CUSTOM_KEYS 37 | JMP .X_SET_CUSTOM_KEYS 38 | 39 | .J_CALC_MAP_NAME 40 | JMP .X_CALC_MAP_NAME 41 | 42 | .J_SET_CONTROLS 43 | JMP .X_SET_CONTROLS 44 | 45 | .J_INTRO_SCREEN 46 | JMP .X_INTRO_SCREEN 47 | 48 | .J_COPY_FACES 49 | JMP .X_COPY_FACES 50 | 51 | .J_RUNNMI 52 | JMP .X_RUNNMI 53 | 54 | .J_CLEAR_SNES_PAD 55 | JMP .X_CLEAR_SNES_PAD 56 | 57 | .J_CLEAR_KEY_BUFFER 58 | JMP .X_CLEAR_KEY_BUFFER 59 | 60 | .J_SNES_CONTROLER_READ 61 | JMP .X_SNES_CONTROLER_READ 62 | 63 | .V_DIFF_LEVEL !BYTE 1 ; default medium 64 | .V_USER_MUSIC_ON !BYTE 1 65 | .V_BGTIMER1 !BYTE 0 66 | .V_SPRITECOLSTATE !BYTE 0 67 | .V_SPRITECOLCHART !BYTE 0,11,12,15,1,15,12,11 68 | .V_CONTROL !BYTE 0 ; 0=keyboard 1=custom keys 2=snes 69 | .V_MAPNAME !PET"level-a-128" 70 | .V_KEYS_DEFINED !BYTE 0 ; DEFAULT =0 71 | .V_SELECTED_MAP !BYTE 0 72 | .V_MAP_NAMES !SCR"01-research lab " 73 | !IF SHAREWARE = 1 { 74 | !SCR"02-the islands " ; normally #4 75 | } 76 | !IF SHAREWARE = 0 { 77 | !SCR"02-headquarters " 78 | !SCR"03-the village " 79 | !SCR"04-the islands " 80 | !SCR"05-downtown " 81 | !SCR"06-pi university" 82 | !SCR"07-more islands " 83 | !SCR"08-robot hotel " 84 | !SCR"09-forest moon " 85 | !SCR"10-death tower " 86 | !SCR"11-river death " ;NEW MAP FOR C128 87 | !SCR"12-bunker " ;NEW MAP FOR C128 88 | !SCR"13-castle robot " ;NEW MAP FOR C128 89 | !SCR"14-rocket center" ;NEW MAP FOR C128 90 | !SCR"15-pilands " ;NEW MAP FOR C128 91 | } 92 | 93 | ;****************************************************************************** 94 | ; Implementations 95 | 96 | .X_PREINIT 97 | +PH MMU 98 | +STI MMU, %01001110 ; 01=RAM1, 00=KERNAL/CHARSET/SCREDIT, 111=NOBASIC, 0=IO 99 | +STI SCREEN_SHAKE, MUSIC_STATE, 0 100 | +PL MMU 101 | RTS 102 | 103 | .X_RUNIRQ 104 | LDA $DC0D 105 | BNE + 106 | JMP IRQ 107 | 108 | + +PHW $FB 109 | +PH MMU 110 | +STI MMU, %01001110 ; 01=RAM1, 00=KERNAL/CHARSET/SCREDIT, 111=NOBASIC, 0=IO 111 | JSR RUNIRQ 112 | +PL MMU 113 | +PLW $FB 114 | JMP RETIRQ 115 | 116 | .X_START_GAME 117 | +STI MMU, %01001110 ; 01=RAM1, 00=KERNAL/CHARSET/SCREDIT, 111=NOBASIC, 0=IO 118 | JMP START_GAME 119 | 120 | .X_MUSIC_START 121 | SEI ; Disable interrupts while ROM inactive 122 | TAX ; A has sound parameter, stash it for a bit 123 | +PH MMU ; Preserve current MMU 124 | +STI MMU, %00111110 ; 00=RAM0, 111111=NOROM, 0=IO 125 | TXA ; Restore passed in sound parameter 126 | JSR $9000 ; Start the music 127 | +PL MMU ; Restore original MMU 128 | CLI ; Re-enable interrupts 129 | RTS ; Done, return to caller 130 | 131 | .X_MUSIC_PLAY 132 | ; this is only called within an IRQ handler, no need to disable IRQ here 133 | +PH MMU ; Preserve current MMU 134 | +STI MMU, %00111110 ; 00=RAM0, 111111=NOROM, 0=IO 135 | JSR $9003 ; Play the music 136 | +PL MMU ; Restore original MMU 137 | RTS ; Done, return to caller 138 | 139 | .X_PLAY_SOUND 140 | SEI ; Disable interrupts while ROM inactive 141 | TAX ; A has sound parameter, stash it for a bit 142 | +PH MMU ; Preserve current MMU 143 | +STI MMU, %00111110 ; 00=RAM0, 111111=NOROM, 0=IO 144 | TXA ; Restore passed in sound parameter 145 | JSR PLAY_SOUND ; Play the sound 146 | +PL MMU ; Restore original MMU 147 | CLI ; Finally re-enable interrupts 148 | RTS ; Done, return to caller 149 | 150 | .X_INIT_GAME 151 | +STI MMU, %01001110 ; 01=RAM1, 00=KERNAL/CHARSET/SCREDIT, 111=NOBASIC, 0=IO 152 | JMP INIT_GAME 153 | 154 | .X_SET_CUSTOM_KEYS 155 | +PH MMU 156 | +STI MMU, %01001110 ; 01=RAM1, 00=KERNAL/CHARSET/SCREDIT, 111=NOBASIC, 0=IO 157 | JSR SET_CUSTOM_KEYS 158 | +PL MMU 159 | RTS 160 | 161 | .X_CALC_MAP_NAME 162 | +PH MMU 163 | +STI MMU, %00001110 ; 00=RAM0, 00=KERNAL/CHARSET/SCREDIT, 111=NOBASIC, 0=IO 164 | JSR CALC_MAP_NAME 165 | +PL MMU 166 | RTS 167 | 168 | .X_SET_CONTROLS 169 | +PH MMU 170 | +STI MMU, %00001110 ; 00=RAM0, 00=KERNAL/CHARSET/SCREDIT, 111=NOBASIC, 0=IO 171 | JSR SET_CONTROLS 172 | +PL MMU 173 | RTS 174 | 175 | .X_INTRO_SCREEN 176 | +STI MMU, %00001110 ; 00=RAM0, 00=KERNAL/CHARSET/SCREDIT, 111=NOBASIC, 0=IO 177 | JMP INTRO_SCREEN 178 | 179 | .X_COPY_FACES 180 | +PH MMU 181 | +STI MMU, %01001110 ; 01=RAM1, 00=KERNAL/CHARSET/SCREDIT, 111=NOBASIC, 0=IO 182 | JSR copy_faces_bitmap 183 | +PL MMU 184 | RTS 185 | 186 | .X_RUNNMI 187 | ;;; +PHW $FB 188 | ;;; +PH MMU 189 | ;;; +STI MMU, %01001110 ; 01=RAM1, 00=KERNAL/CHARSET/SCREDIT, 111=NOBASIC, 0=IO 190 | ;;; JSR RUNIRQ 191 | ;;; +PL MMU 192 | ;;; +PLW $FB 193 | ;;; LDA $DD0D 194 | JMP RETIRQ ; done 195 | 196 | !IF SHAREWARE = 1 { 197 | 198 | .X_SNES_CONTROLER_READ: 199 | RTS 200 | 201 | } 202 | 203 | !IF SHAREWARE = 0 { 204 | 205 | .X_SNES_CONTROLER_READ: 206 | +PH MMU 207 | +STI MMU, %00111110 ; 00=RAM1, 11111=NOROM, 0=IO 208 | ;First copy last time's results to the LAST variables. 209 | LDY #0 210 | SNCL: LDA SNES_B,Y 211 | STA LAST_B,Y 212 | ; STA $C000,Y ;TESTCODE 213 | INY 214 | CPY #12 215 | BNE SNCL 216 | ;now latch data 217 | LDA #%00100000 ;latch on pin 5 218 | STA CI2PRB 219 | LDA #%00000000 220 | STA CI2PRB 221 | LDX #0 222 | ;Now read in bits 223 | SRLOOP: LDA CI2PRB 224 | AND #%01000000 ;READ pin 6 225 | CMP #%01000000 226 | BEQ SRL1 227 | LDA #1 228 | JMP SRL5 229 | SRL1: LDA #0 230 | SRL5: STA SNES_B,X 231 | ;pulse the clock line 232 | LDA #%00001000 ;CLOCK on pin 3 233 | STA CI2PRB 234 | LDA #%00000000 235 | STA CI2PRB 236 | INX 237 | CPX #12 238 | BNE SRLOOP 239 | ;now process any new presses 240 | LDY #0 241 | SRL09: LDA NEW_B,Y 242 | CMP #1 243 | BEQ SRL10 244 | LDA SNES_B,Y 245 | CMP #1 246 | BNE SRL10 247 | LDA LAST_B,Y 248 | CMP #0 249 | BNE SRL10 250 | LDA #1 251 | STA NEW_B,Y 252 | SRL10: INY 253 | CPY #12 254 | BNE SRL09 255 | +PL MMU 256 | RTS 257 | } 258 | 259 | .X_CLEAR_KEY_BUFFER: 260 | LDA #0 261 | STA XMAX ;disable keyboard input 262 | LDA #0 263 | STA NDX ;CLEAR KEYBOARD BUFFER 264 | LDA #20 265 | STA KEYTIMER 266 | RTS 267 | 268 | ;This routine clears any new-button-presses 269 | ;that are pending. 270 | .X_CLEAR_SNES_PAD: 271 | LDA #0 272 | STA NEW_UP 273 | STA NEW_DOWN 274 | STA NEW_LEFT 275 | STA NEW_RIGHT 276 | STA NEW_A 277 | STA NEW_B 278 | STA NEW_X 279 | STA NEW_Y 280 | STA NEW_BACK_L 281 | STA NEW_BACK_R 282 | RTS 283 | 284 | !warn "COMMON AVAILABLE: ", SIZE_COMMON-(*-ADDR_COMMON) 285 | 286 | !if * > ADDR_COMMON+SIZE_COMMON { 287 | !serious "COMMON TOO BIG" 288 | } 289 | 290 | -------------------------------------------------------------------------------- /vdc-intro-dither.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * vdc_intro_dither_xpm[] = { 3 | "128 64 14 1", 4 | " c #000000", 5 | ". c #0000AA", 6 | "+ c #AA0000", 7 | "@ c #555555", 8 | "# c #5555FF", 9 | "$ c #AA5500", 10 | "% c #00AA00", 11 | "& c #FF5555", 12 | "* c #00AAAA", 13 | "= c #AAAAAA", 14 | "- c #55FF55", 15 | "; c #55FFFF", 16 | "> c #FFFF55", 17 | ", c #FFFFFF", 18 | "..............................++........+++++++...++++...++.........++++++++...+++++++++.......++++.............................", 19 | ".......................+++...++++......+++++&+++..+$+&..+$++.......+$+&+$+&++..+$+&+$+&++....++$+&++$...........................", 20 | "....................+++$+&+.+$+&++.....+&+&+++&++.&+&+ $+&+$......$+&+&+&+$&+.&+&+&+&+$& ...$&+&+$+&+$...++++..................", 21 | ".++++......+$++$++$+$&+&++$+&++$+&+$...$++$+ $+&.$+$& $+&$& .....&+$+ +$& $+$+ .... +&+&+&+$.++&++$...++............", 22 | "++++++..$+$+&+&+&+&+++&+$+&++&+&+$+&...+&+& &$+$ &$+& ....$&$ &+ &$& .... $&$$& &++&+....$+$+..........", 23 | "+&+&+&+.+&+&+$+&+$+&$&+&+&+ $+&+&+&+$ .$+&+ ... &&$&$&$$ ....$&$ ...$& $&$ ...........$&$&$ +&$+& +&+&+..+++.....", 24 | "+$++&+$+.$&+&$&+&$&+$+&$+ &$$& $&+&..&$$ ........$&$&$ .....$&$ ....&$ &$& ...........&$&$ .$&+&$ .$&$+ $+&++++..", 25 | "$+&+$+&+ .$&$+&$$+& &$&$ $&+$ $&$$.$+&$ ........$&$& .....&$& ....$& $&$$&$..........$&$& .$&$$ $&+& &+++&+&$+$", 26 | "+&+&+&+&$ .$&$$&$& $+&$ ..$&$& ..$&+ .&$&$.........&$& .......$&$ ....&$ &$&$&$..........&$&$ ..&$&$ .&$$& +&$+&$+&+&", 27 | "$$$+ $$+&+.. &$&$$ .&$&$ ..&$&$ ..&$&$ $&$& ........&>$>$........&>$ ....&> $>$>$> ........$>$> .$&$& .$&$& $$+&$+&+$&+", 28 | ".&+& $&$.. $&$&$ ..$&$& ..$&$&$&..$&$ .&$$& .......$>$&&>.......$&>& ....$& >$& ........&$>$ .&$&$&$ .&$& $&$& &$$", 29 | ".$&$$ . &$&$...&$&$&...$&$& ..$&$&$..$&$& $&$& ...&$..>$&>$$>......>$>$>....>$ $>$ ........>$&> .$&$&$&&$&$$ $&$& $&", 30 | "..$&$&...$&$&...$&$& ..&$&$ .&$&$&$&$&$&$ .$&$$ ..$&$.&>$>>&$ .....&>$>$ ..>$> >$> ..........$>&> &>$>$@$>$>&> $&$ .... ", 31 | "..$&$&$...$&$$...&$&$ ..$&$& $&$&$>$&$>$&$ &$&&$&$&$&@$>> $>>& .....>$>&>&>$>$ &>$ ..........>$>$ $&$& &$$ &$&$&$&......", 32 | "...$&$& &$&$&$&..$>$> ..>$>$ @.$>$&$@ $&$>$>$>$>$>$>$ >$> >$> .....>&>$>>$>&@ >$> .........>$>>> $>$>$ $>&> $&$&$&$$&....", 33 | "...&$&$$&$&$&$& ..&$&$ ..&$&$ . $&>$ $>$& $&$&$&$& >$ >>> .....>>>$>>> >>> .........>>$> >$>$ .>$> $>$> @$>$>$&..", 34 | "...$&$>$&$>$&$>$ .>$>$ ..$>$> ..>$$&$ ..&$> >$>$> . .. ...... ... ........... $>&> >$> &$&$ &$@..", 35 | "....>$&$>$&$>$&$ ..&$>& ..&>$ .$>&>$ ..>$& . ... .. ....... .... ........... ..>$ >$>$ $>$> .. ", 36 | "....$&$&$&$>$&$>$ .>$&> ..$&>$ ..$>$>& .&> .. .................................................. .>&>> >$>$> ..... .", 37 | "...&>$>$>$>$& &$>$..>$$> .@$>&>..&>$&> ... ...............######..#####....####...##.................. ..>$ $>&>$&>$........", 38 | "..$>$&$>$&$ @$&& ..>&$>..>$>$ ... .. ..........####... # ## #..#. #... ###.................... >$>$>>$>>$>$....", 39 | "...&> &>$> >$> .$>>$ ..&>& .. ......###..###. ....# ..## .... .# .... ....# #..##................ ..>>$>>$>>&>....", 40 | ".... $>$&> ...$>$ ..>$> .>$ ..........###. # .# ........# ...#####...# .........# . ..###.................. >$>$>>> ..", 41 | "..... >$>$>$...>$>&..>&>$ ... ..........# .# .# ..........##.... #..##.........# .....# #................... ..", 42 | "........>$>$> ...&>$>..>$@ ... ...........# ...# .######......## .##....# .## ........# .....# . ..................... ..", 43 | "........&>$>$ ..>$>$>..> ...............###### .## .....## .## ...# .## ..#.....# .....# ................................", 44 | ".........>>$ ...>$>$ .. ................## .## .........## ..#####. ..##### .#####.....# ................................", 45 | "..........> ....>>>> .. ................## .....#######...... ... .... .. ##..####................................", 46 | "........... ......$>$ ...................## ...... ....######....####..########.. .. ##...............................", 47 | "............ ........ ..................## .######...#####..# #..#. #.. # .####... ..............................", 48 | "...................... ................... .# # .#. #.# ....# .# ...# ...# ....#. #..................................", 49 | "...............................................# ...# .# ....# # ....# .# ...# ...# ....# .... .................................", 50 | "...............................................# ...# .# ....# ######. .##...# ...##.....####...................................", 51 | "...............................................#######.##....# ## #..## ..# ...## ..... #..................................", 52 | "...............................................## # ## ...# ## ...# .## ..# ...## ...##...# .................................", 53 | "...............................................## ...# ## .##. ######. ..####. ...## ...## ..# .................................", 54 | "...............................................## ...# .###. .. .... ..... ....####. .................................", 55 | "................................................ .... .. .............................. ..................................", 56 | "................................................................................................................................", 57 | "................................................................................................................................", 58 | "....... . ............................................................ ......................... .................", 59 | "...... $$++ $+$$ ...... ............................................... $->$ ....................... ==== ................", 60 | "...... $++= $$ $+$ $ .... @=@ .............................................. $,,--$ .... .. ........... =,,,,= ...............", 61 | "...... +++= >@ $$+ $ @# ............... ............................ %>, $ ... , .. , .......... =,, @ ...............", 62 | "...... +=,$ -$ @+$$ $+ @=@== ............. $$@+ ........................... $- ,-$ ... , .. = .......... == ,,= ...............", 63 | "....... $ $++ $$+$ . ............ $ $@$ ........................... $,>-$ ... = .. = ........... @=,,@ ...............", 64 | "....... $%++ $$+$+ ...................... $$$@$ $ ........................... @$- .... = = ............. @@; ...............", 65 | "........ $++ $$++++ .. ............. $$ $> =$ ......................... ->$ ..... =@ ............... === ...............", 66 | "........ $+++=+ @ @= . @@ ............ $$$>>+>= .# ...................... ... ................. .... ......", 67 | "......... $$ +++=,+ @ @@ @#@ ........... $$>> $== @. @ @ .................. =@=@ . .................. $%$@ .. ,= .....", 68 | "......... +$ ++=,,+ @ @ =@ ............ $$ $== #* =>@= === ............. .. === == = = ................. $->%$% ,@@# ....", 69 | "......... $+$+=,,,+ = +$$ @ = ............ $$ $ =* =@+ $= ............. = =@;,, =@ = = ............... $-,,>@$$ , == ....", 70 | ".......... $$+=,,=+ = +++$ . @= ............ =#**# >$ $ ............... @ =@, , @ ............... %>,,=$% , == ....", 71 | ".......... +$+==&&$ = +++$ ... @# ............ **,* # $=> ................ = @#= , @ ................... $%>$->% = =# ....", 72 | ".......... $ $+++$ @= ==+$ .... @ ............. *,*#**# ............... . @@=,,=@. ................... $$%>-$$- =@ = ....", 73 | "........... @@ $$$$$ .... ............. #***** $$ = .............. =@ .. @*@=.@ ................... %$$-$% . =* .....", 74 | "........... $$+$ . @$ ..................... #*# $@ @@ ............. = = .. @@@@ . ................... $%$% ... ......", 75 | "............ +=+ ... @ @@ ...................... @$$ ............. = .. = .. . . ................... ...........", 76 | "............. +=$ ... @= @# . ................. $$$ ................. , .. , ... ... .* ................... = ..........", 77 | ".............. $ . @=@ ................. $ ................. , .. , .. . . .* .................. =@ , @ .........", 78 | "................ =+ +==+ === = .................. $ @ ................. .. ... .* .*@ ................. =@= , == ........", 79 | "................ ++ ++ @= ..................... @@= .......................... .*#@#*# .................. @;====== ........", 80 | "................. .. == ...................... ............................ .**** .................... ==,,,= .........", 81 | "........................... ....................................................... ...................... .........."}; 82 | -------------------------------------------------------------------------------- /vdc-intro-solid.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * vdc_intro_solid_xpm[] = { 3 | "128 64 14 1", 4 | " c #000000", 5 | ". c #0000AA", 6 | "+ c #AA0000", 7 | "@ c #555555", 8 | "# c #5555FF", 9 | "$ c #AA5500", 10 | "% c #00AA00", 11 | "& c #FF5555", 12 | "* c #00AAAA", 13 | "= c #AAAAAA", 14 | "- c #55FF55", 15 | "; c #55FFFF", 16 | "> c #FFFF55", 17 | ", c #FFFFFF", 18 | "..............................>>........>>>>>>>...>>>>...>>.........>>>>>>>>...>>>>>>>>>.......>>>>.............................", 19 | ".......................>>>...>>>>......>>>>>>>>>..>>>>..>>>>.......>>>>>>>>>>..>>>>>>>>>>....>>>>>>>>...........................", 20 | "....................>>>>>>>.>>>>>>.....>>>>>>>>>>.>>>> >>>>>......>>>>>>>>>>>.>>>>>>>>>> ...>>>>>>>>>>...>>>>..................", 21 | ".>>>>......>>>>>>>>>>>>>>>>>>>>>>>>>...>>>>> >>>.>>>> >>>>> .....>>>> >>> >>>> .... >>>>>>>>.>>>>>>...>>............", 22 | ">>>>>>..>>>>>>>>>>>>>>>>>>>>>>>>>>>>...>>>> >>>> >>>> ....>>> >> >>> .... >>>>> >>>>>....>>>>..........", 23 | ">>>>>>>.>>>>>>>>>>>>>>>>>>> >>>>>>>>> .>>>> ... >>>>>>>> ....>>> ...>> >>> ...........>>>>> >>>>> >>>>>..>>>.....", 24 | ">>>>>>>>.>>>>>>>>>>>>>>>> >>>> >>>>..>>> ........>>>>> .....>>> ....>> >>> ...........>>>> .>>>>> .>>>> >>>>>>>..", 25 | ">>>>>>>> .>>>>>>>>> >>>> >>>> >>>>.>>>> ........>>>> .....>>> ....>> >>>>>>..........>>>> .>>>> >>>> >>>>>>>>>>", 26 | ">>>>>>>>> .>>>>>>> >>>> ..>>>> ..>>> .>>>>.........>>> .......>>> ....>> >>>>>>..........>>>> ..>>>> .>>>> >>>>>>>>>>", 27 | ">>>> >>>>>.. >>>>> .>>>> ..>>>> ..>>>> >>>> ........>>>>>........>>> ....>> >>>>>> ........>>>> .>>>> .>>>> >>>>>>>>>>>", 28 | ".>>> >>>.. >>>>> ..>>>> ..>>>>>>..>>> .>>>> .......>>>>>>.......>>>> ....>> >>> ........>>>> .>>>>>> .>>> >>>> >>>", 29 | ".>>>> . >>>>...>>>>>...>>>> ..>>>>>..>>>> >>>> ...>>..>>>>>>>......>>>>>....>> >>> ........>>>> .>>>>>>>>>>> >>>> >>", 30 | "..>>>>...>>>>...>>>> ..>>>> .>>>>>>>>>>>> .>>>> ..>>>.>>>>>>> .....>>>>> ..>>> >>> ..........>>>> >>>>>.>>>>>> >>> .... ", 31 | "..>>>>>...>>>>...>>>> ..>>>> >>>>>>>>>>>>> >>>>>>>>>>@>>> >>>> .....>>>>>>>>>> >>> ..........>>>> >>>> >>> >>>>>>>......", 32 | "...>>>> >>>>>>>..>>>> ..>>>> ..>>>>> >>>>>>>>>>>>>>> >>> >>> .....>>>>>>>>>. >>> .........>>>>> >>>>> >>>> >>>>>>>>>....", 33 | "...>>>>>>>>>>>> ..>>>> ..>>>> . >>>> >>>> >>>>>>>> >> >>> .....>>>>>>> >>> .........>>>> >>>> .>>> >>>> @>>>>>>..", 34 | "...>>>>>>>>>>>>> .>>>> ..>>>> ..>>>>> ..>>> >>>>> . .. ...... ... ........... >>>> >>> >>>> >>@..", 35 | "....>>>>>>>>>>>> ..>>>> ..>>> .>>>>> ..>>> . ... .. ....... .... ........... ..>> >>>> >>>> .. ", 36 | "....>>>>>>>>>>>>> .>>>> ..>>>> ..>>>>> .>> .. .................................................... .>>>> >>>>> ..... .", 37 | "...>>>>>>>>>> >>>>..>>>> .@>>>>..>>>>> ... .........####..######..#####....####...##.................. ..>> >>>>>>>>........", 38 | "..>>>>>>>>> .>>> ..>>>>..>>>> ... .. .......###. .. # ## #..#. #... ###.................... >>>>>>>>>>>>....", 39 | "...>> >>>> >>> .>>>> ..>>> .. ......###..# ........# ..## .... .# .... ....# #..##................ ..>>>>>>>>>>....", 40 | ".... >>>>> ...>>> ..>>> .>> ..........###. # .# ..........# ...#####...# .........# . ..###.................. >>>>>>> ..", 41 | "..... >>>>>>...>>>>..>>>> ... ..........# .# .# ..........##.... #..##.........# .....# #................... ..", 42 | "........>>>>> ...>>>>..>>> ... ...........# ...# .######......## .##....# .## ........# .....# . ..................... ..", 43 | "........>>>>> ..>>>>>..> ...............###### .## .....## .## ...# .## ..#.....# .....# ................................", 44 | ".........>>> ...>>>> .. ................## .## .........## ..#####. ..##### .#####.....# ................................", 45 | "..........> ....>>>> .. ................## .....#######...... ... .... .. ##..####................................", 46 | "........... ......>>> ...................## ...... ###..######....####..#######... .. ##...............................", 47 | "............ ........ ..................## ....###...##. #.# #..#. #.. # #..####... ..............................", 48 | "...................... ................... .### # .#. ..# # ....# .# ...# ...# .. #. #..................................", 49 | "...............................................# .# .# ....# # ....# .# ...# ...# ....# .... .................................", 50 | "...............................................# ...# .# ....# ######. .##...# ...##.....####...................................", 51 | "...............................................#######.##....# ## #..## ..# ...## ..... #..................................", 52 | "...............................................## # ## ...# ## ...# .## ..# ...## ...##...# .................................", 53 | "...............................................## ...# ## .##. ######. ..####. ...## ...## ..# .................................", 54 | "...............................................## ...# .###. .. .... ..... ....####. .................................", 55 | "................................................ .... .. .............................. ..................................", 56 | "................................................................................................................................", 57 | "................................................................................................................................", 58 | "....... . ............................................................ ......................... .................", 59 | "...... $$++ $+$$ ...... ............................................... $->$ ....................... ==== ................", 60 | "...... $++= $$ $+$ $ .... @=@ .............................................. $,,--$ .... .. ........... =,,,,= ...............", 61 | "...... +++= >@ $$+ $ @# ............... ............................ %>, $ ... , .. , .......... =,, @ ...............", 62 | "...... +=,$ -$ @+$$ $+ @=@== ............. $$@+ ........................... $- ,-$ ... , .. = .......... == ,,= ...............", 63 | "....... $ $++ $$+$ . ............ $ $@$ ........................... $,>-$ ... = .. = ........... @=,,@ ...............", 64 | "....... $%++ $$+$+ ...................... $$$@$ $ ........................... @$- .... = = ............. @@; ...............", 65 | "........ $++ $$++++ .. ............. $$ $> =$ ......................... ->$ ..... =@ ............... === ...............", 66 | "........ $+++=+ @ @= . @@ ............ $$$>>+>= .# ...................... ... ................. .... ......", 67 | "......... $$ +++=,+ @ @@ @#@ ........... $$>> $== @. @ @ .................. =@=@ . .................. $%$@ .. ,= .....", 68 | "......... +$ ++=,,+ @ @ =@ ............ $$ $== #* =>@= === ............. .. === == = = ................. $->%$% ,@@# ....", 69 | "......... $+$+=,,,+ = +$$ @ = ............ $$ $ =* =@+ $= ............. = =@;,, =@ = = ............... $-,,>@$$ , == ....", 70 | ".......... $$+=,,=+ = +++$ . @= ............ =#**# >$ $ ............... @ =@, , @ ............... %>,,=$% , == ....", 71 | ".......... +$+==&&$ = +++$ ... @# ............ **,* # $=> ................ = @#= , @ ................... $%>$->% = =# ....", 72 | ".......... $ $+++$ @= ==+$ .... @ ............. *,*#**# ............... . @@=,,=@. ................... $$%>-$$- =@ = ....", 73 | "........... @@ $$$$$ .... ............. #***** $$ = .............. =@ .. @*@=.@ ................... %$$-$% . =* .....", 74 | "........... $$+$ . @$ ..................... #*# $@ @@ ............. = = .. @@@@ . ................... $%$% ... ......", 75 | "............ +=+ ... @ @@ ...................... @$$ ............. = .. = .. . . ................... ...........", 76 | "............. +=$ ... @= @# . ................. $$$ ................. , .. , ... ... .* ................... = ..........", 77 | ".............. $ . @=@ ................. $ ................. , .. , .. . . .* .................. =@ , @ .........", 78 | "................ =+ +==+ === = .................. $ @ ................. .. ... .* .*@ ................. =@= , == ........", 79 | "................ ++ ++ @= ..................... @@= .......................... .*#@#*# .................. @;====== ........", 80 | "................. .. == ...................... ............................ .**** .................... ==,,,= .........", 81 | "........................... ....................................................... ...................... .........."}; 82 | -------------------------------------------------------------------------------- /macro.inc: -------------------------------------------------------------------------------- 1 | !MACRO STI .m, .i { 2 | LDA #.i 3 | STA .m 4 | } 5 | 6 | !MACRO STI .m0, .m1, .i { 7 | LDA #.i 8 | STA .m1 9 | STA .m0 10 | } 11 | 12 | !MACRO STI .m0, .m1, .m2, .i { 13 | LDA #.i 14 | STA .m0 15 | STA .m1 16 | STA .m2 17 | } 18 | 19 | !MACRO STM .d, .s { 20 | LDA .s 21 | STA .d 22 | } 23 | 24 | !MACRO STIW .m, .i { 25 | LDA #<.i ; set low byte 26 | STA .m+0 27 | LDA #>.i ; set high byte 28 | STA .m+1 29 | } 30 | 31 | !MACRO MANDI .m, .i { 32 | LDA .m 33 | AND #.i 34 | STA .m 35 | } 36 | 37 | !MACRO MORAI .m, .i { 38 | LDA .m 39 | ORA #.i 40 | STA .m 41 | } 42 | 43 | !MACRO LDMSG .msg { 44 | LDY #0 45 | 46 | - LDA .data,Y 47 | JSR CHROUT 48 | INY 49 | CPY #(.end-.data) 50 | BNE - 51 | 52 | JMP .end 53 | 54 | .data !PET 5, .msg, 13 55 | .end 56 | } 57 | 58 | !MACRO LDVFILE .file, .len, .addr, .maxsz { 59 | LDA MMU ; get the current ram block and put it in x for filename 60 | AND #%11000000 ; keep only the ram block bits 61 | CLC ; clear carry so we don't rotate garbage into low bits 62 | ROL ; C76543210 -> 76543210C 63 | ROL ; 76543210C -> 6543210C7 64 | ROL ; 6543210C7 -> 543210C76 65 | TAX ; all bits are where they should be, transfer to X 66 | LDA #^.addr ; ram block for load address 67 | JSR JSETBNK ; load to bank ^.addr from file named in current bank 68 | 69 | LDA #.len ;LENGTH OF FILENAME 70 | LDX #<.file 71 | LDY #>.file 72 | JSR SETNAM ;SETNAM A=FILE NAME LENGTH X/Y=POINTER TO FILENAME 73 | 74 | LDA #$02 75 | ;LDX #$08 76 | LDX $BA 77 | LDY #$00 78 | JSR SETLFS ;SETFLS A=LOGICAL NUMBER X=DEVICE NUMBER Y=SECONDARY 79 | 80 | LDX #<.addr ;LOW BYTE FOR LOAD ADDRESS 81 | LDY #>.addr ;HIGH BYTE FOR LOAD ADDRESS 82 | LDA #$00 83 | JSR LOAD ;LOAD FILE A=0 FOR LOAD X/Y=LOAD ADDRESS 84 | 85 | PHP 86 | 87 | JSR CLOSE ;CLOSE FILE 88 | 89 | PLP 90 | 91 | ; TODO (maybe) add error checking to ensure successful load and not too big 92 | } 93 | 94 | !MACRO LDCFILE .file, .addr, .maxsz { 95 | +LDVFILE .data, (.end-.data), .addr, .maxsz 96 | JMP .end 97 | .data !PET .file 98 | .end 99 | } 100 | 101 | !MACRO LDCFILE .msg, .file, .addr, .maxsz { 102 | +LDMSG .msg 103 | +LDCFILE .file, .addr, .maxsz 104 | } 105 | 106 | !MACRO CP .d, .s { 107 | LDA .s 108 | STA .d 109 | } 110 | 111 | !MACRO PHI .v { 112 | LDA #.v 113 | PHA 114 | } 115 | 116 | !MACRO PH .m { 117 | LDA .m 118 | PHA 119 | } 120 | 121 | !MACRO PL .m { 122 | PLA 123 | STA .m 124 | } 125 | 126 | !MACRO PHW .m { 127 | LDA .m+1 128 | PHA 129 | LDA .m+0 130 | PHA 131 | } 132 | 133 | !MACRO PLW .m { 134 | PLA 135 | STA .m+0 136 | PLA 137 | STA .m+1 138 | } 139 | 140 | !MACRO WAIT_VDC { 141 | - BIT VDCASR 142 | BPL - 143 | } 144 | 145 | !MACRO STIVDC .v { 146 | +WAIT_VDC 147 | +STI VDCDAT, .v 148 | } 149 | 150 | !MACRO STIVDC .r, .v { 151 | LDX #.r 152 | STX VDCASR 153 | +STIVDC .v 154 | } 155 | 156 | !MACRO STIWVDC .r, .v { 157 | +STIVDC .r+0, >.v 158 | +STIVDC .r+1, <.v 159 | } 160 | 161 | !MACRO STWVDC .r, .a { 162 | LDA .a+1 163 | +STVDC .r+0 164 | LDA .a+0 165 | +STVDC .r+1 166 | } 167 | 168 | !MACRO STVDC { 169 | +WAIT_VDC 170 | STA VDCDAT 171 | } 172 | 173 | !MACRO STVDC .r { 174 | LDX #.r 175 | STX VDCASR 176 | +STVDC 177 | } 178 | 179 | !MACRO STVDC .r, .a { 180 | LDA .a 181 | +STVDC .r 182 | } 183 | 184 | !MACRO LDVDC { 185 | +WAIT_VDC 186 | LDA VDCDAT 187 | } 188 | 189 | !MACRO LDVDC .r { 190 | LDX #.r 191 | STX VDCASR 192 | +LDVDC 193 | } 194 | 195 | !MACRO CMPI_BEQ .k, .l { 196 | CMP #.k 197 | BNE + 198 | JMP .l 199 | + 200 | } 201 | 202 | !MACRO CMPM_BEQ .k, .l { 203 | CMP .k 204 | BNE + 205 | JMP .l 206 | + 207 | } 208 | 209 | !MACRO CMPMI_BEQ .a, .k, .l { 210 | LDA .a 211 | CMP #.k 212 | BNE + 213 | JMP .l 214 | + 215 | } 216 | 217 | !MACRO DECOMPRESS_SCREEN .src, .dst { 218 | !IF .dst = SCREEN_MEMORY { 219 | +STIW DECOMPRESS_BYTE+1, DECOMPRESS_SCREEN_BYTE 220 | } 221 | !IF .dst = COLOR_MEMORY { 222 | +STIW DECOMPRESS_BYTE+1, DECOMPRESS_COLOR_BYTE 223 | } 224 | ;SET SOURCE 225 | +STIW $FB, .src 226 | ;SET DESTINATION 227 | +STIW $FD, .dst 228 | ;SET END 229 | LDA #>(.dst+1000-1) 230 | STA DGS5+1 231 | LDA #<(.dst+1000-1) 232 | STA DGS6+1 233 | JSR DECOMPRESS_SCREEN 234 | } 235 | 236 | !MACRO ADDW .a { 237 | CLC 238 | ADC .a+0 239 | STA .a+0 240 | BCC + 241 | INC .a+1 242 | + 243 | } 244 | 245 | !MACRO ADDW .a, .v { 246 | CLC 247 | !IF <.v != 0 { 248 | LDA .a+0 249 | ADC #<.v 250 | STA .a+0 251 | } 252 | !IF >.v != 0 { 253 | LDA .a+1 254 | ADC #>.v 255 | STA .a+1 256 | } ELSE { 257 | BCC + 258 | INC .a+1 259 | + 260 | } 261 | } 262 | 263 | !MACRO SUBW .a, .v { 264 | SEC 265 | !IF <.v != 0 { 266 | LDA .a+0 267 | SBC #<.v 268 | STA .a+0 269 | } 270 | !IF >.v != 0 { 271 | LDA .a+1 272 | SBC #>.v 273 | STA .a+1 274 | } ELSE { 275 | BCS + 276 | DEC .a+1 277 | + 278 | } 279 | } 280 | 281 | !MACRO ADD .a, .v { 282 | CLC 283 | LDA .a 284 | ADC #.v 285 | STA .a 286 | } 287 | 288 | !MACRO SUB .a, .v { 289 | SEC 290 | LDA .a 291 | SBC #.v 292 | STA .a 293 | } 294 | 295 | !MACRO LSRW .a { 296 | LSR .a+1 297 | ROR .a+0 298 | } 299 | 300 | !MACRO PHX { 301 | TXA 302 | PHA 303 | } 304 | 305 | !MACRO PLX { 306 | PLA 307 | TAX 308 | } 309 | 310 | !MACRO PHY { 311 | TYA 312 | PHA 313 | } 314 | 315 | !MACRO PLY { 316 | PLA 317 | TAY 318 | } 319 | 320 | !MACRO TXY { 321 | TXA 322 | TAY 323 | } 324 | 325 | !MACRO MEORI .a, .v { 326 | LDA .a 327 | EOR #.v 328 | STA .a 329 | } 330 | 331 | !MACRO PHALL { 332 | PHP 333 | PHA 334 | +PHX 335 | +PHY 336 | } 337 | 338 | !MACRO PLALL { 339 | +PLY 340 | +PLX 341 | PLA 342 | PLP 343 | } 344 | 345 | ; macro to call when the map changes 346 | !MACRO VDC_MAP_CHANGED { 347 | +PHALL 348 | 349 | LDY VDC_MAP_DRAW_COUNT 350 | TXA 351 | STA VDC_MAP_DRAW_UNIT,Y 352 | INC VDC_MAP_DRAW_COUNT 353 | 354 | LDY VDC_MAP_ERASE_COUNT 355 | LDA UNIT_LOC_X,X 356 | STA VDC_MAP_ERASE_LOC_X,Y 357 | LDA UNIT_LOC_Y,X 358 | STA VDC_MAP_ERASE_LOC_Y,Y 359 | INC VDC_MAP_ERASE_COUNT 360 | 361 | LDX VDC_MAP_DRAW_COUNT 362 | CPX #64 363 | BEQ + 364 | 365 | LDX VDC_MAP_ERASE_COUNT 366 | CPX #64 367 | BEQ + 368 | JMP ++ 369 | 370 | + JSR VDC_MAP_DRAW_UNITS 371 | 372 | ++ +PLALL 373 | } 374 | 375 | ; macro to call when the map changes 376 | !MACRO VDC_MAP_CHANGED .x, .y { 377 | +PHALL 378 | 379 | LDX VDC_MAP_ERASE_COUNT 380 | LDA .x 381 | STA VDC_MAP_ERASE_LOC_X,X 382 | LDA .y 383 | STA VDC_MAP_ERASE_LOC_Y,X 384 | INC VDC_MAP_ERASE_COUNT 385 | 386 | LDX VDC_MAP_ERASE_COUNT 387 | CPX #64 388 | BEQ + 389 | JMP ++ 390 | 391 | + JSR VDC_MAP_DRAW_UNITS 392 | 393 | ++ +PLALL 394 | } 395 | 396 | -------------------------------------------------------------------------------- /praddrs.inc: -------------------------------------------------------------------------------- 1 | ;;; 2 | ;;; !source "memmap.inc" 3 | ;;; 4 | ;;; !address { 5 | ;;; 6 | ;;; DESTRUCT_PATH = RAM1_DESTRUCTPATH ;Destruct path array (256 bytes) 7 | ;;; TILE_ATTRIB = RAM1_TILEATTR ;Tile attrib array (256 bytes) 8 | ;;; TILE_DATA_TL = RAM1_TILECHAR +$0000 ;Tile character top-left (256 bytes) 9 | ;;; TILE_DATA_TM = RAM1_TILECHAR +$0100 ;Tile character top-middle (256 bytes) 10 | ;;; TILE_DATA_TR = RAM1_TILECHAR +$0200 ;Tile character top-right (256 bytes) 11 | ;;; TILE_DATA_ML = RAM1_TILECHAR +$0300 ;Tile character middle-left (256 bytes) 12 | ;;; TILE_DATA_MM = RAM1_TILECHAR +$0400 ;Tile character middle-middle (256 bytes) 13 | ;;; TILE_DATA_MR = RAM1_TILECHAR +$0500 ;Tile character middle-right (256 bytes) 14 | ;;; TILE_DATA_BL = RAM1_TILECHAR +$0600 ;Tile character bottom-left (256 bytes) 15 | ;;; TILE_DATA_BM = RAM1_TILECHAR +$0700 ;Tile character bottom-middle (256 bytes) 16 | ;;; TILE_DATA_BR = RAM1_TILECHAR +$0800 ;Tile character bottom-right (256 bytes) 17 | ;;; TILE_COLOR_TL = RAM1_TILECOLOR+$0000 ;Tile character top-left (256 bytes) (C64/VIC/TED VERSION ONLY) 18 | ;;; TILE_COLOR_TM = RAM1_TILECOLOR+$0100 ;Tile character top-middle (256 bytes) (C64/VIC/TED VERSION ONLY) 19 | ;;; TILE_COLOR_TR = RAM1_TILECOLOR+$0200 ;Tile character top-right (256 bytes) (C64/VIC/TED VERSION ONLY) 20 | ;;; TILE_COLOR_ML = RAM1_TILECOLOR+$0300 ;Tile character middle-left (256 bytes) (C64/VIC/TED VERSION ONLY) 21 | ;;; TILE_COLOR_MM = RAM1_TILECOLOR+$0400 ;Tile character middle-middle (256 bytes) (C64/VIC/TED VERSION ONLY) 22 | ;;; TILE_COLOR_MR = RAM1_TILECOLOR+$0500 ;Tile character middle-right (256 bytes) (C64/VIC/TED VERSION ONLY) 23 | ;;; TILE_COLOR_BL = RAM1_TILECOLOR+$0600 ;Tile character bottom-left (256 bytes) (C64/VIC/TED VERSION ONLY) 24 | ;;; TILE_COLOR_BM = RAM1_TILECOLOR+$0700 ;Tile character bottom-middle (256 bytes) (C64/VIC/TED VERSION ONLY) 25 | ;;; TILE_COLOR_BR = RAM1_TILECOLOR+$0800 ;Tile character bottom-right (256 bytes) (C64/VIC/TED VERSION ONLY) 26 | ;;; 27 | ;;; ;***These arrays can go anywhere in RAM*** 28 | ;;; UNIT_TIMER_A = RAM1_MISCVARS+$0000 ;Primary timer for units (64 bytes) 29 | ;;; UNIT_TIMER_B = RAM1_MISCVARS+$0040 ;Secondary timer for units (64 bytes) 30 | ;;; UNIT_TILE = RAM1_MISCVARS+$0080 ;Current tile assigned to unit (32 bytes) 31 | ;;; ;UNIT_ALT_MOVE = RAM1_MISCVARS+$00A0 ;For moving around objects (32 bytes) 32 | ;;; ;UNIT_DEST_X = RAM1_MISCVARS+$00C0 ;Destination X coordinate (32 bytes) 33 | ;;; ;UNIT_DEST_Y = RAM1_MISCVARS+$00E0 ;Destination X coordinate (32 bytes) 34 | ;;; EXP_BUFFER = RAM1_MISCVARS+$0100 ;Explosion Buffer (16 bytes) 35 | ;;; MAP_PRECALC = RAM1_MISCVARS+$0110 ;Stores pre-calculated objects for map window (77 bytes) 36 | ;;; 37 | ;;; ;The following addresses are used to store the current 38 | ;;; ;state of the SNES buttons. 39 | ;;; SNES_B = RAM1_MISCVARS+$015D 40 | ;;; SNES_Y = RAM1_MISCVARS+$015E 41 | ;;; SNES_SELECT = RAM1_MISCVARS+$015F 42 | ;;; SNES_START = RAM1_MISCVARS+$0160 43 | ;;; SNES_UP = RAM1_MISCVARS+$0161 44 | ;;; SNES_DOWN = RAM1_MISCVARS+$0162 45 | ;;; SNES_LEFT = RAM1_MISCVARS+$0163 46 | ;;; SNES_RIGHT = RAM1_MISCVARS+$0164 47 | ;;; SNES_A = RAM1_MISCVARS+$0165 48 | ;;; SNES_X = RAM1_MISCVARS+$0166 49 | ;;; SNES_BACK_L = RAM1_MISCVARS+$0167 50 | ;;; SNES_BACK_R = RAM1_MISCVARS+$0168 51 | ;;; ;The following addresses are used to store the last 52 | ;;; ;state of the SNES buttons so that we can determine 53 | ;;; ;if a button was released. 54 | ;;; LAST_B = RAM1_MISCVARS+$0169 55 | ;;; LAST_Y = RAM1_MISCVARS+$016A 56 | ;;; LAST_SELECT = RAM1_MISCVARS+$016B 57 | ;;; LAST_START = RAM1_MISCVARS+$016C 58 | ;;; LAST_UP = RAM1_MISCVARS+$016D 59 | ;;; LAST_DOWN = RAM1_MISCVARS+$016E 60 | ;;; LAST_LEFT = RAM1_MISCVARS+$016F 61 | ;;; LAST_RIGHT = RAM1_MISCVARS+$0170 62 | ;;; LAST_A = RAM1_MISCVARS+$0171 63 | ;;; LAST_X = RAM1_MISCVARS+$0172 64 | ;;; LAST_BACK_L = RAM1_MISCVARS+$0173 65 | ;;; LAST_BACK_R = RAM1_MISCVARS+$0174 66 | ;;; 67 | ;;; ;The following addresses are used to store new 68 | ;;; ;presses of the SNES buttons. Once they are set 69 | ;;; ;as a 1, it requires the game to reset them to 70 | ;;; ;0 when it is ready to be read again. 71 | ;;; NEW_B = RAM1_MISCVARS+$0175 72 | ;;; NEW_Y = RAM1_MISCVARS+$0176 73 | ;;; NEW_SELECT = RAM1_MISCVARS+$0177 74 | ;;; NEW_START = RAM1_MISCVARS+$0178 75 | ;;; NEW_UP = RAM1_MISCVARS+$0179 76 | ;;; NEW_DOWN = RAM1_MISCVARS+$017A 77 | ;;; NEW_LEFT = RAM1_MISCVARS+$017B 78 | ;;; NEW_RIGHT = RAM1_MISCVARS+$017C 79 | ;;; NEW_A = RAM1_MISCVARS+$017D 80 | ;;; NEW_X = RAM1_MISCVARS+$017E 81 | ;;; NEW_BACK_L = RAM1_MISCVARS+$017F 82 | ;;; NEW_BACK_R = RAM1_MISCVARS+$0180 83 | ;;; 84 | ;;; ;The following are the locations where the current 85 | ;;; ;key controls are stored. These must be set before 86 | ;;; ;the game can start. 87 | ;;; KEY_MOVE_UP = RAM1_MISCVARS+$0181 88 | ;;; KEY_MOVE_DOWN = RAM1_MISCVARS+$0182 89 | ;;; KEY_MOVE_LEFT = RAM1_MISCVARS+$0183 90 | ;;; KEY_MOVE_RIGHT = RAM1_MISCVARS+$0184 91 | ;;; KEY_FIRE_UP = RAM1_MISCVARS+$0185 92 | ;;; KEY_FIRE_DOWN = RAM1_MISCVARS+$0186 93 | ;;; KEY_FIRE_LEFT = RAM1_MISCVARS+$0187 94 | ;;; KEY_FIRE_RIGHT = RAM1_MISCVARS+$0188 95 | ;;; KEY_CYCLE_WEAPONS = RAM1_MISCVARS+$0189 96 | ;;; KEY_CYCLE_ITEMS = RAM1_MISCVARS+$018A 97 | ;;; KEY_USE = RAM1_MISCVARS+$018B 98 | ;;; KEY_SEARCH = RAM1_MISCVARS+$018C 99 | ;;; KEY_MOVE = RAM1_MISCVARS+$018D 100 | ;;; 101 | ;;; PLAYER_DIRECTION = RAM1_MISCVARS+$018E ;0=up 6=down 12=left 18=right 102 | ;;; MUSIC_STATE = RAM1_MISCVARS+$018F ;0=music off. 103 | ;;; 104 | ;;; ;***MAP FILES CONSIST OF EVERYTHING FROM THIS POINT ON*** 105 | ;;; UNIT_TYPE = RAM1_MAPVARS+$0000 ;Unit type 0=none (64 bytes) 106 | ;;; UNIT_LOC_X = RAM1_MAPVARS+$0040 ;Unit X location (64 bytes) 107 | ;;; UNIT_LOC_Y = RAM1_MAPVARS+$0080 ;Unit X location (64 bytes) 108 | ;;; UNIT_A = RAM1_MAPVARS+$00C0 109 | ;;; UNIT_B = RAM1_MAPVARS+$0100 110 | ;;; UNIT_C = RAM1_MAPVARS+$0140 111 | ;;; UNIT_D = RAM1_MAPVARS+$0180 112 | ;;; UNIT_HEALTH = RAM1_MAPVARS+$01C0 ;Unit health (0 to 11) (64 bytes) 113 | ;;; MAP = RAM1_MAPDATA ;Location of MAP (8K) 114 | ;;; ;***END OF MAP FILE*** 115 | ;;; 116 | ;;; ;*** Zero Page locations used *** 117 | ;;; TILE = $23 ;The tile number to be plotted 118 | ;;; TEMP_X = $24 ;Temporarily used for loops 119 | ;;; TEMP_Y = $25 ;Temporarily used for loops 120 | ;;; MAP_X = $26 ;Current X location on map 121 | ;;; MAP_Y = $27 ;Current Y location on map 122 | ;;; MAP_WINDOW_X = $28 ;Top left location of what is displayed in map window 123 | ;;; MAP_WINDOW_Y = $29 ;Top left location of what is displayed in map window 124 | ;;; DECNUM = $2A ;a decimal number to be displayed onscreen as 3 digits. 125 | ;;; ATTRIB = $2B ;Tile attribute value 126 | ;;; UNIT = $2C ;Current unit being processed 127 | ;;; TEMP_A = $2D ;used within some routines 128 | ;;; TEMP_B = $2E ;used within some routines 129 | ;;; TEMP_C = $2F ;used within some routines 130 | ;;; TEMP_D = $30 ;used within some routines 131 | ;;; CURSOR_X = $31 ;For on-screen cursor 132 | ;;; CURSOR_Y = $32 ;For on-screen cursor 133 | ;;; CURSOR_ON = $33 ;Is cursor active or not? 1=yes 0=no 134 | ;;; REDRAW_WINDOW = $34 ;1=yes 0=no 135 | ;;; MOVE_RESULT = $35 ;1=Move request success, 0=fail. 136 | ;;; UNIT_FIND = $36 ;255=no unit present. 137 | ;;; MOVE_TYPE = $37 ;%00000001=WALK %00000010=HOVER 138 | ;;; SCREEN_SHAKE = $38 ;0=NO 1=YES 139 | ;;; PRECALC_COUNT = $39 ;part of screen draw routine 140 | ;;; GOAT_ZERO1 = $3E ;used by goat-tracker 141 | ;;; GOAT_ZERO2 = $3F ;used by goat-tracker 142 | ;;; 143 | ;;; C_MUSIC_START = $0B00 144 | ;;; C_MUSIC_PLAY = $0B03 145 | ;;; C_PLAY_SOUND = $0B06 146 | ;;; C_PREINIT = $0B09 147 | ;;; C_START_GAME = $0B0C 148 | ;;; C_RUNIRQ = $0B0F 149 | ;;; 150 | ;;; REFINED_MEMORY = $1000 ; refined is the opposite of common ... haha 151 | ;;; 152 | ;;; GAME0_MEMORY = RAM0_FREE1 153 | ;;; MUSIC_MEMORY = RAM0_MUSIC 154 | ;;; LOADER_MEMORY = MUSIC_MEMORY - $0300 155 | ;;; 156 | ;;; GAME1_MEMORY = RAM1_MAIN 157 | ;;; TILE_MEMORY = RAM1_DESTRUCTPATH 158 | ;;; CHARSET_MEMORY = RAM1_VICBANK + $0000 159 | ;;; COLOR_MEMORY = $D800 ; always in IO space 160 | ;;; SCREEN_MEMORY = RAM1_VICBANK + $2000 161 | ;;; SPRITE_POINTER_0 = SCREEN_MEMORY+$03F8 162 | ;;; SPRITE_POINTER_1 = SCREEN_MEMORY+$03F9 163 | ;;; SPRITE_POINTER_2 = SCREEN_MEMORY+$03FA 164 | ;;; SPRITE_POINTER_3 = SCREEN_MEMORY+$03FB 165 | ;;; SPRITE_POINTER_4 = SCREEN_MEMORY+$03FC 166 | ;;; SPRITE_POINTER_5 = SCREEN_MEMORY+$03FD 167 | ;;; SPRITE_POINTER_6 = SCREEN_MEMORY+$03FE 168 | ;;; SPRITE_POINTER_7 = SCREEN_MEMORY+$03FF 169 | ;;; SPRITE_MEMORY = RAM1_VICBANK+$2400 170 | ;;; 171 | ;;; } 172 | ;;; 173 | ;;; !macro LOADPTR .ptr, .val { 174 | ;;; LDA #<.val ; set low byte 175 | ;;; STA .ptr+0 176 | ;;; LDA #>.val ; set high byte 177 | ;;; STA .ptr+1 178 | ;;; } 179 | ;;; 180 | ;;; 181 | 182 | -------------------------------------------------------------------------------- /boot.asm: -------------------------------------------------------------------------------- 1 | !TO "boot-128", CBM 2 | !SYMBOLLIST "boot.sym" 3 | 4 | !SOURCE "const.inc" 5 | !SOURCE "macro.inc" 6 | !SOURCE "loader.sym" 7 | 8 | * = ADDR_BOOT 9 | 10 | ;****************************************************************************** 11 | 12 | .LINE_128 !WORD .BASIC_END ; link to next line 13 | !WORD 128 ; line number 128 14 | !BYTE $9E ; SYS token 15 | !BYTE $30+BOOT/1000%10 ; thousands digit of sys address 16 | !BYTE $30+BOOT/ 100%10 ; hundreds digit of sys address 17 | !BYTE $30+BOOT/ 10%10 ; tens digit of sys address 18 | !BYTE $30+BOOT/ 1%10 ; ones digit of sys address 19 | !PET ":" ; separate SYS from REM 20 | !BYTE $8F ; REM token 21 | !BYTE $22 ; quotation mark 22 | !FILL 12, $14 ; delete characters to erase line to this point 23 | !PET "is being attacked by petscii robots!" 24 | !BYTE 0 ; end of line 128 25 | .BASIC_END !WORD 0 ; end of BASIC program 26 | 27 | ;****************************************************************************** 28 | 29 | BOOT 30 | 31 | !IF SHAREWARE = 1 { 32 | 33 | !MACRO RDVDC .r { 34 | LDX #.r 35 | JSR $CDDA 36 | } 37 | 38 | !MACRO WRVDC .r { 39 | LDX #.r 40 | JSR $CDCC 41 | } 42 | 43 | !MACRO WRVDC .r, .v { 44 | LDA #.v 45 | +WRVDC .r 46 | } 47 | 48 | !MACRO PHVDC .r { 49 | +RDVDC .r 50 | PHA 51 | } 52 | 53 | !MACRO PLVDC .r { 54 | PLA 55 | +WRVDC .r 56 | } 57 | 58 | !MACRO CHARAT .at, .var { 59 | +WRVDC 18, >.at 60 | +WRVDC 19, <.at 61 | 62 | LDA .var 63 | CLC 64 | ADC #$30 65 | 66 | +WRVDC 31 67 | 68 | EOR #$80 69 | STA $0400+.at 70 | } 71 | 72 | ; initialize VDC screen for output 73 | 74 | +PHVDC 0 75 | +PHVDC 1 76 | +PHVDC 2 77 | +PHVDC 18 78 | +PHVDC 19 79 | +PHVDC 22 80 | +PHVDC 25 81 | 82 | +WRVDC 0, 63 83 | +WRVDC 1, 40 84 | +WRVDC 2, 55 85 | +WRVDC 18, 0 86 | +WRVDC 19, 0 87 | +WRVDC 22, (8*16)+9 88 | +RDVDC 25 89 | ORA #16 90 | +WRVDC 25 91 | 92 | LOADNAG LDA NAG 93 | BEQ COUNTDOWN 94 | 95 | +WRVDC 31 96 | 97 | EOR #$80 98 | STORENAG STA $0400 99 | 100 | LDA LOADNAG+1 101 | CLC 102 | ADC #1 103 | STA LOADNAG+1 104 | LDA LOADNAG+2 105 | ADC #0 106 | STA LOADNAG+2 107 | 108 | LDA STORENAG+1 109 | CLC 110 | ADC #1 111 | STA STORENAG+1 112 | LDA STORENAG+2 113 | ADC #0 114 | STA STORENAG+2 115 | 116 | JMP LOADNAG 117 | 118 | NAGCOUNT !BYTE 9, 9, 9 119 | 120 | COUNTDOWN +CHARAT 947, NAGCOUNT+0 121 | +CHARAT 948, NAGCOUNT+1 122 | +CHARAT 949, NAGCOUNT+2 123 | 124 | LDY #4 125 | -- LDX #0 126 | - DEX 127 | BNE - 128 | DEY 129 | BNE -- 130 | 131 | DEC NAGCOUNT+2 132 | BPL COUNTDOWN 133 | LDA #9 134 | STA NAGCOUNT+2 135 | DEC NAGCOUNT+1 136 | BPL COUNTDOWN 137 | LDA #9 138 | STA NAGCOUNT+1 139 | DEC NAGCOUNT+0 140 | BPL COUNTDOWN 141 | 142 | - JSR $FFE4 143 | BEQ - 144 | 145 | +WRVDC 18, 0 146 | +WRVDC 19, 0 147 | 148 | RELOADNAG LDA NAG 149 | BEQ RESTVDC 150 | 151 | LDA #32 152 | 153 | +WRVDC 31 154 | 155 | CLEARNAG STA $0400 156 | 157 | LDA RELOADNAG+1 158 | CLC 159 | ADC #1 160 | STA RELOADNAG+1 161 | LDA RELOADNAG+2 162 | ADC #0 163 | STA RELOADNAG+2 164 | 165 | LDA CLEARNAG+1 166 | CLC 167 | ADC #1 168 | STA CLEARNAG+1 169 | LDA CLEARNAG+2 170 | ADC #0 171 | STA CLEARNAG+2 172 | 173 | JMP RELOADNAG 174 | 175 | RESTVDC +PLVDC 25 176 | +PLVDC 22 177 | +PLVDC 19 178 | +PLVDC 18 179 | +PLVDC 2 180 | +PLVDC 1 181 | +PLVDC 0 182 | } 183 | 184 | !IF SHAREWARE = 0 { 185 | +STI C2DDRB, %00101000 ; Set userport data direction to output for pins 3 & 5 186 | } 187 | 188 | +STI BGCOL0, 0 ; Set background to black 189 | +STI EXTCOL, 6 ; Set border to blue 190 | +MANDI INIT_STATUS, $FE ; Disable system shadow registers 191 | +STI IRQ_WRAP_FLAG, $01 ; Disable BASIC IRQ service routine 192 | +STI GRAPHM, $FF ; Disable screen editor IRQ setup portion per MAPPING THE 128 193 | +STI KEYCHK, $B7 ; Skip programmable function key check per MAPPING THE 128 194 | +STI MMU, %00001110 ; 00=RAM0, 00=KERN/CHARSET/SCREDITOR, 111=NOBASIC, 0=IO 195 | +STI MMURCR, %00000101 ; 00=VIC0, 00=NA, 01=COMMONBOTTOM, 01=COMMON4K 196 | +STI RPTFLG, 64 ; Set all keys to NON-repeat mode 197 | +STI MODE, $80 ; Disable character set switching 198 | +STI VMCSB, $15 ; Enable upper-case character set 199 | 200 | LOADER_MSG = "loading loader" 201 | 202 | LDY #0 203 | 204 | - LDA .data,Y 205 | JSR CHROUT 206 | INY 207 | CPY #(.end-.data) 208 | BNE - 209 | 210 | JMP .end 211 | 212 | .data !BYTE 147, 5 213 | !FILL 12, 17 214 | !FILL 8, 29 215 | !PET "waking up the robots ..." 216 | .end 217 | 218 | LOADER_FILE = "loader-128" 219 | +LDCFILE LOADER_FILE, FAR_ADDR_LOADER, SIZE_LOADER 220 | 221 | JMP LOADER 222 | 223 | !IF SHAREWARE = 1 { 224 | NAG 225 | !BYTE $20,$20,$20,$20,$20,$20,$6c,$62,$7b,$7b,$20,$7b,$6c,$62,$20,$62,$62,$20,$62,$62,$7b,$7b,$20,$7b,$6c,$62,$20,$62,$62,$20,$62,$62,$62,$62,$62,$62,$62,$62,$62,$62 226 | !BYTE $20,$20,$20,$20,$20,$20,$7f,$62,$20,$fc,$62,$61,$fc,$62,$61,$fc,$62,$7e,$fc,$62,$20,$61,$61,$61,$fc,$62,$61,$fc,$62,$7e,$fc,$62,$20,$20,$20,$20,$20,$20,$20,$20 227 | !BYTE $62,$62,$62,$62,$62,$62,$62,$62,$7e,$61,$20,$61,$61,$20,$61,$61,$20,$61,$fc,$62,$7b,$7f,$7f,$7e,$61,$20,$61,$61,$20,$61,$fc,$62,$7b,$20,$20,$20,$20,$20,$20,$20 228 | !BYTE $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 229 | !BYTE $20,$20,$20,$01,$14,$14,$01,$03,$0b,$20,$0f,$06,$20,$14,$08,$05,$20,$10,$05,$14,$13,$03,$09,$09,$20,$12,$0f,$02,$0f,$14,$13,$20,$03,$31,$32,$38,$20,$20,$20,$20 230 | !BYTE $13,$08,$01,$12,$05,$17,$01,$12,$05,$20,$16,$05,$12,$13,$09,$0f,$0e,$20,$09,$13,$20,$06,$12,$05,$05,$20,$14,$0f,$20,$04,$09,$13,$14,$12,$09,$02,$15,$14,$05,$20 231 | !BYTE $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 232 | !BYTE $20,$20,$19,$0f,$15,$20,$03,$01,$0e,$20,$04,$0f,$17,$0e,$0c,$0f,$01,$04,$20,$01,$20,$06,$12,$05,$05,$20,$03,$0f,$10,$19,$20,$0f,$06,$20,$14,$08,$05,$20,$20,$20 233 | !BYTE $20,$15,$13,$05,$12,$27,$13,$20,$0d,$01,$0e,$15,$01,$0c,$20,$0f,$12,$20,$02,$15,$19,$20,$14,$08,$05,$20,$06,$15,$0c,$0c,$20,$16,$05,$12,$13,$09,$0f,$0e,$20,$20 234 | !BYTE $20,$20,$20,$20,$20,$20,$20,$20,$20,$01,$14,$20,$17,$17,$17,$2e,$14,$08,$05,$38,$02,$09,$14,$07,$15,$19,$2e,$03,$0f,$0d,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 235 | !BYTE $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 236 | !BYTE $20,$20,$20,$20,$20,$2a,$2a,$2a,$20,$06,$15,$0c,$0c,$20,$16,$05,$12,$13,$09,$0f,$0e,$20,$09,$0e,$03,$0c,$15,$04,$05,$13,$20,$2a,$2a,$2a,$20,$20,$20,$20,$20,$20 237 | !BYTE $20,$20,$20,$20,$20,$20,$20,$20,$20,$63,$63,$63,$63,$63,$63,$63,$63,$63,$63,$63,$63,$63,$63,$63,$63,$63,$63,$63,$63,$63,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 238 | !BYTE $20,$20,$20,$20,$20,$20,$20,$2d,$20,$01,$0c,$0c,$20,$31,$35,$20,$0c,$05,$16,$05,$0c,$13,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 239 | !BYTE $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 240 | !BYTE $20,$20,$20,$20,$20,$20,$20,$2d,$20,$13,$0e,$05,$13,$20,$03,$0f,$0e,$14,$12,$0f,$0c,$0c,$05,$12,$20,$13,$15,$10,$10,$0f,$12,$14,$20,$20,$20,$20,$20,$20,$20,$20 241 | !BYTE $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 242 | 243 | !SCR " - hotkey for robot locations " 244 | ; !BYTE $20,$20,$20,$20,$20,$20,$20,$2d,$20,$03,$36,$34,$2c,$20,$16,$09,$03,$2d,$32,$30,$2c,$20,$26,$20,$10,$05,$14,$20,$16,$05,$12,$13,$09,$0f,$0e,$13,$20,$20,$20,$20 245 | 246 | !BYTE $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 247 | !BYTE $20,$20,$20,$20,$20,$20,$20,$2d,$20,$07,$05,$14,$20,$12,$09,$04,$20,$0f,$06,$20,$14,$08,$09,$13,$20,$0e,$01,$07,$07,$09,$0e,$07,$20,$13,$03,$12,$05,$05,$0e,$20 248 | !BYTE $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 249 | !BYTE $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 250 | !BYTE $20,$20,$20,$20,$20,$10,$12,$05,$13,$13,$20,$01,$0e,$19,$20,$0b,$05,$19,$20,$14,$0f,$20,$03,$0f,$0e,$14,$09,$0e,$15,$05,$20,$0f,$0e,$03,$05,$20,$20,$20,$20,$20 251 | !BYTE $20,$20,$20,$20,$20,$20,$20,$20,$20,$14,$09,$0d,$05,$12,$20,$12,$05,$01,$03,$08,$20,$1a,$05,$12,$0f,$3a,$20,$30,$30,$30,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 252 | !BYTE $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20 253 | !BYTE $00 254 | } 255 | 256 | ;****************************************************************************** 257 | 258 | !if * > ADDR_BOOT+SIZE_BOOT { 259 | !serious "BOOT TOO BIG" 260 | } 261 | 262 | -------------------------------------------------------------------------------- /128-robots-faces.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * pixmap_data[] = { 3 | "288 56 9 1", 4 | " c #000000", 5 | ". c #555555", 6 | "+ c #994433", 7 | "@ c #776600", 8 | "# c #9955AA", 9 | "$ c #BB8844", 10 | "% c #EE8888", 11 | "& c #BBBBBB", 12 | "* c #FFFFFF", 13 | " ", 14 | " .. .. ", 15 | " .. .. .. .. .. .. ", 16 | " .. .. .. .. .. ", 17 | " @@@@@@@@.... .. @@@@@@@@.... .. @@@@@@@@.... .. @@@@@@@@.... .. .. .. ", 18 | " @@&&&&$$@@$$$$.. .. @@&&&&$$@@$$$$.. .. @@&&&&$$@@$$$$.. .. @@&&&&$$@@$$.... .. @@@@@@@@.... .. @@@@@@@@.... .. ", 19 | " @@&&&&$$@@@@@@..$$..@@.. @@&&&&$$@@@@@@..$$..@@.. @@&&&&$$$$@@@@@@$$..@@.. @@&&&&$$$$@@$$$$....@@.. @@$$$$$$@@$$@@.. .. @@$$$$$$@@$$@@.. .. ", 20 | " $$$$$$@@$$@@@@@@......@@ $$$$$$@@$$@@@@@@......@@ $$&&$$$$@@@@@@..@@....@@ $$&&$$$$$$@@@@@@$$....@@ @@$$&&&&$$@@@@$$@@..@@.. @@$$&&&&$$@@@@$$@@..@@ ", 21 | " @@$$&&$$$$@@$$@@..@@.. ..@@ @@$$&&$$$$@@$$@@..@@.. ..@@ @@$$$$$$@@$$@@@@@@........@@ @@$$$$$$$$@@@@@@..@@......@@ $$&&&&$$$$@@@@@@$$....@@ $$&&&&$$$$@@@@@@$$...... ", 22 | " $$&&$$&&$$$$@@@@@@........@@ $$&&$$&&$$$$@@@@@@........@@ $$$$&&$$$$@@$$@@..@@......@@ $$$$$$$$@@$$@@@@@@........@@ @@$$&&$$$$$$@@@@@@$$......@@ @@$$&&$$$$$$@@@@@@$$...... ", 23 | " &&$$&&$$$$@@$$@@..@@.. ...... &&$$&&$$$$@@$$@@..@@.. ...... $$&&$$&&$$$$@@@@@@.... ...... $$$$&&$$$$@@$$@@..@@.......... $$$$$$$$$$@@@@@@..@@......@@ $$$$$$$$$$$$@@@@@@..@@ .... ", 24 | " @@$$&&$$$$$$$$@@@@@@..@@.. .. @@$$&&$$$$$$$$@@@@@@..@@.. .. @@&&$$&&$$$$@@$$@@..@@ .. @@&&&&$$&&$$$$@@@@@@.... .... $$$$$$$$@@$$@@@@@@............ $$++$$$$$$$$$$@@@@@@........ ", 25 | " @@&&$$@@$$$$@@@@@@..@@.. .. .. @@&&$$@@$$$$@@@@@@..@@.. .. .. @@$$&&$$$$$$$$@@@@@@..@@ .. .. @@$$$$&&$$$$@@$$@@..@@ .... @@$$$$@@$$$$@@$$@@............ @@$$++++$$&&$$@@$$@@.......... ", 26 | " $$$$&&$$@@$$$$@@@@@@ @@ .... $$$$&&$$@@$$$$@@@@@@ @@ .... $$&&$$@@$$$$@@@@@@..@@.. .... $$$$&&$$$$$$$$@@@@@@..@@ .. @@$$@@@@&&$$$$@@@@@@@@.......... @@++$$++$$$$$$$$@@@@@@@@ ...... ", 27 | " @@$$@@$$@@$$$$$$@@@@..@@.. .. .. @@$$@@$$@@$$$$$$@@@@..@@.. .. .. @@$$$$&&$$@@$$$$@@@@@@ @@ .. @@$$&&$$@@$$$$@@@@@@..@@.. ...... $$$$@@$$$$$$$$@@@@@@.... .... $$$$++++$$&&$$@@@@@@@@.... .. ", 28 | " $$@@ @@@@@@$$$$@@@@@@ ++ ........ $$@@ @@@@@@$$$$@@@@@@ ++ ........ $$@@@@$$@@$$$$$$@@@@..@@.. ........ $$@@$$&&$$@@$$$$@@@@@@ @@ .... @@$$$$$$$$&&$$@@$$@@..@@ .. @@$$++++++&&$$&&@@$$@@..@@ .. ", 29 | " $$$$@@@@ @@@@$$@@ .. ++.... .... $$$$@@@@ @@@@$$@@ .. ++.... .... $$$$ @@@@@@$$$$@@@@@@ .. .... $$$$@@$$@@$$$$$$@@@@..@@.. ........ $$@@&&$$&&$$$$$$@@@@@@..@@ ........ $$@@$$++++$$&&$$@@@@@@@@..@@ .... ", 30 | " $$@@ @@ @@ @@@@ ++++++ .. $$@@ @@ @@ @@@@ ++++++ .. $$@@@@@@ @@@@$$@@ .. ++.... .. $$@@ @@@@@@$$$$@@@@@@ .. .. $$$$$$&&@@$$$$@@@@@@..@@.. .. .... $$$$$$++++$$$$$$$$@@@@..@@.. .. ", 31 | " @@@@ @@ @@@@@@ ++++++.. .. @@@@ @@ @@@@@@ ++++++.. .. @@@@ @@ @@ @@@@ ++++ .. @@@@@@@@ @@@@$$@@ .. ++.... .. $$@@$$$$$$@@$$$$@@@@@@ @@ .. @@@@$$$$++@@$$$$$$@@@@@@ @@ .. ", 32 | " @@ ++++++++++ ++++##++##++ .. @@ ++++++++++ ++++##++##++ .. @@ @@@@@@ ++++++.. .. @@ ++ @@ @@@@ ++++ .. @@@@@@$$@@$$$$$$@@ .. .. ...... @@@@@@$$++$$@@$$$$@@ ++ .. .... ", 33 | " @@ ++%%%%%%%%++++++##++##..##++ @@ ++%%%%%%%%++++++##++##..##++ @@ ++++++++++@@ ++++##++##++++ @@ ++ @@@@@@ ++++++ ++ @@ @@@@@@$$$$@@@@@@ .. .. @@@@@@@@++@@$$$$$$@@++@@ .... ", 34 | " ++%%&&&&%%++%%%%++##++##..++ .. ++%%&&&&%%++%%%%++##++##..++ .. ++%%%%%%++@@++++##++##....++ .. ++++++++@@ ++++##++.. ++ .. @@ @@@@ @@@@$$@@ ++ ++.... @@ ++@@@@@@$$$$++ ++ .... ", 35 | " @@ %%&&&&%%%%%%%%##%%####..##++ @@ %%&&&&%%%%%%%%##%%####..##++ @@ %%%%%%%%%%++%%%%####++## ++ @@ ++%%%%%%++@@++++##++#### ++ ++ @@ @@@@ ++++ .. @@@@@@++@@ @@@@@@@@ ++ .. ", 36 | " %%%%%%%%%%%%%%%%##%%####..## .. %%%%%%%%%%%%%%%%##%%####..## .. %%&&&&%%++%%++%%%%####..#### .. ++%%%%%%%%++%%++++####..#### .. @@ @@++@@@@@@@@ ++++++ ++ @@ ++++ @@ @@++ ++ ++.... ", 37 | " ++%%++++++%%++&&%%%%##++++...... ++%%++++++%%++&&%%%%##++++...... ++%%%%%%%%%%++%%%%%%%%####...... ++%%%%%%%%++%%++########..##.... ++++++ ++@@ ++##++.. ++ .. ++@@ ++@@++ ++##++ ++.. ", 38 | " ++%%++ ++%%%%++ ++##.. ++%%++ %%%% ++##.. ++%%++++++++ %%%% ##++++..##.. ++%%%%&&%%++%%++%%%%####..####.. ++%%@@++ ++@@ ++##++#### ##.. ++ ++ ++@@ ++##++## ..++ ", 39 | " ++++++%% ++++ .... .. ++++++%% ++++++++ .... .. ++++++%%++ %%%%++ ++.... .. ++++++%%++%%%%%%++%%%%%%######...... .. ++++++%%++%%%%%%++ ++######..##.... .. ++ ++++ ++ ++++ ++######## ++.. ", 40 | " %%++++%%++%% ++ ++++ ++ ....##.. %%++++%%++%% ++++++++ ++ ....##.. %%++++%% ++++++++ ##.. %%++++%%++++++++ %%%% ##++++..##.. %%++++%%%%%%%%%%%%++++######.. ##.. %%++ ++ ++++++%%%%%%++++######..++.. ", 41 | " &&++ %%++** &&++%%++++%% **..##.. .. &&++ %%++** %%++%%++++%% **..##.. .. &&++ %%++&& ++++++++++++ ....##.. .. &&++ %% %%%% ++##.. .. &&++++%%%%&&%%++%% ++######..##.... .. %%++++++++ ++%%++%%%%++######## ++ ", 42 | " %%++++%%%%++++++++%%##++++++..#### ## %%++++%%++++++++++%%##++++++..#### ## %%++++%%++%%++%%++%%++++%%++##..## ## %%++++%%++ ++++++++ ## ## %%++ %%++%%%%++%%++++########..##.. ## %%%%++++++ %%%%++%%++++##########++.. ", 43 | " %%++ %%%%%%%%++++%%##++%%########.. .. %%++ %%%%++++ ++%%##++++++######.. .. %%++ %%%%++ %%##++ ++####.. .. %%++ %%++%% ++++++++++++ ....##.. .. %%++++%%++++++++ ++######++++++## .. %%%%%% %% %%++++++++######++++##.. ", 44 | " %%++ ++%%%%++++%%&&##++##%%####.. ..## %%++ ++%%++++++%%&&##++##%%####.. ..## %%++ ++%%++++ ++%%##++##++####.. ..## %%++ ++%%++ ####++ ++##.. ..## %%++ %% #### ##....## ++%% ++%%++%% ++++++##++++ .. .. ", 45 | " ++++ %%%%%%%%%%%%%%%%##%%########.. .. ++++ %%%%%%++%%%%%%%%##%%########.. .. ++++ %%%%++++++++%%##############.. .. ++++ %%%%++++ ++####++##++######.. .. ++++ %%++ ++++++++ .... .. ++ %% ++++++++ ##.. ", 46 | " ++ ++%%%%%%%%%%&&%%++##%%####.. .. ++ ++%%%%%%%%%%&&%%++##%%####.. .. ++ ++%%%%++++%%%%##++########.. .. ++ ++%%++++++++%%############.. .. ++ ++++++ ++++++++++ ..####.... ++ ++ ++++ .... ", 47 | " ++ ++%%%%%%&&%%&&%%########..## .. ++ ++%%%%%%%%%%&&%%########..## .. ++ ++%%%%%%%%%%&&%%########..## .. ++ ++%%%%++++%%%%##++########## .. ++ %%%%++ ++ ++##++ ++##.. .. %%++++ ++ ++##++ ++##.. ", 48 | " ++%%%%%%&&%%++%%%%++########.. ++%%%%%%&&%%++%%%%++########.. ++%%%%%%%%%%%%&&%%++########.. ++%%%%%%++%%%%%%%%########.... ++%%++++ ++++##++## ###### ++ ++++++++ ++++##++## ##.. ", 49 | " ++%%%%%%%%++++++ ++####..## ++%%%%%%%%++++++ ++####..## ++%%%%%%%%++%%%%++++####..## ++%%%%%%%%%%%%%%++########## ++%%%%%% ++++######## ####.. %%++%% ++++######## ##.. ", 50 | " ++%%%%&&%%++ ++++ ####.... ++%%%%&&%%++ ++++ ####.... ++%%%%&&%%++++++++ ####.... ++%%%%%%%%%%++%%%%++++####.... ++%%%%++++++####++##++##..## ++++++++%%++++++####++##++##.. ", 51 | " %%%%&&%%++%%++ ##++ ##..## %%%%&&%%++ ++ ##++ ##..## %%%%&&%%++ ++ ##..## %%%%&&++++++++++ ####..## ++%%%%%% ++++%%######++####.. ++%%++%% ++++%%######++.... ", 52 | " ++%%++%%%%%%&&%%%%####++##.... ++%%++%%%%%%++%%%%####++##.... ++%%++%%%%%%++++++ ##++##.... ++%%%%&&++++ ++ ##.... %%%%%%++##++%%##++##++##..## ++++%%++%%++##++%%##++##++.... ", 53 | " %%%%%%++%%%%%%%%%%###### .. %%%%%%++%%++%%%%%%###### .. %%%%%%++%%++%%%%++###### .. %%++%% ++++++ ##++##.... ++%%%%++++++++%%%%++++++##.... ++++%%++++++++%%%%++++++.... ", 54 | " ++++%%%%%%++++++ ######.... ++++%%%%++&&++++ ######.... ++++%%%%++&&++%%++######.... ++++%% && ++++++######.... %%++++++++ ++++ ++++...... ++++++++++++ ++++ ++++.. ", 55 | " ++++%%%% ++++++ #### .. ++++%%%% &&&&++++ #### .. ++++%%%% &&&&++ #### .. ++++%% &&&& ++ #### .. ++++++++ ++++ ##++...... ++++++++ ++++ ##++.. ", 56 | " ++%%%%%%%%%%%%%%++##.. ++%%%%%%++%%%%%%++##.. ++%%%% &&&&++++ ##.. ++%%%%&&&&&&++ ##.. ++++%%++ ++++++####.. .. ++++++%%++ ++++++##.... ", 57 | " ++%%%%%%++++++++%%####.. ++%%%%%%++++++++%%####.. ++%%%%%%++++%%%%%%####.. ++%%%%++++++++++ ####.. ++%%++&&&& ++ ##.. ++%%%%++ ++++.... ", 58 | " ++%%%%&&%%++++%%##%%.... ++%%%%&&%%++++%%##%%.... ++%%%%&&%%++++%%##%%.... ++%%%%++++%%%%%%####.... ++%%++++&& ++ ##.... ++%%%%++ ++++ .. ", 59 | " ++++%%&&&&%%%%##%%++.. ++++%%&&&&%%%%##%%++.. ++++%%&&&&%%%%##%%++.. ++++%%++&&%%%%####++.. ++%%%% ++++++++ ##.... ++++%%%% ++ ++++ .. ", 60 | " ++%%%%%%%%%%%%####.. ++%%%%%%%%%%%%####.. ++%%%%%%%%%%%%####.. ++%%++%%%%%%%%####.. ++++%% ++%%########.. ++%%%% ++ #### .. ", 61 | " ++%%%%%%%%####++ ++%%%%%%%%####++ ++%%%%%%%%####++ ++++%%%%%%####++ ++%% %%%%######++.. ++%% ++++#### ", 62 | " ++++++++++++ ++++++++++++ ++++++++++++ ++++++++++++ ++++%%%%######++ ++ ++++++++##++ ", 63 | " ++++++++++++ ", 64 | " ++ ", 65 | " ++ ++ ", 66 | " ", 67 | " ++ ", 68 | " "}; 69 | -------------------------------------------------------------------------------- /vdc.asm: -------------------------------------------------------------------------------- 1 | ;****************************************************************************** 2 | 3 | INIT_VDC: 4 | 5 | +STIVDC $01, 64 ; only display 512 bits wide (64 bytes, 128 fauxpixels @ 4 pixels each) 6 | +STIVDC $02, 94 ; center 512 bits wide on the screen 7 | +STIVDC $06, 64 ; only display 128 rasters tall (64 fauxpixels @ 2 rasters each) 8 | 9 | LDA $0A03 ; PAL/NTSC flag 10 | BNE + ; NE 0 is PAL 11 | 12 | ; initialize ntsc 13 | +STIVDC $04, 130 ; total pairs of rasters - 1 14 | +STIVDC $05, 0 ; vertical fine adjust not necessary 15 | +STIVDC $07, 97 ; center 128 rasters on the screen 16 | JMP ++ 17 | 18 | ; initialize pal 19 | + +STIVDC $04, 155 ; total pairs of rasters - 1 20 | +STIVDC $05, 0 ; vertical fine adjust not necessary 21 | +STIVDC $07, 108 ; center 128 rasters on the screen 22 | 23 | ++ +STIVDC $09, 1 ; 2 rasters per "character" row 24 | +STIWVDC $0C, $0000 ; address of display memory 25 | +STIWVDC $14, $2000 ; address of attribute memory 26 | +STIVDC $17, 1 ; 2 rasters per "character" row 27 | 28 | ; see http://www.oxyron.de/html/registers_vdc.html for computations 29 | ; 30 | ; VD = register 6 31 | ; VT = register 4 32 | ; VA = register 5 33 | ; VP = register 7 34 | ; 35 | ; char_height = 2 to 32 36 | ; rlines = 312 (50 Hz) or 262 (60 Hz) 37 | ; rows = Number of character rows to be displayed, should be smaller than (rlines / char_height) 38 | ; 39 | ; VD = rows 40 | ; VT = (rlines / char_height) - 1 41 | ; VA = (rlines) mod (char_height) 42 | ; VP = ((rlines / char_height) + rows) / 2 43 | 44 | +LDVDC $19 ; enable bitmap with attributes for color 45 | ORA #$C0 46 | +STVDC 47 | 48 | +LDVDC $18 ; setup to fill memory 49 | AND #$7F 50 | +STVDC 51 | 52 | +STIWVDC $12, $2000 ; fill attribute memory 53 | +STIVDC $1F, $00 ; fill $0001 of $1000 54 | LDY #$10 55 | - +STIVDC $1E, $FF ; fill $0FF1 of $1000 56 | DEY 57 | BNE - 58 | +STIVDC $1E, $0F ; fill $1000 of $1000 59 | 60 | +STIWVDC $12, $0000 ; fill attribute memory 61 | +STIVDC $1F, $0F ; fill $0001 of $2000 62 | LDY #$20 63 | - +STIVDC $1E, $FF ; fill $1FE1 of $2000 64 | DEY 65 | BNE - 66 | +STIVDC $1E, $1F ; fill $2000 of $2000 67 | 68 | RTS 69 | 70 | VDC_MAP_TILE_ADDR = $FB 71 | VDC_MAP_ATTR_ADDR = $FD 72 | VDC_MAP_ATTR_TEMP = $FF 73 | 74 | INIT_VDC_MODE: 75 | 76 | LDA VDC_MAP_USE_COLOR 77 | BNE + ; if not equal 0 then draw in color is true, so use color values 78 | +STIW VDC_MAP_ATTR_ADDR, MAP_VDC_MONO ; it is false, so use mono values 79 | JMP ++ 80 | + +STIW VDC_MAP_ATTR_ADDR, MAP_VDC_COLOR 81 | ++ RTS 82 | 83 | VDC_MAP_MAX_UNITS = 28 84 | 85 | VDC_MAP_RENDER: 86 | 87 | JSR INIT_VDC_MODE 88 | 89 | +STI VDC_MAP_ERASE_COUNT, 0 90 | LDX #$00 91 | - TXA 92 | STA VDC_MAP_DRAW_UNIT,X 93 | INX 94 | CPX #VDC_MAP_MAX_UNITS 95 | BMI - 96 | +STI VDC_MAP_DRAW_COUNT, VDC_MAP_MAX_UNITS 97 | 98 | +STIWVDC $12, $2000 ; fill attribute memory 99 | +STI VDCASR, $1F 100 | 101 | +STIW VDC_MAP_TILE_ADDR, MAP 102 | 103 | - JSR VDC_MAP_COMPUTE_PIXEL 104 | LDA VDC_MAP_ATTR_TEMP 105 | +STVDC 106 | +ADDW VDC_MAP_TILE_ADDR, 2 107 | 108 | LDA VDC_MAP_TILE_ADDR+1 109 | CMP #>(ADDR_MAPDATA+$2000) ; this assumes the low byte is always 0 110 | BNE - 111 | 112 | JSR VDC_MAP_DRAW_UNITS 113 | 114 | +STI VDC_MAP_DRAW_COUNT, 0 115 | 116 | ;;; ; copy attribute memory from $2000 to $3000 for buffering 117 | ;;; LDX #$20 118 | ;;; LDY #$30 119 | ;;; JSR VDC_MAP_MEMCPY 120 | 121 | RTS 122 | 123 | ;;; VDC_MAP_MEMCPY: 124 | ;;; 125 | ;;; +PHX ; save source page 126 | ;;; +PHY ; save destination page 127 | ;;; 128 | ;;; PLA ; set destination page 129 | ;;; +STVDC $12 130 | ;;; +STIVDC $13, $00 131 | ;;; 132 | ;;; +LDVDC $18 ; setup to copy memory 133 | ;;; ORA #$80 134 | ;;; +STVDC 135 | ;;; 136 | ;;; PLA ; set source page 137 | ;;; +STVDC $20 138 | ;;; +STIVDC $21, $00 139 | ;;; 140 | ;;; LDY #$10 ; 16 x 256 byte blocks to copy 141 | ;;; - +STIVDC $1E, $00 ; copy 256 bytes 142 | ;;; DEY 143 | ;;; BNE - 144 | ;;; 145 | ;;; RTS 146 | 147 | !MACRO VDC_MAP_LOAD_TILE_ADDR_Y { 148 | LDA VDC_MAP_ROW_OFF_LO,Y ; get low byte of address 149 | STA VDC_MAP_TILE_ADDR+0 150 | LDA VDC_MAP_ROW_OFF_HI,Y ; get high byte of address 151 | STA VDC_MAP_TILE_ADDR+1 152 | } 153 | 154 | !MACRO VDC_MAP_ADD_TILE_ADDR_X .page { 155 | CLC 156 | ADC VDC_MAP_TILE_ADDR+0 157 | STA VDC_MAP_TILE_ADDR+0 158 | !IF .page != 0 { 159 | LDA VDC_MAP_TILE_ADDR+1 160 | ADC #.page 161 | STA VDC_MAP_TILE_ADDR+1 162 | } 163 | } 164 | 165 | VDC_MAP_DRAW_UNITS: 166 | 167 | CLC 168 | LDA VDC_MAP_ERASE_COUNT 169 | ADC VDC_MAP_DRAW_COUNT 170 | BNE + 171 | RTS 172 | 173 | + JSR INIT_VDC_MODE ; select color or mono attributes 174 | JSR VDC_MAP_REPAINT ; put back the correct map pixels 175 | !IF 0 { 176 | LDX #VDC_MAP_MAX_UNITS ; max of 1 player and 27 robots 177 | 178 | - DEX ; work backward through the unit list 179 | BPL + ; if index is still non-negative, check the type 180 | } ELSE { 181 | - LDY VDC_MAP_DRAW_COUNT 182 | BEQ VMD_DONE 183 | DEY 184 | STY VDC_MAP_DRAW_COUNT 185 | LDX VDC_MAP_DRAW_UNIT,Y 186 | JMP + 187 | } 188 | 189 | VMD_DONE: 190 | ;;; ; copy attribute memory from $3000 to $2000 for display 191 | ;;; LDX #$30 192 | ;;; LDY #$20 193 | ;;; JSR VDC_MAP_MEMCPY 194 | 195 | RTS ; index was negative, done 196 | 197 | + LDA UNIT_TYPE,X ; is the unit type zero? 198 | BEQ - ; yes, nothing to draw, iterate 199 | 200 | LDA VDC_MAP_SHOW_BOTS ; do we show bots? 201 | BNE + ; yes, go ahead and show 202 | 203 | CPX #0 ; is it the player? 204 | BEQ + ; yes, go ahead and show 205 | JMP - ; no, skip it 206 | 207 | + +PHX ; preserve unit index so we can get it back later 208 | 209 | LDY UNIT_LOC_Y,X ; get offset to beginning of row (Y coordinate) 210 | +VDC_MAP_LOAD_TILE_ADDR_Y ; use Y register to initialize for Y coord 211 | LDA UNIT_LOC_X,X ; get offset from beginning of row (X coord) 212 | +VDC_MAP_ADD_TILE_ADDR_X $00 ; use A register to add X coord 213 | 214 | +LSRW VDC_MAP_TILE_ADDR ; div by 2, carry set if odd pixel 215 | PHP ; preserve carry for a moment 216 | 217 | +TXY ; VDC will overwrite X, stash it in Y 218 | 219 | +ADDW VDC_MAP_TILE_ADDR, $2000 ; adjust to VDC attr memory 220 | +STWVDC $12, VDC_MAP_TILE_ADDR ; set address within attr memory 221 | +LDVDC $1F ; get VDC attribute 222 | 223 | PLP ; restore carry from earlier 224 | BCS + ; branch if odd 225 | 226 | ; X coordinate is even, handle that 227 | AND #%00001111 ; preserve the odd pixel 228 | ORA VDC_MAP_UNIT_COLOR_EVEN,Y ; set the unit color 229 | JMP ++ 230 | 231 | ; X coordinate is odd, handle that 232 | + AND #%11110000 ; preserve the even pixel 233 | ORA VDC_MAP_UNIT_COLOR_ODD,Y ; set the unit color 234 | 235 | ++ STA VDC_MAP_ATTR_TEMP ; save the attribute 236 | 237 | +STWVDC $12, VDC_MAP_TILE_ADDR ; set address within attr memory 238 | +STVDC $1F, VDC_MAP_ATTR_TEMP ; write attribute to VDC 239 | 240 | +PLX ; restore the unit index 241 | 242 | JMP - ; iterate 243 | 244 | VDC_MAP_REPAINT: 245 | 246 | LDX #0 ; begin loop through points to erase 247 | 248 | - CPX VDC_MAP_ERASE_COUNT ; have we reached the end of the list 249 | BNE + ; no, process it 250 | 251 | +STI VDC_MAP_ERASE_COUNT, 0 ; yes to end of list, clear out the count 252 | RTS ; and return 253 | 254 | + +PHX ; preserve count index 255 | 256 | LDY VDC_MAP_ERASE_LOC_Y,X ; get offset of row (Y coordinate) 257 | 258 | +VDC_MAP_LOAD_TILE_ADDR_Y 259 | 260 | LDA VDC_MAP_ERASE_LOC_X,X ; get offset from row (X coordinate) 261 | 262 | +VDC_MAP_ADD_TILE_ADDR_X $A0 ; add $A000+X to addr to adj to map mem 263 | 264 | JSR VDC_MAP_COMPUTE_PIXEL ; get the pixels as defined by the map 265 | 266 | +SUBW VDC_MAP_TILE_ADDR, $A000 ; subtract $A000 from offset 267 | 268 | +LSRW VDC_MAP_TILE_ADDR ; div by 2 as two pixels per attr byte 269 | +ADDW VDC_MAP_TILE_ADDR, $2000 ; add $2000 to adj to VDC attr mem 270 | 271 | +STWVDC $12, VDC_MAP_TILE_ADDR ; write attr to correct VDC mem loc 272 | +STVDC $1F, VDC_MAP_ATTR_TEMP 273 | 274 | +PLX ; restore count index 275 | 276 | INX ; next index 277 | JMP - ; and iterate 278 | 279 | VDC_MAP_COMPUTE_PIXEL: 280 | 281 | LDA VDC_MAP_TILE_ADDR+0 ; save the current low byte of the address 282 | PHA 283 | 284 | AND #%11111110 ; always get pixel pair, mask off odd bit 285 | STA VDC_MAP_TILE_ADDR+0 ; update it 286 | 287 | LDY #$00 ; get the even tile of the pair 288 | LDA (VDC_MAP_TILE_ADDR),Y 289 | TAY ; now convert the tile to an attribute 290 | LDA (VDC_MAP_ATTR_ADDR),Y 291 | ASL ; shift the attribute into the high nibble 292 | ASL 293 | ASL 294 | ASL 295 | STA VDC_MAP_ATTR_TEMP ; store it 296 | 297 | LDY #$01 ; get the odd tile of the pair 298 | LDA (VDC_MAP_TILE_ADDR),Y 299 | TAY ; now convert the tile to an attribute 300 | LDA (VDC_MAP_ATTR_ADDR),Y 301 | ORA VDC_MAP_ATTR_TEMP ; merge the even attribute with the odd one 302 | STA VDC_MAP_ATTR_TEMP ; store it 303 | 304 | PLA ; now restore the low byte 305 | STA VDC_MAP_TILE_ADDR+0 306 | 307 | RTS ; done for this pair 308 | 309 | VDC_MAP_ANIMATE_PLAYER: 310 | LDA $A2 ; get the low byte of the jiffy clock 311 | AND #$0F ; 60 jiffies/sec, so approx 1/4 sec 312 | BNE + ; if not even 16 jiffy count, skip anim 313 | LDX #0 ; force redraw of player 314 | +VDC_MAP_CHANGED 315 | +MEORI VDC_MAP_UNIT_COLOR_EVEN, $F0 ; toggle between B&W 316 | +MEORI VDC_MAP_UNIT_COLOR_ODD, $0F ; toggle between B&W 317 | + RTS ; done 318 | 319 | VDC_MAP_DRAW_COUNT !BYTE 0 320 | VDC_MAP_DRAW_UNIT !FILL 64, 0 321 | 322 | VDC_MAP_ERASE_COUNT !BYTE 0 323 | VDC_MAP_ERASE_LOC_X !FILL 64, 0 324 | VDC_MAP_ERASE_LOC_Y !FILL 64, 0 325 | 326 | VDC_MAP_USE_COLOR !BYTE 1 327 | VDC_MAP_SHOW_BOTS !BYTE 0 328 | 329 | MAP_VDC_COLOR 330 | !BYTE 0, 0, 15, 15, 15, 15, 15, 15 ; 0 331 | !BYTE 15, 2, 15, 15, 15, 15, 0, 15 ; 8 332 | !BYTE 15, 15, 15, 15, 15, 15, 15, 6 ; 16 333 | !BYTE 4, 15, 15, 15, 15, 3, 10, 10 ; 24 334 | !BYTE 3, 13, 10, 3, 3, 13, 2, 3 ; 32 335 | !BYTE 6, 10, 10, 6, 6, 10, 10, 6 ; 40 336 | !BYTE 15, 15, 15, 6, 15, 4, 4, 6 ; 48 337 | !BYTE 15, 4, 6, 6, 3, 3, 15, 3 ; 56 338 | !BYTE 15, 15, 3, 13, 14, 14, 14, 14 ; 64 339 | !BYTE 14, 14, 14, 14, 14, 14, 14, 14 ; 72 340 | !BYTE 14, 14, 14, 14, 14, 14, 14, 14 ; 80 341 | !BYTE 14, 14, 15, 14, 14, 14, 14, 14 ; 88 342 | !BYTE 6, 6, 0, 0, 0, 0, 0, 0 ; 96 343 | !BYTE 15, 15, 15, 13, 14, 14, 14, 0 ;104 344 | !BYTE 15, 15, 14, 14, 14, 2, 14, 15 ;112 345 | !BYTE 15, 6, 6, 6, 6, 6, 6, 6 ;120 346 | !BYTE 15, 15, 0, 13, 15, 15, 0, 4 ;128 347 | !BYTE 15, 15, 14, 2, 0, 0, 0, 14 ;136 348 | !BYTE 15, 15, 15, 15, 10, 14, 10, 10 ;144 349 | !BYTE 15, 15, 6, 6, 0, 0, 6, 2 ;152 350 | !BYTE 6, 6, 6, 2, 0, 0, 15, 14 ;160 351 | !BYTE 14, 6, 15, 14, 15, 15, 15, 0 ;168 352 | !BYTE 15, 15, 15, 0, 15, 15, 15, 6 ;176 353 | !BYTE 1, 1, 1, 15, 1, 6, 6, 15 ;184 354 | !BYTE 1, 6, 6, 15, 14, 14, 4, 4 ;192 355 | !BYTE 14, 14, 14, 14, 2, 10, 10, 8 ;200 356 | !BYTE 4, 4, 4, 5, 14, 14, 1, 5 ;208 357 | !BYTE 15, 15, 15, 5, 15, 15, 15, 5 ;216 358 | !BYTE 15, 15, 15, 13, 4, 4, 13, 13 ;224 359 | !BYTE 4, 4, 13, 13, 1, 1, 0, 0 ;232 360 | !BYTE 0, 0, 14, 0, 0, 0, 0, 0 ;240 361 | !BYTE 0, 0, 0, 0, 0, 0, 0, 0 ;248 362 | 363 | MAP_VDC_MONO 364 | !BYTE 0, 0, 15, 15, 15, 15, 15, 15 ; 0 365 | !BYTE 15, 0, 15, 15, 15, 15, 0, 15 ; 8 366 | !BYTE 15, 15, 15, 15, 15, 15, 15, 14 ; 16 367 | !BYTE 14, 15, 15, 15, 15, 14, 0, 0 ; 24 368 | !BYTE 14, 14, 14, 14, 14, 14, 14, 14 ; 32 369 | !BYTE 14, 14, 14, 14, 14, 14, 14, 14 ; 40 370 | !BYTE 15, 15, 15, 14, 15, 14, 14, 14 ; 48 371 | !BYTE 15, 14, 14, 14, 14, 14, 14, 15 ; 56 372 | !BYTE 0, 0, 0, 15, 15, 0, 0, 15 ; 64 373 | !BYTE 14, 0, 0, 15, 15, 0, 0, 15 ; 72 374 | !BYTE 15, 14, 15, 14, 14, 14, 14, 14 ; 80 375 | !BYTE 14, 14, 15, 15, 15, 15, 15, 14 ; 88 376 | !BYTE 14, 14, 0, 0, 0, 0, 0, 0 ; 96 377 | !BYTE 15, 15, 15, 14, 14, 14, 14, 0 ;104 378 | !BYTE 15, 15, 15, 14, 0, 0, 15, 15 ;112 379 | !BYTE 15, 15, 0, 0, 0, 0, 0, 0 ;120 380 | !BYTE 15, 15, 14, 14, 14, 14, 14, 14 ;128 381 | !BYTE 14, 14, 14, 14, 14, 14, 14, 14 ;136 382 | !BYTE 15, 15, 14, 14, 14, 14, 14, 14 ;144 383 | !BYTE 14, 14, 14, 14, 14, 14, 14, 0 ;152 384 | !BYTE 14, 14, 14, 0, 14, 14, 15, 14 ;160 385 | !BYTE 0, 14, 15, 14, 14, 14, 15, 14 ;168 386 | !BYTE 15, 15, 15, 15, 15, 14, 14, 14 ;176 387 | !BYTE 15, 15, 15, 15, 15, 0, 15, 15 ;184 388 | !BYTE 15, 15, 15, 15, 14, 14, 14, 14 ;192 389 | !BYTE 14, 14, 14, 14, 14, 0, 14, 14 ;200 390 | !BYTE 0, 0, 0, 15, 15, 15, 14, 14 ;208 391 | !BYTE 15, 15, 15, 14, 15, 15, 15, 15 ;216 392 | !BYTE 15, 15, 15, 14, 0, 0, 14, 14 ;224 393 | !BYTE 0, 0, 14, 14, 14, 14, 0, 0 ;232 394 | !BYTE 0, 0, 15, 0, 0, 0, 0, 0 ;240 395 | !BYTE 0, 0, 0, 0, 0, 0, 0, 0 ;248 396 | 397 | VDC_MAP_UNIT_COLOR_EVEN 398 | !FILL VDC_MAP_MAX_UNITS, $F0 ; unit 0 (player) will alternate between B&W 399 | 400 | VDC_MAP_UNIT_COLOR_ODD 401 | !FILL VDC_MAP_MAX_UNITS, $0F ; unit 0 (player) will alternate between B&W 402 | 403 | VDC_MAP_ROW_OFF_LO: 404 | !BYTE $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80 405 | !BYTE $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80 406 | !BYTE $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80 407 | !BYTE $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80 408 | 409 | VDC_MAP_ROW_OFF_HI: 410 | !BYTE $00, $00, $01, $01, $02, $02, $03, $03, $04, $04, $05, $05, $06, $06, $07, $07 411 | !BYTE $08, $08, $09, $09, $0A, $0A, $0B, $0B, $0C, $0C, $0D, $0D, $0E, $0E, $0F, $0F 412 | !BYTE $10, $10, $11, $11, $12, $12, $13, $13, $14, $14, $15, $15, $16, $16, $17, $17 413 | !BYTE $18, $18, $19, $19, $1A, $1A, $1B, $1B, $1C, $1C, $1D, $1D, $1E, $1E, $1F, $1F 414 | 415 | -------------------------------------------------------------------------------- /const.inc: -------------------------------------------------------------------------------- 1 | VIC_CHARMAP = 0 2 | VIC_BITMAP = 1 3 | 4 | SHAREWARE = 0 5 | 6 | !IF SHAREWARE = 0 { 7 | MAP_COUNT = 15 8 | CONTROL_TYPES_COUNT = 3 9 | } 10 | 11 | !IF SHAREWARE = 1 { 12 | MAP_COUNT = 2 13 | CONTROL_TYPES_COUNT = 2 14 | } 15 | 16 | !ADDRESS { 17 | 18 | FAR_ADDR_COMMON0_LO = $000000 19 | FAR_ADDR_MISC = $000800 20 | FAR_ADDR_COMMON = $000B00 21 | FAR_ADDR_REFINED0 = $001000 22 | FAR_ADDR_GAME0 = $001300 23 | FAR_ADDR_BOOT = $001C01 24 | FAR_ADDR_GRAPHICS = $003600 25 | FAR_ADDR_LOADER = $008C00 26 | !IF VIC_CHARMAP { 27 | FAR_ADDR_SOUND = $00A000 28 | } 29 | !IF VIC_BITMAP { 30 | FAR_ADDR_SOUND = $009000 31 | FAR_ADDR_VIC0 = $00C000 32 | } 33 | FAR_ADDR_IO0 = $00D000 34 | FAR_ADDR_COMMON0_HI = $00FF00 35 | 36 | FAR_ADDR_COMMON1_LO = $010000 37 | FAR_ADDR_REFINED1 = $011000 38 | FAR_ADDR_GAME1 = $011000 39 | FAR_ADDR_DESTRUCTPATH = $019B00 40 | FAR_ADDR_TILEATTRIB = $019C00 41 | ;;; FAR_ADDR_TILECHAR = $018B00 42 | ;;; FAR_ADDR_TILECOLOR = $019400 43 | FAR_ADDR_MAPVARS = $019D00 44 | FAR_ADDR_MAPDATA = $01A000 45 | FAR_ADDR_VIC1 = $01C000 46 | FAR_ADDR_CHARSET = $01C000 47 | FAR_ADDR_BITMAP = $01C000 48 | FAR_ADDR_IO1 = $00D000 49 | FAR_ADDR_COLOR = $01D800 50 | FAR_ADDR_SCREEN = $01E000 51 | FAR_ADDR_SPRITE = $01E400 52 | FAR_ADDR_COMMON1_HI = $01FF00 53 | 54 | FAR_ADDR_TILE = FAR_ADDR_DESTRUCTPATH 55 | FAR_ADDR_MAP = FAR_ADDR_MAPVARS 56 | 57 | FAR_ADDR_INTRO = $002000 58 | FAR_ADDR_FACES = $012000 59 | 60 | ADDR_MISC = ($100*>FAR_ADDR_MISC)+(FAR_ADDR_COMMON)+(FAR_ADDR_BOOT)+(FAR_ADDR_GRAPHICS)+(FAR_ADDR_LOADER)+(FAR_ADDR_SOUND)+(FAR_ADDR_GAME0)+(FAR_ADDR_GAME1)+(FAR_ADDR_TILE)+(FAR_ADDR_DESTRUCTPATH)+(FAR_ADDR_TILEATTRIB)+(FAR_ADDR_TILECHAR)+(FAR_ADDR_TILECOLOR)+(FAR_ADDR_MAPVARS)+(FAR_ADDR_MAPDATA)+(FAR_ADDR_CHARSET)+(FAR_ADDR_SPRITE)+(FAR_ADDR_INTRO)+(FAR_ADDR_FACES)+(FAR_ADDR_SCREEN)+(FAR_ADDR_COLOR)+( ADDR_FACES+SIZE_FACES { 378 | !serious "FACES TOO BIG" 379 | } 380 | 381 | -------------------------------------------------------------------------------- /sprites.asm: -------------------------------------------------------------------------------- 1 | !TO "sprites-128", CBM 2 | !SYMBOLLIST "sprites.sym" 3 | 4 | !SOURCE "const.inc" 5 | 6 | * = ADDR_SPRITE 7 | 8 | SPRITE_DATA: 9 | 10 | ;;In-game cursor 11 | ; !BYTE %11111111,%11111111,%11111111 12 | ; !BYTE %11000000,%00000000,%00000011 13 | ; !BYTE %11000000,%00000000,%00000011 14 | ; !BYTE %11000000,%00000000,%00000011 15 | ; !BYTE %11000000,%00000000,%00000011 16 | ; !BYTE %11000000,%00000000,%00000011 17 | ; !BYTE %11000000,%00000000,%00000011 18 | ; !BYTE %11000000,%00000000,%00000011 19 | ; !BYTE %11000000,%00000000,%00000011 20 | ; !BYTE %11000000,%00000000,%00000011 21 | ; !BYTE %11000000,%00000000,%00000011 22 | ; !BYTE %11111111,%11111111,%11111111 23 | ; !BYTE %00000000,%00000000,%00000000 24 | ; !BYTE %00000000,%00000000,%00000000 25 | ; !BYTE %00000000,%00000000,%00000000 26 | ; !BYTE %00000000,%00000000,%00000000 27 | ; !BYTE %00000000,%00000000,%00000000 28 | ; !BYTE %00000000,%00000000,%00000000 29 | ; !BYTE %00000000,%00000000,%00000000 30 | ; !BYTE %00000000,%00000000,%00000000 31 | ; !BYTE %00000000,%00000000,%00000000 32 | ; !BYTE %00000000 ;Extra byte between sprites 33 | 34 | ; Magnifying glass 35 | 36 | !byte $00,$00,$00,$00,$00,$00,$03,$e0 37 | !byte $00,$0e,$38,$00,$18,$0c,$00,$18 38 | !byte $4c,$00,$30,$26,$00,$30,$26,$00 39 | !byte $30,$06,$00,$30,$06,$00,$18,$0c 40 | !byte $00,$18,$0c,$00,$0e,$3e,$00,$03 41 | !byte $e3,$00,$00,$01,$80,$00,$00,$c0 42 | !byte $00,$00,$60,$00,$00,$30,$00,$00 43 | !byte $18,$00,$00,$00,$00,$00,$00,$01 44 | 45 | ;Elevator cursor 46 | !BYTE %11111111,%11000000,%00000000 47 | !BYTE %10000000,%01000000,%00000000 48 | !BYTE %10000000,%01000000,%00000000 49 | !BYTE %10000000,%01000000,%00000000 50 | !BYTE %10000000,%01000000,%00000000 51 | !BYTE %10000000,%01000000,%00000000 52 | !BYTE %10000000,%01000000,%00000000 53 | !BYTE %10000000,%01000000,%00000000 54 | !BYTE %11111111,%11000000,%00000000 55 | !BYTE %00000000,%00000000,%00000000 56 | !BYTE %00000000,%00000000,%00000000 57 | !BYTE %00000000,%00000000,%00000000 58 | !BYTE %00000000,%00000000,%00000000 59 | !BYTE %00000000,%00000000,%00000000 60 | !BYTE %00000000,%00000000,%00000000 61 | !BYTE %00000000,%00000000,%00000000 62 | !BYTE %00000000,%00000000,%00000000 63 | !BYTE %00000000,%00000000,%00000000 64 | !BYTE %00000000,%00000000,%00000000 65 | !BYTE %00000000,%00000000,%00000000 66 | !BYTE %00000000,%00000000,%00000000 67 | !BYTE %00000000 ;Extra byte between sprites 68 | 69 | ; sprite 0 / multicolor / color: $00 70 | PISTOL_HORZ ; sprite_0 71 | !byte $00,$00,$00,$00,$00,$00,$00,$00 72 | !byte $00,$00,$00,$00,$00,$00,$00,$00 73 | !byte $00,$00,$00,$00,$00,$00,$00,$00 74 | !byte $00,$00,$00,$aa,$aa,$aa,$ff,$ff 75 | !byte $ff,$aa,$aa,$aa,$00,$00,$00,$00 76 | !byte $00,$00,$00,$00,$00,$00,$00,$00 77 | !byte $00,$00,$00,$00,$00,$00,$00,$00 78 | !byte $00,$00,$00,$00,$00,$00,$00,$80 79 | 80 | ; sprite 1 / multicolor / color: $00 81 | PISTOL_VERT ; sprite_1 82 | !byte $00,$b8,$00,$00,$b8,$00,$00,$b8 83 | !byte $00,$00,$b8,$00,$00,$b8,$00,$00 84 | !byte $b8,$00,$00,$b8,$00,$00,$b8,$00 85 | !byte $00,$b8,$00,$00,$b8,$00,$00,$b8 86 | !byte $00,$00,$b8,$00,$00,$b8,$00,$00 87 | !byte $b8,$00,$00,$b8,$00,$00,$b8,$00 88 | !byte $00,$b8,$00,$00,$b8,$00,$00,$b8 89 | !byte $00,$00,$b8,$00,$00,$b8,$00,$80 90 | 91 | ; sprite 2 / multicolor / color: $07 92 | PLASMA_LEFT ; sprite_2 93 | !byte $00,$00,$00,$00,$00,$00,$00,$00 94 | !byte $00,$00,$00,$00,$00,$00,$00,$00 95 | !byte $00,$00,$11,$10,$00,$66,$61,$00 96 | !byte $66,$66,$50,$77,$77,$65,$ff,$ff 97 | !byte $fe,$dd,$dd,$99,$99,$99,$44,$99 98 | !byte $94,$00,$44,$40,$00,$00,$00,$00 99 | !byte $00,$00,$00,$00,$00,$00,$00,$00 100 | !byte $00,$00,$00,$00,$00,$00,$00,$87 101 | 102 | ; sprite 3 / multicolor / color: $07 103 | PLASMA_RIGHT ; sprite_2 104 | !byte $00,$00,$00,$00,$00,$00,$00,$00 105 | !byte $00,$00,$00,$00,$00,$00,$00,$00 106 | !byte $00,$00,$00,$04,$44,$00,$49,$99 107 | !byte $05,$99,$99,$59,$dd,$dd,$bf,$ff 108 | !byte $ff,$66,$77,$77,$11,$66,$66,$00 109 | !byte $16,$66,$00,$01,$11,$00,$00,$00 110 | !byte $00,$00,$00,$00,$00,$00,$00,$00 111 | !byte $00,$00,$00,$00,$00,$00,$00,$87 112 | 113 | ; sprite 4 / multicolor / color: $07 114 | PLASMA_DOWN ; sprite_4 115 | !byte $00,$04,$00,$00,$19,$00,$00,$19 116 | !byte $00,$00,$6d,$00,$00,$1a,$40,$00 117 | !byte $6d,$00,$00,$1a,$40,$00,$6d,$00 118 | !byte $00,$1e,$40,$00,$6d,$00,$00,$1e 119 | !byte $40,$00,$6d,$00,$00,$5f,$90,$01 120 | !byte $bd,$40,$00,$5f,$90,$01,$bd,$40 121 | !byte $00,$5f,$90,$01,$bd,$40,$00,$5f 122 | !byte $90,$01,$bd,$40,$00,$5f,$90,$87 123 | 124 | ; sprite 5 / multicolor / color: $07 125 | PLASMA_UP ; sprite_4 126 | !byte $00,$5f,$90,$01,$bd,$40,$00,$5f 127 | !byte $90,$01,$bd,$40,$00,$5f,$90,$01 128 | !byte $bd,$40,$00,$5f,$90,$01,$bd,$40 129 | !byte $00,$5f,$90,$00,$6d,$00,$00,$1e 130 | !byte $40,$00,$6d,$00,$00,$1e,$40,$00 131 | !byte $6d,$00,$00,$1a,$40,$00,$6d,$00 132 | !byte $00,$1a,$40,$00,$6d,$00,$00,$19 133 | !byte $00,$00,$19,$00,$00,$04,$00,$87 134 | 135 | ; sprite 6 / multicolor / color: $0b 136 | BOMB ; sprite_6 137 | !byte $00,$00,$00,$00,$00,$00,$00,$0c 138 | !byte $c0,$00,$03,$00,$00,$0c,$c0,$00 139 | !byte $30,$00,$00,$30,$00,$00,$30,$00 140 | !byte $00,$14,$00,$00,$69,$00,$01,$ae 141 | !byte $40,$01,$ab,$40,$01,$aa,$40,$01 142 | !byte $aa,$40,$01,$aa,$40,$00,$69,$00 143 | !byte $00,$14,$00,$00,$00,$00,$00,$00 144 | !byte $00,$00,$00,$00,$00,$00,$00,$8b 145 | 146 | ; sprite 7 / multicolor / color: $02 147 | MAGNET ; sprite_7 148 | !byte $00,$00,$00,$00,$00,$00,$00,$00 149 | !byte $00,$00,$00,$00,$00,$00,$00,$00 150 | !byte $41,$00,$01,$d7,$40,$01,$d7,$40 151 | !byte $01,$96,$40,$01,$96,$40,$01,$96 152 | !byte $40,$01,$96,$40,$01,$96,$40,$01 153 | !byte $96,$40,$00,$69,$00,$00,$14,$00 154 | !byte $00,$00,$00,$00,$00,$00,$00,$00 155 | !byte $00,$00,$00,$00,$00,$00,$00,$82 156 | 157 | ; sprite 8 / multicolor / color: $07 158 | EXPLOSION_0 ; sprite_1 159 | !byte $00,$00,$00,$00,$00,$00,$00,$00 160 | !byte $00,$00,$00,$00,$00,$00,$00,$00 161 | !byte $00,$00,$00,$28,$00,$00,$aa,$00 162 | !byte $00,$be,$00,$00,$be,$00,$00,$be 163 | !byte $00,$00,$be,$00,$00,$aa,$00,$00 164 | !byte $28,$00,$00,$00,$00,$00,$00,$00 165 | !byte $00,$00,$00,$00,$00,$00,$00,$00 166 | !byte $00,$00,$00,$00,$00,$00,$00,$87 167 | 168 | ; sprite 9 / multicolor / color: $07 169 | EXPLOSION_1 ; sprite_2 170 | !byte $00,$00,$00,$00,$08,$00,$00,$00 171 | !byte $00,$20,$88,$20,$08,$80,$80,$08 172 | !byte $cb,$80,$02,$ff,$80,$03,$ef,$c0 173 | !byte $2b,$ee,$c0,$00,$eb,$00,$00,$ff 174 | !byte $28,$00,$ff,$c0,$2b,$ef,$c0,$03 175 | !byte $ef,$c0,$00,$f3,$80,$02,$23,$80 176 | !byte $08,$20,$20,$20,$20,$20,$00,$00 177 | !byte $00,$00,$00,$00,$00,$00,$00,$87 178 | 179 | ; sprite 10 / multicolor / color: $07 180 | EXPLOSION_2 ; sprite_3 181 | !byte $0a,$0a,$a0,$0a,$8b,$e0,$2b,$af 182 | !byte $e0,$ab,$ff,$e0,$ae,$aa,$e8,$ba 183 | !byte $02,$f8,$b8,$02,$b8,$b8,$20,$ba 184 | !byte $b8,$08,$be,$b8,$80,$ae,$b8,$08 185 | !byte $2e,$ae,$00,$be,$be,$28,$ba,$ae 186 | !byte $00,$b8,$ae,$80,$b8,$2e,$80,$b8 187 | !byte $2f,$a2,$b8,$2b,$ea,$f8,$0a,$ff 188 | !byte $e8,$02,$aa,$a0,$00,$0a,$00,$87 189 | 190 | ; sprite 11 / multicolor / color: $07 191 | EXPLOSION_3 ; sprite_4 192 | !byte $00,$08,$00,$00,$28,$00,$0a,$28 193 | !byte $00,$2a,$2c,$20,$2e,$28,$a8,$28 194 | !byte $08,$a8,$28,$00,$b8,$20,$00,$a8 195 | !byte $00,$00,$20,$00,$00,$00,$2a,$00 196 | !byte $00,$2e,$00,$20,$2a,$00,$28,$2a 197 | !byte $00,$ac,$28,$00,$a8,$08,$00,$28 198 | !byte $00,$20,$20,$02,$ba,$00,$02,$aa 199 | !byte $00,$00,$a0,$00,$00,$00,$00,$87 200 | 201 | ; sprite 12 / multicolor / color: $08 202 | EXPLOSION_4 ; sprite_4 203 | !byte $00,$08,$00,$00,$28,$00,$0a,$28 204 | !byte $00,$2a,$24,$20,$26,$28,$a8,$28 205 | !byte $08,$a8,$28,$00,$98,$20,$00,$a8 206 | !byte $00,$00,$20,$00,$00,$00,$2a,$00 207 | !byte $00,$26,$00,$20,$2a,$00,$28,$2a 208 | !byte $00,$a4,$28,$00,$a8,$08,$00,$28 209 | !byte $00,$20,$20,$02,$9a,$00,$02,$aa 210 | !byte $00,$00,$a0,$00,$00,$00,$00,$88 211 | 212 | ;Player Character Up - Anim 1 213 | ;---------------------- 214 | ; sprite 0 / singlecolor / color: $06 215 | !BYTE $00,$00,$00,$07,$c0,$00,$0e,$20 216 | !BYTE $00,$1f,$90,$00,$1f,$d0,$00,$1f 217 | !BYTE $f0,$00,$1f,$f0,$00,$0f,$e0,$00 218 | !BYTE $07,$80,$00,$03,$83,$00,$03,$c3 219 | !BYTE $80,$01,$e1,$c0,$00,$b1,$c0,$00 220 | !BYTE $1f,$e0,$00,$1e,$e0,$00,$0e,$70 221 | !BYTE $00,$07,$38,$00,$03,$98,$00,$01 222 | !BYTE $80,$00,$00,$00,$00,$00,$00,$06 223 | 224 | ; sprite 1 / singlecolor / color: $0e 225 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 226 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 227 | !BYTE $0c,$00,$00,$0e,$00,$00,$1f,$00 228 | !BYTE $00,$7f,$80,$00,$7c,$c0,$00,$3c 229 | !BYTE $60,$00,$1e,$30,$00,$4e,$00,$00 230 | !BYTE $60,$00,$00,$00,$18,$00,$01,$88 231 | !BYTE $00,$00,$80,$00,$00,$00,$00,$00 232 | !BYTE $00,$00,$00,$00,$00,$00,$00,$0e 233 | 234 | ; sprite 2 / singlecolor / color: $0a 235 | !BYTE $00,$00,$00,$00,$00,$00,$01,$c0 236 | !BYTE $00,$00,$60,$00,$00,$20,$00,$00 237 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 238 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 239 | !BYTE $00,$00,$00,$00,$00,$00,$18,$00 240 | !BYTE $00,$18,$00,$00,$08,$00,$00,$00 241 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 242 | !BYTE $00,$00,$00,$00,$00,$00,$00,$0a 243 | 244 | ;Player Character Up - Anim 2 245 | ;---------------------- 246 | ; sprite 0 / singlecolor / color: $06 247 | !BYTE $00,$00,$00,$07,$c0,$00,$0e,$20 248 | !BYTE $00,$1f,$90,$00,$1f,$d0,$00,$1f 249 | !BYTE $f0,$00,$1f,$f0,$00,$0f,$e0,$00 250 | !BYTE $0f,$87,$00,$07,$87,$80,$07,$c2 251 | !BYTE $00,$03,$c1,$00,$03,$e1,$00,$01 252 | !BYTE $f1,$80,$00,$3f,$c0,$00,$1f,$e0 253 | !BYTE $00,$07,$e0,$00,$00,$60,$00,$00 254 | !BYTE $30,$00,$00,$30,$00,$00,$00,$06 255 | 256 | ; sprite 1 / singlecolor / color: $0e 257 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 258 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 259 | !BYTE $08,$00,$00,$0e,$00,$00,$1f,$80 260 | !BYTE $00,$78,$80,$00,$78,$00,$00,$3c 261 | !BYTE $00,$00,$3e,$00,$00,$1e,$00,$00 262 | !BYTE $0e,$00,$01,$80,$00,$01,$80,$00 263 | !BYTE $00,$80,$10,$00,$00,$10,$00,$00 264 | !BYTE $00,$00,$00,$00,$00,$00,$00,$0e 265 | 266 | ; sprite 2 / singlecolor / color: $0a 267 | !BYTE $00,$00,$00,$00,$00,$00,$01,$c0 268 | !BYTE $00,$00,$60,$00,$00,$20,$00,$00 269 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 270 | !BYTE $00,$00,$60,$00,$00,$60,$00,$00 271 | !BYTE $20,$00,$00,$00,$00,$00,$00,$00 272 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 273 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 274 | !BYTE $00,$00,$00,$00,$00,$00,$00,$0a 275 | 276 | ;Player Character Down - Anim 1 277 | ;---------------------- 278 | ; sprite 0 / singlecolor / color: $06 279 | !BYTE $00,$00,$00,$0f,$80 280 | !BYTE $00,$1f,$c0,$00,$3f,$c0,$00,$3f 281 | !BYTE $c0,$00,$3f,$c0,$00,$2f,$40,$00 282 | !BYTE $10,$44,$00,$08,$86,$00,$07,$0e 283 | !BYTE $00,$07,$33,$00,$03,$81,$00,$03 284 | !BYTE $42,$80,$03,$24,$c0,$00,$1e,$e0 285 | !BYTE $00,$0f,$70,$00,$00,$38,$00,$00 286 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$06 287 | 288 | ; sprite 1 / singlecolor / color: $0e 289 | !BYTE $00,$00,$00,$00,$00 290 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 291 | !BYTE $38,$00,$00,$3e,$00,$00,$3f,$00 292 | !BYTE $00,$3b,$80,$00,$79,$c0,$00,$f0 293 | !BYTE $e0,$00,$cc,$40,$00,$7e,$00,$00 294 | !BYTE $3c,$00,$00,$98,$00,$01,$80,$00 295 | !BYTE $00,$80,$00,$00,$03,$00,$00,$03 296 | !BYTE $18,$00,$00,$18,$00,$00,$00,$00,$00,$00,$0e 297 | 298 | ; sprite 2 / singlecolor / color: $0a 299 | !BYTE $00,$00,$00,$00,$00 300 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 301 | !BYTE $00,$00,$00,$00,$00,$10,$80,$00 302 | !BYTE $0f,$80,$00,$07,$00,$00,$00,$00 303 | !BYTE $00,$00,$00,$30,$00,$00,$30,$00 304 | !BYTE $00,$10,$00,$00,$00,$00,$00,$00 305 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 306 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0a 307 | 308 | ;Player Character Down - Anim 2 309 | ;---------------------- 310 | ; sprite 0 / singlecolor / color: $06 311 | !BYTE $00,$00,$00,$0f,$80 312 | !BYTE $00,$1f,$c0,$00,$3f,$c0,$00,$3f 313 | !BYTE $c0,$00,$3f,$c0,$00,$2f,$40,$00 314 | !BYTE $10,$40,$00,$08,$80,$00,$0f,$10 315 | !BYTE $00,$06,$78,$00,$01,$0c,$00,$00 316 | !BYTE $84,$00,$00,$4e,$70,$00,$38,$60 317 | !BYTE $00,$38,$00,$00,$1c,$00,$00,$1e 318 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$06 319 | 320 | ; sprite 1 / singlecolor / color: $0e 321 | !BYTE $00,$00,$00,$00,$00 322 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 323 | !BYTE $20,$00,$00,$30,$00,$00,$38,$00 324 | !BYTE $00,$3c,$00,$00,$7c,$00,$00,$ee 325 | !BYTE $00,$01,$86,$00,$00,$f3,$00,$00 326 | !BYTE $7a,$00,$00,$30,$00,$00,$00,$10 327 | !BYTE $00,$00,$30,$00,$00,$00,$00,$00 328 | !BYTE $00,$00,$06,$00,$00,$06,$00,$00,$00,$00,$0e 329 | 330 | ; sprite 2 / singlecolor / color: $0a 331 | !BYTE $00,$00,$00,$00,$00 332 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 333 | !BYTE $00,$00,$00,$00,$00,$10,$80,$00 334 | !BYTE $0f,$80,$00,$07,$00,$00,$00,$00 335 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 336 | !BYTE $01,$80,$00,$01,$80,$00,$00,$80 337 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 338 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0a 339 | 340 | ;Player Character Left - Anim 1 341 | ;---------------------- 342 | ; sprite 0 / singlecolor / color: $06 343 | !BYTE $00,$00,$00,$07,$80,$00,$0f,$c0 344 | !BYTE $00,$1f,$e0,$00,$1f,$f0,$00,$17 345 | !BYTE $fc,$00,$17,$ee,$00,$13,$e6,$00 346 | !BYTE $09,$c2,$00,$07,$81,$00,$01,$00 347 | !BYTE $80,$01,$80,$c0,$00,$80,$c0,$00 348 | !BYTE $c1,$e0,$00,$7f,$60,$00,$3f,$80 349 | !BYTE $00,$11,$c0,$00,$00,$e0,$00,$00 350 | !BYTE $70,$00,$00,$30,$00,$00,$00,$06 351 | 352 | ; sprite 1 / singlecolor / color: $0e 353 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 354 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 355 | !BYTE $00,$00,$00,$10,$00,$00,$19,$00 356 | !BYTE $00,$3d,$00,$00,$7e,$00,$00,$ff 357 | !BYTE $00,$00,$7f,$00,$00,$7f,$00,$00 358 | !BYTE $3e,$00,$00,$00,$80,$00,$00,$00 359 | !BYTE $00,$0c,$00,$00,$0e,$00,$00,$00 360 | !BYTE $80,$00,$00,$c0,$00,$00,$00,$0e 361 | 362 | ; sprite 2 / singlecolor / color: $0a 363 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 364 | !BYTE $00,$00,$00,$00,$00,$00,$00,$08 365 | !BYTE $00,$00,$08,$00,$00,$0c,$00,$00 366 | !BYTE $06,$00,$80,$00,$00,$c0,$00,$00 367 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 368 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 369 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 370 | !BYTE $00,$00,$00,$00,$00,$00,$00,$0a 371 | 372 | ;Player Character Left - Anim 2 373 | ;---------------------- 374 | ; sprite 0 / singlecolor / color: $06 375 | !BYTE $00,$00,$00,$07,$80,$00,$0f,$c0 376 | !BYTE $00,$1f,$e0,$00,$1f,$f8,$00,$17 377 | !BYTE $fc,$00,$17,$ee,$00,$13,$e2,$00 378 | !BYTE $09,$c1,$00,$07,$80,$80,$00,$cc 379 | !BYTE $c0,$00,$66,$e0,$00,$73,$f8,$00 380 | !BYTE $3f,$38,$00,$38,$00,$00,$38,$00 381 | !BYTE $00,$0e,$00,$00,$06,$00,$00,$00 382 | !BYTE $00,$00,$00,$00,$00,$00,$00,$06 383 | 384 | ; sprite 1 / singlecolor / color: $0e 385 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 386 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 387 | !BYTE $00,$00,$00,$10,$00,$00,$1c,$00 388 | !BYTE $00,$3e,$00,$00,$7f,$00,$00,$33 389 | !BYTE $00,$00,$19,$00,$00,$0c,$00,$00 390 | !BYTE $00,$40,$00,$06,$00,$00,$07,$00 391 | !BYTE $00,$10,$00,$00,$18,$00,$00,$00 392 | !BYTE $00,$00,$00,$00,$00,$00,$00,$0e 393 | 394 | ; sprite 2 / singlecolor / color: $0a 395 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 396 | !BYTE $00,$00,$00,$00,$00,$00,$00,$08 397 | !BYTE $00,$00,$08,$00,$00,$0c,$00,$00 398 | !BYTE $06,$00,$00,$00,$00,$00,$00,$00 399 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 400 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 401 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 402 | !BYTE $00,$00,$00,$00,$00,$00,$00,$0a 403 | 404 | ;Player Character Right - Anim 1 405 | ;---------------------- 406 | ; sprite 0 / singlecolor / color: $06 407 | !BYTE $00,$00,$00,$07,$80,$00,$0f,$c0 408 | !BYTE $00,$1f,$a0,$00,$1f,$90,$00,$1f 409 | !BYTE $90,$00,$1f,$90,$00,$0f,$24,$00 410 | !BYTE $07,$c6,$00,$03,$85,$00,$03,$80 411 | !BYTE $80,$03,$c0,$c0,$01,$f1,$c0,$01 412 | !BYTE $fb,$40,$00,$ef,$80,$00,$73,$c0 413 | !BYTE $00,$38,$e0,$00,$10,$60,$00,$00 414 | !BYTE $20,$00,$00,$00,$00,$00,$00,$06 415 | 416 | ; sprite 1 / singlecolor / color: $0e 417 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 418 | !BYTE $00,$00,$00,$00,$00,$08,$00,$00 419 | !BYTE $0f,$00,$00,$0e,$00,$00,$18,$00 420 | !BYTE $00,$38,$00,$00,$7a,$00,$00,$7f 421 | !BYTE $00,$00,$3f,$00,$00,$0e,$30,$00 422 | !BYTE $04,$30,$00,$00,$00,$00,$00,$00 423 | !BYTE $00,$00,$00,$00,$0c,$18,$00,$0e 424 | !BYTE $18,$00,$00,$00,$00,$00,$00,$0e 425 | 426 | ; sprite 2 / singlecolor / color: $0a 427 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 428 | !BYTE $00,$00,$40,$00,$00,$60,$00,$00 429 | !BYTE $60,$00,$00,$61,$80,$00,$c1,$c0 430 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 431 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 432 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 433 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 434 | !BYTE $00,$00,$00,$00,$00,$00,$00,$0a 435 | 436 | ;Player Character Right - Anim 2 437 | ;---------------------- 438 | ; sprite 0 / singlecolor / color: $06 439 | !BYTE $00,$00,$00,$07,$80,$00,$0f,$c0 440 | !BYTE $00,$1f,$a0,$00,$1f,$90,$00,$1f 441 | !BYTE $90,$00,$1f,$94,$00,$0f,$26,$00 442 | !BYTE $07,$c1,$00,$03,$c0,$c0,$01,$e0 443 | !BYTE $f0,$00,$f9,$f0,$00,$7f,$10,$00 444 | !BYTE $3f,$00,$00,$0c,$00,$00,$00,$00 445 | !BYTE $00,$01,$80,$00,$01,$00,$00,$00 446 | !BYTE $00,$00,$00,$00,$00,$00,$00,$06 447 | 448 | ; sprite 1 / singlecolor / color: $0e 449 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 450 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 451 | !BYTE $08,$00,$00,$08,$00,$00,$18,$00 452 | !BYTE $00,$3e,$00,$00,$3f,$00,$00,$1f 453 | !BYTE $00,$00,$06,$0c,$00,$00,$0c,$00 454 | !BYTE $00,$00,$00,$03,$00,$00,$03,$80 455 | !BYTE $00,$00,$40,$00,$00,$c0,$00,$00 456 | !BYTE $00,$00,$00,$00,$00,$00,$00,$0e 457 | 458 | ; sprite 2 / singlecolor / color: $0f 459 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 460 | !BYTE $00,$00,$40,$00,$00,$60,$00,$00 461 | !BYTE $60,$00,$00,$60,$00,$00,$c0,$00 462 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 463 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 464 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 465 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 466 | !BYTE $00,$00,$00,$00,$00,$00,$00,$0f 467 | 468 | ;Player Character Dead 469 | ;---------------------- 470 | ; sprite 0 / singlecolor / color: $06 471 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 472 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 473 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 474 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 475 | !BYTE $00,$0f,$00,$00,$18,$c0,$70,$30 476 | !BYTE $40,$38,$38,$40,$60,$3e,$61,$e0 477 | !BYTE $3f,$ff,$f0,$1f,$f8,$38,$0f,$3c 478 | !BYTE $0c,$00,$0c,$00,$00,$00,$00,$06 479 | 480 | ; sprite 1 / singlecolor / color: $0e 481 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 482 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 483 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 484 | !BYTE $00,$00,$00,$00,$00,$00,$00,$0c 485 | !BYTE $00,$00,$3c,$0c,$00,$3f,$8c,$00 486 | !BYTE $3f,$c4,$00,$3f,$80,$00,$1e,$00 487 | !BYTE $00,$00,$06,$00,$00,$06,$00,$03 488 | !BYTE $80,$00,$03,$00,$00,$00,$00,$0e 489 | 490 | ; sprite 2 / singlecolor / color: $0a 491 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 492 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 493 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 494 | !BYTE $00,$00,$00,$00,$00,$00,$00,$03 495 | !BYTE $80,$00,$03,$00,$07,$00,$00,$0f 496 | !BYTE $80,$00,$07,$80,$00,$01,$80,$00 497 | !BYTE $00,$00,$00,$00,$00,$00,$00,$00 498 | !BYTE $00,$00,$00,$00,$00,$00,$00,$0a 499 | 500 | ; empty sprite 501 | !FILL 64, 0 502 | 503 | ; Solid Hand 504 | 505 | !byte $00,$30,$00,$01,$b6,$00,$01,$b6 506 | !byte $00,$01,$b6,$c0,$01,$b6,$c0,$01 507 | !byte $b6,$c0,$01,$b6,$c0,$01,$b6,$c0 508 | !byte $0d,$b6,$c0,$0d,$fe,$c0,$0d,$ff 509 | !byte $c0,$0d,$ff,$c0,$0f,$ff,$80,$07 510 | !byte $ff,$80,$07,$ff,$80,$07,$ff,$00 511 | !byte $03,$ff,$00,$01,$fe,$00,$00,$fe 512 | !byte $00,$00,$fe,$00,$00,$00,$00,$01 513 | 514 | ; hand outline 515 | 516 | !byte $00,$30,$00,$00,$4e,$00,$01,$c9 517 | !byte $00,$02,$49,$c0,$02,$49,$20,$02 518 | !byte $49,$20,$02,$49,$20,$02,$49,$20 519 | !byte $0e,$49,$20,$12,$49,$20,$12,$01 520 | !byte $20,$12,$00,$20,$12,$00,$20,$10 521 | !byte $00,$40,$18,$00,$40,$08,$00,$40 522 | !byte $08,$00,$80,$04,$00,$80,$02,$01 523 | !byte $00,$01,$01,$00,$01,$ff,$00,$01 524 | 525 | ; arrows 526 | 527 | !byte $00,$18,$00,$00,$3c,$00,$00,$7e 528 | !byte $00,$00,$18,$00,$00,$18,$00,$00 529 | !byte $18,$00,$00,$18,$00,$00,$00,$00 530 | !byte $20,$00,$04,$60,$00,$06,$fe,$00 531 | !byte $7f,$60,$00,$06,$20,$00,$04,$00 532 | !byte $00,$00,$00,$18,$00,$00,$18,$00 533 | !byte $00,$18,$00,$00,$18,$00,$00,$7e 534 | !byte $00,$00,$3c,$00,$00,$18,$00,$01 535 | 536 | !if * > ADDR_SPRITE+SIZE_SPRITE { 537 | !serious "SPRITE TOO BIG" 538 | } 539 | 540 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------