+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  NES fix for NTSC?
Pages: [1]
Author Topic: NES fix for NTSC?  (Read 2 times)
stryfe23
Guest
« on: October 27, 2008, 01:06:19 pm »

After browsing through the entire section of NES Win utilities, I haven't found what I'm looking for.

The problem I'm having is with the refresh rate of a NES rom. I was wondering if there was a tool that could force NTSC on a PAL rom? 

Similar to what the SNEStool utility can do for SNES games.
Disch
Guest
« Reply #1 on: October 27, 2008, 01:09:30 pm »

This is entirely up to the emulator.  iNES headers don't adequately define region settings, so there isn't really a reliable way to know whether to run a ROM in NTSC or PAL mode.  Emulators usually default to NTSC, but may "auto-detect" PAL by looking for '(E)' in the file name, or by doing a database check.

In any event, you can usually/always switch emulation modes in the emulator.  But there isn't really anything you can do to the ROM to get emulators to know which region you want.

EDIT

Let me rephrase that.  You can't just change a header byte to get emulators to know which region you want, but you can change the ROM in other ways.

For example if the filename has (E) in it, try removing that.  If it still runs PAL, it's probably doing a database lookup -- so a possible fix is to change the ROM ever so slightly so that it doesn't match the database entry (in which case the emu will likely default to NTSC).  You can do this by simply changing any unused byte in the game from FF to 00 or something.
Lenophis
Guest
« Reply #2 on: October 27, 2008, 12:20:31 pm »

Quote from: Disch on October 27, 2008, 01:09:30 pm
This is entirely up to the emulator.  iNES headers don't adequately define region settings, so there isn't really a reliable way to know whether to run a ROM in NTSC or PAL mode.  Emulators usually default to NTSC, but may "auto-detect" PAL by looking for '(E)' in the file name, or by doing a database check.
*ahem*

Code:
0-3      String "NES^Z" used to recognize .NES files.
4        Number of 16kB ROM banks.
5        Number of 8kB VROM banks.
6        bit 0     1 for vertical mirroring, 0 for horizontal mirroring.
         bit 1     1 for battery-backed RAM at $6000-$7FFF.
         bit 2     1 for a 512-byte trainer at $7000-$71FF.
         bit 3     1 for a four-screen VRAM layout.
         bit 4-7   Four lower bits of ROM Mapper Type.
7        bit 0     1 for VS-System cartridges.
         bit 1     1 for PC-10 cartridges.
         bit 2-3   Reserved, must be zeroes!
         bit 4-7   Four higher bits of ROM Mapper Type.
8        Number of 8kB RAM banks. For compatibility with the previous
         versions of the .NES format, assume 1x8kB RAM page when this
         byte is zero.
[b]9        bit 0     1 for PAL cartridges, otherwise assume NTSC.[/b]
         bit 1-7   Reserved, must be zeroes!
10-15    Reserved, must be zeroes!

That's been around for a while, you know.
Disch
Guest
« Reply #3 on: October 27, 2008, 01:02:28 pm »

And virtually no ROMs have that bit properly set.  And Virtually no emulators pay it any mind (partly because of that reason, and partly because of other diskdudeish and compatibility reasons).

Case in point... that bit probably isn't set in this guy's ROM, yet the emu is still thinking it's a PAL game -- even though the header supposedly marks it as NTSC.  So that bit is wholley useless.
Lenophis
Guest
« Reply #4 on: October 27, 2008, 01:54:11 pm »

Quote from: Disch on October 27, 2008, 01:02:28 pm
And virtually no ROMs have that bit properly set.
This bit has been a standard for at least 5 years, and so far it would appear as though that nothing's been done to correct the roms that need to be corrected. That's laziness on everybody's part.

Quote
And Virtually no emulators pay it any mind
Laziness on the emu author's part then. They willfully ignore it.

Quote
(partly because of that reason, and partly because of other diskdudeish and compatibility reasons).
You're arguing for the sake of arguing. I can recall many a rant by you about the "DISKDUDE!" BS that shouldn't even be there in the first place.

Quote
Case in point... that bit probably isn't set in this guy's ROM, yet the emu is still thinking it's a PAL game -- even though the header supposedly marks it as NTSC.
It might help if we even knew what game he was talking about.

Quote
So that bit is wholley useless.
Not useless, just largely unused.

Quote from: stryfe23 on October 27, 2008, 01:06:19 pm
The problem I'm having is with the refresh rate of a NES rom. I was wondering if there was a tool that could force NTSC on a PAL rom?

Similar to what the SNEStool utility can do for SNES games.
I don't believe such a thing does or can exist for the NES. Though it won't be the first time I am wrong. :angel:
Dragonsbrethren
Guest
« Reply #5 on: October 27, 2008, 02:07:59 pm »

Quote from: Lenophis on October 27, 2008, 01:54:11 pm
I don't believe such a thing does or can exist for the NES. Though it won't be the first time I am wrong. :angel:

Nestopia can utilize an external database, I'm not sure how it works (a quick read through the documentation turned up nothing) but I'd imagine it uses a checksum for the ROM and specifies which settings to use, so it should be possible to force the game in question to always run in PAL mode. That's an emulator-specific solution, of course.

Speaking of Nestopia, it might actually take advantage of that region bit, I know it wouldn't run a few of my ROMs with garbage in the headers that other emulators had no qualms about.
KingMike
Guest
« Reply #6 on: October 27, 2008, 02:23:54 pm »

Yeah, would it be hard to specifically check for DISKDUDE!, ASTER, pyr0 or other common header garbage, before checking for valid header data?
Disch
Guest
« Reply #7 on: October 27, 2008, 02:33:35 pm »

EDIT - meh.  I had a big post here, but decided to remove it.

It basically summarizes to this, Leno:

- You didn't offer a solution.  His problem is he wants to force NTSC.  In all likelyhood that bit already indicates NTSC, and that's being ignored by the emu which is running it as PAL.  So pointing out the bit which is going unused does him no good.

- You accused me of arguing for the sake of arguing -- talk about the pot calling the kettle black.  I already proposed a solution to his problem -- where's yours?  From what I see, the only reason you posted was to try to point out a technical error I may have made.  And when I tried to back up why I said what I said, you made a lengthy post to snare me in more technicalities.  The only "solution" you proposed was for the world to be perfect and for all ROMs and emus to conform to a specific standard without ambiguities.

- Furthermore I could explain exactly what diskdude headers have to do with those bytes going ignored in many emus, but it'd be a waste of breath.
« Last Edit: October 27, 2008, 03:00:08 pm by Disch »
byuu
Guest
« Reply #8 on: October 27, 2008, 03:06:09 pm »

Quote
This was (and still is) a common way to retain compatibility with Diskduded ROMs.

And therein lies the problem.

Nobody fixes their corrupted ROMs because they work fine in emulators, and no emulator author is willing to suffer a loss in popularity by being "the emu that can't run half the games out there."

The ROM users / sites are clueless. The only way to force them to change is for the emu authors to take action. If all emu authors would work together and remove all of this legacy cruft (DISKDUDE!, iNES1, SNES copier headers, 300 file extensions, Genesis interleaving, etc etc), we could make real progress. But we all know that's never going to happen. We can't pull it off in the SNES scene with all of four active emulators. How the hell could we expect that from the NES scene with at least 100 active emulators?
Disch
Guest
« Reply #9 on: October 27, 2008, 03:10:22 pm »

I don't disagree.

But you guys are still talking about a idealistic standpoint.  Realistically, that PAL bit in the header might as well not even exist.

Part of the problem is that even if you follow the iNES spec to the letter there's still a lot of ambiguities with which hardware to emulate.  iNES format falls short in many ways... so an emu will probably still want to fall back to a form of databasing anyway -- making this whole thing moot.
byuu
Guest
« Reply #10 on: October 27, 2008, 03:20:36 pm »

Quote
I don't disagree.

And I'm no better myself. I still have copier header detection. But I have tried very hard to get other emulators to remove this along with me. I couldn't convince a single person. Ideally, we'd just display deprecation messages and offer to fix the ROMs. After a year, remove the mechanism entirely.

But yeah, we bring the problem on ourselves through our competitive nature.

Quote
But you guys are still talking about a idealistic standpoint.  Realistically, that PAL bit in the header might as well not even exist.

I agree completely. Lenophis advocates emulators to treat a bit that's not set correctly for and will break hundreds of titles. It's a nice ideal, and should have been done initially. But now, in the best case, this would get the iNES1 headers slightly updated. In the worst case, it's suicide for the one emulator daring enough to try it. And you'd still be left with a worthless header format that doesn't adequately represent the hardware (PRG/CHR RAM/ROM mirroring/size info, mapper subtype properties, etc etc); forcing you to use a database anyway.

Fixing that bit will just cause lots of temporary problems for people with no real long-term improvement. If we're going to fix the NTSC/PAL issue, we should take the opportunity to ditch iNES all together. And no, UNIF is not the answer there. XML is much nicer, but talk about using a sledgehammer on a nail ...

creaothceann
Guest
« Reply #11 on: October 27, 2008, 03:38:30 pm »

Quote from: byuu on October 27, 2008, 03:06:09 pm
Nobody fixes their corrupted ROMs because they work fine in emulators, and no emulator author is willing to suffer a loss in popularity by being "the emu that can't run half the games out there."

The ROM users / sites are clueless. The only way to force them to change is for the emu authors to take action. If all emu authors would work together and remove all of this legacy cruft (DISKDUDE!, iNES1, SNES copier headers, 300 file extensions, Genesis interleaving, etc etc), we could make real progress. But we all know that's never going to happen. We can't pull it off in the SNES scene with all of four active emulators.

I'm sure it'd be possible in the SNES scene since we can refer to a tool by a respected author that automatically checks the ROMs.

The only problem is that we'd need new matching releases of emulators that don't update often: ZSNES, SNES9x and (to a certain extent) SNESGT.
tomaitheous
Guest
« Reply #12 on: October 27, 2008, 06:16:49 pm »

Quote from: Disch on October 27, 2008, 03:10:22 pm
Part of the problem is that even if you follow the iNES spec to the letter there's still a lot of ambiguities with which hardware to emulate.  iNES format falls short in many ways... so an emu will probably still want to fall back to a form of databasing anyway -- making this whole thing moot.

 The first thought that comes to mind is why not create a new header format that's distinguishable from the current iNES header format (.i.e longer header and a new/specific identification string). Not changing the rom layout, but the just the header itself and it wouldn't conflict with the older iNES header format. Then the next thought was if I had thought of it, I'm sure as hell positive that someone else has thought of this already. So what was the reasoning/conclusion behind not creating a new header format?
byuu
Guest
« Reply #13 on: October 27, 2008, 06:30:10 pm »

Quote
So what was the reasoning/conclusion behind not creating a new header format?

They have. iNES1A, iNES2, UNIF, XML ... I'm sure there's more.

tomaitheous
Guest
« Reply #14 on: October 28, 2008, 11:46:14 pm »

Quote from: byuu on October 27, 2008, 06:30:10 pm
Quote
So what was the reasoning/conclusion behind not creating a new header format?

They have. iNES1A, iNES2, UNIF, XML ... I'm sure there's more.

 Ah, I see.
Pages: [1]  


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