diff --git a/loderunner/LR.CODE.S b/loderunner/LR.CODE.S new file mode 100644 index 0000000..af78859 --- /dev/null +++ b/loderunner/LR.CODE.S @@ -0,0 +1,6163 @@ +* +* Lode Runner +* (c) 1983, Broderbund Software +* (s) 2014, Brutal Deluxe Software +* + + mx %11 + org $0 + lst off + + ds $800 + +* 0 vide +* 1 mur +* 2 mur dur +* 3 chelle visible +* 4 liane +* 5 trappe +* 6 chelle invisible +* 7 trsor +* 8 ennemi +* 9 hros + +* Sprite quand heros ennemi tombe dans un trou : +* - venant de gauche : 20 53 (35h) +* - venant de droite : 19 54 (36h) +* +*----------------------------------- +* EQUATES +*----------------------------------- + +lvlWIDTH = 28 ; $1c +lvlHEIGHT = 16 ; $10 + +sprWIDTH = 10 +sprHEIGHT = 11 + +nbLIVES = 5 +maxLEVEL = 150 +maxHEIGHT = 192 ; lines + +modeEDIT = 0 ; to decode level +modeGAME = 1 + +sprEMPTY = 0 +sprWALL = 1 +sprWALLI = 2 ; mur indestructible +sprLADDER = 3 +sprBAR = 4 +sprTRAP = 5 +sprLADDERI = 6 +sprCHEST = 7 +sprFOE = 8 +sprHERO = 9 +sprCURSOR = 10 +spr0 = $3b ; until $44 +sprA = $45 ; until $5e >.()/-< (latest sprite is $65) + +minJOY = $12 ; joystick min/center/max values +ctrJOY = $2e +maxJOY = $3b + +*--- The big zero page usage + +boardX = $00 +boardY = $01 +heroSTEPX = $02 +heroSTEPY = $03 +heroINDEX = $04 +fgLEFTRIGHT = $05 +ptrBOARD = $06 ; $06..$07: pointer to board +ptrBBACK = $08 ; $08..$09: pointer to back board +ptrDATA = $0a ; $0a..$0b: pointer to data (HGR or other) +ptrHGR1 = $0c ; $0c..$0d +ptrHGR2 = $0e ; $0e..$0f +ptrSTRSND = $10 ; $10..$11: pointer to some table (string, sound) +foeX = $12 +foeY = $13 +foeINDEX = $14 +foeLEFTRIGHT = $15 +foeACTION = $16 +foeSTEPX = $17 ; coordinate +foeSTEPY = $18 ; coordinate +idxFOE = $19 ; current foe index +fgODDEVEN = $1a +theYSCREEN = $1b +theXSCREEN = $1c +nbLINES = $1d +theA = $1e +hgrPAGE = $1f +CH = $24 ; ** +CV = $25 ; ** +CSWL = $36 ; ** +CSWH = $37 ; ** +KSWL = $38 ; ** +KSWH = $39 ; ** +theMASK1 = $50 +theMASK2 = $51 +fgCOLLISION = $52 +tempX6 = $53 +idxNOTE = $54 +tempX4 = $55 +tempY1 = $56 +tempX5 = $57 +tempX3 = $5a +tempX2 = $5b +temp1 = $5c +tempX = $5d +tempY = $5e +theJOYX = $65 +theJOYY = $66 +sprTABLE = $71 +theX = $85 +theY = $86 +activePAGE = $87 +tempINDEX = $88 +theCENTAINE = $89 +theDIZAINE = $8a ; 8a +theUNITE = $8b ; 8b +theSPEED = $8c ; 8c +nbFOE = $8d ; 8d +theSCORE = $8e ; 8e..8f.90..91 +idxLVLDISK = $92 ; index in level buffer from disk +nbCHEST = $93 ; 93 +fgCHEST = $94 ; 94 1: not a chest, 0: a chest +fgINPUT = $95 ; "J"oystick, "K"eyboard +intLEVEL = $96 ; 96 theLEVEL-1 +theMEN = $98 ; 5 bonshommes pour dmarrer +fgSOUND = $99 ; 0: no sound, -1: sound on +fgPLAY = $9a ; 1: alive, 0: dead +fgHEROFELL = $9b ; 0: hero fell into a hole, $20: tempo for game speed +fgHOLE = $9c ; -1: left hole, 0: none, 1: right hole +fgGOODSTART = $9d ; 1: start from level 0 / allow score update, 0: not true +theKEY1 = $9e +theKEY2 = $9f +idxDIG = $a0 ; dig index in sprite list +counter = $a1 ; a simple counter +fgLVLMODE = $a2 ; 0: edit, <>0: game +idxLADDERI = $a3 +fgSPEED = $a4 ; speed of the game +fgCIRCLE = $a5 ; 0: show level, 1: hide level +theLEVEL = $a6 ; current level +fgDEMO = $a7 ; 1: in demo mode +ptrDEMO = $a8 ; $a8..$a9 - pointer to demo data +demoKEY = $aa ; the demo key actions +demoREPEAT = $ab ; the demo repeat factor +fgKEYBTN0 = $ac ; 1: no key/btn0 pressed, 0: key/btn0 pressed +fgCHANGE = $ad ; 1: no change, 0: change +sprDATA = $df ; $df..$ff + + +chrLA = $88 +chrRET = $8d +chrRA = $95 +chrESC = $9b +chrSPC = " " +chrZERO = "0" +chrNINE = "9" +chrDOT = "." +chrA = "A" +chrI = "I" +chrJ = "J" +chrK = "K" +chrL = "L" +chrN = "N" +chrO = "O" +chrU = "U" +chrY = "Y" +chrZ = "Z" + +*----------------------------------- +* SOFTSWITCHES +*----------------------------------- + +KBD EQU $C000 +KBDSTROBE EQU $C010 +SPKR EQU $C030 +TXTCLR EQU $C050 +MIXCLR EQU $C052 +TXTPAGE1 EQU $C054 +TXTPAGE2 EQU $C055 +HIRES EQU $C057 +BUTN0 EQU $C061 +BUTN1 EQU $C062 +PADDL0 EQU $C064 +PADDL1 EQU $C065 +PTRIG EQU $C070 +SETKBD EQU $FE89 + +*----------------------------------- +* DONNEES +*----------------------------------- + + put LR.Data + +*----------------------------------- +* PAGES GRAPHIQUES +*----------------------------------- + +HGR1 ds 8192 +HGR2 ds 8192 +HGR3 = * + +*----------------------------------- +* ENTRY POINT +*----------------------------------- + +L6000 JSR checkJOYSTICK + + LDA #$01 ; read score table + JSR readSCORE + +*--- Show title page +* Data from $0F00 to $1A84 + +showTITLEPAGE + JSR clearHGR1 ; display the compressed title page + LDA #logo-1 + STA L6030+2 + LDY #$00 + STY theY + STY fgDEMO + STY intLEVEL + LDA #>HGR1 + STA hgrPAGE + STA activePAGE +L6023 JSR setHGRPOINTER + LDY #$00 +L6028 INC L6030+1 + BNE L6030 + INC L6030+2 +L6030 LDA L6028 + BEQ L603F + BPL L603C + STA (ptrHGR1),Y + INY + BPL L6028 +L603C TAY + BPL L6028 +L603F INC theY + LDY theY + CPY #maxHEIGHT ; until line 192 + BCC L6023 + STA TXTPAGE1 + STA HIRES + STA MIXCLR + STA TXTCLR + JMP L618E + +*--- + +L6056 LDA #$00 + STA theSCORE + STA theSCORE+1 + STA theSCORE+2 + STA theSCORE+3 + STA $97 ; l'intelligence des ennemis peut-tre ? + STA fgCIRCLE + STA tempX6 + STA demoREPEAT + STA ptrDEMO ; demo actions + LDA #>demoDATA + STA ptrDEMO+1 + LDA #nbLIVES ; 5 men to start with + STA theMEN + LDA fgDEMO + LSR + BEQ L6099 + LDA #$01 + JSR readSCORE ; load score + CMP #$00 + BNE L6086 + JSR tellNODATADISK + JMP showTITLEPAGE ; start again + +L6086 LDA scorebuf+$FF + BNE L6091 + LDA CSWL ; this code is useless + LDX CSWH ; if no copy protection remains + BNE L6095 +L6091 LDA KSWL + LDX KSWH +L6095 STA CH + STX CV +L6099 JSR clearHGRPAGES ; clear HGR pages and draw board + STA TXTPAGE1 +L609F LDX #modeGAME + JSR prepareLEVEL + LDA #$00 + STA theKEY1 + STA theKEY2 + LDA fgDEMO ; are we in demo mode? + LSR + BEQ L60BF ; yes + JSR waitKEYUP + LDA boardX + STA theX + LDA boardY + STA theY + LDA #sprHERO + JSR blinkSPRITE +L60BF LDX #$00 + STX fgHOLE + STX idxNOTE + LDA $97 + CLC + ADC nbFOE + TAY + LDX L6214,Y + LDA L6CA7,X + STA $60 + LDA L6CA7+1,X + STA $61 + LDA L6CA7+2,X + STA $62 + LDY $97 + LDA L621D,Y + STA $5F + +L60E4 JSR handleHERO + LDA fgPLAY ; are we dead? + BEQ L613F ; yes + JSR playMELODY + LDA nbCHEST ; remaining chests? + BNE L60F5 ; yes + JSR showINVISIBLELADDERS + +L60F5 LDA boardY ; are we on top row + BNE L6107 + LDA heroSTEPY ; are we going up? + CMP #$02 + BNE L6107 + LDA nbCHEST ; are there chests left? + BEQ L611A ; no + CMP #$FF + BEQ L611A ; no, we won + +L6107 JSR checkHOLE ; are there holes active? + LDA fgPLAY ; are we dead? + BEQ L613F ; yes + JSR playMELODY + JSR handleFOE ; handle the foes + LDA fgPLAY ; am I dead? + BEQ L613F ; yes... + BNE L60E4 ; no, loop + +L611A INC theLEVEL ; next level, no chests left + INC intLEVEL + INC theMEN ; man++ + BNE L6124 + DEC theMEN ; man-- +L6124 LDX #$0F + STX temp1 +L6128 LDY #$01 ; ajoute 15 x 100 points + LDA #$00 + JSR printSCORE + JSR scoreSOUND + JSR scoreSOUND + JSR scoreSOUND + DEC temp1 + BNE L6128 +L613C JMP L609F + +L613F DEC theMEN ; man-- + JSR printMEN + JSR prepareMELODY + HEX 02400240035003500460046005700570 + HEX 068006800790079008A008A009B009B0 + HEX 0AC00AC00BD00BD00CE00CE00DF00DF0 + HEX 00 + +L6178 JSR playMELODY + BCS L6178 + LDA fgDEMO + LSR + BEQ L61D0 + LDA theMEN ; man + BNE L613C + JSR checkHIGHSCORE + JSR animGAMEOVER ; we are dead, anim GAME OVER + BCS L61F6 + +L618E JSR waitKEYUP + LDX #$FF + LDY #$FF + LDA #$03 + STA theY +L6199 LDA fgINPUT + CMP #chrK + BEQ L61A9 + LDA BUTN1 + BMI L6201 + LDA BUTN0 + BMI L6201 +L61A9 LDA KBD + BMI L61F6 + DEX + BNE L6199 + DEY + BNE L6199 + DEC theY + BNE L6199 + LDA fgDEMO + BNE L61DE + LDX #$01 + STX fgDEMO + STX theLEVEL + STX fgKEYBTN0 + STX fgGOODSTART + LDX fgSOUND + STX L61D0+1 + STA fgSOUND + JMP L6056 + +L61D0 LDA #$00 + STA fgSOUND + LDA KBD + LDX fgKEYBTN0 + BEQ L61F6 + JMP L618E + +L61DE CMP #$01 + BNE L61F3 + BEQ L61E9 +L61E4 LDA #$01 + JSR readSCORE +L61E9 JSR showALLSCORES + LDA #$02 + STA fgDEMO + JMP L618E +L61F3 JMP showTITLEPAGE + +L61F6 STA KBDSTROBE + CMP #$85 ; Ctrl-E - Editor + BEQ L6211 + CMP #chrRET ; Return + BEQ L61E4 + +L6201 LDX #$00 + STX intLEVEL + INX + STX theLEVEL + STX fgGOODSTART + LDA #$02 + STA fgDEMO + JMP L6056 + +L6211 JMP enterEDITOR ; Jump to the Editor + +L6214 HEX 000306090C0F121518 ; 0..3..6..9..12..15..18..21..24 (index in 6CA7) +L621D HEX 26262E4447494A4B4C4D4E4F50 + +scoreSOUND LDA temp1 ; son pour le score + ASL + ASL + ASL + ASL + LDX #$06 + JSR getNOTE + JMP playMELODY + +*----------------------------------- +* PREPARE LEVEL +*----------------------------------- + +prepareLEVEL + STX fgLVLMODE ; 0: edit, <>0: game + LDX #$FF + STX boardX + INX + STX idxLADDERI ; index in table of for hidden ladder + STX nbCHEST + STX nbFOE + STX idxFOE + STX idxDIG + STX idxLVLDISK + STX fgODDEVEN + STX theY + TXA + + LDX #sizeHOLE-2 +L6252 STA tblHOLET,X + DEX + BPL L6252 + LDX #sizeFOE-3 +L625A STA tblFOETEMPO,X + DEX + BPL L625A + + LDA #$01 + STA fgPLAY + JSR diskLEVEL + + LDY theY +L6269 LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + + LDA #$00 ; vrifie le contenu + STA theX ; du niveau +L627E LDA fgODDEVEN ; que des valeurs 0-9 + LSR + LDY idxLVLDISK + LDA levelDISK,Y + BCS L628C + AND #$0F + BPL L6292 +L628C LSR + LSR + LSR + LSR + INC idxLVLDISK +L6292 INC fgODDEVEN + LDY theX + CMP #sprHERO+1 + BCC L629C + LDA #sprEMPTY +L629C STA (ptrBOARD),Y + STA (ptrBBACK),Y + INC theX + LDA theX + CMP #lvlWIDTH + BCC L627E + INC theY + LDY theY + CPY #lvlHEIGHT + BCC L6269 + + JSR decodeLEVEL + BCC L62C3 + LDA intLEVEL + BEQ L62C4 + LDX #$00 + STX intLEVEL + INC $97 + DEX ; mode game + JMP prepareLEVEL +L62C3 RTS + +L62C4 JMP showTITLEPAGE + +*----------------------------------- +* ENCODE A LEVEL BEFORE SAVING IT +*----------------------------------- + +encodeLEVEL + LDA #$00 + STA idxLVLDISK + STA fgODDEVEN + STA theY +L62CF LDY theY + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY #$00 + STY theX +L62DF LDA fgODDEVEN + LSR + LDA (ptrBOARD),Y + BCS L62EA + STA theA + BPL L62F7 +L62EA ASL + ASL + ASL + ASL + ORA theA + LDY idxLVLDISK + STA levelDISK,Y + INC idxLVLDISK +L62F7 INC fgODDEVEN + INC theX + LDY theX + CPY #lvlWIDTH + BCC L62DF + INC theY + LDA theY + CMP #lvlHEIGHT + BCC L62CF + LDA #$02 ; write level + JMP diskLEVEL + +*----------------------------------- +* LOAD/SAVE LEVEL FROM/TO DISK +*----------------------------------- + +diskLEVEL STA LB7F4 + LDA fgDEMO ; are we in demo mode? + LSR + BEQ diskDEMO ; yes + + LDA intLEVEL ; no, use internal level + LSR + LSR + LSR + LSR + CLC + ADC #$03 + STA LB7EC ; track + LDA intLEVEL + AND #$0F + STA LB7ED ; sector + + LDA #levelDISK + STA LB7F0+1 + LDA #$00 + STA LB7EB + +diskRWTS LDY #LB7E8 + jsr callRWTS ; LoGo - JSR $0023 - Souvenir from protection + BCC L6344 + JMP showTITLEPAGE +L6344 RTS + +diskDEMO LDA theLEVEL ; demo mode uses levels in RAM + CLC + ADC #>L9E00 + STA ptrHGR1+1 + LDY #scorebuf + STA LB7F0+1 + LDA #$00 + STA LB7EB + LDY #LB7E8 + JSR callRWTS + BCC L6381 + JMP showTITLEPAGE + +*--- Check disk (not a LR disk, data disk, master disk) + +L6381 LDY #$0A ; check magic number + LDA #$00 + STA theMASK1 +L6387 LDA scorebuf+$F4,Y ; magic key + EOR L63A8,Y + ORA theMASK1 + STA theMASK1 + DEY + BPL L6387 + LDA theMASK1 + BEQ L639B + LDA #$00 ; 0 means not a LR disk + RTS + +L639B LDA #$01 ; master disk + LDX scorebuf+$FF + BNE L63A4 + LDA #$FF ; FF means master disk +L63A4 RTS + +callRWTS JMP $bd00 ; LoGo - ($0036) to be replaced with JMP $BD00 + +L63A8 ASC "LODE RUNNER" + +*----------------------------------- +* DECODE A LEVEL +*----------------------------------- + +decodeLEVEL LDY #lvlHEIGHT-1 + STY theY +L63B7 LDA tblBOARDALLL,Y ; $0800 + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y ; $0a00 + STA ptrBBACK+1 + LDY #lvlWIDTH-1 + STY theX +L63CC LDA (ptrBOARD),Y + LDX fgLVLMODE ; mode edit? + BEQ L63EE ; yes + CMP #sprLADDERI + BNE L63F0 + LDX idxLADDERI + CPX #sizeLI-3 + BCS L63E8 + INC idxLADDERI + INX + LDA theY + STA tblLADDERIY,X + TYA + STA tblLADDERIX,X +L63E8 LDA #sprEMPTY ; hide it + STA (ptrBOARD),Y + STA (ptrBBACK),Y + +L63EE BEQ L6450 ; mode edit + +L63F0 CMP #sprCHEST + BNE L63F8 + INC nbCHEST + BNE L6450 +L63F8 CMP #sprFOE + BNE L642A + + LDX nbFOE ; nbFOE + CPX #sizeFOE-3 ; max + BCS L63E8 + INC nbFOE + INX + TYA + STA tblFOEX,X + LDA theY + STA tblFOEY,X + LDA #$00 + STA tblFOEACTION,X + STA tblFOEINDEX,X + LDA #$02 + STA tblFOESTEPX,X ; x-step movement + STA tblFOESTEPY,X ; y-step movement + LDA #sprEMPTY + STA (ptrBBACK),Y + LDA #sprFOE ; output a foe + BNE L6450 + +L6426 BPL L63B7 +L6428 BPL L63CC + +L642A CMP #sprHERO ; if the hero + BNE L644A + + LDX boardX ; -1 on entry + BPL L63E8 ; we'll never return + STY boardX ; save a positive value + LDX theY + STX boardY + LDX #$02 + STX heroSTEPX ; x-step movement + STX heroSTEPY ; y-step movement + LDX #$08 + STX heroINDEX ; index in sprite table + LDA #sprEMPTY ; blank in background + STA (ptrBBACK),Y + LDA #sprHERO + BNE L6450 + +L644A CMP #sprTRAP ; if a trap + BNE L6450 + LDA #sprWALL ; output a wall + +L6450 JSR coutHGR2 ; put the char in background + + DEC theX ; x-- + LDY theX + BPL L6428 + DEC theY ; y-- + LDY theY + BPL L6426 + LDA fgLVLMODE ; mode edit? + BEQ L6469 ; yes + LDA boardX ; we met the hero + BPL L648B ; continue to the animation + SEC ; not ok + RTS + +*--- Level is decode for the edit mode + +L6469 LDA #>HGR1 ; copy HGR1 > HGR2 + STA ptrHGR2+1 + LDA #>HGR2 + STA ptrHGR1+1 + LDA #$00 + STA ptrHGR2 + STA ptrHGR1 + TAY +L6478 LDA (ptrHGR1),Y + STA (ptrHGR2),Y + INY + BNE L6478 + INC ptrHGR2+1 + INC ptrHGR1+1 + LDX ptrHGR1+1 + CPX #>HGR3 ; >HGR2+$20 BUG + BCC L6478 + CLC ; oookkkkk + RTS + +*--- Level is decoded for the game mode + +L648B JSR circleANIMATION + + LDY #lvlHEIGHT-1 ; clear HGR2 background + STY theY ; for hero and foes +L6492 LDA tblBOARDALLL,Y ; the background contains all other sprites + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY #lvlWIDTH-1 + STY theX +L64A0 LDA (ptrBOARD),Y + CMP #sprHERO + BEQ L64AA + CMP #sprFOE + BNE L64AF +L64AA LDA #sprEMPTY + JSR coutHGR2 +L64AF DEC theX + LDY theX + BPL L64A0 + DEC theY + LDY theY + BPL L6492 + CLC ; and say OOOKKKKKK + RTS + +*----------------------------------- +* +*----------------------------------- + +handleHERO LDA #$01 + STA fgCHEST + LDA fgHOLE + BEQ L64CD + BPL L64CA + JMP L67E7 +L64CA JMP L68AD + +L64CD LDY boardY + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY boardX + LDA (ptrBBACK),Y + CMP #sprLADDER + BEQ L6522 + CMP #sprBAR + BNE L64EB + LDA heroSTEPY + CMP #$02 + BEQ L6522 +L64EB LDA heroSTEPY + CMP #$02 + BCC L6525 + LDY boardY + CPY #lvlHEIGHT-1 + BEQ L6522 + LDA tblBOARDALLL+1,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH+1,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY boardX + LDA (ptrBOARD),Y + CMP #sprEMPTY + BEQ L6525 + CMP #sprFOE + BEQ L6522 + LDA (ptrBBACK),Y + CMP #sprWALL + BEQ L6522 + CMP #sprWALLI + BEQ L6522 + CMP #sprLADDER + BNE L6525 +L6522 JMP L6584 + +L6525 LDA #$00 ; hero fell in a hole, tell the program + STA fgHEROFELL ; to change speed + JSR calcSPRITEXY + JSR drawSPRITEXY + LDA #$07 ; index in sprite table: fall in a left hole + LDX fgLEFTRIGHT + BMI L6537 + LDA #$0F ; fall in a right hole +L6537 STA heroINDEX + JSR heroNEXTSTEPX + INC heroSTEPY + LDA heroSTEPY + CMP #$05 + BCS L654A + JSR checkCHEST + JMP checkCOLLISION + +L654A LDA #$00 + STA heroSTEPY + LDY boardY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY boardX + LDA (ptrBBACK),Y + CMP #sprWALL + BNE L656B + LDA #sprEMPTY +L656B STA (ptrBOARD),Y + INC boardY + LDY boardY + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY boardX + LDA #sprHERO + STA (ptrBOARD),Y + JMP checkCOLLISION + +L6584 LDA fgHEROFELL + BNE L658F + LDA #$64 + LDX #$08 + JSR playSOUND +L658F LDA #$20 + STA fgSPEED + STA fgHEROFELL + JSR getPLAYERINPUT + + LDA theKEY1 + CMP #chrI ; move up + BNE L65A4 + JSR checkMOVEUP + BCS L65C2 + RTS + +L65A4 CMP #chrK ; move down + BNE L65AE + JSR checkMOVEDOWN + BCS L65C2 + RTS + +L65AE CMP #chrU ; dig left + BNE L65B8 + JSR checkDIGLEFT + BCS L65C2 + RTS + +L65B8 CMP #chrO ; dig right + BNE L65C2 + JSR checkDIGRIGHT + BCS L65C2 + RTS + +L65C2 LDA theKEY2 + CMP #chrJ ; move left + BNE L65CB + JMP checkMOVELEFT + +L65CB CMP #chrL ; move right + BNE L65D2 + JMP checkMOVERIGHT +L65D2 RTS + +*----------------------------------- +* CHECK IF WE CAN MOVE LEFT +*----------------------------------- + +checkMOVELEFT + LDY boardY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + + LDX heroSTEPX + CPX #$03 + BCS L6600 + LDY boardX ; already at column 0 + BEQ L65FF + DEY ; what do we have to the left? + LDA (ptrBOARD),Y + CMP #sprWALLI + BEQ L65FF + CMP #sprWALL + BEQ L65FF + CMP #sprTRAP + BNE L6600 +L65FF RTS ; we cannot move + +L6600 JSR calcSPRITEXY + JSR drawSPRITEXY + LDA #$FF + STA fgLEFTRIGHT + JSR heroNEXTSTEPY + DEC heroSTEPX + BPL L662A + LDY boardX + LDA (ptrBBACK),Y + CMP #sprWALL + BNE L661B + LDA #sprEMPTY +L661B STA (ptrBOARD),Y + DEC boardX + DEY + LDA #sprHERO + STA (ptrBOARD),Y + LDA #$04 + STA heroSTEPX + BNE L662D +L662A JSR checkCHEST +L662D LDY boardX ; define sprites + LDA (ptrBBACK),Y ; if we are on a bar + CMP #sprBAR + BEQ L663B + LDA #$00 ; run left first step + LDX #$02 ; last step + BNE L663F +L663B LDA #$03 ; bar left first step + LDX #$05 ; last step +L663F JSR setHEROSTEP + JMP checkCOLLISION + +*----------------------------------- +* CHECK IF WE CAN MOVE RIGHT +*----------------------------------- + +checkMOVERIGHT + LDY boardY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDX heroSTEPX + CPX #$02 + BCC L6674 + LDY boardX + CPY #lvlWIDTH-1 + BEQ L6673 + INY + LDA (ptrBOARD),Y + CMP #sprWALLI + BEQ L6673 + CMP #sprWALL + BEQ L6673 + CMP #sprTRAP + BNE L6674 +L6673 RTS + +L6674 JSR calcSPRITEXY + JSR drawSPRITEXY + LDA #$01 + STA fgLEFTRIGHT + JSR heroNEXTSTEPY + INC heroSTEPX + LDA heroSTEPX + CMP #$05 + BCC L66A2 + LDY boardX + LDA (ptrBBACK),Y + CMP #sprWALL + BNE L6693 + LDA #sprEMPTY +L6693 STA (ptrBOARD),Y + INC boardX + INY + LDA #sprHERO + STA (ptrBOARD),Y + LDA #$00 + STA heroSTEPX + BEQ L66A5 +L66A2 JSR checkCHEST +L66A5 LDY boardX + LDA (ptrBBACK),Y + CMP #sprBAR + BEQ L66B3 + LDA #$08 ; run right step 1 + LDX #$0A ; run right step 3 + BNE L66B7 +L66B3 LDA #$0B ; bar right step 1 + LDX #$0D ; bar right step 3 +L66B7 JSR setHEROSTEP + JMP checkCOLLISION + +*----------------------------------- +* CAN WE MOVE UP +*----------------------------------- + +checkMOVEUP + LDY boardY + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY boardX + LDA (ptrBBACK),Y + CMP #sprLADDER + BEQ L66ED + LDY heroSTEPY + CPY #$03 + BCC L66EB + LDY boardY + LDA tblBOARDALLL+1,Y + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY boardX + LDA (ptrBBACK),Y + CMP #sprLADDER + BEQ L6711 +L66EB SEC + RTS + +L66ED LDY heroSTEPY + CPY #$03 + BCS L6711 + LDY boardY + BEQ L66EB + LDA tblBOARDALLL-1,Y + STA ptrBOARD + LDA tblBOARDALLH-1,Y + STA ptrBOARD+1 + LDY boardX + LDA (ptrBOARD),Y + CMP #sprWALL + BEQ L66EB + CMP #sprWALLI + BEQ L66EB + CMP #sprTRAP + BEQ L66EB +L6711 JSR calcSPRITEXY + JSR drawSPRITEXY + LDY boardY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + JSR heroNEXTSTEPX + DEC heroSTEPY + BPL L6757 + LDY boardX + LDA (ptrBBACK),Y + CMP #sprWALL + BNE L673B + LDA #$00 +L673B STA (ptrBOARD),Y + DEC boardY + LDY boardY + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY boardX + LDA #sprHERO + STA (ptrBOARD),Y + LDA #$04 + STA heroSTEPY + BNE L675A +L6757 JSR checkCHEST +L675A LDA #$10 ; climb ladder step 1 + LDX #$11 ; climb ladder step 2 + JSR setHEROSTEP + JSR checkCOLLISION + CLC + RTS + +*----------------------------------- +* CHECK IF CAN MOVE DOWN +*----------------------------------- + +checkMOVEDOWN + LDY heroSTEPY + CPY #$02 + BCC L678A + LDY boardY + CPY #lvlHEIGHT-1 + BCS L6788 + LDA tblBOARDALLL+1,Y + STA ptrBOARD + LDA tblBOARDALLH+1,Y + STA ptrBOARD+1 + LDY boardX + LDA (ptrBOARD),Y + CMP #sprWALLI + BEQ L6788 + CMP #sprWALL + BNE L678A +L6788 SEC + RTS + +L678A JSR calcSPRITEXY + JSR drawSPRITEXY + LDY boardY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + JSR heroNEXTSTEPX + INC heroSTEPY + LDA heroSTEPY + CMP #$05 + BCC L67D5 + LDY boardX + LDA (ptrBBACK),Y + CMP #sprWALL + BNE L67B8 + LDA #$00 +L67B8 STA (ptrBOARD),Y + INC boardY + LDY boardY + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY boardX + LDA #sprHERO + STA (ptrBOARD),Y + LDA #$00 + STA heroSTEPY + JMP L675A +L67D5 JMP L6757 + +L67D8 JMP L6892 + +*----------------------------------- +* CHECK IF WE CAN DIG LEFT +*----------------------------------- + +checkDIGLEFT + LDA #$FF + STA fgHOLE + STA theKEY1 + STA theKEY2 + LDA #$00 + STA idxDIG + +L67E7 LDY boardY ; are we on last line? + CPY #lvlHEIGHT-1 + BCS L67D8 + INY + JSR setBOARDLINEPOINTERS + LDY boardX ; are we on first column? + BEQ L67D8 + DEY + LDA (ptrBOARD),Y ; what do we have on our left? + CMP #sprWALL ; a wall? + BNE L67D8 + LDY boardY ; yes + JSR setBOARDLINEPOINTERS + LDY boardX + DEY + LDA (ptrBOARD),Y + CMP #sprEMPTY + BNE L686E + JSR calcSPRITEXY + JSR drawSPRITEXY + JSR heroNEXTSTEPX + JSR heroNEXTSTEPY + LDY idxDIG + LDA digNOTE,Y + LDX digDURATION,Y + JSR getNOTE + LDX idxDIG + LDA #$00 + CPX #$06 + BCS L682B + LDA #$06 +L682B STA heroINDEX + JSR checkCOLLISION + LDX idxDIG + CPX #$0C + BEQ L6898 + CPX #$00 + BEQ L684C + LDA seqDIGLEFT-1,X ; dig left - 1 + PHA + LDX boardX + DEX + LDY boardY + JSR getXY + PLA + JSR drawSPRITEXY + LDX idxDIG +L684C LDA seqDIGLEFT,X ; dig left + PHA + LDX boardX + DEX + STX theX + LDY boardY + STY theY + JSR getXY + PLA + JSR drawSPRXYCOLLISION + LDX idxDIG + LDA seqDIGSTONE,X ; dig stone + INC theY + JSR coutHGR1 + INC idxDIG + CLC + RTS + +L686E LDY boardY + INY + STY theY + LDY boardX + DEY + STY theX + LDA #sprWALL + JSR coutHGR1 + LDX idxDIG + BEQ L6892 + DEX + LDA seqDIGLEFT,X + PHA + LDY boardY + LDX boardX + DEX + JSR getXY + PLA + JSR drawSPRITEXY +L6892 LDA #$00 + STA fgHOLE + SEC + RTS + +L6898 LDX boardX + DEX + JMP addNEWHOLE +L689E JMP L695C + +*----------------------------------- +* CHECK IF WE CAN DIG RIGHT +*----------------------------------- + +checkDIGRIGHT + LDA #$01 + STA fgHOLE + STA theKEY1 + STA theKEY2 + LDA #$0C + STA idxDIG +L68AD LDY boardY ; are we on last line? + CPY #lvlHEIGHT-1 + BCS L689E + INY + JSR setBOARDLINEPOINTERS + LDY boardX ; are we on lat column? + CPY #lvlWIDTH-1 + BCS L689E + INY + LDA (ptrBOARD),Y + CMP #sprWALL ; do we have a wall? + BNE L689E + LDY boardY + JSR setBOARDLINEPOINTERS + LDY boardX + INY + LDA (ptrBOARD),Y + CMP #sprEMPTY + BNE L6936 + JSR calcSPRITEXY + JSR drawSPRITEXY + JSR heroNEXTSTEPX + JSR heroNEXTSTEPY + LDY idxDIG + LDA seqDIGSTONE,Y ; dig stone + LDX digNOTE2,Y + JSR getNOTE + LDX idxDIG + LDA #$08 + CPX #$12 + BCS L68F3 + LDA #$0E +L68F3 STA heroINDEX + JSR checkCOLLISION + LDX idxDIG + CPX #$18 + BEQ L6962 + CPX #$0C + BEQ L6914 + LDA seqDIGLEFT-1,X + PHA + LDX boardX + INX + LDY boardY + JSR getXY + PLA + JSR drawSPRITEXY + LDX idxDIG +L6914 LDA seqDIGLEFT,X + PHA + LDX boardX + INX + STX theX + LDY boardY + STY theY + JSR getXY + PLA + JSR drawSPRXYCOLLISION + INC theY + LDX idxDIG + LDA seqDIGRIGHT,X + JSR coutHGR1 + INC idxDIG + CLC + RTS + +L6936 LDY boardY + INY + STY theY + LDY boardX + INY + STY theX + LDA #$01 + JSR coutHGR1 + LDX idxDIG + CPX #$0C + BEQ L695C + DEX + LDA seqDIGLEFT,X + PHA + LDX boardX + INX + LDY boardY + JSR getXY + PLA + JSR drawSPRITEXY + +L695C LDA #$00 + STA fgHOLE + SEC + RTS + +L6962 LDX boardX ; we're digging + INX + JMP addNEWHOLE + +* Enchanement des sprites + +seqLODERUNNER + DB $0B ; 0 court gauche + DB $0C ; 1 + DB $0D ; 2 + DB $18 ; 3 barre gauche + DB $19 ; 4 + DB $1A ; 5 + DB $0F ; 6 creuse gauche + DB $13 ; 7 tombe dans un trou gauche + DB $09 ; 8 court droite + DB $10 ; 9 LR court vers la droite step 1 + DB $11 ; A LR court vers la droite step 2 + DB $15 ; B LR est sur la barre vers la droite step 1 + DB $16 ; C LR est sur la barre vers la droite step 2 + DB $17 ; D LR est sur la barre vers la droite step 3 + DB $25 ; E creuse droite + DB $14 ; F tombe dans un trou droite + DB $0E ; 10 monte chelle step 1 + DB $12 ; 11 monte chelle step 2 +seqDIGLEFT DB $1B ; 12 creuse 1 + DB $1B ; 13 creuse 1 + DB $1C ; 14 creuse 2 + DB $1C ; 15 creuse 2 + DB $1D ; 16 creuse 3 + DB $1D ; 17 creuse 3 + DB $1E ; 18 creuse 4 + DB $1E ; 19 creuse 4 + DB $00 ; 1A + DB $00 ; 1B + DB $00 ; 1C + DB $00 ; 1D +seqDIGRIGHT DB $26 ; 1E creuse droite step 1 + DB $26 ; 1F creuse droite step 1 + DB $27 ; 20 creuse droite step 2 + DB $27 ; 21 creuse droite step 2 + DB $1D ; 22 creuse droite step 3 + DB $1D ; 23 creuse droite step 3 + DB $1E ; 24 creuse droite step 4 + DB $1E ; 25 creuse droite step 4 + DB $00 ; 26 + DB $00 ; 27 + DB $00 ; 28 + DB $00 ; 29 +seqDIGSTONE DB $1F ; 2A dig stone sequence + DB $1F ; 2B + DB $20 ; 2C + DB $20 ; 2D + DB $21 ; 2E + DB $21 ; 2F + DB $22 ; 30 + DB $22 ; 31 + DB $23 ; 32 + DB $23 ; 33 + DB $24 ; 34 + DB $24 ; 35 + +*--- Sound data + +digNOTE DB $20 ; musical notes when we dig +digNOTE2 DB $20 ; + DB $20 ; + DB $20 ; + DB $20 ; + DB $20 ; + DB $20 ; + DB $20 ; + DB $24 ; + DB $24 ; + DB $24 ; + DB $24 ; + DB $24 ; +digDURATION DB $04 ; duration + DB $04 ; + DB $04 ; + DB $04 ; + DB $04 ; + DB $04 ; + DB $04 ; + DB $04 ; + DB $03 ; + DB $03 ; + DB $02 ; + DB $02 ; + DB $01 ; + +*----------------------------------- +* DEMO MODE ENGINE ENTRY POINT +*----------------------------------- + +L69B8 LDA KBD + BMI L69CD + LDA fgINPUT + CMP #chrK + BEQ L69D6 + LDA BUTN1 + BMI L69CD + LDA BUTN0 + BPL L69D6 +L69CD LSR fgKEYBTN0 + LSR fgPLAY + LDA #$01 + STA theMEN ; one man + RTS + +L69D6 LDA demoREPEAT ; are we currently handling a movement? + BNE L69F2 ; yes + LDY #$00 ; no, get values + LDA (ptrDEMO),Y ; the keys + STA demoKEY + INY + LDA (ptrDEMO),Y + STA demoREPEAT ; the repeat + LDA ptrDEMO ; next entry + CLC + ADC #$02 + STA ptrDEMO + LDA ptrDEMO+1 + ADC #$00 + STA ptrDEMO+1 +L69F2 LDA demoKEY ; first entry is the fisrt key + AND #$0F + TAX + LDA tblDEMO2KEY,X + STA theKEY1 + LDA demoKEY + LSR + LSR + LSR + LSR + TAX + LDA tblDEMO2KEY,X + STA theKEY2 ; second key + DEC demoREPEAT + RTS + +* 0123456 +tblDEMO2KEY ASC "IJKLOU " + +*----------------------------------- +* GAME ENGINE ENTRY POINT +*----------------------------------- + +getPLAYERINPUT + LDA fgDEMO + CMP #$01 + BEQ L69B8 + LDX KBD + STX KBDSTROBE + STX theA + BMI L6A2B + LDA fgINPUT + CMP #chrK + BEQ L6A55 +L6A28 JMP getJOYSTICKKEY + +L6A2B CPX #chrSPC + BCS L6A49 + STX theA + LDY #$FF +L6A33 INY + LDA tblKEY,Y + BEQ L6A49 + CMP theA + BNE L6A33 + TYA + ASL + TAY + LDA tblKEYADR+1,Y + PHA + LDA tblKEYADR,Y + PHA + RTS + +L6A49 LDA fgINPUT + CMP #chrJ + BEQ L6A28 + LDX theA + STX theKEY1 + STX theKEY2 +L6A55 RTS + +*------------------------------- +* 9E - CTRL-^ - NEXT LEVEL +*------------------------------- + +doNEXTLEVEL + INC theMEN ; man++ + INC theLEVEL + INC intLEVEL + LSR fgPLAY + LSR fgGOODSTART + RTS + +*------------------------------- +* 80 - CTRL-@ - EXTRA MAN +*------------------------------- + +doEXTRAMAN + INC theMEN ; man++ + BNE L6A67 + DEC theMEN ; man-- +L6A67 JSR printMEN + LSR fgGOODSTART + JMP getPLAYERINPUT + +*--- dead code + + INC $97 + INC theMEN ; man++ + LSR fgPLAY + RTS + +*------------------------------- +* 9B - ESC - PAUSE GAME +*------------------------------- + +doPAUSE JSR waitKEYDOWN + CMP #$9B + BNE doPAUSE + JMP getPLAYERINPUT + +*------------------------------- +* 92 - CTRL-R - TERMINATES CURRENT GAME +*------------------------------- + +doTERMINATE LDA #$01 + STA theMEN ; man + +*------------------------------- +* 81 - CTRL-A - ABORTS MAN +*------------------------------- + +doABORTMAN LSR fgPLAY + RTS + +*------------------------------- +* 93 - CTRL-S - TOGGLES SOUND +*------------------------------- + +doTOGGLESOUND + LDA fgSOUND + EOR #$FF + STA fgSOUND + JMP getPLAYERINPUT + +*------------------------------- +* 8A - DOWN ARROW - MOVE LEFT +*------------------------------- + +doDOWNARROW LDA #chrJ + STA fgINPUT + JMP getPLAYERINPUT + +*------------------------------- +* 8B - UP ARROW - MOVE DOWN +*------------------------------- + +doUPARROW LDA #chrK + STA fgINPUT + JMP getPLAYERINPUT + +*------------------------------- +* 98 - CTRL-X - FLIPS X-AXIS +*------------------------------- + +doFLIPX LDA joyXMIN + LDX joyXMAX + STA joyXMAX + STX joyXMIN + JMP getPLAYERINPUT + +*------------------------------- +* 99 - CTRL-Y - FLIPS Y-AXIS +*------------------------------- + +doFLIPY LDA joyYMIN + LDX joyYMAX + STA joyYMAX + STX joyYMIN + JMP getPLAYERINPUT + +*------------------------------- +* 88 - LEFT ARROW - SLOWS DOWN +*------------------------------- + +doSLOWDOWN LDA theSPEED + BEQ L6ACD + DEC theSPEED + JMP getPLAYERINPUT + +*------------------------------- +* 95 - RIGHT ARROW - SPEEDS UP +*------------------------------- + +doSPEEDUP LDA theSPEED + CMP #$0F + BEQ L6ACD + INC theSPEED +L6ACD JMP getPLAYERINPUT + +*------------------------------- +* GET JOYSTICK KEY +*------------------------------- + +getJOYSTICKKEY + LDA BUTN1 + BPL L6AD9 + LDA #chrU ; dig + BNE L6AE0 +L6AD9 LDA BUTN0 + BPL L6AE5 + LDA #chrO ; dig +L6AE0 STA theKEY1 + STA theKEY2 + RTS + +L6AE5 JSR readJOYSTICK ; no keys pressed + LDY theJOYX ; read joystick + LDA joyXMAX ; clamp + CMP #$2E ; return key + BEQ L6AFA + CPY joyXMAX + BCS L6B03 + LDA #chrL + BNE L6B1E +L6AFA CPY joyXMAX + BCC L6B03 + LDA #chrL + BNE L6B1E +L6B03 LDA joyXMIN + CMP #$2E + BEQ L6B13 + CPY joyXMIN + BCS L6B1C + LDA #chrJ + BNE L6B1E +L6B13 CPY joyXMIN + BCC L6B1C + LDA #chrJ + BNE L6B1E +L6B1C LDA #chrA-1 +L6B1E STA theKEY2 + LDY theJOYY + LDA joyYMIN + CMP #$2E + BEQ L6B32 + CPY joyYMIN + BCS L6B3B + LDA #chrI + BNE L6B56 +L6B32 CPY joyYMIN + BCC L6B3B + LDA #chrI + BNE L6B56 +L6B3B LDA joyYMAX + CMP #$2E + BEQ L6B4B + CPY joyYMAX + BCS L6B54 + LDA #chrK + BNE L6B56 +L6B4B CPY joyYMAX + BCC L6B54 + LDA #chrK + BNE L6B56 +L6B54 LDA #chrA-1 +L6B56 STA theKEY1 + RTS + +*---------------------------------- +* KEYS AND ASSOCIATED JUMPS +*---------------------------------- + +tblKEY HEX 9E809B9281938A8B889598998D00 + +tblKEYADR DA doNEXTLEVEL-1 ; 9E - CTRL-^ + DA doEXTRAMAN-1 ; 80 - CTRL-@ + DA doPAUSE-1 ; 9B - ESCAPE + DA doTERMINATE-1 ; 92 - CTRL-R + DA doABORTMAN-1 ; 81 - CTRL-A + DA doTOGGLESOUND-1 ; 93 - CTRL-S + DA doDOWNARROW-1 ; 8A - DOWN ARROW + DA doUPARROW-1 ; 8B - UP ARROW + DA doSPEEDUP-1 ; 88 - LEFT ARROW + DA doSLOWDOWN-1 ; 95 - RIGHT ARROW + DA doFLIPX-1 ; 98 - CTRL-X + DA doFLIPY-1 ; 99 - CTRL-Y + DA displayHIGHSCORES-1 ; 8D - RETURN + +joyXMIN DB minJOY ; x-low +joyXMAX DB ctrJOY ; x-high +joyYMIN DB minJOY ; y-low +joyYMAX DB ctrJOY ; y-high + +*----------------------------------- +* CALC SPRITE X/Y +*----------------------------------- + +calcSPRITEXY + LDX boardX ; calc next HGR X position + LDY heroSTEPX + JSR calcHGRX + STX theA ; save it + + LDY boardY ; calc next HGR Y position + LDX heroSTEPY + JSR calcHGRY ; we keep it in Y + + LDX heroINDEX ; get sprite index + LDA seqLODERUNNER,X + LDX theA + RTS + +*----------------------------------- +* CHECK CHEST +*----------------------------------- +* Check if we are on a chest +* If so, add 250 to the score + +checkCHEST LDA heroSTEPX ; is sprite still in X + CMP #$02 + BNE L6BF3 + LDA heroSTEPY ; is sprite still in Y + CMP #$02 + BNE L6BF3 + + LDY boardY ; yes + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + + LDY boardX ; are we on a chest? + LDA (ptrBBACK),Y + CMP #sprCHEST + BNE L6BF3 + + LSR fgCHEST ; collision avec un coffre + DEC nbCHEST ; chest-- + + LDY boardY ; remove it from background + STY theY + LDY boardX + STY theX + LDA #sprEMPTY + STA (ptrBBACK),Y + JSR coutHGR2 + + LDY theY ; draw it on screen + LDX theX + JSR getXY + LDA #sprCHEST + JSR drawSPRITEXY + LDY #$02 ; add 250 to score + LDA #$50 + JSR printSCORE + JSR prepareMELODY ; and beep it + HEX 07450655054404540343025300 +L6BF3 RTS + +*----------------------------------- +* STEP HERO STEP +*----------------------------------- + +setHEROSTEP INC heroINDEX ; A is the first step + CMP heroINDEX ; X the last + BCC L6BFD ; sets the step accordingly +L6BFA STA heroINDEX + RTS +L6BFD CPX heroINDEX + BCC L6BFA + RTS + +*----------------------------------- +* CHECK COLLISION +*----------------------------------- + +checkCOLLISION + JSR calcSPRITEXY + JSR drawSPRXYCOLLISION + LDA fgCOLLISION ; les sprites sont-ils entrs en collision ? + BEQ L6C12 ; non + LDA fgCHEST ; en collision avec un coffre ? + BEQ L6C12 ; oui, on ne perd pas + LSR fgPLAY ; non, perdu +L6C12 RTS + +*----------------------------------- +* SET HERO NEXT STEP X +*----------------------------------- + +heroNEXTSTEPX + LDA heroSTEPX + CMP #$02 + BCC L6C20 + BEQ L6C25 + DEC heroSTEPX + JMP checkCHEST +L6C20 INC heroSTEPX + JMP checkCHEST +L6C25 RTS + +*----------------------------------- +* SET HERO NEXT STEP Y +*----------------------------------- + +heroNEXTSTEPY + LDA heroSTEPY + CMP #$02 + BCC L6C33 + BEQ L6C38 + DEC heroSTEPY + JMP checkCHEST +L6C33 INC heroSTEPY + JMP checkCHEST +L6C38 RTS + +*----------------------------------- +* ADD A NEW HOLE +*----------------------------------- + +addNEWHOLE LDA #$00 ; tell we're digging + STA fgHOLE + LDY boardY + INY + STX theX + STY theY + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA #sprEMPTY ; make the hole visible + LDY theX + STA (ptrBOARD),Y + JSR coutHGR1 + LDA #sprEMPTY + JSR coutHGR2 + DEC theY + LDA #sprEMPTY + JSR coutHGR1 + INC theY + LDX #$FF ; add the hole to the list +L6C67 INX + CPX #sizeHOLE-2 + BEQ L6C81 + LDA tblHOLET,X ; <>0 tempo means there is a hole + BNE L6C67 + LDA theY + STA tblHOLEY,X + LDA theX + STA tblHOLEX,X + LDA #$B4 ; its tempo + STA tblHOLET,X + SEC +L6C81 RTS + +*----------------------------------- +* +*----------------------------------- + +handleFOE LDX nbFOE ; no foe, skip + BEQ L6CA6 + INC $64 + LDY $64 + CPY #$03 + BCC L6C92 + LDY #$00 + STY $64 +L6C92 LDA |$0060,Y + STA $63 +L6C97 LSR $63 + BCC L6CA2 + JSR doFOEACTION + LDA fgPLAY + BEQ L6CA6 +L6CA2 LDA $63 + BNE L6C97 +L6CA6 RTS + +*----------------------------------- +* +*----------------------------------- + +L6CA7 HEX 000000 + HEX 000101 + HEX 010101 + HEX 010301 + HEX 010303 + HEX 030303 + HEX 030307 + HEX 030707 + HEX 070707 + HEX 07070F + HEX 070F0F + HEX 0F0F0F + +seqFOE DB $08 ; 0 - foe runs left 1 + DB $2B ; 1 - ...left 2 + DB $2C ; 2 - ...left 3 + DB $30 ; 3 - foe bar left 1 + DB $31 ; 4 - ... left 2 + DB $32 ; 5 - ... left 3 + DB $36 ; 6 - foe falls left + DB $28 ; 7 - foe runs right 1 + DB $29 ; 8 - ... right 2 + DB $2A ; 9 - ... right 3 + DB $2D ; A - foe bar right 1 + DB $2E ; B - ... right 2 + DB $2F ; C - ... right 3 + DB $35 ; D - foe falls right + DB $33 ; E - foe ladder 1 + DB $34 ; F - ... ladder 2 + +*----------------------------------- +* +*----------------------------------- + +doFOEACTION INC idxFOE + LDX nbFOE + CPX idxFOE + BCS L6CE7 + LDX #$01 + STX idxFOE +L6CE7 JSR loadFOEDATA + LDA foeACTION + BMI L6D08 + BEQ L6D08 + DEC foeACTION + LDY foeACTION + CPY #$0D + BCS L6CFB + JMP L6E65 + +L6CFB LDX idxFOE + LDA tblFOETEMPO,X + BEQ L6D05 + JMP saveFOEDATA +L6D05 JMP L6DB7 + +L6D08 LDY foeY + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY foeX + LDA (ptrBBACK),Y + CMP #sprLADDER + BEQ L6D61 + CMP #sprBAR + BNE L6D26 + LDA foeSTEPY + CMP #$02 + BEQ L6D61 +L6D26 LDA foeSTEPY + CMP #$02 + BCC L6D64 + LDY foeY + CPY #lvlHEIGHT-1 + BEQ L6D61 + LDA tblBOARDALLL+1,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDA tblBOARDALLH+1,Y + STA ptrBOARD+1 + LDY foeX + LDA (ptrBOARD),Y + CMP #sprEMPTY + BEQ L6D64 + CMP #sprHERO + BEQ L6D64 + CMP #sprFOE + BEQ L6D61 + LDA (ptrBBACK),Y + CMP #sprWALL + BEQ L6D61 + CMP #sprWALLI + BEQ L6D61 + CMP #sprLADDER + BNE L6D64 +L6D61 JMP L6E85 + +L6D64 JSR calcFOESPRITEXY + JSR drawSPRITEXY + JSR foeNEXTSTEPX + LDA #$06 ; foe falls left + LDY foeLEFTRIGHT + BMI L6D75 + LDA #$0D ; foe falls right +L6D75 STA foeINDEX + INC foeSTEPY + LDA foeSTEPY + CMP #$05 + BCS L6DC0 + LDA foeSTEPY + CMP #$02 + BNE L6DB7 + JSR foeTAKECHEST + LDY foeY + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY foeX + LDA (ptrBBACK),Y + CMP #sprWALL + BNE L6DB7 + LDA foeACTION + BPL L6DA2 + DEC nbCHEST +L6DA2 LDA $5F + STA foeACTION + LDY #$00 ; we trapped a foe + LDA #$75 + JSR printSCORE + JSR prepareMELODY + HEX 06200430024000 + +L6DB7 JSR calcFOESPRITEXY + JSR drawSPRXYCOLLISION + JMP saveFOEDATA + +L6DC0 LDA #$00 + STA foeSTEPY + LDY foeY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY foeX + LDA (ptrBBACK),Y + CMP #sprWALL + BNE L6DE1 + LDA #sprEMPTY +L6DE1 STA (ptrBOARD),Y + INC foeY + LDY foeY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY foeX + LDA (ptrBOARD),Y + CMP #sprHERO + BNE L6E02 + LSR fgPLAY ; found the hero, he's now dead +L6E02 LDA (ptrBBACK),Y + CMP #sprWALL + BNE L6E58 + LDA foeACTION + BPL L6E58 + LDY foeY + DEY + STY theY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY foeX + STY theX + LDA (ptrBBACK),Y + CMP #sprEMPTY + BEQ L6E31 + DEC nbCHEST + JMP L6E46 + +L6E31 LDA #sprCHEST + STA (ptrBOARD),Y + STA (ptrBBACK),Y + JSR coutHGR2 + LDY theY + LDX theX + JSR getXY + LDA #sprCHEST + JSR drawSPRXYCOLLISION +L6E46 LDY foeY + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA #$00 + STA foeACTION + LDY foeX +L6E58 LDA #sprFOE + STA (ptrBOARD),Y + JSR calcFOESPRITEXY + JSR drawSPRXYCOLLISION + JMP saveFOEDATA + +L6E65 CPY #$07 + BCC L6E85 + JSR calcFOESPRITEXY + JSR drawSPRITEXY + LDY foeACTION + LDA L6E7F-7,Y + STA foeSTEPX +L6E76 JSR calcFOESPRITEXY + JSR drawSPRXYCOLLISION + JMP saveFOEDATA + +L6E7F HEX 020102030201 + +L6E85 LDX foeX + LDY foeY + JSR L70D8 + ASL + TAY + LDA L6E97+1,Y + PHA + LDA L6E97,Y + PHA + RTS + +L6E97 DA saveFOEDATA-1 ; 0 + DA L6FBC-1 ; 1 + DA L7047-1 ; 2 + DA L6EAC-1 ; 3 + DA L6F39-1 ; 4 + +L6EA1 LDA foeACTION + BEQ L6EA9 + BMI L6EA9 + INC foeACTION +L6EA9 JMP saveFOEDATA + +*--- 3 + +L6EAC LDY foeSTEPY + CPY #$03 + BCS L6ED5 + LDY foeY + BEQ L6EA1 + DEY + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY foeX + LDA (ptrBOARD),Y + CMP #$01 + BEQ L6EA1 + CMP #$02 + BEQ L6EA1 + CMP #$05 + BEQ L6EA1 + CMP #$08 + BEQ L6EA1 +L6ED5 JSR calcFOESPRITEXY + JSR drawSPRITEXY + JSR foeNEXTSTEPX + LDY foeY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + DEC foeSTEPY + BPL L6F26 + JSR checkDROPCHEST + LDY foeX + LDA (ptrBBACK),Y + CMP #$01 + BNE L6F02 + LDA #$00 +L6F02 STA (ptrBOARD),Y + DEC foeY + LDY foeY + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY foeX + LDA (ptrBOARD),Y + CMP #sprHERO + BNE L6F1C + LSR fgPLAY +L6F1C LDA #$08 + STA (ptrBOARD),Y + LDA #$04 + STA foeSTEPY + BNE L6F29 +L6F26 JSR foeTAKECHEST +L6F29 LDA #$0E + LDX #$0F + JSR setFOESTEP + JSR calcFOESPRITEXY + JSR drawSPRXYCOLLISION + JMP saveFOEDATA + +L6F39 LDY foeSTEPY + CPY #$02 + BCC L6F63 + LDY foeY + CPY #$0F + BCS L6F60 + INY + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY foeX + LDA (ptrBOARD),Y + CMP #sprWALLI + BEQ L6F60 + CMP #sprFOE + BEQ L6F60 + CMP #sprWALL + BNE L6F63 +L6F60 JMP saveFOEDATA + +L6F63 JSR calcFOESPRITEXY + JSR drawSPRITEXY + JSR foeNEXTSTEPX + LDY foeY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + INC foeSTEPY + LDA foeSTEPY + CMP #$05 + BCC L6FB9 + JSR checkDROPCHEST + LDY foeX + LDA (ptrBBACK),Y + CMP #sprWALL + BNE L6F94 + LDA #sprEMPTY +L6F94 STA (ptrBOARD),Y + INC foeY + LDY foeY + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY foeX + LDA (ptrBOARD),Y + CMP #sprHERO + BNE L6FAE + LSR fgPLAY ; we're dead +L6FAE LDA #sprFOE + STA (ptrBOARD),Y + LDA #$00 + STA foeSTEPY + JMP L6F29 +L6FB9 JMP L6F26 + +L6FBC LDY foeY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDX foeSTEPX + CPX #$03 + BCS L6FF1 + LDY foeX + BEQ L6FEE + DEY + LDA (ptrBOARD),Y + CMP #sprFOE + BEQ L6FEE + CMP #sprWALLI + BEQ L6FEE + CMP #sprWALL + BEQ L6FEE + LDA (ptrBBACK),Y + CMP #sprTRAP + BNE L6FF1 +L6FEE JMP saveFOEDATA + +L6FF1 JSR calcFOESPRITEXY + JSR drawSPRITEXY + JSR foeNEXTSTEPY + LDA #$FF + STA foeLEFTRIGHT + DEC foeSTEPX + BPL L7026 + JSR checkDROPCHEST + LDY foeX + LDA (ptrBBACK),Y + CMP #sprWALL + BNE L700F + LDA #sprEMPTY +L700F STA (ptrBOARD),Y + DEC foeX + DEY + LDA (ptrBOARD),Y + CMP #sprHERO + BNE L701C + LSR fgPLAY ; foe catched hero +L701C LDA #sprFOE + STA (ptrBOARD),Y + LDA #$04 + STA foeSTEPX + BNE L7029 +L7026 JSR foeTAKECHEST +L7029 LDY foeX + LDA (ptrBBACK),Y + CMP #sprBAR + BEQ L7037 + LDA #$00 ; foe runs left + LDX #$02 + BNE L703B +L7037 LDA #$03 ; foe bars left + LDX #$05 +L703B JSR setFOESTEP + JSR calcFOESPRITEXY + JSR drawSPRXYCOLLISION + JMP saveFOEDATA + +L7047 LDY foeY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDX foeSTEPX + CPX #$02 + BCC L707E + LDY foeX + CPY #lvlWIDTH-1 + BEQ L707B + INY + LDA (ptrBOARD),Y + CMP #$08 + BEQ L707B + CMP #$02 + BEQ L707B + CMP #$01 + BEQ L707B + LDA (ptrBBACK),Y + CMP #$05 + BNE L707E +L707B JMP saveFOEDATA + +L707E JSR calcFOESPRITEXY + JSR drawSPRITEXY + JSR foeNEXTSTEPY + LDA #$01 + STA foeLEFTRIGHT + INC foeSTEPX + LDA foeSTEPX + CMP #$05 + BCC L70B7 + JSR checkDROPCHEST + LDY foeX + LDA (ptrBBACK),Y + CMP #sprWALL + BNE L70A0 + LDA #$00 +L70A0 STA (ptrBOARD),Y + INC foeX + INY + LDA (ptrBOARD),Y + CMP #sprHERO + BNE L70AD + LSR fgPLAY +L70AD LDA #sprFOE + STA (ptrBOARD),Y + LDA #$00 + STA foeSTEPX + BEQ L70BA +L70B7 JSR foeTAKECHEST +L70BA LDY foeX + LDA (ptrBBACK),Y + CMP #sprBAR + BEQ L70C8 + LDA #$07 ; foe runs right + LDX #$09 + BNE L70CC +L70C8 LDA #$0A ; foe bars right + LDX #$0C +L70CC JSR setFOESTEP + JSR calcFOESPRITEXY + JSR drawSPRXYCOLLISION + JMP saveFOEDATA + +L70D8 STX tempX4 + STY tempY1 + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY tempX4 + LDA (ptrBBACK),Y + CMP #sprWALL + BNE L70F7 + LDA foeACTION + BEQ L70F7 + BMI L70F7 + LDA #$03 ; action 3 + RTS + +L70F7 LDY tempY1 + CPY boardY + BEQ L7100 + JMP L7186 + +L7100 LDY tempX4 + STY tempX5 + CPY boardX + BCS L7147 +L7108 INC tempX5 + LDY tempY1 + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY tempX5 + LDA (ptrBBACK),Y + CMP #sprLADDER + BEQ L713E + CMP #sprBAR + BEQ L713E + LDY tempY1 + CPY #lvlHEIGHT-1 + BEQ L713E + LDA tblBOARDALLL+1,Y + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY tempX5 + LDA (ptrBBACK),Y + CMP #sprEMPTY + BEQ L7186 + CMP #sprTRAP + BEQ L7186 +L713E LDY tempX5 + CPY boardX + BNE L7108 + LDA #$02 ; action 2 + RTS + +L7147 DEC tempX5 + LDY tempY1 + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY tempX5 + LDA (ptrBBACK),Y + CMP #sprLADDER + BEQ L717D + CMP #sprBAR + BEQ L717D + LDY tempY1 + CPY #lvlHEIGHT-1 + BEQ L717D + LDA tblBOARDALLL+1,Y + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY tempX5 + LDA (ptrBBACK),Y + CMP #sprEMPTY + BEQ L7186 + CMP #sprTRAP + BEQ L7186 +L717D LDY tempX5 + CPY boardX + BNE L7147 + LDA #$01 ; action 1 + RTS + +L7186 LDA #$00 + STA $58 + LDA #$FF + STA $59 + LDX tempX4 + LDY tempY1 + JSR L743E + JSR L7275 + JSR L71A2 + JSR L720C + LDA $58 + RTS +L71A1 RTS + +L71A2 LDY tempX3 + CPY tempX4 + BEQ L71A1 + LDY tempY1 + CPY #lvlHEIGHT-1 + BEQ L71DA + LDA tblBOARDALLL+1,Y + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY tempX3 + LDA (ptrBBACK),Y + CMP #sprWALL + BEQ L71DA + CMP #sprWALLI + BEQ L71DA + LDX tempX3 + LDY tempY1 + JSR L739D + LDX tempX3 + JSR L72D4 + CMP $59 + BCS L71DA + STA $59 + LDA #$01 + STA $58 +L71DA LDY tempY1 + BEQ L7206 + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY tempX3 + LDA (ptrBBACK),Y + CMP #sprLADDER + BNE L7206 + LDY tempY1 + LDX tempX3 + JSR L7300 + LDX tempX3 + JSR L72D4 + CMP $59 + BCS L7206 + STA $59 + LDA #$01 + STA $58 +L7206 INC tempX3 + JMP L71A2 +L720B RTS + +L720C LDY tempX2 + CPY tempX4 + BEQ L720B + LDY tempY1 + CPY #$0F + BEQ L7244 + LDA tblBOARDALLL+1,Y + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY tempX2 + LDA (ptrBBACK),Y + CMP #sprWALL + BEQ L7244 + CMP #sprWALLI + BEQ L7244 + LDX tempX2 + LDY tempY1 + JSR L739D + LDX tempX2 + JSR L72D4 + CMP $59 + BCS L7244 + STA $59 + LDA #$02 + STA $58 +L7244 LDY tempY1 + BEQ L7270 + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY tempX2 + LDA (ptrBBACK),Y + CMP #sprLADDER + BNE L7270 + LDY tempY1 + LDX tempX2 + JSR L7300 + LDX tempX2 + JSR L72D4 + CMP $59 + BCS L7270 + STA $59 + LDA #$02 + STA $58 +L7270 DEC tempX2 + JMP L720C + +L7275 LDY tempY1 + CPY #lvlHEIGHT-1 + BEQ L72A7 + LDA tblBOARDALLL+1,Y + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY tempX4 + LDA (ptrBBACK),Y + CMP #sprWALL + BEQ L72A7 + CMP #sprWALLI + BEQ L72A7 + LDX tempX4 + LDY tempY1 + JSR L739D + LDX tempX4 + JSR L72D4 + CMP $59 + BCS L72A7 + STA $59 + LDA #$04 + STA $58 +L72A7 LDY tempY1 + BEQ L72D3 + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY tempX4 + LDA (ptrBBACK),Y + CMP #sprLADDER + BNE L72D3 + LDX tempX4 + LDY tempY1 + JSR L7300 + LDX tempX4 + JSR L72D4 + CMP $59 + BCS L72D3 + STA $59 + LDA #$03 + STA $58 +L72D3 RTS + +L72D4 STA fgODDEVEN + CMP boardY + BNE L72EB + CPX foeX + BCC L72E3 + TXA + SEC + SBC foeX + RTS + +L72E3 STX fgODDEVEN + LDA foeX + SEC + SBC fgODDEVEN + RTS + +L72EB BCC L72F4 + SEC + SBC boardY + CLC + ADC #$C8 + RTS +L72F4 LDA boardY + SEC + SBC fgODDEVEN + CLC + ADC #$64 + RTS + +L72FD LDA tempY + RTS + +L7300 STY tempY + STX tempX +L7304 LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY tempX + LDA (ptrBBACK),Y + CMP #sprLADDER + BNE L72FD + DEC tempY + LDY tempX + BEQ L734A + DEY + LDA (ptrBBACK),Y + CMP #sprWALL + BEQ L7340 + CMP #sprWALLI + BEQ L7340 + CMP #sprLADDER + BEQ L7340 + LDY tempY + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY tempX + DEY + LDA (ptrBBACK),Y + CMP #sprBAR + BNE L734A +L7340 LDY tempY + STY temp1 + CPY boardY + BCC L7397 + BEQ L7397 +L734A LDY tempX + CPY #lvlWIDTH-1 + BEQ L738C + LDY tempY + LDA tblBOARDALLL+1,Y + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY tempX + INY + LDA (ptrBBACK),Y + CMP #sprWALL + BEQ L7382 + CMP #sprWALLI + BEQ L7382 + CMP #sprLADDER + BEQ L7382 + LDY tempY + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY tempX + INY + LDA (ptrBBACK),Y + CMP #sprBAR + BNE L738C +L7382 LDY tempY + STY temp1 + CPY boardY + BCC L7397 + BEQ L7397 +L738C LDY tempY + CPY #$01 + BCC L7395 + JMP L7304 + +L7395 TYA + RTS + +L7397 LDA temp1 + RTS + +L739A LDA tempY + RTS + +L739D STY tempY + STX tempX +L73A1 LDA tblBOARDALLL+1,Y + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY tempX + LDA (ptrBBACK),Y + CMP #sprWALL + BEQ L739A + CMP #sprWALLI + BEQ L739A + LDY tempY + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY tempX + LDA (ptrBBACK),Y + CMP #sprEMPTY + BEQ L742D + CPY #$00 ; first column? + BEQ L73FB ; yes + DEY + LDA (ptrBBACK),Y + CMP #sprBAR + BEQ L73F3 + LDY tempY + LDA tblBOARDALLL+1,Y + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY tempX + DEY + LDA (ptrBBACK),Y + CMP #sprWALL + BEQ L73F3 + CMP #sprWALLI + BEQ L73F3 + CMP #sprLADDER + BNE L73FB +L73F3 LDY tempY + STY temp1 + CPY boardY + BCS L743B +L73FB LDY tempX + CPY #lvlWIDTH-1 + BCS L742D + INY + LDA (ptrBBACK),Y + CMP #sprBAR + BEQ L7425 + LDY tempY + LDA tblBOARDALLL+1,Y + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY tempX + INY + LDA (ptrBBACK),Y + CMP #sprWALL + BEQ L7425 + CMP #sprLADDER + BEQ L7425 + CMP #sprWALLI + BNE L742D +L7425 LDY tempY + STY temp1 + CPY boardY + BCS L743B +L742D INC tempY ; next column + LDY tempY + CPY #lvlHEIGHT + BCS L7438 + JMP L73A1 + +L7438 LDA #$0F + RTS + +L743B LDA temp1 + RTS + +L743E STX tempX3 + STX tempX2 + STY theYSCREEN +L7444 LDA tempX3 + BEQ L7490 + LDY theYSCREEN + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY tempX3 + DEY + LDA (ptrBOARD),Y + CMP #$01 + BEQ L7490 + CMP #$02 + BEQ L7490 + CMP #$03 + BEQ L748A + CMP #$04 + BEQ L748A + LDY theYSCREEN + CPY #$0F + BEQ L748A + LDA tblBOARDALLL+1,Y + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY tempX3 + DEY + LDA (ptrBBACK),Y + CMP #$01 + BEQ L748A + CMP #$02 + BEQ L748A + CMP #$03 + BNE L748E +L748A DEC tempX3 + BPL L7444 +L748E DEC tempX3 +L7490 LDA tempX2 + CMP #lvlWIDTH-1 + BEQ L74DE + LDY theYSCREEN + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY tempX2 + INY + LDA (ptrBOARD),Y + CMP #sprWALL + BEQ L74DE + CMP #sprWALLI + BEQ L74DE + CMP #sprLADDER + BEQ L74D8 + CMP #sprBAR + BEQ L74D8 + LDY theYSCREEN + CPY #lvlHEIGHT-1 + BEQ L74D8 + LDA tblBOARDALLL+1,Y + STA ptrBBACK + LDA tblBOARDBACKH+1,Y + STA ptrBBACK+1 + LDY tempX2 + INY + LDA (ptrBBACK),Y + CMP #$01 + BEQ L74D8 + CMP #$02 + BEQ L74D8 + CMP #$03 + BNE L74DC +L74D8 INC tempX2 + BPL L7490 +L74DC INC tempX2 +L74DE RTS + +*----------------------------------- +* CALC FOE SPRITE X/Y +*----------------------------------- + +calcFOESPRITEXY + LDX foeX + LDY foeSTEPX + JSR calcHGRX + STX theA + LDY foeY + LDX foeSTEPY + JSR calcHGRY + LDX foeINDEX + LDA seqFOE,X + LDX theA + RTS + +*----------------------------------- +* FOE TAKES A CHEST +*----------------------------------- + +foeTAKECHEST + LDA foeSTEPX + CMP #$02 + BNE L753D + LDA foeSTEPY + CMP #$02 + BNE L753D + LDY foeY + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY foeX + LDA (ptrBBACK),Y + CMP #sprCHEST + BNE L753D + LDA foeACTION ; deja un tresor ? + BMI L753D ; oui + LDA #$FF ; prends-le + SEC + SBC tempX6 + STA foeACTION + LDA #sprEMPTY + STA (ptrBBACK),Y + LDY foeY + STY theY + LDY foeX + STY theX + JSR coutHGR2 + LDY theY + LDX theX + JSR getXY + LDA #sprCHEST + JMP drawSPRITEXY +L753D RTS + +*----------------------------------- +* FOE DROPS CHEST +*----------------------------------- + +checkDROPCHEST + LDA foeACTION + BPL L7573 ; skip if positive + INC foeACTION ; here is negative + BNE L7573 + + LDY foeY ; here if 0 + STY theY + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY foeX + STY theX + LDA (ptrBBACK),Y + CMP #sprEMPTY + BNE L7571 + LDA #sprCHEST + STA (ptrBBACK),Y + JSR coutHGR2 + LDY theY + LDX theX + JSR getXY + LDA #sprCHEST + JMP drawSPRXYCOLLISION + +L7571 DEC foeACTION +L7573 RTS + +*----------------------------------- +* SET FOE ANIMATION STEP +*----------------------------------- + +setFOESTEP INC foeINDEX ; tutu + CMP foeINDEX + BCC L757D +L757A STA foeINDEX + RTS +L757D CPX foeINDEX + BCC L757A + RTS + +*----------------------------------- +* SET FOE NEXT STEP X +*----------------------------------- + +foeNEXTSTEPX + LDA foeSTEPX + CMP #$02 + BCC L758F + BEQ L7594 + DEC foeSTEPX + JMP foeTAKECHEST +L758F INC foeSTEPX + JMP foeTAKECHEST +L7594 RTS + +*----------------------------------- +* SET FOE NEXT STEP Y +*----------------------------------- + +foeNEXTSTEPY + LDA foeSTEPY + CMP #$02 + BCC L75A2 + BEQ L75A7 + DEC foeSTEPY + JMP foeTAKECHEST +L75A2 INC foeSTEPY + JMP foeTAKECHEST +L75A7 RTS + +*----------------------------------- +* SAVE FOE DATA AFTER WE USED IT +*----------------------------------- + +saveFOEDATA LDX idxFOE + LDA foeX + STA tblFOEX,X + LDA foeY + STA tblFOEY,X + LDA foeSTEPX + STA tblFOESTEPX,X + LDA foeSTEPY + STA tblFOESTEPY,X + LDA foeACTION + STA tblFOEACTION,X + LDA foeLEFTRIGHT + STA tblFOELEFTRIGHT,X + LDA foeINDEX + STA tblFOEINDEX,X + RTS + +*----------------------------------- +* LOAD FOE DATA TO USE IT +*----------------------------------- + +loadFOEDATA LDX idxFOE + LDA tblFOEX,X + STA foeX + LDA tblFOEY,X + STA foeY + LDA tblFOESTEPX,X + STA foeSTEPX + LDA tblFOESTEPY,X + STA foeSTEPY + LDA tblFOEINDEX,X + STA foeINDEX + LDA tblFOELEFTRIGHT,X + STA foeLEFTRIGHT + LDA tblFOEACTION,X + STA foeACTION + RTS + +*----------------------------------- +* CHECK HOLE - Who/What is in the hole? +*----------------------------------- + +checkHOLE JSR checkRESURRECT + INC tempX6 ; next one + LDA tempX6 + CMP #lvlWIDTH ; ok, we browsed the line + BCC L7603 + LDA #$00 ; start again at column 0 + STA tempX6 + +L7603 LDX #sizeHOLE-2 +L7605 LDA tblHOLET,X + STX tempINDEX + BNE L760F + JMP L770D + +L760F DEC tblHOLET,X + BEQ L7641 + LDA tblHOLEX,X + STA theX + LDA tblHOLEY,X + STA theY + LDA tblHOLET,X + CMP #$14 ; 20 + BNE L7639 + LDA #$37 ; 1er sprite +L7627 JSR coutHGR2 + LDX theX + LDY theY + JSR getXY + LDA #sprEMPTY + JSR drawSPRITEXY +L7636 JMP L770D + +L7639 CMP #$0A ; 10 + BNE L7636 + LDA #$38 ; 2nd sprite + BNE L7627 + +L7641 LDX tempINDEX + LDY tblHOLEY,X + STY theY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY tblHOLEX,X + STY theX + LDA (ptrBOARD),Y + CMP #sprEMPTY + BNE L7667 + JMP L7701 + +L7667 CMP #sprHERO + BNE L766D + LSR fgPLAY ; the hero was in the hole... he's dead +L766D CMP #sprFOE + BEQ L767A ; it was a foe + CMP #sprCHEST + BNE L7677 + DEC nbCHEST ; a chest, remove one +L7677 JMP L7701 + +*--- kill the foe + +L767A LDA #sprWALL ; put a wall + STA (ptrBOARD),Y + STA (ptrBBACK),Y + JSR coutHGR1 + LDA #sprWALL + JSR coutHGR2 + + LDX nbFOE ; find the foe +L768A LDA tblFOEX,X + CMP theX + BNE L76FE + LDA tblFOEY,X + CMP theY + BNE L76FE + LDA tblFOEACTION,X ; was he holding a chest? + BPL L769F + DEC nbCHEST ; yes, remove it +L769F LDA #$7F ; no chest + STA tblFOEACTION,X + STX idxFOE + JSR loadFOEDATA + JSR calcFOESPRITEXY + JSR drawSPRITEXY + LDX idxFOE + LDY #$01 ; we resurrect him on line 1 + STY theY +L76B5 LDY theY + LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY tempX6 +L76C3 LDA (ptrBBACK),Y + CMP #sprEMPTY ; only if there is a space + BEQ L76D9 + INC tempX6 + LDY tempX6 + CPY #lvlWIDTH + BCC L76C3 + INC theY + LDA #$00 + STA tempX6 + BEQ L76B5 +L76D9 TYA + STA tblFOEX,X + LDA theY + STA tblFOEY,X + LDA #$14 + STA tblFOETEMPO,X + LDA #$02 + STA tblFOESTEPY,X + STA tblFOESTEPX,X + LDA #$00 + STA tblFOEINDEX,X + LDY #$00 ; we killed an ennemy + LDA #$75 + JSR printSCORE + JMP L770D + +L76FE DEX + BNE L768A +L7701 LDA #sprWALL + STA (ptrBOARD),Y + JSR coutHGR1 + LDA #sprWALL + JSR coutHGR2 +L770D LDX tempINDEX + DEX + BMI L7715 + JMP L7605 +L7715 RTS + +*----------------------------------- +* CHECK RESURRECT - Can/Do we resurrect a foe? +*----------------------------------- + +checkRESURRECT + LDX nbFOE ; ennemi 0 n'existe pas + BEQ L7715 + LDA idxFOE + PHA +L771D LDA tblFOETEMPO,X + BEQ nextFOE + STX idxFOE + JSR loadFOEDATA + LDA #$7F + STA tblFOEACTION,X + LDA tblFOEX,X + STA theX + LDA tblFOEY,X + STA theY + DEC tblFOETEMPO,X ; foe must live + BEQ resurrectFOE + LDA tblFOETEMPO,X + CMP #$13 + BNE L7752 + LDA #$39 ; foe appears again + JSR coutHGR2 + JSR calcFOESPRITEXY + LDA #$39 + JSR drawSPRXYCOLLISION + JMP nextFOEalt + +L7752 CMP #$0A + BNE nextFOE + LDA #$3A ; foe appears again sprite 2 + JSR coutHGR2 + JSR calcFOESPRITEXY + LDA #$3A + JSR drawSPRXYCOLLISION + +nextFOEalt LDX idxFOE ; next ennemy +nextFOE DEX + BNE L771D + PLA ; restore + STA idxFOE + RTS ; exit + +*----------------------------------- +* RESURRECT FOE +*----------------------------------- + +resurrectFOE + LDY theY + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDX idxFOE + INC tblFOETEMPO,X + LDY theX + LDA (ptrBOARD),Y + BNE nextFOE + LDA #sprFOE + STA (ptrBOARD),Y + LDA #sprEMPTY + JSR coutHGR2 + LDA #$00 + LDX idxFOE + STA tblFOEACTION,X + STA tblFOETEMPO,X + LDA #sprFOE + JSR coutHGR1 + JSR prepareMELODY + HEX 027C03780474057000 + LDX idxFOE + JMP nextFOE + +*------------------------------- +* 8D - RETURN - DISPLAYS HIGH SCORE +*------------------------------- + +displayHIGHSCORES + JSR showALLSCORES + LDX #$FF + LDY #$FF + LDA #$04 + STA counter +L77B7 LDA fgINPUT + CMP #chrK + BEQ L77C7 + LDA BUTN1 + BMI L77D6 + LDA BUTN0 + BMI L77D6 +L77C7 LDA KBD + BMI L77D6 + DEX + BNE L77B7 + DEY + BNE L77B7 + DEC counter + BNE L77B7 +L77D6 STA KBDSTROBE + STA TXTPAGE1 + JSR clearHGR2 + + LDY #lvlHEIGHT-1 + STY theY +L77E3 LDA tblBOARDALLL,Y + STA ptrBBACK + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY #lvlWIDTH-1 + STY theX +L77F1 LDA (ptrBBACK),Y + CMP #sprTRAP + BNE L77F9 + LDA #sprWALL +L77F9 JSR coutHGR2 + DEC theX + LDY theX + BPL L77F1 + DEC theY + LDY theY + BPL L77E3 + LDX #sizeHOLE-2 +L780A STX tempINDEX + LDA tblHOLET,X + BEQ L7838 + LDY tblHOLEY,X + STY theY + LDY tblHOLEX,X + STY theX + CMP #$15 + BCC L7827 + LDA #sprEMPTY + JSR coutHGR2 + JMP L7838 + +L7827 CMP #$0B + BCC L7833 + LDA #$37 ; rebuild wall step 1 + JSR coutHGR2 + JMP L7838 + +L7833 LDA #$38 ; rebuild wall step 2 + JSR coutHGR2 + +L7838 LDX tempINDEX + DEX + BPL L780A + LDX nbFOE + BEQ L7868 ; skip foe n0 +L7841 LDA tblFOETEMPO,X + STX tempINDEX + BEQ L7863 + LDY tblFOEX,X + STY theX + LDY tblFOEY,X + STY theY + CMP #$14 + BCS L7863 + CMP #$0B + BCC L785E + LDA #$39 ; foe revives step 1 + BNE L7860 +L785E LDA #$3A ; foe revives step 2 +L7860 JSR coutHGR2 +L7863 LDX tempINDEX + DEX + BNE L7841 +L7868 JMP getPLAYERINPUT + +*------------------------------- +* SHOW ALL SCORES +*------------------------------- + +showALLSCORES + JSR clearHGR2 + LDA #>HGR2 + STA activePAGE + LDA #$00 + STA theX + STA theY + JSR printSTRING + ASC " LODE RUNNER HIGH SCORES"8D8D8D + ASC " INITIALS LEVEL SCORE"8D + ASC " -------- ----- --------"8D00 + + LDA #$01 ; for x=1 to...10 + STA tempX4 +L78D4 CMP #$0A + BNE L78E5 + LDA #$01 + JSR outputCHAR + LDA #$00 + JSR outputCHAR + JMP L78EF + +L78E5 LDA #chrSPC + JSR printCHAR + LDA tempX4 + JSR outputCHAR +L78EF JSR printSTRING + ASC ". "00 + LDX tempX4 + LDY scoreoffset,X + STY tempY1 + LDA scorebuf+$03,Y + BNE L7907 + JMP L798C + +* +0..+2 INITIALS +* +3 LEVEL +* +4..+7 SCORE + +L7907 LDY tempY1 + LDA scorebuf,Y + JSR printCHAR + LDY tempY1 + LDA scorebuf+$01,Y + JSR printCHAR + LDY tempY1 + LDA scorebuf+$02,Y + JSR printCHAR + JSR printSTRING + ASC " "00 + LDY tempY1 + LDA scorebuf+$03,Y + JSR hex2dec + LDA theCENTAINE + JSR outputCHAR + LDA theDIZAINE + JSR outputCHAR + LDA theUNITE + JSR outputCHAR + JSR printSTRING + ASC " "00 + LDY tempY1 + LDA scorebuf+$04,Y + JSR bcd2dec + LDA theDIZAINE + JSR outputCHAR + LDA theUNITE + JSR outputCHAR + LDY tempY1 + LDA scorebuf+$05,Y + JSR bcd2dec + LDA theDIZAINE + JSR outputCHAR + LDA theUNITE + JSR outputCHAR + LDY tempY1 + LDA scorebuf+$06,Y + JSR bcd2dec + LDA theDIZAINE + JSR outputCHAR + LDA theUNITE + JSR outputCHAR + LDY tempY1 + LDA scorebuf+$07,Y + JSR bcd2dec + LDA theDIZAINE + JSR outputCHAR + LDA theUNITE + JSR outputCHAR +L798C JSR L7B7D + INC tempX4 + LDA tempX4 + CMP #$0B + BCS L799A + JMP L78D4 + +L799A STA TXTPAGE2 + LDA #>HGR1 + STA activePAGE + RTS + +scoreoffset HEX 0000081018202830384048 ; offset of each score + +*------------------------------- +* CLEAR PAGES +*------------------------------- + +clearHGRPAGES + JSR clearHGR1 + JSR clearHGR2 + +*------------------------------- +* DRAW GAME FRAME +*------------------------------- + +drawINFOBAR + LDY #$27 ; met la barre bleue + LDA activePAGE + CMP #>HGR2 + BEQ L79DD +L79BB LDA #$AA + STA $2350,Y + STA $2750,Y + STA $2B50,Y + STA $2F50,Y + DEY + LDA #$D5 + STA $2350,Y + STA $2750,Y + STA $2B50,Y + STA $2F50,Y + DEY + BPL L79BB + BMI L79FD + +L79DD LDA #$AA ; pareil mais sur HGR2 + STA $4350,Y + STA $4750,Y + STA $4B50,Y + STA $4F50,Y + DEY + LDA #$D5 + STA $4350,Y + STA $4750,Y + STA $4B50,Y + STA $4F50,Y + DEY + BPL L79DD + +L79FD LDA #$10 + STA theY + LDA #$00 + STA theX + JSR printSTRING + ASC "SCORE MEN LEVEL "00 + JSR printMEN + JSR printLEVEL + LDA #$00 ; score de 0 + TAY + JMP printSCORE + +*------------------------------- +* SET HGR POINTER +*------------------------------- + +setHGRPOINTER + LDA xhgr,Y + STA ptrHGR1 + LDA yhgr,Y + ORA hgrPAGE + STA ptrHGR1+1 + RTS + +*------------------------------- +* SET HGR POINTERS +*------------------------------- + +setHGRPOINTERS + LDA xhgr,Y + STA ptrHGR1 + STA ptrHGR2 + LDA yhgr,Y + ORA #>HGR1 + STA ptrHGR1+1 + EOR #$60 + STA ptrHGR2+1 + RTS + +*------------------------------- +* CLEAR HGR1 +*------------------------------- + +clearHGR1 LDA #>HGR1 + LDX #>HGR2 ; >HGR1+$20 + BNE L7A5B + +*------------------------------- +* CLEAR HGR2 +*------------------------------- + +clearHGR2 LDA #>HGR2 + LDX #>HGR3 ; >HGR2+$20 + +*--- clear now + +L7A5B STA ptrDATA+1 + LDA #$00 + STA ptrDATA + TAY + LDA #$80 +L7A64 STA (ptrDATA),Y + INY + BNE L7A64 + INC ptrDATA+1 + CPX ptrDATA+1 + BNE L7A64 + RTS + +*------------------------------- +* PRINT MEN +*------------------------------- + +printMEN LDA theMEN ; print number of men + LDX #$10 + +L7A74 STX theX ; show byte2dec + JSR hex2dec + LDA #$10 ; print three values (0-255) + STA theY + LDA theCENTAINE + JSR outputCHAR + LDA theDIZAINE + JSR outputCHAR + LDA theUNITE + JMP outputCHAR + +*------------------------------- +* PRINT LEVEL +*------------------------------- + +printLEVEL LDA theLEVEL ; print level + LDX #$19 ; column offset + BNE L7A74 + +*------------------------------- +* ADD & PRINT SCORE +*------------------------------- + +printSCORE CLC + SED + ADC theSCORE + STA theSCORE + TYA + ADC theSCORE+1 + STA theSCORE+1 + LDA #$00 + ADC theSCORE+2 + STA theSCORE+2 + LDA #$00 + ADC theSCORE+3 + STA theSCORE+3 + CLD + + LDA #$05 + STA theX + LDA #$10 + STA theY + + LDA theSCORE+3 + JSR bcd2dec + LDA theUNITE + JSR outputCHAR + LDA theSCORE+2 + JSR bcd2dec + LDA theDIZAINE + JSR outputCHAR + LDA theUNITE + JSR outputCHAR + LDA theSCORE+1 + JSR bcd2dec + LDA theDIZAINE + JSR outputCHAR + LDA theUNITE + JSR outputCHAR + LDA theSCORE + JSR bcd2dec + LDA theDIZAINE + JSR outputCHAR + LDA theUNITE + JMP outputCHAR + +*------------------------------- +* BCD TO DECIMAL CONVERSION +*------------------------------- + +bcd2dec STA theDIZAINE + AND #$0F + STA theUNITE ; unit + LDA theDIZAINE + LSR + LSR + LSR + LSR + STA theDIZAINE ; dizaine + RTS + +*------------------------------- +* HEX TO DECIMAL CONVERSION +*------------------------------- + +hex2dec LDX #$00 + STX theDIZAINE + STX theCENTAINE ; centaine +L7AFE CMP #100 + BCC L7B08 + INC theCENTAINE + SBC #100 + BNE L7AFE +L7B08 CMP #10 + BCC L7B12 + INC theDIZAINE + SBC #10 + BNE L7B08 +L7B12 STA theUNITE + RTS + +*------------------------------- +* PRINT A CHARACTER +*------------------------------- + +outputCHAR CLC ; print a char + ADC #spr0 + LDX activePAGE + CPX #>HGR2 + BEQ L7B24 + JSR coutHGR1 ; print HGR1 + INC theX + RTS +L7B24 JSR coutHGR2 ; print HGR2 + INC theX + RTS + +*------------------------------- +* FILTER CHARACTER +*------------------------------- + +filterCHAR CMP #"A" + BCC L7B32 + CMP #"Z"+1 + BCC L7B60 +L7B32 LDX #$7C + CMP #" " ; 7C = 00 + BEQ L7B5F + LDX #$DB + CMP #">" ; DB = 5F + BEQ L7B5F + INX + CMP #"." ; DC = 60 + BEQ L7B5F + INX + CMP #"(" ; DD = 61 + BEQ L7B5F + INX + CMP #")" ; DE = 62 + BEQ L7B5F + INX + CMP #"/" ; DF = 63 + BEQ L7B5F + INX + CMP #"-" ; E0 = 64 + BEQ L7B5F + INX + CMP #"<" ; E1 = 65 + BEQ L7B5F + LDA #$10 ; The still Lode Runner + RTS + +L7B5F TXA ; calculate offset +L7B60 SEC + SBC #$7C + RTS + +*----------------------------------- +* OUTPUT A CHARACTER +*----------------------------------- + +printCHAR CMP #chrRET + BEQ L7B7D + JSR filterCHAR + LDX activePAGE + CPX #>HGR2 + BEQ L7B77 + JSR coutHGR1 ; output in HGR1 + INC theX + RTS +L7B77 JSR coutHGR2 ; output in HGR2 + INC theX + RTS + +L7B7D INC theY ; next line + LDA #$00 + STA theX + RTS + +*----------------------------------- +* CTRL-E - LEVEL EDITOR +*----------------------------------- + +enterEDITOR LDA #$00 + STA theSCORE + STA theSCORE+1 + STA theSCORE+2 + STA theSCORE+3 + LDA CSWL + STA CH + LDA CSWH + STA CV + LDA #$05 + STA theMEN + STA fgDEMO + LDA fgINPUT ; save interface mode + STA L7C76+1 + LDA #chrK ; force keyboard in editor + STA fgINPUT + STA TXTPAGE1 + LDA intLEVEL ; check level + CMP #maxLEVEL + BCC editMAIN + LDA #$00 ; start at 0 if > 149 + STA intLEVEL + +editMAIN JSR clearHGR1 ; clear HGR1 + LDA #>HGR1 + STA activePAGE + LDA #$00 + STA theX + STA theY + JSR printSTRING + ASC " LODE RUNNER BOARD EDITOR"8D + ASC "----------------------------"8D + ASC " ABORTS ANY COMMAND"8D00 + +editLOOP LDA theY ; are we at the + CMP #$09 ; end of the screen? + BCS editMAIN ; yes, bottom line + + JSR printSTRING ; no, show command + ASC 8D + ASC "COMMAND>"00 + + JSR editWAITKEY ; wait for key + LDX #$00 +L7C2E LDY tblEDITKEY,X ; authorized key? + BEQ editNEXT + CMP tblEDITKEY,X + BEQ L7C41 + INX + BNE L7C2E + +editNEXT JSR doBEEP ; beep + JMP editLOOP ; loop + +L7C41 TXA ; yes, we know the key + ASL ; jump to the feature + TAX ; and handle it + LDA tblEDITADD+1,X + PHA + LDA tblEDITADD,X + PHA + RTS + +tblEDITKEY ASC "PCEMIS"00 + +tblEDITADD DA editPLAY-1 ; Play level + DA editCLEAR-1 ; Clear level + DA editEDIT-1 ; Edit level + DA editMOVE-1 ; Move level + DA editINIT-1 ; Initialize + DA editCLEARSCORE-1 ; Clear Score file + +*------------------------------- +* P - PLAY LEVEL +*------------------------------- + +editPLAY JSR printSTRING + ASC 8D + ASC ">>PLAY LEVEL"00 + JSR inputLEVEL + BCS L7C8B +L7C76 LDA #$00 + STA fgINPUT + LDA #$03 + STA fgDEMO + LDA #$01 + STA fgGOODSTART + LDA intLEVEL ; do we start at level 1? + BEQ L7C88 + LSR fgGOODSTART ; no, we cannot change scores +L7C88 JMP L6056 +L7C8B JMP editNEXT + +*------------------------------- +* C - CLEAR LEVEL +*------------------------------- + +editCLEAR JSR printSTRING + ASC 8D + ASC ">>CLEAR LEVEL"00 + JSR inputLEVEL + BCS L7CB9 + JSR checkDISK + LDY #$00 + TYA +L7CAB STA levelDISK,Y + INY + BNE L7CAB + LDA #$02 ; write + JSR diskLEVEL + JMP editLOOP +L7CB9 JMP editNEXT + +*------------------------------- +* E - EDIT LEVEL +*------------------------------- + +editEDIT JSR printSTRING + ASC 8D + ASC ">>EDIT LEVEL"00 + JSR inputLEVEL ; is level valid? + BCS L7CD5 ; no + JMP editEDITLEVEL ; yes, handle edit +L7CD5 JMP editNEXT + +*------------------------------- +* M - MOVE LEVEL +*------------------------------- + +editMOVE JSR printSTRING + ASC 8D + ASC ">>MOVE LEVEL"00 + JSR inputLEVEL + BCS L7D5A + STY L824F + JSR printSTRING + ASC " TO LEVEL"00 + JSR inputLEVEL + BCS L7D5A + STY L8250 + JSR printSTRING + ASC 8D + ASC " SOURCE DISKETTE"00 + JSR editWAITKEY + JSR checkDISK + LDA L824F + STA intLEVEL + LDA #$01 ; read + JSR diskLEVEL + JSR printSTRING + ASC 8D + ASC " DESTINATION DISKETTE"00 + JSR editWAITKEY + JSR checkDISK + LDA L8250 + STA intLEVEL + LDA #$02 ; write + JSR diskLEVEL + JMP editLOOP +L7D5A JMP editNEXT + +*------------------------------- +* I - INITIALIZE DISKETTE +*------------------------------- + +editINIT JSR printSTRING + ASC 8D + ASC ">>INITIALIZE"8D + ASC " THIS FORMATS THE DISKETTE"8D + ASC " FOR USER CREATED LEVELS."8D + ASC " (CAUTION. IT ERASES THE"8D + ASC " ENTIRE DISKETTE FIRST)"8D8D + ASC " ARE YOU SURE (Y/N) "00 + JSR editWAITKEY + CMP #chrY + BNE L7E72 + NOP ; NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + LDA intLEVEL + PHA + LDA #$04 ; Init command + JSR diskLEVEL + + LDA #boot + STA LB7F0+1 + LDA #$00 + STA LB7ED + STA LB7EC + LDA #$02 + STA LB7F4 + JSR diskRWTS + LDA #$E0 + STA intLEVEL + LDA #$01 + JSR diskLEVEL + LDY #$37 +L7E33 LDA L8251,Y + STA levelDISK,Y + DEY + BPL L7E33 + LDA #$02 + JSR diskLEVEL + LDA #$EF + STA intLEVEL + LDA #$01 + JSR diskLEVEL + LDY #$20 +L7E4C LDA L8289,Y + STA levelDISK+$B,Y + DEY + BPL L7E4C + LDA #$02 + JSR diskLEVEL + LDA #$01 + JSR readSCORE + LDY #$0A +L7E61 LDA L63A8,Y + STA scorebuf+$F4,Y + DEY + BPL L7E61 + LDA #$02 + JSR readSCORE + PLA + STA intLEVEL +L7E72 JMP editLOOP + +*------------------------------- +* C - CLEAR SCORE FILE +*------------------------------- + +editCLEARSCORE + JSR printSTRING + ASC 8D + ASC ">>CLEAR SCORE FILE"8D + ASC " THIS CLEARS THE HIGH"8D + ASC " SCORE FILE OF ALL"8D + ASC " ENTRIES."8D8D + ASC " ARE YOU SURE (Y/N) "00 + JSR editWAITKEY + CMP #chrY + BNE L7EFE + LDA #$01 + JSR readSCORE + CMP #$00 + BNE L7EEF + JSR tellNODATADISK + JMP editMAIN + +L7EEF LDY #$4F ; clear score file + LDA #$00 +L7EF3 STA scorebuf,Y + DEY + BPL L7EF3 + LDA #$02 + JSR readSCORE ; write score file +L7EFE JMP editLOOP + +*------------------------------- +* EDIT THE LEVEL +*------------------------------- + +editEDITLEVEL + JSR clearHGR2 ; clear HGR2 + LDA #>HGR2 + STA activePAGE + JSR drawINFOBAR ; show frame + LDA #>HGR1 + STA activePAGE + JSR checkDISK ; check diskette (master or data disk) + LDX #$01 + STX fgCHANGE + DEX ; mode edit + JSR prepareLEVEL + BCC L7F1F + JMP editNEXT + +L7F1F LDA #$00 ; cursor is at 0,0 + STA theX + STA theY +L7F25 JSR blinkATXY ; wait for key + CMP #"9"+1 + BCS L7F54 ; no sprite + CMP #"0" ; means check commands + BCC L7F54 + AND #$0F + STA theA ; save key + LDY theY ; get Y + LDA tblBOARDALLL,Y ; get line address + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY theX ; get X + LDA theA ; get sprite + EOR (ptrBOARD),Y ; same as before? + BEQ L7F4A ; yes + LSR fgCHANGE ; no, tell there's a change +L7F4A LDA theA ; get sprite + STA (ptrBOARD),Y ; save it + JSR coutHGR1 ; print sprite + JMP L7F25 ; loop + +L7F54 STA theA ; same key + LDY #$FF +L7F58 INY + LDA tblEDITKEYS,Y ; is that a command? + BEQ L7F6E + CMP theA ; same as our key? + BNE L7F58 + TYA ; yes, jump + ASL + TAY + LDA tblEDITCODE+1,Y + PHA + LDA tblEDITCODE,Y + PHA + RTS + +L7F6E JSR doBEEP ; beep + JMP L7F25 ; loop + +*------------------------------- +* I - MOVE CURSOR UP +*------------------------------- + +editUP LDA theY + BEQ L7F6E + DEC theY + BPL L7F25 + +*------------------------------- +* J - MOVE CURSOR LEFT +*------------------------------- + +editLEFT LDA theX + BEQ L7F6E + DEC theX + BPL L7F25 + +*------------------------------- +* K - MOVE CURSOR RIGHT +*------------------------------- + +editRIGHT LDA theX + CMP #lvlWIDTH-1 + BCS L7F6E + INC theX + BNE L7F25 + +*------------------------------- +* M - MOVE CURSOR DOWN +*------------------------------- + +editDOWN LDA theY + CMP #lvlHEIGHT-1 + BCS L7F6E + INC theY + BNE L7F25 + +*------------------------------- +* SAVE THE LEVEL +*------------------------------- + +saveLEVEL + LDA theY ; save parms + PHA + LDA theX + PHA + + LDA #$01 ; check disk + JSR readSCORE + CMP #$00 + BNE L7FAD + JSR tellNODATADISK + JMP L7FC5 + +L7FAD CMP #$01 + BNE L7FB7 + JSR tellMASTERDISK + JMP L7FC5 + +L7FB7 JSR encodeLEVEL ; prepare the level & save it + PLA + STA theX + PLA + STA theY + LDA #$01 + STA fgCHANGE + RTS ; and return + +L7FC5 LDA #$00 + STA theX + STA theY + JMP L7F25 + +*------------------------------- +* CTRL-S - SAVE YOUR GAME +*------------------------------- + +editSAVE JSR saveLEVEL + JMP L7F25 + +*------------------------------- +* CTRL-U - NEXT LEVEL +*------------------------------- + +editLOAD LDA intLEVEL + CMP #maxLEVEL-1 ; 150-1 +L7FD8 BEQ L7F6E + JSR editSAVECHANGES + INC intLEVEL + INC theLEVEL + JMP editEDITLEVEL + +*------------------------------- +* CTRL-H - PREVIOUS LEVEL +*------------------------------- + +editPREVIOUS + LDA intLEVEL + BEQ L7FD8 + JSR editSAVECHANGES + DEC theLEVEL + DEC intLEVEL + JMP editEDITLEVEL + +*------------------------------- +* CTRL-Q - QUIT GAME GENERATOR +*------------------------------- + +editQUIT JSR editSAVECHANGES + JMP editMAIN + +*------------------------------- +* WANT TO SAVE CHANGES +*------------------------------- + +editSAVECHANGES + LDA fgCHANGE + BNE L8075 + JSR clearHGR2 + LDA #>HGR2 + STA activePAGE + LDA #$00 + STA theX + STA theY + JSR printSTRING + ASC "LEVEL HAS BEEN CHANGED BUT"8D + ASC "NOT SAVED. DO YOU WISH TO"8D + ASC "SAVE MODIFIED LEVEL (Y/N) "00 + JSR doBEEP + STA TXTPAGE2 +L8062 LDA #$00 + JSR L85F3 + STA KBDSTROBE + CMP #chrN + BEQ L8075 + CMP #chrY + BNE L8062 + JSR saveLEVEL +L8075 STA TXTPAGE1 + LDA #$00 + STA theX + STA theY + RTS + +*----------------------------------- +* CHECK DISK +*----------------------------------- + +checkDISK LDA #$01 ; load score + JSR readSCORE + CMP #$00 ; 00 means disk not identified + BNE L808E + JSR tellNODATADISK + JMP editMAIN +L808E CMP #$01 ; 01 means master disk + BNE L8105 + JSR tellMASTERDISK + JMP editMAIN + +*----------------------------------- +* MASTER DISK FOUND +*----------------------------------- + +tellMASTERDISK + JSR clearHGR2 + LDA #>HGR2 + STA activePAGE + LDA #$00 + STA theX + STA theY + JSR printSTRING + ASC "USER NOT ALLOWED TO"8D + ASC "MANIPULATE MASTER DISKETTE."00 + +*----------------------------------- +* WAIT FOR A KEYPRESS +*----------------------------------- + +L80D8 JSR printSTRING + ASC 8D8D + ASC "HIT A KEY TO CONTINUE "00 + JSR doBEEP + STA TXTPAGE2 + LDA #$00 + JSR L85F3 + STA KBDSTROBE + STA TXTPAGE1 + +L8105 RTS + +*----------------------------------- +* LR DATA DISK NOT IDENTIFIED +*----------------------------------- + +tellNODATADISK + JSR clearHGR2 + LDA #>HGR2 + STA activePAGE + LDA #$00 + STA theX + STA theY + JSR printSTRING + ASC "DISKETTE IN DRIVE IS NOT A"8D + ASC "LODE RUNNER DATA DISK."00 + JMP L80D8 + +*----------------------------------- +* BLINK AT XY +*----------------------------------- + +blinkATXY + LDY theY + LDA tblBOARDALLL,Y + STA ptrBOARD + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDY theX + LDA (ptrBOARD),Y + JSR blinkSPRITE + STA KBDSTROBE + RTS + +tblEDITKEYS ASC "JIKM" + HEX 9395889100 + +tblEDITCODE DA editLEFT-1 ; J move left + DA editUP-1 ; I move up + DA editRIGHT-1 ; K move right + DA editDOWN-1 ; M move down + DA editSAVE-1 ; CTRL-S to save your game + DA editLOAD-1 ; CTRL-U to load next level + DA editPREVIOUS-1 ; CTRL-H to load previous level + DA editQUIT-1 ; CTRL-Q to quit game generator + +*------------------------------- +* INPUT LEVEL NUMBER +*------------------------------- + +inputLEVEL + LDY intLEVEL + INY + TYA + JSR hex2dec + LDA theX + STA L824E + LDY #$00 +L8189 LDA |$0089,Y + STY L824D + JSR outputCHAR + LDY L824D + INY + CPY #$03 + BCC L8189 + LDA L824E + STA theX + LDY #$00 + STY L824D +L81A4 LDX L824D + LDA theCENTAINE,X + CLC + ADC #spr0 ; spr0 + JSR blinkSPRITE + STA KBDSTROBE + CMP #chrRET ; return + BEQ L820D + CMP #chrLA ; left arrow + BNE L81C7 + LDX L824D + BEQ L8207 + DEC L824D + DEC theX + JMP L81A4 + +L81C7 CMP #chrRA ; right arrow + BNE L81DA + LDX L824D + CPX #$02 + BEQ L8207 + INC theX + INC L824D + JMP L81A4 + +L81DA CMP #chrESC ; esc + BNE L81E1 + JMP editLOOP + +L81E1 CMP #chrZERO ; 0 + BCC L8207 + CMP #chrNINE+1 ; 9+1 + BCS L8207 + SEC + SBC #chrZERO + LDY L824D + STA |$0089,Y + JSR outputCHAR + + INC L824D + LDA L824D + CMP #$03 + BCC L81A4 + DEC L824D + DEC theX + JMP L81A4 + +L8207 JSR doBEEP + JMP L81A4 + +*------------------------------- +* TRANSFORM A ASC NUMBER IN HEX +*------------------------------- + +L820D LDA L824E + CLC + ADC #$03 + STA theX + LDA #$00 + LDX theCENTAINE + BEQ L8223 + CLC +L821C ADC #100 + BCS L823C + DEX + BNE L821C +L8223 LDX theDIZAINE + BEQ L822F + CLC +L8228 ADC #10 + BCS L823C + DEX + BNE L8228 +L822F CLC + ADC theUNITE + BCS L823C + STA theLEVEL + TAY + DEY + STY intLEVEL ; and make it our level + CPY #maxLEVEL +L823C RTS + +editWAITKEY LDA #sprEMPTY + JSR blinkSPRITE + STA KBDSTROBE + CMP #$9B ; escape + BNE L824C + JMP editLOOP +L824C RTS +L824D RTS + +L824E DB $85 +L824F DB $0F +L8250 DB $60 + +L8251 HEX 02110F040000FE000000000000000000 + HEX 00000000000000000000000000000000 + HEX 000000000000007A0000000000000000 + HEX FFFF0000230F0001 +L8289 HEX 220F8888888888888888CCCFC4C5A0D2 + HEX D5CECEC5D2A0C4C1D4C1A0C4C9D3CBA0 + HEX A0 + +*--------------------------------------- +* PRINT CHAR +*--------------------------------------- + +coutHGR1 STA theA ; char in $1E + LDA #>HGR1 ; print HGR1 + BNE L82B4 + +coutHGR2 STA theA ; char in $1E + LDA #>HGR2 ; print HGR2 + +L82B4 STA hgrPAGE ; page in $1F + LDY theY ; take Y + JSR getXY + STY theYSCREEN ; make it Y screen + LDX theX ; take X + JSR getBYBI + STA theXSCREEN ; make it X screen + STX sprTABLE + LDA tblMASK1,X + STA theMASK1 + LDA tblMASK2,X + STA theMASK2 + JSR getSPRITEDATA + LDA #sprHEIGHT + STA nbLINES + + LDX #$00 + LDA sprTABLE ; derniere table de sprite? + CMP #$05 + BCS L8301 + +*--- sprite de 2 de large + +L82DF LDY theYSCREEN + JSR setHGRPOINTER + LDY theXSCREEN + LDA (ptrHGR1),Y ; 1 + AND theMASK1 + ORA sprDATA,X + STA (ptrHGR1),Y + INX + INY + LDA (ptrHGR1),Y ; 2 + AND theMASK2 + ORA sprDATA,X + STA (ptrHGR1),Y + INX + INX + INC theYSCREEN + DEC nbLINES + BNE L82DF + RTS + +*--- sprite de 3 de large + +L8301 LDY theYSCREEN + JSR setHGRPOINTER + LDY theXSCREEN + LDA (ptrHGR1),Y ; 1 + AND theMASK1 + ORA sprDATA,X + STA (ptrHGR1),Y + INX + INY + LDA sprDATA,X ; 2 + STA (ptrHGR1),Y + INX + INY + LDA (ptrHGR1),Y ; 3 + AND theMASK2 + ORA sprDATA,X + STA (ptrHGR1),Y + INX + INC theYSCREEN + DEC nbLINES + BNE L8301 + RTS + +tblMASK1 HEX 000103070F1F3F ; mask1 +tblMASK2 HEX F8F0E0C080FEFC ; mask2 + +*--------------------------------------- +* DRAW SPRITE AT X,Y +*--------------------------------------- +* draw a sprite at real HGR X,Y (eg. 175,111) + +drawSPRITEXY + STY theYSCREEN + STA theA + JSR getXBYBI + STA theXSCREEN + STX sprTABLE + JSR getSPRITEDATA + LDX #sprHEIGHT ; nb lignes + STX nbLINES + LDX #$00 + LDA sprTABLE + CMP #$05 + BCS L8376 + +*--- sprite de 2 de large + +L8350 LDY theYSCREEN + JSR setHGRPOINTERS + LDY theXSCREEN + LDA sprDATA,X + EOR #$7F + AND (ptrHGR1),Y + ORA (ptrHGR2),Y + STA (ptrHGR1),Y + INX + INY + LDA sprDATA,X + EOR #$7F + AND (ptrHGR1),Y + ORA (ptrHGR2),Y + STA (ptrHGR1),Y + INX + INX + INC theYSCREEN + DEC nbLINES + BNE L8350 + RTS + +*--- sprite de 3 de large + +L8376 LDY theYSCREEN + JSR setHGRPOINTERS + LDY theXSCREEN + LDA sprDATA,X + EOR #$7F + AND (ptrHGR1),Y + ORA (ptrHGR2),Y + STA (ptrHGR1),Y + INX + INY + LDA sprDATA,X + EOR #$7F + AND (ptrHGR1),Y + ORA (ptrHGR2),Y + STA (ptrHGR1),Y + INX + INY + LDA sprDATA,X + EOR #$7F + AND (ptrHGR1),Y + ORA (ptrHGR2),Y + STA (ptrHGR1),Y + INX + INC theYSCREEN + DEC nbLINES + BNE L8376 + RTS + +*--------------------------------------- +* DRAW SPRITE AT X,Y WITH COLLISION +*--------------------------------------- +* $52: 00 if no collision (empty background) +* <>00 if collision + +drawSPRXYCOLLISION + STY theYSCREEN + STA theA + JSR getXBYBI + STA theXSCREEN + STX sprTABLE + JSR getSPRITEDATA + LDA #sprHEIGHT + STA nbLINES + LDX #$00 + STX fgCOLLISION + LDA sprTABLE + CMP #$05 + BCS L83F5 + +*--- sprite de 2 de large + +L83C3 LDY theYSCREEN + JSR setHGRPOINTERS + LDY theXSCREEN + LDA (ptrHGR1),Y + EOR (ptrHGR2),Y + AND sprDATA,X + ORA fgCOLLISION + STA fgCOLLISION + LDA sprDATA,X + ORA (ptrHGR1),Y + STA (ptrHGR1),Y + INX + INY + LDA (ptrHGR1),Y + EOR (ptrHGR2),Y + AND sprDATA,X + ORA fgCOLLISION + STA fgCOLLISION + LDA sprDATA,X + ORA (ptrHGR1),Y + STA (ptrHGR1),Y + INX + INX + INC theYSCREEN + DEC nbLINES + BNE L83C3 + RTS + +*--- sprite de 3 de large + +L83F5 LDY theYSCREEN + JSR setHGRPOINTERS + LDY theXSCREEN + LDA (ptrHGR1),Y + EOR (ptrHGR2),Y + AND sprDATA,X + ORA fgCOLLISION + STA fgCOLLISION + LDA sprDATA,X + ORA (ptrHGR1),Y + STA (ptrHGR1),Y + INX + INY + LDA (ptrHGR1),Y + EOR (ptrHGR2),Y + AND sprDATA,X + ORA fgCOLLISION + STA fgCOLLISION + LDA sprDATA,X + ORA (ptrHGR1),Y + STA (ptrHGR1),Y + INX + INY + LDA (ptrHGR1),Y + EOR (ptrHGR2),Y + AND sprDATA,X + ORA fgCOLLISION + STA fgCOLLISION + LDA sprDATA,X + ORA (ptrHGR1),Y + STA (ptrHGR1),Y + INX + INC theYSCREEN + DEC nbLINES + BNE L83F5 + RTS + +*--------------------------------------- +* GET SPRITE DATA +*--------------------------------------- +* Move sprite data at $df..$ff + +getSPRITEDATA + LDA #sprHEIGHT ; char height + STA nbLINES + + LDA #tblOFFSPR + STA ptrDATA+1 + + LDA tblPTRSPR,X ; one of the six tables + STA L845A+2 + STA L8466+2 + STA L848B+2 + STA L8497+2 + + LDX #$00 +L8455 LDY theA + LDA (ptrDATA),Y + TAY +L845A LDA LA000,Y ; a + STA L846F+1 + CLC + ADC #$01 + STA L8474+1 +L8466 LDA LA080,Y ; a+1 + STA L846F+2 + STA L8474+2 +L846F LDA LA000 ; b + STA sprDATA,X +L8474 LDA LA000 ; b+1 + STA $E0,X + + LDA ptrDATA ; next line + CLC + ADC #$68 + STA ptrDATA + LDA ptrDATA+1 + ADC #$00 + STA ptrDATA+1 + + LDY theA + LDA (ptrDATA),Y + TAY +L848B LDA LA000,Y ; c + STA L84A0+1 + CLC + ADC #$01 + STA L84A7+1 +L8497 LDA LA080,Y ; c+1 + STA L84A0+2 + STA L84A7+2 +L84A0 LDA LA000 ; d + ORA $E0,X + STA $E0,X +L84A7 LDA LA000 ; d+1 + STA $E1,X + + LDA ptrDATA ; next data + CLC + ADC #$68 ; b/c we have 68 sprites + STA ptrDATA + LDA ptrDATA+1 + ADC #$00 + STA ptrDATA+1 + INX + INX + INX + DEC nbLINES + BNE L8455 + RTS + +tblPTRSPR DB >LA200 ; The six tables of sprites + DB >LA300 + DB >LA400 + DB >LA500 + DB >LA600 + DB >LA700 + DB >LA800 + +*--------------------------------------- +* CHECK HIGH SCORE +*--------------------------------------- + +checkHIGHSCORE + LDA fgGOODSTART + BEQ L8514 + LDA theSCORE + ORA theSCORE+1 + ORA theSCORE+2 + ORA theSCORE+3 + BEQ L8514 + LDA #$01 + JSR readSCORE + BEQ L8514 + LDY #$01 ; 1re entre +L84DF LDX scoreoffset,Y + LDA theLEVEL + CMP scorebuf+$03,X + BCC L850F + BNE L8515 + LDA theSCORE+3 + CMP scorebuf+$04,X + BCC L850F + BNE L8515 + LDA theSCORE+2 + CMP scorebuf+$05,X + BCC L850F + BNE L8515 + LDA theSCORE+1 + CMP scorebuf+$06,X + BCC L850F + BNE L8515 + LDA theSCORE + CMP scorebuf+$07,X + BCC L850F + BNE L8515 +L850F INY + CPY #$0B ; dernire entre + BCC L84DF +L8514 RTS + +L8515 CPY #$0A ; dcale les scores vers le bas + BEQ L8536 + STY tempY1 + LDY #$09 +L851D LDX scoreoffset,Y + LDA #$08 + STA nbLINES +L8524 LDA scorebuf,X + STA scorebuf+$08,X + INX + DEC nbLINES + BNE L8524 + CPY tempY1 + BEQ L8536 + DEY + BNE L851D + +L8536 LDX scoreoffset,Y ; permet la saisie des initiales + LDA #chrSPC + STA scorebuf,X + STA scorebuf+$01,X + STA scorebuf+$02,X + LDA theLEVEL + STA scorebuf+$03,X + LDA theSCORE+3 + STA scorebuf+$04,X + LDA theSCORE+2 + STA scorebuf+$05,X + LDA theSCORE+1 + STA scorebuf+$06,X + LDA theSCORE + STA scorebuf+$07,X + STY $69 + LDA scoreoffset,Y + STA L8582+1 + STA L85C9+1 + JSR showALLSCORES + LDA #>HGR2 + STA activePAGE + LDA $69 + CLC + ADC #$04 + STA theY + LDA #$07 + STA theX + LDX #$00 + STX L824D +L857F LDX L824D +L8582 LDA scorebuf,X + JSR filterCHAR + JSR L85F3 + STA KBDSTROBE + CMP #chrRET + BEQ L85E7 + CMP #chrLA + BNE L85A3 + LDX L824D + BEQ L85E1 + DEC L824D + DEC theX + JMP L857F + +L85A3 CMP #chrRA + BNE L85B6 + LDX L824D + CPX #$02 + BEQ L85E1 + INC theX + INC L824D + JMP L857F + +L85B6 CMP #chrDOT + BEQ L85C6 + CMP #chrSPC + BEQ L85C6 + CMP #chrA + BCC L85E1 + CMP #chrZ+1 + BCS L85E1 +L85C6 LDY L824D +L85C9 STA scorebuf,Y + JSR printCHAR + INC L824D + LDA L824D + CMP #$03 ; max nb chars + BCC L857F + DEC L824D + DEC theX + JMP L857F + +L85E1 JSR doBEEP + JMP L857F + +L85E7 LDA #>HGR1 + STA activePAGE + LDA #$02 + JSR readSCORE + JMP L618E + +L85F3 STA bsDATA +L85F6 LDA #$68 + STA counter + LDA bsDATA + BNE L8601 + LDA #sprCURSOR +L8601 JSR coutHGR2 +L8604 LDA KBD + BMI L8628 + JSR checkMOVEMENT + DEC counter + BNE L8604 + LDA #sprEMPTY + JSR coutHGR2 + LDA #$68 + STA counter +L8619 LDA KBD + BMI L8628 + JSR checkMOVEMENT + DEC counter + BNE L8619 + JMP L85F6 + +L8628 PHA + LDA bsDATA + JSR coutHGR2 + PLA + RTS + +*----------------------------------- +* SHOW INVISIBLE LADDERS +*----------------------------------- + +showINVISIBLELADDERS + LDA #$00 + STA tblLADDERIX + LDX idxLADDERI + STX L869E +L863B LDX L869E + BEQ L8696 + LDA tblLADDERIX,X + BMI L8690 + STA theX + LDA tblLADDERIY,X + STA theY + TAY + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + LDY theX + LDA (ptrBBACK),Y + BNE L868B + LDA #sprLADDER + STA (ptrBBACK),Y + LDA (ptrBOARD),Y + BNE L8670 + LDA #sprLADDER + STA (ptrBOARD),Y +L8670 LDA #sprLADDER + JSR coutHGR2 + LDX theX + LDY theY + JSR getXY + LDA #sprLADDER + JSR drawSPRXYCOLLISION + LDX L869E + LDA #$FF + STA tblLADDERIX,X + BMI L8690 +L868B LDA #$01 + STA tblLADDERIX +L8690 DEC L869E + JMP L863B + +L8696 LDA tblLADDERIX + BNE L869D + DEC nbCHEST +L869D RTS + +L869E DB $00 + +*----------------------------------- +* WAIT KEY UP +*----------------------------------- + +waitKEYUP + STA KBDSTROBE + LDA KBD + BMI waitKEYUP + RTS + +*----------------------------------- +* WAIT KEY DOWN +*----------------------------------- + +waitKEYDOWN + LDA KBD + BPL waitKEYDOWN + STA KBDSTROBE + RTS + +*----------------------------------- +* WAIT +*----------------------------------- + +doWAIT LDA L86BE,X + TAX +doWAIT1 LDY #$B4 +]lp DEY + BNE ]lp + DEX + BNE doWAIT1 + RTS + +L86BE HEX 020406080A0C0E10121416181A1C1E20 + +*----------------------------------- +* The CTRL-G of Lode Runner +*----------------------------------- + +doBEEP LDY #$C0 +L86D0 LDX #$80 +L86D2 DEX + BNE L86D2 + LDA fgSOUND + BEQ L86DC + LDA SPKR +L86DC DEY + BNE L86D0 + RTS + +*----------------------------------- +* PRINT STRING +*----------------------------------- + +printSTRING + PLA + STA ptrSTRSND + PLA + STA ptrSTRSND+1 + BNE L86F1 +L86E8 LDY #$00 + LDA (ptrSTRSND),Y + BEQ L86F9 + JSR printCHAR +L86F1 INC ptrSTRSND + BNE L86E8 + INC ptrSTRSND+1 + BNE L86E8 +L86F9 LDA ptrSTRSND+1 + PHA + LDA ptrSTRSND + PHA + RTS + +*----------------------------------- +* BLINK SPRITE +*----------------------------------- +* sprite is in A + +blinkSPRITE + STA bsDATA +L8703 LDA #$68 + STA counter + LDA #sprEMPTY + LDX bsDATA + BNE L8710 + LDA #sprCURSOR ; cursor sprite +L8710 JSR coutHGR1 ; output empty +L8713 LDA KBD ; key pressed? + BMI L873C ; yes + JSR checkMOVEMENT ; buttons pressed? + BCS L873C ; yes + DEC counter + BNE L8713 + LDA bsDATA ; output sprite + JSR coutHGR1 + LDA #$68 ; redo the wait + STA counter +L872B LDA KBD + BMI L873C + JSR checkMOVEMENT + BCS L873C + DEC counter + BNE L872B + JMP L8703 + +L873C PHA ; exit with + LDA bsDATA ; sprite + JSR coutHGR1 + PLA + RTS + +bsDATA DB ptrBOARD + +*----------------------------------- +* READ JOYSTICK +*----------------------------------- + +readJOYSTICK + LDA #$00 + STA theJOYX + STA theJOYY + LDA PTRIG +L874F LDX #$01 +L8751 LDA PADDL0,X + BPL L8769 + INC theJOYX,X +L8758 DEX + BPL L8751 + LDA PADDL0 + ORA PADDL1 + BPL L876C + LDA theJOYX + ORA theJOYY + BPL L874F +L8769 NOP + BPL L8758 +L876C RTS + +*----------------------------------- +* CHECK MOVEMENT +*----------------------------------- + +checkMOVEMENT + LDA fgINPUT + CMP #chrK + BEQ L8798 + JSR readJOYSTICK + LDA theJOYX + CMP #minJOY + BCC L8796 + CMP #maxJOY + BCS L8796 + LDA theJOYY + CMP #minJOY + BCC L8796 + CMP #maxJOY + BCS L8796 + LDA BUTN1 + BMI L8796 + LDA BUTN0 + BMI L8796 + CLC + RTS +L8796 SEC + RTS + +L8798 LDX #$02 ; wait routine +L879A DEY ; to compensate + BNE L879A ; the skipped code above + DEX + BNE L879A + CLC + RTS + +*----------------------------------- +* CHECK JOYSTICK +*----------------------------------- + +checkJOYSTICK + LDA PTRIG + LDX #$10 +L87A7 LDA PADDL0 + ORA PADDL1 + BPL L87B9 + DEY + BNE L87A7 + DEX + BNE L87A7 + LDA #chrK + STA fgINPUT +L87B9 RTS + +*----------------------------------- +* PLAY A SOUND +*----------------------------------- + +playSOUND STA ptrDATA + STX $0B +L87BE LDA fgSOUND + BEQ L87C5 + LDA SPKR +L87C5 DEY + BNE L87CC + DEC $0B + BEQ L87D4 +L87CC DEX + BNE L87C5 + LDX ptrDATA + JMP L87BE +L87D4 RTS + +*----------------------------------- +* GET NOTE +*----------------------------------- + +getNOTE INC idxNOTE + LDY idxNOTE + STA sndNOTE,Y + TXA + STA sndDURATION,Y + RTS + +*----------------------------------- +* PREPARE SOUND +*----------------------------------- + +prepareMELODY + PLA + STA ptrSTRSND + PLA + STA ptrSTRSND+1 + BNE L8802 +L87E9 LDY #$00 ; move sound + LDA (ptrSTRSND),Y ; to the two + BEQ L880A ; buffers + INC idxNOTE + LDX idxNOTE + STA sndDURATION,X + INY + LDA (ptrSTRSND),Y + STA sndNOTE,X + INC ptrSTRSND + BNE L8802 + INC ptrSTRSND+1 +L8802 INC ptrSTRSND + BNE L87E9 + INC ptrSTRSND+1 + BNE L87E9 +L880A LDA ptrSTRSND+1 + PHA + LDA ptrSTRSND + PHA + RTS + +*----------------------------------- +* PLAY MELODY +*----------------------------------- + +playMELODY LDY idxNOTE + BEQ L8832 + LDA sndNOTE,Y + LDX sndDURATION,Y + JSR playSOUND ; play note + LDY idxNOTE + DEC idxNOTE + LDA theSPEED + SEC + SBC sndDURATION,Y + BEQ L8830 + BCC L8830 + TAX + JSR doWAIT1 ; wait +L8830 SEC + RTS + +L8832 LDA fgHEROFELL ; is the hero in a hole? + BNE L8844 ; yes + LDA fgSPEED + LSR + INC fgSPEED + LDX theSPEED + INX + INX + JSR playSOUND + CLC + RTS + +L8844 LDX theSPEED ; wait.... + JSR doWAIT + CLC + RTS + +*------------------------------- +* SET BOARD LINE POINTERS +*------------------------------- + +setBOARDLINEPOINTERS + LDA tblBOARDALLL,Y + STA ptrBOARD + STA ptrBBACK + LDA tblBOARDALLH,Y + STA ptrBOARD+1 + LDA tblBOARDBACKH,Y + STA ptrBBACK+1 + RTS + +*------------------------------- +* FROM A Y IN TEXT TO A Y IN HGR +*------------------------------- + +getXY LDA ytable,Y ; in: board X/Y + PHA ; out: hgr X/Y + LDA xtable,X + TAX + PLA + TAY + RTS + +getBYBI LDA bytable,X + PHA + LDA bitable,X + TAX + PLA + RTS + +getXBYBI LDA xbytable,X + PHA + LDA xbitable,X + TAX + PLA + RTS + +*------------------------------- +* CALCULATE HGR Y-COORD +*------------------------------- +* on entry: +* X is a sprite step +* Y is a board index +* on exit: +* X is garbage +* Y is the HGR coordinate + +calcHGRY TXA ; in: board X/Y + PHA ; out: hgr X / diff Y + JSR getXY + PLA + TAX + TYA + CLC + ADC tblDELTAY,X + TAY + RTS + +tblDELTAY HEX FBFD000204 ; -5, -3, 0, 2, 4 + +*------------------------------- +* CALCULATE HGR X-COORD +*------------------------------- +* on entry: +* X is a board index +* Y is a sprite step +* on exit: +* X is the HGR coordinate +* Y is garbage + +calcHGRX TYA + PHA + JSR getXY + PLA + TAY + TXA ; X in HGR + Y step + CLC + ADC tblDELTAX,Y + TAX + RTS + +tblDELTAX HEX FEFF000102 ; -2, -1, 0, 1, 2 + +*------------------------------- +* CIRCLE ANIMATION +*------------------------------- + +circleANIMATION + LDA #$58 ; 88 + STA $73 + LDA #$8C ; 140 + STA $74 + LDA fgCIRCLE ; inner or outer animation? + BEQ L88BD ; show the level + +*--- hide the level + + LDX #$AA ; 170 + STX $6D + LDX #$00 ; 0 + STX $72 +L88B6 JSR L88D7 + DEC $6D + BNE L88B6 + +*--- show the level + +L88BD LDA #$01 ; 1 + STA $6D + STA fgCIRCLE + STA $72 ; 1 + JSR printMEN + JSR printLEVEL +L88CB JSR L88D7 + INC $6D + LDA $6D + CMP #$AA ; 170 + BNE L88CB + RTS + +L88D7 LDA $6D + STA $69 + LDA #$00 + STA $6A + STA $67 + STA $68 + LDA $69 + ASL + STA $6B + LDA $6A + ROL + STA $6C + LDA #$03 + SEC + SBC $6B + STA $6B + LDA #$00 + SBC $6C + STA $6C + LDA $73 + SEC + SBC $6D + STA $75 + LDA #$00 + SBC #$00 + STA $79 + LDA $73 + STA $76 + STA $77 + LDA #$00 + STA $7A + STA $7B + LDA $73 + CLC + ADC $6D + STA $78 + LDA #$00 + ADC #$00 + STA $7C + LDA $74 + SEC + SBC $6D + TAX + LDA #$00 + SBC #$00 + JSR L8A45 + STY $7D + STA $81 + LDX $74 + LDA #$00 + JSR L8A45 + STY $7E + STY $7F + STA $82 + STA $83 + LDA $74 + CLC + ADC $6D + TAX + LDA #$00 + ADC #$00 + JSR L8A45 + STY $80 + STA $84 +L8951 LDA $68 + CMP $6A + BCC L896F + BEQ L8969 +L8959 LDA $67 + CMP $69 + BNE L8968 + LDA $68 + CMP $6A + BNE L8968 + JMP L8A69 +L8968 RTS + +L8969 LDA $67 + CMP $69 + BCS L8959 +L896F JSR L8A69 + LDA $6C + BPL L89A7 + LDA $67 + ASL + STA $6F + LDA $68 + ROL + STA $70 + LDA $6F + ASL + STA $6F + LDA $70 + ROL + STA $70 + LDA $6B + CLC + ADC $6F + STA $6F + LDA $6C + ADC $70 + STA $70 + LDA #$06 + CLC + ADC $6F + STA $6B + LDA #$00 + ADC $70 + STA $6C + JMP L8A14 + +L89A7 LDA $67 + SEC + SBC $69 + STA $6F + LDA $68 + SBC $6A + STA $70 + LDA $6F + ASL + STA $6F + LDA $70 + ROL + STA $70 + LDA $6F + ASL + STA $6F + LDA $70 + ROL + STA $70 + LDA $6F + CLC + ADC #$10 + STA $6F + LDA $70 + ADC #$00 + STA $70 + LDA $6F + CLC + ADC $6B + STA $6B + LDA $70 + ADC $6C + STA $6C + LDA $69 + PHP + DEC $69 + PLP + BNE L89EC + DEC $6A +L89EC INC $75 + BNE L89F2 + INC $79 +L89F2 DEC $84 + BPL L89FC + LDA #$06 + STA $84 + DEC $80 +L89FC INC $81 + LDA $81 + CMP #$07 + BNE L8A0A + LDA #$00 + STA $81 + INC $7D +L8A0A DEC $78 + LDA $78 + CMP #$FF + BNE L8A14 + DEC $7C +L8A14 INC $67 + BNE L8A1A + INC $68 +L8A1A INC $83 + LDA $83 + CMP #$07 + BNE L8A28 + LDA #$00 + STA $83 + INC $7F +L8A28 DEC $76 + LDA $76 + CMP #$FF + BNE L8A32 + DEC $7A +L8A32 INC $77 + BNE L8A38 + INC $7B +L8A38 DEC $82 + BPL L8A42 + LDA #$06 + STA $82 + DEC $7E +L8A42 JMP L8951 + +L8A45 STX $6F + LDY #$08 + SEC + SBC #$07 +L8A4C PHP + ROL $70 + ASL $6F + ROL + PLP + BCC L8A5A + SBC #$07 + JMP L8A5C + +L8A5A ADC #$07 +L8A5C DEY + BNE L8A4C + BCS L8A64 + ADC #$07 + CLC +L8A64 ROL $70 + LDY $70 + RTS + +L8A69 LDY $7C + BNE L8A8C + LDY $78 + CPY #$B0 + BCS L8A8C + JSR setHGRPOINTERS + LDY $7F + CPY #$28 + BCS L8A81 + LDX $83 + JSR L8AF6 +L8A81 LDY $7E + CPY #$28 + BCS L8A8C + LDX $82 + JSR L8AF6 +L8A8C LDY $79 + BNE L8AAF + LDY $75 + CPY #$B0 + BCS L8AAF + JSR setHGRPOINTERS + LDY $7F + CPY #$28 + BCS L8AA4 + LDX $83 + JSR L8AF6 +L8AA4 LDY $7E + CPY #$28 + BCS L8AAF + LDX $82 + JSR L8AF6 +L8AAF LDY $7B + BNE L8AD2 + LDY $77 + CPY #$B0 + BCS L8AD2 + JSR setHGRPOINTERS + LDY $80 + CPY #$28 + BCS L8AC7 + LDX $84 + JSR L8AF6 +L8AC7 LDY $7D + CPY #$28 + BCS L8AD2 + LDX $81 + JSR L8AF6 +L8AD2 LDY $7A + BNE L8AF5 + LDY $76 + CPY #$B0 + BCS L8AF5 + JSR setHGRPOINTERS + LDY $80 + CPY #$28 + BCS L8AEA + LDX $84 + JSR L8AF6 +L8AEA LDY $7D + CPY #$28 + BCS L8AF5 + LDX $81 + JMP L8AF6 +L8AF5 RTS + +L8AF6 LDA $72 + BNE L8B02 + LDA (ptrHGR1),Y + AND L8B0C,X + STA (ptrHGR1),Y + RTS + +L8B02 LDA (ptrHGR2),Y + AND L8B13,X + ORA (ptrHGR1),Y + STA (ptrHGR1),Y + RTS + +L8B0C HEX F0F0F0F08F8F8F +L8B13 HEX 8F8F8F8FF0F0F0 + +*------------------------------- +* SHOW GAME OVER +*------------------------------- + +animGAMEOVER + LDA #$01 + STA L8D4B + LDA #>HGR1 + STA hgrPAGE + +L8B23 JSR L8BCF + JSR L8BBE + JSR L8BAD + JSR L8B9C + JSR L8B8B + JSR L8B7A + JSR L8B8B + JSR L8B9C + JSR L8BAD + JSR L8BBE + JSR L8BCF + JSR L8C24 + JSR L8C13 + JSR L8C02 + JSR L8BF1 + JSR L8BE0 + JSR L8BF1 + JSR L8C02 + JSR L8C13 + JSR L8C24 + LDA L8D4B + CMP #$64 + BCC L8B23 + JSR L8BCF + JSR L8BBE + JSR L8BAD + JSR L8B9C + JSR L8B8B + JSR L8B7A + CLC + RTS + +L8B7A JSR drawGOLINE + HEX 000102030405060708090A020100 +L8B8B JSR drawGOLINE + HEX 0000010203040507090A02010000 +L8B9C JSR drawGOLINE + HEX 00000001020304090A0201000000 +L8BAD JSR drawGOLINE + HEX 000000000102030A020100000000 +L8BBE JSR drawGOLINE + HEX 000000000001030A010000000000 +L8BCF JSR drawGOLINE + HEX 0000000000000101000000000000 +L8BE0 JSR drawGOLINE + HEX 0001020A09080706050403020100 +L8BF1 JSR drawGOLINE + HEX 000001020A090705040302010000 +L8C02 JSR drawGOLINE + HEX 00000001020A0904030201000000 +L8C13 JSR drawGOLINE + HEX 0000000001020A03020100000000 +L8C24 JSR drawGOLINE + HEX 0000000000010A03010000000000 + +L8C35 HEX 8080808080808080808080808080 +L8C43 HEX C0AAD5AAD5AAD5AAD5AAD5AAD580 +L8C51 HEX 9080808080808080808080808082 +L8C5F HEX 90AAD1A2D5A885A8C5A2D4A29582 +L8C6D HEX 908291A2C5A88088C5A294A09082 +L8C7B HEX 908290A2C4A88088C5A294A09082 +L8C89 HEX 908290A2C4A88188C4A2D4A09582 +L8C97 HEX 90A2D1A2C4888088C4A284A08582 +L8CA5 HEX 908291A2C4888088C4AA84A08582 +L8CB3 HEX 908291A2C4888088C48A84A09182 +L8CC1 HEX 90AA91A2C4A885A88582D4A29182 + +L8CCF DA L8C35-$D + DA L8C43-$D + DA L8C51-$D + DA L8C5F-$D + DA L8C6D-$D + DA L8C7B-$D + DA L8C89-$D + DA L8C97-$D + DA L8CA5-$D + DA L8CB3-$D + DA L8CC1-$D + +drawGOLINE PLA ; pour afficher game over + STA ptrDATA + PLA + STA ptrDATA+1 + LDY #$50 + STY theY + BNE L8D12 +L8CF1 JSR setHGRPOINTER + LDY #$00 + LDA (ptrDATA),Y + ASL + TAX + LDA L8CCF,X + STA L8D08+1 + LDA L8CCF+1,X + STA L8D08+2 + LDY #$0D +L8D08 LDA L8D08,Y + STA (ptrHGR1),Y + INY + CPY #lvlWIDTH-1 + BCC L8D08 +L8D12 JSR L8D4C + INC theY + LDY theY + CPY #$5F + BCC L8CF1 + LDX L8D4B + LDY #$FF +L8D22 DEY + BNE L8D22 + DEX + BNE L8D22 + INC L8D4B + LDA fgINPUT + CMP #chrK + BEQ L8D3B + LDA BUTN1 + BMI L8D41 + LDA BUTN0 + BMI L8D41 +L8D3B LDA KBD + BMI L8D41 + RTS + +L8D41 PLA + PLA + SEC + LDA KBD + STA KBDSTROBE + RTS + +L8D4B DB $9D + +L8D4C INC ptrDATA + BNE L8D52 + INC ptrDATA+1 +L8D52 RTS + + ds \ + +*------------------------------- +* NOT USED? +*------------------------------- + +L8E00 LDA #$44 ; MASTER DISKETTE + STA $0478 + LDA #$00 + JSR LB9A0 + NOP + NOP + NOP + NOP + NOP + NOP + LDA #$20 + STA $4F +L8E14 DEY + BNE L8E20 + DEC $4F + BNE L8E20 + JMP LBEAF + + NOP + NOP +L8E20 LDA $C08C,X + BPL L8E20 +L8E25 CMP #$D4 + BNE L8E14 + NOP +L8E2A LDA $C08C,X + BPL L8E2A +L8E2F CMP #$D5 + BNE L8E25 + NOP +L8E34 LDA $C08C,X + BPL L8E34 + CMP #$D6 + BNE L8E2F + LDA $C088,X + JSR tellMASTERDISK + JMP editMAIN + + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + JMP LB7B5 + + ds \ + +*--------------------------------------- + + put LR.Tables + put LR.RWTS diff --git a/loderunner/LR.DATA.S b/loderunner/LR.DATA.S new file mode 100644 index 0000000..24fc1b2 --- /dev/null +++ b/loderunner/LR.DATA.S @@ -0,0 +1,750 @@ +* +* Lode Runner +* (c) 1983, Broderbund Software +* (s) 2014, Brutal Deluxe Software +* + + mx %11 + lst off + +* Sprites : 102 + +* sprEMPTY = 0 +* sprWALL = 1 +* sprWALLI = 2 ; mur indestructible +* sprLADDER = 3 +* sprBAR = 4 +* sprTRAP = 5 +* sprLADDERI = 6 +* sprCHEST = 7 +* sprFOE = 8 +* sprHERO = 9 + +* 3B: 0 +* 45: A +* 5E: Z + +*--------------------------------------- +* HGR 280 x 192 +* Board 28 x 16 +* Sprite 10 x 11 +* -------------------- +* 280 x 171 + +*--- Decoded level (28 x 16) + +L0800 DS lvlWIDTH ; le plateau avec les personnages +L081C DS lvlWIDTH +L0838 DS lvlWIDTH +L0854 DS lvlWIDTH +L0870 DS lvlWIDTH +L088C DS lvlWIDTH +L08A8 DS lvlWIDTH +L08C4 DS lvlWIDTH +L08E0 DS lvlWIDTH +L08FC DS lvlWIDTH +L0918 DS lvlWIDTH +L0934 DS lvlWIDTH +L0950 DS lvlWIDTH +L096C DS lvlWIDTH +L0988 DS lvlWIDTH +L09A4 DS lvlWIDTH + ds \ + +L0A00 DS lvlWIDTH ; le plateau sans les personnages +L0A1C DS lvlWIDTH +L0A38 DS lvlWIDTH +L0A54 DS lvlWIDTH +L0A70 DS lvlWIDTH +L0A8C DS lvlWIDTH +L0AA8 DS lvlWIDTH +L0AC4 DS lvlWIDTH +L0AE0 DS lvlWIDTH +L0AFC DS lvlWIDTH +L0B18 DS lvlWIDTH +L0B34 DS lvlWIDTH +L0B50 DS lvlWIDTH +L0B6C DS lvlWIDTH +L0B88 DS lvlWIDTH +L0BA4 DS lvlWIDTH + ds \ + +*--- $0C00 + +sizeLI = 48 ; on pourrait avoir 48 chelles invisibles +tblLADDERIX ds sizeLI ; $0C00 mais le jeu n'en autorise +tblLADDERIY ds sizeLI ; que 45 + +sizeFOE = 8 ; on pourrait avoir 8 ennemis +tblFOEX ds sizeFOE ; $0C60 mais le jeu n'en autorise +tblFOEY ds sizeFOE ; que 5 +tblFOEACTION ds sizeFOE +tblFOESTEPX ds sizeFOE ; animation step in x-coord +tblFOESTEPY ds sizeFOE ; animation step in y-coord +tblFOEINDEX ds sizeFOE ; animation index +tblFOELEFTRIGHT ds sizeFOE ; does foe runs to the left or to the right? +tblFOETEMPO ds sizeFOE ; performs actions based on value + +sizeHOLE = 32 ; nombre de trous possibles +tblHOLEX ds sizeHOLE ; $0CA0 X des trous +tblHOLEY ds sizeHOLE ; Y des trous +tblHOLET ds sizeHOLE ; tempo des trous + +*--- $0D00 - Level buffer from/to disk + +levelDISK ds 256 + +*--- $0E00 - buffer pour le son + +sndDURATION ds 128 +sndNOTE ds 128 + +*--- $0F00 - Title page until $1A84 + +logo HEX 128518851C9423A80011A09518851C94 + HEX 23A80011A09518851C9423A80011A8D0 + HEX 18851C9423A80006940C8511A8D01885 + HEX 1C9423A80006940C8511A8D018851C94 + HEX 23A80006940C8511A8D018851C9423A8 + HEX 000484A0D582908081A8D5808411A8D0 + HEX 18851C9423A8000494A0D582948085A8 + HEX D5808511A89418851C9423A80004D5A0 + HEX D582D5A095A8D5A09511A8958085A880 + HEX A885A880A8D48294A8C082C0AA0004D5 + HEX 8294A0D5A0D58085A89511A895A085AA + HEX 81AA85AA81AAD48A94A8D08AD0AA0004 + HEX D58A94A8D5A0D58285AA9511A895A085 + HEX AA80AA85AA81AAD48A94A8D08AD0AA00 + HEX 0494AA94AA9480C58AC58A8511A8D4A8 + HEX C18AC482C582C58A94A894A894A894A8 + HEX 000494A8D58A948085AAD5828511A8D0 + HEX A8C082C582C582C58294A894A894A894 + HEX A8000490A0D582948085A8D5808511A8 + HEX D0A8C082C582C582C58294A894A894A8 + HEX 94A80004D080D580858094A095A08111 + HEX A8D0A8C082C582C5AAC18294A894A894 + HEX A894A80004D0088580940DA08111A8D0 + HEX A8C082C582C5AAC18294A894A894A894 + HEX A80004D0088580940DA08111A8D0A8C0 + HEX 82C582C5AAC08294A894A894A894A800 + HEX 04D0088580940DA08111A8D0A8C082C5 + HEX 82C582C08294A894A894A894A80004D0 + HEX 08858A940DA08111A8D0A8C080C582C5 + HEX 82C48294A894A894A894A80004C08280 + HEX A0818AD00DA811A8D0A88080C582C582 + HEX C58294A894A894A894A80004C08280A0 + HEX 818AD00DA811A895A880AA81AA81AAC1 + HEX 82D08AD08A94A8D08A0004C08280A0D1 + HEX AAD10DA811A895A880AA81AA81AAC182 + HEX D08AD08A94A8D08A0004C08280A0D1AA + HEX D10DA811A885A880A880A880A8C082C0 + HEX 82C08294A8C0820005AAD5A2D1AAD1A8 + HEX D58A0005AAD582818A90A8D58A0005AA + HEX D582858A94A8D58A00078A958A958A13 + HEX A08517A08100078AD4AA858A13A88517 + HEX A88100078AD0AA818A13A88517A8D100 + HEX 07A8C0AAC08213AA17AAD00007A80AC0 + HEX 82138A178AD00007A80AC082138A178A + HEX D00007A80AC082138A178AD00007A80A + HEX C082138A178AD00007A08180D0138A17 + HEX 8AD00007A08180D013A880A8C0AAD482 + HEX 858A94A081A0C18A0007A08180D013A8 + HEX 80AAC1AAD482858A94A885A8C1AA0007 + HEX A08180D013A880AAC1AAD482858A94A8 + HEX 85A8D1AA0008D5AA9513A8C182858AD0 + HEX 80858A948A94AAD0A0810008D5AA9513 + HEX A0C182858AD080858A9482948AD0A081 + HEX 0008D5AA9513A0C582858AD080858A94 + HEX 80948AD0A0810014C582858AD080858A + HEX 94A0958AD0AA0014C582858AD080858A + HEX 94A8958AD0AA0014C582858AD080858A + HEX 94A8958AD08A0014C582858AD080858A + HEX 948A948AD00014C582858AD080858A94 + HEX 8A948AD080810013A0C582858AD08285 + HEX 8A948A948AD0A0810013AA81AA818AC0 + HEX 8AD4AA85A8858AC0AA0013AA81AA818A + HEX C08AD4AA85A8858AC0AA0013AA80A880 + HEX 8A808AD0A081A0818A808A0000000000 + HEX 0000000000000DD08A000DD0A817C082 + HEX 000DD0A817C082000DD0A8D08295A095 + HEX A881AAD08AD482000DD08A94A0D1A880 + HEX 8AC5A2C18285000DD08094A0D1A8808A + HEX C5A2C18285000DD08094A095A085AAC1 + HEX A2C182D4000DD08094A08180948AC0A2 + HEX C182C082000DD08094A08180948AC0A2 + HEX C182C082000DD080948095A885A8C1A2 + HEX 818AD50000000000000000000000C0FF + HEX 9F09C0FF9F11FEFFFF9F00E0FFBF09E0 + HEX FFBF11FFFFFFBF0080FFBF0AFFBF11FC + HEX FFFFBF0080FFBF0AFFBF11FCFFFFBF00 + HEX 80FFBF0AFFBF11FEFFFFBF00C0FFBF0A + HEX FF9F11FEFFFFBF00C0FFBF0AFF9F11FE + HEX FFFFBF00C0FF9F0AFF9F11FEFFFFBF00 + HEX C0FF9F80F0FFFF83F8FFFF9FF8FFFF80 + HEX 80FFBFFC9FF8FFFCBFFCFFF8FFF0FFF3 + HEX FF80FFFF9FFE9FBE00C0FF9F80FCFFFF + HEX 87FCFFFF9FFCFFFF8180FFBFF89FFCFF + HEX F9FFF8FFFEFFE1FFFBFFC0FFFF9FFFBF + HEX BF00E0FF9F80FCFFFF87FEFFFF8FFEFF + HEX FF8180FFBFF89FF0FFF9FFF8FFFEFFE1 + HEX FFFBFFE1FFFFBFFCFFBF00E0FF9F80FE + HEX FFFF87FFFFFF8FFEFFFF8180FFBFF89F + HEX F0FFF9FFF8FFFFFFE1FFFFFFE1FFFFBF + HEX FCFFBF00E0FF8F80FEFFFF87FFFFFF8F + HEX FFFFFF8180FF9FFC9FF0FFF8BFF8FFFF + HEX FFE1FFFFFFF1FFFFBFFEFF9F00E0FF8F + HEX 80FEFFFFC7FFFFFF8FFFFFFF81C0FF9F + HEX FC8FF0FFFCBFF8FFFFFFE1FFFFFFF0FF + HEX FFBFFEFF9F00F0FF8F80FEFFFFC7FFFF + HEX FFC7FFFFFF81C0FF9FFE8FF0FFFCBFF8 + HEX FFFFFFE1FFFFFFF0FFFF9FFEFF9F00F0 + HEX FF8F80FFFFFFE7FFFFFFC7FFFFFF81C0 + HEX FFFFFF8FF0FFFCBFF8FFFFFFE1FFFFFF + HEX F0FFFF9FFEFF8F00F0FF8780FF87FFE7 + HEX FFE1FFC7FFC3FF81C0FFFFFF8FF8BFFC + HEX BFF8FFFCFFF0FFF9FFF8FFE19FFEBF00 + HEX F0FF8780FFC7FFE3FFE1FFE7FFE1FF81 + HEX E0FFFFFF87F8BFFC9FFCFFFCFFF0FFF8 + HEX FFF8FFF09FFF9F00F0FF8780FFC7FFE3 + HEX FFF1FFE7FFE1FF80E0FFFFFF81F8BFFE + HEX 9FFCBFFCFFF0FFF8BFF8FFF08FFF9F00 + HEX F8FF87C0FFC3FFF3FFF1FFE3FFFFFF80 + HEX E0FFFFFF80F8BFFE9FFCBFFCFFF0FFF8 + HEX BFF8FFFF8FFF8F00F8FF87C0FFC3FFF3 + HEX FFF0FFF3FFFFFF80E0FFFFBF80F89FFE + HEX 9FFCBFFCBFF8FFFCBFFCFFFF8FFF8F00 + HEX F8FF83C0FFC3FFF3FFF0FFF3FFFFBF80 + HEX E0FFFFBF80FC9FFE8FFCBFFCBFF8BFFC + HEX BFFCFFFFCFFF8F00F8FF83C0FFE3FFF9 + HEX FFF0FFF3FFFFBF80F0FFFFBF80FC9FFE + HEX 8FFEBFFEBFF8BFFC9FFCFFFFC7FF8F00 + HEX F8FF83E0FFE1FFF9FFF8FFF9FF838080 + HEX F0FFFFFF80FC9FFF8FFE9FFEBFF8BFFC + HEX 9FFCBF80C0FF8700FCFF83E0FFE1FFF9 + HEX BFF8FFF9FF818080F0FFFFFF80FC9FFF + HEX 8FFE9FFE9FF8BFFE9FFEBF80C0FF8700 + HEX FCFF81E0FFE1FFF9BFF8FFF9FF818080 + HEX F0FFFBFF81FE8FFF8FFE9FFE9FFCBFFE + HEX 9FFE9F80C0FF8700FCFF81E4FFF1FFF8 + HEX BFF8FFF9FF809080F8FFF3FF81FECFFF + HEX 87FF9FFF9FFC9FFE9FFE9F80E2FF8700 + HEX FCFF81E6FFF1FFF8BFFCFFF9FF819880 + HEX F8FFF3FF81FECFFF87FF8FFF9FFC9FFE + HEX 8FFEBF80E3FF8300FEFFFFF7FFFFFFF8 + HEX FFFFFFFCFFFF9F80F8FFF3FF93FEFFFF + HEX 87FF8FFF8FFC9FFE8FFEFFFFE3FF8300 + HEX FEFFFFF7FFFFFFFCFFFFFFFCFFFF9F80 + HEX F8FFF3FF9FFFFFFF87FF8FFF8FFE9FFF + HEX 8FFEFFFFE3FF8300FEFFFFF3FFFFFFFC + HEX FFFFFFFCFFFF8F80F8FFE1FF9FFFFFFF + HEX 83FF8FFF8FFE8FFF8FFFFFFFE3FF8300 + HEX FEFFFFF3FFFFBFFCFFFFFFFCFFFF8F80 + HEX FCFFE1FF9FFFFFFFC3FFC7FF8FFE8FFF + HEX 87FFFFFFF3FF8100FEFFFFF3FFFFBFFC + HEX FFFFBFFCFFFF8F80FCFFE1FF8FFFFFFF + HEX C3FFC7FF8FFE8FFF87FFFFFFF1FF8100 + HEX FEFFFFF3FFFFBFFCFFFFBFFCFFFF8F80 + HEX FCFFE1FFCFFFFFFFC3FFC7FF87FECFFF + HEX 87FEFFFFF1FF8100FEFFFFF1FFFFBFFC + HEX FFFEBFF8FFFF8780FCFFC1FFCFFFFFFF + HEX C3FFC7FF87FFC7FF87FEFFFFF1FF8100 + HEX FEFFFFE1FFFF9FF8BFFEBFF8FFFF8780 + HEX FCFFC1FFC7FFEFFFC3FFC7FF87FFC7FF + HEX 87FEFFFFF1FF8100FEFFFFE1FFFF9FF8 + HEX BFFEFFF1FFFF8780FCFFC3FFC7FFE7FF + HEX CFFFDFFF9FFF9FFF9FFCFFFFF0FF8700 + HEX FCFFFFC0FFFF8FF09FFCFFE0FFFF8380 + HEX F0FF81FF87FFE7FFC7FFCFFF8FFE8FFF + HEX 8FF8FFBFF0FF83000000000000000000 + HEX 000012AA8100128A8500128A8500128A + HEX 850012AAC1A28100128AC5A28100128A + HEX C5A28100128AC5A28100128AC5A28100 + HEX 12AA81AA810014A0810014A0810014AA + HEX 00000000000000000000000BA0D514D0 + HEX AA000BA0C182149419A0C182000BA0C1 + HEX 82149418D0A0C182000BA0C182149418 + HEX D0A0C182000BA0C182149419A0C18200 + HEX 0BA0C182D5A0C182D582D08AD0AAD0A8 + HEX C5AA81000BA0C1A2C1A2C1A2C18280A8 + HEX 94A2D1A0C18285000BA0C1A2C1A2C1A2 + HEX C18280A894A2D1A0C18285000BA0C1A2 + HEX C1A2C1A2C18280A894A2D1A0C1828500 + HEX 0BA0C1A2C1A2C1A2C18280A894A2D1A0 + HEX C18285000BA0C1A2C1A2C1A2C18280A8 + HEX 94A2D1A0C18285000BA0D580D580D580 + HEX D582D48A94A2D180C582850012C08200 + HEX 12C0820012C0820012D5000000000000 + HEX 00000000000000000BB09E83F88113C0 + HEX 81B0C08180E3C3878F000B98B3868C83 + HEX 13C081B0C08180B3E6CC99000B8C838C + HEX 8C15B0F08780B3E68C98000B8C838C8C + HEX E0E3C799CEF1F1C38180B3C6878E000B + HEX 8C838C8CB0E6CC99C399B3C68180E3E7 + HEX 8C98000B8C838C8CB0E6CC99C399B3C6 + HEX 818083E68C98000B98B3868CB3E6CC99 + HEX C399B3C6818083E6CC99000BB09E83F8 + HEX E1E3879FC3F1B3868780E3C3878F0010 + HEX E0809815830010E0809815830010E080 + HEX 8F80F08100 + +*--- Line numbers + +xhgr HEX 00000000000000008080808080808080 + HEX 00000000000000008080808080808080 + HEX 00000000000000008080808080808080 + HEX 00000000000000008080808080808080 + HEX 2828282828282828A8A8A8A8A8A8A8A8 + HEX 2828282828282828A8A8A8A8A8A8A8A8 + HEX 2828282828282828A8A8A8A8A8A8A8A8 + HEX 2828282828282828A8A8A8A8A8A8A8A8 + HEX 5050505050505050D0D0D0D0D0D0D0D0 + HEX 5050505050505050D0D0D0D0D0D0D0D0 + HEX 5050505050505050D0D0D0D0D0D0D0D0 + HEX 5050505050505050D0D0D0D0D0D0D0D0 +yhgr HEX 0004080C1014181C0004080C1014181C + HEX 0105090D1115191D0105090D1115191D + HEX 02060A0E12161A1E02060A0E12161A1E + HEX 03070B0F13171B1F03070B0F13171B1F + HEX 0004080C1014181C0004080C1014181C + HEX 0105090D1115191D0105090D1115191D + HEX 02060A0E12161A1E02060A0E12161A1E + HEX 03070B0F13171B1F03070B0F13171B1F + HEX 0004080C1014181C0004080C1014181C + HEX 0105090D1115191D0105090D1115191D + HEX 02060A0E12161A1E02060A0E12161A1E + HEX 03070B0F13171B1F03070B0F13171B1F + +*--- Level line numbers + +tblBOARDALLL + DFB L0800,>L081C,>L0838,>L0854,>L0870,>L088C,>L08A8,>L08C4 + DFB >L08E0,>L08FC,>L0918,>L0934,>L0950,>L096C,>L0988,>L09A4 +tblBOARDBACKH + DFB >L0A00,>L0A1C,>L0A38,>L0A54,>L0A70,>L0A8C,>L0AA8,>L0AC4 + DFB >L0AE0,>L0AFC,>L0B18,>L0B34,>L0B50,>L0B6C,>L0B88,>L0BA4 + +*--- From a X in board to a X in HGR + +xtable DB $00 ; HGR column index + DB $05 ; 0..5..10..15 + DB $0A + DB $0F + DB $14 + DB $19 + DB $1E + DB $23 + DB $28 + DB $2D + DB $32 + DB $37 + DB $3C + DB $41 + DB $46 + DB $4B + DB $50 + DB $55 + DB $5A + DB $5F + DB $64 + DB $69 + DB $6E + DB $73 + DB $78 + DB $7D + DB $82 + DB $87 + +*--- From a Y in board to a Y in HGR + +ytable DB $00 ; HGR line index + DB $0B ; 0.11.22.33 + DB $16 ; 22 + DB $21 ; 33 + DB $2C ; 44 + DB $37 ; 55 + DB $42 ; 66 + DB $4D ; 77 + DB $58 ; 88 + DB $63 ; 99 + DB $6E ; 110 + DB $79 ; 121 + DB $84 ; 132 + DB $8F ; 143 + DB $9A ; 154 + DB $A5 ; 165 + DB $B5 ; 181 ; ligne de texte + +*--- From a X in board to a Y column in HGR (0..39) + +bytable DB $00 + DB $01 + DB $02 + DB $04 + DB $05 + DB $07 + DB $08 + DB $0A + DB $0B + DB $0C + DB $0E + DB $0F + DB $11 + DB $12 + DB $14 + DB $15 + DB $16 + DB $18 + DB $19 + DB $1B + DB $1C + DB $1E + DB $1F + DB $20 + DB $22 + DB $23 + DB $25 + DB $26 + +*--- From a X in board to a sprite table (0..6) + +bitable DB $00 ; 0..4: sprite is 2-col wide + DB $03 ; 5..6: sprite is 3-col wide + DB $06 + DB $02 + DB $05 + DB $01 + DB $04 + DB $00 + DB $03 + DB $06 + DB $02 + DB $05 + DB $01 + DB $04 + DB $00 + DB $03 + DB $06 + DB $02 + DB $05 + DB $01 + DB $04 + DB $00 + DB $03 + DB $06 + DB $02 + DB $05 + DB $01 + DB $04 + +*--- From a X in HGR (0..139) coordinate to a Y column in HGR (0..39) + +xbytable DB $00 ; and the index within the table + DB $00 + DB $00 + DB $00 + DB $01 + DB $01 + DB $01 + DB $02 + DB $02 + DB $02 + DB $02 + DB $03 + DB $03 + DB $03 + DB $04 + DB $04 + DB $04 + DB $04 + DB $05 + DB $05 + DB $05 + DB $06 + DB $06 + DB $06 + DB $06 + DB $07 + DB $07 + DB $07 + DB $08 + DB $08 + DB $08 + DB $08 + DB $09 + DB $09 + DB $09 + DB $0A + DB $0A + DB $0A + DB $0A + DB $0B + DB $0B + DB $0B + DB $0C + DB $0C + DB $0C + DB $0C + DB $0D + DB $0D + DB $0D + DB $0E + DB $0E + DB $0E + DB $0E + DB $0F + DB $0F + DB $0F + DB $10 + DB $10 + DB $10 + DB $10 + DB $11 + DB $11 + DB $11 + DB $12 + DB $12 + DB $12 + DB $12 + DB $13 + DB $13 + DB $13 + DB $14 + DB $14 + DB $14 + DB $14 + DB $15 + DB $15 + DB $15 + DB $16 + DB $16 + DB $16 + DB $16 + DB $17 + DB $17 + DB $17 + DB $18 + DB $18 + DB $18 + DB $18 + DB $19 + DB $19 + DB $19 + DB $1A + DB $1A + DB $1A + DB $1A + DB $1B + DB $1B + DB $1B + DB $1C + DB $1C + DB $1C + DB $1C + DB $1D + DB $1D + DB $1D + DB $1E + DB $1E + DB $1E + DB $1E + DB $1F + DB $1F + DB $1F + DB $20 + DB $20 + DB $20 + DB $20 + DB $21 + DB $21 + DB $21 + DB $22 + DB $22 + DB $22 + DB $22 + DB $23 + DB $23 + DB $23 + DB $24 + DB $24 + DB $24 + DB $24 + DB $25 + DB $25 + DB $25 + DB $26 + DB $26 + DB $26 + DB $26 + DB $27 + DB $27 + DB $27 + +*--- From a X in HGR to a sprite table (0..6) + +xbitable DB $00 ; 0..4: sprite is 2-col wide + DB $02 ; 5..6: sprite is 3-col wide + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + DB $00 + DB $02 + DB $04 + DB $06 + DB $01 + DB $03 + DB $05 + +*--- Boot 1 of data disks (T0/S0) + +boot HEX 012058FC2093FE2089FEA000B93408F0 + HEX 0E20F0FDC98DD004A9098524C8D0EDA6 + HEX 2B9D88C08A4A4A4A4A09C08D3308200C + HEX FD4C00C68D8D8D8D8D8D8DCCCFC4C5A0 + HEX D2D5CECEC5D2A0C4C1D4C1A0C4C9D3CB + HEX BA8DADADADADADADADADADADADADADAD + HEX ADADADADADADADAD8D8DC4C9D3CBC5D4 + HEX D4C5A0D7C9CCCCA0CECFD4A0C2CFCFD4 + HEX 8D8DA0C9CED3C5D2D4A0CEC5D7A0C4C9 + HEX D3CBA0C1CEC48DA0C8C9D4A0C1A0CBC5 + HEX D9A0D4CFA0D2C5C2CFCFD48D8DA0A0A0 + HEX A0A0A0A0A0A0A0000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + ds \ + +*--- $1F00 - Score buffer + +scorebuf ds 256 \ No newline at end of file diff --git a/loderunner/LR.RWTS.S b/loderunner/LR.RWTS.S new file mode 100644 index 0000000..8da6fc1 --- /dev/null +++ b/loderunner/LR.RWTS.S @@ -0,0 +1,931 @@ +* +* Lode Runner +* (c) 1983, Broderbund Software +* (s) 2014, Brutal Deluxe Software +* + +*--------------------------------------- +* RWTS +*--------------------------------------- + + lst on +la = * ; must be $B600 + lst off + + +LB600 HEX 01A527C909D018A52B4A4A4A4A09C085 + HEX 3FA95C853E18ADFE086DFF088DFE08AE + HEX FF083015BD4D08853DCEFF08ADFE0885 + HEX 27CEFE08A62B6C3E00EEFE08EEFE0820 + HEX 89FE2093FE202FFBA62B6CFD08000D0B + HEX 09070503010E0C0A080604020F002064 + HEX A7B008A900A88D5DB69140ADC5B54CD2 + HEX A6AD5DB6F008EEBDB5D003EEBEB5A900 + HEX 8D5DB64C46A58DBCB520A8A620EAA24C + HEX 7DA2A013B142D014C8C017D0F7A019B1 + HEX 4299A4B5C8C01DD0F64CBCA6A2FF8E5D + HEX B6D0F600000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 2058FCA9C220EDFDA90120DAFDA9AD20 + HEX EDFDA90020DAFD600000000000000000 + HEX 0000000000000000000000000000B609 + +LB700 STX LB7E9 + STX LB7F7 + LDA #$01 + STA LB7F8 + STA LB7EA + LDA LB7E0 + STA LB7E1 + LDA #$02 + STA LB7EC + LDA #$04 + STA LB7ED + LDY LB7E7 + DEY + STY LB7F0+1 + LDA #$01 + STA LB7F4 + TXA + LSR + LSR + LSR + LSR + TAX + LDA #$00 + STA $04F8,X + STA $0478,X + JSR LB793 + LDX #$FF + TXS + STX LB7EB + NOP + NOP + NOP + JSR SETKBD + JMP $9D84 + + LDA LB7E7 + SEC + SBC LB7F0+1 + STA LB7E1 + LDA LB7E7 + STA LB7F0+1 + DEC LB7F0+1 + LDA #$02 + STA LB7EC + LDA #$04 + STA LB7ED + LDA #$02 + STA LB7F4 + JSR LB793 + LDA LB7E7 + STA LB600+$FE + CLC + ADC #$09 + STA LB7F0+1 + LDA #$0A + STA LB7E1 + SEC + SBC #$01 + STA LB600+$FF + STA LB7ED + JSR LB793 + RTS + + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + +LB793 LDA LB7E4+1 + LDY LB7E4 + JSR LB7B5 + LDY LB7ED + DEY + BPL LB7A9 + LDY #$0F + NOP + NOP + DEC LB7EC +LB7A9 STY LB7ED + DEC LB7F0+1 + DEC LB7E1 + BNE LB793 + RTS + +LB7B5 PHP + SEI + JSR LBD00 + BCS LB7BF + PLP + CLC + RTS + +LB7BF PLP + SEC + RTS + + DS 29 + +* LDA LB558+$64 +* STA LB7F0+1 +* LDA #$00 +* STA LB7F0 +* LDA LB5C0+$39 +* EOR #$FF +* STA LB7EB +* RTS +* +* LDA #$00 +* TAY +*LB7D9 STA ($42),Y +* INY +* BNE LB7D9 +* RTS + + DB $00 +LB7E0 DB $1B +LB7E1 DB $00 + DB $0A + DB $1B +LB7E4 DA $B7E8 + DB $00 +LB7E7 DB $B6 +LB7E8 DB $01 +LB7E9 DB $70 +LB7EA DB $01 +LB7EB DB $FF +LB7EC DB $13 +LB7ED DB $05 + DA LB7FB +LB7F0 DA $9600 + DB $00 + DB $01 +LB7F4 DB $01 + DB $00 + DB $01 +LB7F7 DB $60 +LB7F8 DB $01 + DB $00 + DB $00 +LB7FB DB $00 + DB $01 + DB $EF + DB $D8 + DB $00 + +LB800 LDX #$00 + LDY #$02 +LB804 DEY + LDA ($3E),Y + LSR + ROL LBC00,X + LSR + ROL LBC00,X + STA LBB00,Y + INX + CPX #$56 + BCC LB804 + LDX #$00 + TYA + BNE LB804 + LDX #$55 +LB81E LDA LBC00,X + AND #$3F + STA LBC00,X + DEX + BPL LB81E + RTS + +LB82A SEC + STX $27 + STX $0678 + LDA $C08D,X + LDA $C08E,X + BMI LB8B4 + LDA LBC00 + STA $26 + LDA #$FF + STA $C08F,X + ORA $C08C,X + PHA + PLA + NOP + LDY #$04 +LB84A PHA + PLA + JSR LB8B9 + DEY + BNE LB84A + LDA #$D5 + JSR LB8B8 + LDA #$AA + JSR LB8B8 + LDA #$AD + JSR LB8B8 + TYA + LDY #$56 + BNE LB869 +LB866 LDA LBC00,Y +LB869 EOR LBBFF,Y + TAX + LDA LBA29,X + LDX $27 + STA $C08D,X + LDA $C08C,X + DEY + BNE LB866 + LDA $26 + NOP +LB87E EOR LBB00,Y + TAX + LDA LBA29,X + LDX $0678 + STA $C08D,X + LDA $C08C,X + LDA LBB00,Y + INY + BNE LB87E + TAX + LDA LBA29,X + LDX $27 + JSR LB8BB + LDA #$DE + JSR LB8B8 + LDA #$AA + JSR LB8B8 + LDA #$EB + JSR LB8B8 + LDA #$FF + JSR LB8B8 + LDA $C08E,X +LB8B4 LDA $C08C,X + RTS + +LB8B8 CLC +LB8B9 PHA + PLA +LB8BB STA $C08D,X + ORA $C08C,X + RTS + +LB8C2 LDY #$00 +LB8C4 LDX #$56 +LB8C6 DEX + BMI LB8C4 + LDA LBB00,Y + LSR LBC00,X + ROL + LSR LBC00,X + ROL + STA ($3E),Y + INY + CPY $26 + BNE LB8C6 + RTS + +LB8DC LDY #$20 +LB8DE DEY + BEQ LB942 +LB8E1 LDA $C08C,X + BPL LB8E1 +LB8E6 EOR #$D5 + BNE LB8DE + NOP +LB8EB LDA $C08C,X + BPL LB8EB + CMP #$AA + BNE LB8E6 + LDY #$56 +LB8F6 LDA $C08C,X + BPL LB8F6 + CMP #$AD + BNE LB8E6 + LDA #$00 +LB901 DEY + STY $26 +LB904 LDY $C08C,X + BPL LB904 + EOR LBA00,Y + LDY $26 + STA LBC00,Y + BNE LB901 +LB913 STY $26 +LB915 LDY $C08C,X + BPL LB915 + EOR LBA00,Y + LDY $26 + STA LBB00,Y + INY + BNE LB913 +LB925 LDY $C08C,X + BPL LB925 + CMP LBA00,Y + BNE LB942 +LB92F LDA $C08C,X + BPL LB92F + CMP #$DE + BNE LB942 + NOP +LB939 LDA $C08C,X + BPL LB939 + CMP #$AA + BEQ LB99E +LB942 SEC + RTS + +LB944 LDY #$FC + STY $26 +LB948 INY + BNE LB94F + INC $26 + BEQ LB942 +LB94F LDA $C08C,X + BPL LB94F +LB954 CMP #$D5 + BNE LB948 + NOP +LB959 LDA $C08C,X + BPL LB959 + CMP #$AA + BNE LB954 + LDY #$03 +LB964 LDA $C08C,X + BPL LB964 + CMP #$96 + BNE LB954 + LDA #$00 +LB96F STA $27 +LB971 LDA $C08C,X + BPL LB971 + ROL + STA $26 +LB979 LDA $C08C,X + BPL LB979 + AND $26 + STA |$002C,Y + EOR $27 + DEY + BPL LB96F + TAY + BIT $B7 +LB98B LDA $C08C,X + BPL LB98B + CMP #$DE + BNE LB942 + NOP +LB995 LDA $C08C,X + BPL LB995 + CMP #$AA + BIT $A4 +LB99E CLC + RTS + +LB9A0 STX $2B + STA $2A + CMP $0478 + BEQ LB9FC + LDA #$00 + STA $26 +LB9AD LDA $0478 + STA $27 + SEC + SBC $2A + BEQ LB9EA + BCS LB9C0 + EOR #$FF + INC $0478 + BCC LB9C5 +LB9C0 ADC #$FE + DEC $0478 +LB9C5 CMP $26 + BCC LB9CB + LDA $26 +LB9CB CMP #$0C + BCS LB9D0 + TAY +LB9D0 SEC + JSR LB9EE + LDA LBA11,Y + JSR LBA00 + LDA $27 + CLC + JSR LB9F1 + LDA LBA1D,Y + JSR LBA00 + INC $26 + BNE LB9AD +LB9EA JSR LBA00 + CLC +LB9EE LDA $0478 +LB9F1 AND #$03 + ROL + ORA $2B + TAX + LDA $C080,X + LDX $2B +LB9FC RTS + + TAX + LDY #$A0 +LBA00 LDX #$11 +LBA02 DEX + BNE LBA02 + INC $46 + BNE LBA0B + INC $47 +LBA0B SEC + SBC #$01 + BNE LBA00 + RTS + +LBA11 HEX 01302824201E1D1C1C1C1C1C +LBA1D HEX 702C26221F1E1D1C1C1C1C1C + +LBA29 HEX 96979A9B9D9E9FA6A7ABACADAEAFB2B3 + HEX B4B5B6B7B9BABBBCBDBEBFCBCDCECFD3 + HEX D6D7D9DADBDCDDDEDFE5E6E7E9EAEBEC + HEX EDEEEFF2F3F4F5F6F7F9FAFBFCFDFEFF + HEX B3B3A0E0B3C3C5B3A0E0B3C3C5B3A0E0 + HEX B3B3C5AAA082B3B3C5AAA082C5B3B3AA + HEX 8882C5B3B3AA8882C5C4B3B088 + +LBA96 HEX 0001989902039C040506A0A1A2A3A4A5 + HEX 0708A8A9AA090A0B0C0DB0B10E0F1011 + HEX 1213B81415161718191AC0C1C2C3C4C5 + HEX C6C7C8C9CA1BCC1C1D1ED0D1D21FD4D5 + HEX 2021D822232425262728E0E1E2E3E429 + HEX 2A2BE82C2D2E2F303132F0F133343536 + HEX 3738F8393A3B3C3D3E3F + +LBB00 HEX 00040300000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 000000000000000000000000000000 +LBBFF HEX 00 + +LBC00 HEX 02000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 000000000000 + +LBC56 SEC + LDA $C08D,X + LDA $C08E,X + BMI LBCBD + LDA #$FF + STA $C08F,X + CMP $C08C,X + PHA + PLA +LBC69 JSR LBCC3 + JSR LBCC3 + STA $C08D,X + CMP $C08C,X + NOP + DEY + BNE LBC69 + LDA #$D5 + JSR LBCD5 + LDA #$AA + JSR LBCD5 + LDA #$96 + JSR LBCD5 + LDA $41 + JSR LBCC4 + LDA $44 + JSR LBCC4 + LDA $3F + JSR LBCC4 + LDA $41 + EOR $44 + EOR $3F + PHA + LSR + ORA $3E + STA $C08D,X + LDA $C08C,X + PLA + ORA #$AA + JSR LBCD4 + LDA #$DE + JSR LBCD5 + LDA #$AA + JSR LBCD5 + LDA #$EB + JSR LBCD5 + CLC +LBCBD LDA $C08E,X + LDA $C08C,X +LBCC3 RTS + +LBCC4 PHA + LSR + ORA $3E + STA $C08D,X + CMP $C08C,X + PLA + NOP + NOP + NOP + ORA #$AA +LBCD4 NOP +LBCD5 NOP + PHA + PLA + STA $C08D,X + CMP $C08C,X + RTS + + HEX 88A5E891A0948896E891A09488969191 + HEX C894D0969191C894D09691A3C8A0A585 + HEX A4 + +LBD00 STY $48 + STA $49 + LDY #$02 + STY $06F8 + LDY #$04 + STY $04F8 + LDX LB7E9 + LDA $C08E,X + LDA $C08C,X + LDY #$08 +LBD19 LDA $C08C,X + PHA + PLA + PHA + PLA + STX $05F8 + CMP $C08C,X + BNE LBD2B + DEY + BNE LBD19 +LBD2B PHP + LDA $C089,X + LDY #$06 +LBD31 LDA ($48),Y + STA |$0036,Y + INY + CPY #$0A + BNE LBD31 + LDY #$03 + LDA ($3C),Y + STA $47 + LDY #$02 + LDA ($48),Y + LDY #$10 + CMP ($48),Y + BEQ LBD51 + STA ($48),Y + PLP + LDY #$00 + PHP +LBD51 ROR + BCC LBD59 + LDA $C08A,X + BCS LBD5C +LBD59 LDA $C08B,X +LBD5C ROR $35 + PLP + PHP + BNE LBD6D + LDY #$07 +LBD64 JSR LBA00 + DEY + BNE LBD64 + LDX $05F8 +LBD6D LDY #$04 + LDA ($48),Y + JSR LBE5A + PLP + BNE LBDAB + NOP + NOP + NOP + NOP + LDA LB7F4 + CMP #$01 + BEQ LBDAB + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP +LBD9E LDY #$12 +LBDA0 DEY + BNE LBDA0 + INC $46 + BNE LBD9E + INC $47 + BNE LBD9E +LBDAB LDY #$0C + LDA ($48),Y + BEQ LBE0B + CMP #$04 + BEQ LBE0D + ROR + PHP + BCS LBDBC + JSR LB800 +LBDBC LDY #$30 + STY $0578 +LBDC1 LDX $05F8 + JSR LB944 + BCC LBDED +LBDC9 DEC $0578 + BPL LBDC1 +LBDCE LDA $0478 + PHA + LDA #$60 + JSR LBE95 + DEC $06F8 + BEQ LBE04 + LDA #$04 + STA $04F8 + LDA #$00 + JSR LBE5A + PLA +LBDE7 JSR LBE5A + JMP LBDBC + +LBDED LDY $2E + CPY $0478 + BEQ LBE10 + LDA $0478 + PHA + TYA + JSR LBE95 + PLA + DEC $04F8 + BNE LBDE7 + BEQ LBDCE +LBE04 PLA + LDA #$40 +LBE07 PLP + JMP LBE47+1 + +LBE0B BEQ LBE46 +LBE0D JMP L8E00 + +LBE10 LDY #$03 + LDA ($48),Y + PHA + LDA $2F + LDY #$0E + STA ($48),Y + PLA + BEQ LBE26 + CMP $2F + BEQ LBE26 + LDA #$20 + BNE LBE07 +LBE26 LDY #$05 + LDA ($48),Y + TAY + LDA LBFB8,Y + CMP $2D + BNE LBDC9 + PLP + BCC LBE51 + JSR LB8DC + PHP + BCS LBDC9 + PLP + LDX #$00 + STX $26 + JSR LB8C2 + LDX $05F8 +LBE46 CLC +LBE47 BIT $38 + LDY #$0D + STA ($48),Y + LDA $C088,X + RTS + +LBE51 JSR LB82A + BCC LBE46 + LDA #$10 + BCS LBE47+1 +LBE5A PHA + LDY #$01 + LDA ($3C),Y + ROR + PLA + BCC LBE6B + ASL + JSR LBE6B + LSR $0478 + RTS + +LBE6B STA $2A + JSR LBE8E + LDA $0478,Y + BIT $35 + BMI LBE7A + LDA $04F8,Y +LBE7A STA $0478 + LDA $2A + BIT $35 + BMI LBE88 + STA $04F8,Y + BPL LBE8B +LBE88 STA $0478,Y +LBE8B JMP LB9A0 + +LBE8E TXA + LSR + LSR + LSR + LSR + TAY + RTS + +LBE95 PHA + LDY #$02 + LDA ($48),Y + ROR + ROR $35 + JSR LBE8E + PLA + ASL + BIT $35 + BMI LBEAB + STA $04F8,Y + BPL LBEAE +LBEAB STA $0478,Y +LBEAE RTS + +LBEAF LDY #$03 + LDA ($48),Y + STA $41 + LDA #$AA + STA $3E + LDY #$56 + LDA #$00 + STA $44 +LBEBF STA LBBFF,Y + DEY + BNE LBEBF +LBEC5 STA LBB00,Y + DEY + BNE LBEC5 + LDA #$00 + JSR LBE95 + LDA #$28 + STA $45 +LBED4 LDA $44 + JSR LBE5A + JSR LBF0D + LDA #$08 + BCS LBF04 + LDA #$30 + STA $0578 +LBEE5 SEC + DEC $0578 + BEQ LBF04 + JSR LB944 + BCS LBEE5 + LDA $2D + BNE LBEE5 + JSR LB8DC + BCS LBEE5 + INC $44 + LDA $44 + CMP #$23 + BCC LBED4 + CLC + BCC LBF09 +LBF04 LDY #$0D + STA ($48),Y + SEC +LBF09 LDA $C088,X + RTS + +LBF0D LDA #$00 + STA $3F + LDY #$80 + BNE LBF17 +LBF15 LDY $45 +LBF17 JSR LBC56 + BCS LBF87 + JSR LB82A + BCS LBF87 + INC $3F + LDA $3F + CMP #$10 + BCC LBF15 + LDY #$0F + STY $3F + LDA #$30 + STA $0578 +LBF32 STA LBFA8,Y + DEY + BPL LBF32 + LDY $45 +LBF3A JSR LBF87 + JSR LBF87 + JSR LBF87 + PHA + PLA + NOP + DEY + BNE LBF3A + JSR LB944 + BCS LBF71 + LDA $2D + BEQ LBF67 + LDA #$10 + CMP $45 + LDA $45 + SBC #$01 + STA $45 + CMP #$05 + BCS LBF71 + SEC + RTS + +LBF62 JSR LB944 + BCS LBF6C +LBF67 JSR LB8DC + BCC LBF88 +LBF6C DEC $0578 + BNE LBF62 +LBF71 JSR LB944 + BCS LBF81 + LDA $2D + CMP #$0F + BNE LBF81 + JSR LB8DC + BCC LBF0D +LBF81 DEC $0578 + BNE LBF71 + SEC +LBF87 RTS + +LBF88 LDY $2D + LDA LBFA8,Y + BMI LBF6C + LDA #$FF + STA LBFA8,Y + DEC $3F + BPL LBF62 + LDA $44 + BNE LBFA6 + LDA $45 + CMP #$10 + BCC LBF87 + DEC $45 + DEC $45 +LBFA6 CLC + RTS + +LBFA8 HEX FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +LBFB8 HEX 000D0B09070503010E0C0A080604020F + + ds \ + +* HEX 20DCABA9108DF0B3A9238DEFB3604C44 +* HEX B70000008D63AA8D70AA8D71AA60205B +* HEX A78CB7AA60207EAEAE9BB39A2016A3BA +* HEX 8E9BB3A9094C85B3 diff --git a/loderunner/LR.SPRITES.S b/loderunner/LR.SPRITES.S new file mode 100644 index 0000000..7287887 --- /dev/null +++ b/loderunner/LR.SPRITES.S @@ -0,0 +1,1364 @@ +* +* Lode Runner +* (c) 1983, Broderbund Software +* (s) 2014, Brutal Deluxe Software +* (c) 2024, Brutal Deluxe Software +* + +* 0 - noir +* 4 - blue +* 6 - orange +* F - blanc + +*--- Table of sprites + +tblSPRITESlow + db spr00 + db >spr01 + db >spr02 + db >spr03 + db >spr04 + db >spr05 + db >spr06 + db >spr07 + db >spr08 + db >spr09 + db >spr0A + db >spr0B + db >spr0C + db >spr0D + db >spr0E + db >spr0F + db >spr10 + db >spr11 + db >spr12 + db >spr13 + db >spr14 + db >spr15 + db >spr16 + db >spr17 + db >spr18 + db >spr19 + db >spr1A + db >spr1B + db >spr1C + db >spr1D + db >spr1E + db >spr1F + db >spr20 + db >spr21 + db >spr22 + db >spr23 + db >spr24 + db >spr25 + db >spr26 + db >spr27 + db >spr28 + db >spr29 + db >spr2A + db >spr2B + db >spr2C + db >spr2D + db >spr2E + db >spr2F + db >spr30 + db >spr31 + db >spr32 + db >spr33 + db >spr34 + db >spr35 + db >spr36 + db >spr37 + db >spr38 + db >spr39 + db >spr3A + db >spr3B + db >spr3C + db >spr3D + db >spr3E + db >spr3F + db >spr40 + db >spr41 + db >spr42 + db >spr43 + db >spr44 + db >spr45 + db >spr46 + db >spr47 + db >spr48 + db >spr49 + db >spr4A + db >spr4B + db >spr4C + db >spr4D + db >spr4E + db >spr4F + db >spr50 + db >spr51 + db >spr52 + db >spr53 + db >spr54 + db >spr55 + db >spr56 + db >spr57 + db >spr58 + db >spr59 + db >spr5A + db >spr5B + db >spr5C + db >spr5D + db >spr5E + db >spr5F + db >spr60 + db >spr61 + db >spr62 + db >spr63 + db >spr64 + db >spr65 + +*--- 00..0F + +spr00 hex 0000000000 ; empty + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 +spr01 hex 4444400040 ; diggable floor + hex 4444400040 + hex 4444400040 + hex 4444400040 + hex 0000000000 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 0000000000 +spr02 hex 4444444440 ; solid floor + hex 4444444440 + hex 4444444440 + hex 4444444440 + hex 4444444440 + hex 4444444440 + hex 4444444440 + hex 4444444440 + hex 4444444440 + hex 4444444440 + hex 0000000000 +spr03 hex 0FF0000FF0 ; ladder + hex 0FF0000FF0 + hex 0FFFFFFFF0 + hex 0FF0000FF0 + hex 0FF0000FF0 + hex 0FF0000FF0 + hex 0FF0000FF0 + hex 0FFFFFFFF0 + hex 0FF0000FF0 + hex 0FF0000FF0 + hex 0FF0000FF0 +spr04 hex 0000000000 ; bar + hex FFFFFFFFFF + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 +spr05 hex 4444444440 ; trap + hex 4444444440 + hex 0000000000 + hex 00FFFFFF00 + hex 0000FF0000 + hex 0000FF0000 + hex 0000FF0000 + hex 0000FF0000 + hex 4444444440 + hex 4444444440 + hex 0000000000 +spr06 hex 0FF0000000 ; invisible ladder + hex 0FF0000000 + hex 0FFFFFFFF0 + hex 0FF0000FF0 + hex 0000000FF0 + hex 0000000FF0 + hex 0000000FF0 + hex 0FF0000FF0 + hex 0FFFFFFFF0 + hex 0FF0000000 + hex 0FF0000000 +spr07 hex 0000000000 ; chest + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 000FFFFF00 + hex 0006666600 + hex 000FFFFF00 + hex 0006666600 + hex 000FFFFF00 + hex 0000000000 +spr08 hex 0000400000 ; foe + hex 0006660000 + hex 0006660000 + hex 0000060000 + hex 0006666600 + hex 0600060006 + hex 00000FF000 + hex 0000FFF000 + hex 000FF4FFFF + hex 000FF00000 + hex 000FF00000 +spr09 hex 0000004000 ; hero runs right 1 + hex 00000FFF00 + hex 00000FFF00 + hex 0000FFF000 + hex 00FF6FFF00 + hex 0FF4FF00FF + hex 0000FF0000 + hex 0000FFF000 + hex 0FFFF4FF00 + hex 000000FF00 + hex 000000FF00 +spr0A hex FFFFFFFFFF ; cursor + hex FFFFFFFFFF + hex FFFFFFFFFF + hex FFFFFFFFFF + hex FFFFFFFFFF + hex FFFFFFFFFF + hex FFFFFFFFFF + hex FFFFFFFFFF + hex FFFFFFFFFF + hex FFFFFFFFFF + hex FFFFFFFFFF +spr0B hex 0006000000 ; hero runs left 1 + hex 00FFF00000 + hex 00FFF00000 + hex 000FFF0000 + hex 00FFF4FF00 + hex FF00FF6FF0 + hex 0000FF0000 + hex 000FFF0000 + hex 00FF6FFFF0 + hex 00FF000000 + hex 00FF000000 +spr0C hex 0006000000 ; hero runs left 2 + hex 00FFF00000 + hex 00FFF00000 + hex 000FF00000 + hex 000FFF0000 + hex 00FFFFF000 + hex FF6FFFF000 + hex 00FFF00000 + hex 00FFFF0000 + hex 0000FFF000 + hex 0000FF0000 +spr0D hex 0006000000 ; hero runs left 3 + hex 00FFF00000 + hex 00FFF00000 + hex 000FF00000 + hex 066FFFF000 + hex 0FFFF4FF00 + hex 000FF00000 + hex 00FFFF0000 + hex 0FF00FF000 + hex 0FF000FF00 + hex 000000FF00 +spr0E hex 0000FF0000 ; hero ladder 1 + hex 0000FF0006 + hex 0000FFFFFF + hex 0600FFF000 + hex 0FFFFFF000 + hex 0000FFF000 + hex 0000FFF000 + hex 000FF4FF00 + hex 000FF4FFF0 + hex 000FF00000 + hex 00FFF00000 +spr0F hex 0000004000 ; hero digs left 1 + hex 00000FFF00 + hex 00000FFF00 + hex 000000FF00 + hex 0000FFFFFF + hex 066FF4FF66 + hex 060000FF00 + hex 00000FFF00 + hex 0000FF6FF0 + hex 0000FF6FF0 + hex 0000FF6FF0 + +*--- 10..1F + +spr10 hex 0000004000 ; hero runs right 2 + hex 00000FFF00 + hex 00000FFF00 + hex 00000FF000 + hex 0000FFF000 + hex 000FFFFF00 + hex 000FFFF4FF + hex 00000FFF00 + hex 0000FFFF00 + hex 000FFF0000 + hex 0000FF0000 +spr11 hex 0000004000 ; hero runs right 3 + hex 00000FFF00 + hex 00000FFF00 + hex 00000FF000 + hex 000FFFF440 + hex 00FF6FFFF0 + hex 00000FF000 + hex 0000FFFF00 + hex 000FF00FF0 + hex 00FF000FF0 + hex 00FF000000 +spr12 hex 0000FF0000 ; hero ladder 2 + hex 4000FF0000 + hex FFFFFF0000 + hex 000FFF0040 + hex 000FFFFFF0 + hex 000FFF0000 + hex 000FFF0000 + hex 00FF6FF000 + hex 0FFF6FF000 + hex 00000FF000 + hex 00000FFF00 +spr13 hex 0FF00600FF ; hero hole left + hex 0FF4FFF4FF + hex 0FF4FFF4FF + hex 00FFFFFFF0 + hex 00000FF000 + hex 00000FF000 + hex 000FFFF000 + hex 00FF6FF000 + hex 00FF6FF000 + hex 00FF6FF000 + hex 00000FF000 +spr14 hex FF00400FF0 ; hero hole right + hex FF6FFF6FF0 + hex FF6FFF6FF0 + hex 0FFFFFFF00 + hex 000FF00000 + hex 000FF00000 + hex 000FFFF000 + hex 000FF4FF00 + hex 000FF4FF00 + hex 000FF4FF00 + hex 000FF00000 +spr15 hex 0FF0000FF0 ; hero bar right 1 + hex 0FF0000FF0 + hex 0FF4FF6FF0 + hex 0FF4FFFF00 + hex 00FFFF0000 + hex 000FF00000 + hex 000FF00000 + hex 0FFFF00000 + hex FF00400000 + hex FF6FF00000 + hex 44FF000000 +spr16 hex 00000FF000 ; hero bar right 2 + hex 00000FF000 + hex 000FFFF000 + hex 000FFF0000 + hex 0FFFF00000 + hex FF6FF00000 + hex 000FF00000 + hex 00FFF00000 + hex 0FF4FF0000 + hex 0FF4FF0000 + hex 0FF4FF0000 +spr17 hex 000FF00000 ; hero bar right 3 + hex 000FF00000 + hex 000FFFF000 + hex 0000FFF4FF + hex 00000FFFF0 + hex 00000FFFF0 + hex 00000FF000 + hex 0000FFF000 + hex 000FF4FF00 + hex 000FF4FF00 + hex 000FF4FF00 +spr18 hex 0FF0000FF0 ; hero bar left 1 + hex 0FF0000FF0 + hex 0FF4FF6FF0 + hex 00FFFF6FF0 + hex 0000FFFF00 + hex 00000FF000 + hex 00000FF000 + hex 00000FFFF0 + hex 00000600FF + hex 00000FF4FF + hex 000000FF66 +spr19 hex 000FF00000 ; hero bar left 2 + hex 000FF00000 + hex 000FFFF000 + hex 0000FFF000 + hex 00000FFFF0 + hex 00000FF4FF + hex 00000FF000 + hex 00000FFF00 + hex 0000FF6FF0 + hex 0000FF6FF0 + hex 0000FF6FF0 +spr1A hex 00000FF000 ; hero bar left 3 + hex 00000FF000 + hex 000FFFF000 + hex FF6FFF0000 + hex 0FFFF00000 + hex 000FF00000 + hex 000FF00000 + hex 000FFF0000 + hex 00FF6FF000 + hex 00FF6FF000 + hex 00FF6FF000 +spr1B hex 0000000000 ; dig 1 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000400000 + hex 0000004006 + hex 0040000006 + hex 0000400600 + hex 0000000600 +spr1C hex 0000000000 ; dig 2 + hex 0000000000 + hex 0000000000 + hex 0000400000 + hex 0000000000 + hex 0000000040 + hex 4000000000 + hex 0040000000 + hex 0000444006 + hex 0040000666 + hex 0000400600 +spr1D hex 0000400000 ; dig 3 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 4000400000 + hex 0000000040 + hex 4000000000 + hex 0040000000 + hex 0000004000 + hex 0000000000 +spr1E hex 0000000000 ; dig 4 + hex 0000000000 + hex 0000000000 + hex 0000400000 + hex 0000000000 + hex 4000000000 + hex 0000000000 + hex 0000000040 + hex 0000000000 + hex 0000000000 + hex 0000000000 +spr1F hex 4440060040 ; stone 1 + hex 4444400040 + hex 4444400040 + hex 4444400040 + hex 0000000000 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 0000000000 + +*--- 20..2F + +spr20 hex 0000060000 ; stone 2 + hex 0006660000 + hex 4000000040 + hex 4444400040 + hex 0000000000 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 0000000000 +spr21 hex 0000000000 ; stone 3 + hex 0000060000 + hex 0006660000 + hex 4006660040 + hex 0000000000 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 0000000000 +spr22 hex 0000000000 ; stone 4 + hex 0000000000 + hex 0000000000 + hex 0000060000 + hex 0006660000 + hex 0006666600 + hex 0000000000 + hex 4000444440 + hex 4000444440 + hex 4000444440 + hex 0000000000 +spr23 hex 0000000000 ; stone 5 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000060000 + hex 0000066600 + hex 4006666600 + hex 4000000000 + hex 4000444440 + hex 0000000000 +spr24 hex 0000000000 ; stone 6 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000060000 + hex 0006660000 + hex 0006666600 + hex 0000000000 +spr25 hex 0000400000 ; hero dig right + hex 000FFF0000 + hex 000FFF0000 + hex 000FF00000 + hex 0FFFFFF000 + hex 066FF4FF66 + hex 000FF00006 + hex 000FFF0000 + hex 00FF6FF000 + hex 00FF6FF000 + hex 00FF6FF000 +spr26 hex 0000000000 ; dig 1 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000400000 + hex 0040004000 + hex 0600400000 + hex 0666000040 + hex 0006000000 +spr27 hex 0000000000 ; dig 2 + hex 0000000000 + hex 0000000000 + hex 0000400000 + hex 0000000000 + hex 0000000040 + hex 4440000000 + hex 0600000000 + hex 0600444000 + hex 0006000600 + hex 0006000600 +spr28 hex 0000004000 ; foe runs right 1 + hex 0000066600 + hex 0000066600 + hex 0000060000 + hex 0006666600 + hex 0600060006 + hex 0000FF0000 + hex 0000FFF000 + hex 0FFFF4FF00 + hex 000000FF00 + hex 000000FF00 +spr29 hex 0000004000 ; foe runs right 2 + hex 0000066600 + hex 0000066600 + hex 0000060000 + hex 0006660000 + hex 0006666600 + hex 00000FF006 + hex 00000FFF00 + hex 0000FFFF00 + hex 000FFF0000 + hex 0000FF0000 +spr2A hex 0000004000 ; foe runs right 3 + hex 0000066600 + hex 0000066600 + hex 0000060000 + hex 0006666600 + hex 0600066600 + hex 00000FF000 + hex 0000FFFF00 + hex 000FF00FF0 + hex 00FF000FF0 + hex 00FF000000 +spr2B hex 0000400000 ; foe runs left 2 + hex 0006660000 + hex 0006660000 + hex 0000060000 + hex 0000066600 + hex 0006666600 + hex 0600FF0000 + hex 000FFF0000 + hex 000FFFF000 + hex 00000FFF00 + hex 00000FF000 +spr2C hex 0000400000 ; foe runs left 3 + hex 0006660000 + hex 0006660000 + hex 0000060000 + hex 0006666600 + hex 0006660006 + hex 0000FF0000 + hex 000FFFF000 + hex 00FF00FF00 + hex 00FF000FF0 + hex 0000000FF0 +spr2D hex 0600000600 ; foe bar right 2 + hex 0600000600 + hex 0600066600 + hex 0600066600 + hex 0006660000 + hex 0006000000 + hex 0006000000 + hex 0FFFF00000 + hex FF00400000 + hex FF6FF00000 + hex 44FF000000 +spr2E hex 0000060000 ; foe bar right 3 + hex 0000060000 + hex 0006660000 + hex 0006660000 + hex 0666000000 + hex 0666000000 + hex 0006000000 + hex 00FFF00000 + hex 0FF4FF0000 + hex 0FF4FF0000 + hex 0000FF0000 +spr2F hex 0006000000 ; foe bar left 1 + hex 0006000000 + hex 0006660000 + hex 0000060006 + hex 0000066600 + hex 0000060000 + hex 0000060000 + hex 0000FFF000 + hex 000FF4FF00 + hex 000FF4FF00 + hex 000FF4FF00 + +*--- 30..3F + +spr30 hex 0600000600 ; foe bar left 2 + hex 0600000600 + hex 0666000600 + hex 0666000600 + hex 0006660000 + hex 0000060000 + hex 0000060000 + hex 0000FFFF00 + hex 0000400FF0 + hex 0000FF6FF0 + hex 00000FF440 +spr31 hex 0006000000 ; foe bar left 3 + hex 0006000000 + hex 0006660000 + hex 0006660000 + hex 0000066600 + hex 0000066600 + hex 0000060000 + hex 0000FFF000 + hex 000FF4FF00 + hex 000FF4FF00 + hex 000FF4FF00 +spr32 hex 0000060000 ; foe bar right 1 + hex 0000060000 + hex 0006660000 + hex 0006000000 + hex 0666000000 + hex 0006000000 + hex 0006000000 + hex 00FFF00000 + hex 0FF4FF0000 + hex 0FF4FF0000 + hex 0FF4FF0000 +spr33 hex 0000060000 ; foe bar right 2 + hex 0000060006 + hex 0000066666 + hex 0600060000 + hex 0666660000 + hex 0000060000 + hex 0000FFF000 + hex 000FF4FF00 + hex 000FF4FFF0 + hex 000FF00000 + hex 00FFF00000 +spr34 hex 0000060000 ; fole bar right 3 + hex 4000060000 + hex FF66660000 + hex 0006660040 + hex 0006666FF0 + hex 0006660000 + hex 000FFF0000 + hex 00FF6FF000 + hex 0FFF6FF000 + hex 00000FF000 + hex 00000FFF00 +spr35 hex 0600060006 ; fole hole left + hex 0600060006 + hex 0600060006 + hex 0006666600 + hex 0000060000 + hex 0000060000 + hex 0000FFFF00 + hex 0000FF6FF0 + hex 0000FF6FF0 + hex 0000FF6FF0 + hex 0000FF0000 +spr36 hex 0600060006 ; foe hole right + hex 0600060006 + hex 0600060006 + hex 0006666600 + hex 0000060000 + hex 0000060000 + hex 000FFFF000 + hex 00FF6FF000 + hex 00FF6FF000 + hex 00FF6FF000 + hex 00000FF000 +spr37 hex 0000000000 ; floor 2 bars + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0400000040 + hex 0400000040 + hex 0000000000 +spr38 hex 0000000000 ; floor 4 bars + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 4000000040 + hex 4000000040 + hex 4000000040 + hex 4000000040 + hex 0000000000 +spr39 hex 0000000000 ; foe resurrects 1 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0006660000 + hex 0666666600 +spr3A hex 0000000000 ; foe resurrects 2 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0006660000 + hex 0666666600 + hex 0666666600 +spr3B hex 0000000000 ; 0 + hex 0000000000 + hex 0000000000 + hex 0666666600 + hex 0600000600 + hex 0600000600 + hex 0600000600 + hex 0600066600 + hex 0600066600 + hex 0600066600 + hex 0666666600 +spr3C hex 0000000000 ; 1 + hex 0000000000 + hex 0000000000 + hex 0006660000 + hex 0006660000 + hex 0000060000 + hex 0000060000 + hex 0000060000 + hex 0000060000 + hex 0006666600 + hex 0006666600 +spr3D hex 0000000000 ; 2 + hex 0000000000 + hex 0000000000 + hex 0666666600 + hex 0600000600 + hex 0000000600 + hex 0666666600 + hex 0600000000 + hex 0600000000 + hex 0600066600 + hex 0666666600 +spr3E hex 0000000000 ; 3 + hex 0000000000 + hex 0000000000 + hex 0666666600 + hex 0600000600 + hex 0000000600 + hex 0006666600 + hex 0000000600 + hex 0000000600 + hex 0600000600 + hex 0666666600 +spr3F hex 0000000000 ; 4 + hex 0000000000 + hex 0000000000 + hex 0666000600 + hex 0666000600 + hex 0666000600 + hex 0666666600 + hex 0000000600 + hex 0000000600 + hex 0000000600 + hex 0000000600 + +*--- 40..4F + +spr40 hex 0000000000 ; 5 + hex 0000000000 + hex 0000000000 + hex 0666666600 + hex 0600000000 + hex 0600000000 + hex 0666666600 + hex 0000066600 + hex 0000066600 + hex 0000066600 + hex 0666666600 +spr41 hex 0000000000 ; 6 + hex 0000000000 + hex 0000000000 + hex 0666666600 + hex 0600000600 + hex 0600000000 + hex 0600000000 + hex 0666666600 + hex 0600066600 + hex 0600066600 + hex 0666666600 +spr42 hex 0000000000 ; 7 + hex 0000000000 + hex 0000000000 + hex 0666666600 + hex 0000066600 + hex 0000066600 + hex 0000066600 + hex 0006660000 + hex 0006000000 + hex 0006000000 + hex 0006000000 +spr43 hex 0000000000 ; 8 + hex 0000000000 + hex 0000000000 + hex 0006666600 + hex 0006000600 + hex 0006000600 + hex 0666666600 + hex 0600000600 + hex 0600000600 + hex 0600000600 + hex 0666666600 +spr44 hex 0000000000 ; 9 + hex 0000000000 + hex 0000000000 + hex 0666666600 + hex 0600000600 + hex 0600000600 + hex 0666666600 + hex 0000066600 + hex 0000066600 + hex 0000066600 + hex 0000066600 +spr45 hex 0000000000 ; A + hex 0000000000 + hex 0000000000 + hex 0044444000 + hex 0040004000 + hex 0040004000 + hex 4444444000 + hex 4000004000 + hex 4000004000 + hex 4000444000 + hex 4000444000 +spr46 hex 0000000000 ; B + hex 0000000000 + hex 0000000000 + hex 4444400000 + hex 4000400000 + hex 4000400000 + hex 4444444000 + hex 4000004000 + hex 4000004000 + hex 4000004000 + hex 4444444000 +spr47 hex 0000000000 ; C + hex 0000000000 + hex 0000000000 + hex 4444444000 + hex 4000004000 + hex 4000000000 + hex 4000000000 + hex 4440000000 + hex 4440000000 + hex 4440004000 + hex 4444444000 +spr48 hex 0000000000 ; D + hex 0000000000 + hex 0000000000 + hex 4444400000 + hex 4000004000 + hex 4000004000 + hex 4000004000 + hex 4440004000 + hex 4440004000 + hex 4440004000 + hex 4444400000 +spr49 hex 0000000000 ; E + hex 0000000000 + hex 0000000000 + hex 4444444000 + hex 4440000000 + hex 4440000000 + hex 4444400000 + hex 4000000000 + hex 4000000000 + hex 4000000000 + hex 4444444000 +spr4A hex 0000000000 ; F + hex 0000000000 + hex 0000000000 + hex 4444444000 + hex 4440000000 + hex 4440000000 + hex 4444400000 + hex 4000000000 + hex 4000000000 + hex 4000000000 + hex 4000000000 +spr4B hex 0000000000 ; G + hex 0000000000 + hex 0000000000 + hex 4444444000 + hex 4000004000 + hex 4000000000 + hex 4000000000 + hex 4000444000 + hex 4000444000 + hex 4000004000 + hex 4444444000 +spr4C hex 0000000000 ; H + hex 0000000000 + hex 0000000000 + hex 4000004000 + hex 4000004000 + hex 4000004000 + hex 4444444000 + hex 4440004000 + hex 4440004000 + hex 4440004000 + hex 4440004000 +spr4D hex 0000000000 ; I + hex 0000000000 + hex 0000000000 + hex 0040000000 + hex 0040000000 + hex 0040000000 + hex 0044400000 + hex 0044400000 + hex 0044400000 + hex 0044400000 + hex 0044400000 +spr4E hex 0000000000 ; J + hex 0000000000 + hex 0000000000 + hex 0000400000 + hex 0000400000 + hex 0000400000 + hex 0000444000 + hex 0000444000 + hex 0000444000 + hex 4000444000 + hex 4444444000 +spr4F hex 0000000000 ; K + hex 0000000000 + hex 0000000000 + hex 4000004000 + hex 4000444000 + hex 4000400000 + hex 4444400000 + hex 4444444000 + hex 4440004000 + hex 4440004000 + hex 4440004000 + +*--- 50..5F + +spr50 hex 0000000000 ; L + hex 0000000000 + hex 0000000000 + hex 4000000000 + hex 4000000000 + hex 4000000000 + hex 4000000000 + hex 4440000000 + hex 4440000000 + hex 4440000000 + hex 4444444000 +spr51 hex 0000000000 ; M + hex 0000000000 + hex 0000000000 + hex 4000004000 + hex 4440004000 + hex 4444444000 + hex 4444444000 + hex 4000004000 + hex 4000004000 + hex 4000004000 + hex 4000004000 +spr52 hex 0000000000 ; N + hex 0000000000 + hex 0000000000 + hex 4000004000 + hex 4000004000 + hex 4440004000 + hex 4444444000 + hex 4444444000 + hex 4000444000 + hex 4000004000 + hex 4000004000 +spr53 hex 0000000000 ; O + hex 0000000000 + hex 0000000000 + hex 4444444000 + hex 4000444000 + hex 4000444000 + hex 4000004000 + hex 4000004000 + hex 4000004000 + hex 4000004000 + hex 4444444000 +spr54 hex 0000000000 ; P + hex 0000000000 + hex 0000000000 + hex 4444444000 + hex 4000004000 + hex 4000004000 + hex 4444444000 + hex 4440000000 + hex 4440000000 + hex 4440000000 + hex 4440000000 +spr55 hex 0000000000 ; Q + hex 0000000000 + hex 0000000000 + hex 4444444000 + hex 4000444000 + hex 4000444000 + hex 4000004000 + hex 4000004000 + hex 4000004000 + hex 4000400000 + hex 4440004000 +spr56 hex 0000000000 ; R + hex 0000000000 + hex 0000000000 + hex 4444444000 + hex 4000004000 + hex 4000004000 + hex 4444444000 + hex 4444400000 + hex 4444400000 + hex 4440004000 + hex 4440004000 +spr57 hex 0000000000 ; S + hex 0000000000 + hex 0000000000 + hex 4444444000 + hex 4000004000 + hex 4000000000 + hex 4444444000 + hex 0000444000 + hex 0000444000 + hex 4000444000 + hex 4444444000 +spr58 hex 0000000000 ; T + hex 0000000000 + hex 0000000000 + hex 4444444000 + hex 0040000000 + hex 0040000000 + hex 0040000000 + hex 0044400000 + hex 0044400000 + hex 0044400000 + hex 004400000 +spr59 hex 0000000000 ; U + hex 0000000000 + hex 0000000000 + hex 4000004000 + hex 4000004000 + hex 4000004000 + hex 4000004000 + hex 4440004000 + hex 4440004000 + hex 4440004000 + hex 4444444000 +spr5A hex 0000000000 ; V + hex 0000000000 + hex 0000000000 + hex 4440004000 + hex 4440004000 + hex 4440004000 + hex 4440004000 + hex 4440004000 + hex 4444444000 + hex 0004440000 + hex 0004000000 +spr5B hex 0000000000 ; W + hex 0000000000 + hex 0000000000 + hex 4000004000 + hex 4000004000 + hex 4000004000 + hex 4000004000 + hex 4444444000 + hex 4444444000 + hex 4440004000 + hex 4000004000 +spr5C hex 0000000000 ; X + hex 0000000000 + hex 0000000000 + hex 4000004000 + hex 4000004000 + hex 4000004000 + hex 0044400000 + hex 0044400000 + hex 4000004000 + hex 4000004000 + hex 4000004000 +spr5D hex 0000000000 ; Y + hex 0000000000 + hex 0000000000 + hex 4000444000 + hex 4000444000 + hex 4000444000 + hex 4444444000 + hex 0044400000 + hex 0044400000 + hex 0044400000 + hex 0044400000 +spr5E hex 0000000000 ; Z + hex 0000000000 + hex 0000000000 + hex 4444444000 + hex 4000004000 + hex 4000004000 + hex 0000400000 + hex 0044400000 + hex 4000000000 + hex 4000444000 + hex 4444444000 +spr5F hex 0000000000 ; > + hex 0000000000 + hex 0000000000 + hex 4000000000 + hex 4440000000 + hex 0044400000 + hex 0000444000 + hex 0000444000 + hex 0044400000 + hex 4440000000 + hex 4000000000 + +*--- 60.65 + +spr60 hex 0000000000 ; . + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0044400000 + hex 0044400000 + hex 0044400000 +spr61 hex 0000000000 ; ( + hex 0000000000 + hex 0000000000 + hex 0044400000 + hex 0044400000 + hex 4440000000 + hex 4440000000 + hex 4440000000 + hex 4440000000 + hex 0044400000 + hex 0044400000 +spr62 hex 0000000000 ; ) + hex 0000000000 + hex 0000000000 + hex 0044400000 + hex 0044400000 + hex 0000444000 + hex 0000444000 + hex 0000444000 + hex 0000444000 + hex 0044400000 + hex 0044400000 +spr63 hex 0000000000 ; / + hex 0000000000 + hex 0000000000 + hex 0000004000 + hex 0000004000 + hex 0000400000 + hex 0000400000 + hex 0040000000 + hex 0040000000 + hex 4000000000 + hex 4000000000 +spr64 hex 0000000000 ; - + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0000000000 + hex 0444444440 + hex 0444444440 + hex 0444444440 + hex 0444444440 + hex 0000000000 + hex 0000000000 +spr65 hex 0000000000 ; < + hex 0000000000 + hex 0000000000 + hex 0000004000 + hex 0000444000 + hex 0044400000 + hex 4440000000 + hex 4440000000 + hex 0044400000 + hex 0000444000 + hex 0000004000 diff --git a/loderunner/LR.TABLES.S b/loderunner/LR.TABLES.S new file mode 100644 index 0000000..cb88d81 --- /dev/null +++ b/loderunner/LR.TABLES.S @@ -0,0 +1,2624 @@ +* +* Lode Runner +* (c) 1983, Broderbund Software +* (s) 2014, Brutal Deluxe Software +* + +* ZP______ Line +* DF E0 E1 0 +* E2 E3 E4 1 +* E5 E6 E7 2 +* E8 E9 EA 3 +* EB EC ED 4 +* EE EF F0 5 +* F1 F2 F3 6 +* F4 F5 F6 7 +* F7 F8 F9 8 +* FA FB FC 9 +* FD FE FF 10 + +*--------------------------------------- +* TABLES +*--------------------------------------- + + ds $c00 + + lst on +ici = * ; must be $9B00 + lst off + +demoDATA HEX 164C6602550166023618550144016614 + HEX 360D3017600866031616660436233201 + HEX 6201550166201607660236253014600E + HEX 101116251008162310066002300F3617 + HEX 660216075501661E1638440116054401 + HEX 16074401360755013604550116035501 + HEX 1603360B55011603360E44016601600C + HEX 302960024401162B1004600530013667 + HEX 32014401662B360C3015361255011603 + HEX 550136055501160336086602164A1004 + HEX 600730093615660A160D440166021604 + HEX 44011602440616044401160262153631 + HEX 660162041206440166373601301D6033 + HEX 363266031601101B600536284401661F + HEX 361444015501662D3601301260256601 + HEX 5501160D66023609300A360444013603 + HEX 44013603162244011607440416034401 + HEX 1627120E161E55016619360130036007 + HEX 101F6007300936336604100916081201 + HEX 620C320136324401160B440116094401 + HEX 102C60043003360A4401160544013603 + HEX 44013603440166033603550136085501 + HEX 664C160910154401102F160912031612 + HEX 66023606662D55011603101C55011603 + HEX 440136033215360B300B600C4401620D + HEX 1202160D4401662036043017361E4401 + HEX 362F300860031022161B662655071603 + HEX 5501661D16021085600230033603320F + HEX 3603300C36206601160A600666023608 + HEX 30056002660216081001600666013608 + HEX 30046003660116081002600330013608 + HEX 30036003160910026003300336073003 + HEX 600210021608100160023002360A3002 + HEX 60021003160410036005300236076616 + HEX 36026633550136055501360455013603 + HEX 55013603550166A9620C6607600F5501 + HEX 6618162A550116036601600766033603 + HEX 301B360844016618360F660844016638 + HEX 300E6611600466493703000000000030 + HEX 03000000000033070000000000300300 + HEX 00000000370300000000003003000000 + HEX 00003307000000000030030000000000 + HEX 37030000000000300300000000003307 + HEX 00000000003003000000000037030000 + HEX 00000030030000000900330700000000 + HEX 00300300301111111111111111030030 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + +*--- Les niveaux par dfaut + +L9E00 HEX D1D5A0A4B1C3B3B58DF9F4E1E2ECE5A0 ; 0 - garbage & source code + HEX C5D1D5A0A4B1C3B5B18DE2F9F4E1E2EC + HEX E5A0C5D1D5A0A4B1C3B6B28DE2E9F4E1 + HEX E2ECE5A0C5D1D5A0A4B1C3B7C58DF8E2 + HEX F9F4E1E2ECE5A0C5D1D5A0A4B1C3B9C1 + HEX 8DF8E2E9F4E1E2ECE5A0C5D1D5A0A4B1 + HEX C4B2B68DE2EFEFF4A0C5D1D5A0A4B1C4 + HEX C2B28DF3E3EFF2E5E2F5E6A0C5D1D5A0 + HEX A4B1C6B0B08DE3E8E1F2E4E1F4E1A0C5 + HEX D1D5A0A4C1C4B0B08D8DF2F7F4F3F0E1 + HEX F2EDA0C5D1D5A0A4C2B7C5B88DF2F7F4 + HEX F3F6EFECEDA0C5D1D5A0A4C2B7C5C28D + HEX F2F7F4F3F4F2E3EBA0C5D1D5A0A4C2B7 + HEX C5C38DF2F7F4F3F3E5E3F4A0C5D1D5A0 + HEX A4C2B7C5C48DF2F7F4F3E2F5E6E6A0C5 + HEX D1D5A0A4C2B7C6B08DF2F7F4F3E3EDEE + +L9F00 HEX 06000007000007000006000003061311 ; 1 + HEX 11111111111111030000030603000000 + HEX 00000007004344440376111111113111 + HEX 11111101000013111111111133000000 + HEX 00000000030011111131434444440300 + HEX 00000300717011330000000803700008 + HEX 03701111310300001311212211111311 + HEX 00003000000003000000000003000000 + HEX 30000000030000000000030000003800 + HEX 70004344444444440370131111111111 + HEX 03700000700013110300000000000311 + HEX 11111101030003000000000003000000 + HEX 00000300030000700000030090700000 + HEX 03001111111111111111111111111111 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + +LA000 HEX 11116111111111111111110111110600 ; 2 + HEX 61014444440400000000001016616001 + HEX 71001013000000008010061111011111 + HEX 11131111073111116100004744111113 + HEX 11111131011111111101000110131110 + HEX 11310111000000800000101311100131 + HEX 71101311111113731013111001311111 + HEX 03000000131111131107013111100300 +LA080 HEX 00000011111311110131111703000000 + HEX 01000003000000300010131113113121 + HEX 21212121213121211311131131111111 + HEX 00111131212103000300301111110110 + HEX 11310000131111113111111111071111 + HEX 11319300000030701011110180000030 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + +LA100 HEX 00000030000000000000000000008007 ; 3 + HEX 00300000000000000000700813810730 + HEX 00000000000000701831031001301111 + HEX 36111131001001300300000000003307 + HEX 00300000003003000000000037030030 + HEX 00000030030000000000330700000000 + HEX 00300300000000003703000000000030 + HEX 03000000000033070000000000300300 + HEX 00000000370300000000003003000000 + HEX 00003307000000000030030000000000 + HEX 37030000000000300300000000003307 + HEX 00000000003003000000000037030000 + HEX 00000030030000000900330700000000 + HEX 00300300301111111111111111030030 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + +*--- Six tables of pointers to sprite data + +LA200 DB LA900 + DB >LA902 + DB >LA904 + DB >LA912 + DB >LA906 + DB >LA922 + DB >LA914 + DB >LA932 + DB >LA908 + DB >LA942 + DB >LA924 + DB >LA952 + DB >LA916 + DB >LA962 + DB >LA934 + DB >LA972 + DB >LA90A + DB >LA982 + DB >LA944 + DB >LA992 + DB >LA926 + DB >LA9A2 + DB >LA954 + DB >LA9B2 + DB >LA918 + DB >LA9C2 + DB >LA964 + DB >LA9D2 + DB >LA936 + DB >LA9E2 + DB >LA974 + DB >LA9F2 + DB >LA90C + DB >LAA02 + DB >LA984 + DB >LAA12 + DB >LA946 + DB >LAA22 + DB >LA994 + DB >LAA32 + DB >LA928 + DB >LAA42 + DB >LA9A4 + DB >LAA52 + DB >LA956 + DB >LAA62 + DB >LA9B4 + DB >LAA72 + DB >LA91A + DB >LAA82 + DB >LA9C4 + DB >LAA92 + DB >LA966 + DB >LAAA2 + DB >LA9D4 + DB >LAAB2 + DB >LA938 + DB >LAAC2 + DB >LA9E4 + DB >LAAD2 + DB >LA976 + DB >LAAE2 + DB >LA9F4 + DB >LAAF2 + DB >LA90E + DB >LAB02 + DB >LAA04 + DB >LAB12 + DB >LA986 + DB >LAB22 + DB >LAA14 + DB >LAB32 + DB >LA948 + DB >LAB42 + DB >LAA24 + DB >LAB52 + DB >LA996 + DB >LAB62 + DB >LAA34 + DB >LAB72 + DB >LA92A + DB >LAB82 + DB >LAA44 + DB >LAB92 + DB >LA9A6 + DB >LABA2 + DB >LAA54 + DB >LABB2 + DB >LA958 + DB >LABC2 + DB >LAA64 + DB >LABD2 + DB >LA9B6 + DB >LABE2 + DB >LAA74 + DB >LABF2 + DB >LA91C + DB >LAC02 + DB >LAA84 + DB >LAC12 + DB >LA9C6 + DB >LAC22 + DB >LAA94 + DB >LAC32 + DB >LA968 + DB >LAC42 + DB >LAAA4 + DB >LAC52 + DB >LA9D6 + DB >LAC62 + DB >LAAB4 + DB >LAC72 + DB >LA93A + DB >LAC82 + DB >LAAC4 + DB >LAC92 + DB >LA9E6 + DB >LACA2 + DB >LAAD4 + DB >LACB2 + DB >LA978 + DB >LACC2 + DB >LAAE4 + DB >LACD2 + DB >LA9F6 + DB >LACE2 + DB >LAAF4 + DB >LACF2 + +LA300 DB LA900 + DB >LA904 + DB >LA906 + DB >LA914 + DB >LA908 + DB >LA924 + DB >LA916 + DB >LA934 + DB >LA90A + DB >LA944 + DB >LA926 + DB >LA954 + DB >LA918 + DB >LA964 + DB >LA936 + DB >LA974 + DB >LA90C + DB >LA984 + DB >LA946 + DB >LA994 + DB >LA928 + DB >LA9A4 + DB >LA956 + DB >LA9B4 + DB >LA91A + DB >LA9C4 + DB >LA966 + DB >LA9D4 + DB >LA938 + DB >LA9E4 + DB >LA976 + DB >LA9F4 + DB >LA90E + DB >LAA04 + DB >LA986 + DB >LAA14 + DB >LA948 + DB >LAA24 + DB >LA996 + DB >LAA34 + DB >LA92A + DB >LAA44 + DB >LA9A6 + DB >LAA54 + DB >LA958 + DB >LAA64 + DB >LA9B6 + DB >LAA74 + DB >LA91C + DB >LAA84 + DB >LA9C6 + DB >LAA94 + DB >LA968 + DB >LAAA4 + DB >LA9D6 + DB >LAAB4 + DB >LA93A + DB >LAAC4 + DB >LA9E6 + DB >LAAD4 + DB >LA978 + DB >LAAE4 + DB >LA9F6 + DB >LAAF4 + DB >LA910 + DB >LAB04 + DB >LAA06 + DB >LAB14 + DB >LA988 + DB >LAB24 + DB >LAA16 + DB >LAB34 + DB >LA94A + DB >LAB44 + DB >LAA26 + DB >LAB54 + DB >LA998 + DB >LAB64 + DB >LAA36 + DB >LAB74 + DB >LA92C + DB >LAB84 + DB >LAA46 + DB >LAB94 + DB >LA9A8 + DB >LABA4 + DB >LAA56 + DB >LABB4 + DB >LA95A + DB >LABC4 + DB >LAA66 + DB >LABD4 + DB >LA9B8 + DB >LABE4 + DB >LAA76 + DB >LABF4 + DB >LA91E + DB >LAC04 + DB >LAA86 + DB >LAC14 + DB >LA9C8 + DB >LAC24 + DB >LAA96 + DB >LAC34 + DB >LA96A + DB >LAC44 + DB >LAAA6 + DB >LAC54 + DB >LA9D8 + DB >LAC64 + DB >LAAB6 + DB >LAC74 + DB >LA93C + DB >LAC84 + DB >LAAC6 + DB >LAC94 + DB >LA9E8 + DB >LACA4 + DB >LAAD6 + DB >LACB4 + DB >LA97A + DB >LACC4 + DB >LAAE6 + DB >LACD4 + DB >LA9F8 + DB >LACE4 + DB >LAAF6 + DB >LACF4 + +LA400 DB LA900 + DB >LA906 + DB >LA908 + DB >LA916 + DB >LA90A + DB >LA926 + DB >LA918 + DB >LA936 + DB >LA90C + DB >LA946 + DB >LA928 + DB >LA956 + DB >LA91A + DB >LA966 + DB >LA938 + DB >LA976 + DB >LA90E + DB >LA986 + DB >LA948 + DB >LA996 + DB >LA92A + DB >LA9A6 + DB >LA958 + DB >LA9B6 + DB >LA91C + DB >LA9C6 + DB >LA968 + DB >LA9D6 + DB >LA93A + DB >LA9E6 + DB >LA978 + DB >LA9F6 + DB >LA910 + DB >LAA06 + DB >LA988 + DB >LAA16 + DB >LA94A + DB >LAA26 + DB >LA998 + DB >LAA36 + DB >LA92C + DB >LAA46 + DB >LA9A8 + DB >LAA56 + DB >LA95A + DB >LAA66 + DB >LA9B8 + DB >LAA76 + DB >LA91E + DB >LAA86 + DB >LA9C8 + DB >LAA96 + DB >LA96A + DB >LAAA6 + DB >LA9D8 + DB >LAAB6 + DB >LA93C + DB >LAAC6 + DB >LA9E8 + DB >LAAD6 + DB >LA97A + DB >LAAE6 + DB >LA9F8 + DB >LAAF6 + DB >LA920 + DB >LAB06 + DB >LAA08 + DB >LAB16 + DB >LA98A + DB >LAB26 + DB >LAA18 + DB >LAB36 + DB >LA94C + DB >LAB46 + DB >LAA28 + DB >LAB56 + DB >LA99A + DB >LAB66 + DB >LAA38 + DB >LAB76 + DB >LA92E + DB >LAB86 + DB >LAA48 + DB >LAB96 + DB >LA9AA + DB >LABA6 + DB >LAA58 + DB >LABB6 + DB >LA95C + DB >LABC6 + DB >LAA68 + DB >LABD6 + DB >LA9BA + DB >LABE6 + DB >LAA78 + DB >LABF6 + DB >LA930 + DB >LAC06 + DB >LAA88 + DB >LAC16 + DB >LA9CA + DB >LAC26 + DB >LAA98 + DB >LAC36 + DB >LA96C + DB >LAC46 + DB >LAAA8 + DB >LAC56 + DB >LA9DA + DB >LAC66 + DB >LAAB8 + DB >LAC76 + DB >LA93E + DB >LAC86 + DB >LAAC8 + DB >LAC96 + DB >LA9EA + DB >LACA6 + DB >LAAD8 + DB >LACB6 + DB >LA97C + DB >LACC6 + DB >LAAE8 + DB >LACD6 + DB >LA9FA + DB >LACE6 + DB >LAAF8 + DB >LACF6 + +LA500 DB LA900 + DB >LA908 + DB >LA90A + DB >LA918 + DB >LA90C + DB >LA928 + DB >LA91A + DB >LA938 + DB >LA90E + DB >LA948 + DB >LA92A + DB >LA958 + DB >LA91C + DB >LA968 + DB >LA93A + DB >LA978 + DB >LA910 + DB >LA988 + DB >LA94A + DB >LA998 + DB >LA92C + DB >LA9A8 + DB >LA95A + DB >LA9B8 + DB >LA91E + DB >LA9C8 + DB >LA96A + DB >LA9D8 + DB >LA93C + DB >LA9E8 + DB >LA97A + DB >LA9F8 + DB >LA920 + DB >LAA08 + DB >LA98A + DB >LAA18 + DB >LA94C + DB >LAA28 + DB >LA99A + DB >LAA38 + DB >LA92E + DB >LAA48 + DB >LA9AA + DB >LAA58 + DB >LA95C + DB >LAA68 + DB >LA9BA + DB >LAA78 + DB >LA930 + DB >LAA88 + DB >LA9CA + DB >LAA98 + DB >LA96C + DB >LAAA8 + DB >LA9DA + DB >LAAB8 + DB >LA93E + DB >LAAC8 + DB >LA9EA + DB >LAAD8 + DB >LA97C + DB >LAAE8 + DB >LA9FA + DB >LAAF8 + DB >LA940 + DB >LAB08 + DB >LAA0A + DB >LAB18 + DB >LA98C + DB >LAB28 + DB >LAA1A + DB >LAB38 + DB >LA94E + DB >LAB48 + DB >LAA2A + DB >LAB58 + DB >LA99C + DB >LAB68 + DB >LAA3A + DB >LAB78 + DB >LA950 + DB >LAB88 + DB >LAA4A + DB >LAB98 + DB >LA9AC + DB >LABA8 + DB >LAA5A + DB >LABB8 + DB >LA95E + DB >LABC8 + DB >LAA6A + DB >LABD8 + DB >LA9BC + DB >LABE8 + DB >LAA7A + DB >LABF8 + DB >LA960 + DB >LAC08 + DB >LAA8A + DB >LAC18 + DB >LA9CC + DB >LAC28 + DB >LAA9A + DB >LAC38 + DB >LA96E + DB >LAC48 + DB >LAAAA + DB >LAC58 + DB >LA9DC + DB >LAC68 + DB >LAABA + DB >LAC78 + DB >LA970 + DB >LAC88 + DB >LAACA + DB >LAC98 + DB >LA9EC + DB >LACA8 + DB >LAADA + DB >LACB8 + DB >LA97E + DB >LACC8 + DB >LAAEA + DB >LACD8 + DB >LA9FC + DB >LACE8 + DB >LAAFA + DB >LACF8 + +LA600 DB LA900 + DB >LA90A + DB >LA90C + DB >LA91A + DB >LA90E + DB >LA92A + DB >LA91C + DB >LA93A + DB >LA910 + DB >LA94A + DB >LA92C + DB >LA95A + DB >LA91E + DB >LA96A + DB >LA93C + DB >LA97A + DB >LA920 + DB >LA98A + DB >LA94C + DB >LA99A + DB >LA92E + DB >LA9AA + DB >LA95C + DB >LA9BA + DB >LA930 + DB >LA9CA + DB >LA96C + DB >LA9DA + DB >LA93E + DB >LA9EA + DB >LA97C + DB >LA9FA + DB >LA940 + DB >LAA0A + DB >LA98C + DB >LAA1A + DB >LA94E + DB >LAA2A + DB >LA99C + DB >LAA3A + DB >LA950 + DB >LAA4A + DB >LA9AC + DB >LAA5A + DB >LA95E + DB >LAA6A + DB >LA9BC + DB >LAA7A + DB >LA960 + DB >LAA8A + DB >LA9CC + DB >LAA9A + DB >LA96E + DB >LAAAA + DB >LA9DC + DB >LAABA + DB >LA970 + DB >LAACA + DB >LA9EC + DB >LAADA + DB >LA97E + DB >LAAEA + DB >LA9FC + DB >LAAFA + DB >LA980 + DB >LAB0A + DB >LAA0C + DB >LAB1A + DB >LA98E + DB >LAB2A + DB >LAA1C + DB >LAB3A + DB >LA990 + DB >LAB4A + DB >LAA2C + DB >LAB5A + DB >LA99E + DB >LAB6A + DB >LAA3C + DB >LAB7A + DB >LA9A0 + DB >LAB8A + DB >LAA4C + DB >LAB9A + DB >LA9AE + DB >LABAA + DB >LAA5C + DB >LABBA + DB >LA9B0 + DB >LABCA + DB >LAA6C + DB >LABDA + DB >LA9BE + DB >LABEA + DB >LAA7C + DB >LABFA + DB >LA9C0 + DB >LAC0A + DB >LAA8C + DB >LAC1A + DB >LA9CE + DB >LAC2A + DB >LAA9C + DB >LAC3A + DB >LA9D0 + DB >LAC4A + DB >LAAAC + DB >LAC5A + DB >LA9DE + DB >LAC6A + DB >LAABC + DB >LAC7A + DB >LA9E0 + DB >LAC8A + DB >LAACC + DB >LAC9A + DB >LA9EE + DB >LACAA + DB >LAADC + DB >LACBA + DB >LA9F0 + DB >LACCA + DB >LAAEC + DB >LACDA + DB >LA9FE + DB >LACEA + DB >LAAFC + DB >LACFA + +LA700 DB LA900 + DB >LA90C + DB >LA90E + DB >LA91C + DB >LA910 + DB >LA92C + DB >LA91E + DB >LA93C + DB >LA920 + DB >LA94C + DB >LA92E + DB >LA95C + DB >LA930 + DB >LA96C + DB >LA93E + DB >LA97C + DB >LA940 + DB >LA98C + DB >LA94E + DB >LA99C + DB >LA950 + DB >LA9AC + DB >LA95E + DB >LA9BC + DB >LA960 + DB >LA9CC + DB >LA96E + DB >LA9DC + DB >LA970 + DB >LA9EC + DB >LA97E + DB >LA9FC + DB >LA980 + DB >LAA0C + DB >LA98E + DB >LAA1C + DB >LA990 + DB >LAA2C + DB >LA99E + DB >LAA3C + DB >LA9A0 + DB >LAA4C + DB >LA9AE + DB >LAA5C + DB >LA9B0 + DB >LAA6C + DB >LA9BE + DB >LAA7C + DB >LA9C0 + DB >LAA8C + DB >LA9CE + DB >LAA9C + DB >LA9D0 + DB >LAAAC + DB >LA9DE + DB >LAABC + DB >LA9E0 + DB >LAACC + DB >LA9EE + DB >LAADC + DB >LA9F0 + DB >LAAEC + DB >LA9FE + DB >LAAFC + DB >LAA00 + DB >LAB0C + DB >LAA0E + DB >LAB1C + DB >LAA10 + DB >LAB2C + DB >LAA1E + DB >LAB3C + DB >LAA20 + DB >LAB4C + DB >LAA2E + DB >LAB5C + DB >LAA30 + DB >LAB6C + DB >LAA3E + DB >LAB7C + DB >LAA40 + DB >LAB8C + DB >LAA4E + DB >LAB9C + DB >LAA50 + DB >LABAC + DB >LAA5E + DB >LABBC + DB >LAA60 + DB >LABCC + DB >LAA6E + DB >LABDC + DB >LAA70 + DB >LABEC + DB >LAA7E + DB >LABFC + DB >LAA80 + DB >LAC0C + DB >LAA8E + DB >LAC1C + DB >LAA90 + DB >LAC2C + DB >LAA9E + DB >LAC3C + DB >LAAA0 + DB >LAC4C + DB >LAAAE + DB >LAC5C + DB >LAAB0 + DB >LAC6C + DB >LAABE + DB >LAC7C + DB >LAAC0 + DB >LAC8C + DB >LAACE + DB >LAC9C + DB >LAAD0 + DB >LACAC + DB >LAADE + DB >LACBC + DB >LAAE0 + DB >LACCC + DB >LAAEE + DB >LACDC + DB >LAAF0 + DB >LACEC + DB >LAAFE + DB >LACFC + +LA800 DB LA900 + DB >LA90E + DB >LA910 + DB >LA91E + DB >LA920 + DB >LA92E + DB >LA930 + DB >LA93E + DB >LA940 + DB >LA94E + DB >LA950 + DB >LA95E + DB >LA960 + DB >LA96E + DB >LA970 + DB >LA97E + DB >LA980 + DB >LA98E + DB >LA990 + DB >LA99E + DB >LA9A0 + DB >LA9AE + DB >LA9B0 + DB >LA9BE + DB >LA9C0 + DB >LA9CE + DB >LA9D0 + DB >LA9DE + DB >LA9E0 + DB >LA9EE + DB >LA9F0 + DB >LA9FE + DB >LAA00 + DB >LAA0E + DB >LAA10 + DB >LAA1E + DB >LAA20 + DB >LAA2E + DB >LAA30 + DB >LAA3E + DB >LAA40 + DB >LAA4E + DB >LAA50 + DB >LAA5E + DB >LAA60 + DB >LAA6E + DB >LAA70 + DB >LAA7E + DB >LAA80 + DB >LAA8E + DB >LAA90 + DB >LAA9E + DB >LAAA0 + DB >LAAAE + DB >LAAB0 + DB >LAABE + DB >LAAC0 + DB >LAACE + DB >LAAD0 + DB >LAADE + DB >LAAE0 + DB >LAAEE + DB >LAAF0 + DB >LAAFE + DB >LAB00 + DB >LAB0E + DB >LAB10 + DB >LAB1E + DB >LAB20 + DB >LAB2E + DB >LAB30 + DB >LAB3E + DB >LAB40 + DB >LAB4E + DB >LAB50 + DB >LAB5E + DB >LAB60 + DB >LAB6E + DB >LAB70 + DB >LAB7E + DB >LAB80 + DB >LAB8E + DB >LAB90 + DB >LAB9E + DB >LABA0 + DB >LABAE + DB >LABB0 + DB >LABBE + DB >LABC0 + DB >LABCE + DB >LABD0 + DB >LABDE + DB >LABE0 + DB >LABEE + DB >LABF0 + DB >LABFE + DB >LAC00 + DB >LAC0E + DB >LAC10 + DB >LAC1E + DB >LAC20 + DB >LAC2E + DB >LAC30 + DB >LAC3E + DB >LAC40 + DB >LAC4E + DB >LAC50 + DB >LAC5E + DB >LAC60 + DB >LAC6E + DB >LAC70 + DB >LAC7E + DB >LAC80 + DB >LAC8E + DB >LAC90 + DB >LAC9E + DB >LACA0 + DB >LACAE + DB >LACB0 + DB >LACBE + DB >LACC0 + DB >LACCE + DB >LACD0 + DB >LACDE + DB >LACE0 + DB >LACEE + DB >LACF0 + DB >LACFE + +*--- The sprites + +LA900 DW $8080 +LA902 DW $8081 +LA904 DW $8082 +LA906 DW $8084 +LA908 DW $8088 +LA90A DW $8090 +LA90C DW $80A0 +LA90E DW $80C0 +LA910 DW $8180 +LA912 DW $8083 +LA914 DW $8086 +LA916 DW $808C +LA918 DW $8098 +LA91A DW $80B0 +LA91C DW $80E0 +LA91E DW $81C0 +LA920 DW $8280 +LA922 DW $8085 +LA924 DW $808A +LA926 DW $8094 +LA928 DW $80A8 +LA92A DW $80D0 +LA92C DW $81A0 +LA92E DW $82C0 +LA930 DW $8380 +LA932 DW $8087 +LA934 DW $808E +LA936 DW $809C +LA938 DW $80B8 +LA93A DW $80F0 +LA93C DW $81E0 +LA93E DW $83C0 +LA940 DW $8480 +LA942 DW $8089 +LA944 DW $8092 +LA946 DW $80A4 +LA948 DW $80C8 +LA94A DW $8190 +LA94C DW $82A0 +LA94E DW $84C0 +LA950 DW $8580 +LA952 DW $808B +LA954 DW $8096 +LA956 DW $80AC +LA958 DW $80D8 +LA95A DW $81B0 +LA95C DW $82E0 +LA95E DW $85C0 +LA960 DW $8680 +LA962 DW $808D +LA964 DW $809A +LA966 DW $80B4 +LA968 DW $80E8 +LA96A DW $81D0 +LA96C DW $83A0 +LA96E DW $86C0 +LA970 DW $8780 +LA972 DW $808F +LA974 DW $809E +LA976 DW $80BC +LA978 DW $80F8 +LA97A DW $81F0 +LA97C DW $83E0 +LA97E DW $87C0 +LA980 DW $8880 +LA982 DW $8091 +LA984 DW $80A2 +LA986 DW $80C4 +LA988 DW $8188 +LA98A DW $8290 +LA98C DW $84A0 +LA98E DW $88C0 +LA990 DW $8980 +LA992 DW $8093 +LA994 DW $80A6 +LA996 DW $80CC +LA998 DW $8198 +LA99A DW $82B0 +LA99C DW $84E0 +LA99E DW $89C0 +LA9A0 DW $8A80 +LA9A2 DW $8095 +LA9A4 DW $80AA +LA9A6 DW $80D4 +LA9A8 DW $81A8 +LA9AA DW $82D0 +LA9AC DW $85A0 +LA9AE DW $8AC0 +LA9B0 DW $8B80 +LA9B2 DW $8097 +LA9B4 DW $80AE +LA9B6 DW $80DC +LA9B8 DW $81B8 +LA9BA DW $82F0 +LA9BC DW $85E0 +LA9BE DW $8BC0 +LA9C0 DW $8C80 +LA9C2 DW $8099 +LA9C4 DW $80B2 +LA9C6 DW $80E4 +LA9C8 DW $81C8 +LA9CA DW $8390 +LA9CC DW $86A0 +LA9CE DW $8CC0 +LA9D0 DW $8D80 +LA9D2 DW $809B +LA9D4 DW $80B6 +LA9D6 DW $80EC +LA9D8 DW $81D8 +LA9DA DW $83B0 +LA9DC DW $86E0 +LA9DE DW $8DC0 +LA9E0 DW $8E80 +LA9E2 DW $809D +LA9E4 DW $80BA +LA9E6 DW $80F4 +LA9E8 DW $81E8 +LA9EA DW $83D0 +LA9EC DW $87A0 +LA9EE DW $8EC0 +LA9F0 DW $8F80 +LA9F2 DW $809F +LA9F4 DW $80BE +LA9F6 DW $80FC +LA9F8 DW $81F8 +LA9FA DW $83F0 +LA9FC DW $87E0 +LA9FE DW $8FC0 +LAA00 DW $9080 +LAA02 DW $80A1 +LAA04 DW $80C2 +LAA06 DW $8184 +LAA08 DW $8288 +LAA0A DW $8490 +LAA0C DW $88A0 +LAA0E DW $90C0 +LAA10 DW $9180 +LAA12 DW $80A3 +LAA14 DW $80C6 +LAA16 DW $818C +LAA18 DW $8298 +LAA1A DW $84B0 +LAA1C DW $88E0 +LAA1E DW $91C0 +LAA20 DW $9280 +LAA22 DW $80A5 +LAA24 DW $80CA +LAA26 DW $8194 +LAA28 DW $82A8 +LAA2A DW $84D0 +LAA2C DW $89A0 +LAA2E DW $92C0 +LAA30 DW $9380 +LAA32 DW $80A7 +LAA34 DW $80CE +LAA36 DW $819C +LAA38 DW $82B8 +LAA3A DW $84F0 +LAA3C DW $89E0 +LAA3E DW $93C0 +LAA40 DW $9480 +LAA42 DW $80A9 +LAA44 DW $80D2 +LAA46 DW $81A4 +LAA48 DW $82C8 +LAA4A DW $8590 +LAA4C DW $8AA0 +LAA4E DW $94C0 +LAA50 DW $9580 +LAA52 DW $80AB +LAA54 DW $80D6 +LAA56 DW $81AC +LAA58 DW $82D8 +LAA5A DW $85B0 +LAA5C DW $8AE0 +LAA5E DW $95C0 +LAA60 DW $9680 +LAA62 DW $80AD +LAA64 DW $80DA +LAA66 DW $81B4 +LAA68 DW $82E8 +LAA6A DW $85D0 +LAA6C DW $8BA0 +LAA6E DW $96C0 +LAA70 DW $9780 +LAA72 DW $80AF +LAA74 DW $80DE +LAA76 DW $81BC +LAA78 DW $82F8 +LAA7A DW $85F0 +LAA7C DW $8BE0 +LAA7E DW $97C0 +LAA80 DW $9880 +LAA82 DW $80B1 +LAA84 DW $80E2 +LAA86 DW $81C4 +LAA88 DW $8388 +LAA8A DW $8690 +LAA8C DW $8CA0 +LAA8E DW $98C0 +LAA90 DW $9980 +LAA92 DW $80B3 +LAA94 DW $80E6 +LAA96 DW $81CC +LAA98 DW $8398 +LAA9A DW $86B0 +LAA9C DW $8CE0 +LAA9E DW $99C0 +LAAA0 DW $9A80 +LAAA2 DW $80B5 +LAAA4 DW $80EA +LAAA6 DW $81D4 +LAAA8 DW $83A8 +LAAAA DW $86D0 +LAAAC DW $8DA0 +LAAAE DW $9AC0 +LAAB0 DW $9B80 +LAAB2 DW $80B7 +LAAB4 DW $80EE +LAAB6 DW $81DC +LAAB8 DW $83B8 +LAABA DW $86F0 +LAABC DW $8DE0 +LAABE DW $9BC0 +LAAC0 DW $9C80 +LAAC2 DW $80B9 +LAAC4 DW $80F2 +LAAC6 DW $81E4 +LAAC8 DW $83C8 +LAACA DW $8790 +LAACC DW $8EA0 +LAACE DW $9CC0 +LAAD0 DW $9D80 +LAAD2 DW $80BB +LAAD4 DW $80F6 +LAAD6 DW $81EC +LAAD8 DW $83D8 +LAADA DW $87B0 +LAADC DW $8EE0 +LAADE DW $9DC0 +LAAE0 DW $9E80 +LAAE2 DW $80BD +LAAE4 DW $80FA +LAAE6 DW $81F4 +LAAE8 DW $83E8 +LAAEA DW $87D0 +LAAEC DW $8FA0 +LAAEE DW $9EC0 +LAAF0 DW $9F80 +LAAF2 DW $80BF +LAAF4 DW $80FE +LAAF6 DW $81FC +LAAF8 DW $83F8 +LAAFA DW $87F0 +LAAFC DW $8FE0 +LAAFE DW $9FC0 +LAB00 DW $A080 +LAB02 DW $80C1 +LAB04 DW $8182 +LAB06 DW $8284 +LAB08 DW $8488 +LAB0A DW $8890 +LAB0C DW $90A0 +LAB0E DW $A0C0 +LAB10 DW $A180 +LAB12 DW $80C3 +LAB14 DW $8186 +LAB16 DW $828C +LAB18 DW $8498 +LAB1A DW $88B0 +LAB1C DW $90E0 +LAB1E DW $A1C0 +LAB20 DW $A280 +LAB22 DW $80C5 +LAB24 DW $818A +LAB26 DW $8294 +LAB28 DW $84A8 +LAB2A DW $88D0 +LAB2C DW $91A0 +LAB2E DW $A2C0 +LAB30 DW $A380 +LAB32 DW $80C7 +LAB34 DW $818E +LAB36 DW $829C +LAB38 DW $84B8 +LAB3A DW $88F0 +LAB3C DW $91E0 +LAB3E DW $A3C0 +LAB40 DW $A480 +LAB42 DW $80C9 +LAB44 DW $8192 +LAB46 DW $82A4 +LAB48 DW $84C8 +LAB4A DW $8990 +LAB4C DW $92A0 +LAB4E DW $A4C0 +LAB50 DW $A580 +LAB52 DW $80CB +LAB54 DW $8196 +LAB56 DW $82AC +LAB58 DW $84D8 +LAB5A DW $89B0 +LAB5C DW $92E0 +LAB5E DW $A5C0 +LAB60 DW $A680 +LAB62 DW $80CD +LAB64 DW $819A +LAB66 DW $82B4 +LAB68 DW $84E8 +LAB6A DW $89D0 +LAB6C DW $93A0 +LAB6E DW $A6C0 +LAB70 DW $A780 +LAB72 DW $80CF +LAB74 DW $819E +LAB76 DW $82BC +LAB78 DW $84F8 +LAB7A DW $89F0 +LAB7C DW $93E0 +LAB7E DW $A7C0 +LAB80 DW $A880 +LAB82 DW $80D1 +LAB84 DW $81A2 +LAB86 DW $82C4 +LAB88 DW $8588 +LAB8A DW $8A90 +LAB8C DW $94A0 +LAB8E DW $A8C0 +LAB90 DW $A980 +LAB92 DW $80D3 +LAB94 DW $81A6 +LAB96 DW $82CC +LAB98 DW $8598 +LAB9A DW $8AB0 +LAB9C DW $94E0 +LAB9E DW $A9C0 +LABA0 DW $AA80 +LABA2 DW $80D5 +LABA4 DW $81AA +LABA6 DW $82D4 +LABA8 DW $85A8 +LABAA DW $8AD0 +LABAC DW $95A0 +LABAE DW $AAC0 +LABB0 DW $AB80 +LABB2 DW $80D7 +LABB4 DW $81AE +LABB6 DW $82DC +LABB8 DW $85B8 +LABBA DW $8AF0 +LABBC DW $95E0 +LABBE DW $ABC0 +LABC0 DW $AC80 +LABC2 DW $80D9 +LABC4 DW $81B2 +LABC6 DW $82E4 +LABC8 DW $85C8 +LABCA DW $8B90 +LABCC DW $96A0 +LABCE DW $ACC0 +LABD0 DW $AD80 +LABD2 DW $80DB +LABD4 DW $81B6 +LABD6 DW $82EC +LABD8 DW $85D8 +LABDA DW $8BB0 +LABDC DW $96E0 +LABDE DW $ADC0 +LABE0 DW $AE80 +LABE2 DW $80DD +LABE4 DW $81BA +LABE6 DW $82F4 +LABE8 DW $85E8 +LABEA DW $8BD0 +LABEC DW $97A0 +LABEE DW $AEC0 +LABF0 DW $AF80 +LABF2 DW $80DF +LABF4 DW $81BE +LABF6 DW $82FC +LABF8 DW $85F8 +LABFA DW $8BF0 +LABFC DW $97E0 +LABFE DW $AFC0 +LAC00 DW $B080 +LAC02 DW $80E1 +LAC04 DW $81C2 +LAC06 DW $8384 +LAC08 DW $8688 +LAC0A DW $8C90 +LAC0C DW $98A0 +LAC0E DW $B0C0 +LAC10 DW $B180 +LAC12 DW $80E3 +LAC14 DW $81C6 +LAC16 DW $838C +LAC18 DW $8698 +LAC1A DW $8CB0 +LAC1C DW $98E0 +LAC1E DW $B1C0 +LAC20 DW $B280 +LAC22 DW $80E5 +LAC24 DW $81CA +LAC26 DW $8394 +LAC28 DW $86A8 +LAC2A DW $8CD0 +LAC2C DW $99A0 +LAC2E DW $B2C0 +LAC30 DW $B380 +LAC32 DW $80E7 +LAC34 DW $81CE +LAC36 DW $839C +LAC38 DW $86B8 +LAC3A DW $8CF0 +LAC3C DW $99E0 +LAC3E DW $B3C0 +LAC40 DW $B480 +LAC42 DW $80E9 +LAC44 DW $81D2 +LAC46 DW $83A4 +LAC48 DW $86C8 +LAC4A DW $8D90 +LAC4C DW $9AA0 +LAC4E DW $B4C0 +LAC50 DW $B580 +LAC52 DW $80EB +LAC54 DW $81D6 +LAC56 DW $83AC +LAC58 DW $86D8 +LAC5A DW $8DB0 +LAC5C DW $9AE0 +LAC5E DW $B5C0 +LAC60 DW $B680 +LAC62 DW $80ED +LAC64 DW $81DA +LAC66 DW $83B4 +LAC68 DW $86E8 +LAC6A DW $8DD0 +LAC6C DW $9BA0 +LAC6E DW $B6C0 +LAC70 DW $B780 +LAC72 DW $80EF +LAC74 DW $81DE +LAC76 DW $83BC +LAC78 DW $86F8 +LAC7A DW $8DF0 +LAC7C DW $9BE0 +LAC7E DW $B7C0 +LAC80 DW $B880 +LAC82 DW $80F1 +LAC84 DW $81E2 +LAC86 DW $83C4 +LAC88 DW $8788 +LAC8A DW $8E90 +LAC8C DW $9CA0 +LAC8E DW $B8C0 +LAC90 DW $B980 +LAC92 DW $80F3 +LAC94 DW $81E6 +LAC96 DW $83CC +LAC98 DW $8798 +LAC9A DW $8EB0 +LAC9C DW $9CE0 +LAC9E DW $B9C0 +LACA0 DW $BA80 +LACA2 DW $80F5 +LACA4 DW $81EA +LACA6 DW $83D4 +LACA8 DW $87A8 +LACAA DW $8ED0 +LACAC DW $9DA0 +LACAE DW $BAC0 +LACB0 DW $BB80 +LACB2 DW $80F7 +LACB4 DW $81EE +LACB6 DW $83DC +LACB8 DW $87B8 +LACBA DW $8EF0 +LACBC DW $9DE0 +LACBE DW $BBC0 +LACC0 DW $BC80 +LACC2 DW $80F9 +LACC4 DW $81F2 +LACC6 DW $83E4 +LACC8 DW $87C8 +LACCA DW $8F90 +LACCC DW $9EA0 +LACCE DW $BCC0 +LACD0 DW $BD80 +LACD2 DW $80FB +LACD4 DW $81F6 +LACD6 DW $83EC +LACD8 DW $87D8 +LACDA DW $8FB0 +LACDC DW $9EE0 +LACDE DW $BDC0 +LACE0 DW $BE80 +LACE2 DW $80FD +LACE4 DW $81FA +LACE6 DW $83F4 +LACE8 DW $87E8 +LACEA DW $8FD0 +LACEC DW $9FA0 +LACEE DW $BEC0 +LACF0 DW $BF80 +LACF2 DW $80FF +LACF4 DW $81FE +LACF6 DW $83FC +LACF8 DW $87F8 +LACFA DW $8FF0 +LACFC DW $9FE0 +LACFE DW $BFC0 + +*--- Each block is $68 long +* Each entry is an offset per sprite per line + +tblOFFSPR HEX 001555060055060010407F0808083040 ; 0 + HEX 40403026130660180618600000100025 + HEX 20000000001000004040401010022008 + HEX 02082020202222000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000000000203 + HEX 00020203000200000000070000000000 ; 1 + HEX 00000006030300000300000000000002 + HEX 00000000000000000000000000010000 + HEX 01000000000404000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000000000600 + HEX 001555067F55060028607F1C1C1C3060 ; 2 + HEX 606031763B0660180618600000000015 + HEX 28200000003800002020202828022008 + HEX 02082020212222000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000000000700 + HEX 00020203070200000001070000000401 ; 3 + HEX 01010006030300000300000000000002 + HEX 00000000000000000101010000010000 + HEX 01000004000404000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000000007060 + HEX 0015557E00007E0028607F1C1C1C7060 ; 4 + HEX 60603F763B3678783678780000000015 + HEX 01280000003800002020202828222828 + HEX 0A2828202B2222000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000000000006 + HEX 00020203000003000001070000000701 ; 5 + HEX 01010006030300000300000000000002 + HEX 02000000000000000101010000010000 + HEX 01000005000404000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000000003870 + HEX 00155506007C060020707F3818187240 ; 6 + HEX 6060387C7E7638703C703B0010001015 + HEX 15292000001800102020202020222820 + HEX 0A280822282828000000002A282A2A0A + HEX 2A2A2A282A5415551555555541041041 + HEX 01414155555555555541454141515501 + HEX 0014144000400000 + HEX 00020203000103000000070000000001 ; 7 + HEX 00000203010100060300000000000002 + HEX 02020000000000000000000000010004 + HEX 01000000020101000000000100010101 + HEX 01010101010000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000000000000 + HEX 0000550600300000286C7F5C387A7E70 ; 8 + HEX 70787860183C1E6070601E0000000000 + HEX 00002800007E00002828282028280A20 + HEX 28200A2A28202000000000022802020A + HEX 02022008024411414105054141041051 + HEX 01454151415141410441454141514105 + HEX 0014144000500000 + HEX 00000203000003000101070100000007 ; 9 + HEX 00020300000000030103000000000000 + HEX 00000000000000000100010101000001 + HEX 00010000030000000000000100010101 + HEX 00010101010000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000000000000 + HEX 005155060030007822367F337C5E705A ; 10 + HEX 786C386018181B606060180000110151 + HEX 51512820005A00002228222828080A20 + HEX 2020082028202000000000022000000A + HEX 02022008024411014105050141041011 + HEX 01554551415141010441454141514114 + HEX 0005501055140101 + HEX 00020203000003010406070300010005 ; 12 + HEX 01030000000000000006000002000002 + HEX 02020100000500020401010104000000 + HEX 00010000000000000000000100010101 + HEX 00000101010000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000002000820 + HEX 005155060030002860307F307B187042 ; 13 + HEX 78603878781818606060181001000051 + HEX 51510020001810053060603230080820 + HEX 202008703870780001000002202A282A + HEX 2A02202A2A5555014115150155145015 + HEX 01555541554155550441454114551050 + HEX 0005501055050000 + HEX 00020203000003010000070000000001 ; 14 + HEX 06000000000000000000000000020002 + HEX 02020001000400000004000000000000 + HEX 00000000000100000200000100010101 + HEX 01000101010000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000002006C00 + HEX 0051557E0030067870707F381C3C5860 ; 15 + HEX 60706C6C581E1C706060384004010051 + HEX 515151292038440270607038781E1C70 + HEX 70701C586C306C000100002220020000 + HEX 202A2802204141054501015145145055 + HEX 05415541054115501445455514141450 + HEX 0005500455050001 + HEX 00020203000003010000070000000101 ; 16 + HEX 01010000010000000301000400000202 + HEX 02020201000000000001010000000000 + HEX 01000001000300000200000100000101 + HEX 01010001010000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000002000000 + HEX 0051550600557E28585E7F6C3C665830 ; 17 + HEX 70186E6C5813365820306C0450040051 + HEX 51515101286C12525E7018784C133658 + HEX 105836586E306C010100282220020000 + HEX 20220802204141054501015145145045 + HEX 05415141054115501445555541140114 + HEX 1405500455140001 + HEX 00020203000203010701070300000303 ; 18 + HEX 01030000010000010603000404000002 + HEX 02020200000000000101030001000001 + HEX 03010003000300020200000100000101 + HEX 01010001010000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000002004145 + HEX 005155060055067818407F0C70461830 ; 19 + HEX 380C606C581B365860306C1004400051 + HEX 51515151286C0A0840380C600C1B3658 + HEX 3058361860306C0101282A2228220200 + HEX 20220802205141454501014145145145 + HEX 05414141051145511445144541145105 + HEX 1414140100500000 + HEX 00020203000200010001070000010003 ; 20 + HEX 00030000010000010603000105000002 + HEX 02020202010002010100030103000001 + HEX 03010000000300020200010101010101 + HEX 01010001010000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 0000000000005545 + HEX 000000060000060018407F0C30401C30 ; 21 + HEX 300C6060180D365840306C0010000000 + HEX 00000000006C080840300C60000D3058 + HEX 6058361C60306000002A2A2A282A2A00 + HEX 2A2A082A205155551555015545145545 + HEX 55414155054545551455044141145501 + HEX 1414140100400000 + HEX 00000003000000000001070000010003 ; 22 + HEX 00000100000000010503000101000000 + HEX 00000000000000010100000003000001 + HEX 02010000010000000001010101010101 + HEX 01010001010000000000000000000000 + HEX 00000000000000000000000000000000 + HEX 00000000000081A8 + +LB5F0 HEX C5A2D4A200D08A948080808080808080