mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-16 03:30:23 +00:00
Merge branch 'master' of https://github.com/MoleskiCoder/EightBit
This commit is contained in:
commit
326ebfd8ea
@ -423,7 +423,7 @@ void EightBit::GameBoy::Disassembler::disassembleOther(
|
|||||||
dumpCount++;
|
dumpCount++;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
specification = "LD HL,SP%4$+i";
|
specification = "LD HL,SP+%4%";
|
||||||
dumpCount++;
|
dumpCount++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -32,20 +32,17 @@ void EightBit::GameBoy::IoRegisters::Bus_ReadingByte(EightBit::EventArgs) {
|
|||||||
|
|
||||||
// Port/Mode Registers
|
// Port/Mode Registers
|
||||||
case P1: {
|
case P1: {
|
||||||
auto p14 = m_scanP14 && !m_p14;
|
auto directionKeys = m_scanP14 && !m_p14;
|
||||||
auto p15 = m_scanP15 && !m_p15;
|
auto miscKeys = m_scanP15 && !m_p15;
|
||||||
auto live = p14 || p15;
|
auto live = directionKeys || miscKeys;
|
||||||
auto p10 = live && !m_p10;
|
auto rightOrA = (live && !m_p10) ? 0 : Chip::Bit0;
|
||||||
auto p11 = live && !m_p11;
|
auto leftOrB = (live && !m_p11) ? 0 : Chip::Bit1;
|
||||||
auto p12 = live && !m_p12;
|
auto upOrSelect = (live && !m_p12) ? 0 : Chip::Bit2;
|
||||||
auto p13 = live && !m_p13;
|
auto downOrStart = (live && !m_p13) ? 0 : Chip::Bit3;
|
||||||
poke(port,
|
auto lowNibble = rightOrA | leftOrB | upOrSelect | downOrStart;
|
||||||
((int)!p10)
|
auto highNibble = Chip::promoteNibble(Chip::Mask4);
|
||||||
| ((int)!p11 << 1)
|
auto value = lowNibble | highNibble;
|
||||||
| ((int)!p12 << 2)
|
poke(port, lowNibble | highNibble);
|
||||||
| ((int)!p13 << 3)
|
|
||||||
| Chip::Bit4 | Chip::Bit5
|
|
||||||
| Chip::Bit6 | Chip::Bit7);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SB:
|
case SB:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user