//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// RAM object header file //28//////////////////////////////////////////////////////////////////////////////29// //30// This header file provides the interface definition for the RAM class //31// that emulates the Handy system RAM (64K) //32// //33// K. Wilkins //34// August 1997 //35// //36//////////////////////////////////////////////////////////////////////////////37// Revision History: //38// ----------------- //39// //40// 01Aug1997 KW Document header added & class documented. //41// //42//////////////////////////////////////////////////////////////////////////////4344#ifndef RAM_H45#define RAM_H4647#define RAM_SIZE 6553648#define RAM_ADDR_MASK 0xffff49#define DEFAULT_RAM_CONTENTS 0xff5051/*52struct HOME_HEADER53{54uint16 jump;55uint16 load_address;56uint16 size;57uint8 magic[4];58};59*/6061class CRam : public CLynxBase62{6364// Function members6566public:67CRam() MDFN_COLD;68~CRam() MDFN_COLD;6970public:7172void Reset(void) MDFN_COLD;7374void Poke(uint32 addr, uint8 data){ mRamData[addr]=data;};75uint8 Peek(uint32 addr){ return(mRamData[addr]);};76uint32 ReadCycle(void) {return 5;};77uint32 WriteCycle(void) {return 5;};78uint32 ObjectSize(void) {return RAM_SIZE;};79uint8* GetRamPointer(void) { return mRamData; };8081template<bool isReader>void SyncState(NewState *ns);8283// Data members8485private:86uint8 mRamData[RAM_SIZE];87};8889#endif90919293