Language…
24 users online: anonimzwx, bMatSantos, DashGamer, Dennsen86, Domokun007, Gorry, GRIMMKIN, h.carrell, iRhyiku, Joaokk19990, Knight of Time, lo fang 123, Maniek, Maw, Metal-Yoshi94, Nayfal,  NopeContest, Serena, ShadowMistressYuko, Silver_Revolver, sinseiga, steelsburg,  Tahixham, Tulip Time Scholarship Games - Guests: 296 - Bots: 435
Users: 64,795 (2,374 active)
Latest user: mathew

ASM and hex editing

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??

allow shy guy emojis in post footers you cowards!
- 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!

allow shy guy emojis in post footers you cowards!