Language…
15 users online:  Deeke, Dennsen86, eltiolavara9, Green, Hayashi Neru, Heitor Porfirio, Jolpengammler, LazyRuns, neidoodle, Pizzagamer9791, playagmes169, Serena, ShoopDaWhoop, SMWizard, YuriGamer - Guests: 257 - Bots: 312
Users: 64,795 (2,376 active)
Latest user: mathew

I need help with a patch...

The patch I'm working with is the Powerups Hijack Patch by ICB. I have almost absolutely no idea what I'm doing, so bare with me.

This is the code:

LDA $0491E0 ;I'm pretty sure that's where the amount of coins are stored, not completely sure
CLC
ADC #$25 ;Whenever I add something, it either goes to J9 or K7
STA $0DBF ;I don't know where it is storing it too.
BRA RETURN

I don't know what I'm doing wrong here, but I have a clue - I either have the wrong address(es), or I'm storing it to the wrong place.
I've already tried just making the coin count 25, and that worked, but I want to add 25 to the current total. The main thing I don't understand is the absolute address up there, or absolute addresses at all. Can someone tell me what's up with the code?
waiting for SMWC2 to come out since 1995

RAM Map is your friend!

I've no clue what's in $0491E0, but amount of coins are located at $0DB6, $0DB7, or $0DBF; look at the map and select what you'll need.

So, as I understand, what's happening here is that it takes a random number, adds 25 onto it, and saves to the coin meter?


It pretty much does that, yes. And it probably would've been a good idea to check those addresses out first. I got $0491E0 from a patch that sets the coin count.

Well, I used $0DBF for both loading and storing, and it worked! The thing I had trouble with was the absolute address. ASM seems a bit clearer now, thank you!
waiting for SMWC2 to come out since 1995
Tip:
Use LDA #$25 STA $13CC instead of LDA $0DBF CLC ADC #$25 STA $0DBF. It will prevent coin overload. (80 -> 17 instead of 80 -> B7.)
On top of that, the way the coins are added is fancier.
--------> Don't follow "Find Roy's Dignity", my hack. Because it's pretty outdated. <--------
Something I should have mentioned: I've got a coin wallet effect going, but the total would've went over 99, so I'm not sure if it matters. So would I JUST put LDA #$25 STA $13CC?
waiting for SMWC2 to come out since 1995
well, since 13CC is how many coins are to be added, and I believe it adds them all one at a time, rather than all at once, the wallet effect should still keep the coins from rolling over.
Oh. Cool. Thanks.
waiting for SMWC2 to come out since 1995