summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/includes/c65.h
blob: ff0df05c0b80bb2c0fdd5f5511468aef64a856fc (plain) (blame)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*****************************************************************************
 *
 * includes/c65.h
 *
 ****************************************************************************/

#ifndef C65_H_
#define C65_H_

#include "includes/c64_legacy.h"
#include "machine/6526cia.h"

typedef struct
{
	int version;
	UINT8 data[4];
} dma_t;

typedef struct
{
	int state;

	UINT8 reg[0x0f];

	UINT8 buffer[0x200];
	int cpu_pos;
	int fdc_pos;

	UINT16 status;

	attotime time;
	int head,track,sector;
} fdc_t;

typedef struct
{
	UINT8 reg;
} expansion_ram_t;

class c65_state : public legacy_c64_state
{
public:
	c65_state(const machine_config &mconfig, device_type type, const char *tag)
		: legacy_c64_state(mconfig, type, tag) { }

	UINT8 *m_chargen;
	UINT8 *m_interface;
	int m_charset_select;
	int m_c64mode;
	UINT8 m_6511_port;
	UINT8 m_keyline;
	int m_old_value;
	int m_nmilevel;
	dma_t m_dma;
	int m_dump_dma;
	fdc_t m_fdc;
	expansion_ram_t m_expansion_ram;
	int m_io_on;
	int m_io_dc00_on;
	DECLARE_DRIVER_INIT(c65);
	DECLARE_DRIVER_INIT(c65pal);

	DECLARE_READ8_MEMBER( sid_potx_r );
	DECLARE_READ8_MEMBER( sid_poty_r );
};


/*----------- defined in machine/c65.c -----------*/

/*extern UINT8 *c65_memory; */
/*extern UINT8 *c65_basic; */
/*extern UINT8 *c65_kernal; */
/*extern UINT8 *c65_dos; */
/*extern UINT8 *c65_monitor; */
/*extern UINT8 *c65_graphics; */

void c65_bankswitch (running_machine &machine);
//void c65_colorram_write (running_machine &machine, int offset, int value);

int c65_dma_read(running_machine &machine, int offset);
int c65_dma_read_color(running_machine &machine, int offset);
void c65_vic_interrupt(running_machine &machine, int level);
void c65_bankswitch_interface(running_machine &machine, int value);

MACHINE_START( c65 );
INTERRUPT_GEN( c65_frame_interrupt );

extern const mos6526_interface c65_cia0;
extern const mos6526_interface c65_cia1;

#endif /* C65_H_ */