Support NSC for Apple II/II+ via F8-ROM (#827 PR #873)

This commit is contained in:
TomCh
2020-11-25 21:57:34 +00:00
committed by GitHub
parent c455488b50
commit 6e166dfff6
8 changed files with 137 additions and 42 deletions
+26 -11
View File
@@ -849,17 +849,8 @@ static BYTE __stdcall IO_Cxxx(WORD programcounter, WORD address, BYTE write, BYT
// NSC only for //e at internal C3/C8 ROMs, as II/II+ has no internal ROM here! (GH#827)
if (!IS_APPLE2 && g_NoSlotClock && IsPotentialNoSlotClockAccess(address))
{
if (!write)
{
int data = 0;
if (g_NoSlotClock->Read(address, data))
return (BYTE) data;
}
else
{
g_NoSlotClock->Write(address);
return 0;
}
if (g_NoSlotClock->ReadWrite(address, value, write))
return value;
}
if (!IS_APPLE2 && SW_INTCXROM)
@@ -908,6 +899,30 @@ static BYTE __stdcall IO_Cxxx(WORD programcounter, WORD address, BYTE write, BYT
return mem[address];
}
BYTE __stdcall IO_F8xx(WORD programcounter, WORD address, BYTE write, BYTE value, ULONG nCycles) // NSC for Apple II/II+ (GH#827)
{
if (IS_APPLE2 && g_NoSlotClock && !SW_HIGHRAM)
{
if (g_NoSlotClock->ReadWrite(address, value, write))
return value;
}
//
if (!write)
{
return *(mem+address);
}
else
{
memdirty[address >> 8] = 0xFF;
LPBYTE page = memwrite[address >> 8];
if (page)
*(page+(address & 0xFF)) = value;
return 0;
}
}
//===========================================================================
static struct SlotInfo