SMB1 + SMB2J SRAM Plus (FDS hack)

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

Post Reply
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

SMB1 + SMB2J SRAM Plus (FDS hack)

Post by ShaneM »

It's a hack of SMB2J that brings all the level designs and other various data over from SMB1. I hear all this hype from many other forums of people wanting to add SMB2J stuff to SMB1, such as Wind, Upside-Down Piranha Plants, more Worlds, etc. So I did something about it. I thought to myself: If the point of the hack is to make SMB1 like SMB2J, why not just hack SMB2J?

So that's what this is. SMB1 with all the features of SMB2J. The levels are the same, I've just incorporated SMB2J stuff in various places to add and show off its features. I've done all the work on this myself so that people can now rip their SMB1 levels and paste them to this without having to worry about the ASM work (assuming they don't know it). There are no Worlds A-D in this hack as I NOP'd the code that does a check to see how many stars are on the title screen. But it can easily be added back if anybody wanted to make an extended hack of this. World 9 is still intact. I'm planning to add levels from SMB Special to make up a World 9. The way warp data was called to see which warp would be next was hard-coded, so I did a quick ASM fix to it. It's pretty sloppy but gets the job done. ;)

This work took about 3 days. I already got all 8 Worlds working properly. I just need to finish up 9 and do one final test. The release date is scheduled to be in about a week.

Since this is a hack of my SMB2J SRAM patch, all the beta scenery is used, as well as all the other glitch fixes I made. See you soon. :D

I've left the title screen logo wide to allow all 24 stars to be recorded (note that I just temporarily changed 0xCC3C here to $18 to show all 24 stars. It's been reverted to $00 for final release.)
Image

Poison Mushrooms, green springs etc. can all be found in this game.

Image

Like I've said, beta scenery and cactus have been used from SMB2J

Image

Saving still occurs upon beating 8-4; high score is also saved to SRAM upon receiving a Game Over and choosing "Quit"

Image

Wind and flying Bloopers have been added to some stages.

Image

Certain levels like 1-3 and 5-3 no longer share data, so you are free to create new levels or scenery. On 5-3 I made it a windy snowy level. :) (Since World 5 is already a snow World.)

Image

Upside-down Piranhas have been added to various areas in appropriate places to give it an authentic "Nintendo" feel.

Image


In fact, I've made this so easy that all you'd have to do to create SMB1 hacks with SRAM and SMB2J features is merely rip your levels after editing with SMB utility and paste them. All loop data, demo data, etc have already been taken care of. (I took care of assembling the files and leaving over 400 free bytes for you to use, too. I've also gathered unused bytes that can be used so you never run out! Since SMB2J levels took so much more space.)
Last edited by ShaneM on Sat Aug 08, 2015 10:14 am, edited 4 times in total.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: SMB1 SRAM Plus (FDS hack)

Post by tepples »

Is this still FDS, or is it cart? If someone can make a cart patch for the SMB2J disassembly, this just might be the key to making the 21-world monster that I've been requesting on IRC.
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 SRAM Plus (FDS hack)

Post by ShaneM »

tepples wrote:Is this still FDS, or is it cart? If someone can make a cart patch for the SMB2J disassembly, this just might be the key to making the 21-world monster that I've been requesting on IRC.

This is FDS. I know that Shiru(?) made an MMC3 port of SMB2J. He released source code. That means that all my changes could supposedly be ported to his version. The problem is, it might not be that easy as I took a look at his source code and it is really different. It almost seems like a new game (in my opinion).

As far as emulation goes, this is virtually identical to the NES' Super Mario Bros. but with SRAM saving, tons of glitch fixes and SMB2J features. (I know the hacking community will appreciate this and will never have to "bump their feet in the dark" again.)

But as far as this goes, there are four banks in SMB2J (banks $00-$03). In bank $00, which is always-loaded, I have roughly 250 free bytes for level data; on bank $01 (Worlds 5-8), I have 29 rows of 16 $FF bytes, so...29*16+4= 468 free bytes. On bank $02 (World 9 and victory scene bank) I don't know yet as I'm going to start 9 World tomorrow. On bank $03, I have roughly 2000 (two thousand)free bytes for level data. My suggestion would be to use bank $03 when I release this and create an additional 9 Worlds using this bank (you'll need to hack certain checks in bank $00 to add more Worlds). That brings you to 18 worlds. There's a check that will not let any World go pass 9 (which is why A-D are counted as Worlds 1-3 and 8, respectively), but that would be super easy to work around if you know what you're doing.

@Everyone
When this is finished, I plan on adding SRAM to All Night Nippon SMB (ANNSMB). That was a promotional version of SMB2J given out by the Japanese Nippon radio station. ANNSMB did exactly what I do here: Make an SMB1 hack using SMB2J. The coding is almost identical so I'm just going to optimize code to make room and add it to that. I'll fix all the glitches in that version, too. Just a heads up. This SMB1 here will be ready in about a week. So hackers start making 12+ Worlds for your SMB1 hacks (SMB utility lets you choose how many Worlds you want for your hack and just port it to this. So... you can make a backup of your SMB1 NES ROM and create 8 Worlds, then use the other copy and create 4, 5, 6, 7, 8 etc.))
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 SRAM Plus (FDS hack)

Post by ShaneM »

Oh. Before I forget. I'm going to add the code I NOP'd to minus Worlds A-D. I'm sharing this now because I'm starting a new job soon and may forget to share this when I give the patch. This re-adds these Worlds if your hack calls for more than 9 Worlds, simply enter this code I got rid of by means of hex editing:

(I purposefully assembled with 17 NOPs here just in case someone has a hack with many Worlds. Add the code back where you see lines with 5 ";".)

Code: Select all

GameMenuRoutine:
              lda SavedJoypadBits         ;check to see if the player pressed start
              and #Start_Button
              beq ChkSelect               ;if not, branch to check other buttons
              lda #$00
              sta CompletedWorlds
              sta DiskIOTask
              sta HardWorldFlag
 ;;;;;             lda GamesBeatenCount        ;check to see if player has beaten
 ;;;;;             cmp #$08                    ;the game at least 8 times
 ;;;;;             bcc StG                     ;if not, start the game as usual at world 1
 ;;;;;             lda SavedJoypadBits
 ;;;;;             and #A_Button               ;check if the player pressed A + start
 ;;;;;             beq StG                     ;if not, start the game as usual at world 1
 ;;;;;             inc HardWorldFlag           ;otherwise start playing the letter worlds
StG:          jmp StartGame
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 SRAM Plus (FDS hack)

Post by ShaneM »

It's here! 100% glitch free and fully stable, with all the glitch fixes and beta features I made on SMB2J SRAM Plus. As an added bonus, I've included SMB2J SRAM Plus on Side B of this game disk! (See the emulation guide within the Nestopia folder for more info on switching Disk Sides within emulation.)

I know I talked about doing SMB Special levels for 9 World, but I did something even better. What I did was recreate the Minus World from both SMB versions (NES and FDS) to make a World! The NES Minus World has 1 level, while the FDS version has 3. So 3+1=4 or 1 World. This is better because the SMB2J 9 World is based off of this Fantasy glitch from the original game. So doing this is only fitting. Well, minus the glitches that came with the original Minus World. I even gave the NES version a total makeover of its Minus World! (https://www.youtube.com/watch?v=Dh-3PuJjFN4)

9-1 = NES version of Minus World
9-2 = FDS version of -2
9-3 = FDS version of -3
9-4 = FDS version of -1

(IPS patch of SMB1 with SRAM found at the bottom of this post.)

What's a purple beta cactus, clouds and trees doing under there?
Image

Image

A flying Blooper! I thought this was only found on 7-3! I wonder where else I might find these guys?

Image

Lava underground, just like SMB2J!

Image

A MUCH more difficult version of 7-3 (which is a harder version of 2-3).
Image

An underwater sea current.
Image

New invisible items have been added where there were only invisible coin blocks. Arigatou, ShaneM-chan!

Image


Beautiful clouds from up above have replaced the Mushrooms from SMB1 to give it a more real SMB2J feel.

Image

Image

Wait a minute...That's a decoy!

Image

Remember, my SMB2J is on Side B of this game!

Image

Image

I will add some hack notes for newbies. I made this game easy to hack. I finished it early because I was excited for this, myself. Heh. But anyways, here's SMB1 with all the glory of SMB2J. And I mean ALL.
Last edited by ShaneM on Sun Jan 25, 2015 10:01 pm, edited 1 time in total.
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 SRAM Plus (FDS hack)

Post by ShaneM »

Shoot. Sorry; I forgot to mention to patch it to an SMB2J ROM that's 65,000 bytes. Heh. :oops: :lol:
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 SRAM Plus (FDS hack)

Post by ShaneM »

I fixed a glitch caused by the fact that Upside-Down Piranhas on 6-1 were too high and Spinys were getting stuck in between the pipes. Apparently, there are two object identifiers for Upside-Down Piranha pipes in SMB2J, one taller pipe, and one shorter pipe (see the photo below of my special private edition of SMB Utility with SMB1 MMC3 with SMB2J objects; this is the tool I used to create SMB2J object data within SMB1 levels and dumped the data to my disassembly). What I did was just use the shorter pipes. I didn't even know that they existed since no valid SMB2J level even uses them. Anyway, glitch fixed and I'm 100% confident to say that everything is fully stable.

SMB2J original ROM (65,000 bytes) CRC16 = BA55
My hacked SMB game CRC16 = ADC8

Enjoy.


Look at the previously-used taller pipe how it collides with Lakitu. The shorter ones are now used.
Attachments
Up_Pipe.png
Last edited by ShaneM on Sun Jan 25, 2015 10:02 pm, edited 1 time in total.
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 SRAM Plus (FDS hack)

Post by ShaneM »

I was thinking of one last thing I could do to make this game even better. I found something. Let me say first that this is NOT a glitch fix, but a new feature, sort of. The original SMB1 is NROM. It only had 8000 bytes of ROM space, so 2-3 and 7-3 shared level/enemy data. The thing is, World 2 was a grassy world while 7 was a snowy one. So what I did was make 7-3 a day snow level. Also, since World 9-2 is based on a harder version of World -2 (FDS Minus World, which is a version of 7-3), I made it a night snow level. So now 2-3, 7-3 and 9-2 are all different! (I already did this with 5-3, which shared 1-3's data on the original NROM version.) Enjoy!


SMB2J original ROM (65,000 bytes) CRC16 = BA55
My hacked SMB game CRC16 = 658B
Last edited by ShaneM on Sun Nov 01, 2015 11:01 am, edited 1 time in total.
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 SRAM Plus (FDS hack)

Post by ShaneM »

This is not a glitch fix. Let me explain: When I was recreating all the SMB1 rooms in SMB2J, in the Worlds 5-8 data I was running out of room pointers, so I assigned an unused underground room as a castle one for the bonus cloud heaven of 6-2. Nothing is really noticeable from the usual apart from the grey being off color. So, I assigned it the unused room of $3A (unused in the original SMB2J, too) to fix this (cloud bonuses are really ground rooms). So this is now fixed.

SMB2J original ROM (65,000 bytes) CRC16 = BA55

Image
Last edited by ShaneM on Sun Jan 25, 2015 10:02 pm, edited 1 time in total.
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 + SMB2J SRAM Plus (FDS hack)

Post by ShaneM »

I've discovered another original SMB2J glitch. This fix pertains to Side B of this game or SMB2J. This has to do with castle looping on 3-4. Here is a video of this original glitch: https://www.youtube.com/watch?v=hv8Lhu4T9dY (Please note that I didn't make that video.) This glitch has to do with another lazy oversight by Nintendo and is not fixed in any of their remakes, either (not even SMB Deluxe, which actually introduces yet another glitch to 3-4).

When a castle would loop, they would do so on pages without enemies (not including Piranha Plants because those always appear with the pipe object) on both SMB1 and SMB2J. But they looped to the skip page 5 on 3-4 which introduced a Podoboo where it was never(?) intended to be. Loop data is set up to loop on only page skip pages and the data pointer goes by the skip page's header. So it is virtually impossible to fix this without changing the original level layout because there are only 2 page skips on this level and looping works hand-in-hand with this.

Enemies are buffered to VRAM as OAM; I have only 3 free bytes in the always-loaded bank where this fix would need to take place to clear enemies upon looping page that were skipped. So I fixed this glitch in a way Nintendo would: On the pages where the loop would repeat if the wrong path were taken, I've added a lava pit right under and a Podoboo that's ALWAYS loaded so this glitch is now non-extant. This is what Nintendo would do so it's what I did. (It really is a workaround to the issue at hand.) Level layout and everything is intact. I've also updated the game's manual to include SMB1. One last note: On 9-4 on Side B of SMB2J, it is not a glitch when the underwater current continues until the end of the level. This was done on purpose since it is not considered wind but rather a sea current, so terminators were not necessary (though I had room to add it if I wanted to). On SMB1 on Side A I made the sea current terminate on 9-4, though. So keep that in mind.

SMB2J original ROM (65,000 bytes) CRC16 = BA55
My hacked SMB game CRC16 = E472

Patch it to a clean ROM with the CRC16 listed above.

Either path that you take, it's now consistent.
Attachments
Super Mario Bros. 1 & 2 Plus (Japan)_002.png
Super Mario Bros. 1 & 2 Plus (Japan)_002.png (2.45 KiB) Viewed 40491 times
Super Mario Bros. 1 & 2 Plus (Japan)_001.png
Super Mario Bros. 1 & 2 Plus (Japan)_001.png (2.14 KiB) Viewed 40491 times
Last edited by ShaneM on Sun Jan 25, 2015 10:02 pm, edited 1 time in total.
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 + SMB2J SRAM Plus (FDS hack)

Post by ShaneM »

Okay. Well, because I'm so OCD, I had to figure a way to make this game even better. So I did. What I did was fix up the original stages that repeat to match the VS SMB counterparts. These include repeats of 5-3 (but I left the snow and wind in), 5-4, 6-4 and 3-4 (I did the last one because it is the same level, but more challenging). Here are maps of the VS SMB stages if anybody needs them for the repeat stages I fixed: http://themushroomkingdom.net/maps/vssmb

Also, in case no one realized this, I've made the maze of 4-4 to be like ANNSMB, as well as the lava pits of 7-4. The stages of 4-1 and 4-2 have also the Koopas added to them from the ANNSMB version. Here are maps in case you get stuck on 4-4: http://themushroomkingdom.net/maps/annsmb

So really, this SMB1 with SRAM and SMB2J features is the best because it incorporates the greatest strengths of VS SMB, ANNSMB and the original SMB1.

SMB2J on Side B of the disk has been left intact from the last glitch fix made yesterday. Enjoy. This is my final build unless something comes up.

SMB2J original ROM (65,000 bytes) CRC16 = BA55
My hacked SMB game CRC16 = F667

Patch it to a clean ROM with the CRC16 listed above.

EDIT: I didn't borrow any SMB2J stages for SMB1, what I did was use the VS SMB counterparts of the SMB1 stages. They are in different Worlds on VS SMB.
Attachments
Super Mario Bros. 1 & 2 Plus (Japan)_003.png
Super Mario Bros. 1 & 2 Plus (Japan)_003.png (3.38 KiB) Viewed 40446 times
Last edited by ShaneM on Sun Jan 25, 2015 10:03 pm, edited 1 time in total.
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 + SMB2J SRAM Plus (FDS hack)

Post by ShaneM »

I felt bad that the player was not really rewarded when beating the game 8 times since there is no Worlds A-D on Disk Side A (SMB1) of this. So I fixed that. I added some ASM code to create Hard Mode (https://www.youtube.com/watch?v=4RBZGYEjcxM) when beating the game 8 times. Similar to the original SMB1 and my Side B A-D of SMB2J. The flag at RAM 07FB is unused in this. Instead I did a workaround to code this. Here are parts of my code as I lost my .asm file due to a sloppy desktop and did this in a hex editor (heh :D )

Code: Select all

lda SecondaryHardMode        
bne $03
jmp initsechardmode
rts


initsechardmode:            
lda gamesbeatencount
cmp #$08
bcc $03 
inc SecondaryHardMode
rts 

lda:
lda gamesbeatencount
cmp #$08
bcc $03
lda #$01 
rts
lda $00
rts

ldy:
ldy gamesbeatencount
cpy #$08
bcc $03
ldy #$01 
rts
ldy $00
rts
Basically, all the places that checked whether $07FB was set were replaced with JSRs to these codes. I don't really remember all what else I did since I did this in a hex editor. The above notes were scrambled and made in a Word document. Basically, the above code replicates Hard Mode from SMB1. So, problem solved. Also, I fixed a glitch with Lakitu and primed up 8-3 a little. Side B SMB2J is left intact from 09/03/14's maze fix.

There should be zero issues with my fix, but you are free to report if you find anything. (Zero crashes, zero bugs when I just tested it.)
So now, when you beat the game 8 times, you ARE rewarded! :beer: :D

Hard Mode features:
-Buzzy Beetles replace Goombas
-Buzzy Beetle grouped enemies replace Goomba Grouped Enemies
-All enemies move faster
-Stunned (withdrawn) enemies recover faster
-small platforms replace big ones
-Hammer Bros. throw hammers faster
-Bullet Bills initiate faster
-Cheep-Cheeps fly faster
-Bloopers move faster

Note that I didn't create a World select option on the title screen (though I could; I'd need 18 free bytes always-loaded. I could simply write over A-D coding).

EDIT: Here it is. Fully tested and guaranteed. I also added a beta timer to 9-2. Enjoy.

SMB2J original ROM (65,000 bytes) CRC16 = BA55
My hacked SMB game CRC16 = 1100
Attachments
Super Mario Bros. 1 & 2 Plus (Japan) - Copy_003.png
Super Mario Bros. 1 & 2 Plus (Japan) - Copy_003.png (3.28 KiB) Viewed 40354 times
Super Mario Bros. 1 & 2 Plus (Japan) - Copy_002.png
Super Mario Bros. 1 & 2 Plus (Japan) - Copy_002.png (5.15 KiB) Viewed 40354 times
Last edited by ShaneM on Sun Jan 25, 2015 10:04 pm, edited 1 time in total.
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 + SMB2J SRAM Plus (FDS hack)

Post by ShaneM »

Okay. In case anyone is confused, you'd need to beat the game 8 times to access this new Hard Mode. Pressing A+Start on the title screen does nothing. To delete this Hard Mode at any time, delete your save file. If any hackers out there want to use my work as a base and add 18+ Worlds, you need to either PM me or request an earlier build as I wrote over World's A-D code in the main bank ($00), and adding Worlds with the code I NOP'd earlier will NOT work on this build (as I wrote over code). The game will crash if you try to add back A-D on this latest build. So request of me the earlier build if needed to make a hack with more Worlds than 9.

That does not change the stability of this build. It is 100% crash and glitch free. --ShaneM
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 + SMB2J SRAM Plus (FDS hack)

Post by ShaneM »

I fixed another Nintendo original glitch. This one I wasn't aware of as it was a hard glitch to initiate: https://www.youtube.com/watch?v=sZBSuwzMyEs

The fix was easy; it was made to both my SMB1 (Side A) and SMB2J (Side B):

Code: Select all

;In the files sm2data2 and sm2data4, in the routine "NoUDP:"

lda VerticalPipeData,y       ;original did this...lazy, stupid Nintendo

lda VerticalPipeData+4,y  ;this is my fix...yeah, pretty simple
SMB2J original ROM (65,000 bytes) CRC16 = BA55
My hacked SMB game CRC16 = 0AD4
Last edited by ShaneM on Sun Jan 25, 2015 10:04 pm, edited 1 time in total.
User avatar
ShaneM
Posts: 353
Joined: Wed Apr 04, 2012 4:15 pm
Location: United States of America (USA)
Contact:

Re: SMB1 + SMB2J SRAM Plus (FDS hack)

Post by ShaneM »

Okay. So I decided there was a little more that I could do on this. I've borrowed the Blooper collision detection glitch fix from the European NES version and adapted the code to both SMB1 and SMB2J on this (viewtopic.php?p=103894#p103894).

Code: Select all

;In "ChkNearPlayer:", I changed 

adc #$10 ;original code

;to

adc #$0C ;fixed code
Other changes:

*Fixed a glitch where Bullet Bills were being loaded at a max of 2 Bills at once rather than 3 for Hard Mode. I set a flag with the Y register to do a check, which fixes this issue. Hard Mode should now match the original SMB1's version entirely.

*Added 2 more Goombas to the beginning of 2-1

*Fixed a quirk with enemy data on 8-1.


SMB2J original ROM (65,000 bytes) CRC16 = BA55
My hacked SMB game CRC16 = 8D39
Last edited by ShaneM on Sun Jan 25, 2015 10:04 pm, edited 1 time in total.
Post Reply