.include "cydheader.a64" *= game1 jmp start jmp setpos jmp nexzeil jmp setirq jmp button jmp iend2 jmp fget jmp wht jmp blk jmp clrw2 jmp clrscw jmp sfacol jmp irbut jmp nexzeil jmp sprset jmp init3 jmp stars1 jmp sdco jmp setpos jmp invcha jmp iend jmp editor jmp setnmi jmp slhp jmp print jmp printc jmp ni2r jmp pbbyt jmp ssra2 jmp ni201 jmp ss4 jmp gfacol jmp inbut jmp pword jmp adscore jmp invbz jmp invbc jmp phslist jmp pbyte jmp invst jmp sdpb depspa = $e100 dsp = (depspa-$c000)/$40 anzf1 = 9 anzf2 = 2 anzf3 = 4 anzf4 = 10 anzf5 = 7 anzf6 = 14 player = game2+0 bomb = game2+3 gspace = game2+6 ;takep2 = game2+9 stopshot = game2+12 sshot = game2+15 sbox = game2+18 cshot = game2+21 scroll = game2+24 in18 = game2+27 getplr = game2+30 ;setscrn = game2+33 initplr = game2+36 gppos = game2+39 loss = game2+42+3 hiss = game2+42+31 subjmain = game3 ssubstat = game3+3 getsprit = game3+6 putsprit = game3+9 subjinit = game3+12 rsallsb = game3+36 ;getpar = game4+8 ;szstar = game4+11 ;chzst = game4+14 ;clstar = game4+17 ;setstar = game4+20 ;putanz = game4+23 clwp_2 = tool+3 ;-- modified -- added ;--- modified --- pointer_subjectsspritesdata = submem+0 flist = map-$a0 ;world-file-list ;anic = blok+$0c00 load = dos save = dos+3 loadabs = dos+9 loadaddr = zp+3 ;dos+12 levmem = >map zs = $94-1 rs = $b9 rs1 = rs+1 ss = $c0 sray = $4f+$20 rasi3 = $be+8 soust = sound+3 fx = sound+6 .if spritesystem branchtab .word spi10,spi10,spi11,spi12 .word spi13,spi14,spi15,spi16 .word spi17 deftab .byte 16,16,16,16,16,16,16,16;0 .byte 16,16,16,16,16,16,16,16 .byte 0,0,0,0,0,0,0,0 ;1 .byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0 ;2 .byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0 ;3 .byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0 ;4 .byte 0,0,0,0,0,0,0,0 .byte 2,2,2,2,2,2,2,2 ;5 .byte 2,2,2,2,2,2,2,2 .byte 4,4,4,4,4,4,4,4 ;6 .byte 4,4,4,4,4,4,4,4 .byte 6,6,6,6,6,6,6,6 ;7 .byte 6,6,6,6,6,6,6,6 .byte 8,8,8,8,8,8,8,8 ;8 .byte 8,8,8,8,8,8,8,8 .byte 10,10,10,10,10,10,10,10;9 .byte 10,10,10,10,10,10,10,10 .byte 12,12,12,12,12,12,12,12;a .byte 12,12,12,12,12,12,12,12 .byte 14,14,14,14,14,14,14,14;b .byte 14,14,14,14,14,14,14,14 .byte 16,16,16,16,16,16,16,16;c .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16;d .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16;e .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16;f .byte 16,16,16,16,16,16,16,16 .endif stt .byte $18,35,$20,$d8,$2c,$d0 .byte $40,$d8,$34,$d0 .byte $e0,0,$48,$80,$a8,$80 .byte $a8,$68,$a0,$50 .byte $00,$50,$00,$68,$00,$80 pbanz = 9 lptab .byte $82,$84,$2d,$73,$75,$77 .byte $37,$39,$06,$08 hptab .byte $c3,$c3,$c3,$c3,$c3,$c3 .byte $c3,$c3,$c1,$c1 padr .byte $5f,$5e,$22,$e2,$e1,$e0 .byte $e4,$e3,$5f,$5e padrw .byte 0,0,0,0,0,0 .byte 0,0,0,0 icax .byte 17,17,17,17,5,5,5 loics .byte $02,$92,$32,$d2,$c2 .byte $ca,$1a hiics .byte $c0,$c1,$c2,$c2,$c3 .byte $c0,$c1 icrc .byte 0,1,2,3,4,5,40,80,120,160 .byte 165,125 .byte 85,45,161,162,163,164 icrd .byte rs1,rs1,rs1,rs1,rs1,rs1 .byte rs,rs,rs,rs+6 .byte rs+6,rs,rs,rs,rs1,rs1 .byte rs1,rs1 starz .byte 8 stara .byte 0 starmem .byte 0,0,4,4,4,4,4,1 oldss .byte 0,0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0,0 ssxp .byte 110,0,237,1,102,79,203 .byte 252,15,90,54,104,156,213 .byte 48,219,110,170,73,188,7 .byte 6 rcm ; .byte 1,5,6,5,6,5,6,0 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 ; .byte 0,1,0,1,0,1,0,1 .byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,9,9,11,11,2,2 .byte 4,4,14,14,5,5,3,13 .byte 1,1,13,3,5,6 .byte 6,6,4,4,4,14,14,3,1,3,14 .byte 14,4,4,6,6,6 .byte 2,2,4,4,8,10,13,1,1,1 .byte 13,10,8,4,4,4 .byte 2,2,2,9,9,9 .byte 11,11,11,0,0,0,0 rcm3 .byte 1,1,1,13,3,14,14,4 .byte 6,6,6,4,14,14,3,13 .byte 1,1,1,13,3,14,14,4 .byte 6,6,6,4,14,14,3,13 .byte 1,1,1,1,7,10,10,4 .byte 2,2,2,2,4,10,10,7 .byte 1,1,1,15,15,12,12,11 .byte 11,9,9,11,11,12,12,15 rcm2 .byte 1,1,1,13,3,14,14,4 .byte 6,6,6,4,14,14,3,13 maxic .byte 10,0,0,0,1,5,10 ;--- modified --- department store max items xicor .byte $34,$5c,$84,$ac,$d4,$fc .byte $24 .byte $6c,$84,$9c,$b4,$d4,$ec iccol .byte 5,14,3,15,13,14,3 .byte 1,7,14,13,12,5,3 .byte 1,7,14,13,12,5,3 .byte 1,7,14,13,12,5,3 .byte 10,10,10,10,10,10,0 .byte 14,14,10,10 icdat .byte dsp,dsp+1,dsp+2,dsp+3 .byte dsp+4,dsp+5,dsp+6 .byte dsp+20,dsp+20,dsp+20 .byte dsp+20,dsp+20,dsp+20 .byte dsp+20 .byte dsp+10,dsp+11,dsp+12 .byte dsp+13,dsp+14,dsp+15 .byte dsp+16 .byte dsp+17,dsp+18,dsp+19 .byte dsp+20,dsp+20,dsp+20 .byte dsp+20 .byte dsp+9,dsp+10,dsp+11 .byte dsp+12,dsp+13,dsp+14 .byte dsp+20 .byte dsp+15,dsp+15,dsp+15 .byte dsp+15 lcost .byte $50,0,0,0,price_of_leveljump,1,0 ;hi cost lsell .byte $50,0,0,0,price_of_leveljump,1,0 y1 .byte $30,$80,$a0,$c0,$60,$e6 y2 .byte $54,$a0,$c0,$e0,$80,$fe ;psy .byte 0,9,39,30 fanzz .byte 3,3,3,3,3,3,3,5,6,3 faspe .byte 0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0 .byte 0,0,0 facol .byte 0,1,2,3,2,1,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0 .byte 0,0,1,2,3,0,0,0,0 .byte 0,0,0 fvon .byte 0,0,0,0,0,0,0,27,35,37 .byte 0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0 .byte 19,11,5,43,46,52,54,60 .byte 69,71 .byte 0,77,77,77,77,109 .byte 123,141,132 .byte 157,165,169 fanz .byte 4,4,4,4,4,4,4,7,1,5 .byte 0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0 .byte 7,7,2,2,5,1,5,8,1,5 .byte 4,31,31,31,31,13 .byte 17,15,1 .byte 7,3,1 fspe .byte 2,2,2,2,2,2,2,2,3 .byte 0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0 .byte 2,2,2,5,5,0,5,5,0,2 .byte 2,1,1,1,1,1 .byte 3,3,3,0 .byte 0,1,3 fmem .byte 2,4,1,4,6 .byte 3,5,10,8,10,5 .byte 0,0,11,5,3,5,11,0 .byte 0,11,5,3,1,3,5,11 .byte 11,5,3,1,1,1,3,5 .byte 5,4 .byte 5,3,7,1,7,3 .byte 5,5,10 .byte 14,14,14,4,14,3 .byte 13,14 .byte 11,12,15,7,15,12 .byte 1,7,14,3,5,10,5,3,14 .byte 10,4 .byte 8,10,6,3,5,4 .byte 6,2,2,4,2,4,4,5,4,5,5,3 .byte 5,3,3,7,3,7,7,1,7,1,1,7 .byte 1,3,5,4,2,6,6,2 .byte 0,6,4,3,14,3,6,7,2,1,4,7 .byte 13,1 .byte 0,9,6,4,14,3,1,3,14,4,6 .byte 0,2,10,7,1,7,10 .byte 9,5,13,1,13,5,9 .byte 0,9,8,7,1,7,8,9,0 .byte $a4,$a4,$a4,$a4,$a4,$a4 ;--- modified --- multicolor intro "cydonia" .byte $a4,$a4 ;$fc .byte $e4,$e4,$e4,$e4 ;$3e .byte $ff,1 fil1 .text "tools" fil2 .text "00world" fil3 .text "intro" fil4 .text "03sound" fil8 .text "00subje" start lda #$00 sta $a3 init sei #rcol "03" lda $dd00 and #252 sta $dd00 ldx #$ff txs inx stx $d01d stx $d017 stx $d020 stx $dd03 lda $dd0d jsr srasi lda #$35 sta $01 lda #irq sta $ffff jsr inbut jsr intr jsr blk ldx #start lda $dc01 and #$10 bne n0 ldx #editor n0 jsr setnmi jsr setgamenmi ;--- modified --- added lda #0 jsr initplr lda #0 jsr getplr newworld jsr inclevl jsr gworld ui2 jsr gppos1 jsr intime ui3 jsr subjinit ui jsr setscrn d1 jsr subjmain jsr stop jsr bomb ;-- modified -- added ldy $40 beq d1 dey beq ouch dey beq departm dey beq telep dey beq newworld telep .block jsr rsallsb jsr gbdel clc adc $ab adc #5 tax lda $aa adc #7 tay lda #0 sta $c0 lda $e8 n2 stx $c1 n1 cmp ($c0),y beq n3 iny bne n1 inx cpx #levmem+$20 bcc n2 ldx #levmem bne n2 n3 sec txa sbc #4 sta $ab tya sbc #6 sta $aa jmp ui3 .bend ouch dec $65 bmi d5 jsr rsallsb sei jmp ui2 d5 jsr print .byte $01,$4c,8 .text "GAME OVER" .byte 17 jsr hseintr jmp init departm jsr gbdel clc adc $ab sta $ab jsr superm lda $64 ;--- modified --- wenn leveljump gekauft, dann next level beq dp2 dec $64 jmp newworld ; lda #4 ; sta $40 dp2 jmp ui stop ;PAUSE? lda $dc01 cmp #$7f beq pausmod ;stop-taste? rts pausmod lda $40 ;set pausemod ora #$80 sta $40 gcontrol .block jsr blk jsr gbdel ;plr-y-pos an clc ;block-y-pos adc $ab ;anpassen sta $ab lda #0 sta $d021 ldx #11 lda #$05 jsr clrsc2 jsr fcstar jsr print .byte $f0,1,10 .text "GAME CONTROLLS" .byte $f0,$a1,3 .text "number of players" .byte $f0,$bc,1 .text " one two" .byte $f0,$c9,3 .text "player one s port" .byte $f0,$e4,1 .text " one two" .byte $f0,$f1,3 .text "player two s port" .byte $f1,$0c,1 .text " one two" .byte $f1,$19,3 .text "sound" .byte $f1,$34,1 .null "music fx" jsr print .byte $f1,$41,3 .text "if the game is over " .text "then" .byte $f1,$5c,1 .text "intro edit" .byte $f1,$69,3 .text "fast load" .byte $f1,$84,1 .text " yes no" .byte $f1,$91,3 .text "cheat" .byte $f1,$ac,1 .text " yes no" .byte $f1,$b9,3 .text "player one s port" .byte $f1,$d4,1 .null " one two" jsr print .byte $f1,$e1,3 .text "cheat" .byte $f1,$fc,1 .text " yes no" .byte $f2,$09,3 .text "player one s port" .byte $f2,$24,1 .text " one two" .byte 0 jsr init4 jsr invst jsr spausi ; lda $d016 ; and #$ef ; sta $d016 ldx #$04 ldy #$0a stx $d022 sty $d023 jsr wht ldx #$98 lda #$c3 jsr sinpos lda #0 ldx #15 ldy #1 jsr input lda $40 and #$7f sta $40 pla pla jmp ui .bend colt2 .byte $09,$09,$09,$06,$06 .byte $06,$02,$02,$0b,$0b .byte $04,$04,$0e,$0e,$03 .byte $03,$0d,$07,$07,$01 .byte $01,$07,$07,$0d,$03 .byte $03,$0e,$0e,$04,$04 .byte $0b,$0b,$02,$02,$06 .byte $06,$06,$09,$09,$09 cat2 .byte 39,39,39,39,39 .byte 39,39,39,39,39 .byte 39,39,39,39,39 .byte 39,39,39,39,39 .byte 39,39,39,39,39 fcstar lda #$ff ldx #colt2 jsr cztin lda #0 ldx #0 ;spalte ldy #24 ;10 zeilen jsr czain lda #0 ;zeile ldx #cat2 jmp czarea srasi ldx #1 sei stx $d01a lda $dc0d stx $dc0d cld rts sirq3 sei lda #rasi3 ldx #i3 sta $d012 lda #$1b sta $d011 stx $fffe sty $ffff rts ; jmp setirq editor lda #$0f sta $d011 ldx #$ff txs ldx #fil1 lda #5 jsr sfil jsr load .if automatically_load_map_in_tools ;--modified -- added lda #start_world sta $10 jsr load_map_and_block jsr clwp_2 .endif jmp tool sfil stx zp sty zp+1 sta zp+2 rts ;taby .byte $19,$18,$1f,$1e ; .byte $19,$18,$1f,$1e ;taby2 .byte 0,0,$10,$10 ; .byte $10,$10,$10,$10 wt2 nop nop i0 #rcol "08" okr lda $d012 bmi okr lda $40 ;blk on? bpl blks2 jmp blks blks2 lda $12 ora #$10 sta $d011 lda #2 ora $0a sta $d018 lda $07 ora #$10 sta $d016 lda $a0 bpl nf56 ldx #45 jsr fget bne nf56 lda $a0 and #$7f sta $a0 nf56 sta $d021 lda map-6 sta $d022 lda map-5 sta $d023 lda #$ff sta $d015 .ifeq spritesystem clc lda $13 adc #1 ;add 2 sta $d000+((8-3)*2) sta $d000+((8-2)*2) sta $d000+((8-1)*2) lda $14 ;sec ;sbc #3 clc adc #2 sta $d001+((8-3)*2) sta $d001+((8-2)*2) sta $d001+((8-1)*2) lda $15 clc adc #$60 adc $1a sta ba+$03f8+8-1 sta ba+$07f8+8-1 adc #12 sta ba+$03f8+8-3 sta ba+$07f8+8-3 adc #12 sta ba+$03f8+8-2 sta ba+$07f8+8-2 .endif .if spritesystem clc lda $13 adc #1 ;add 2 sta slox+zz-3 sta slox+zz-2 sta slox+zz-1 lda $14 sec sbc #3 sta sy+zz-3 sta sy+zz-2 sta sy+zz-1 lda $15 clc adc #$60 adc $1a sta sdz+zz-1 adc #12 sta sdz+zz-3 adc #12 sta sdz+zz-2 .endif #rcol "10" ;def sprites jsr defs .if spritesystem jsr spi0 ;sprites .endif #rcol "09" ;set sterne lda map-1 bne p181 jsr setstar p181 #rcol "05" jsr sbox #rcol "02" jsr player #rcol2 "07" jsr sshot #rcol "14" jsr time lda $40 bpl nkirq ;pausemod? jsr keyirq nkirq .block u = 0 .ifeq u lda banic eor #1 sta banic beq n2 #rcol "06" jsr anic jmp n3 banic .byte 0 n2 #rcol "05" ldy #6 ;time jsr pword ldy #3 ;score jsr pbyte ldy #4 jsr pword ldy #0 ;cred jsr pword n3 .endif .bend blks lda #sray ldx #spi1 sta $d012 stx $fffe sty $ffff jsr getpar #rcol "00" inc $d019 pla ;--- modified --- statt retten in $02-$04 tay pla tax pla ;lda $02 ;ldx $03 ;ldy $04 rti i3 .block pha ;--- modified --- txa pha tya pha ;sta $02 ;stx $03 ;sty $04 nop nop nop nop nop nop nop nop nop ldy #$c2 ldx #$1f lda #0 stx $d011 sty $dd00 sta $d018 sta $d015 lda #anzf1 sta $d021 lda #$d8 sta $d016 lda #anzf4 sta $d022 lda #anzf5 sta $d023 nop nop nop nop lda #anzf2 sta $d021 ldx #10 n1 dex bne n1 lda #anzf3 sta $d021 ldx #12 n2 dex bne n2 lda #anzf4 sta $d021 lda #$c0 ldy #$04 sta $dd00 sty $d018 .bend lda #0 sta $d001 sta $d003 sta $d005 sta $d007 sta $d009 sta $d00b sta $d00d sta $d00f #rcol2 "03" jsr cshot lda map-1 ;clr sterne bne p180 jsr clstar p180 lda $40 bmi p179 #rcol2 "11" jsr scroll #rcol2 "00" p179 jmp i0 .ifeq spritesystem spi1 pha ;--- modified --- txa pha tya pha ;pha ;stx $03 ;sty $04 spi5 #rcol "06" jsr sound ;ldx #>snum ;stx $fd ldx #i3 stx $fffe sty $ffff ldy #rasi3 sty $d012 #rcol "00" pla ;--- modified --- tay pla tax pla ;ldx $03 ;ldy $04 ;pla inc $d019 rti .endif .ifeq spritesystem defs .block offsetspr = 5 #rcol "03" ldx #7-3 ldy #15-6 clc n1 lda sy+offsetspr,x adc #5 sta $d000,y dey lda slox+offsetspr,x sta $d000,y dey lda sdz+offsetspr,x sta ba+$03f8,x sta ba+$07f8,x lda scol+offsetspr,x sta $d027,x dex bpl n1 lda #4 sta $ee lda #0 sta $ef ldx #7-3 n2 lda scol+offsetspr,x rol rol $ee lda shix+offsetspr,x ror rol $ef dex bpl n2 lda $ee sta $d01c lda $ef sta $d010 #rcol "00" rts .bend .endif .if spritesystem defs .block ldx #snum ;--- modified --- added wegen konflikt mit sound sta $fd ; jmp defs2 ldy sy ldx deftab,y lda #0 sta ($ee,x) inc $ee,x ldy sy+1 ldx deftab,y lda #1 sta ($ee,x) inc $ee,x ldy sy+2 ldx deftab,y lda #2 sta ($ee,x) inc $ee,x ldy sy+3 ldx deftab,y lda #3 sta ($ee,x) inc $ee,x ldy sy+4 ldx deftab,y lda #4 sta ($ee,x) inc $ee,x ldy sy+5 ldx deftab,y lda #5 sta ($ee,x) inc $ee,x ldy sy+6 ldx deftab,y lda #6 sta ($ee,x) inc $ee,x ldy sy+7 ldx deftab,y lda #7 sta ($ee,x) inc $ee,x ldy sy+8 ldx deftab,y lda #8 sta ($ee,x) inc $ee,x ldy sy+9 ldx deftab,y lda #9 sta ($ee,x) inc $ee ldy sy+10 ldx deftab,y lda #10 sta ($ee,x) inc $ee,x ldy sy+11 ldx deftab,y lda #11 sta ($ee,x) inc $ee,x ldy sy+12 ldx deftab,y lda #12 sta ($ee,x) inc $ee,x ldy sy+13 ldx deftab,y lda #13 sta ($ee,x) inc $ee,x ldy sy+14 ldx deftab,y lda #14 sta ($ee,x) inc $ee,x ldy sy+15 ldx deftab,y lda #15 sta ($ee,x) inc $ee,x ldy sy+16 ldx deftab,y lda #16 sta ($ee,x) inc $ee,x ldy sy+17 ldx deftab,y lda #17 sta ($ee,x) inc $ee,x ldy sy+18 ldx deftab,y lda #18 sta ($ee,x) inc $ee,x ldy sy+19 ldx deftab,y lda #19 sta ($ee,x) inc $ee,x defs2 lda #$ff ldx #0 sta ($ee,x) sta ($f0,x) sta ($f2,x) sta ($f4,x) sta ($f6,x) sta ($f8,x) sta ($fa,x) sta ($fc,x) sta ($fe,x) rts .bend initspi lda #0 sta spiz+1 lda #$a6 sta spi7 ldx #>snum stx $ef stx $f1 stx $f3 stx $f5 stx $f7 stx $f9 stx $fb stx $fd stx $ff rts spi0 lda #snum ;--- modified --- weg, nun in defs ;stx $fd ldx #i3 stx $fffe sty $ffff ldy #rasi3 jmp spi6 spiztab .byte 9,0,0,0,0,0,0,0,0 .byte 18,0,0,0,0,0,0,0,0 .byte 27,0,0,0,0,0,0,0,0 .byte 36,0,0,0,0,0,0,0,0 .byte 45,0,0,0,0,0,0,0,0 .byte 54,0,0,0,0,0,0,0,0 .byte 63,0,0,0,0,0,0,0,0 .byte 0 sraytab .byte sray,sray,sray .byte sray,sray,sray .byte sray,sray,sray .byte sray+16,sray+16,sray+16 .byte sray+16,sray+16,sray+16 .byte sray+16,sray+16,sray+16 .byte sray+32,sray+32,sray+32 .byte sray+32,sray+32,sray+32 .byte sray+32,sray+32,sray+32 .byte sray+48,sray+48,sray+48 .byte sray+48,sray+48,sray+48 .byte sray+48,sray+48,sray+48 .byte sray+64,sray+64,sray+64 .byte sray+64,sray+64,sray+64 .byte sray+64,sray+64,sray+64 .byte sray+80,sray+80,sray+80 .byte sray+80,sray+80,sray+80 .byte sray+80,sray+80,sray+80 .byte sray+96,sray+96,sray+96 .byte sray+96,sray+96,sray+96 .byte sray+96,sray+96,sray+96 sets lda spn10+1 clc adc #2 sta spn10+1 spn10 jmp (branchtab) spi10 lda #0 sta $d010 sta $d01c lda slox,y sta $d000+(0*2) lda shix,y and #1 beq spn2 inc $d010 spn2 lda sy,y adc #5 sta $d001+(0*2) lda sdz,y sta ba+$03f8+0 sta ba+$07f8+0 lda scol,y sta $d027+0 bpl spn3 inc $d01c spn3 rts spi11 lda slox,y sta $d000+(1*2) lda shix,y and #1 beq spn11 lda $d010 ora #$02 sta $d010 spn11 lda sy,y adc #5 sta $d001+(1*2) lda sdz,y sta ba+$03f8+1 sta ba+$07f8+1 lda scol,y sta $d027+1 bpl spn12 lda $d01c ora #$02 sta $d01c spn12 rts spi12 lda slox,y sta $d000+(2*2) lda shix,y and #1 beq spn4 lda $d010 ora #$04 sta $d010 spn4 lda sy,y adc #5 sta $d001+(2*2) lda sdz,y sta ba+$03f8+2 sta ba+$07f8+2 lda scol,y sta $d027+2 bpl spn5 lda $d01c ora #$04 sta $d01c spn5 rts spi13 lda slox,y sta $d000+(3*2) lda shix,y and #1 beq spn6 lda $d010 ora #$08 sta $d010 spn6 lda sy,y adc #5 sta $d001+(3*2) lda sdz,y sta ba+$03f8+3 sta ba+$07f8+3 lda scol,y sta $d027+3 bpl spn7 lda $d01c ora #$08 sta $d01c spn7 rts spi14 lda slox,y sta $d000+(4*2) lda shix,y and #1 beq spn8 lda $d010 ora #$10 sta $d010 spn8 lda sy,y adc #5 sta $d001+(4*2) lda sdz,y sta ba+$03f8+4 sta ba+$07f8+4 lda scol,y sta $d027+4 bpl spn9 lda $d01c ora #$10 sta $d01c spn9 rts spi15 lda slox,y sta $d000+(5*2) lda shix,y and #1 beq spn20 lda $d010 ora #$20 sta $d010 spn20 lda sy,y adc #5 sta $d001+(5*2) lda sdz,y sta ba+$03f8+5 sta ba+$07f8+5 lda scol,y sta $d027+5 bpl spn21 lda $d01c ora #$20 sta $d01c spn21 rts spi16 lda slox,y sta $d000+(6*2) lda shix,y and #1 beq spn22 lda $d010 ora #$40 sta $d010 spn22 lda sy,y adc #5 sta $d001+(6*2) lda sdz,y sta ba+$03f8+6 sta ba+$07f8+6 lda scol,y sta $d027+6 bpl spn23 lda $d01c ora #$40 sta $d01c spn23 rts spi17 lda #map+$1700 bmi n1 asl a asl a asl a asl a tax lda #>map+$1700 sta $ab n1 txa adc #$68+sczeil8 sta $14 jsr spic ldx #$00 stx $a9 ; dex stx $a8 stx $88 stx $8b jsr intpb jsr szstar jsr chzst jsr putanz .if spritesystem jsr initspi .endif lda #$ff sta $36 ldx map-7 stx $a0 ldx #0 stx wt2+1 inx stx $19 jsr sirq3 ; jsr jcli cli d3 lda $19 and #$01 bne d3 lda #$10 sta wt2+1 rts .bend spic ldx #0 stx $06 lda #0 sta $12 ldy #4 sty $2f dey sty $07 lda #$00 sta $0a sta $4d lda #10 sta $30 ldy $ab ; cpy #>map+$1800 ; bcc n407b dey ; dec $ab n407b sty $a9 ldy #<$c000-120+sp lda #>$c000-120+sp jsr setpos lda #$d7 sta $57 n407 lda #0 sta $d1 lda #12 sta $d0 lda $aa sta $a8 jsr nexzeil jsr nexzeil n406 ldy #0 lda $a9 cmp #>map ;--- modified --- diese zeile added bpl n406b ldx #0 beq n406c n406b lda ($a8),y tax n406c lda #>blok+$0600 sta n400+2 lda #>blok sta n401+2 lda #>blok+$0300 sta n402+2 ; oe jmp oe jsr n405 jsr n405 jsr n405 inc $a8 dec $d0 bpl n406 inc $a9 dec $30 bne n407 rts n405 ldy $d1 ; achtung schreibt zeile bevor $d800 und $c000 ! lda $57 ;--- MODIFIED --- deswegen diese abbfrage added cmp #$d8 bcc n4000 n400 lda blok,x sta ($56),y pha n401 lda blok,x sta ($54),y clc tya adc #40 tay n402 lda blok,x sta ($54),y pla lsr a lsr a lsr a lsr a sta ($56),y n4000 inc n400+2 ;--- MODIFIED --- label n4000 added inc n401+2 inc n402+2 inc $d1 rts load_map_and_block lda $22 ;load world ;achtung von $10 auf $22 geändert ; $10=zp wird von sfil überschrieben and #$0f ora #"0" sta fil2+1 lda $22 ;$10 lsr a lsr a lsr a lsr a ora #"0" sta fil2 ldx #map-mapoffset stx loadaddr sty loadaddr+1 lda #7 ldx #fil2 jsr loadrabs ;load block jsr excha ldx #blok-blokoffset stx loadaddr sty loadaddr+1 lda #7 ldx #flist jsr loadrabs jmp excha gworld ;GET WORLD jsr load_map_and_block ;-- modified -- in eigene routine oben eingekapselt jsr malshot ;male shot ;load sound lda #7 ldx #flist+(1*8) jsr loadr .if mute_sound ;-- modified -- added lda #$60 sta sound sta soust .endif jsr blok2cop ;-- modified -- .if load_subjects_every_world .if 1 ;load subjects ;-- modified -- from smain11-2 lda #7 ldx #fil8 jsr loadr ; jsr blok2cop ;-- modified -- ; jsr teilsubj .endif .if 0 ;-- modified -- ;load subjects lda #$85 ldx #flist+(2*8) jsr loadr jsr blok2cop jsr teilsubj .endif ;pseudo: lda #5 ;load game3 ;weil es durch sprites von subj00 überschrieben wird ldx #fili jsr loadr jmp fili2 fili .text "game3" fili2 .endif jsr soust ;--- modified --- rück-modified ! ; ;hierherverlegt ;(nur alles instabiler wenn hier) ;.if spritesystem jsr isystem ;.endif ;provisorische ldx #$1f ;loesung! lda #0 nps1 sta map-$00a0,x ;$7f60,x ;--- modified --- wozu ?? ; soll vielleicht heißen: map ist zerstört, also neuladen dex bpl nps1 jsr clrsc lda #8 sta $4f lda #$c1 ldy #157-40 jsr slhp ldy #11 lda $22 jsr pbbyt jsr print .byte $f1,157-40,8 .text "WORLD" .byte $f0,256-4 .text "ENTERING" .byte 17 ;jsr soust jsr intsm lda #$00 sta $aa lda #levmem sta $ab rts isystem ;INIT IRQ-SYSTEM .block sray1 = $6f sray2 = $00 del = 10 lda map-2 ;get flag and #1 tax asl a ;get flag2 asl a asl a sta $f0 .if spritesystem ;set irq-anz lda tab1,x ;of spritesyst. sta spiztab+36 ;set sraytab lda tab2,x ;get sray ldy #0 n2 ldx #9 n1 sta sraytab,y iny dex bne n1 clc adc #$10 cpy #7*9 ;fertig? bcc n2 ;set deftab ldx #rasi3 ;set no-spr- lda #$10 ;area n3 sta deftab,x inx cpx #$10 bne n3 ;set spr-area lda #$00 n6 ldy $f0 pha lda tab3,y sta $f1 pla n4 sta deftab,x inx cpx #rasi3 bcs n5 cpx $f1 bcc n4 adc #1 ;add 2 inc $f0 bne n6 n5 .endif ;--- modified --- ;reset sprite-data table .if spritesystem .block ldx #0 txa n1 sta sdat,x inx bne n1 .bend .endif rts .if spritesystem tab1 .byte 0,45 tab2 .byte sray1,sray1 tab3 .byte sray1+del .byte sray1+del+$10 .byte sray1+del+$20 .byte sray1+del+$30 .byte $ff,0,0,0 .byte sray2+del .byte sray2+del+$10 .byte sray2+del+$20 .byte sray2+del+$30 .byte sray2+del+$40 .byte sray2+del+$50 .byte sray2+del+$60 .byte $ff .endif .bend malshot ;MALE SCHUSS-CHAR ($ff) .block ldx #7 n1 lda dat,x sta $cff8,x dex bpl n1 rts dat ;char-data .byte $55,$aa,$ff,$aa,$55,0,0,0 .bend blok2cop ;COLOR-BLOCK TEILEN .block ldy #0 n1 lda blok+$0600,y lsr a lsr a lsr a lsr a sta blok2,y lda blok+$0700,y lsr a lsr a lsr a lsr a sta blok2+$0100,y lda blok+$0800,y lsr a lsr a lsr a lsr a sta blok2+$0200,y dey bne n1 rts .bend teilsubj ; lda #map+$3fc0 ; ldx #>map+$2800 ;--- modified --- ldx pointer_subjectsspritesdata stx $d2 ldx pointer_subjectsspritesdata+1 ldy #>subjectsprites ;#>$e800 ;--- modified --- ;memcopy .block ; sta $d1 stx $d3 sty $d5 ldy #0 ; sty $d2 ;--- modified -- sty $d4 n2 lda ($d2),y sta ($d4),y ; cpy $d0 ; beq n1 n3 iny bne n2 inc $d3 inc $d5 bne n2 n1 ; lda $d3 ;--- modified --- ; cmp $d1 ; bne n3 ;added ;--- modified -- .bend ;--- modified --- nach oben verlegt setgamenmi ldx #start .if skip_intro ldx #editor .endif jmp setnmi ;rts loadr jsr sfil jsr load jmp srasi loadrabs jsr sfil jsr loadabs jmp srasi excha lda #$c8 sta $d1 lda #>blok-$0800 sta $d3 ldy #0 sty $d0 sty $d2 n111 lda ($d0),y tax lda ($d2),y sta ($d0),y txa sta ($d2),y iny bne n111 inc $d1 inc $d3 lda $d1 cmp #$d0 bcc n111 n113 rts intr .if skip_intro ;-- modified -- lda #$60 sta sound sta soust rts ;jmp editor .endif .block lda $dc01 and #$10 bne n0 rts n0 lda #7 ldx #fil4 jsr loadr lda #5 ldx #fil3 jsr loadr jmp intro .bend inclevl inc $10 sed clc lda $22 adc #1 sta $22 cmp #last_world+1 bcc ng10 lda #start_world sta $22 sta $10 ng10 cld rts irq pha ;--- modified --- txa pha tya pha ;irq sta $02 ; stx $03 ; sty $04 izei jmp $ffff iend jsr setirq iend2 inc $d019 jsr getpar #rcol "00" pla ;--- modified --- tay pla tax pla ;lda $02 ;ldx $03 ;ldy $04 rti jsei sei ldx #souirq stx $fffe sty $ffff cli rts jcli sei ldx #irq stx $fffe sty $ffff cli rts spausi lda #$43 ldx #pausi jmp setirq pausi .block #rcol3 "09" lda #$08 sta $d016 jsr sound jsr stars jsr keyirq jsr pausef1 #rcol3 "00" n1 lda $d011 bpl n1 lda #$18 sta $d016 jmp iend2 .bend pausef1 lda #$1f ldx #colt1 jsr cztin inc car1 lda car1 ldx #1 ;spalte ldy #9 ;10 zeilen jsr czain lda #4 ;zeile ldx #cat jmp czarea car1 .byte 0 cat .byte 16,16,16,4,23,8,4,16,4,16 colt1 .byte 0,6,6,6,4,4,4,14 .byte 14,14,3,3,3,1,1,1 .byte 1,1,1,3,3,3,14,14 .byte 14,4,4,4,6,6,6,0 czain sta $0c stx $77 sty akz rts akz .byte 0 ;aktuelle zeile czarea ;COL-ZEIL-AREA .block sta $0d ;zeile stx n2+1 sty n2+2 n1 ldx akz n2 ldy cat,x ;get anz char txa ;line-adapt clc adc $0d tax jsr colz dec akz bpl n1 rts .bend cztin ;COLZ FARBTAB-INIT stx $0e ;lo-farbtab sty $0f ;hi- sta $0b ;ftab max (and!) rts colz ;COL-ZEILEN-EFFEKT .block lda $0e ;farbtab sta n1+1 lda $0f sta n1+2 clc ;pos ermitteln lda loss,x adc $77 sta $3e lda hiss,x and #3 adc #$d8 sta $3f ;farbtab-zaehler tya adc $0c tax n2 txa and $0b tax n1 lda $ffff,x sta ($3e),y dex dey bpl n2 rts .bend souirq pha ;--- modified --- txa pha tya pha ; sta $02 ; stx $03 ; sty $04 jsr sound jmp iend2 setrsc .block sta keysta+1 ldy #15 n1 lda rcm3,x sta rcm3,y sta rcm2,y inx dey bpl n1 rts .bend sefi1 sei jsr setrsc lda #$32 ldx #efi1 init3 jsr setirq lda #25 sta $51 init4 lda #0 sta $23 sta $70 sta $d015 init2 lda #$04 sta $d018 sta $74 lda #$38 sta $d016 lda #0 sta $d01b lda #3 sta $30 lda #$af jsr sdpb dec $01 lda $d490 inc $01 tax beq se3 jsr invcha se3 jmp szstar setnmi stx $fffa sty $fffb rts setirq sta $d012 lda $d011 and #$7f sta $d011 setirq2 stx izei+1 sty izei+2 rts pbyt2c stx $31 sta $59 ldx #$59 jsr pbyt2b ldx $31 iny rts print jsr blk lda #0 sta $4f printc pla sta $0b pla sta $0c ldy #1 lda ($0b),y bmi ni8 jsr clrsc lda ($0b),y ni8 jsr shp iny lda ($0b),y sta $0d sta $3e lda #0 sta $16 sty $0f ni4 inc $0f ldy $0f lda ($0b),y beq ni9 bpl ni4z cmp #$f0 bcs ni8 jmp ni5z ni4z cmp #17 beq ni5b bcs ni5 sta $4f bcc ni4 ni5b lda $0b pha lda $0c pha tya pha jsr print .byte $f2,$11+42,8 ; .null "player one press button" .text "PLAYER ONE" .byte $f2,$11+40+$78 .null "PRESS BUTTON" lda #0 ldx #16 jsr sefi1 ldx #$b7 jsr invbz ldx #$b7 jsr invbc jsr invcha jsr wht jsr button jsr blk pla sta $0f pla sta $0c pla sta $0b ni9 sec lda $0b adc $0f sta $0b bcc ni6 inc $0c ni6 jmp ($0b) ni5 ldy $16 inc $16 and #$3f cmp #$30 ;zahl als char? bcc ni9b sbc #$30-28 ;anpassen clc ni9b adc #zs cmp #zs+" " bne ne162 jmp ni4 ne162 sta ($0d),y lda $4f sta ($3e),y jmp ni4 setc lda $77 sta ($0d),y lda $4f sta ($3e),y inc $77 iny rts ni5z ldy $16 inc $16 inc $16 jsr sbcha jmp ni4 sbcha and #$1f sbzahl sec sbc #1 sbcha2 asl a asl a cmp #26*4 adc #1 sta $77 jsr setc jsr setc tya clc adc #38 tay jsr setc jmp setc shp and #$07 ora #$c0 sta $0e and #$03 ora #$d8 sta $3f rts clrsc lda #0 ldx #14 ;34 clrsc2 stx $35 jsr clfram sty $0e jsr ni2g ni2q jsr ni2s inc $0f ldx $0f cpx #$c8 bcc ni2q ni200 ldy $1b rts ni2s jsr ni2r jmp ni2s ni2 inc $33 dec $31 bne ni2f rts ni2r dec $33 ni2h lda $d012 eor $dc08 ldx $a2 eor $00,x eor $c000,x and #$0f cmp $33 beq ni2h sta $33 ni2g lda #40 sta $31 ni2f lda $33 cmp #19 bcc ni2b cmp $35 bcs ni2c lda #$20 bne ni2d ni2c lda #0 ni2b sta $33 clc adc #ss ni2d sta ($0e),y iny bne ni2 pla pla rts clrw3 lda #$fe ldy #0 ni202 sta $c400,y sta $c500,y sta $c600,y sta $c6e8,y iny bne ni202 rts clrscw lda #0 clrw2 jsr clfram lda #$fe ni201 sta $c000,y sta $c100,y sta $c200,y sta $c2e8,y iny bne ni201 beq ni200 clfram sty $1b ldy #$c0 sty $0f ldy #0 ng11 sta $d800,y sta $d900,y sta $da00,y sta $dae8,y iny bne ng11 rts button lda #$10 nb1 bit $dc00 beq nb1 nb2 bit $dc00 bne nb2 nb3 bit $dc00 beq nb3 rts irbut lda $dc00 and #$10 cmp butz+1 beq ne160 sta butz+1 dec butz bne ne160 inbut lda #3 sta butz lda #0 sta butz+1 rts ne160 lda #1 rts butz .byte 3,0 invspac php lda $01 pha lda #$d7 sta $89 ldy #$f0 ldx #$f7 jmp inv invcha php lda $01 pha ldx #$ff lda #$d5 sta $89 lda #$d4 ldy #$90 inv sei pha lda #$34 sta $01 pla sta $8b stx $87 lda #0 sta $8a na500 lda ($8a),y eor #$ff sta ($8a),y cpy $87 beq p197 na501 iny bne na500 inc $8b bne na500 p197 lda $8b cmp $89 bne na501 rinv pla sta $01 plp rts slhp sty $0d sty $3e jmp shp pbbyt pha lsr a lsr a lsr a lsr a jsr sbnib pla and #$0f sbnib clc adc #27 jsr sbzahl tya sbc #39 tay rts intpb lda #$ff ldx #pbanz pb8 sta padrw,x dex bpl pb8 rts pword sty p3+1 jsr pbyte p3 ldy #0 iny pbyte ldx padr,y lda $00,x cmp padrw,y beq pb9 sta padrw,y lda lptab,y sta $28 lda hptab,y sta $29 lda $00,x ldy #0 pbyt2b lsr a lsr a lsr a lsr a cmp #$0a bcs pb4 pb1 adc #0 sta ($28),y pb4 iny clc lda $00,x and #$0f pb2 adc #0 sta ($28),y pb9 rts sdpb sta pb1+1 sta pb2+1 rts efi1 ldy $23 lda $51 sta $25 nop ldx #3 ne1 dex bne ne1 lda #7 sta $36 ldx #1 sec ne8 nop nop nop nop nop nop nop nop nop nop inx txa and #15 tax ne7 ; lda rcm,y ; sta $d021 lda rcm2,x sta $d022 lda rcm3,x sta $d023 lda rcm,y sta $d021 ; nop iny dec $36 bne ne8 jmp ne2 ne2 nop nop nop inx lda #7 sta $36 ; lda rcm,y ; sta $d021 lda rcm2,x sta $d022 lda rcm3,x sta $d023 lda rcm,y sta $d021 inx tya sbc #6 tay dec $25 bne ne7 lda ne52+1 eor #1 sta ne52+1 ne52 lda #0 beq ne53 ldy rcm3+15 ldx #14 ne50 lda rcm3,x sta rcm3+1,x dex bpl ne50 sty rcm3 ldy rcm2 ldx #0 ne51 lda rcm2+1,x sta rcm2,x inx cpx #15 bcc ne51 sty rcm2+15 ne53 ldy $23 inc $2f lda $2f and #$03 sta $2f bne ne10 lda $70 bne ne11 iny cpy #58 bcc ne10 inc $70 bne ne10 ne11 dey bne ne10 dec $70 dec $30 ne10 sty $23 lda $40 bmi p178 jsr sound keysta lda #0 bne p178b jsr stars jmp iend2 p178b jsr keyirq p178 jmp iend2 sxcor sta $30 stx $31 rts setpos2 lda #$c0 setpos sty $54 sty $56 sta $55 and #$03 ora #$d8 sta $57 stx $36 rts setcha lda $36 setcha2 sta ($54),y lda $4f sta ($56),y rts nexzeil clc lda $54 adc #$28 sta $54 sta $56 bcc nl60 inc $55 inc $57 nl60 rts sfacol sta facol,x rts gfacol lda facol,x rts fget2 jsr fget ldy fanzz,x inx rts fget dec faspe,x bpl f1 lda fspe,x sta faspe,x dec facol,x bpl f1 lda fanz,x sta facol,x f1 lda fvon,x clc adc facol,x tay lda fmem,y rts nl60b pla pla rts stars1 #rcol "13" inc $a2 lda $74 bmi nl60b dec $01 ; ldy $6e ;--- modified --- ; dey ;(was sollte der unsinn???) (wohl wegen dass die sterne ; bpl ns4 ; immer etwas anders verteilt) ldy #0 ns4 ; sty $6e ;--- modified --- lda starz,y sta $3b lda stara,y tay ns1 ldx starmem,y lda #$05 sta $71 lda $d090+(ss*8),x lsr a ns10 ror $d000+(ss*8),x ror $d008+(ss*8),x ror $d010+(ss*8),x ror $d018+(ss*8),x php txa clc adc #$20 tax plp dec $71 bne ns10 iny dec $3b bne ns1 inc $01 rts stars jsr stars1 stars2 #rcol "14" ldx #19 ns12 lda loss,x sta $71 lda hiss,x sta $72 ldy ssxp,x lda $74 bne ns15 lda oldss,x sta ($71),y ns15 cmp #$7f beq ns30 iny cpy #$f0 bcc ns11 ldy #0 ns11 lda ($71),y cmp #ss+20 beq ns15 sta oldss,x cmp #zs+$20 beq ns13 cmp #ss bcc ns14 cmp #ss+21 bcs ns14 ns13 lda #ss+20 sta ($71),y ns14 tya sta ssxp,x ns31 dex bpl ns12 lda #0 sta $74 ns20 rts ns30 lda oldss,x sta ($71),y jmp ns31 smcol lda #$0b ldy #$01 smc2 sta $d025 sty $d026 rts sdco ldx #7 nf69 lda icdat+35,x sta $c3f9,x sta $c7f9,x dex bpl nf69 rts blk lda #$80 sta $40 jsr blk3 jsr jsei lda #$0b sta $d011 rts blk3 lda $d011 bpl blk3 rts wht lda #0 sta $40 jsr blk3 wht2 lda $d011 bmi wht2 jsr blk3 lda #$1b sta $d011 jsr blk3 ; cli ; rts jmp jcli sprset lda stt,y sta $d010 ldx stt+1,y sty $9b jsr sesp2 clc lda $9b adc #12 tay ldx #14 nf80 lda stt+2,y sta $d000,x lda stt+3,y sta $d001,x dey dey dex dex bne nf80 rts nl22d jsr fget sta iccol-33,x inx cpx #40 bne nl22d rts sv1 ldx #$ff stx $d01c stx $d015 inx stx $d021 tmn1 rts adscore sed clc adc $e0 sta $e0 lda $e1 adc #0 sta $e1 lda $e2 adc #0 sta $e2 cld rts time dec timz bne tmn1 lda #51 sta timz sed sec lda $e3 sbc #1 sta $e3 lda $e4 sbc #0 sta $e4 cld and #$0f bne tmn2 lda $e3 bne tmn2 inc $40 tmn2 rts intime ldy #1 sty timz dey sty $e3 lda #$aa sta $e4 rts timz .byte 0 intsm ldx #$0f lda #$00 p175 sta $50,x dex bpl p175 rts superm jsr print .byte $01,$24,8 .text "ENTERING" .byte $f1,$95 .text "DEPARTMENT STORE" .byte 17 lda #$10 jsr nb3 lda #0 sta $d01d ; lda #$99 ;--- modified --- keine +9900 credits aufs konto ; sta $5f ;tax ;jsr soust lda #$09 sta $d022 lda #$0e sta $d023 jsr sv1 ldx #11 lda #$05 jsr clrsc2 jsr intpb jsr insebu ;init buy/sell anz lda #$80 sta $26 lda #8+3 sta $4f ldx #6 stx $53 nl4 lda icax,x sta $58 ldy loics,x lda hiics,x jsr setpos ldy #0 lda #30 sta $59 nl3 clc ldx $58 nl1 lda icrc,x adc $59 tay lda icrd,x jsr setcha2 dex bpl nl1 lda $59 sbc #4 sta $59 bpl nl3 ldy #rs+6 ldx #rs+1 lda #164 dec $53 bne nl4z lda #205 ldx #rs+6 ldy #rs nl4z sta icrc+17 stx icrd+17 sty icrd+10 ldx $53 bpl nl4 lda $52 asl a asl a asl a sec sbc $52 sta $5d tax lda #7 sta $53 lda #$a0 sta $28 lda #$c0 sta $29 ldy #3 nl12 lda hcost,x jsr pbyt2c lda lcost,x jsr pbyt2c iny inx dec $53 bne nl12 ldy #$2a ldx #rs jsr setpos2 ldx #23 nl61 ldy #0 jsr setcha ldy #35 jsr setcha jsr nexzeil dex bne nl61 jsr printc .byte $f0,$fe .null "credits" lda #11 ldy #rs+2 sty $c002 iny sty $c025 iny sty $c3e5 iny sty $c3c2 sta $d802 sta $d825 sta $dbe5 sta $dbc2 lda #$31 sta $13 lda #$f5 sta $14 jsr sefi3 jsr invst ldx #$9c jsr invbc jsr wht nl40a lda #0 sta $38 jsr haze nl40 lda #0 sta $5a nl40d ldx $8e lda $14 cmp #$e6 bcc nl4v ldx #dsp+15 nl4v stx $c3f8 ; cli nl40u lda $5a beq nl40u ldy #8 jsr pword dec $38 lda $38 and #$1f sta $38 bne nl40b jsr printc .byte $f3,$a8 .null "continue" nl40b lda $5a ldy $14 ldx $13 lsr a bcs nl30 dey dey dey nl30 lsr a bcs nl31 iny iny iny nl31 lsr a bcs nl32 dex dex dex dex cpx #$fd bne nl32 dec $26 nl32 lsr a bcs nl33 inx inx inx inx cpx #1 bne nl33 inc $26 nl33 cpy #$36 bcs nl34 iny iny iny nl34 cpy #$f8 bcc nl35 dey dey dey nl35 lda $26 lsr a txa bcs nl36 cpx #$2c bcs nl37 adc #4 tax nl36 cpx #$40 bcc nl37 sbc #4 tax nl37 stx $13 sty $14 ldx $75 lda $5a and #$10 sta $75 bne nl402 txa beq nl402 ldx $13 lda $26 lsr a txa ror a lsr a lsr a sec sbc #$05 sec ldx #$ff nl43 inx sbc #5 bcs nl43 cpx #7 bcs nl402 stx $58 ldx #5 tya nl46 cmp y2,x bcs nl44 cmp y1,x bcs nl45 nl44 dex bpl nl46 nl402 jmp nl40 sebut .byte 1,0,0,0,$ff,$ff nl45 stx $59 lda sebut,x ;buy/sell mod? jsr prsebu lda $59 asl a asl a asl a adc $58 sec sbc $59 tax cpx #28 bcs nl45b lda icdat,x cmp #$ca bne nl50h jsr haze bne nl45b nl50h sta $8e nl45b cpx #35 bcc nl47b jmp blk nl47b lda $5b sta $3a clc adc $5d tay cpx #28 bcs nl47c stx $5b jmp nl40 nl47c lda $8e cmp #dsp+15 beq nl47 lda $3a cmp #7 bcs nl50 lda #0 clc ldx #6 nl52 adc $60,x dex bpl nl52 cmp #21 bcs nl53 ldx $3a lda $60,x cmp maxic,x bcs nl54 lda $5f cmp hcost,y beq nl55 bcs nl66 nl56 jsr printc .byte $f3,$a8 .null "credits!" jmp nl40a nl55 lda $5e cmp lcost,y bcc nl56 nl66 lda $5e sed sbc lcost,y sta $5e lda $5f sbc hcost,y sta $5f cld inc $60,x bne nl47 nl50 lda $8e sbc #dsp tax lda $60,x bne nl50z jsr haze bne nl47 nl50z sed clc ;--- modified --- hinzugefügt lda $5e adc lsell,x sta $5e lda $5f adc hsell,x sta $5f cld dec $60,x nl47 jmp nl40 nl53 jsr printc .byte $f3,$a8 .null "stop now!" jmp nl40a nl54 jsr printc .byte $f3,$a8 .null " enough! " jmp nl40a insebu ;INIT BUY/SELL ANZEIGE .block ;save stars ldx #7 n1 lda $c150,x sta $c400,x sta $c410,x lda $c178,x sta $c428,x sta $c438,x dex bpl n1 ;put bchar jsr print .byte $f4,$00 .text "SELL" .byte $f4,$11 .null "BUY" rts .bend prsebu ;PRINT BUY/SELL .block bmi n2 ;get modus asl a asl a asl a asl a adc #7 tay ;print ldx #7 n1 lda $c400,y ;char sta $c150,x lda $c428,y sta $c178,x lda bsfr,y ;f-ram sta $d950,x lda bsfr+8,y sta $d978,x dey dex bpl n1 n2 rts bsfr ;buy/sell f-ram .byte 11,11,11,11,11,11,11,11 .byte 9,9,9,9,9,9,9,9 .byte 5,11,11,11,11,11,11,5 .byte 5,9,9,9,9,9,9,5 .bend haze lda #dsp+15 sta $8e rts sefi3 sei lda #$00 ldx #efi3 jsr setirq jmp init2 efi3 lda $13 sta $d000 lda $14 sta $d001 lda $26 sta $d010 ldx #7 jsr fget2 b8 sta iccol+28,y dey bpl b8 #rcol "01" ldx #30 nl22b jsr fget sta $d025-30,x inx cpx #33 bne nl22b jsr nl22d #rcol "09" lda #xicor+7 jsr sxcor ldx #28 lda #$12 jsr wait #rcol "04" ldx #41 jsr fget2 sta $dbab sta $dbac jsr fget2 sta $dbaa sta $dbad jsr fget2 sta $dba9 sta $dbae jsr fget2 sta $dba8 sta $dbaf #rcol "09" lda #xicor jsr sxcor lda #$30 nl22c cmp $d012 bcs nl22c jsr smcol ldx #0 lda #$31 jsr wait lda $d011 and #$7f ora #9 ; lda #$1b sta $d011 jsr stars1 jsr sound #rcol "09" ldx #7 lda #$81 jsr wait #rcol "01" ldy #0 ldx #6 nl22 lda $60,x beq nl20 sta $54 nl21 lda iccol,x sta iccol+7,y lda icdat,x sta icdat+7,y iny dec $54 bne nl21 nl20 dex bpl nl22 nl24 cpy #21 bcs nl23 lda #dsp+17 sta icdat+7,y iny bne nl24 nl23 lda $dc00 sta $5a #rcol "05" ldx #8 jsr fget2 b10 sta $d8fe,y dey bpl b10 jsr fget2 b9 sta $d906,y dey bpl b9 lda #$a1 ldx #14 jsr wait #rcol "02" jsr blink1 #rcol "09" lda #$c1 ldx #21 jsr wait jsr stars2 ss2 lda $d012 cmp #$fa bcc ss2 lda $d011 and #$77 ; lda #$13 sta $d011 jmp iend2 wait cmp $d012 bcs wait sesp #rcol "03" lda $d012 clc adc #9 sesp2 sta $53 txa clc adc #7 sta $54 ldy #0 sty $56 nl5 sty $57 ldy $56 lda icdat,x sta $c3f9,y lda iccol,x sta $d028,y lda ($30),y ldy $57 sta $d002,y lda $53 sta $d003,y inc $56 iny iny inx cpx $54 bcc nl5 #rcol "09" rts blink1 ldx #0 jsr fget2 b1 sta $d8a3,y dey bpl b1 jsr fget2 b2 sta $d8a8,y dey bpl b2 jsr fget2 b3 sta $d8ad,y dey bpl b3 jsr fget2 b4 sta $d8b2,y dey bpl b4 jsr fget2 b5 sta $d8b7,y dey bpl b5 jsr fget2 b6 sta $d8bc,y dey bpl b6 jsr fget2 b7 sta $d8c1,y dey bpl b7 rts ssrahm #rcol "02" lda #$bf+sczeil8-16 ssra2 sta $d003 sta $d005 sta $d007 sta $d009 sta $d00b sta $d00d sta $d00f lda #dsp+16 sta $c3f9 sta $c3fa sta $c3fb sta $c3fc sta $c3fd sta $c3fe sta $c3ff sta $c7f9 sta $c7fa sta $c7fb sta $c7fc sta $c7fd sta $c7fe sta $c7ff lda #$c0 sta $d010 lda #$00 sta $d001 sta $d00c sta $d025 lda #$00 sta $d026 lda #$ff sta $d01d sta $d01c lda #$10 sta $d002 lda #$40 sta $d004 lda #$70 sta $d006 lda #$a0 sta $d008 lda #$d0 sta $d00a lda #$30 sta $d00e #rcol "12" rts inbt1 .byte $00,$c0,$80,$40 invbz lda #$d3 sta $89 ldy #$48 lda #$8f sta p190+1 lda #$d4 bne p193 invbc lda #$d0 sta $89 ldy #0 lda #$47 sta p190+1 lda #$d3 p193 sta p192+1 php lda $01 pha sei lda #$34 sta $01 lda #0 sta $88 stx $8a lda ($88),y sta $8b sty $87 ldy #3 p194 lda $8b and #3 tax lda $8a and #$c0 sta inbt1,x lsr $8b lsr $8b asl $8a asl $8a dey bpl p194 ldy $87 p173 lda ($88),y sty $87 sta $8a ldx #4 p174 lda $8a and #$03 tay lda inbt1,y lsr $8b lsr $8b ora $8b sta $8b lsr $8a lsr $8a dex bne p174 ldy $87 sta ($88),y p190 cpy #$5f beq p191 p196 iny bne p173 inc $89 bne p173 p191 lda $89 p192 cmp #$d0 bcc p196 jmp rinv invst php lda $01 pha sei lda #$34 sta $01 ldx #$a7 lda #$d6 sta $89 lda #$d6 ldy #$00 jmp inv comsc ;HIGHSC-LIST .block ;EINTRAG? ldx #0 n3 lda $e2 cmp high1,x bcc n1 bne n2 lda $e1 cmp high2,x bcc n1 bne n2 lda $e0 cmp high3,x bcc n1 bne n2 n1 inx cpx #7 bcc n3 ldx #$ff rts n2 stx $d7 txa ;hsnames pos asl a sta $d8 asl a asl a adc $d8 sta $d6 ;in $d6 ldx #5 ldy #6*10-1 ;6. name n12 cpy $d6 bcc n10 dey ;-3 dey lda #7 ;8 zeichen sta $d8 n11 lda hsnames,y ;name copy sta hsnames+10,y dey dec $d8 bpl n11 lda high1,x sta high1+1,x lda high2,x sta high2+1,x lda high3,x sta high3+1,x dex bpl n12 n10 ldx $d7 lda $e0 ;score eintr. sta high3,x lda $e1 sta high2,x lda $e2 sta high1,x txa rts .bend hseintr .if skip_highscore_entry ;-- modified -- added: skip highscore eintrag rts .endif .block jsr comsc bpl n1 rts ;kein eintrag n1 lda #1 ldx #48 jsr sefi1 jsr clrscw jsr invspac jsr printc .byte $f0,$5b,8 .text "WELL DONE" .byte $f0,$cf .null "TYPE YOUR NAME" jsr wht ldx #$c4 ;get name lda #$c1 jsr sinpos lda #$40 ldx #8 ldy #8 jsr input jsr blk ldx #7 ;set name clc lda $d6 adc #7 tay n2 lda inpuf,x sta hsnames,y dey dex bpl n2 jmp invspac .bend sinpos ;SET INPUT-POSITION stx $d8 sta $d9 stx inpa+1 ora #$f0 sta inpa rts input .block sta adac stx maxc sty inpa+2 ;color lda #0 ;init sta kpufz sta inpz ldx #19 lda #" " n4 sta inpuf,x dex bpl n4 n1 jsr getkey beq n1 ;taste? cmp #$14 beq del ;del? cmp #13 beq ret ;ende? cmp #" " beq char cmp #"a" bcc n1 cmp #"z"+1 bcs n1 adc adac char ldx inpz n7 cpx maxc bcc n8 dex n8 sta inpuf,x inx n3 stx inpz jsr pinpuf jmp n1 del ldx inpz beq n9 dex n9 lda #" " sta inpuf,x jmp n3 ret rts adac .byte 0 ;char-anpassung maxc .byte 0 ;max chars .bend inpz .byte 0 pinpuf .block ldy #80 ;feld loeschen lda #$fe n1 sta ($d8),y dey bpl n1 .bend jsr printc ;txt schreiben inpa .byte $f0,0,8 inpuf .null " " rts getkey ;KEY FROM PUFFER .block sei lda kpufz ;nix beq n2 ;drinnen? ldy kpuff ;get char ldx #0 ;puff modify n1 lda kpuff+1,x sta kpuff,x inx cpx kpufz bne n1 dec kpufz tya n2 cli rts .bend keyirq ;KEY IN PUFFER .block lda $01 ;kernel on pha lda #$36 sta $01 ldx #$ff ;i/o init stx $dc02 inx stx $dc03 jsr umcopy jsr $ea87 ;tastaturabfrage jsr umcopy pla ;alter p-status sta $01 rts umcopy ;ADDR FUER GKEY ;SAVE BZW. SET ldx #$1a ;anz byte n1 ldy $0277,x lda kpuff,x sta $0277,x tya sta kpuff,x dex bpl n1 ldy $c5 lda kzp sta $c5 sty kzp ldy $c6 lda kpufz sta $c6 sty kpufz ldy $cb lda kzp+1 sta $cb sty kzp+1 ldy $f5 lda kzp+2 sta $f5 sty kzp+2 ldy $f6 lda kzp+3 sta $f6 sty kzp+3 rts .bend kpuff .byte 0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0 .byte 0,$10,$80,0,0,0,0,$48 .byte $eb,$80 kzp .byte $40,0,0,0 kpufz .byte 0 ;-------------------------------- high1 .byte 0,0,0,0,0,0,0 high2 .byte 0,0,0,0,0,0,0 high3 .byte $60,$50,$40,$30,$20,$10,0 phslist jsr print .byte $40,$a5,13 hsnames .text "ONE " .byte $f1,$1d .text "TWO " .byte $f1,$95 .text "THREE " .byte $f2,$0d .text "FOUR " .byte $f2,$85 .text "FIVE " .byte $f2,$fd .text "SIX " .byte $f3,$75 .text "SEVEN " .byte 0 .block ldx #6 lda #$c3 ldy #$87 n1 jsr slhp ldy #0 lda high1,x jsr pbbyt lda high2,x jsr pbbyt lda high3,x jsr pbbyt sec lda $0d n2 sbc #$78 tay bcs n3 dec $0e n3 lda $0e dex bpl n1 rts .bend getpar rts ;--- modified --- added: lösche zeile anzeige putanz_clear_line .block ldx #39 n1 lda #0 ;character sta game4+$2d0,x sta game4+$6d0,x sta game4,x ;lösche char dex bpl n1 rts .bend putanz jsr putanz_clear_line .block sei lda $01 pha lda #$34 sta $01 ldx #7 lda #0 n2b sta $d000,x dex bne n2b pla sta $01 ldx #200 nn161 lda anze-1,x ora #$c0 sta $c2cf+40,x lda #14 sta $dacf+40,x dex bne nn161 ldx #6 n10 lda anzc,x sta $daab+120,x sta $dac6+120,x dex bpl n10 lda #$c7 ldx $65 jmp n12 n11 sta $c2aa+120,x dex n12 bne n11 lda #$ea jsr sdpb ldy #0 jsr pword ldy #2 jsr pbyte ldy #3 jsr pbyte ldy #4 jmp pword ; pla ; sta $01 ; plp ; rts anzc .byte 14,10,12,13,11,14,8 .bend space = $a2 stp1 = $c059 stp2 = $c120 stp3 = $c1f2 stp4 = $c089 stp5 = $c019 stp6 = $c12f stp7 = $c20e stp8 = $c010 stp9 = $c02c stp10 = $c0ed stp11 = $c1d2 stp12 = $c118 setstar .block #rcol "06" lda $12 eor #7 tay ldx #$30 lda $07 and #4 bne u3 ldx #$03 u3 txa sta $cff0,y ldx #$fe lda #space ldy $0a bne u1 #rcol "14" cmp stp1 bne n1 stx stp1 n1 cmp stp2 bne n2 stx stp2 n2 cmp stp3 bne n3 stx stp3 n3 cmp stp4 bne n4 stx stp4 n4 cmp stp5 bne n5 stx stp5 n5 cmp stp6 bne n6 stx stp6 n6 cmp stp7 bne n7 stx stp7 n7 cmp stp8 bne n8 stx stp8 n8 cmp stp9 bne n9 stx stp9 n9 cmp stp10 bne n10 stx stp10 n10 cmp stp11 bne n11 stx stp11 n11 cmp stp12 bne n12 stx stp12 n12 rts u1 #rcol "14" cmp stp1+$0400 bne m1 stx stp1+$0400 m1 cmp stp2+$0400 bne m2 stx stp2+$0400 m2 cmp stp3+$0400 bne m3 stx stp3+$0400 m3 cmp stp4+$0400 bne m4 stx stp4+$0400 m4 cmp stp5+$0400 bne m5 stx stp5+$0400 m5 cmp stp6+$0400 bne m6 stx stp6+$0400 m6 cmp stp7+$0400 bne m7 stx stp7+$0400 m7 cmp stp8+$0400 bne m8 stx stp8+$0400 m8 cmp stp9+$0400 bne m9 stx stp9+$0400 m9 cmp stp10+$0400 bne m10 stx stp10+$0400 m10 cmp stp11+$0400 bne m11 stx stp11+$0400 m11 cmp stp12+$0400 bne m12 stx stp12+$0400 m12 rts .bend clstar .block ; ldy $12 ldy #7 lda #0 u9 sta $cff0,y dey bpl u9 ldx #space lda #$fe ldy $2f bne u1 #rcol "14" cmp stp1 bne n1 stx stp1 n1 cmp stp2 bne n2 stx stp2 n2 cmp stp3 bne n3 stx stp3 n3 cmp stp4 bne n4 stx stp4 n4 cmp stp5 bne n5 stx stp5 n5 cmp stp6 bne n6 stx stp6 n6 cmp stp7 bne n7 stx stp7 n7 cmp stp8 bne n8 stx stp8 n8 cmp stp9 bne n9 stx stp9 n9 cmp stp10 bne n10 stx stp10 n10 cmp stp11 bne n11 stx stp11 n11 cmp stp12 bne n12 stx stp12 n12 rts u1 #rcol "14" cmp stp1+$0400 bne m1 stx stp1+$0400 m1 cmp stp2+$0400 bne m2 stx stp2+$0400 m2 cmp stp3+$0400 bne m3 stx stp3+$0400 m3 cmp stp4+$0400 bne m4 stx stp4+$0400 m4 cmp stp5+$0400 bne m5 stx stp5+$0400 m5 cmp stp6+$0400 bne m6 stx stp6+$0400 m6 cmp stp7+$0400 bne m7 stx stp7+$0400 m7 cmp stp8+$0400 bne m8 stx stp8+$0400 m8 cmp stp9+$0400 bne m9 stx stp9+$0400 m9 cmp stp10+$0400 bne m10 stx stp10+$0400 m10 cmp stp11+$0400 bne m11 stx stp11+$0400 m11 cmp stp12+$0400 bne m12 stx stp12+$0400 m12 rts .bend anze .byte $00,$01,$02,$06,$06,$06 .byte $06,$06,$09,$06,$0a,$0b .byte $0a,$0a,$0a,$0a,$0a,$0a .byte $0a,$3c,$0a,$0a,$0a,$0a .byte $0a,$0a,$0a,$0a,$1c,$1d .byte $06,$06,$06,$06,$06,$09 .byte $06,$20,$21,$24,$03,$04 .byte $05,$3e,$3e,$3e,$3e,$3e .byte $0c,$08,$0e,$0d,$0f,$2a .byte $2b,$0f,$0f,$0f,$0f,$10 .byte $12,$0f,$0f,$0f,$0f,$33 .byte $33,$0f,$1e,$1f,$3e,$3e .byte $3e,$3e,$3e,$0c,$08,$23 .byte $22,$25,$0e,$27,$28,$29 .byte $29,$29,$29,$29,$29,$29 .byte $35,$0d,$0f,$13,$14,$0f .byte $0f,$0f,$0f,$11,$0f,$0f .byte $0f,$0f,$0f,$36,$3b,$0f .byte $27,$28,$29,$29,$29,$29 .byte $29,$34,$29,$35,$37,$1b .byte $0e,$27,$0f,$2e,$2f,$30 .byte $31,$32,$0f,$0f,$0f,$0d .byte $0f,$15,$16,$0f,$0f,$0f .byte $2b,$2c,$2d,$2e,$0f,$0f .byte $0f,$18,$19,$0f,$27,$0f .byte $0f,$0f,$2f,$30,$31,$32 .byte $33,$0f,$37,$1b,$39,$3a .byte $26,$26,$26,$26,$26,$26 .byte $26,$26,$26,$17,$26,$26 .byte $26,$26,$26,$26,$26,$26 .byte $26,$26,$26,$26,$26,$26 .byte $26,$26,$17,$26,$26,$26 .byte $26,$26,$26,$26,$26,$26 .byte $1a,$38,$00,$00,$00,$00 szstar php lda $01 pha sei lda #$34 sta $01 lda $d6a0 beq p182 cmp #$ff bne p184 p183 pla sta $01 plp rts chzst php lda $01 pha sei lda #$34 sta $01 p184 ldx #$a8 p181b ldy $d5ff,x lda zstm-1,x sta $d5ff,x tya sta zstm-1,x dex bne p181b lda $d6a0 bne p183 p182 pla sta $01 plp jmp invst zstm .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $fe,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ef,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$f7,$ff,$ff,$ff .byte $ff,$f7,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $fe,$ff,$ff,$ff,$ff,$ff .byte $ff,$ff,$ff,$ff,$ff,$ff .byte $ff,$f3,$f7,$ff,$ff,$ff .include "block.a64"