Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Twilight:
- move.b #$E4,d0 ; move 'stop music' sound index
- jsr PlaySound_Special ; call the playing subroutine
- jsr ClearPLC ; clear the PLC
- jsr Pal_FadeFrom
- move #$2700,sr ; disable interrupts
- Twilight_SetupVDP:
- lea ($C00004).l,a6 ; setup teh VDP
- move.w #$8004,(a6) ; mode register 1 setting
- ; move.w #$8170,(a6)
- 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 #$8B03,(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
- Twilight_ClrObjRam:
- move.l d0,(a1)+ ; fill 4 bytes in object RAM with 0
- dbf d1,Twilight_ClrObjRam ; repeat d1 = $7FF times
- Twilight_Art:
- vram $0020 ; VRAM $0020
- lea (Twilight_1Art).l,a0 ; load location of art of Twilight
- jsr NemDec ; decompress Nemesis art
- Twilight_Mappings:
- lea ($FF0000).l,a1 ; load location of screen mappings
- lea (Twilight_BMap).l,a0 ; load location of art mappings
- move.w #0,d0 ; d0 = 0
- jsr EniDec ; decompress Enigma mappings
- Twilight_ShowOnVDP:
- lea ($FF0000).l,a1 ; load location of screen mappings
- vram $E000,d0 ; load location of decompress art
- moveq #$7,d1 ; set cols
- moveq #$7,d2 ; set rows
- jsr ShowVDPGraphics ; call the displaying subroutine
- Twilight_Palette:
- lea (Twilight_1Pal).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
- moveq #$FFFFFFAD,d0
- jsr PlaySample
- move.b #3,$FFFFFFF2
- jsr Pal_FadeTo
- ; ---------------------------------------------------------------------------------------------------------------------
- Twilight_Loop:
- move.b #2,($FFFFF62A).w
- jsr DelayProgram
- jsr ObjectsLoad ; run objects load program
- jsr BuildSprites ; run build sprites program
- jsr Twilight_ChangeArt
- cmp.b #6,$FFFFFFF5
- blt.s Twilight_Loop
- Twilight_Next:
- lea $FFFFFFF0,a0
- clr.l (a0)+
- clr.l (a0)+
- movea.l #0,a0
- rts
- Twilight_ChangeArt:
- subq.b #1,$FFFFFFF2
- beq.s @cont
- rts
- @cont
- move.b #3,$FFFFFFF2
- lea Twilight_PalIndex,a0
- move.b $FFFFFFF3,d0
- lsl.b #2,d0
- adda.l d0,a0
- move.l (a0),a0
- lea $FFFFFB00,a1
- move.l (a0)+,(a1)+
- move.l (a0)+,(a1)+
- move.l (a0)+,(a1)+
- move.l (a0)+,(a1)+
- move.l (a0)+,(a1)+
- move.l (a0)+,(a1)+
- move.l (a0)+,(a1)+
- move.l (a0)+,(a1)+
- lea Twilight_ArtIndex,a0
- moveq #0,d0
- move.b $FFFFFFF3,d0
- lsl.b #2,d0
- adda.l d0,a0
- move.l (a0),a0
- vram $0020
- jsr NemDec
- addq.b #1,$FFFFFFF3
- cmpi.b #8,$FFFFFFF3
- bne.s @rts
- move.b #0,$FFFFFFF3
- @rts rts
- Twilight_ArtIndex:
- dc.l Twilight_1Art
- dc.l Twilight_2Art
- dc.l Twilight_3Art
- dc.l Twilight_4Art
- dc.l Twilight_5Art
- dc.l Twilight_6Art
- dc.l Twilight_7Art
- dc.l Twilight_8Art
- Twilight_PalIndex:
- dc.l Twilight_1Pal
- dc.l Twilight_2Pal
- dc.l Twilight_3Pal
- dc.l Twilight_4Pal
- dc.l Twilight_5Pal
- dc.l Twilight_6Pal
- dc.l Twilight_7Pal
- dc.l Twilight_8Pal
- Twilight_1Art:
- incbin #Twilightlicious\1.artnem
- even
- Twilight_2Art:
- incbin #Twilightlicious\2.artnem
- even
- Twilight_3Art:
- incbin #Twilightlicious\3.artnem
- even
- Twilight_4Art:
- incbin #Twilightlicious\4.artnem
- even
- Twilight_5Art:
- incbin #Twilightlicious\5.artnem
- even
- Twilight_6Art:
- incbin #Twilightlicious\6.artnem
- even
- Twilight_7Art:
- incbin #Twilightlicious\7.artnem
- even
- Twilight_8Art:
- incbin #Twilightlicious\8.artnem
- even
- Twilight_BMap:
- incbin #Twilightlicious\Background.mapeni
- even
- Twilight_1Pal:
- incbin #Twilightlicious\1.pal
- even
- Twilight_2Pal:
- incbin #Twilightlicious\2.pal
- even
- Twilight_3Pal:
- incbin #Twilightlicious\3.pal
- even
- Twilight_4Pal:
- incbin #Twilightlicious\4.pal
- even
- Twilight_5Pal:
- incbin #Twilightlicious\5.pal
- even
- Twilight_6Pal:
- incbin #Twilightlicious\6.pal
- even
- Twilight_7Pal:
- incbin #Twilightlicious\7.pal
- even
- Twilight_8Pal:
- incbin #Twilightlicious\8.pal
- even
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement