Language…
14 users online: bravetoaster, Burst Man, Chetyre, edy, FrozenQuills,  Fyre150, Golden Yoshi, goldenrules, Moltz, Rva921, Sirius_Kokov, smoulder, Xulon,  YouFailMe - Guests: 186 - Bots: 81
Users: 70,575 (2,467 active)
Latest user: edy

SMW Memory Map

Displaying 46 out of 2446 addresses.

View: moderated | waiting (13)

Filter

Link
  • Pages:
  • 1
  • 2
  • 3
  • 46
  • 47
  • 48
  • 49
Hijack Address Length Type Description Details
$0DB940 4 bytes Jump (JML/JSL) Modified by the patch Switch Palace RAM Optimizer by Sonikku.
JML, changes the red and blue switch blocks' object load code to check a bit instead of a byte.
$0DBADC 39 bytes Code Modified by Forest Treetop Fix. Makes forest treetops able to be positioned at any Y position inside a level.
$0DBB16 13 bytes Code Modified by Lunar Magic.
$0DC4C9 4 bytes Jump (JML/JSL) Modified by the Castle Intro Ledge Fix patch, by Kevin.

JSL, stores the Map16 data pointer in $04/$05.
$0DC4DE 5 bytes Jump (JML/JSL) Modified by the Castle Intro Ledge Fix patch, by Kevin.

JSL : NOP, retrieves the stored Map16 pointer before loading the second row of blocks to ensure correct positioning about screen boundaries.
$0DE18C 4 bytes 24-bit Pointer Optionally used by Lunar Magic to allow third-party tools to implement variable byte sizes for custom overworld sprites. To enable, set $0DE18F to 0x42, then write a 24-bit pointer to $0DE18C for your sprite size table.

The actual table should be 0x80 bytes long, with each sprite getting one byte. The default size should be 4 (1 extra byte), with the minimum being 3 and maximum being 0xF.
$0DE190 21 bytes Code Used by Lunar Magic v2.50+ for a set of three routines (RTL-ended) to access the secondary entrance tables, in addition to the ones at $05DC80. Call these with the secondary exit ID in X to get the corresponding table:
  • $0DE190: $05F800 (also writes to $0E)
  • $0DE197: $05FA00 (also writes to $00)
  • $0DE19E: $05FC00 (also writes to $01)

These are mainly intended for use when Lunar Magic's secondary exit expansion is applied, which moves these tables dynamically.
$0DE210 64 bytes Code Used by Lunar Magic as a routine to implement bank bytes for Chocolate Island 2's data pointers. Jumped to from $05DB5B. The bank bytes specifically can be found in the same order as CI2's original pointers at $0DE231 (Layer 1), $0DE23A (Layer 2), and $0DE243 (sprites).
$0DEC96 4 bytes Jump (JML/JSL) Modified by the patch Switch Palace RAM Optimizer by Sonikku.
Changes the switch palace switch object code to check a bit instead of a byte.
$0DF08A 79 bytes Code Modified by Lunar Magic.
It's a subroutine (which ends in RTS) inserted the first time a level is saved in LM.
$0DF100 20 bytes Code Used by Lunar Magic for a routine to decrypt level data in a locked ROM.
$0DF150 13 bytes Code Modified by Lunar Magic.
Small piece of code inserted the first time a level is saved in LM.
$0DF160 35 bytes Code Modified by Lunar Magic.
It's a subroutine (which ends in RTS) inserted the first time the time limit setting is bypassed in LM.
$0DF17D 4 bytes Jump (JML/JSL) Hijacked by the Midway Point Timer Reset patch by WhiteYoshiEgg.
JML, it hijacks Lunar Magic's custom routine that sets the level timer to backup its initial value.
$0DF1A0 17 bytes Code Used by Lunar Magic for a routine to decrypt a GFX file's pointer in a locked ROM.
$0DF1C0 178 bytes Code Modified by Lunar Magic.
It's a subroutine (which ends in RTS) inserted the first time a level is saved in LM.
$0DF290 59 bytes Code Modified by Lunar Magic.
It's a subroutine (which ends in RTS) inserted the first time a level is saved in LM.
$0DF2CB 8 bytes Table Modified by Lunar Magic.
It's an AND table (which goes from $01 to $80) inserted the first time a level is saved in LM. It's used by the code at $0DF290.
$0E8000 28928 bytes Code Modified by AddmusicK.
First, an header is inserted, containing the following:
- The identifier characters "@AMK".
- Version number (which seems to be kept at $00 in all versions of the program).
- Long pointer to the table of sample groups pointers.
- Long pointer to the table of music data pointers.
- 21 "$00" bytes, probably meant for future expansions.

Then, the main code of the tool is inserted, which handles uploading music to the SPC700 and playing it, and the rest of the space is cleared out by filling it with "$55" bytes ("rep $7100 : db $55" done before inserting the custom code). The space is cleared out until $0EF0FF, since $0EF100-$0EFFFF is used by Lunar Magic.
$0EF100 3176 bytes Miscellaneous Modified by Lunar Magic for various purposes.

  • $0EF100-$0EF2FF (512 bytes): Table that holds the bank byte of the pointer to each level's sprite data. If a level hasn't been altered, the entry into the table for that level will be the vanilla bank byte of the sprite data pointer ($07).
  • $0EF300-$0EF30B (12 bytes): Routine that gets the bank byte of the pointer to the level's sprite data from the table at $0EF100, and stores it to $D0.
  • $0EF30C-$0EF30F (4 bytes): If $0EF30F is set to 0x42, Lunar Magic will use $0EF30C as a 24-bit pointer to a table for sprite extension byte counts. Must be implemented by a third-party tool.
  • $0EF310-$0EF50F (512 bytes): Table that holds various settings related to the Layer 2 tilemap. Format: bbBBVFCT. V indicates a vanilla BG tilemap is in use, while C indicates a custom BG tilemap; neither being set indicates Layer 2 is composed of objects instead. The F bit indicates the usage of the bbBB bits; if set, BB is the Map16 bank to use for the background, while if clear, bbBB is used as the high byte of all the background's Map16 tiles (only used for the vanilla tilemaps). The T bit meanwhile is a deprecated feature that would use the LT3 ExGFX slot as a Layer 2 tilemap instead (treating it as an "LT2" slot). However, this bit is no longer supported as of v3.31.
  • $0EF510-$0EF54F (64 bytes): Used as a routine to get the level's Layer 2 tilemap settings from the above table. Stores the value to $7FC00B.
  • $0EF550-$0EF55C (13 bytes): Used as a routine to set up the level numbers in $010B and $FE.
  • $0EF55D-$0EF55F (3 bytes): Used as a 24-bit pointer to the custom overworld sprite data.
  • $0EF570-$0EF5C7 (87 bytes): Used for a routine to load the current level's custom palette, if applicable.
  • $0EF600-$0EFBFF (1536 bytes): Used as a table of 24-bit pointers to each level's custom palette. If a pointer is 000000, the level has no custom palette; if FFFFFF, then the level has not inserted any custom palettes at all.
  • $0EFC00-$0EFC4F (80 bytes): Used as a routine to fix a 3bpp->4bpp conversion issue with the level transition messages (MARIO START / GAME OVER / etc.).
  • $0EFC50-$0EFCAF (96 bytes): Used for a pair of routines for backing up/restoring the BG tilemap during the enemy scenes of the credits. Necessary because of the increased size of the decompression region for GFX files, due to them now being 4bpp instead of 3bpp.
  • $0EFD00-$0EFD4F (80 bytes): Used for a routine to get the BG Map16 page pointer.
  • $0EFD50-$0EFD67 (24 bytes): Table of eight 24-bit pointers to the BG Map16 pages, with each pointer corresponding to a set of 0x10 pages. If a pointer is 000000, then that set of pages isn't currently being used.
  • $0EFD68-$0EFD7F (24 bytes): Table of additional 24-bit pointers, although these ones aren't used.
Extra Bytes Data
$0EF100 512 bytes Table Modified by LM.

This table contains the bank bytes of every level's sprite data pointer.
$0EF30C 4 bytes Data Hijacked by Pixi.
Writes the pointer to sprite size table, and then a $42 byte, so that Lunar Magic will enable extra bit customization for placing sprites.
$0EF310 512 bytes Table Used by LM as a table of Layer 2-related data for each level. Format: bbBBVFDT
  • V = Flag to indicate whether a tilemap BG is vanilla (1) or custom (0)
  • D = Data type; object (0) or tilemap (1)
  • F = Flag to indicate the usage of the high nibble, when using a tilemap BG
  • BB = F bit set: Map16 bank to use for the BG
  • bbBB = F bit clear: high byte for all BG Map16 tiles (only used for compatability with the original system)
  • T = Deprecated bit used to enable a feature that would allow the ExGFX file defined for the LT3 slot to be loaded as a Layer 2 background (effectively, turning it into an "LT2" slot). As of v3.31, this feature is no longer supported and should not be used.
$0EF55D 3 bytes 24-bit Pointer Used by Lunar Magic as a 24-bit pointer to the custom overworld sprite data table. Will be $FFFFFF if no custom sprites are being used.
$0EF600 1536 bytes 24-bit Pointer A list of 24-bit pointers to each level's palette data, inserted by Lunar Magic. Indexed by level number * 3. If an entry's low and high bytes are both zero, the default palette is loaded instead (the bank byte is not checked in this case).
$0EFD50 24 bytes Table Used by Lunar Magic. This is a table of eight 24-bit pointers to the BG Map16 data in ascending order, where each pointer corresponds to a set of 0x10 pages. If a pointer is $000000, then that set of BG Map16 pages is currently unused.
$0F8000 28753 bytes Data Modified by AddmusicK.
This is where AMK's custom SPC engine (main.bin) is inserted in the ROM, to then be uploaded to the SPC700 ram. The remaining bytes are cleared out by filling them with "$55" bytes ("REP $7051 : db $55" done before inserting the custom data). The space is cleared out until $0FF050, since $0FF051-$0FFFFF is used by Lunar Magic.
$0FF0A0 160 bytes Hex Edit Not actually "used" for anything, but Lunar Magic writes the following string here:
Code
Lunar Magic Version X.XX Public 
©YYYY FuSoYa, Defender of Relm h
ttp://fusoya.eludevisibility.org
                                
I am Naaall, and I love fiiiish!

where X.XX is the version number and YYYY is the publication year of the LM version used.
$0FF160 135 bytes Code Used by Lunar Magic for a routine to decompress a file for an ExGFX slot during level load.
$0FF200 1024 bytes Table Used by Lunar Magic for the "old" graphics bypass using lists. In that system, an index of $00 is used to mark that no list bypass is used, and indices $01-$FF will point into this table (However, Lunar Magic's UI will instead display $00 as the first list and $FE as the last list). To calculate the direct offset, take ((index-1)*4). Note that both FG/BG list bypass and sprite list bypass share the same range of indices.

For each offset, contains four bytes for the four (Ex)GFX files that are used for this index. This system is only capable of addressing (Ex)GFX files numbered $00 through $FF.
$0FF600 384 bytes 24-bit Pointer Used by Lunar Magic for a table of 24-bit pointers to ExGFX80-FF (pointers for 100-FFF can be found at $read3($0FF937)). A pointer of 000000 indicates the file isn't inserted.
$0FF780 40 bytes Code Used by Lunar Magic for a routine called during level load to initialize Layer 3 and AN2.
$0FF7D0 15 bytes Code Used by Lunar Magic for a routine for a deprecated feature that would treat the LT3 ExGFX slot as an Layer 2 tilemap (i.e. LT2).
$0FF7F0 67 bytes Jump (JML/JSL) Used by Lunar Magic as a routine to handle processing ExGFX files during level load.
A table of every level's ExGFX files can be found at read3($0FF7FF). Each level receives 32 bytes, with two bytes per ExGFX file; some additional data is also stored in the high byte of certain files. More information can be found here.
$0FF840 54 bytes Code Used by Lunar Magic for a routine to check if an ExGFX slot has been bypassed and, if so, decompress it into RAM.

The last 7 bytes of this routine appear to be unused.
$0FF8A0 70 bytes Code Used by Lunar Magic for a few different support routines for decompressing GFX files:
  • $0FF8A0 - Retrieves an ExGFX file from LM's old list-based GFX bypass system.
  • $0FF8B8 - Decompresses an ExGFX file to $7EAD00.
  • $0FF8CB - Decompresses an ExGFX file for a specified slot. Includes some special handling for a deprecated LT2 ExGFX file feature that would send it to $7E2000 instead.
$0FF900 110 bytes Jump (JML/JSL) Used by Lunar Magic as a routine to decompress a 4bpp GFX file to a specified location in RAM. To use it, load the 16-bit GFX file number into A and 24-bit destination RAM address in $00.
Note that it won't work on GFX32/33.
$0FF9C0 10 bytes Code Used by Lunar Magic for a routine to get Layer 3 GFX files for the credits and castle cutscenes.
$0FF9E0 175 bytes Code Used by Lunar Magic for a routine to upload Layer 3 ExGFX files.
$0FFAB0 36 bytes Code Used by Lunar Magic for a routine to retrieve the ExGFX list for an overworld submap.
$0FFAF0 17 bytes Code Modified by Lunar Magic for a routine that checks whether the overworld needs to be reloaded when swapping players.
$0FFB20 523 bytes Code Used by Lunar Magic for a routine to upload submap ExGFX.
$0FFB9C 4 bytes Jump (JML/JSL) Modified by 32x32 Player Tilemap Patch, by ExE Boss and Ladida. Edit applied by the main patch.

JML, overwrites Lunar Magic code to skip uploading player graphics during overworld path transitions, preventing graphical bugs.
$0FFC94 4 bytes Jump (JML/JSL) Modified by 32x32 Player Tilemap Patch, by ExE Boss and Ladida. Edit applied by the main patch.

JML, overwrites Lunar Magic code to correct player palette mirrors prior to palette upload, preventing graphical bugs.
$0FFD80 332 bytes Code Modified by Lunar Magic.
Routine called from $0FF780 during level load to store some level-specific variables in the $7FC000 area and to upload some graphics data to VRAM.
$0FFFE0 1 byte Miscellaneous Not directly modified by Lunar Magic, but used as a byte containing a few different flags that let the editor know about changes in restrictions the editor should have. As the byte normally has a value of FF, the flags are reversed, with a bit being clear indicating its effect should be applied.

Format: -----TOS
T = If clear, indicates that text strings in the overworld editor should be able to be directly saved instead of saved as part of the overworld.
O = If clear, indicates the overworld has been overridden and the user should be warned when trying to save it.
S = If clear, indicates that the restriction in levels of a maximum of 128 sprites has been increased to 256 (see: $7E1938).

PIXI manages the S flag as part of its !Disable255SpritesPerLevel define.
  • Pages:
  • 1
  • 2
  • 3
  • 46
  • 47
  • 48
  • 49