Talk:Expanded bag item documentation (Generation I)

From Glitch City Wiki
Revision as of 22:56, 20 January 2019 by >Sherkel (Created page with "Additional info and clarifications from Luckytyphlosion: map audio bank is the map audio bank the relevance is that whenever the game changes music using PlayDefaultMusic and...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Additional info and clarifications from Luckytyphlosion:

map audio bank is the map audio bank the relevance is that whenever the game changes music using PlayDefaultMusic and the map music audio bank is different than the current audio bank, then game will use that map music audio bank as the current audio bank most invalid audio banks in red/blue crash because the game uses the audio bank to determine the correct location to run the initializers for playing music/sound, and when updating in vblank but in yellow this is not the case because the main engine is only in bank 2 and the bank is hardcoded and independent of the audio bank although plenty still crash in yellow I know that $0f doesn't crash in yellow

also the banks wrap around at 0x40 because the MBC only supports 0x40 banks so $00-$3f however, the invalid banks have a different effect because even though they load the same bank the bank number is compared to in the vblank audio update routine and it defaults to bank $1f if it can't find bank $02 and bank $08 so you can call the bank 1f routine in banks 02 to 08 anyway

the only two uses I've had for this are: - in red/blue: bank 1d performs a rst $38 crash that doesn't execute ACE and because interrupts are disabled, it will consistently wipe SRAM if it's open. this is a way to get a consistent SRAM state for bank 0. also, this specific one is aligned in a way so that [$a7cc] = $0039 (required for FTL) - in yellow: bank 0f will not initialize audio, which means that the game will never need to wait for a sound to finish so therefore you can skip through forced sfx waits wMapMusicSoundID is I think the map music I suppose you could get any track to play > The currently loaded map. Changing this alone will not change the layout of the map, but it is possible to change the map's palette and script bank to the ones associated with the new value in D35E/D this way. A game freeze may be caused by changing this value if the bank of the map script is changed to point to a problematic address for the program counter to run. this is very verbose map pal offset is also incorrectly referred to as "brightness" because back then, 151 didn't really understand memory block coords are 0 or 1

 0 1

0 [][] 1 [][] a block is 2x2 you can manipulate these to values above 2 as a way to increase your coordinates without updating map collision although it uses whatever map collision you had at the time

tile block pointer, also known as TLP, points to the map "blocks" which are composed of 2x2 walking tiles and 4x4 gameboy tiles you can update this value to something arbitrary to create glitch cities manipulation of this is used in 151 for instaLG/formerly instaCT wLastMap is the main method used for warping basically because ???, game freak decided to have all indoor maps whose warps point to outside use a magic value of $ff, which means "use the last outside map value" it's mostly pointless because most maps only have one entrance to them and it's actually a hindrance for maps that have exits to other maps in different warps they actually have to hack the last map value in the map script but anyway, setting it to a value will allow you to warp to that map

Sherkel (talk) 16:56, 20 January 2019 (-06)