by Raidenthequick and TheGreekBrit
Super Mario World 2 - Yoshi's Island by 任天堂 / Nintendo released on 1995-08-05 Super Mario World 2 - Yoshi's Island (SNES) Super Nintendo Game by Nintendo superfamicom.org Super Nintendo Database. Feb 21, 2011 Make sure the ROM version is 1.0 (U), or else you will get errors! Q: When I play someone else's hacks, it freezes when I get to the 'Welcome To Yoshi's Island' screen. A: This is a result of patching the.ips to the wrong version of the ROM. Remember, you must download and patch to Yoshi's Island v1.0 (U).
Yoshi's Island (u) (1.0) Location
Full Disassembly including:
- 65816 code
- Super FX code
- SPC-700 code
- data sections
Disassembly is 100% finished, assembles under asar and produces a fully clean ROM. Do asar/asar disassembly/assemble.asm yi.sfc
to assemble the full ROM.
Not all code is documented, however, so we would welcome any efforts in documentation including naming labels and comments, etc.
Please make sure, before you submit any changes, corrections, or documentation, that the code still assembles correctly and still produces a clean ROM (please run a diff or hash compare with a clean U 1.0 ROM to find out).
Target version:V1.0 (NTSC-US)
Consult the wiki, ROM Map, RAM Map, and SRAM Map for technical information about the game that was found using this disassembly.
Naming conventions:
Labels
- Please use
all_lowercase_and_underscore_delimiting
for label names. - Maximum label / variable name length is currently 32 characters. This is because of current spacing and addressing modes to take into account.
- Put parent labels at the top of every major piece of code, such as a subroutine, interrupt routine, entity or operation.
- Try to be somewhat brief in naming parent labels.
- Use .sublabels for minor labels within the parent label's code (i.e. before hitting the next parent label).
- Feel free to use ..nested_sublabels for better organization when beneficial.
Example:
- For 'long' entry points of subroutines (often these just change the data bank to the current bank), create an additional parent label above the major one but add suffix
_l
.
Example:
- For other entry points within a parent label, use .sublabels as you would for any minor label, and simply call it via label_sublabel from calling code.
- Use
.ret
for when a piece of code is primarily meant to return, includingRTS
,RTL
, and any stack or other cleanup. - If there are multiple return points that essentially have differing forms of cleanup, use a distinct suffix for the type of cleanup. However, plain
.ret
should still be used on the last one regardless.
Example:
- Use a parent or sublabel for most data tables. Exception: There are cases when data is found amongst code, like calls to $00BE39 and the like. These take data from the caller's address as parameters, so they are not referenced directly and hence do not need labels; comments should serve nicely.
- ..nested_sublabels should not be used for data.
- Feel free to replace
$hex
addresses in code with data labels, but please first check if you need to do any label arithmetic to make it correct. Often the tables will be referenced a bit off from where they actually are, due to code likePHA RTS
or the nature of$00
sometimes not being a valid index. Example:JSR (item_use_ptr-2,x)
- Prefix conventions:
init_
should be applied when a piece of code is meant to set something up and only runs one time for the lifespan of the operation / entity.main_
should be applied when a piece of code is meant to run every frame for a given operation / entity; it's what is driving it.check_
should be applied when a piece of code is primarily meant to check and see whether a certain operation / entity needs to be initialized, updated, or destroyed.gsu_
should be applied for all Super FX routines.
- Suffix conventions:
_ptr
for pointer tables_state_ptr
or.state_ptr
specifically for state pointer tables
Variables
Please use
!all_lowercase_and_underscore_delimiting
for variable names.Prefix conventions:
reg_
for SNES hardware registersgsu_
for Super FX registersr_
for RAM, meaning $0000-$1FFF when data bank is $00-$3F, and $7E0000-$7FFFFFs_
for SRAM, meaning $6000-$7FFF when data bank is $00-$3F, and $700000-$71FFFFs_spr_
specifically for sprite tables in SRAM
Suffix conventions:
_l
for long (24-bit) addresses
Constants
Use ALL_CAPS_UNDERSCORE
for constants, example:
Bugs
If you come across a bug in the original code, please mark it in the comments with a bug name that begins with BUG_
. Then, somewhere above the section or routine it's found in, put the same BUG_xxxxx
name and describe it in more detail there. Example: