MiSTer-devel / Atari7800_MiSTer

Atari 7800 for MiSTer
Other
10 stars 12 forks source link

Double Dragon Resets to Title Screen #2

Closed trebor68 closed 2 years ago

trebor68 commented 2 years ago

Within a few to several minutes of playing "Mission 2: Industrial Areas", the game, Double Dragon, unexpectedly resets to the Title Screen under the Apr 17 release of the MiSTer core.

Perhaps helpful.. https://github.com/7800-devtools/a7800/blob/master/src/devices/bus/a7800/rom.cpp

/*-------------------------------------------------
 Carts with Activision bankswitch:
 128K games. 8 x 16K banks (0-7) to be mapped at
 0xa000-0xdfff. Bank is selected depending on the
 address written in 0xff80-0xff87.
 The rest of the memory is as follows:
 0x4000-0x5fff second 8kb of bank 6
 0x6000-0x7fff first 8kb of bank 6
 0x8000-0x9fff second 8kb of bank 7
 0xe000-0xffff first 8kb of bank 7
 GAMES: Double Dragon, Rampage.
 -------------------------------------------------*/

READ8_MEMBER(a78_rom_act_device::read_40xx)
{
    uint8_t data = 0xff;
    uint16_t addr = offset & 0x1fff;

    // offset goes from 0 to 0xc000
    switch (offset & 0xe000)
    {
        case 0x0000:
            data = m_rom[addr + 0x1a000];
            break;
        case 0x2000:
            data = m_rom[addr + 0x18000];
            break;
        case 0x4000:
            data = m_rom[addr + 0x1e000];
            break;
        case 0x6000:
            data = m_rom[addr + (m_bank * 0x4000)];
            break;
        case 0x8000:
            data = m_rom[addr + (m_bank * 0x4000) + 0x2000];
            break;
        case 0xa000:
            data = m_rom[addr + 0x1c000];
            break;
    }

    return data;
}

WRITE8_MEMBER(a78_rom_act_device::write_40xx)
{
    if (offset >= 0xbf80 && offset <= 0xbf8f)
        m_bank = offset & 7;
}
trebor68 commented 2 years ago

This is both embarrassing and stupid of me.

I did not realize the controller I am using, evidently had auto mapped to it, the "Select" button of the console to the push down 'button' feature on the analog joystick. I had mapped from the beginning a separate button on the same controller, which still functioned as such, unaware of the auto mapping also being present.

The intensity of play doesn't kick in as much on the first mission, but obvious now, I must press down enough on the analog stick during the second mission and it triggered the "Select" button on the console.

Humble apologies. Sorry for the waste of resources.