/***************************************************************************************1* Genesis Plus2* Z80 bus handlers (Genesis & Master System modes)3*4* Support for SG-1000, Mark-III, Master System, Game Gear & Mega Drive ports access5*6* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code)7* Copyright (C) 2007-2011 Eke-Eke (Genesis Plus GX)8*9* Redistribution and use of this code or any derivative works are permitted10* provided that the following conditions are met:11*12* - Redistributions may not be sold, nor may they be used in a commercial13* product or activity.14*15* - Redistributions that are modified from the original source must include the16* complete source code, including the source code for all components used by a17* binary built from the modified sources. However, as a special exception, the18* source code distributed need not include anything that is normally distributed19* (in either source or binary form) with the major components (compiler, kernel,20* and so on) of the operating system on which the executable runs, unless that21* component itself accompanies the executable.22*23* - Redistributions must reproduce the above copyright notice, this list of24* conditions and the following disclaimer in the documentation and/or other25* materials provided with the distribution.26*27* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"28* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE29* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE30* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE31* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR32* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF33* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS34* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN35* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)36* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE37* POSSIBILITY OF SUCH DAMAGE.38*39****************************************************************************************/4041#ifndef _MEMZ80_H_42#define _MEMZ80_H_4344extern unsigned char z80_memory_r(unsigned int address);45extern void z80_memory_w(unsigned int address, unsigned char data);46extern unsigned char z80_unused_port_r(unsigned int port);47extern void z80_unused_port_w(unsigned int port, unsigned char data);48extern unsigned char z80_md_port_r(unsigned int port);49extern void z80_md_port_w(unsigned int port, unsigned char data);50extern unsigned char z80_gg_port_r(unsigned int port);51extern void z80_gg_port_w(unsigned int port, unsigned char data);52extern unsigned char z80_ms_port_r(unsigned int port);53extern void z80_ms_port_w(unsigned int port, unsigned char data);54extern unsigned char z80_m3_port_r(unsigned int port);55extern void z80_m3_port_w(unsigned int port, unsigned char data);56extern unsigned char z80_sg_port_r(unsigned int port);57extern void z80_sg_port_w(unsigned int port, unsigned char data);5859#endif /* _MEMZ80_H_ */606162