//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// ROM object header file //28//////////////////////////////////////////////////////////////////////////////29// //30// This header file provides the interface definition and inline code for //31// the class the emulates the internal 512 byte ROM embedded in Mikey //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 ROM_H45#define ROM_H4647#define ROM_SIZE 0x20048#define ROM_ADDR_MASK 0x01ff49#define DEFAULT_ROM_CONTENTS 0x885051#define BROM_START 0xfe0052#define BROM_SIZE 0x20053#define VECTOR_START 0xfffa54#define VECTOR_SIZE 0x65556class CRom : public CLynxBase57{58public:59CRom(const uint8 *, uint32) MDFN_COLD;6061public:62void Reset(void) MDFN_COLD;63void Poke(uint32 addr,uint8 data) { /*if(mWriteEnable) mRomData[addr&ROM_ADDR_MASK]=data;*/ }64uint8 Peek(uint32 addr) { return(mRomData[addr&ROM_ADDR_MASK]); }65uint32 ReadCycle(void) {return 5;}66uint32 WriteCycle(void) {return 5;}67uint32 ObjectSize(void) {return ROM_SIZE;}6869template<bool isReader>void SyncState(NewState *ns);7071// Data members7273public:74//bool mWriteEnable; // always false75private:76uint8 mRomData[ROM_SIZE];77};7879#endif80818283