//1// Copyright (c) 2004 K. Wilkins2//3// This software is provided 'as-is', without any express or implied warranty.4// In no event will the authors be held liable for any damages arising from5// the use of this software.6//7// Permission is granted to anyone to use this software for any purpose,8// including commercial applications, and to alter it and redistribute it9// freely, subject to the following restrictions:10//11// 1. The origin of this software must not be misrepresented; you must not12// claim that you wrote the original software. If you use this software13// in a product, an acknowledgment in the product documentation would be14// appreciated but is not required.15//16// 2. Altered source versions must be plainly marked as such, and must not17// be misrepresented as being the original software.18//19// 3. This notice may not be removed or altered from any source distribution.20//2122//////////////////////////////////////////////////////////////////////////////23// Handy - An Atari Lynx Emulator //24// Copyright (c) 1996,1997 //25// K. Wilkins //26//////////////////////////////////////////////////////////////////////////////27// Lynx memory map object header file //28//////////////////////////////////////////////////////////////////////////////29// //30// This header file provides the interface definition for the memory map //31// object, this object controls which pieces of lynx hardware are //32// accesible by the CPU at any given time, it is the code for addr $FFF9 //33// //34// K. Wilkins //35// August 1997 //36// //37//////////////////////////////////////////////////////////////////////////////38// Revision History: //39// ----------------- //40// //41// 01Aug1997 KW Document header added & class documented. //42// //43//////////////////////////////////////////////////////////////////////////////4445#ifndef MEMMAP_H46#define MEMMAP_H4748#define MEMMAP_SIZE 0x14950#ifdef TRACE_CART5152#define TRACE_MEMMAP0(msg) _RPT1(_CRT_WARN,"CMamMap::"msg" (Time=%012d)\n",gSystemCycleCount)53#define TRACE_MEMMAP1(msg,arg1) _RPT2(_CRT_WARN,"CMamMap::"msg" (Time=%012d)\n",arg1,gSystemCycleCount)54#define TRACE_MEMMAP2(msg,arg1,arg2) _RPT3(_CRT_WARN,"CMamMap::"msg" (Time=%012d)\n",arg1,arg2,gSystemCycleCount)55#define TRACE_MEMMAP3(msg,arg1,arg2,arg3) _RPT4(_CRT_WARN,"CMamMap::"msg" (Time=%012d)\n",arg1,arg2,arg3,gSystemCycleCount)5657#else5859#define TRACE_MEMMAP0(msg)60#define TRACE_MEMMAP1(msg,arg1)61#define TRACE_MEMMAP2(msg,arg1,arg2)62#define TRACE_MEMMAP3(msg,arg1,arg2,arg3)6364#endif6566class CMemMap : public CLynxBase67{68// Function members6970public:71CMemMap(CSystem& parent) MDFN_COLD;7273public:74void Reset(void) MDFN_COLD;7576void Poke(uint32 addr,uint8 data);77uint8 Peek(uint32 addr);78uint32 ReadCycle(void) {return 5;};79uint32 WriteCycle(void) {return 5;};80uint32 ObjectSize(void) {return MEMMAP_SIZE;};8182template<bool isReader>void SyncState(NewState *ns);8384// Data members8586private:87int mMikieEnabled;88int mSusieEnabled;89int mRomEnabled;90int mVectorsEnabled;9192CSystem& mSystem;93};9495#endif96979899