Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/lynx/lynxbase.h
2 views
1
//
2
// Copyright (c) 2004 K. Wilkins
3
//
4
// This software is provided 'as-is', without any express or implied warranty.
5
// In no event will the authors be held liable for any damages arising from
6
// the use of this software.
7
//
8
// Permission is granted to anyone to use this software for any purpose,
9
// including commercial applications, and to alter it and redistribute it
10
// freely, subject to the following restrictions:
11
//
12
// 1. The origin of this software must not be misrepresented; you must not
13
// claim that you wrote the original software. If you use this software
14
// in a product, an acknowledgment in the product documentation would be
15
// appreciated but is not required.
16
//
17
// 2. Altered source versions must be plainly marked as such, and must not
18
// be misrepresented as being the original software.
19
//
20
// 3. This notice may not be removed or altered from any source distribution.
21
//
22
23
//
24
// Generic Lynx base class.
25
//
26
27
#ifndef LYNXBASE_H
28
#define LYNXBASE_H
29
30
//
31
// bank0 - Cartridge bank 0
32
// bank1 - Cartridge bank 1
33
// ram - all ram
34
// cpu - system memory as viewed by the cpu
35
//
36
enum EMMODE {bank0,bank1,ram,cpu};
37
38
class CLynxBase
39
{
40
// Function members
41
42
public:
43
virtual ~CLynxBase() {};
44
45
public:
46
virtual void Reset(void) {};
47
48
virtual void Poke(uint32 addr,uint8 data)=0;
49
virtual uint8 Peek(uint32 addr)=0;
50
virtual void PokeW(uint32 addr,uint16 data) {}; // ONLY mSystem overloads these, they are never use by the clients
51
virtual uint16 PeekW(uint32 addr) {return 0;};
52
virtual void BankSelect(EMMODE newbank){};
53
virtual uint32 ObjectSize(void) {return 1;};
54
55
};
56
#endif
57
58