if ( m_reg[0]&0x40 )
{
m_PRGROMmemory.REMAP(0,m_numPrgBanks-2);
m_PRGROMmemory.REMAP(1,m_prg[1]);
m_PRGROMmemory.REMAP(2,m_prg[0]);
m_PRGROMmemory.REMAP(3,m_numPrgBanks-1);
}
else
{
m_PRGROMmemory.REMAP(0,m_prg[0]);
m_PRGROMmemory.REMAP(1,m_prg[0]); // !!!!!!!!! must be m_prg[1] !!!!!!!!!!
m_PRGROMmemory.REMAP(2,m_numPrgBanks-2);
m_PRGROMmemory.REMAP(3,m_numPrgBanks-1);
}
This is error - second bank in /else/ must be attached to slot '1' (m_prg[1]).
Ufff, I thought there is problem with debugger, but it's erratum in emulator. This error leads to impossibility of switching second 8Kb bank to anything except slot first bank is attached to (compare to specs and first 'twisted' mode in 'if'').
https://github.com/christopherpow/nesicide/blob/master/libs/nes/emulator/cnesrommapper004.cpp Here we have (from line 213):
This is error - second bank in /else/ must be attached to slot '1' (m_prg[1]). Ufff, I thought there is problem with debugger, but it's erratum in emulator. This error leads to impossibility of switching second 8Kb bank to anything except slot first bank is attached to (compare to specs and first 'twisted' mode in 'if'').