-
Notifications
You must be signed in to change notification settings - Fork 6
/
fc1004.h
149 lines (138 loc) · 2.82 KB
/
fc1004.h
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/*
* Copyright (C) 2023 nukeykt
*
* This file is part of Nuked-MD.
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* FC1004 emulator
* Thanks:
* org (ogamespec):
* FC1004 decap and die shot.
* andkorzh, HardWareMan (emu-russia):
* help & support.
*
*/
#pragma once
#include "common.h"
#include "fm.h"
#include "vdp.h"
#include "arbiter.h"
#include "iochip.h"
#include "tmss.h"
#pragma pack(push, 1)
typedef struct
{
fm_t fm;
vdp_t vdp;
arbiter_t arb;
iochip_t ioc;
tmss_t tmss;
int cpu_reset;
int hl_vdp;
int intak_vdp;
int oe0_arb;
int mreq_vdp;
int vz;
int za0_dir;
int za1_dir;
int za7_dir;
int ce0_tmss;
int fm_clk;
int vdp_data_dir;
int vdp_address_dir;
int br;
int bgack;
int dtack;
int colorbus;
int fm_read;
int old_dclk[3];
int i_hsync;
int i_m3;
int i_ntsc;
int i_sound;
int i_zres;
int i_zbr;
int i_disk;
int i_test0;
int i_jap;
int i_fres;
int i_zv;
int i_vz;
int i_io;
int i_zaddress;
int i_vaddress;
int i_sres;
int i_sel1;
int i_vclk;
int i_zclk;
int i_edclk;
int i_vdata;
int i_bgack;
int i_bg;
int i_iorq;
int i_zrd;
int i_zwr;
int i_m1;
int i_as;
int i_uds;
int i_lds;
int i_dtack;
int i_lwr;
int i_cas0;
int i_zdata;
int i_rw;
int i_cart;
int o_ys;
int o_vsync;
int o_hsync;
int o_halt;
int o_reset;
int o_mreq;
int o_sound;
int o_zres;
int o_zbr;
int o_wait;
int o_ce0;
int o_disk;
int o_test0;
int o_jap;
int o_fres;
int o_zv;
int o_vz;
int o_io;
int o_zaddress;
int o_zaddress_dir;
int o_vclk;
int o_zclk;
int o_edclk;
int o_vdata;
int o_vdata_dir;
int o_vaddress;
int o_vaddress_dir;
int o_br;
int o_bgack;
int o_zrd;
int o_zwr;
int o_as;
int o_uds;
int o_lds;
int o_dtack;
int o_lwr;
int o_cas0;
int o_zdata;
int o_zdata_dir;
int o_rw;
} fc1004_t;
#pragma pack(pop)
void FC1004_Init(fc1004_t *chip);
void FC1004_Destroy(fc1004_t* chip);
void FC1004_Clock(fc1004_t *chip, int mclk, uint64_t cycles);