TENGEN-800003 Ms. Pac-Man glitches [solved]

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

TENGEN-800003 Ms. Pac-Man glitches [solved]

Post by zeroone »

The GoodNES ROM set contains a file called Ms. Pac-Man (Tengen) [!].nes. The only emulator that runs it correctly is Nestopia. How does TENGEN-800003 differ from NROM?
Last edited by zeroone on Tue Jun 07, 2016 4:47 pm, edited 1 time in total.
Joe
Posts: 650
Joined: Mon Apr 01, 2013 11:17 pm

Re: TENGEN-800003 Ms. Pac-Man glitches

Post by Joe »

It doesn't. What glitches are you seeing?
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: TENGEN-800003 Ms. Pac-Man glitches

Post by tepples »

Ms. Pac-Man is on the tricky list for needing the vblank flag (bit 7 of $2002) to read back as 1 if vblank begins in the middle of the lda $2002 instruction. Spelunker and Lolo 2 are on the tricky list for the same reason; do they also break?
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: TENGEN-800003 Ms. Pac-Man glitches

Post by koitsu »

Code: Select all

e1d49080bb74e26b72ea63932dc06661 *Ms. Pac-Man (Unl) [!].nes

Soft-patched: No
CRC:          43D30C2F
SHA-1:        78FAFABFF0EE4092CC505E003385CEFA43AF3CB5
System:       NES-NTSC
Board:        TENGEN-800003
PRG-ROM:      32k
CHR-ROM:      8k
Solder Pad:   H:0 V:1
Battery:      No
Dump:         OK
Reviewed Nestopia code:

* NstDatabase.xml -- any ROMs matching CRC 43D30C2F / SHA1 78FAFABFF0EE4092CC505E003385CEFA43AF3CB5 will use H:0 V:1 mirroring, and the board type "TENGEN-800003" with mapper 0 (NROM).
* source/core/board/NstBoard.cpp -- anything using a board type of "TENGEN-800003" will use the STD_NROM code.

The STD_NROM code doesn't look "magical" to me in any way that I can tell. I still don't know what NMT_X refers to exactly in the NstBoard.hpp struct, but...

Oh, there's also UNL_NROM as well, which has some difference I haven't figured out; I don't think that's used in this case, but I'll mention it anyway. Note the 5th and 7th fields:

Code: Select all

STD_NROM                   = MakeId<    0,   32,    8,  0,  0, CRM_0,  NMT_X,  0 >::ID,
...
UNL_NROM                   = MakeId<    0,   32,    8,  8,  0, CRM_8,  NMT_X,  0 >::ID,
Maybe lidnariq knows this code better. But I don't see anything that definitively says "magic is needed to run this game" -- it literally just uses mapper 0/NROM.

Edit: I think tepples' theory is much more likely than "mapper problems".

Edit #2: added line number to NstDatabase.xml link. Damn that thing takes forever to load.
Last edited by koitsu on Tue Jun 07, 2016 4:13 pm, edited 2 times in total.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: TENGEN-800003 Ms. Pac-Man glitches

Post by zeroone »

Joe wrote:It doesn't. What glitches are you seeing?
Image
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: TENGEN-800003 Ms. Pac-Man glitches

Post by koitsu »

Wrong mirroring, I bet. See my above post, specifically how for said H:0 V:1.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: TENGEN-800003 Ms. Pac-Man glitches

Post by zeroone »

koitsu wrote:Wrong mirroring, I bet. See my above post, specifically how for said H:0 V:1.
Yes! I just confirmed that it should be Horizontal mirroring, not the Vertical mirroring specified in the ROM header. Nestopia's database fixed it.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: TENGEN-800003 Ms. Pac-Man glitches

Post by koitsu »

Sounds like this should be one that needs to get fixed in the GoodNES tools then, i.e. ROM should have the correct mirroring value set in the NES header. I have no idea presently how to report issues like that to Cowering. I also wonder if there are other Tengen NROM games that might need the same.

The Nestopia game database is ridiculously huge. So many overrides/tweaks for incorrect headers in ROMs. :(
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: TENGEN-800003 Ms. Pac-Man glitches

Post by zeroone »

koitsu wrote:Sounds like this should be one that needs to get fixed in the GoodNES tools then, i.e. ROM should have the correct mirroring value set in the NES header. I have no idea presently how to report issues like that to Cowering. I also wonder if there are other Tengen NROM games that might need the same.

The Nestopia game database is ridiculously huge. So many overrides/tweaks for incorrect headers in ROMs. :(
The ROM came from GoodNES v3.14. I have no idea if that's the latest.

I only heard about GoodNES this morning. What's the story behind it?
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: TENGEN-800003 Ms. Pac-Man glitches

Post by koitsu »

Seriously off-topic. So here are the links where you can learn yourself: https://en.wikipedia.org/wiki/GoodTools and http://cowering.blogspot.com/
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: TENGEN-800003 Ms. Pac-Man glitches

Post by zeroone »

koitsu wrote:Seriously off-topic. So here are the links where you can learn yourself: https://en.wikipedia.org/wiki/GoodTools and http://cowering.blogspot.com/
Thanks.
kaz321123
Posts: 2
Joined: Sat Jan 04, 2014 11:25 pm

Re: TENGEN-800003 Ms. Pac-Man glitches [solved]

Post by kaz321123 »

Dope Roms has a working rom of Ms. Pac-Man (Tengen), not glichy. Works in FCEUX.

I needed a nice looking rom of this game for the mini nes. :)

Necrobumping is all I do, and I do it well.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: TENGEN-800003 Ms. Pac-Man glitches [solved]

Post by koitsu »

kaz321123 wrote:Dope Roms has a working rom of Ms. Pac-Man (Tengen), not glichy. Works in FCEUX.
Thanks for bumping this thread with basically no definitive information! :-) So let's actually provide some.

"Dope Roms" has SEVEN different ROM files matching that string. Let's review them:

Code: Select all

1999-10-01  09:06            65,552 Ms. Pac-Man (U) (Tengen) [o1].nes
2000-11-20  16:56            65,680 Ms. Pac-Man (U) (Tengen) [o2].nes
2000-06-20  18:35            65,680 Ms. Pac-Man (U) (Tengen) [o3].nes
2000-01-22  09:30            49,168 Ms. Pac-Man (U) (Tengen) [o4].nes
1999-12-14  15:04            65,679 Ms. Pac-Man (U) (Tengen) [o5].nes
2000-06-20  16:23            41,104 Ms. Pac-Man (U) (Tengen) [o6].nes
2000-06-17  13:30            40,976 Ms. Pac-Man (U) (Tengen).nes
The [oX] nomclature comes from GoodTools, which means "overdump", hence those are bad dumps. You can see evidence of this from the file sizes. The only one that's correct (and I can tell from the file size alone) is Ms. Pac-Man (U) (Tengen).nes. Here are MD5s for all of them anyway:

Code: Select all

0fd383ae230784136435902cc14ab918 *Ms. Pac-Man (U) (Tengen) [o1].nes
9a7f654672023358a41ebf92021be230 *Ms. Pac-Man (U) (Tengen) [o2].nes
6e7c7c2aa87c32b95189435cc033602f *Ms. Pac-Man (U) (Tengen) [o3].nes
08ab6260e21e28054ad6cd6c29a6dc9c *Ms. Pac-Man (U) (Tengen) [o4].nes
fca9ab7c0980f47fdff0f0e87b477ff8 *Ms. Pac-Man (U) (Tengen) [o5].nes
7d23dd91d536a0675c047ac12775d3fa *Ms. Pac-Man (U) (Tengen) [o6].nes
e1d49080bb74e26b72ea63932dc06661 *Ms. Pac-Man (U) (Tengen).nes
Next, given the timestamps of these ROMs, it's safe to say they were run through GoodNES a very long time ago. This is important because Cowering has certainly changed/fixed many issues in the past 16 years. ;-) So let's run these through GoodNES/GoodTools (latest is April 2016) and see what happens. Again, we're focused on Ms. Pac-Man (U) (Tengen).nes.

Code: Select all

D:\downloads\goodtools>goodnes fixnes


GoodNES V3.23b: Copyright 1999-2014 Cowering (cowering@gmail.com)
Visit www.allgoodthings.us or #rareroms on irc.foreverchat.net for latest news
Unable to open GoodNES.db

Stats: 22096 entries, 2918 redumps, 6575 bad/overdumps
       6221 hacks, 1228 trainers, 3436 translations
[New Style Msgs, using SHA-1]
Scanning .\*.nes.unf.unif
iNES Header Fixes - [-CFMUG-S] -> Ms. Pac-Man (U) (Tengen) [o2].nes.new.nes
iNES Header Fixes - [-CF-----] -> Ms. Pac-Man (U) (Tengen) [o4].nes.new.nes
iNES Header Fixes - [-CF--G--] -> Ms. Pac-Man (U) (Tengen) [o5].nes.new.nes
You are missing 14849 of 14849 known Nintendo Famicom/NES ROMS (V3.23b)
The only ones it touched were the bad overdumped versions. Great. So let's see what Ms. Pac-Man (U) (Tengen).nes has for header information and decode it:

Code: Select all

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000  4E 45 53 1A 02 01 00 00 00 00 00 00 00 00 00 00  NES.............

Byte 0-3: "NES" + $1a header
Byte   4: 16KB PRG page count: 2
Byte   5: 8KB PRG page count:  1
Byte   6: $00 = %00000000
                 ||||||||
                 |||||||+- Mirroring:     0 (horizontal, i.e. vertical arrangement)
                 ||||||+-- PRG-RAM:       0 (none)
                 |||||+--- Trainer:       0 (none)
                 ||||+---- 4-screen:      0 (disable)
                 ++++----- Mapper:        0 (low nybble)
Byte   7: $00 = %00000000
                 ||||||||
                 |||||||+- VS game:       0 (disable)
                 ||||||+-- PC10 game:     0 (disable)
                 ||||++--- NES 2.0?:      0 (no)
                 ++++----- Mapper:        0 (upper nybble)
Byte   8: not applicable
Byte   9: $00 = %00000000
                        |
                        +- TV system:     0 (NTSC)
Byte  10: $00 = %00000000
                   ||  ||
                   ||  ++- TV system:     0 (NTSC)
                   |+----- PRG RAM:       0 (none)
                   +------ Bus conflicts: 0 (none)
So we can see it's a mapper 0 (NROM) ROM, with horizontal (vertical arrangement) mirroring.

Now let's load it up in FCEUX 2.2.3 (I use New PPU there just because). Yup, plays fine (tested screen panning phases of game).

Still using FCUEX, let's force the mirroring to vertical (horizontal arrangement) and see what happens... yup, looks broken, in the same manner as what zeroone depicted in his screenshot.

TL;DR -- in other words: the ROM zeroone was using had incorrect mirroring set in its header, which is what he said in his post.

So, in a weird way, thanks for bumping this thread for literally no reason. :-)
Attachments
Ms. Pac-Man (U) (Tengen)-1.png
Ms. Pac-Man (U) (Tengen)-1.png (3.02 KiB) Viewed 6803 times
Ms. Pac-Man (U) (Tengen)-0.png
Ms. Pac-Man (U) (Tengen)-0.png (3.25 KiB) Viewed 6803 times
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: TENGEN-800003 Ms. Pac-Man glitches [solved]

Post by zeroone »

The tool that transfers ROMs over USB to the mini should update the headers using a cart DB since the mini's emulator doesn't have that build in.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: TENGEN-800003 Ms. Pac-Man glitches [solved]

Post by koitsu »

All horribly off-topic. The person said I needed, meaning he went looking for a ROM with proper headers and found it. Past-tense.

As for an uploader tool "fixing ROMs" on-the-fly: I disagree strongly. The uploader tool should have no involvement in such things; it should upload what you give it, period. Think of an EEPROM writer/burner "magically changing your data" without your knowledge -- all this does is create problems.

The ROMs should be fixed/repaired prior. That's what GoodTools is for.
Post Reply