LoRom !ETGFX = $9100 ;Pointers to the GFX for each PLM. These *must* be 2-byte pointers. !MSGFX = $9200 !SMGFX = $9300 !PBGFX = $9400 ;org $84F000 ;*** If you want new headers, put the hijack address for free space here. Make sure you delete the other ones below. org $84EED7 ;*** If you make new headers, delete this line. DW $EE64 : DW ETOpenInst ;These are the hijack points for the main PLM headers. DW $EE64 : DW MSOpenInst DW $EE64 : DW SMOpenInst DW $EE64 : DW PBOpenInst org $84EF2B ;*** If you make new headers, delete this line. DW $EE64 : DW ETBallInst DW $EE64 : DW MSBallInst DW $EE64 : DW SMBallInst DW $EE64 : DW PBBallInst org $84EF7F ;*** If you make new headers, delete this line. DW $EE8E : DW ETHideInst DW $EE8E : DW MSHideInst DW $EE8E : DW SMHideInst DW $EE8E : DW PBHideInst org $84F000 ;*** Point this to free space in bank $84. If you want NEW headers, move this up. ETBallInst: DW $8A2E,$DFAF ;Set up chozo ball DW $8A2E,$DFC7 ;Cancel chozo ball state when shot DW $8724 : DW ETBallJump ;Jump to main PLM instruction ETHideInst: DW $8A2E,$E007 ;Set up hidden item ETBallJump: DW $874E : DB $16 ;Setup delay for next instruction ETOpenInst: DW $8764,!ETGFX DB $00,$00,$00,$00 ;Palette indexes for each 8x8 for first animation DB $00,$00,$00,$00 ;Palette indexes for each 8x8 for second animation DW $887C : DW EndPLM ;Jump if item already picked up DW $8A24 : DW ETTouch ;Set address to jump to when item is touched DW $8724 : DW MainPLMLoop ;Jump to main GFX loop ETTouch: DW $8899 ;Set the item as picked up DW $8BDD : DB $02 ;Play a sound clip. $02 is index DW $8968 : DW $0064 ;Pick up energy tank + how much energy to add DW $8724,$DFA9 ;Run code to delete graphic and kill PLM MSBallInst: DW $8A2E,$DFAF ;Set up chozo ball DW $8A2E,$DFC7 ;Cancel chozo ball state when shot DW $8724 : DW MSBallJump ;Jump to main PLM instruction MSHideInst: DW $8A2E,$E007 ;Set up hidden item MSBallJump: DW $874E : DB $16 ;Setup delay for next instruction MSOpenInst: DW $8764,!MSGFX DB $00,$00,$00,$00 ;Palette indexes for each 8x8 for first animation DB $00,$00,$00,$00 ;Palette indexes for each 8x8 for second animation DW $887C : DW EndPLM ;Jump if item already picked up DW $8A24 : DW MSTouch ;Set address to jump to when item is touched DW $8724 : DW MainPLMLoop ;Jump to main GFX loop MSTouch: DW $8899 ;Set the item as picked up DW $8BDD : DB $02 ;Play a sound clip. $02 is index DW $89A9 : DW $0005 ;Pick up missile tank + how many missiles to add DW $8724,$DFA9 ;Run code to delete graphic and kill PLM SMBallInst: DW $8A2E,$DFAF ;Set up chozo ball DW $8A2E,$DFC7 ;Cancel chozo ball state when shot DW $8724 : DW SMBallJump ;Jump to main PLM instruction SMHideInst: DW $8A2E,$E007 ;Set up hidden item SMBallJump: DW $874E : DB $16 ;Setup delay for next instruction SMOpenInst: DW $8764,!SMGFX DB $00,$00,$00,$00 ;Palette indexes for each 8x8 for first animation DB $00,$00,$00,$00 ;Palette indexes for each 8x8 for second animation DW $887C : DW EndPLM ;Jump if item already picked up DW $8A24 : DW SMTouch ;Set address to jump to when item is touched DW $8724 : DW MainPLMLoop ;Jump to main GFX loo SMTouch: DW $8899 ;Set the item as picked up DW $8BDD : DB $02 ;Play a sound clip. $02 is index DW $89D2 : DW $0005 ;Pick up super missile tank + how many super missiles to add DW $8724,$DFA9 ;Run code to delete graphic and kill PLM PBBallInst: DW $8A2E,$DFAF ;Set up chozo ball DW $8A2E,$DFC7 ;Cancel chozo ball state when shot DW $8724 : DW PBBallJump ;Jump to main PLM instruction PBHideInst: DW $8A2E,$E007 ;Set up hidden item PBBallJump: DW $874E : DB $16 ;Setup delay for next instruction PBOpenInst: DW $8764,!PBGFX DB $00,$00,$00,$00 ;Palette indexes for each 8x8 for first animation DB $00,$00,$00,$00 ;Palette indexes for each 8x8 for second animation DW $887C : DW EndPLM ;Jump if item already picked up DW $8A24 : DW PBTouch ;Set address to jump to when item is touched DW $8724 : DW MainPLMLoop ;Jump to main GFX loop PBTouch: DW $8899 ;Set the item as picked up DW $8BDD : DB $02 ;Play a sound clip. $02 is index DW $89FB : DW $0005 ;Pick up power bomb tank + how many power bombs to add DW $8724,$DFA9 ;Run code to delete graphic and kill PLM MainPLMLoop: DW $86C1,$DF89 ;Setup touch detection for PLM GFXLoop: DW $E04F,$E067 ;Draws the GFX DW $8724 : DW GFXLoop ;Loop back to redraw GFX EndPLM: DW $8724,$DFA9 ;Run code to delete graphic and kill PLM