News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Odd Palette After Using SMB1 'NES Title Editer'  (Read 1965 times)

noapparentfunction

  • Newbie
  • *
  • Posts: 3
  • high density
    • View Profile
Odd Palette After Using SMB1 'NES Title Editer'
« on: March 01, 2016, 08:59:51 pm »
Good evening guys,

I'm a newcomer to this forum after attempting to create a Super Mario Bros. hack for an art show. The sprites, levels, and text I can handle as I've done some of this before. If this belongs in the Newcomer's forum please accept my apologies & let it be moved there. I wasn't sure.

But I've never done a title screen hack.

I searched and found this thread from November '15: http://www.romhacking.net/forum/index.php?topic=20726.0

This was very helpful and I understand how Hex works but I'm a little lost with finding where to input the correct hex assignments. I can't seem to find the success that the OP did in his thread. Here's the rundown:

What I designed in the 'editer' which I know is kind of a hamfisted way to do it:
 

What I'm hoping it will look like near the end of the project:


What I ended up with  :-\


Screenshot of Hex as per FCEUX:


Copy/paste of said values:

Code: [Select]
2085014420865448209A014920A5C94620A60AD0D1D8D8DED1D0DADED120B04A2620BAC94A20C60AD2D3DBDBDBD9DBDCDBDF20D04A2620E60AD4D5D4D9DBE2D4DADBE020F04A2621060AD6D7D6D7E126D6DDE1E121104A26212615DEDAD0DADED1DED1DBDB26DED1DBDBD0D12626264A2146C4DB214714DD42DDDB4242DBDBDB26DB42DBDBDB422626264A216744DB216B10DF42DFD4DB26DBDFDBDBDBDB2626264A218714DDDBDDDBDBE0DB97DB26DBE3DBDBDBDB2626264A21A71426D4DADBDBDBDBDED926DBDBD4D9DBDBE726264A21C5165F957897DD959595959598789595979895959578787A21ED0ECF01090805241712171D0E170D18224B0D012419150A220E1B24100A160E228B0D022419150A220E1B24100A160E22EC041D18192822F6010000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Anyway, I most certainly screwed up somewhere. I tried implementing a fix in the linked thread, changing some values at address $A000A or something like that, but nothing seemed to change. I know all of you are experts at this sort of thing and I could be taught a lesson or two.

Thanks in advance to anyone who could lend a hand.  8)

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 970
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: Odd Palette After Using SMB1 'NES Title Editer'
« Reply #1 on: March 04, 2016, 05:04:33 pm »
At $9FF5 (where the second #00 currently is), enter:

23 C9 46 55
23 D1 46 55
23 D9 46 55
23 E2 04 99 AA AA AA
23 EA 04 99 AA AA AA
00

You should have just enough space in-ROM. (Hopefully, it won't overload the RAM loading dock.)

noapparentfunction

  • Newbie
  • *
  • Posts: 3
  • high density
    • View Profile
Re: Odd Palette After Using SMB1 'NES Title Editer'
« Reply #2 on: March 04, 2016, 07:17:23 pm »
Thanks a lot for sharing your expertise, I'll be trying this later.

While I did get a rudimentary version to work once I figured out how to use that Excel-based application, allow me to pick your brain a little bit more. This is from a memory standpoint: If all I'm doing is rearranging pre-existing tiles to make a different title screen, what is happening in the game that would make it run out of memory? Why would it overload this RAM loading dock? Please forgive my ignorance  :)

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 970
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: Odd Palette After Using SMB1 'NES Title Editer'
« Reply #3 on: March 05, 2016, 12:06:40 am »
Thanks a lot for sharing your expertise, I'll be trying this later.

While I did get a rudimentary version to work once I figured out how to use that Excel-based application, allow me to pick your brain a little bit more. This is from a memory standpoint: If all I'm doing is rearranging pre-existing tiles to make a different title screen, what is happening in the game that would make it run out of memory? Why would it overload this RAM loading dock? Please forgive my ignorance  :)

Not at all; both are very good questions!

The title screen isn't arranged in a 1-byte-per-tile format, rather a compressed format that takes up much less space. Thus, alterations to the layout need to be recompressed into this format, which often results in an increase in the data span. I'm not sure how the Utility you're using operates behind the scenes, but the frequency of compression (on-the-fly vs. only when you hit SAVE) is a big factor in its overall coding efficiency. Think of it like a math problem with multiple stages: rounding to the nearest whole number after every step is going to yield a different result than if you just wait until the very end and round once.

As for the RAM: the tiles you're rearranging share CHR-ROM space with the title screen layout code (most games don't do this, as it's almost never the best option). Thus, the game undergoes a special routine during Startup wherein it pulls this data from the CHR-ROM and places it in a temporary location in RAM I've come to dub the "loading dock" (totally unofficial terminology). As there's only so much space allocated to this area, anything written beyond it will be ignored during decompression/actual BG tile assignment.

noapparentfunction

  • Newbie
  • *
  • Posts: 3
  • high density
    • View Profile
Re: Odd Palette After Using SMB1 'NES Title Editer'
« Reply #4 on: March 05, 2016, 02:06:09 am »
I understand what you mean now when you talk about compression, although I still don't quite know how to utilize it effectively.

Here is the result I got by starting from a scratch SMB title screen and modifying it using an editor written by someone in Excel. It's a pre-made "font" that looks passable: the "night" scene is intentional; i was screwing around in SMB Utility



Concurrently, I also took my "green" ROM and pasted in the code you wrote at the address you specified, and got this:



It's my desired design, and the green is halfway gone! I tried fiddling with those last couple lines of code to make it all go away, but I couldn't quite hack it, literally. I did certainly come away from this knowing a lot more than I did even if it's not a total success yet.

I plan on putting this on an Everdrive N8 cartridge after some simple level hacks (within the memory constraints) so I'm hoping it stays stable enough to run on NES hardware! Thanks again.