Romhacking.net

Romhacking => ROM Hacking Discussion => Topic started by: ScottBeebiWan on July 24, 2016, 05:17:42 pm

Title: [plz halp] SMB1 Hacking - I broke the scoreboard... kinda?
Post by: ScottBeebiWan on July 24, 2016, 05:17:42 pm
Okay, so I changed the coin scoreboard sprite in YYCHR, and then this happened. 0.o
(http://img.ctrlv.in/img/16/07/24/5795328e3a8e5.png)
plz halp
Title: Re: [plz halp] SMB1 Hacking - I broke the scoreboard... kinda?
Post by: MathUser2929 on July 24, 2016, 05:51:36 pm
Try copy pasting the coin sprite from a fresh rom. Then never change it again.
Title: Re: [plz halp] SMB1 Hacking - I broke the scoreboard... kinda?
Post by: ScottBeebiWan on July 24, 2016, 06:04:12 pm
Try copy pasting the coin sprite from a fresh rom. Then never change it again.
why tho
I've done this successfully before
Title: ###
Post by: FCandChill on July 24, 2016, 06:09:39 pm
Comment removed because reasons...
Title: Re: [plz halp] SMB1 Hacking - I broke the scoreboard... kinda?
Post by: Dr. Floppy on July 24, 2016, 06:12:07 pm
Sprite-Zero shit detection.

You need to alter the half-coin sprite (Sprite #FF) to match the bottom three lines of your new HUD-display background coin tile #2E.
Title: ###
Post by: FCandChill on July 24, 2016, 06:23:22 pm
Comment removed because reasons...
Title: Re: [plz halp] SMB1 Hacking - I broke the scoreboard... kinda?
Post by: Disch on July 24, 2016, 06:28:11 pm
Hm ... that's really interesting. I'm reading about it on NesDev (http://wiki.nesdev.com/w/index.php/PPU_OAM#Sprite_zero_hits). Is there any specific reason why this occurs?

Splitting the screen to have a stationary status bar with a scrolling main display requires a timed write to occur in the middle of frame rendering.

Neither SMB's cartridge nor the NES itself offers an IRQ which will cut in when the appropriate time occurs, so the game uses sprite 0 hit to mark it.

If you change the sprite, and not the matching BG tile (or vice versa), it changes when the "hit" occurs, and thus screws up the timing of when the game splits the screen.
Title: Re: [plz halp] SMB1 Hacking - I broke the scoreboard... kinda?
Post by: MathUser2929 on July 24, 2016, 06:46:35 pm
I think there's a few sprites in SMB you can't edit or it can mess things up. I remember having problems when I edited a few sprites.
Title: Re: [plz halp] SMB1 Hacking - I broke the scoreboard... kinda?
Post by: Disch on July 24, 2016, 06:51:46 pm
I think there's a few sprites in SMB you can't edit or it can mess things up. I remember having problems when I edited a few sprites.

There's a "sprite" half-coin and matching "bg" full coin that is drawn over it.

Aside from those, the only graphics that you can't change are the scrambled tiles -- and it's because those are not actually graphics but data used to construct the title screen.