summaryrefslogtreecommitdiff
path: root/libsidplay2/sidplay-libs-2.1.0/libsidplay/src/c64/c64vic.h
blob: d9b2f9342375e67e9c412fc341462b7e24a511f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/***************************************************************************
                          c64vic.h  -  C64 VIC
                             -------------------
    begin                : Fri Apr 4 2001
    copyright            : (C) 2001 by Simon White
    email                : s_a_white@email.com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef _c64vic_h_
#define _c64vic_h_

// The VIC emulation is very generic and here we need to effectively
// wire it into the computer (like adding a chip to a PCB).
#include "c64env.h"
#include "../mos656x/mos656x.h"

class c64vic: public MOS656X
{
private:
    c64env &m_env;

protected:
    void interrupt (bool state)
    {
        m_env.interruptIRQ (state);
    }

    void busaccess (bool state)
    {
        m_env.signalBA (state);
    }

    void addrctrl (bool state)
    {
        m_env.signalAEC (state);
    }

public:
    c64vic (c64env *env)
    :MOS656X(&(env->context ())),
     m_env(*env) {}
    const char *error (void) {return "";}
};

#endif // _c64vic_h_