Aladdin (Super Game) mapper 4 bug? [SOLVED]

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Aladdin (Super Game) mapper 4 bug? [SOLVED]

Post by Zepper »

In my emulator, the title screen has a green-ish color instead of black, and the game hangs after pressing START because of a RAM clearing routine, but always calling the JMP address from RAM $07F4.

Code: Select all

6C, F9F7 JMP ($07F4)
48, CA01 PHA 
A9, CA02 LDA #$00
8D, CA04 STA $E002
8D, CA07 STA $E003
68, CA0A PLA 
40, CA0B RTI 
D0, E962 BNE $E94D [A:0 X:F4 Y:10 S:F9 P:A0]
95, E94D STA $00, X [X=F4, Addr+X=F4]
9D, E94F STA $0200, X [X=F4, Addr+X=2F4]
9D, E952 STA $0300, X [X=F4, Addr+X=3F4]
9D, E955 STA $0400, X [X=F4, Addr+X=4F4]
9D, E958 STA $0500, X [X=F4, Addr+X=5F4]
9D, E95B STA $0600, X [X=F4, Addr+X=6F4]
9D, E95E STA $0700, X [X=F4, Addr+X=7F4]
E8, E961 INX 
D0, E962 BNE $E94D [A:0 X:F5 Y:10 S:F9 P:A0]
95, E94D STA $00, X [X=F5, Addr+X=F5]
9D, E94F STA $0200, X [X=F5, Addr+X=2F5]
9D, E952 STA $0300, X [X=F5, Addr+X=3F5]
9D, E955 STA $0400, X [X=F5, Addr+X=4F5]
9D, E958 STA $0500, X [X=F5, Addr+X=5F5]
9D, E95B STA $0600, X [X=F5, Addr+X=6F5]
9D, E95E STA $0700, X [X=F5, Addr+X=7F5]
E8, E961 INX 
6C, F9F7 JMP ($07F4)
00, 0000 BRK 
Any clues? A CPU bug?
(after 2 milions and half lines of debugging code)
Last edited by Zepper on Wed Feb 01, 2017 1:58 pm, edited 1 time in total.
User avatar
James
Posts: 431
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by James »

It was hanging in my emulator as well, but I was able to get it to work by forcing the "old" IRQ behavior.
get nemulator
http://nemulator.com
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by Zepper »

James wrote:It was hanging in my emulator as well, but I was able to get it to work by forcing the "old" IRQ behavior.
It worked! Such option is already available in my emulator though.
One more question - what about the green-ish title screen?
Attachments
aladdin.png
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by zeroone »

The game works fine in Nintendulator. Nintendulator does not require old IRQ behavior to be explicitly set and it does not appear to detect the ROM in a cart DB. Maybe the issue is a bit more complicated.
User avatar
James
Posts: 431
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by James »

Took a quick glance at Nintendulator's source code, and it appears to be using the old IRQ behavior.

Zepper -- the green title screen is emphasis bits related. If I disable emphasis bit support, I get the same result.
get nemulator
http://nemulator.com
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by tepples »

If a game is made for PAL famiclones, such as Dendy, it'll have the sense of green and red emphasis bits inverted. What does it look like with emphasis off, and what is $2001 set to?
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by zeroone »

James wrote:Took a quick glance at Nintendulator's source code, and it appears to be using the old IRQ behavior.
That's interesting. I have it the opposite in my emulator (i.e. use the new IRQ behavior except in MMC3 variants that require it). I never noticed any issues until this game. Are there others I should know about?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Aladdin (Super Game) mapper 4 bug?

Post by lidnariq »

If Nintendulator is using the old behavior, then Star Trek - 25th Anniversary is supposed to not work correctly...
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by zeroone »

lidnariq wrote:If Nintendulator is using the old behavior, then Star Trek - 25th Anniversary is supposed to not work correctly...
I noticed that the Nestopia cart DB does mark some mapper 4 games as MMC3A:

Code: Select all

<chip type="MMC3A" />
In my GoodNES audit, I treated mapper 1 games marked with MMC1A as mapper 155 games. Why isn't there a separate mapper for MMC3A games?
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by Zepper »

tepples wrote:If a game is made for PAL famiclones, such as Dendy, it'll have the sense of green and red emphasis bits inverted. What does it look like with emphasis off, and what is $2001 set to?
I tested it here. The green-ish background is still there. The emphasis bits are NOT inverted in this game, since the "Aladdin" word becomes green-emphasized if I swap the bits.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by thefox »

lidnariq wrote:If Nintendulator is using the old behavior, then Star Trek - 25th Anniversary is supposed to not work correctly...
Yet it does.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by zeroone »

thefox wrote:
lidnariq wrote:If Nintendulator is using the old behavior, then Star Trek - 25th Anniversary is supposed to not work correctly...
Yet it does.
What part of the game supposedly fails to work?
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by tepples »

zeroone wrote:In my GoodNES audit, I treated mapper 1 games marked with MMC1A as mapper 155 games. Why isn't there a separate mapper for MMC3A games?
Because no licensed games are known to rely on MMC3A behavior (as opposed to MMC3BS/MMC3C). If this game does, then a proposal for an MMC3 submapper may be in order.
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by Zepper »

Any clues about the green as background color?
Attachments
aladdin2.png
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Aladdin (Super Game) mapper 4 bug?

Post by zeroone »

Zepper wrote:Any clues about the green as background color?
How is that image different from other emulators? Even the mapper 114 (MMC3a variant) version looks like that.
Post Reply