| |||
Views: 88,481,111 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 04-25-24 09:38 AM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 4 guests |
Main - ROM Hacking - General SMB3 Hacking Thread | New thread | New reply |
ShaneM |
| ||
Snifit Compromised account. Please contact an admin to restore access. Level: 36 Posts: 270/285 EXP: 293435 Next: 14675 Since: 02-17-14 Last post: 3136 days Last view: 2652 days |
Posted by Insectduel Ah. Looks promising. Keep up the good work. ____________________ At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day? |
Quick Curly |
| |||
Giant Red Paratroopa Level: 77 Posts: 1148/1443 EXP: 4171974 Next: 19155 Since: 06-15-08 From: Earth Last post: 20 days Last view: 20 days |
I discovered the following quirk with the SMB3 pipe system back in March 2015 while trying to finish up Quick Bros. 2, and now that the project is completed and released at long last, I wanted to share my findings here.
Underground Pipe Death Oversight In SMB3, pipes on the map screen can move you back and forth between different locations. Each pipe set has an entrance and exit for a left pipe and a right pipe on the map. In the actual underground area once you enter a pipe, there are 2 pipes that you can enter - a left pipe and a right pipe. How the game determines which pipe location you appear at on the map is determined by which half of the screen you're on when you enter a pipe. Consider the screen split in half. As seen in the first 4 images, there is a left pipe and a right pipe for the pipe set that we are working with (#1). Mario enters the left pipe in the set (#2), and in the underground area, enters the right upward pipe, which is located on the right half of the screen (#3), to appear at the right pipe in the set on the map (#4). However, the way this system works is also the cause of a potential, unintentional oversight. Even though it doesn't appear to have any harmful effect on the game as a whole, it can catch one off guard, and cause momentary confusion. Now, remember that when the player dies in a level, Mario or Luigi will fly across the map screen, starting from the location of the level they entered, and return to the last level they completed, the last Hammer Brother they defeated, or the last pipe they had exited from. In the next 4 screens, Mario enters the left pipe in the set (#5), is standing on the left half of the screen in the underground area (#6), and dies by letting the time run out (#7). As a result, Mario flies from the left pipe because it was the last level that he entered before dying, and since it was the last pipe that he exited, he also returns there (#8). However, in the scenario illustrated by the last 3 images, Mario has still entered the underground area using the left pipe in the set, but is now standing on the right half of the screen instead of the left half (#9), when he dies from running out of time (#10). As a result, even though the last level he entered was from the left pipe in the set on the map, Mario starts flying from the right pipe in the set instead! The game considered that Mario was on the right half of the screen in the underground area, and because the sprite that changes the exiting map location allows for 2 different potential exits, the game was using the right exit as the starting point, though it wrongfully thought that Mario had just entered the right pipe, while it was just a case of him standing on the right side of the screen when he died! This oversight, while not truly game-breaking, but logic-breaking to some degree, might not have been discovered and fixed due to the unlikely possibility that the player would actually die in an underground area of a pipe set; or, if it was actually known, it probably wasn't changed because it really wasn't that big of a deal, and the system that allows for 2 exits works despite this, and didn't need to be fixed otherwise. Could this be worth noting as an official/established SMB3 bug/glitch? While nothing funky truly goes on, like nothing is manipulated or anything, such an oversight couldn't have been intentional, in my opinion. It's only an assumption that it was considered not worth fixing, if it was even known. Nonetheless, it's just simply something that I found from a combination of pipe level enemies and accidental deaths. For all I know, other wild SMB3 hackers have made the same unexpected discovery, but as much as I searched after finding it, I couldn't find it reported or documented anywhere. In an attempt to further revive this thread, I might work on a new tutorial or two to cover a couple ASM hacks that I did for the main hacks in my recently released Quick Bros. 2 Hack Pack. In the meantime, I'll copy over a little tutorial I did covering how to implement an infinite lives hack for SMB3, and provide a bit of insight into how to find RAM addresses for the functions that one could be looking for, specifically directed towards newer hackers who could use some helpful additional direction. Infinite Lives ASM Hack First, here is a handy link for 6502 Opcodes. I would recommend saving this page as an offline HTML file for easy access. Much like any information that you find online that is helpful and handy, you never know when it might randomly disappear. 6502.org: Tutorials and Aids If the RAM address isn't known, then you have to find it first by trial and error methods. However, thanks to the SMB3 RAM Map on Data Crystal, we can discover that the RAM address for Mario's lives is $0736, and the RAM address for Luigi's lives is $0737. In the case that we didn't, however, we could find those addresses by clicking in the Tools menu and selecting Cheats. Click Reset, and the values in RAM are displayed. Since Mario and Luigi start with 04 lives, try a Known Value of 04. The possibilities are reduced and narrowed down. Next, play through the game, lose a life, and then open the Cheats window again. The values on the left side are the original values of 04 from before, and the values on the right side are the updated/changed values. Only one value decreased to 03 - $0736 - and in most cases, we can conclude that it's the correct RAM address that we're looking for. In some cases, further testing to confirm this might be necessary. You would have to repeat the process for Luigi to find where his lives are stored. However, some games store common variables closely together in RAM, so you can sometimes find one and make an educated guess as to where the second player's lives are, like in this case for SMB3. So, for testing purposes, we'll need a 2-player game to make sure that the infinite lives work for both players. Set write breakpoints to the RAM addresses for both players' lives. In this case, set write breakpoints to both $0736 and $0737. Play through the game as Mario and lose a life. The debugger freezes at $9123, or 0x3D133 in the ROM:
See the X in "DEC $0736,X"? That means that, depending on what the value of the X register is, an address following $0736 has the potential to be decreased too, i.e. $0737, Luigi's lives. By clicking Run, the debugger doesn't freeze again. Only one write to $0736. Play through the game as Luigi and lose a life. The debugger freezes at $9123 again.
X is 01 this time. So, this one line of code - these 3 bytes - decrease the lives counters for both players whenever they lose lives. Remember the NOP Opcode that the tutorial from earlier referred to? It's EA. Basically, it does nothing. So, go to 0x3D133 in the ROM, and replace "DE 36 07" with "EA EA EA". With the write breakpoints still active, click Run and play through the game with this change implemented. The debugger won't freeze again because the code that wrote to it is gone now, and the lives counters can't decrease, meaning that Mario and Luigi have infinite lives! Now, the lives counters can still potentially increase by collecting 1-UPs, collecting coins, collecting 3 cards at the ends of levels, playing the spade games, etc. unless you decide to find all of the cases of code that will increase these counters and NOP them out too, but regardless of that, they can never reach 0! Hopefully this helps somewhat in getting a little more insight to Assembly, Opcodes, and the debugger and other tools of the FCEUX/FCEUXD emulator(s) series. And remember - you can do it! In addition, before I finish up with this post, I'd like to bring attention to an ASM hack that the awesome RetroRain came up with back in May 2008, simply referred to as "Suicidal Mario", which makes use of the Select button while playing levels in the game. RetroRain's "Suicidal Mario" ASM Hack I do not take any form of credit for his code or anything of the sort. I am simply bringing it to the attention of any future readers of this pinned SMB3 hacking thread so that more people can discover and learn from it, as I've always come back to his "Suicidal Mario" topic over the years, and I personally feel that his ASM hack is under-appreciated, especially considering that the thread is long buried now, making it much more difficult for newcomers who weren't around back when it was originally posted to find out about it.
That's all for now! Thank you for reading! |
Quick Curly |
| ||||||||
Giant Red Paratroopa Level: 77 Posts: 1152/1443 EXP: 4171974 Next: 19155 Since: 06-15-08 From: Earth Last post: 20 days Last view: 20 days |
Inventory Bar Worldly Palette ASM Hack
Here are the offsets for the palette changes that the game loads when the player opens the inventory, flips through the pages in the inventory, and then closes the inventory:
Here is the original code in the SMB3 ROM, located at 0x34139 ($A129 in RAM) and 0x34532 ($A522 in RAM) in the ROM file:
Add this at 0x35530 in the ROM:
Essentially, we're creating two new tables of data, each 9 bytes in length, with each byte representing 1 of the 9 worlds. The table with the "3C" bytes will represent the outside colour of the status bar when it's closed. The table with the "36" bytes will represent the inside colour of the status bar when it's opened. Since the colour is the same in the status bar when inside it, and while switching item slots inside it, there was only need for one table to load from for both cases. However, the code can be adjusted to account for a third table if you really want the colours to be different when you first open it and when you're switching item slots, although that might not be as visually pleasing as one might hope with the thought of the idea. The custom code for handling the colour tables directly follows them, and the code is displayed following the adjusted code which directs to this free space in ROM. Compared to the original code seen above, here is the modified code which jumps to the custom code following the new data tables:
This is the adjusted/custom code, located at 0x35542 in the ROM where we added it as seen above, which checks for the current world, and then loads from the tables that we created to obtain a unique colour to store in the palette:
I realize that this isn't much of a tutorial, but hopefully providing the code is enough direction to successfully implement this. If anything else can be further explained, please let me know, and I'll see what I can do. 3 Matching Cards Black Palette ASM Hack This is not really the best potential workaround for this, but it works well enough for me. You remember how collecting 3 matching End Cards draws a large Mushroom, Flower, or Star in the sky, depending on the cards that you matched? Well, if the second slot in the second quarter of the objects palette is anything other than #$0F black, the background colour of the animated circular tiles used to draw the large Mushroom, Flower, or Star will be that colour, which conflicts with the rest of the black background. Basically, I found a point in the original code that happens at the point of detecting 3 matching End Cards, and added code to replace the second slot in the second quarter of the objects palette with black, whether or not it already is. Here is the original code in the game, at 0x5F92 in ROM, which checks to see if all 3 End Cards match:
So, at $BF93 in RAM, or 0x5FA3 in the ROM, I inserted a jump to $FF2A in RAM, or 0x3FF3A in the ROM, to set the palette slot to black.
This code is added at 0x3FF3A in the ROM:
Now, the effect of this, visible if the colour is anything other than black when the black is set, takes effect as soon as the third matching End Card is grabbed, so the colour change is seen in the ground before the sequence finishes up in the sky. When I implemented this for my newer hacks, I didn't bother to look any further to see if there was a way to account for the time it takes to lift the screen up away from the ground to the sky before applying the black colour change, or if there was a better insertion point to apply the black colour change after the screen had already been lifted up. However, the possibility of such an adjustment to this code is something to consider. Nonetheless, it's worth just posting about the idea and providing an example that does work, minor details ignored. |
Termingamer2-JD |
| ||
Ropa Banned: repeat sockpuppeting Level: 53 Posts: 110/739 EXP: 1133684 Next: 23435 Since: 08-06-15 From: England Last post: 2674 days Last view: 680 days |
Since I might start doing level design for smb3:
What's the best SMB3 Hacking Tool you can find? I mean for level design of course. ____________________ Jamie Dignam |
MiniCompute |
| ||
Bubble Level: 66 Posts: 760/981 EXP: 2421256 Next: 40595 Since: 04-25-07 Last post: 488 days Last view: 697 days |
Posted by Termingamer2-JD http://datacrystal.romhacking.net/wiki/Super_Mario_Bros._3 |
Termingamer2-JD |
| ||
Ropa Banned: repeat sockpuppeting Level: 53 Posts: 111/739 EXP: 1133684 Next: 23435 Since: 08-06-15 From: England Last post: 2674 days Last view: 680 days |
Posted by Mike-TechPosted by Termingamer2-JD I was hoping you wouldn't refer me again, but tell me exactly what level editor. ____________________ Jamie Dignam |
MiniCompute |
| ||
Bubble Level: 66 Posts: 762/981 EXP: 2421256 Next: 40595 Since: 04-25-07 Last post: 488 days Last view: 697 days |
Posted by Termingamer2-JD I already did if you are unable to read what is in the hyperlink why bother asking for help at all ? Make sure to click the link and read the whole page carefully you can't miss it. |
Termingamer2-JD |
| ||
Ropa Banned: repeat sockpuppeting Level: 53 Posts: 112/739 EXP: 1133684 Next: 23435 Since: 08-06-15 From: England Last post: 2674 days Last view: 680 days |
All you replied was a hyperlink. I read it, as is clear by me saying 'WHICH level editor?'.
There were a few there, obviously one is going to be better than the others, isn't that right? I needed your opinion and the board's opinion. Stop going around here if you just seem to moan about things all the bloody time. ____________________ Jamie Dignam |
Googie |
| ||
Giant Red Paratroopa Level: 77 Posts: 1126/1407 EXP: 4180746 Next: 10383 Since: 02-19-07 From: Brooklyn, NY Last post: 8 days Last view: 8 days |
Posted by Termingamer2-JD Use SMB3 Workshop, that's the best one for level designing... ____________________ My Linktree |
MiniCompute |
| ||
Bubble Level: 66 Posts: 763/981 EXP: 2421256 Next: 40595 Since: 04-25-07 Last post: 488 days Last view: 697 days |
Posted by Termingamer2-JD If you would stop going off the deep end for a minute or hour and click on that link. :/ You would have realized the level editor you needed was in it and that is what I've used. It even had the necessary info for beginner smb hackers like you. If you don't like this answer, contact ninja blooper and have him review the link and these posts. :| |
Termingamer2-JD |
| ||
Ropa Banned: repeat sockpuppeting Level: 53 Posts: 113/739 EXP: 1133684 Next: 23435 Since: 08-06-15 From: England Last post: 2674 days Last view: 680 days |
I can trust the bloody link, can't I? Mike-Tech, you need to realise that I prefer to know what this community thinks and to see it on the site.
Why would I need to contact ninjablooper just because I don't agree with a post? That's stupid, indeed. @Googie thanks. I'll download that later, try to figure it out and perhaps make a custom level. At least you said something instead of just referring me off the board. ____________________ Jamie Dignam |
MiniCompute |
| ||
Bubble Level: 66 Posts: 766/981 EXP: 2421256 Next: 40595 Since: 04-25-07 Last post: 488 days Last view: 697 days |
Posted by Termingamer2-JD For a 13 year old named jamie who won't read sure you can bro. Like I mentioned the level editor was in there smb3 workshop. Now please stop, it won't be long before your back in school on september 3rd. |
gridatttack |
| ||
Red Cheep-cheep Level: 32 Posts: 190/202 EXP: 203757 Next: 2685 Since: 07-11-10 Last post: 1427 days Last view: 253 days |
Quick Curly |
| ||
Giant Red Paratroopa Level: 77 Posts: 1220/1443 EXP: 4171974 Next: 19155 Since: 06-15-08 From: Earth Last post: 20 days Last view: 20 days |
Set the next area in the level header and the pointer properties as you would for any other pipe and door. For the exit action, select "7 - ?". |
Termingamer2-JD |
| ||
Ropa Banned: repeat sockpuppeting Level: 53 Posts: 228/739 EXP: 1133684 Next: 23435 Since: 08-06-15 From: England Last post: 2674 days Last view: 680 days |
I'm not contributing anything by posting this but Googie uploaded v1.6 of the SMB3 text editor, which no one else seems to have:
http://acmlm.kafuka.org/uploader/get.php?id=4943 ____________________ Jamie Dignam |
Mari42 |
| ||
Red Paragoomba Level: 17 Posts: 1/54 EXP: 21930 Next: 2813 Since: 12-15-15 Last post: 2186 days Last view: 1636 days |
Hey, I was doing an idea of making the SMB3 tileset for "Anchor Away" such as the "ground" for the tank/ship graphics. This is what I was doing as you can see the image below. But, the issue is the status bar palette is what im concern about changing for the plain tileset to be orange which is difficult, because it sticks to light blue for the ground tileset. So, the tileset was replaced by the black tiles which I've change the black palette to plain tileset which you see this image of what I was doing.
This tileset is where it was replaced for black palette for each Ship/Tank levels. So, x22D8 and x22D9 is where it was found when I looked at Name Table Viewer through FCEUX. The hex for the PPU Offset was "FC" is where it was placed for set as I viewed the in Hex editor. So, the way it needs to be fix is "FE" where the black tiles (that I may put that there through yy-chr) can fit into that graphical set for the Big cannon, and the BG for Koopa Boss Room. The issue is that when I reset, the PPU doesn't change the way how it suppose to be as I saved in Rom file. How does that work? Is it worth of ASM that is regard to what it has to be to change the PPU numbers in hex editor? |
Quick Curly |
| ||
Giant Red Paratroopa Level: 77 Posts: 1337/1443 EXP: 4171974 Next: 19155 Since: 06-15-08 From: Earth Last post: 20 days Last view: 20 days |
Greetings, Mari42. It's awesome that you're working on an SMB3 hack!
It seems that you were trying to modify the PPU Memory directly. However, changes to the NES Memory and PPU Memory aren't permanent. What you want to modify is the ROM file itself. The beginning of each Object Set ROM bank has tile definitions to determine which graphics are used to draw out the objects. The Ship Object Set ROM bank is from 0x2E010-0x3000F (0x2000 bytes in hex). The tile definitions for Ship levels are at the beginning of the ROM bank. 0x2E010-0x2E10F (0x100) - Top-left corner tiles 0x2E110-0x2E20F (0x100) - Bottom-left corner tiles 0x2E210-0x2E30F (0x100) - Top-right corner tiles 0x2E310-0x2E40F (0x100) - Bottom-right corner tiles Let's look at the tile values that are used for the big pipes that you've been trying to change.
In the ROM file, these are the values that are used to display the pipe object.
So, by modifying these values, the changes that you want to make will be permanent. Best of luck! |
Mari42 |
| ||
Red Paragoomba Level: 17 Posts: 2/54 EXP: 21930 Next: 2813 Since: 12-15-15 Last post: 2186 days Last view: 1636 days |
Posted by Quick Curly Never mind. Finally fixed. Thanks Quickqurly. |
Mari42 |
| ||
Red Paragoomba Level: 17 Posts: 3/54 EXP: 21930 Next: 2813 Since: 12-15-15 Last post: 2186 days Last view: 1636 days |
My New Progress:
Changes a few with the palettes and my name. :\ New Level 1-1 New Level 1-1 bonus Level 3 into water level! Level 1-4 into desert level. (Short Level, really) With a boomerang on the way. LOL. XD New ending for level 1-4 Thats all for now. I'll post more when I get a chance to put more custom levels for each world. ;D Not sure what my hack will be named yet, but I'll think about it sooner. |
Termingamer2-JD |
| ||
Ropa Banned: repeat sockpuppeting Level: 53 Posts: 359/739 EXP: 1133684 Next: 23435 Since: 08-06-15 From: England Last post: 2674 days Last view: 680 days |
I'm just wondering, why does the screen flicker like mad in this game? ____________________ Jamie Dignam |
Main - ROM Hacking - General SMB3 Hacking Thread | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 138, rows: 177/182, time: 0.027 seconds. |