Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
1 user currently in Super Mario World hacking: |
Acmlm's Board - I2 Archive - Super Mario World hacking - SRAM Read/Write [ASM] | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
Smallhacker Green Birdo SMW Hacking Moderator Level: 68 Posts: 65/2273 EXP: 2647223 For next: 81577 Since: 03-15-04 From: Söderhamn, Sweden Since last post: 10 hours Last activity: 9 hours |
| ||
Can anyone tell me how to read from/write to the SRAM with ASM? Also, what parts of the SRAM are unused? |
|||
MathOnNapkins Math n' Hacks Level: 67 Posts: 10/2189 EXP: 2495887 For next: 96985 Since: 03-18-04 From: Base Tourian Since last post: 1 hour Last activity: 32 min. |
| ||
Can anyone tell me how to read from/write to the SRAM with ASM? You write to SRAM using bank $70. So for example, you wanted to write the hex value #57FF to $701000, you'd write: REP #20 LDA #57FF STA $701000 Or in hex: C2 20 A9 FF 57 8F 00 10 70 The other possibility is to change your data bank to $70 via PLB. Also, what parts of the SRAM are unused? How much SRAM there is to work with depends on how much came with the game cart itself. There is information in the cart that probably says how much of this battery back up memory there is. Typically SRAM can be 2, 4, or 8kilobits. (maybe Kilobytes, I can't remember) Some games in an emulator (Snes9x), such as Starfox, will claim to have a 64 kB SRAM file, when they obviously don't.) Finding unused space is trickier, because it requires you to be very careful. Sometimes space that looks empty may be used later in the game. So just be careful. Some games, particularly those by Nintendo, use repeated #60's as filler for unused space. Just open up a random save file from the game you're interested in and see if anything stands out as useless. Update: Now that I think about it, there may be a way to expand the SRAM size if you need more. Let me look into that in over the next few days. (edited by MathOnNapkins on 03-29-04 01:57 AM) |
|||
Smallhacker Green Birdo SMW Hacking Moderator Level: 68 Posts: 67/2273 EXP: 2647223 For next: 81577 Since: 03-15-04 From: Söderhamn, Sweden Since last post: 10 hours Last activity: 9 hours |
| ||
Woah! Thank you! | |||
w00t Newcomer Level: 3 Posts: 1/3 EXP: 126 For next: 2 Since: 03-19-04 From: Sunbury, OH Since last post: 557 days Last activity: 23 hours |
| ||
Originally posted by MathOnNapkins I thought it used #55 as a filler, but I could be wrong... |
|||
MathOnNapkins Math n' Hacks Level: 67 Posts: 13/2189 EXP: 2495887 For next: 96985 Since: 03-18-04 From: Base Tourian Since last post: 1 hour Last activity: 32 min. |
| ||
Originally posted by w00t That could be true for SMW, but I generally don't hack that game. (In spite of being on that board right now ) LTTP and Super Metroid I'm positive both use #60 as filler towards the ends of the file. |
|||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 214/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
SMW uses $55 in RAM, haven't looked at SRAM. (I thought that was just a hardware abnormality.) Course you could just beat everything on all 3 save slots (cheat ) and look, or trace the ASM. | |||
MathOnNapkins Math n' Hacks Level: 67 Posts: 19/2189 EXP: 2495887 For next: 96985 Since: 03-18-04 From: Base Tourian Since last post: 1 hour Last activity: 32 min. |
| ||
Or what you could do is use a hex editor to search for indexed and non indexed reads from SRAM. For instance, you could search for AF 00 00 70 or BF 00 00 70, which would be looking for LDA $700000 or LDA $700000, X. You could also change AF and BF to 8F and 9F, respectively for STA. Or use any other opcodes with those addressing modes, such as CMP, which would be CF or DF. This is of course not fool proof, but it might help in checking whether an address is filler or not. You'll need to study the ASM routines they fall in though to make sure. |
|||
BMF98567 BLACK HAS BUILT A SILLY DICE-MAZE! GO! Current list of BURNING FURY >8( recipients: - Yiffy Kitten (x2) - Xkeeper Level: 53 Posts: 79/1261 EXP: 1094149 For next: 62970 Since: 03-15-04 From: Blobaria Special Move: Rising Meatloaf Backhand Combo Since last post: 21 hours Last activity: 1 hour |
| ||
SMW's SRAM is 2KB in size, and the space from $70035A to $7007FF (the end of the file) is unused, filled with #$FF. |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Super Mario World hacking - SRAM Read/Write [ASM] | | | |