It is currently Wed Dec 13, 2017 7:41 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Jul 16, 2016 11:28 pm 
Offline

Joined: Sat Jul 16, 2016 9:50 pm
Posts: 2
Sorry if this is a noobish question or I'm posting in the wrong section, I'm kind of new to this.
I'm creating a hack of Super Mario Bros., and modifying Mario's graphics for a new character. However, I noticed that some of the tiles on Mario's standing sprite (specifically when he's big Mario) are mirrored versions of another tile (for example, the overalls/shoes tile), and the character that I want to replace Mario with doesn't have that type of symmetry. How would I be able to change a sprite's tile from one to another, as illustrated in the included image (and horizontally flip it in this case)?
As a note of interest, I use a SMB Rom builder. Will I need to modify the asm file, the chr file, or the Rom itself to change the tile?
Please try to describe this in the simplest possible method, as I think this might become a regular thing for me when it comes to graphics hacking.
Thanks for the help.


Attachments:
ex.png
ex.png [ 2.49 KiB | Viewed 716 times ]
Top
 Profile  
 
PostPosted: Sun Jul 17, 2016 12:11 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1868
Location: DIGDUG
I haven't tried it, but looking at the disasembly...
Quote:
DrawPlayer_Intermediate:

??
Or maybe

ChkForPlayerAttrib:

ora #%01000000


It looks like the 'ora #%01000000' line is responsible for the flipped tile. Replace with 'nop,nop' or with 'ora #0' would stop the flipping.

The metatile definitions for Mario are listed here...

Quote:
PlayerGraphicsTable:

...
Quote:
.db $00, $01, $4c, $4d, $4a, $4a, $4b, $4b ;big player standing


For example.

If I were you, I would do everything with your level editor first, and then try to locate these within the output ROM, and edit them as a last step.

Good luck.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Sun Jul 17, 2016 4:10 am 
Offline

Joined: Sat Jul 16, 2016 9:50 pm
Posts: 2
Thanks for that, it's working perfectly!


Top
 Profile  
 
PostPosted: Sun Jul 17, 2016 1:21 pm 
Online
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
Before I learned to program for the NES, I hacked SMB to make Sonic the main character. The methods I used were very crude: in addition to modifying the CHR, I just searched and replaced strings in the ROM. This worked fine for sprites and palettes, IIRC. I would simply search for the 8 tile indices that formed a sprite and replace that with new tile indices. If mirrored tiles were used, I would just flip them in the CHR so they'd look correct in the game! :lol:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group