Banner
Views: 943,580,037
Time:
6 users online: CarlitosGaming, Gulaschko, Jigsaw69, MORC, Runic_Rain, Souldbminer - Guests: 73 - Bots: 80 Users: 52,468 (1,990 active)
Latest: Jigsaw69
Tip: Be cautious putting Sprite 9B (Amazing Flying Hammer Brother) above lava. After being "killed", it will still throw hammers until it sinks or goes off-screen.
Not logged in.
Perfect saving help
Forum Index - SMW Hacking - SMW Hacking Help - Perfect saving help
Pages: « 1 2 3 4 » Link
Is there a way to start with the powerups and lives I got during my last save when trying to continue the game?

--------------------
Yo, it's been a while.
Look into Sram plus that will allow you to save at least lives and maybe powerup status
Originally posted by Ninja Boy
Look into Sram plus that will allow you to save at least lives and maybe powerup status


Hmmm..., Sounds complicated, I think that I need more info about SRAM.

--------------------
Yo, it's been a while.
It's actually simple: SRAM Plus allows you to set in the first table the area to back up (start of RAM address, amount of bytes) with a certain initial value (second table).
Do I need to dig into the asm file, or just apply it directly (Hey, it's been a long time.)?

--------------------
Yo, it's been a while.


You will need to edit the sram_table.asm file a bit. The text at the top of the file describes exactly how to do so, but basically: add the RAM address (and number of bytes) to the sram_table table, and then the default values on new file creation to the sram_defaults table.

The game also has its own code reseting lives/powerups on file load, though, so you'll have to disable that as well. You can do that with this patch:

Code
org $009E21 : BRA +	; disable reseting lives
org $009E2F : +

org $009E35 : NOP #2	; disable clearing powerups


Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Do I need to do the same thing with the bw-ram ?

--------------------
Yo, it's been a while.


If your ROM is SA-1, use BWRAM Plus. Else, use SRAM Plus. Otherwise the two patches are basically the same.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Wait, here's the table:
Code
sram_table:	dl $7E1EA2 : dw $008D
.end

What shoud I insert these codes:
Code
org $009E21 : BRA +	; disable reseting lives
org $009E2F : +

org $009E35 : NOP #2	; disable clearing powerups


--------------------
Yo, it's been a while.
Originally posted by MegaSonic1999
Wait, here's the table:
Code
sram_table:	dl $7E1EA2 : dw $008D
.end

What shoud I insert these codes:
Code
org $009E21 : BRA +	; disable reseting lives
org $009E2F : +

org $009E35 : NOP #2	; disable clearing powerups

Do I need to add these codes in the sram table or just in the asm file?

--------------------
Yo, it's been a while.


The ASM code I gave you should go in its own ASM file as a separate patch. You should also add the RAM you wanted to save to the sram_table, which would be 1 byte at $7E0019 for the powerup and two bytes at $7E0DB4 for the lives.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
And how do I disable clearing coin count and Yoshi coin count?

--------------------
Yo, it's been a while.


In that case, update that previous patch I gave you to this:

Code
org $009E21 : BRA +	; disable reseting lives and coins
org $009E32 : +
org $009E35 : NOP #2	; disable clearing powerup

org $009E3F : BRA +	; same but for multiplayer coins/powerups
org $009E45 : +

(see $009E21 in all.log if you want to actually see what the code here is doing)

You'll then want to add all of the following addresses to your SRAM:
- 1 byte at $7E0019 for current player's powerup
- 1 byte at $7E0DBF for current player's coin count
- 6 bytes at $7E0DB4 for both players' lives, coin counts, and powerups
- 12 bytes at $7E1F2F to save the Yoshi coin flags

Note that the vanilla Yoshi coin system only tracks flags for if you've collected all 5 coins within a particular level, not the individual coins themselves. If you want to track individual coins, you'll also need to apply either this patch, this patch, or this patch. All three include instructions for adding their data to the SRAM/BWRAM Plus patch.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Originally posted by Thomas
You'll then want to add all of the following addresses to your SRAM:
- 1 byte at $7E0019 for current player's powerup
- 1 byte at $7E0DBF for current player's coin count
- 6 bytes at $7E0DB4 for both players' lives, coin counts, and powerups
- 12 bytes at $7E1F2F to save the Yoshi coin flags

Those are for the dl, but what do I need to place in the dw?
Like here, for example:
Code
sram_table:	dl $7E1EA2 : dw $008D
.end


--------------------
Yo, it's been a while.


You could always read the instructions, it'll generally answer your questions:

Originally posted by the top of bwram_tables.asm
;; 2) Go to bw_ram_table and add the BW-RAM address AND the amount of
;; bytes to save:
;;
;; dl $400DB4 : dw $000A

The second value is the number of bytes, in hexadecimal.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
So all I have to do is to write the number of bytes in front of adresses like this:
Code
sram_table:	dl $7E1EA2 : dw $008D
                dl $7E0019 : dw $0001
                dl $7E0DBF : dw $0001
                dl $7E0DB4 : dw $0006
                dl $7E1F2F : dw $0012
.end

Without removing the first address of course.

--------------------
Yo, it's been a while.
The addresses aren't entirely correct. $7Exxxx is only correct if you don't use SA-1. On the other hand, SA-1 Pack remaps $7E0000-$7E00FF to $003000-$0030FF and $7E0100-$7E1FFF to $400100-$401FFF. This typically doesn't appear for you because the bank is typically ommitted but if you have to enter the full address (such as for BW-RAM Plus), you have to also get the bank correct.
That's why Thomas chose $400DB4 and not $7E0DB4 as an example.

I also noticed you used sram_table. BW-RAM Plus uses bw_ram_table.

The table should look like this:
Code
bw_ram_table:	dl $003019 : dw $0001
                dl $400DBF : dw $0001
                dl $400DB4 : dw $0006
                dl $401F2F : dw $0012
.end
Actually, yes, I'm using sram. So I need to proceed as I mentioned previously?

--------------------
Yo, it's been a while.
You mentioned you use SA-1 so no, you don't! In fact, you can't even use SRAM Plus if you use SA-1! SA-1 replaces SRAM with BW-RAM which makes SRAM Plus incompatible with SA-1 Pack (the truth is more complicated but I don't want you to confuse you any more).
The table which you posted is otherwise correct, though.

Another thing to keep in mind: Initialisation. SRAM/BW-RAM Plus allows you to initialise the bytes. In total, you have to add 28 zeroes at the end of the file, else the game starts with the wrong values.
No, I'm not using sa-1. I wanted to transfer my work to an sa-1 rom, but it crashes. So I'm just using a normal rom. And I said I'm using sram in the previous reply, you must have confused it with sa-1.

--------------------
Yo, it's been a while.
Pages: « 1 2 3 4 » Link
Forum Index - SMW Hacking - SMW Hacking Help - Perfect saving help

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

Copyright © 2005 - 2021 - 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
  • sm64romhacks