SMB2J MMC3 hack always have 8 stars address line and value?

Started by satoshi_matrix, August 18, 2014, 03:50:00 pm

Previous topic - Next topic

satoshi_matrix

August 18, 2014, 03:50:00 pm Last Edit: August 18, 2014, 04:13:29 pm by satoshi_matrix
Hey, I'm wondering if someone here might be able to help with a small project I'm working on.

I am looking to make an NES reproduction cart of Super Mario Bros. 2J using loopy's TSROM MMC3 hack, but I want to take it one step beyond that by having access to worlds A-D without having to beat the game eight times first and also does not require a battery.

I came across a thread on NA where that this can be accomplished by altering address line CC20 to value 08.

I tried that, but it didn't work.

I tried alternatively looking for another way to do this and found a GameGenie code that does the same thing evidently:  

PANGTGAA

The problem is that although this GameGenie code does work, it doesn't give you any stars but forcably changes the starting location of world 1-1 to World A-1. If this were changed to always be active, it would mean a repro of SMB2J that is ONLY worlds A-D.

So I need to know what the address lines of the stars are so that data can be altered for the repro. so worlds A-D are accessible at the start if you hold A and press Start. and if not, you go to world 1-1 as normal.

Thanks in advance.

L___E___T

I don't know the line - but there is a utility on RHDB that can permanently patch game genie codes into a ROM so it's always there - would that help?

Post Merge: August 18, 2014, 04:15:42 pm

After going back and reading the post properly, I guess not.  Could a permanent SRAM be applied?
My for Sale / Trade thread
http://www.famicomworld.com/forum/index.php?topic=9423.msg133828#msg133828
大事なのは、オチに至るまでの積み重ねなのです。

satoshi_matrix

I just edited my post to make it a bit more clear:

PANGTGAA is just a starting point. It isn't what I'm after because it doesn't alter the number of stars (times you've cleared the game) at all, but instead forcably changes the start game location from World 1-1 to World A-1, which would mean that Worlds 1-9 are never accessible.

By changing the star locations, you can choose to start at world 1-1 and play the game as normal by pressing start at the titlescreen or you can hold A and then press Start to start on world A-1.

What I need to know is the hex address of where the counter for how many stars you have is and have that changed to 8 stars always.

permanent SRAM  would mean a battery, and I don't want have to add one since TS-ROM boards dont have that to begin with and I wantt o avoid batteries whenever possible.

80sFREAK

Battery is just for saves. Code itself might just need extra RAM. You can add SRAM chip to RAM-less MMC3 board quite easily. Use debugger to find out "address"
I don't buy, sell or trade at moment.
But my question is how hackers at that time were able to hack those games?(c)krzy

UglyJoe

I came up with some Game Genie codes for it a while back: http://www.famicomworld.com/forum/index.php?topic=1402.msg90715#msg90715 (read a few more posts after it, as I give more codes). 

I don't think any of them do exactly what you're looking to do.  I can probably make a GG code to do what you want, but I'll be busy the next few nights so you'll have to wait :-[

P

Quote from: L___E___T on August 18, 2014, 04:13:30 pm
Could a permanent SRAM be applied?

You can write code that writes the stars to the SRAM at boot instead of after beating the game.

SMB2j has been disassembled and commented. I took a quick look at the source (it's for asm6) and the only star I found was "blinky star".


$6000:

replaces64EB:
                JSR loc_0_6287 ;make room at 64eb for blinky stars stuff
                jmp $64ee



;$fa30: blinky stars
                ldx $6000
                beq abort

ldy #9
-               lda star_data-1,y
sta $300,y
dey
bne -

                txa
                cmp #13
                bcs line2  ;>=13

sty $305 ;clear 2nd strip
ora #$40
                sta $303 ;set #stars
                bne fini
line2:
                cmp #24
                bcs fini
                sbc #11
ora #$40
sta $307 ;set #stars
fini:
lda #0
jmp $65a1 ;sta $773 : inc $73c : rts
abort:          jmp $6613

star_data:
                .byte $20,$d0,$4c,$f1, $20,$f0,$4c,$f1, 0

Can't find star_data-1 anywhere...

80sFREAK

star_data-1 is actually  value "star_data" minus 1, right at the end of your quote
I don't buy, sell or trade at moment.
But my question is how hackers at that time were able to hack those games?(c)krzy

satoshi_matrix

I got in touch with loopy directly, and found the answer. Thanks anyway guys.

For the record, the address line is 0x4495 and the change is from 90 0A to EA EA.

For added flair, to add the eight stars to the titlescreen, two additional addresses need to be slightly altered:
0x10: change 00 to 08
0xfac6: change 04 to 00

Fully unlocked SMB2J repro with no need for battery sram.


by the way uglyjoe, is there a gamegenie code that starts you off at world 9? I'd like to play those levels every once in a while without having the clear the whole thing, and not just do it in one life if possible!

UglyJoe

Quote from: satoshi_matrix on August 19, 2014, 06:38:04 am
by the way uglyjoe, is there a gamegenie code that starts you off at world 9? I'd like to play those levels every once in a while without having the clear the whole thing, and not just do it in one life if possible!


I could probably make one.

L___E___T

Is there a chance to share the patch when it's created, is it something you'll submit to RHDB?  :bub:
My for Sale / Trade thread
http://www.famicomworld.com/forum/index.php?topic=9423.msg133828#msg133828
大事なのは、オチに至るまでの積み重ねなのです。

P

Glad you found out how.

Quote from: 80sFREAK on August 19, 2014, 02:26:31 am
star_data-1 is actually  value "star_data" minus 1, right at the end of your quote

Ah I see!

satoshi_matrix

Quote from: UglyJoe on August 19, 2014, 06:53:18 am
Quote from: satoshi_matrix on August 19, 2014, 06:38:04 am
by the way uglyjoe, is there a gamegenie code that starts you off at world 9? I'd like to play those levels every once in a while without having the clear the whole thing, and not just do it in one life if possible!


I could probably make one.


please do!


UglyJoe

Start on World 9: AENKAGAE

I'll usually do a google search on my codes once I've figured them out to see if anyone else had come up with the same code.  If you google this one, you get:

http://www.famicomworld.com/forum/index.php?topic=1402.msg86358#msg86358

Looks like I already figured this one out 3.5 years ago! :D

satoshi_matrix

Thanks! This is sweet.

Might be a good idea to put all your codes together and throw it up on google docs