;--------------------------------------- ;SEUCK SCHOOL ; ;Timed shield protection and fairer ;game play. (1 or 2 players). ;SEUCK games tend to start where the ;player gets stuck in the background ;while respawning. This tip fixes this ;trick for deadly background or ;stoppable background. ;There's also a shield collectible ;in ROCKET 'N ROLL, which is object 22 ;(Actual Enemy #1) ;Please also note that: ;Shield routine will not work on both ;players at start of game, if one player ;starts the game, and another player ;comes on. ;Installation code ;--------------------------------------- *= $7000 ;SYS28672 to run! lda #$20 ;JSR ldx #killcheck sta $55c3 ;Override old stx $55c4 ;kill score sty $55c5 ;code lda #$4c ;JMP ;New game code ldx #gameinit ;game. sta $41a4 stx $41a5 sty $41a6 lda #$20 ;JSR ;New respawn ldx #respawnp1;init shield. sta $4b6c ;for player 1 stx $4b6d sty $4b6e lda #$20 ;New respawn ldx #respawnp2;init shield sta $4e7c ;for player 2 stx $4e7d sty $4e7e ;Plug enhancements loop to ;original sfx player call ;subroutine. lda #$20 ldx #enhancecode sta $4503 stx $4504 sty $4505 ;Fix score bug in SEUCK ;game. lda #$4c ;JMP ldx #fixscorebug sta $54a2 stx $54a3 sty $54a4 jmp $4245 ;Run SEUCK title ;--------------------------------------- ;Initialise game gameinit ;Init shield for both players jsr initshieldp1 jsr initshieldp2 jmp $4260 ;Run game ;--------------------------------------- ;Respawn code for player 1 respawnp1 sta $5db7 ;Life lost jsr initshieldp1 rts ;Respawn code for player 2 respawnp2 sta $5db8 ;Life lost jsr initshieldp2 rts ;-------------------------------------- ;Shield reset for player 1 every time ;a collectible is picked up, player ;respawned after a life is lost or ;every new game start initshieldp1 lda #255 ;Shield time :) sta shieldtimer lda #255 ;Collision char sta $40ac;P1 Sprite/Char lda #0 sta p1flashdelay sta p1flashpointer ;Make player 1 invincible ;to enemies lda #$ea sta $4b03 sta $4b04 sta $4b05 rts ;Shield reset for player 2 - same as ;player 1's shield reset initshieldp2 lda #255 ;Shield time sta shieldtimer2 lda #255 ;Collision char sta $40bf ;P2 sprite/char lda #0 sta p2flashdelay sta p2flashpointer ;Make player 2 invincible to ;enemies lda #$ea sta $4e12 sta $4e13 sta $4e14 rts ;--------------------------------------- ;Object killed detection for activating ;the shield (if hit). killcheck sta $5dbb ;Detect object hit lda $bc00,y ;SEUCK object sta objectkilled lda $09 ;Player that did it sta playerhit ;Store to pointer lda objectkilled cmp #22 ;Actual enemy #1 / ;object 22 bne notshield jmp awardshield notshield lda $bd06,y ;Scoring code rts ;Shield awarded, but which player ;picked it up first? awardshield lda playerhit cmp #$01 ;Was it player 1 bne player1get ;Player 1 gets the shield player1get jsr initshieldp1 lda $bd06,y ;Score rts ;Player 2 gets the shield player2get jsr initshieldp2 lda $bd06,y ;Score rts ;--------------------------------------- ;Main shield code testshieldp1 lda shieldtimer cmp #0 bne shieldnotout ;Shield is out ;Restore all collision ;with sprites and set ;background colour lda #146 ;Collision with char sta $40ac lda #$0a ;Colour sta $2c93;Player 1 lda #$ad sta $4b03 lda #$bd sta $4b04 lda #$5d sta $4b05 rts ;Player shield isn't out, so decrement ;a single value from the shield timer ;and perform a delay on the flashing ;subroutine. shieldnotout dec shieldtimer lda p1flashdelay cmp #2 beq p1timedflash inc p1flashdelay rts ;Reset flashdelay and perform flashing ;shield on player sprite p1timedflash lda #$00 sta p1flashdelay ldx p1flashpointer lda p1shieldcolour,x sta $2c93 ;P1 colour inx cpx #8 beq resetflashp1 inc p1flashpointer rts ;Reset flash pointer resetflashp1 ldx #$00 stx p1flashpointer rts ;Test shield for player 2 testshieldp2 lda shieldtimer2 cmp #0 bne shieldnotout2 lda #$0e ;Colour of player 2 sta $2ccf lda #$ad ;Restore player 2 sta $4e12;sprite/sprite lda #$be ;collision on killer sta $4e13;enemies lda #$5d sta $4e14 lda #146 ;Collision with char sta $40bf;for player 2 rts shieldnotout2 dec shieldtimer2;Dec shield for lda p2flashdelay;player 2 cmp #$02 ;and delay beq flashok2 ;flashing code inc p2flashdelay rts flashok2 lda #$00 sta p2flashdelay ldx p2flashpointer lda p2shieldcolour,x sta $2ccf inx cpx #8 ;No of colours to flash beq resetflashp2 inc p2flashpointer rts resetflashp2 ldx #$00 stx p2flashpointer rts ;--------------------------------------- ;Fix the game scoring bug so that the ;correct player gets the points scored ;every time a collectible is picked up fixscorebug sta $5dbb lda #$00 sta $09 jmp $54a5 ;--------------------------------------- ;Seuck enhancement loop code enhancecode jsr testshieldp1 ;Test shield jsr testshieldp2 ;for both plrs jsr $5c94 ;SFX SEUCK rts shieldtimer .byte 0 ;Player 1 timer shieldtimer2 .byte 0;Player 2 timer p1flashdelay .byte 0;Player 1 flash del. p2flashdelay .byte 0;Player 2 flash del. p1flashpointer .byte 0 ;Player 1 flash p p2flashpointer .byte 0 ;Player 2 flash p objectkilled .byte 0 ;SEUCK object hit playerhit .byte 0 ;Player 1 or 2? ;Important, you may need to adjust ;the frame type + colour to the ;player, to get correct animation. ; ;.byte $XY - Where: ; ;X=ANIM TYPE, Y = ANIM COLOUR ;Shiny red flashing colour scheme p1shieldcolour .byte $02,$0a,$07,$01 .byte $07,$0a,$02,$09 ;Shiney blue flashing colour scheme p2shieldcolour .byte $04,$0e,$03,$01 .byte $03,$0e,$04,$06 ;--------------------------------------