Dragon Warrior 3 and 4?

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

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

Dragon Warrior 3 and 4?

Post by Zepper »

Dragon Warrior 3 gives a green screen (infinite loop), and DW4 crashes, bad opcode $32 trapped at PC $B911.
It's strange, because it has been reported before here in this topic, but in my emulator, there's no CPU bug on BRK - got a PASS in every CPU test ROM.
User avatar
Dwedit
Posts: 4921
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Dragon Warrior 3 and 4?

Post by Dwedit »

DW3&4 (and DQ4) use the SUROM board (Usually denoted by specifying PRG size 512K with Mapper 1)

"SUROM uses CHR A16 to control the upper address line (PRG A18) of its 512KB PRG ROM"
http://wiki.nesdev.com/w/index.php/MMC1 ... _and_SXROM

When the game wants to bankswitch, it will write 5 times to FFFF (16K PRG select), and 5 times to BFFF (CHR select).
It even puts the same bankswitch function in the upper and lower 256k at the same address, so it doesn't move after it has switched between low and high 256K.

The games do like to use the BRK instruction a lot. The BRK handler often triggers bank switching.
So it uses BRK as one way to implement off-page jumps or calls.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: Dragon Warrior 3 and 4?

Post by Zepper »

I had to read Disch' mapper 1 doc, so I got 512k games working ok.
Post Reply