Banner
Views: 844,249,535
Time:
35 users online:  Aja, Amine Retro,  Anorakun, Blizzard Buffalo, brickblock369,  BTD6_maker, chickaDEE Magazine,  Deeke,  Falconpunch, Fermín Acosta Jr., FYRE150, Green Jerry, ideka13, Infinity,  JamesD28, KiloMinimo, Knight of Time,  Maarfy, Mario is the best,  MarioFanGamer, Mogu94, muztvarxiv, Nint, Nirv, owensidewalk, Ralshi02, SAMYR DUTRA ARAUJO, Sgra, SiameseTwins, Sir_Danny_TM, Sonck's entertainment,  Stivi, Synergic, tjb0607, ZachJamesGames - Guests: 74 - Bots: 68 Users: 46,407 (2,770 active)
Latest: Sgra
Tip: Do you want to make fancy HDMA but don't know ASM? Worry no more, because with Effect Tool, fancy HDMA effects can easily be created.Not logged in.
Saving Yoshi Coins & Lives/Coin Counter and Saving anytime
Forum Index - SMW Hacking - SMW Hacking Help - Saving Yoshi Coins & Lives/Coin Counter and Saving anytime
Pages: « 1 »
Hey people,

I am looking to update the SNES version of SMW, adding patches to it that:

- Show in OW HUD whenever you got all Yoshi Coins in a level
- Allows you to save anytime, or after beating a level
- Saves the Yoshi Coins (so they don't reset whenever you restart the game)
- Saves the amount of Lives you got

I came across some patches, but most don't do exactly what I set out to find, or they are buggy/outdated. I might just not be looking at the right place, I thought. So that's why I decided to ask here. These changes are pretty much all incorporated in the GBA version of SMW, but it all just looks and feels sleeker on SNES, wouldn't you agree? #smrpg{mlem}

I'm pretty sure such patches must be around here anyway, so could anyone help me out and list some options for me? Thanks in advance!

- Thirteen1355
This is more help than discussion, so I'm moving this to the help forum.
Alright, so this is a mouthful!

Originally posted by Thirteen 1355
- Show in OW HUD whenever you got all Yoshi Coins in a level

You can use this patch and turn off everything but the yoshi coin flag. However, since you're inspired by SMA2, you might prefer the SMA2 status screen patch.

Quote
- Allows you to save anytime, or after beating a level

We have the autosave patch, but I'm not a big fan of that one because it requires you to move around to save. I prefer (and personally use) this patch, it is a great alternative if you're willing to sacrifice pressing Start to look around in the main map.
Hopefully we'll get an improved version of autosave soon, though.

Quote
- Saves the Yoshi Coins (so they don't reset whenever you restart the game)
- Saves the amount of Lives you got

This one is the least obvious.
To make RAM addresses (in-game running values) save to SRAM (i.e. get saved to your file), you'll need SRAM Plus. The RAM map will tell you which addresses hold player lives, dragon coins, etc. Namely (you can generally contract the 7E at the beginning of the addresses):

$0DB4 (2 bytes) save Mario's and Luigi's lives in a 2-player game, respectively
$0DBE (1 byte) saves the player's lives in a 1-player game
$1F2F (12 bytes) is a table that holds whether all dragon coins have been collected in each level, one level per bit

You'll want to set up these addresses in the SRAM patch to get the effects you want. I'm not so sure if this will work for lives right away - I think the game sets your lives to 5 automatically once you load a file regardless of what's saved to SRAM. If this doesn't work, a quick patch to remove said functionality should sort it out.

Also, for the sake of reasonability, I recommend using the dragon coin save patch to at least make dragon coins collected not be lost once you hit a midpoint (or save each individually). Note that there's a newer version currently being moderated, which you can probably safely use the instead (I've been using it and encountered no problems).

Make sure to ask if you have trouble with any of these!

--------------------
Legião Urbana - A Tempestade (1996)
Ahh, I was wondering if this was more hacking help or hack discussion. I assumed hack discussion since it concerned already existing patches, rather than me actually working on my own hack.

A while back, I came to understand using asar (wasn't hard to get), but besides that, using these methods to patch stuff is completely new to me. For example, I remember trying to patch the sma2status one, but simply because it included more than one .asm file, I completely lost direction on what was supposed to be done, with all those exgfx files and stuff (I remember using exgfx years ago, but that was in Lunar Magic, which works very differently). This is why I ended up going with the owcount.asm back then.

I also wonder how I'd set up the mentioned values (for lives and Dragon Coins) within the SRAM+ patch file. I'm unfamiliar with this format (is this the infamous asm?).

Besides, thanks for linking the files! I got some of those, but I hadn't managed to find the start=save prompt one.
Originally posted by Thirteen 1355
I also wonder how I'd set up the mentioned values (for lives and Dragon Coins) within the SRAM+ patch file. I'm unfamiliar with this format (is this the infamous asm?).

ASM is a programming language (actually a type of programming language), something what you don't need for SRAM Plus. Instead, you just need to define in sram_table.asm which RAM address needs to be saved and how many bytes.
The first table, sram_table, contains those information while the second table, sram_defaults, are the initial values (should be $00 for the dragon coins, however many lives you have at the start). The latter is a common mistake to forget as you'd otherwise start with levels whose dragon coins have already been collected and a random amount of lives.
The format is straightforeward and is clearily described in the ASM file.

Keep in mind that you have to patch the following hex edit as SMW overwrites the lives when you start from a file:
Code
org $009E21
BRA $09


Originally posted by Thirteen 1355
Besides, thanks for linking the files! I got some of those, but I hadn't managed to find the start=save prompt one.

https://www.smwcentral.net/?p=section&a=details&id=19462. A link from Koopster's post.

--------------------
Okay, my layout looks ugly.
By the way, you may already know this, but just to make sure I'll mention it anyway - you can open .asm files with a text editor such as Notepad. Patches that require setup generally have a lot of explanatory commentary within the file.

Similarly, to patch the lives hex edit MFG mentioned, just paste the contents in his code box into a text editor and save a file with the .asm format. You just made yourself an ASM patch!

--------------------
Legião Urbana - A Tempestade (1996)
Okay, yeah, I first had to figure out how the SRAM+ patch works in the first place. The table.asm is a supplement, didn't know that. I noticed that the table file already includes dl $7E0DB4 : dw $000A. Not that it does anything. Do I have to write that into the file myself for it to work, or am I supposed to do something entirely else? Some instructions sure would've been nice #tb{^V^} The readme doesn't even really explain (in normal language) what it's for.

Anyway, I'm figuring it out and it isn't difficult. I'll tell when it's all done, or when I'm having more difficulties.

How does the default table work? How do you define those values in there, for lives, coins etc.

For the sram_table I now got this:
sram_table: dl $7E1EA2 : dw $008D
dl $7E0DB4 : dw $0002
dl $7E0DBE : dw $0001
dl $7E1F2F : dw $000C

and now I have:
sram_table: dl $7E1EA2 : dw $008D
dl $7E0DB4 : dw $000A
dl $7E0DBE : dw $0001
dl $7E1F2F : dw $000C

because I realised the A covers more than just Mario and Luigi's 2 player lives.
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - Saving Yoshi Coins & Lives/Coin Counter and Saving anytime

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

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


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy