Banner
Views: 779,491,462
Time:
11 users online: Bensalot, Daizo Dee Von, FailSandwich,  FPzero, Hooded Edge, Matthewsmwhacking, Pitchin Luigi, Powblock532,  tcdw, TheMorganah, Zandro - Guests: 27 - Bots: 199 Users: 40,859 (1,673 active)
Latest: crabb
Tip: After changing, moving, adding or deleting a level from the overworld, use only EMPTY save files. 0s often contain the old version.Not logged in.
ASM and hex editing
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - ASM and hex editing
Pages: « 1 »
I need to extend the save game routine to include a few bytes normally unused in SMW. I read the ROM map and found that the save game routine is located at 0D1C9 (ROM offset) though it is JSL'd through $009BC9. Now what I'm thinking is that I do the following:

1. I insert my extension to the routine at $158000 (freespace slogger gave me) with an assembler like Asar.
2. I use a hex editor to copy the first 4 bytes at 0D1C9 to the end of my extension at $158000 (before the RTS).
3. I overwrite the first 4 bytes at 0D1C9 with 22 00 08 51 (JSL $158000 in small endian (I think)).

There are two things I am wondering about this:
Is the freespace slogger gave me ($158000) the ROM offset or the SNES offset? Also would the save game routine include my extension (like I'm assuming it would) or can ASM only be stored to specific banks??

We’re looking for level designers to work on Extra Mario World!
- Check the first couple of lines of the Slogger output. One of them says roughly "IMPORTANT: XXX is what you should enter in xkas".
- ASM can be placed anywhere, though it's a bit more annoying in banks 40-7D and C0-FF. $158000 is bank 15, so it's safe.
- 22 is JSL, but 00 08 51 is not the correct conversion of $158000. The bytes should be swapped, but not changed. The correct conversion is 00 80 15.
- You can't use RTS with JSL. You need RTL.
- You can't blindly copy four bytes; you could end up copying half an opcode, and that'll just blow up. You need to look up the relevant area in all.log (or something similar).

- You are on the wrong track entirely. Don't insert ASM with a hex editor; look up a tutorial on hijacking, it's far easier.

--------------------
<blm> zsnes users are the flatearthers of emulation
Wow. I didn't think I was that much off track. Thanks for helping me out. Smwcentral is awesome!

We’re looking for level designers to work on Extra Mario World!
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - ASM and hex editing

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2019 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 7

Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented