mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-09 05:32:05 +00:00
Fixed an edge case when switching from IIe to II+, and the Mockingboard wasn't visible in memory.
. Due to INTCXROM still being set and it not being excluded when in II+ mode. . Fix is to reinit memmode on restart and only check INTCXROM if IIe or above.
This commit is contained in:
parent
41203f5d2d
commit
80eb33012f
@ -161,7 +161,7 @@ enum eIRQSRC {IS_6522=0, IS_SPEECH, IS_SSC, IS_MOUSE};
|
|||||||
#define APPLECLONE_MASK 0x100
|
#define APPLECLONE_MASK 0x100
|
||||||
|
|
||||||
#define IS_APPLE2 ((g_Apple2Type & (APPLE2E_MASK|APPLE2C_MASK)) == 0)
|
#define IS_APPLE2 ((g_Apple2Type & (APPLE2E_MASK|APPLE2C_MASK)) == 0)
|
||||||
#define IS_APPLE2E() (g_Apple2Type & APPLE2E_MASK)
|
//#define IS_APPLE2E() (g_Apple2Type & APPLE2E_MASK) // unused
|
||||||
#define IS_APPLE2C() (g_Apple2Type & APPLE2C_MASK)
|
#define IS_APPLE2C() (g_Apple2Type & APPLE2C_MASK)
|
||||||
#define IS_CLONE() (g_Apple2Type & APPLECLONE_MASK)
|
#define IS_CLONE() (g_Apple2Type & APPLECLONE_MASK)
|
||||||
|
|
||||||
@ -218,6 +218,11 @@ inline bool IsApple2PlusOrClone(eApple2Type type) // Apple ][,][+,][J-Plus or cl
|
|||||||
return (type & (APPLE2E_MASK|APPLE2C_MASK)) == 0;
|
return (type & (APPLE2E_MASK|APPLE2C_MASK)) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool IsAppleIIeOrAbove(eApple2Type type) // Apple //e,Enhanced//e,//c or clone //e,Enhanced//e
|
||||||
|
{
|
||||||
|
return !IsApple2PlusOrClone(type);
|
||||||
|
}
|
||||||
|
|
||||||
extern eApple2Type g_Apple2Type;
|
extern eApple2Type g_Apple2Type;
|
||||||
inline bool IsEnhancedIIE(void)
|
inline bool IsEnhancedIIE(void)
|
||||||
{
|
{
|
||||||
|
@ -1499,6 +1499,12 @@ void MemInitialize()
|
|||||||
|
|
||||||
CreateLanguageCard();
|
CreateLanguageCard();
|
||||||
|
|
||||||
|
// Reinit memmode on a restart (eg. h/w config changes)
|
||||||
|
if (IsApple2PlusOrClone(GetApple2Type()) && g_CardMgr.QuerySlot(SLOT0) == CT_Empty)
|
||||||
|
SetMemMode(0);
|
||||||
|
else
|
||||||
|
SetMemMode(LanguageCardUnit::kMemModeInitialState);
|
||||||
|
|
||||||
MemInitializeROM();
|
MemInitializeROM();
|
||||||
MemInitializeCustomROM();
|
MemInitializeCustomROM();
|
||||||
MemInitializeCustomF8ROM();
|
MemInitializeCustomF8ROM();
|
||||||
@ -1768,7 +1774,7 @@ void MemInitializeIO(void)
|
|||||||
|
|
||||||
// Finally remove the cards' ROMs at $Csnn if internal ROM is enabled
|
// Finally remove the cards' ROMs at $Csnn if internal ROM is enabled
|
||||||
// . required when restoring saved-state
|
// . required when restoring saved-state
|
||||||
if (SW_INTCXROM)
|
if (IsAppleIIeOrAbove(GetApple2Type()) && SW_INTCXROM)
|
||||||
IoHandlerCardsOut();
|
IoHandlerCardsOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2092,7 +2098,7 @@ BYTE __stdcall MemSetPaging(WORD programcounter, WORD address, BYTE write, BYTE
|
|||||||
|
|
||||||
bool MemOptimizeForModeChanging(WORD programcounter, WORD address)
|
bool MemOptimizeForModeChanging(WORD programcounter, WORD address)
|
||||||
{
|
{
|
||||||
if (IS_APPLE2E())
|
if (IsAppleIIeOrAbove(GetApple2Type()))
|
||||||
{
|
{
|
||||||
// IF THE EMULATED PROGRAM HAS JUST UPDATED THE MEMORY WRITE MODE AND IS
|
// IF THE EMULATED PROGRAM HAS JUST UPDATED THE MEMORY WRITE MODE AND IS
|
||||||
// ABOUT TO UPDATE THE MEMORY READ MODE, HOLD OFF ON ANY PROCESSING UNTIL
|
// ABOUT TO UPDATE THE MEMORY READ MODE, HOLD OFF ON ANY PROCESSING UNTIL
|
||||||
|
Loading…
Reference in New Issue
Block a user