trunk/src/mame/machine/megadriv.c
r22016 | r22017 | |
28 | 28 | |
29 | 29 | MACHINE_CONFIG_EXTERN( megadriv ); |
30 | 30 | |
31 | | |
32 | | static cpu_device *_genesis_snd_z80_cpu; |
33 | 31 | int genesis_other_hacks = 0; // misc hacks |
34 | 32 | |
35 | 33 | timer_device* megadriv_scanline_timer; |
r22016 | r22017 | |
1222 | 1220 | void md_base_state::megadriv_init_common() |
1223 | 1221 | { |
1224 | 1222 | /* Look to see if this system has the standard Sound Z80 */ |
1225 | | _genesis_snd_z80_cpu = machine().device<cpu_device>("genesis_snd_z80"); |
1226 | | if (_genesis_snd_z80_cpu != NULL) |
| 1223 | if (machine().device("genesis_snd_z80")) |
1227 | 1224 | { |
1228 | | //printf("GENESIS Sound Z80 cpu found '%s'\n", _genesis_snd_z80_cpu->tag() ); |
1229 | | |
| 1225 | //printf("GENESIS Sound Z80 cpu found '%s'\n", machine().device("genesis_snd_z80")->tag()); |
1230 | 1226 | genz80.z80_prgram = auto_alloc_array(machine(), UINT8, 0x2000); |
1231 | | membank("bank1")->set_base(genz80.z80_prgram ); |
| 1227 | membank("bank1")->set_base(genz80.z80_prgram); |
1232 | 1228 | } |
1233 | 1229 | |
1234 | 1230 | /* Look to see if this system has the 32x Master SH2 */ |
trunk/src/mame/includes/megadriv.h
r22016 | r22017 | |
80 | 80 | public: |
81 | 81 | md_base_state(const machine_config &mconfig, device_type type, const char *tag) |
82 | 82 | : driver_device(mconfig, type, tag), |
| 83 | m_maincpu(*this,"maincpu"), |
| 84 | m_z80snd(*this,"genesis_snd_z80"), |
83 | 85 | m_vdp(*this,"gen_vdp"), |
84 | 86 | m_segacd(*this,"segacd"), |
85 | 87 | m_megadrive_ram(*this,"megadrive_ram") |
86 | 88 | { } |
| 89 | optional_device<cpu_device> m_maincpu; |
| 90 | optional_device<cpu_device> m_z80snd; |
87 | 91 | required_device<sega_genesis_vdp_device> m_vdp; |
88 | 92 | optional_device<sega_segacd_device> m_segacd; |
89 | 93 | optional_shared_ptr<UINT16> m_megadrive_ram; |