00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef C64VIC_H
00024 #define C64VIC_H
00025
00026
00027
00028
00029 #include "Banks/Bank.h"
00030 #include "sidplayfp/c64/c64env.h"
00031 #include "sidplayfp/sidendian.h"
00032 #include "VIC_II/mos656x.h"
00033
00038 class c64vic: public MOS656X, public Bank
00039 {
00040 private:
00041 c64env &m_env;
00042
00043 protected:
00044 void interrupt(bool state)
00045 {
00046 m_env.interruptIRQ (state);
00047 }
00048
00049 void setBA(bool state)
00050 {
00051 m_env.setBA (state);
00052 }
00053
00054 public:
00055 c64vic(c64env *env) :
00056 MOS656X(&(env->context ())),
00057 m_env(*env) {}
00058
00059 void poke(uint_least16_t address, uint8_t value)
00060 {
00061 write(endian_16lo8(address), value);
00062 }
00063
00064 uint8_t peek(uint_least16_t address)
00065 {
00066 return read(endian_16lo8(address));
00067 }
00068
00069 const char *error() const { return ""; }
00070 };
00071
00072 #endif // C64VIC_H