Ich putze hier nur.
Mein Hack:
<!-- m --><a class="postlink" href="http://www.youtube.com/user/conankun88#p/a/u/0/8vdcyGylrg0">http://www.youtube.com/user/conankun88# ... vdcyGylrg0</a><!-- m -->
JMP MarioBelow : JMP MarioAbove : JMP MarioSide : JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireBall
MarioAbove:
MarioBelow:
MarioSide:
LDA $19
BNE sonst
INC $19
BRA shatter
sonst:
LDA #$01
STA $0DB3
shatter:
LDA #$02
STA $9C
JSL $00BEB0
PHB
LDA #$02
PHA
PLB
LDA #$00 ; Set to 01 for rainbow explosion.
JSL $028663
PLB
SpriteV:
SpriteH:
MarioCape:
MarioFireBall:
RTL
JMP MarioBelow : JMP MarioAbove : JMP MarioSide : JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireBall
MarioAbove:
MarioBelow:
MarioSide:
LDA $19
BNE sonst
INC $19
BRA shatter
sonst:
LDA #$01
STA $0DB3
shatter:
LDA #$02
STA $9C
JSL $00BEB0
PHB
LDA #$02
PHA
PLB
LDA #$00 ; Set to 01 for rainbow explosion.
JSL $028663
PLB
SpriteV:
SpriteH:
MarioCape:
MarioFireBall:
RTL
; Double Jump
; HuFlungDu
; Basically it's what the name says. It will allow mario to double jump. The second jump height is configurable
; if you look farther down in the patch. It requires some free RAM, and the one I gave it is the most
; overused free RAM ever, so I suggest you repoint it.
; No credit necessary
macro RATS_start(id)
db "STAR"
dw RATS_Endcode-RATS_Startcode
dw RATS_Endcode-RATS_Startcode ^#$FFFF
RATS_Startcode:
endmacro
macro RATS_end(id)
RATS_Endcode:
endmacro
lorom ;\ ROM is LoRom
header ;/ and has a header.
!freeram = $0660 ; Your pobably gonna want to point this elsewhere
!secondjumpheight = $C0 ; This is the speed stored to mario's Y speed (HEX).
; The lower it is, the higher you go.
!freespace = $218015 ; If you don't know what this means... go find a tutorial
org $A21B ;\ Hijack routine that runs every frame (you can change this
;/ if you know what you are doing, otherwise, leave this alone)
JSL Djump ;Then jump to the code
org !freespace
%RATS_start(0) ; A RAT tag to keep LM from overwiting our code
Djump:
LDA $77 ;
AND #$04 ; Check if mario is on ground
BNE reset
LDA $75 ; Check if mario is in water
BEQ notwater
STZ !freeram
BRA reset
notwater:
LDA !freeram ;\ Check if you've already jumped (doesn't allow you to jump twice in the air)
BNE reset ;/
LDA $16 ;\ check if either B or A is pressed
AND #$80 ; |
BEQ return ;/ if neither, return
LDA $18 ;\ check if it's B that's pressed
AND #$80 ; |if A, not B,
BNE return ;/ return
LDA $7D ;Don't jump if mario is going down
BPL return ;(just comment out these lines if you want him to be able to)
LDA #!secondjumpheight ;\ Make mario jump
STA $7D ;/
LDA #$01 ;\Make sound effect
STA $1DFA ;/
INC !freeram ; Increase the freeram, telling the game that you
;just jumped and can't do it again
reset:
LDA $77 ; |
AND #$04 ; Check if mario is on ground
BEQ return
STZ !freeram ; Reset the freeram if mario is touching the ground
return:
LDA $16 ;\ Restore Hijacked code
AND #$10 ;/ (Don't touch unless you know what you are doing)
RTL
%RATS_end(0)
header
lorom
;################################################
; DEFINITIONS
;################################################
; \ Point to some free ROM space!!!!!
; | (Note: If our ROM is at least 1MB
!FreeSpace = $1C8000 ; | and you haven't applied any other
; | patches before, you don't need to
; / change this.)
!LevelNum = $010B ; Where the current level number is stored at
; \ Change this to $01
!AlwaysShwPwrup = $00 ; | to always show your current powerup
; / in the status bar
;################################################
; LEVELNUM.IPS DISASSEMBLY
;################################################
org $05D8B9 ; \
JSR Levelnummain ; |
; | Store current level number
org $05DC46 ; | to $010B and $010C
Levelnummain: ; |
LDA $0E ; | (Code by BMF54123,
STA !LevelNum ; | disassembled by Ersanio)
ASL A ; |
RTS ; /
;################################################
; STATUS BAR HIJACKS
;################################################
org $008CC9
db $FC,$2C,$FC,$3C ; \ Change the palettes of some empty tiles
db $FC,$28,$FC,$28 ; | and move bonus star counter
db $64,$28,$26,$38 ; / to the right
org $008CAB
db $FC,$3C,$76,$38 ; \ Use the clock tile instead of the "TIME" text
db $FC,$3C ; / so we can use that for custom GFX
;################################################
; ROUTINE HIJACKS
;################################################
org $008F49
JSL CustomCode ; Custom code that makes you invisible, stay on Yoshi etc.
org $01F71D
JML RunAway ; handles sprite contact
NOP ; ("hurt Yoshi or make him run away?")
org $02A481
JML RunAwayExt ; handles extended sprite contact
NOP
org !FreeSpace
db "STAR" ; \
dw End-Start-$01 ; | Write RAT / RATS Tag / whatever
dw End-Start-$01^$FFFF ; /
Start:
RunAway:
PHB ; \
PHK ; |
PLB ; |
PHY ; |
PHX ; |
REP #$30 ; |
LDA !LevelNum ; |
PHA ; |
LSR #3 ; | Code by Roy:
TAY ; | Load the bit that corresponds
PLA ; | to the current level
AND #$0007 ; |
TAX ; |
SEP #$20 ; |
LDA.w LevelTable,y ; |
AND.w ANDTable,x ; |
SEP #$10 ; |
PLX ; |
PLY ; /
CMP #$00 ; \ If zero,
BEQ .UseOldRoutine ; / use the old routine
JSL $00F5B7 ; \ If not zero, hurt Mario/Yoshi
PLB : JML $01F74B ; / and return from the routine
.UseOldRoutine ; \
LDA #$13 ; | If zero, restore some hijacked code
STA $1DFC ; | and continue the routine normally
PLB : JML $01F722 ; /
RunAwayExt:
PHB ; \
PHK ; |
PLB ; |
PHY ; |
PHX ; |
REP #$30 ; |
LDA !LevelNum ; |
PHA ; |
LSR #3 ; | Code by Roy:
TAY ; | Load the bit that corresponds
PLA ; | to the current level
AND #$0007 ; |
TAX ; |
SEP #$20 ; |
LDA.w LevelTable,y ; |
AND.w ANDTable,x ; |
SEP #$10 ; |
PLX ; |
PLY ; /
CMP #$00 ; \ If zero,
BEQ .UseOldRoutine ; / use the old routine
JSL $00F5B7 ; \ If not zero, hurt Mario/Yoshi
PLB : JML $02A4AC ; / and return from the routine
.UseOldRoutine ; \
LDA #$13 ; | If zero, restore some hijacked code
STA $1DFC ; | and continue the routine normally
PLB : JML $02A486 ; /
CustomCode:
LDA #!AlwaysShwPwrup ; \
BEQ + ; | Always display powerup
JSR DispPowerup ; | in the status bar
+ ; /
PHB ; \
PHK ; |
PLB ; |
PHY ; |
PHX ; |
REP #$30 ; |
LDA !LevelNum ; |
PHA ; |
LSR #3 ; | Code by Roy:
TAY ; | Load the bit that corresponds
PLA ; | to the current level
AND #$0007 ; |
TAX ; |
SEP #$20 ; |
LDA.w LevelTable,y ; |
AND.w ANDTable,x ; |
SEP #$10 ; |
PLX ; |
PLY ; /
CMP #$00 ; \ If zero,
BEQ Return ; / do nothing
LDA #!AlwaysShwPwrup ; \
BNE + ; | Display powerup
JSR DispPowerup ; | in the status bar
+ ; /
LDA #$40 ; \
STA $13E0 ; | Make Mario
LDA #$9D ; | invisible
STA $13DF ; /
REP #$20 ; \
LDA $17 ; |
AND #$7F7F ; | Disable A button (spin jump)
STA $17 ; |
SEP #$20 ; /
LDA #$22 ; \
STA $0EF9 ; |
LDA #$18 ; |
STA $0EFA ; |
LDA #$1C ; | Display "YOSHI" as the player name
STA $0EFB ; | in the status bar
LDA #$11 ; |
STA $0EFC ; |
LDA #$12 ; |
STA $0EFD ; /
Return:
LDA $0DBE ; \ Hijacked code
INC A ; / (don't touch this)
PLB : RTL ; Return
DispPowerup:
LDA #$FC ; \
STA $0F19 ; | Clear all tiles in the powerup section
STA $0F1A ; | before drawing new ones so that no two
STA $0F1B ; | powerups are shown at the same time
STA $0F1C ; /
PHX ; \
LDX $19 ; |
CPX #$00 ; | Display current powerup in the
BEQ DontDisp ; | status bar (so that you know what
DEX ; | powerup you are - Mario is invisible,
LDA.l PowerupTiles,x ; | after all - and if you're going to
STA $0F19,x ; | die on the next hit or not)
DontDisp: ; |
PLX ; /
RTS ; Return from subroutine
PowerupTiles: db $3D,$3F,$3E ; Tiles used as powerup symbols
ANDTable:
db $80,$40,$20,$10,$08,$04,$02,$01 ; Don't change.
;################################################
; LEVEL TABLE (Change this)
;################################################
LevelTable:
db %00000000,%00000000 ; Levels 0-F
db %00000000,%00000000 ; Levels 10-1F
db %00000000,%00000000 ; Levels 20-2F
db %00000000,%00000000 ; Levels 30-3F
db %00000000,%00000000 ; Levels 40-4F
db %00000000,%00000000 ; Levels 50-5F
db %00000000,%00000000 ; Levels 60-6F
db %00000000,%00000000 ; Levels 70-7F
db %00000000,%00000000 ; Levels 80-8F
db %00000000,%00000000 ; Levels 90-9F
db %00000000,%00000000 ; Levels A0-AF
db %00000000,%00000000 ; Levels B0-BF
db %00000000,%00000000 ; Levels C0-CF
db %00000000,%00000000 ; Levels D0-DF
db %00000000,%00000000 ; Levels E0-EF
db %00000000,%00000000 ; Levels F0-FF
db %00000100,%00000000 ; Levels 100-10F
db %00000000,%00000000 ; Levels 110-11F
db %00000000,%00000000 ; Levels 120-12F
db %00000000,%00000000 ; Levels 130-13F
db %00000000,%00000000 ; Levels 140-14F
db %00000000,%00000000 ; Levels 150-15F
db %00000000,%00000000 ; Levels 160-16F
db %00000000,%00000000 ; Levels 170-17F
db %00000000,%00000000 ; Levels 180-18F
db %00000000,%00000000 ; Levels 190-19F
db %00000000,%00000000 ; Levels 1A0-1AF
db %00000000,%00000000 ; Levels 1B0-1BF
db %00000000,%00000000 ; Levels 1C0-1CF
db %00000000,%00000000 ; Levels 1D0-1DF
db %00000000,%00000000 ; Levels 1E0-1EF
db %00000000,%00000000 ; Levels 1F0-1FF
End: ; This is the end. Don't remove this.
;==============;
;Shop Block ;
;By Iceguy ;
;Act Like 130 ;
;==============;
!Ram = $0DBF ; $0DBF -> Coin counter.
; $1422 -> Yoshi Coins.
; $0F48 -> Bonus stars.
; $0DBE -> Lives.
!Price = 12 ; Price of the item in decimal, with the Ram defined above.
!1ups = 02 ; How many 1ups to give the player.
!SoundWrong = $2A
!PushSpeed = $20
!ActLike = $29 ; If $29, it will turn into a used-block after hitting it (when the item is purchased).
; If $30, the block will stay intact after hitting it (when the item is purchased).
!PlayMsg = $01 ; Whether a message is played if the player has too few coins. 00 = no, any other value = yes.
!MsgNum = $01 ; Which message to use (1 or 2) if the above is set to $01.
db $42
JMP MarioBelow : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return
JMP Return : JMP Return : JMP Return
MarioBelow:
LDA #!PushSpeed
STA $7D
LDA !Ram
CMP #!Price
BCC +
SEC
SBC #!Price
STA !Ram
LDA #!SoundRight
STA $1DFC
LDA #1!ups
STA $18E4
LDY #$01
LDA #!ActLike
STA $1693
RTL
+ LDA #!SoundWrong
STA $1DFC
LDA #!PlayMsg
BEQ Return
LDA #!MsgNum
STA $1426
Return:
RTL
;==============;
;Shop Block ;
;By Iceguy ;
;Act Like 130 ;
;==============;
!Ram = $0DBF ; $0DBF -> Coin counter.
; $1422 -> Yoshi Coins.
; $0F48 -> Bonus stars.
; $0DBE -> Lives.
!Price = 12 ; Price of the item in decimal, with the Ram defined above.
!1ups = 02 ; How many 1ups to give the player.
!SoundWrong = $2A
!PushSpeed = $20
!ActLike = $29 ; If $29, it will turn into a used-block after hitting it (when the item is purchased).
; If $30, the block will stay intact after hitting it (when the item is purchased).
!PlayMsg = $01 ; Whether a message is played if the player has too few coins. 00 = no, any other value = yes.
!MsgNum = $01 ; Which message to use (1 or 2) if the above is set to $01.
db $42
JMP MarioBelow : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return
JMP Return : JMP Return : JMP Return
MarioBelow:
LDA #!PushSpeed
STA $7D
LDA !Ram
CMP #!Price
BCC +
SEC
SBC #!Price
STA !Ram
LDA #!SoundRight
STA $1DFC
LDA #1!ups
STA $18E4
LDY #$01
LDA #!ActLike
STA $1693
RTL
+ LDA #!SoundWrong
STA $1DFC
LDA #!PlayMsg
BEQ Return
LDA #!MsgNum
STA $1426
Return:
RTL
LDA #1!ups
LDA #!1ups
;==============;
;Shop Block ;
;By Iceguy ;
;Act Like 130 ;
;==============;
!Ram = $0DBF ; $0DBF -> Coin counter.
; $1422 -> Yoshi Coins.
; $0F48 -> Bonus stars.
; $0DBE -> Lives.
!Price = 12 ; Price of the item in decimal, with the Ram defined above.
!1ups = 02 ; How many 1ups to give the player.
!SoundWrong = $2A
!PushSpeed = $20
!ActLike = $29 ; If $29, it will turn into a used-block after hitting it (when the item is purchased).
; If $30, the block will stay intact after hitting it (when the item is purchased).
!PlayMsg = $01 ; Whether a message is played if the player has too few coins. 00 = no, any other value = yes.
!MsgNum = $01 ; Which message to use (1 or 2) if the above is set to $01.
db $42
JMP MarioBelow : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return
JMP Return : JMP Return : JMP Return
MarioBelow:
LDA #!PushSpeed
STA $7D
LDA !Ram
CMP #!Price
BCC +
SEC
SBC #!Price
STA !Ram
LDA #!SoundRight
STA $1DFC
LDA #!1ups
STA $18E4
LDY #$01
LDA #!ActLike
STA $1693
RTL
+ LDA #!SoundWrong
STA $1DFC
LDA #!PlayMsg
BEQ Return
LDA #!MsgNum
STA $1426
Return:
RTL
{InitCodeLabel}:
LDA.b #$00
STA.l $7FB006
STA.l $7FB007
LDA.b #$00
STA.l $7FB008
STA.l $7FB009
JSR {MainCodeLabel}_Grp1
RTL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Pipe Generator, based on mikeyk's and Magus' code, further changed by Davros.
;;
;; Description: This sprite will turn into upper pipe tiles or a lower pipe tiles when all
;; the sprites in the screen are dead.
;;
;; Uses first extra bit: YES
;; When the first extra bit is clear, the sprite will turn into an upper pipe. When the
;; first extra bit is set, it will turn into a lower pipe.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
EXTRA_BITS = $7FAB10
PIPE_TILE1 = $0137 ; \ upper pipe tiles
PIPE_TILE2 = $0138 ; |
PIPE_TILE3 = $0135 ; |
PIPE_TILE4 = $0136 ; /
PIPE_TILE5 = $0135 ; \ lower pipe tiles
PIPE_TILE6 = $0136 ; |
PIPE_TILE7 = $0137 ; |
PIPE_TILE8 = $0138 ; /
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite init JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
dcb "INIT"
RTL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; sprite code JSL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
dcb "MAIN"
LDA $1493 ; \ if the goal is set...
BNE RETURN ; /
LDY #$0B ; \ load number of times to go through loop
LOOP_START CPY $00 ; |
BEQ DONT_CHECK ; /
LDA $190F,y ; \ if the tweaker bits are set...
AND #$40 ; |
BNE DONT_CHECK ; /
LDA $14C8,y ; \ if no sprite is left alive...
BNE RETURN ; /
DONT_CHECK DEY ;
BPL LOOP_START ;
SOUND LDA #$15 ; \ play sound effect
STA $1DFC ; /
LDA EXTRA_BITS,x ; \ generate lower pipe if the extra bit is set...
AND #$04 ; |
BNE HOLE ; /
JSR GENERATE_PIPES ; generate pipe routine
BRA RETURN
HOLE JSR GENERATE_PIPES2 ; generate pipe routine
RETURN RTL ; return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; generate Map16 pipes
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
GENERATE_PIPES LDA $AA,x ; \ if the y speed is set...
BNE RETURN67 ; /
STZ $14C8,x ; destroy the sprite
JSR SETUP_BLOCK ; setup block properties routine
PHP
REP #$30 ; \ change sprite to block
LDA.W #PIPE_TILE1 ; |
STA $03 ; |
JSR SUBL_SET_MAP16 ; |
PLP ; /
JSR SETUP_BLOCK2 ; setup block properties routine
PHP
REP #$30 ; \ change sprite to block
LDA.W #PIPE_TILE2 ; |
STA $03 ; |
JSR SUBL_SET_MAP16 ; |
PLP ; /
JSR SETUP_BLOCK3 ; setup block properties routine
PHP
REP #$30 ; \ change sprite to block
LDA.W #PIPE_TILE3 ; |
STA $03 ; |
JSR SUBL_SET_MAP16 ; |
PLP ; /
JSR SETUP_BLOCK4 ; setup block properties routine
PHP
REP #$30 ; \ change sprite to block
LDA.W #PIPE_TILE4 ; |
STA $03 ; |
JSR SUBL_SET_MAP16 ; |
PLP ; /
RETURN67 RTS ; return
GENERATE_PIPES2 LDA $AA,x ; \ if the y speed is set...
BNE RETURN68 ; /
STZ $14C8,x ; destroy the sprite
JSR SETUP_BLOCK ; setup block properties routine
PHP
REP #$30 ; \ change sprite to block
LDA.W #PIPE_TILE5 ; |
STA $03 ; |
JSR SUBL_SET_MAP16 ; |
PLP ; /
JSR SETUP_BLOCK2 ; setup block properties routine
PHP
REP #$30 ; \ change sprite to block
LDA.W #PIPE_TILE6 ; |
STA $03 ; |
JSR SUBL_SET_MAP16 ; |
PLP ; /
JSR SETUP_BLOCK3 ; setup block properties routine
PHP
REP #$30 ; \ change sprite to block
LDA.W #PIPE_TILE7 ; |
STA $03 ; |
JSR SUBL_SET_MAP16 ; |
PLP ; /
JSR SETUP_BLOCK4 ; setup block properties routine
PHP
REP #$30 ; \ change sprite to block
LDA.W #PIPE_TILE8 ; |
STA $03 ; |
JSR SUBL_SET_MAP16 ; |
PLP ; /
RETURN68 RTS ; return
SETUP_BLOCK LDA $E4,x ; \ setup block properties
STA $9A ; |
LDA $14E0,x ; |
STA $9B ; |
LDA $D8,x ; |
STA $98 ; |
LDA $14D4,x ; |
STA $99 ; /
RTS ; return
SETUP_BLOCK2 LDA $E4,x ; \ setup block properties
CLC ; |
ADC #$10 ; | set x position
STA $9A ; |
LDA $14E0,x ; |
ADC #$00 ; |
STA $9B ; |
LDA $D8,x ; |
STA $98 ; |
LDA $14D4,x ; |
STA $99 ; /
RTS ; return
SETUP_BLOCK3 LDA $E4,x ; \ setup block properties
STA $9A ; |
LDA $14E0,x ; |
STA $9B ; |
LDA $D8,x ; |
CLC ; |
ADC #$10 ; | set y position
STA $98 ; |
LDA $14D4,x ; |
ADC #$00 ; |
STA $99 ; /
RTS ; return
SETUP_BLOCK4 LDA $E4,x ; \ setup block properties
CLC ; |
ADC #$10 ; | set x position
STA $9A ; |
LDA $14E0,x ; |
ADC #$00 ; |
STA $9B ; |
LDA $D8,x ; |
CLC ; |
ADC #$10 ; | set y position
STA $98 ; |
LDA $14D4,x ; |
ADC #$00 ; |
STA $99 ; /
RTS ; return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Map 16 Routine
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SUBL_SET_MAP16 PHP ;A:0266 X:0007 Y:0001 D:0000 DB:01 S:01EE P:envmxdizcHC:1306 VC:149 00 FL:1681
REP #$30 ;A:0266 X:0007 Y:0001 D:0000 DB:01 S:01ED P:envmxdizcHC:1328 VC:149 00 FL:1681
PHY ;A:0266 X:0007 Y:0001 D:0000 DB:01 S:01ED P:envmxdizcHC:1350 VC:149 00 FL:1681
PHX ;A:0266 X:0007 Y:0001 D:0000 DB:01 S:01EB P:envmxdizcHC:0012 VC:150 00 FL:1681
TAX ;A:0266 X:0007 Y:0001 D:0000 DB:01 S:01E9 P:envmxdizcHC:0042 VC:150 00 FL:1681
LDA $03 ;A:0266 X:0266 Y:0001 D:0000 DB:01 S:01E9 P:envmxdizcHC:0056 VC:150 00 FL:1681
PHA ;A:0266 X:0266 Y:0001 D:0000 DB:01 S:01E9 P:envmxdizcHC:0088 VC:150 00 FL:1681
JSR SUB_8034 ;A:0266 X:0266 Y:0001 D:0000 DB:01 S:01E7 P:envmxdizcHC:0118 VC:150 00 FL:1681
PLA ;A:0010 X:0000 Y:0006 D:0000 DB:00 S:01DC P:envmxdizCHC:0726 VC:032 00 FL:11805
STA $03 ;A:02A8 X:0000 Y:0006 D:0000 DB:00 S:01DE P:envmxdizCHC:0762 VC:032 00 FL:11805
PLX ;A:02A8 X:0000 Y:0006 D:0000 DB:00 S:01DE P:envmxdizCHC:0794 VC:032 00 FL:11805
PLY ;A:02A8 X:0020 Y:0006 D:0000 DB:00 S:01E0 P:envmxdizCHC:0830 VC:032 00 FL:11805
PLP ;A:02A8 X:0020 Y:0001 D:0000 DB:00 S:01E2 P:envmxdizCHC:0866 VC:032 00 FL:11805
RTS ;A:02A8 X:0020 Y:0001 D:0000 DB:00 S:01E3 P:envmxdizCHC:0894 VC:032 00 FL:11805
JMP $FEA301
RETURN18 PLX
PLB
PLP
RTS
SUB_8034 PHP ;A:0266 X:0266 Y:0001 D:0000 DB:01 S:01E5 P:envmxdizcHC:0164 VC:150 00 FL:1682
SEP #$20 ;A:0266 X:0266 Y:0001 D:0000 DB:01 S:01E4 P:envmxdizcHC:0186 VC:150 00 FL:1682
PHB ;A:0266 X:0266 Y:0001 D:0000 DB:01 S:01E4 P:envMxdizcHC:0208 VC:150 00 FL:1682
LDA #$00 ;A:0200 X:0266 Y:0001 D:0000 DB:01 S:01E3 P:envMxdiZcHC:0286 VC:150 00 FL:1682
PHA ;A:0200 X:0266 Y:0001 D:0000 DB:01 S:01E3 P:envMxdiZcHC:0324 VC:150 00 FL:1682
PLB ;A:0200 X:0266 Y:0001 D:0000 DB:01 S:01E2 P:envMxdiZcHC:0346 VC:150 00 FL:1682
REP #$30 ;A:0200 X:0266 Y:0001 D:0000 DB:00 S:01E3 P:envMxdiZcHC:0374 VC:150 00 FL:1682
PHX ;A:0200 X:0266 Y:0001 D:0000 DB:00 S:01E3 P:envmxdiZcHC:0396 VC:150 00 FL:1682
LDA $9A ;A:0200 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envmxdiZcHC:0426 VC:150 00 FL:1682
STA $0C ;A:0070 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envmxdizcHC:0458 VC:150 00 FL:1682
LDA $98 ;A:0070 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envmxdizcHC:0490 VC:150 00 FL:1682
STA $0E ;A:0130 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envmxdizcHC:0522 VC:150 00 FL:1682
LDA.W #$0000 ;A:0130 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envmxdizcHC:0554 VC:150 00 FL:1682
SEP #$20 ;A:0000 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envmxdiZcHC:0578 VC:150 00 FL:1682
LDA $5B ;A:0000 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0600 VC:150 00 FL:1682
STA $09 ;A:0000 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0624 VC:150 00 FL:1682
LDA $1933 ;A:0000 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0648 VC:150 00 FL:1682
BEQ NO_SHIFT ;A:0000 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0680 VC:150 00 FL:1682
LSR $09
NO_SHIFT LDY $0E ;A:0000 X:0266 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0702 VC:150 00 FL:1682
LDA $09 ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:envMxdizcHC:0734 VC:150 00 FL:1682
AND #$01 ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0758 VC:150 00 FL:1682
BEQ HORIZ ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0774 VC:150 00 FL:1682
LDA $9B
STA $00
LDA $99
STA $9B
LDA $00
STA $99
LDY $0C
HORIZ CPY.W #$0200 ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0796 VC:150 00 FL:1682
BCS RETURN18 ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0820 VC:150 00 FL:1682
LDA $1933 ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0836 VC:150 00 FL:1682
ASL A ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0868 VC:150 00 FL:1682
TAX ;A:0000 X:0266 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0882 VC:150 00 FL:1682
LDA $BEA8,x ;[$00:BEA8] ;A:0000 X:0000 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0896 VC:150 00 FL:1682
STA $65 ;A:00A8 X:0000 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0928 VC:150 00 FL:1682
LDA $BEA9,x ;[$00:BEA9] ;A:00A8 X:0000 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0952 VC:150 00 FL:1682
STA $66 ;A:00BD X:0000 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0984 VC:150 00 FL:1682
STZ $67 ;A:00BD X:0000 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1008 VC:150 00 FL:1682
LDA $1925 ;A:00BD X:0000 Y:0130 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1032 VC:150 00 FL:1682
ASL A ;A:0000 X:0000 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1064 VC:150 00 FL:1682
TAY ;A:0000 X:0000 Y:0130 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1078 VC:150 00 FL:1682
LDA ($65),y ;[$00:BDA8] ;A:0000 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1092 VC:150 00 FL:1682
STA $04 ;A:00D8 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1132 VC:150 00 FL:1682
INY ;A:00D8 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1156 VC:150 00 FL:1682
LDA ($65),y ;[$00:BDA9] ;A:00D8 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:1170 VC:150 00 FL:1682
STA $05 ;A:00BA X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1210 VC:150 00 FL:1682
STZ $06 ;A:00BA X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1234 VC:150 00 FL:1682
LDA $9B ;A:00BA X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:1258 VC:150 00 FL:1682
STA $07 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1282 VC:150 00 FL:1682
ASL A ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1306 VC:150 00 FL:1682
CLC ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1320 VC:150 00 FL:1682
ADC $07 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1334 VC:150 00 FL:1682
TAY ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:1358 VC:150 00 FL:1682
LDA ($04),y ;[$00:BAD8] ;A:0000 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0004 VC:151 00 FL:1682
STA $6B ;A:0000 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0044 VC:151 00 FL:1682
STA $6E ;A:0000 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0068 VC:151 00 FL:1682
INY ;A:0000 X:0000 Y:0000 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0092 VC:151 00 FL:1682
LDA ($04),y ;[$00:BAD9] ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0106 VC:151 00 FL:1682
STA $6C ;A:00C8 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0146 VC:151 00 FL:1682
STA $6F ;A:00C8 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0170 VC:151 00 FL:1682
LDA #$7E ;A:00C8 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0194 VC:151 00 FL:1682
STA $6D ;A:007E X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0210 VC:151 00 FL:1682
INC A ;A:007E X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0234 VC:151 00 FL:1682
STA $70 ;A:007F X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0248 VC:151 00 FL:1682
LDA $09 ;A:007F X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0272 VC:151 00 FL:1682
AND #$01 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0296 VC:151 00 FL:1682
BEQ NO_AND ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0312 VC:151 00 FL:1682
LDA $99
LSR A
LDA $9B
AND #$01
BRA LABEL52
NO_AND LDA $9B ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0334 VC:151 00 FL:1682
LSR A ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0358 VC:151 00 FL:1682
LDA $99 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZcHC:0372 VC:151 00 FL:1682
LABEL52 ROL A ;A:0001 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0396 VC:151 00 FL:1682
ASL A ;A:0002 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0410 VC:151 00 FL:1682
ASL A ;A:0004 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0424 VC:151 00 FL:1682
ORA #$20 ;A:0008 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0438 VC:151 00 FL:1682
STA $04 ;A:0028 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0454 VC:151 00 FL:1682
CPX.W #$0000 ;A:0028 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0478 VC:151 00 FL:1682
BEQ NO_ADD ;A:0028 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZCHC:0502 VC:151 00 FL:1682
CLC
ADC #$10
STA $04
NO_ADD LDA $98 ;A:0028 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZCHC:0524 VC:151 00 FL:1682
AND #$F0 ;A:0030 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizCHC:0548 VC:151 00 FL:1682
CLC ;A:0030 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizCHC:0564 VC:151 00 FL:1682
ASL A ;A:0030 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0578 VC:151 00 FL:1682
ROL A ;A:0060 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0592 VC:151 00 FL:1682
STA $05 ;A:00C0 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0606 VC:151 00 FL:1682
ROL A ;A:00C0 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0630 VC:151 00 FL:1682
AND #$03 ;A:0080 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizCHC:0644 VC:151 00 FL:1682
ORA $04 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdiZCHC:0660 VC:151 00 FL:1682
STA $06 ;A:0028 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizCHC:0684 VC:151 00 FL:1682
LDA $9A ;A:0028 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizCHC:0708 VC:151 00 FL:1682
AND #$F0 ;A:0070 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizCHC:0732 VC:151 00 FL:1682
LSR A ;A:0070 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizCHC:0748 VC:151 00 FL:1682
LSR A ;A:0038 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0762 VC:151 00 FL:1682
LSR A ;A:001C X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0776 VC:151 00 FL:1682
STA $04 ;A:000E X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0790 VC:151 00 FL:1682
LDA $05 ;A:000E X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envMxdizcHC:0814 VC:151 00 FL:1682
AND #$C0 ;A:00C0 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0838 VC:151 00 FL:1682
ORA $04 ;A:00C0 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0854 VC:151 00 FL:1682
STA $07 ;A:00CE X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0878 VC:151 00 FL:1682
REP #$20 ;A:00CE X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvMxdizcHC:0902 VC:151 00 FL:1682
LDA $09 ;A:00CE X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvmxdizcHC:0924 VC:151 00 FL:1682
AND.W #$0001 ;A:0100 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envmxdizcHC:0956 VC:151 00 FL:1682
BNE LABEL51 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envmxdiZcHC:0980 VC:151 00 FL:1682
LDA $1A ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envmxdiZcHC:0996 VC:151 00 FL:1682
SEC ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envmxdiZcHC:1028 VC:151 00 FL:1682
SBC.W #$0080 ;A:0000 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:envmxdiZCHC:1042 VC:151 00 FL:1682
TAX ;A:FF80 X:0000 Y:0001 D:0000 DB:00 S:01E1 P:eNvmxdizcHC:1066 VC:151 00 FL:1682
LDY $1C ;A:FF80 X:FF80 Y:0001 D:0000 DB:00 S:01E1 P:eNvmxdizcHC:1080 VC:151 00 FL:1682
LDA $1933 ;A:FF80 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:1112 VC:151 00 FL:1682
BEQ LABEL50 ;A:0000 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdiZcHC:1152 VC:151 00 FL:1682
LDX $1E
LDA $20
SEC
SBC.W #$0080
TAY
BRA LABEL50
LABEL51 LDX $1A
LDA $1C
SEC
SBC.W #$0080
TAY
LDA $1933
BEQ LABEL50
LDA $1E
SEC
SBC.W #$0080
TAX
LDY $20
LABEL50 STX $08 ;A:0000 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdiZcHC:1174 VC:151 00 FL:1682
STY $0A ;A:0000 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdiZcHC:1206 VC:151 00 FL:1682
LDA $98 ;A:0000 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdiZcHC:1238 VC:151 00 FL:1682
AND.W #$01F0 ;A:0130 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:1270 VC:151 00 FL:1682
STA $04 ;A:0130 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:1294 VC:151 00 FL:1682
LDA $9A ;A:0130 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:1326 VC:151 00 FL:1682
LSR A ;A:0070 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:1358 VC:151 00 FL:1682
LSR A ;A:0038 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:0004 VC:152 00 FL:1682
LSR A ;A:001C X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:0018 VC:152 00 FL:1682
LSR A ;A:000E X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:0032 VC:152 00 FL:1682
AND.W #$000F ;A:0007 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:0046 VC:152 00 FL:1682
ORA $04 ;A:0007 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:0070 VC:152 00 FL:1682
TAY ;A:0137 X:FF80 Y:00C0 D:0000 DB:00 S:01E1 P:envmxdizcHC:0102 VC:152 00 FL:1682
PLA ;A:0137 X:FF80 Y:0137 D:0000 DB:00 S:01E1 P:envmxdizcHC:0116 VC:152 00 FL:1682
SEP #$20 ;A:0266 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envmxdizcHC:0152 VC:152 00 FL:1682
STA [$6B],y ;[$7E:C937] ;A:0266 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envMxdizcHC:0174 VC:152 00 FL:1682
XBA ;A:0266 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envMxdizcHC:0222 VC:152 00 FL:1682
STA [$6E],y ;[$7F:C937] ;A:6602 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envMxdizcHC:0242 VC:152 00 FL:1682
XBA ;A:6602 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envMxdizcHC:0290 VC:152 00 FL:1682
REP #$20 ;A:0266 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envMxdizcHC:0310 VC:152 00 FL:1682
ASL A ;A:0266 X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envmxdizcHC:0332 VC:152 00 FL:1682
TAY ;A:04CC X:FF80 Y:0137 D:0000 DB:00 S:01E3 P:envmxdizcHC:0346 VC:152 00 FL:1682
PHK ;A:04CC X:FF80 Y:04CC D:0000 DB:00 S:01E3 P:envmxdizcHC:0360 VC:152 00 FL:1682
PER.W #$0006 ; NOTE: this relative counter must always point to MAP16_RETURN.
PEA $804C
JMP.L $00C0FB
MAP16_RETURN PLB
PLP
RTS
NOP