Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Player:
- move.b #$E4,d0 ; move 'stop music' sound index
- jsr PlaySound_Special ; call the playing subroutine
- jsr ClearPLC ; clear the PLC
- jsr Pal_FadeFrom ; fade out
- move #$2700,sr ; disable interrupts
- Player_SetupVDP:
- lea ($C00004).l,a6 ; setup teh VDP
- move.w #$8004,(a6) ; mode register 1 setting
- move.w #$8230,(a6) ; map Plane A setting
- move.w #$8407,(a6) ; map Plane B setting
- move.w #$9001,(a6) ; plane size setting
- move.w #$9200,(a6) ; window vertical position
- move.w #$8B00,(a6) ; mode register 3 setting
- move.w #$8720,(a6) ; backdrop color setting
- clr.b ($FFFFF64E).w ; clear $FFFFF64E
- jsr ClearScreen ; clear the actual screen
- lea ($FFFFD000).w,a1 ; clear $FFD000-$FFD7FF
- moveq #0,d0 ; d0 = 0
- move.w #$7FF,d1 ; set repeat times to $7FF or d1 = $07FF
- Player_ClrObjRam:
- move.l d0,(a1)+ ; fill 4 bytes in object RAM with 0
- dbf d1,Player_ClrObjRam ; repeat d1 = $7FF times
- Player_Art:
- lea $C00000,a6
- vram 0,4(a6)
- moveq #0,d0
- rept 8
- move.l d0,(a6)
- endr
- vram $20,4(a6)
- lea (Art_Player).l,a0 ; load location of art of Player
- jsr NemDec ; decompress Nemesis art
- Player_Mappings:
- lea ($FF0000).l,a1 ; load location of screen mappings
- lea (Map_Player).l,a0 ; load location of art mappings
- move.w #1,d0 ; d0 = 0
- jsr EniDec ; decompress Enigma mappings
- Player_ShowOnVDP:
- lea ($FF0000).l,a1 ; load location of screen mappings
- vram $E000,d0 ; load location of decompress art
- moveq #$3F,d1 ; set cols
- moveq #$1F,d2 ; set rows
- jsr ShowVDPGraphics ; call the displaying subroutine
- Player_LoadForeground:
- vram $900,($C00004).l
- lea (Art_MTME).l,a0
- jsr NemDec
- lea ($FF0000).l,a1
- lea (Map_MTME).l,a0
- move.w #$48,d0
- jsr EniDec
- vram $C318,d0
- moveq #$F,d1
- moveq #$F,d2
- jsr ShowVDPGraphics
- Player_Palette:
- lea (Pal_Player).l,a1 ; load location palette of art
- lea ($FFFFFB80).w,a2 ; load palette RAM
- moveq #7,d0 ; set repeat time to $1F or d0 = $1F
- @loop: move.l (a1)+,(a2)+ ; move 4 bytes of palette to palette RAM
- dbf d0,@loop ; repeat $1F times
- move.w #$FDF0,($FFFFCC00).w
- move.b #$20,($FFFFFFF2).w
- jsr ProcessDMAQueue
- jsr QueueDMATransfer
- Player_LoadObj:
- jsr Pal_FadeTo ; fade to
- moveq #$FFFFFFAD,d0
- jsr PlaySample
- ; ---------------------------------------------------------------------------------------------------------------------
- Player_Loop:
- move.b #2,($FFFFF62A).w ; set VBlank routine to #2
- jsr DelayProgram ; wait for execute VBlank routine
- subq.w #1,($FFFFF618).w
- addq.w #1,($FFFFCC02).w
- tst.b ($FFFFFFF2).w
- beq.s @cont
- moveq #0,d0
- move.b ($FFFFFFF2).w,d0
- add.w d0,($FFFFCC00).w
- subq.b #1,($FFFFFFF2).w
- @cont jsr ObjectsLoad ; run objects load program
- jsr BuildSprites ; run build sprites program
- jmp Player_Loop
- Player_Next:
- move.b #4,($FFFFF600).W
- rts ; return to subroutine
- ; ===========================================================================
- Pal_Player: incbin '#Player\Player.pal'
- even
- Art_Player: incbin '#Player\Player.artnem'
- even
- Map_Player: incbin '#Player\Player.mapeni'
- even
- Map_MTME: incbin '#Player\MTME.mapeni'
- even
- Art_MTME: incbin '#Player\MTME.artnem'
- even
- ; Art_Foreground: incbin '#Player\Foreground.artnem'
- ; even
- ; Map_Foreground: incbin '#Player\Foreground.mapeni'
- ; even
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement