Language…
6 users online: Dan2point5, Ginnb0b, Lush_50, monkey03297, prisvag, sinseiga - Guests: 57 - Bots: 107
Users: 67,562 (2,002 active)
Latest user: Dilshacking

Switch Palace RAM Optimizer

SMW Patches → Switch Palace RAM Optimizer

Submission Details

Name: Switch Palace RAM Optimizer
Author: Sonikku
Added:
Tool: Asar
Requires Free Space: Yes
Bug Fix: No
Featured: No
Description: In short: This patch frees 3 bytes of RAM by rewriting parts of the code that load Switch Palace blocks and trigger them.

In long: SMW by default uses RAM $1F27-$1F2A to determine which of the four Switch Palaces are triggered. SMW sets each of these to $01 when the associated switch is pressed.
This patch rewrites the scenarios that these addresses are read from or written to, and instead sets the lowest 4 bits of solely $1F27. This leaves the 4 highest bits of $1F27 as well as the full 3 bytes of $1F28-$1F2A free.
Tags: exclamation block free ram lorom ram sa-1 switch palace
Comments: 3 (jump to comments)
Download 965 bytes | 77 downloads

Comments (3)

Burning Loaf Link
Moderated with:
* Asar 1.81
* Mesen 2.0
* Lunar Magic 3.40
* SA-1 Pack 1.40

Works properly. Friendly reminder to whoever is using this to change whatever resources you're using that affect the switch palace flags.
Added sa-1 and lorom tags.
HammerBrother Link
Typo in the asm file:
Code
;; In vanilla SMW, the game uses the range of $1F27-$1F2A to dictate which of the 4 Switch Palaces have been triggered.
;; It only sets these RAM addresses to x01 and is never written to again.
;; In this patch, it will read and write to the lowest 4 bytes of $1F27 (by default). This essentially leaves $1F28-$1F2A free,
;; though it's still read/written to during the load/save functions.


You mean bits.

Also, is the order of the switch palaces the same? Like is it formatted as %----RBYG on $1F27?
 Sonikku Author Link
For the casual SMW hacker, this patch will show no difference.
For ASM hackers, 3 extra bytes of RAM that are saved/loaded to SRAM might be useful.