Language…
21 users online:  Ahrion,  Atari2.0, autisticsceptile1993, codfish1002,  Deeke, Dennsen86, eltiolavara9, Green, Heitor Porfirio, koffe190, LazyRuns, LucasRCD, Mischievous Marc, neidoodle, NewPointless, Pizzagamer9791, RicardoDeMelo,  Ringo, Serena, sinseiga, YuriGamer - Guests: 270 - Bots: 290
Users: 64,795 (2,376 active)
Latest user: mathew

Stop coins overflowing 99

It is essential for my hack that I get anything that will help keep my coins at 99 even if another coin is obtained.

e.g. 98 + 1 coin to 99
99 + 1 coin stays at 99

I don't want the 3 coin counter or the 6 coin counter as they cause problems.

Thanks.
Try this:

header
lorom

!FreeSpace = $1F8000


ORG $00A2E2
JSL MAIN ;Point to new routine



ORG !FreeSpace

db "STAR" ;\
dw MainEnd-MainStart ; | Write RATS tag #1 to protect main code
dw MainEnd-MainStart^#$FFFF ;/

MainStart:
MAIN:
PHA ;\
PHY ; |
PHX ; | Preserve 'everything'
PHB ;/

LDA $0DBF
CMP #99
BNE Return
LDA #99
STA $0DBF

Return:
PLB ;\
PLX ; | Recover 'everything'
PLY ; |
PLA ;/
JSL $01808C ; Recover old code from hijacked routine. Don't touch this.
RTL
MainEnd:


Save it as an .asm file and patch it with xkas. I haven't tried it though, so you should better make a backup.


 
Thanks :)
Hex edits to the rescue!

01137 $00:8F37 1 byte ASM Number of coins to subtract from the counter when you gain enough for a 1-up (Default: $64 (100). Change to [01] to create a coin wallet effect - use with x112F.

0112F $00:8F2F 3 bytes ASM [EE E4 18] Change to [EA EA EA] to not gain a life after collecting enough for one.

EDIT - I guess you could also do what WYE did..
Thanks again

- Oddly WYE's didn't work
-I don't really get what you said IceGuy, But I think I'll take another look :)

EDIT: Ignore the part about me not getting it...
I understand now :)

YES! It works! Thanks IceGuy. you too WYE.