Mapper 193

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
beannaich
Posts: 207
Joined: Wed Mar 31, 2010 12:40 pm

Mapper 193

Post by beannaich » Wed Dec 28, 2011 2:07 pm

Hey all, it's been a while!

I have a question today about mapper 193, the one used for "Fighting Hero". I have searched the forums, looked at source code, and all the usual stuff. When I boot the game up, the music plays, the sprite for the main menu's cursor is shown, but no menu!

I breakpointed my GPU, background was enabled, and was set to use the left pattern table. Sprites had the exact same settings... Which leads me to believe something is wrong (Or the game is just trash, and judging by the looks of the thing, I don't think we can rule that out). I'm also wondering if Disch's mapper docs are accurate on this one? I've combed over my code for this mapper, and it's not a complex one at all. My copy of this game works just fine in Nestopia, so it's definitely something wrong with my code.

Anyone else run into problems with this mapper? Does it have a known boot configuration? I really can't believe a mapper with 4 measly registers is causing me this much trouble :(

EDIT: Source code

Code: Select all

/// <summary>Emulates Mapper 193</summary>
public class NesMmcC1 : NesMmc
{
    public NesMmcC1(Nes console)
        : base(console) { }

    protected internal override void Initialize()
    {
        base.Initialize();

        for (int i = 0; i < 0x2000; i += 4)
        {
            base.console.Cpu.Memory.Map(0x6000 + i, (addr, data) => base.SelectChr(Chr.Size04, Chr.Addr0000, data >> 2));
            base.console.Cpu.Memory.Map(0x6001 + i, (addr, data) => base.SelectChr(Chr.Size02, Chr.Addr1000, data >> 1));
            base.console.Cpu.Memory.Map(0x6002 + i, (addr, data) => base.SelectChr(Chr.Size02, Chr.Addr1800, data >> 1));
            base.console.Cpu.Memory.Map(0x6003 + i, (addr, data) => base.SelectPrg(Prg.Size08, Prg.Addr8000, data));
        }

        base.SelectPrg(Prg.Size08, Prg.AddrA000, -3);
        base.SelectPrg(Prg.Size08, Prg.AddrC000, -2);
        base.SelectPrg(Prg.Size08, Prg.AddrE000, -1);
    }
}

zxbdragon
Posts: 474
Joined: Mon Dec 12, 2011 8:15 pm

Post by zxbdragon » Wed Dec 28, 2011 5:50 pm

setmirror

User avatar
James
Posts: 429
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Post by James » Wed Dec 28, 2011 10:31 pm

zxbdragon wrote:setmirror
just to clarify - the game uses vertical mirroring. The rom I have has it set to horizontal in the header. Simply force it to vertical and it should work fine.
beannaich wrote:Or the game is just trash
it is :)
Last edited by James on Thu Dec 29, 2011 6:21 am, edited 1 time in total.

beannaich
Posts: 207
Joined: Wed Mar 31, 2010 12:40 pm

Post by beannaich » Thu Dec 29, 2011 5:07 am

Yeah, that was it. Thanks zxbdragon and James :) The game is fixed, but it's still a giant load of ass. I suppose it's time to parse data from bootgod's xml database, since the INES header has failed me too many times to be relied on.

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

Post by Zepper » Thu Dec 29, 2011 8:48 am

Use your own checks by CRC. If matches it, edit the information parsed from the header.

Post Reply