Banner
Views: 236,252,562
Time: 2013-05-22 05:56:59 AM
14 users online: o 1UPdudes, Alcaro, Bombchu, Dominik, o Ersanio, Gloomy Star, HyperMario, mariodude345, MarioFan22, mchabez, scooter102089, Sokobansolver, o Tahixham, Usetheforce - Guests: 18 - Bots: 10Users: 22,858 (1,276 active)
Latest: FUNKY kong ending
Tip: Keep your graphics within a specific style. Don't mix cartoony sprites with detailed and realistic back/foregrounds!
Official Hex/ASM/Etc. Help Thread
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Official Hex/ASM/Etc. Help Thread
Pages: « 1 ... 284 285 286 287 288 ... 319 320 »
You can't convert, you can actally save a value stored in RAM to SRAM, like this:

Code
LDA $58 STA $700080


You'll load RAM $58 and save the value in SRAM $700080.

EDIT: LEVEL UP!
Last edited on 2012-01-16 07:52:23 PM by DiscoMan.
I'm guessing the next part is guessing what's used and what isn't.

Either way, thanks.
IIRC, you can use SRAM addresses from $700800 onwards. You'll have 131,072 bytes of free SRAM if you expand your ROM's SRAM size to 128kb (which can easily be done by changing PC [x81D8] to 07).

It may be worth noting that most if not all SRAM addresses are initialized to $55 by default, not 00.
Originally posted by Iceguy
IIRC, you can use SRAM addresses from $700800 onwards. You'll have 131,072 bytes of free SRAM if you expand your ROM's SRAM size to 128kb (which can easily be done by changing PC [x81D8] to 07).

It may be worth noting that most if not all SRAM addresses are initialized to $55 by default, not 00.


Well, you can use the SRAM for saving things by using a patch called SRAM Expand, you can choose which RAM will be saved and what's the size of the SRAM.

And by the way, RAM is initialized to $55 and SRAM is initialized to $60 not $55.
Last edited on 2012-01-16 10:31:08 PM by DiscoMan.
Except in the later versions of bsnes (I think 0.80 and newer, but it might be 0.82 or something), where regular RAM is initialized to random values...and I don't know what SRAM is initialized to, but it is presumably random as well.
Ok, so when I go to use the sRAM, I have it set the sRAM I'm using to whatever value I'm going to use as "locked" when the player starts a new save file, and then have it save that sRAM to the "unlocked" value whenever the player unlocks that item, right? Ok. I think I understand this a little better. Thanks guys.

EDIT: Different question. Didn't want to double post.

Is CODE_00F5D5: A5 19 LDA RAM_MarioPowerUp ; \ If Mario is small, kill him a good place to hijack for a HP patch?
Last edited on 2012-01-17 01:20:51 PM by sunwarrior25.
I'm trying to implement the Koopaling fixes described here (http://smwc.hostzi.com/SMWiki/wiki/Koopalings.html) via a hex editor (0xED on Mac).

I set 0x1DF6E to [84 CC A4] and 0x1DF73 to [B3 B3 B2]. I think so anyway, I don't see the "0x" part anywhere.

But for "Lemmy's palette can be changed from yellow to green. In the range of addresses 1D42E-1D49C, the lower digit of each byte that ends change in 5 must be changed to B, while leaving the higher one as it was. To make Wendy use a pink palette instead of the red one, in the range of addresses 1D4B8-1D526, each byte with a low digit of 9 must be replaced with F."... I'm not sure what a lower digit is. What I ended up doing was change all the 05 in that range (for Lemmy, for example) to 0B. Broke a few things when I tried to test it.

Can someone either guide me in the right direction, or be super nice and create a patch with these changes already implemented?

Thanks,
Is this right so far?

Code
;==================================================================== ; Basic Behavior Select ; A table of basic behaviors based on a freeRAM value ; Normal, Slingshot, Bunny Ears, Feather, Snorkel, Mirror ;==================================================================== PowerUpHPatch: LDX $19 CMP #$03 BCS BehavHPatch RTL BehavHPatch: LDX $19 DEX #$03 org $D2BD db SJumpHPatch,x org $D2BE db WJumpHPatch,x org $D2C5 db RJumpHPatch,x RTL ;TABLE FORMAT ;Normal, Slingshot, Bunneh, Feather, Shield, Snorkel, Mirror, NoItem SJumpHPatch: db $80,$80,$80,$80,$80,$80,$80,$80 ; This row is for maximum jump height while standing WJumpHPatch: db $80,$80,$80,$80,$80,$80,$80,$80 ; while walking. RJumpHPatch: db $80,$80,$80,$80,$80,$80,$80,$80 ; while running. FJumpHPatch: db $80,$80,$80,$80,$80,$80,$80,$80 ; while running really fast. AccLWHPatch: db $80,$80,$80,$80,$80,$80,$80,$80 ; Mario acceleration while walking left AccLRHPatch: db $80,$80,$80,$80,$80,$80,$80,$80 ; while running left. Added to walking left AccRWHPatch: db $80,$80,$80,$80,$80,$80,$80,$80 ; while walking right. AccRRHPatch: db $80,$80,$80,$80,$80,$80,$80,$80 ; while running right. added to walking right.
Yeah... there are countless errors there. First of all, there is not even an org $xxxxxx where your code will be placed, DEX #$03 does not exist, db is completely static (it won't change at run time), and doing org $xxxx like that won't work since it's static as well.
Last edited on 2012-01-20 07:37:34 PM by MarioEdit.
Originally posted by MarioEdit
Yeah... there are countless errors there. First of all, there is not even an org $xxxxxx where your code will be placed,
The org !freespace is further up in the file. I just decided not to include it in the quote.
Quote
DEX #$03 does not exist,
I should just DEX DEX DEX instead, right?
Quote
db is completely static (it won't change at run time), and doing org $xxxx like that won't work since it's static as well.

Wow, that is... haha. Good to know that won't work. Looks like I'm going to have to find some other way to change the player's behavior at runtime.
I'm pretty sure this has been asked numerous times, but how exactly do I draw tiles to the status bar? I was planning on using a loop to do it in comparison to freeRAM.
...
I was planning on doing it this way so I wouldn't have to use super huge tables or anything.

Have fun.
Where I can get button addresses? I can find them at all.
Check these addresses:

$7E:00151 byteI/OController data 1. Format: byetUDLR.
b = A or B; y = X or Y; e = select; t = Start; U = up; D = down; L = left, R = right.


$7E:00161 byteI/OController data 1, first frame only. Format: byetUDLR.
b = B only; y = X or Y; e = select; t = Start; U = up; D = down; L = left, R = right.


$7E:00171 byteI/OController data 2. Format: axlr----.
a = A; x = X; l = L; r = R, - = null/unused.


$7E:00181 byteI/OController data 2, first frame only. Format: axlr----.
a = A; x = X; l = L; r = R, - = null/unused.
I meant $ values of these.
Originally posted by Luigi370
I meant $ values of these.

It's basic binary, but here's the values:
Hello,
I have 2 noob questions...
1. how can I spawn (in a block) a "bounce block sprite" (at the position of the block)?
2. how can I spawn a "score sprite" (like the "1UP")?
I have found soe things in the ROM Map but that doesn't help me
I hope you can help me :)
1. Look Here., it's routine is ripped of SMB3 block.

2.
Code
LDA $D8 ;\ PHA ;/ LDA $98 ;\ STA $D8 ;/ LDA $E4 ;\ PHA ;/ LDA $9A ;\ STA $E4 ;/ LDA $14D4 ;\ PHA ;/ LDA $99 ;\ STA $14D4 ;/ LDA $14E0 ;\ PHA ; \ LDA $9B ; | Make 1-up sprite (the text) appear. STA $14E0 ; / LDA #$08 ;/ PHX ;\ LDX #$00 ;/ JSL $82ACE5 ;\ PLX ;/ PLA ;\ STA $14E0 ;/ PLA ;\ STA $14D4 ;/ PLA ;\ STA $E4 ;/ PLA ;\ STA $D8 ;/ RTL
Two questions:
-What would I have to do to get the game to save upon entering specific levels of my choosing (LevelASM?)
-Is there a way to notify the player of how much Yoshi Coins they have collected in a specific level?
Originally posted by shrine
-Is there a way to notify the player of how much Yoshi Coins they have collected in a specific level?

You could attempt to save the number to a location on the status bar. To do this, use this code:
Code
LDA $1420 STA $XXXX

Where $XXXX is the status bar address. Possible values are:
Pages: « 1 ... 284 285 286 287 288 ... 319 320 »
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Official Hex/ASM/Etc. Help Thread

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

Copyright © 2005 - 2013 - SMW Central
Legal Information - Link To Us


Total queries: 27

Menu