Page 1 of 1
Help with hacking Super Mario Bros.
Posted: Tue May 03, 2016 9:21 am
by SMBRAR
Hey,
so I have 2 objectives in hacking Super Mario Bros.
1st. Is it possible to use 1 sprite for every enemy sprite? If so, what would be the most efficient way?
2nd. How would I go about altering the castles and end victory text?
I just got yy-chr, although I imagine I need to be looking at the disassembly?
Thanks for any advice, it is appreciated.
Re: Help with hacking Super Mario Bros.
Posted: Tue May 03, 2016 9:37 am
by tepples
Most enemy sprites in Super Mario Bros. are 6 sprites each, some of which use the blank tile $FC.
Re: Help with hacking Super Mario Bros.
Posted: Tue May 03, 2016 10:00 am
by dougeff
1. It's not clear what you are asking. Do you want to change the graphics for enemies? Do you want to change which tiles are associated with each enemy type?
2. You can change text by editing the disassembly, and reassembling.
Or, you could create a .tbl file, which will allow you to see the text in certain hex editors (and edit it). FCEUX's hex editor, for example. A .tbl file is a text file, with text like this...
00=A
01=B
(Left number in hex).
Heres SMBs values...
http://datacrystal.romhacking.net/wiki/ ... _Bros.:TBL
The offset (location) of the text appears to be the 2 lines at the bottom of this list. Omit them from your .TBL file.
Re: Help with hacking Super Mario Bros.
Posted: Tue May 03, 2016 10:44 am
by SMBRAR
Sorry, I want to reuse an enemy graphic for every enemy.
Thanks, I think I got the text sorted now. I really appreciate the guidance.
EDIT: So if I edit the enemy graphic table and replace every enemy with the 1 chosen and compile, that will do it? That is way easier than I ever dreamt if so.
I was curious if the ratio of the original enemy graphic would transpose to the replacement. As well as enemy graphic orientation. A hammer brother is vertically oriented, if a bullet bill was replaced with a hammer brother would it come out rotated facing horizontally? If a hammer brother was replaced with toad, would toad throw hammers?
Re: Help with hacking Super Mario Bros.
Posted: Tue May 03, 2016 12:21 pm
by dougeff
Most of what you said would fit in the category "if SMB were programmed today on a modern PC".
I wish.
NES can not scale nor rotate sprites. SNES has some limited ability to do these things.
Also, Bullet Bill is not a sprite, he is a BG element. But his bullets are sprites. Oh, Bill IS the bullet. Nevermind.
Yes, you can replace Hammer Brothers with Toad, I think they are about the same size. I'm not entirely sure that Toad will have the right colors. Each level type has a unique palette set, and Toad only appears in castles, so you may have to edit palettes as well.
Re: Help with hacking Super Mario Bros.
Posted: Tue May 03, 2016 1:01 pm
by dougeff
In the disassembly...enemy objects (tile lists) are marked as...
EnemyGraphicsTable:
Note: Toad is not on this list...he is special. His tiles are $cd, $ce, $cf, just the left side of him. Sprites can be flipped horizontally, or vertically. The engine in not expecting to flip regular enemies tiles (except for turning around), so if you want to use him, you might have to create a flipped version in YY-CHR.
------------------------------------------------------
Area palettes are marked like this...
WaterPaletteData:
GroundPaletteData:
UndergroundPaletteData:
etc.
-------------------------------------------------
Out of curiousity, do you know how to reassemble the smbdis file? Like with a modern assembler, like asm6 or nesasm? A lot of people new to this usually don't know how to do that.
Re: Help with hacking Super Mario Bros.
Posted: Tue May 03, 2016 1:10 pm
by tepples
dougeff wrote:NES can not scale nor rotate sprites. SNES has some limited ability to do these things.
The Super NES can't scale or sprites any more than the NES can. It has mode 7 to do that with backgrounds, but anything sprite related has to be done
in software, be it by the CPU or by the GSU.
Yes, you can replace Hammer Brothers with Toad, I think they are about the same size. I'm not entirely sure that Toad will have the right colors.
Given that hackers have confused the Hammer Bros. Suit item graphic in
Super Mario Bros. 3 with some sort of "Toad Suit", it just might be possible to coax the colors into working.