(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-19-24 03:17 PM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - SMw OW loading code or OW location in ROM
  
User name:
Password:
Reply:
 
Options: - -
Quik-Attach:
Preview for more options

Max size 1.00 MB, types: png, gif, jpg, txt, zip, rar, tar, gz, 7z, ace, mp3, ogg, mid, ips, bz2, lzh, psd

UserPost
Sukasa
Posts: 526/2068
Perhaps I should rephrase this: Does anyone know where in SMW the Layer 2 data for the overworld is kept? I know that gets reloaded every time you enter the OW, as I can use savestates, move to a level and back, and have the OW change.
Sukasa
Posts: 230/2068
Well, mr problem there is that I'm using custom blocks to run mario around, so that's a problem.
HyperHacker
Posts: 326/5072
I don't think that'd be a problem. Each frame would go something like this:
1) Custom code runs, checks disable flag. Skip to step 3 if it's set.
2) Code does some stuff and sets disable flag.
3) Block code runs, clears disable flag.

Since block 25 is empty space, you'd almost always be touching it, and any other blocks you might be touching exclusively (such as water) can just be modified to clear the flag as well. When you die/exit, the block code won't execute, but the rest will, so it'll stay disabled.
Sukasa
Posts: 178/2068
Well, I only want the disable code to run when you're on the OW screen, since in a level, you might have spots where you want on custom block's settings to remain active for a while, so I can't put a disable routine into the main level oop, unfortunately.
HyperHacker
Posts: 296/5072
Here's a thought... your disable code runs every frame, right? Add a flag in memory somewhere that disables the code (so that the controller functions normally), and have the code set that flag when it finishes executing. Then add custom block code for block #25, and any other block you can walk through, to clear the flag. When you leave the level, you won't be touching any block, so the code should disable itself.
Kailieann
Posts: 150/808
As I understand it, the OW is only loaded to RAM once, at the beginning of the game. That's why you have to dump your SRAM and save states every time you make any changes.

It would be more efficient to look for an overall level exit routine and place the hack there, or simply find a 'Player is in a level' RAM address and change the controller override code so it only works when the address has a 'this is a level and not the overworld' value.

Personally, for the (very short) hack I'm working on, I plan on using 'loading levels' to clean up my custom code in case of something like that, but I can see how that wouldn't help you if the controls were still scrambled on the OW.

However, I have to admit it would be nice to find out more about where in the RAM the OW is stored. If a person were creative enough, they might be able to use that information to edit the OW on the fly.
I'm assuming it's somewhere between $1F49 and $1FD5, since those are the only addresses saved to SRAM when you start a new game.
Sukasa
Posts: 173/2068
Yeah, as the title suggests, I'm looking for info on where the ASM that loads the OW is located, or if anyone knows where in the ROM the OW data is stored.

The reason for this is:

a) I need to insert a disable ASM into the loading code, so that is a player dies while any special code had my controller override (which I've just deugged ad finished) going, this little hack will disable the override and any controller effects in place.
b) I wanted your attention, so I made a new thread
c) I wanted to fluff my thread count

Any help?
Acmlm's Board - I3 Archive - ROM Hacking - SMw OW loading code or OW location in ROM


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.003 seconds; used 350.80 kB (max 389.70 kB)