+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Tile Layer Pro Glitch? (CHR-ROM Banks)
Pages: [1]
Author Topic: Tile Layer Pro Glitch? (CHR-ROM Banks)  (Read 1 times)
Dr. Floppy
Guest
« on: July 11, 2010, 09:07:00 pm »

Okay, this one has me rather vex indeed...

The latest edition of Tile Layer Proâ„¢ doesn't display PRG- data in games with CHR-ROM banks defined in the iNES header. That's a plus. However, I've found that expanding a ROM to include more CHR- banks (while updating the header accordingly) results in TLP refusing to load a proportionate number of "early" CHR- banks. Specifically:

Old Header: 4E-45-53-1A-08-10-10-00

New Header: 4E-45-53-1A-08-14-40-00

(The CHR-ROM expansion required mapper conversion to something whose registers didn't max out at 5 bits. [And yes, I rewrote all the bankswitching routines accordingly.])


Instead of displaying all forty 4kB banks, it only shows banks [9-40]. What gives?
KingMike
Guest
« Reply #1 on: July 11, 2010, 10:32:57 pm »

Expanding NES ROMs (either PRG or CHR) to something that is not a power of 2 is a bad idea.
Quick Curly
Guest
« Reply #2 on: July 11, 2010, 11:53:03 pm »

Dr. Floppy - I experienced this issue myself as well. It was an easy fix. Just open your ROM in FCEUXD, open the hex editor, scroll down to the very bottom of the ROM file, and fill in the last line of data. Seems all the empty space isn't detected because Tile Layer Pro searches for the end of the file. If there isn't anything to detect at the very end (since it's still "empty space" as well), everything before that point won't be opened either. Either way, after I added data at the end of the file, all of the additional CHR banks could be accessed in Tile Layer Pro as well. It's not the best way to explain it, but hopefully you understand the point that I'm trying to get across. Smiley

Sorry in advance if that wasn't actually the problem you were having though.
Dr. Floppy
Guest
« Reply #3 on: July 12, 2010, 12:12:33 am »

Quote from: KingMike on July 11, 2010, 10:32:57 pm
Expanding NES ROMs (either PRG or CHR) to something that is not a power of 2 is a bad idea.

I was afraid of that...

Anyway, I went and expanded CHR-ROM to $20 x 8 kB banks (which translates to sixty-four tables of 256 tiles apiece). TLP still insists on showing only thirty-two.  Angry  Does there have to be (or is it highly recommended that there be) some kind of relationship between PRG-ROM and CHR-ROM size?

It's almost as if TLP is referencing an internal checksum within ROM's, then forcibly-fitting them to their original CHR-ROM size. But that's just crazy..... right?

(Despite having 128k of CHR-ROM, Super Mario Bros. 3 opens up to display all of the PRG-ROM as well. This makes me suspect that Byte 5 of the iNES header isn't the sole influence on TLP's display protocols.)

July 12, 2010, 03:34:38 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Quote from: Quick Curly on July 11, 2010, 11:53:03 pm
Either way, after I added data at the end of the file, all of the additional CHR banks could be accessed in Tile Layer Pro as well. It's not the best way to explain it, but hopefully you understand the point that I'm trying to get across. Smiley

Most definitely!  :cookie:

I added some placeholder values at line $60000, but that dastardly TLP still insists on loading only the last thirty-two 4kB banks. That said, I did experience something similar to what you described. 'Twas last week, and my first encounter with this odd phenomenon. After Paging Up/Down, trying to figure out why my bank count wasn't coming out right, I shrugged it off in favor of getting down to bidness. After a productive series of edits, I noticed that my bank count was suddenly coming out correctly...  :huh:   So I chalked up the prior confusion to my having taken Darvocetâ„¢ with Adderallâ„¢ that afternoon, and life went on.

Little did I know that the confusion would return- and remain- the next time I opened up the ROM. Now I'm wondering if that "correct" count wasn't the true hallucination?


Anyway, I fired off an email to SnowBro. Hopefully, he can shed some light upon this query.
« Last Edit: July 12, 2010, 03:34:38 am by Dr. Floppy »
taizou
Guest
« Reply #4 on: July 20, 2010, 12:58:40 am »

TLP definitely has problems with non-standard NES ROMs. I'm not sure how it calculates how much PRG to display, but it affects quite a few unlicensed/pirate games in the same way. the only fix I can think of is temporarily removing/corrupting the header so it doesn't detect the ROM as being NES.. or using something else.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC