Website
Home
Database
News
Submissions queue
Community
Forum
Clubs
Discord
Members
Tools
ROM Patcher
ROM Hasher
Pages
Support us
Learn Romhacking
About
Contact Us
Help & Legal Pages
Guest
Login
Forum
Entries
News
Settings
Community
Help Wanted & Support
Trying to crack this in my SMB3 hack
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Bavi_H" data-source="post: 6209" data-attributes="member: 607"><p>There are multiple versions of Super Mario Bros. 3. To make sure we're talking about the same version, please use this process to provide the hash info: Go to <u><a href="https://www.romhacking.net/hash/" target="_blank">romhacking.net/hash</a></u> and drag the original starting version of the Super Mario Bros. 3 NES file you are using into the "Load a ROM" spot. Once the results appear, click the copy button (the icon of two sheets of paper that is just to the right of the "Load a ROM" button) and paste the results in a message here.</p><p></p><p></p><p>Can you give any more info about how you came up with this change?</p><p></p><p>...</p><p></p><p>I looked at the <u><a href="https://github.com/captainsouthbird/smb3" target="_blank">captainsouthbird Disassembly of Super Mario Bros. 3</a></u> that is on GitHub. It is for the version "Super Mario Bros. 3 (USA) (Rev 1)". The download includes the nesasm assembler.</p><p></p><p>A "listing file" shows every line of the assembly code in one file, and each line starts with a bank number and CPU address and the hex bytes of the assembled code. I figured out the following process to make a listing file from this disassembly:</p><p></p><p><strong>1.</strong> At the top of the smb3.asm file, add the following line:</p><p style="margin-left: 20px"><code class="bbCodeInline"> .list</code></p> <p style="margin-left: 20px">(That's <em>space</em> <em>dot</em> <span style="font-family: 'Courier New'">list</span> )</p><p></p><p><strong>2.</strong> In a Command Prompt window, change to the folder where the files are located and enter the following command:</p><p style="margin-left: 20px"><code class="bbCodeInline">nesasm -m -l 2 smb3.asm</code></p> <p style="margin-left: 20px">This will generate a listing file called <span style="font-family: 'Courier New'">smb3.lst</span></p> <p style="margin-left: 20px">(The <code class="bbCodeInline">-m</code> option expands the macros. The code uses macros to create some shortcut fake instructions, BLT BGE BLS BGS ADD SUB NEG.</p> <p style="margin-left: 20px">The <code class="bbCodeInline">-l 2</code> option generates the listing with every byte shown for .byte statements.)</p><p></p><p>...</p><p></p><p>If you look in the smb3.asm file and search for <code class="bbCodeInline">.bank</code> you'll find the start of the statements that map each of the 32 PRG ROM banks to a CPU address window. You can use this information to convert between NES file offsets (or PRG ROM addresses) and the bank and CPU address format. I can explain more about how to do this kind of conversion if you want.</p><p></p><p>...</p><p></p><p>Status: So far, I've figured out some changes that causes the "2 PLAYER GAME" main menu item to start a one-player Luigi game and will get Luigi to start on the right square, but you still have to use Controller 2 to control Luigi. And I can see various other code that updates things for both players in a 2-player game that probably needs to be changed so it always updates things for Luigi in a 1-player Luigi game, but I haven't done a complete search and tested changing everything like that yet.</p><p></p><p>I want to write up my findings so far, but first I want to make sure we're talking about the same version, and discuss how you came up with your change.</p><p></p><p>Also, you mentioned the Super Mario Bros. 3 hack Bio World. Have you looked at it to try to see how it does it? Maybe we can see if it might be doing something simpler.</p></blockquote><p></p>
[QUOTE="Bavi_H, post: 6209, member: 607"] There are multiple versions of Super Mario Bros. 3. To make sure we're talking about the same version, please use this process to provide the hash info: Go to [u][url="https://www.romhacking.net/hash/"]romhacking.net/hash[/url][/u] and drag the original starting version of the Super Mario Bros. 3 NES file you are using into the "Load a ROM" spot. Once the results appear, click the copy button (the icon of two sheets of paper that is just to the right of the "Load a ROM" button) and paste the results in a message here. Can you give any more info about how you came up with this change? ... I looked at the [u][url="https://github.com/captainsouthbird/smb3"]captainsouthbird Disassembly of Super Mario Bros. 3[/url][/u] that is on GitHub. It is for the version "Super Mario Bros. 3 (USA) (Rev 1)". The download includes the nesasm assembler. A "listing file" shows every line of the assembly code in one file, and each line starts with a bank number and CPU address and the hex bytes of the assembled code. I figured out the following process to make a listing file from this disassembly: [b]1.[/b] At the top of the smb3.asm file, add the following line: [indent][icode] .list[/icode] (That's [i]space[/i] [i]dot[/i] [font="Courier New"]list[/font] )[/indent] [b]2.[/b] In a Command Prompt window, change to the folder where the files are located and enter the following command: [indent][icode]nesasm -m -l 2 smb3.asm[/icode] This will generate a listing file called [font="Courier New"]smb3.lst[/font] (The [icode]-m[/icode] option expands the macros. The code uses macros to create some shortcut fake instructions, BLT BGE BLS BGS ADD SUB NEG. The [icode]-l 2[/icode] option generates the listing with every byte shown for .byte statements.)[/indent] ... If you look in the smb3.asm file and search for [icode].bank[/icode] you'll find the start of the statements that map each of the 32 PRG ROM banks to a CPU address window. You can use this information to convert between NES file offsets (or PRG ROM addresses) and the bank and CPU address format. I can explain more about how to do this kind of conversion if you want. ... Status: So far, I've figured out some changes that causes the "2 PLAYER GAME" main menu item to start a one-player Luigi game and will get Luigi to start on the right square, but you still have to use Controller 2 to control Luigi. And I can see various other code that updates things for both players in a 2-player game that probably needs to be changed so it always updates things for Luigi in a 1-player Luigi game, but I haven't done a complete search and tested changing everything like that yet. I want to write up my findings so far, but first I want to make sure we're talking about the same version, and discuss how you came up with your change. Also, you mentioned the Super Mario Bros. 3 hack Bio World. Have you looked at it to try to see how it does it? Maybe we can see if it might be doing something simpler. [/QUOTE]
Insert quotes…
Verification
Post reply
Community
Help Wanted & Support
Trying to crack this in my SMB3 hack
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Back
Top