Banner
Views: 932,212,065
Time:
5 users online: FiftyNyne, Hat Kid,  JamesD28, Klug, Nara Sherko - Guests: 57 - Bots: 114 Users: 52,038 (2,101 active)
Latest: riverrunner836
Tip: You can use your My Files section to upload screenshots, videos, etc. of your hack.
Not logged in.
Posts by insoul
insoul's Profile - Posts by insoul
Pages: « 1 »
Hey was wondering if anyone could point me into the right direction of the address or memory region where the switch palaces level exit code would be?

I've checked the Memory Map and didn't seem to see anything that would point to this direction.

Thanks!
Perfect, exactly what I was looking for. Thank you.

Originally posted by Thomas
What exactly are you looking for, the code that ends the level like a switch palace? That's handled as part of the message box routine at $05B10C, specifically at $05B14A:

Code
CODE_05B132:                    ;```````````| Message box is expanding.
    LDA.w $0109                 ;$05B132    |\ 
    ORA.w $13D2                 ;$05B135    || Branch A if:
    BEQ CODE_05B16E             ;$05B138    || - Not in the intro level and not reading a switch palace message.
    LDA.w $1DF5                 ;$05B13A    || - Not able to dismiss the message yet.
    BEQ CODE_05B16E             ;$05B13D    |/
    LDA $13                     ;$05B13F    |\ 
    AND.b #$03                  ;$05B141    || Branch B if:
    BNE CODE_05B18E             ;$05B143    || - Not in a frame multiple of 4.
    DEC.w $1DF5                 ;$05B145    || - Did not just become able to dismiss the message.
    BNE CODE_05B18E             ;$05B148    |/
    LDA.w $13D2                 ;$05B14A    |\ Branch A again if not reading a switch palace message.
    BEQ CODE_05B16E             ;$05B14D    |/
    PLB                         ;$05B14F    |
    INC.w $1DE9                 ;$05B150    | Indicate event should activate on overworld load.
    LDA.b #$01                  ;$05B153    |\ 
    STA.w $13CE                 ;$05B155    || Activate the level's normal exit and fade to the overworld.
    BRA CODE_05B165             ;$05B158    |/
(restricted)
Edit: I figured it out, no need for help now.

I got this patch to work as I want but I don't know how to add support to SA-1?

I tried to use https://www.smwcentral.net/?p=viewthread&t=71953 as reference but i'm just not getting it.

Any help would be nice, thanks!

Code
ORG $0491D5
autoclean JSL NoSmall
NOP #2

freecode

NoSmall:
LDA #$01
STA $19
LDA $0DBC,X
STA $0DC2
RTL

ORG $00F5F5
db $EA,$EA,$EA

ORG $00F600
autoclean JSL CheckState

freecode

CheckState:
LDA $19
CMP #$02
BCS Big
JML $00F606
RTL

Big:
LDA #$01
STA $19
LDA #$04
STY $1DF9
JML $00F602
RTL 
Pages: « 1 »
insoul's Profile - Posts by insoul

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks