libsidplayfp  0.3.5
c64env.h
1 /***************************************************************************
2  c64env.h - The C64 environment interface.
3  -------------------
4  begin : Fri Apr 4 2001
5  copyright : (C) 2001 by Simon White
6  email : s_a_white@email.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef _c64env_h_
19 #define _c64env_h_
20 
21 #include "sidtypes.h"
22 #include "event.h"
23 
24 /* An implementation of of this class can be created to perform the C64
25  specifics. A pointer to this child class can then be passed to
26  each of the conponents so they can interact with it.
27 */
28 
29 class c64env
30 {
31 private:
32  EventContext &m_context;
33 
34 public:
35  c64env (EventContext *context)
36  :m_context (*context) {}
37  EventContext &context (void) const { return m_context; }
38  virtual void interruptIRQ (const bool state) = 0;
39  virtual void interruptNMI (void) = 0;
40  virtual void interruptRST (void) = 0;
41  virtual void signalAEC (const bool state) = 0;
42  virtual uint8_t readMemRamByte (const uint_least16_t addr) = 0;
43  virtual void sid2crc (const uint8_t data) = 0;
44  virtual void lightpen () = 0;
45 };
46 
47 #endif // _c64env_h_