/***************************************************************************************1* Genesis Plus2* Internal hardware & Bus controllers3*4* Support for SG-1000, Mark-III, Master System, Game Gear, Mega Drive & Mega CD hardware5*6* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code)7* Copyright (C) 2007-2013 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 _GENESIS_H_42#define _GENESIS_H_4344#include "md_cart.h"45#include "sms_cart.h"46#include "scd.h"4748/* External Hardware */49typedef struct50{51md_cart_t md_cart;52cd_hw_t cd_hw;53} external_t;5455/* Global variables */56extern external_t ext;57extern uint8 boot_rom[0x800];58extern uint8 work_ram[0x10000];59extern uint8 zram[0x2000];60extern uint32 zbank;61extern uint8 zstate;62extern uint8 pico_current;6364/* Function prototypes */65extern void gen_init(void);66extern void gen_reset(int hard_reset);67extern void gen_tmss_w(unsigned int offset, unsigned int data);68extern void gen_bankswitch_w(unsigned int data);69extern unsigned int gen_bankswitch_r(void);70extern void gen_zbusreq_w(unsigned int state, unsigned int cycles);71extern void gen_zreset_w(unsigned int state, unsigned int cycles);72extern void gen_zbank_w(unsigned int state);73extern int z80_irq_callback(int param);7475#endif /* _GEN_H_ */76777879