diff --git a/Changes.txt b/Changes.txt index 8eb4052b3..80f7d1537 100644 --- a/Changes.txt +++ b/Changes.txt @@ -12,6 +12,14 @@ Release History =========================================================================== +4.1.1 to 4.2: (xxx xx, 2014) + + * Fixed 'MDM' scheme to trigger bankswitching on writes to hotspots + (previously it only triggered on reads). + +-Have fun! + + 4.1 to 4.1.1: (September 14, 2014) * Re-added 'uipalette' option due to popular demand (of at least one @@ -21,8 +29,6 @@ an annoying system beep. Currently this is fixed by patching the SDL2 library and including a modified version with Stella. --Have fun! - 4.0 to 4.1: (September 1, 2014) diff --git a/src/emucore/CartMDM.cxx b/src/emucore/CartMDM.cxx index bc20f76da..13d0a5764 100644 --- a/src/emucore/CartMDM.cxx +++ b/src/emucore/CartMDM.cxx @@ -76,7 +76,7 @@ void CartridgeMDM::install(System& system) myHotSpotPageAccess[7] = mySystem->getPageAccess(0x0F00 >> shift); // Set the page accessing methods for the hot spots - System::PageAccess access(this, System::PA_READ); + System::PageAccess access(this, System::PA_READWRITE); for(uInt32 i = 0x0800; i < 0x0FFF; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); @@ -98,12 +98,12 @@ uInt8 CartridgeMDM::peek(uInt16 address) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeMDM::poke(uInt16 address, uInt8 value) { - // Currently, writing to the hotspots is disabled, so we don't need to - // worry about bankswitching - // However, all possible addresses can appear here, and we only care + // All possible addresses can appear here, but we only care // about those below $1000 if(!(address & 0x1000)) { + bank(address & 0x0FF); + int hotspot = ((address & 0x0F00) >> 8) - 8; myHotSpotPageAccess[hotspot].device->poke(address, value); } diff --git a/src/emucore/CartMDM.hxx b/src/emucore/CartMDM.hxx index bf273a6d2..6c5b194af 100644 --- a/src/emucore/CartMDM.hxx +++ b/src/emucore/CartMDM.hxx @@ -33,8 +33,8 @@ http://atariage.com/forums/topic/56073-cheap-2k4k-x-in-1-menu-driven-multicart-for-atari-2600 - The hotspots in this scheme read from addresses $800 to $FFF, where the - lower byte determines the actual 4K bank switch to. In the current + The hotspots in this scheme are read/write at addresses $800 to $FFF, where + the lower byte determines the actual 4K bank switch to. In the current implementation, only 128 banks are supported, so selecting bank 128+ results in further bankswitching being locked. A reset line is used to reset to bank 0 and re-enable bankswitching.