Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/genplus-gx32/core/mem68k.h
2 views
1
/***************************************************************************************
2
* Genesis Plus
3
* Main 68k bus handlers
4
*
5
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code)
6
* Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX)
7
*
8
* Redistribution and use of this code or any derivative works are permitted
9
* provided that the following conditions are met:
10
*
11
* - Redistributions may not be sold, nor may they be used in a commercial
12
* product or activity.
13
*
14
* - Redistributions that are modified from the original source must include the
15
* complete source code, including the source code for all components used by a
16
* binary built from the modified sources. However, as a special exception, the
17
* source code distributed need not include anything that is normally distributed
18
* (in either source or binary form) with the major components (compiler, kernel,
19
* and so on) of the operating system on which the executable runs, unless that
20
* component itself accompanies the executable.
21
*
22
* - Redistributions must reproduce the above copyright notice, this list of
23
* conditions and the following disclaimer in the documentation and/or other
24
* materials provided with the distribution.
25
*
26
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
30
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
* POSSIBILITY OF SUCH DAMAGE.
37
*
38
****************************************************************************************/
39
40
#ifndef _MEM68K_H_
41
#define _MEM68K_H_
42
43
/* unused areas */
44
extern unsigned int m68k_read_bus_8(unsigned int address);
45
extern unsigned int m68k_read_bus_16(unsigned int address);
46
extern void m68k_unused_8_w(unsigned int address, unsigned int data);
47
extern void m68k_unused_16_w(unsigned int address, unsigned int data);
48
49
/* illegal areas */
50
extern unsigned int m68k_lockup_r_8(unsigned int address);
51
extern unsigned int m68k_lockup_r_16(unsigned int address);
52
extern void m68k_lockup_w_8(unsigned int address, unsigned int data);
53
extern void m68k_lockup_w_16(unsigned int address, unsigned int data);
54
55
/* Z80 bus */
56
extern unsigned int z80_read_byte(unsigned int address);
57
extern unsigned int z80_read_word(unsigned int address);
58
extern void z80_write_byte(unsigned int address, unsigned int data);
59
extern void z80_write_word(unsigned int address, unsigned int data);
60
61
/* I/O & Control registers */
62
extern unsigned int ctrl_io_read_byte(unsigned int address);
63
extern unsigned int ctrl_io_read_word(unsigned int address);
64
extern void ctrl_io_write_byte(unsigned int address, unsigned int data);
65
extern void ctrl_io_write_word(unsigned int address, unsigned int data);
66
67
/* VDP */
68
extern unsigned int vdp_read_byte(unsigned int address);
69
extern unsigned int vdp_read_word(unsigned int address);
70
extern void vdp_write_byte(unsigned int address, unsigned int data);
71
extern void vdp_write_word(unsigned int address, unsigned int data);
72
73
/* PICO */
74
extern unsigned int pico_read_byte(unsigned int address);
75
extern unsigned int pico_read_word(unsigned int address);
76
77
#endif /* _MEM68K_H_ */
78
79