trunk/src/mess/drivers/mikrosha.c
r241789 | r241790 | |
21 | 21 | { |
22 | 22 | public: |
23 | 23 | mikrosha_state(const machine_config &mconfig, device_type type, const char *tag) |
24 | | : radio86_state(mconfig, type, tag) { } |
| 24 | : radio86_state(mconfig, type, tag), |
| 25 | m_cart(*this, "cartslot") |
| 26 | { } |
25 | 27 | DECLARE_WRITE_LINE_MEMBER(mikrosha_pit_out2); |
26 | 28 | I8275_DRAW_CHARACTER_MEMBER(display_pixels); |
| 29 | DECLARE_MACHINE_RESET(mikrosha); |
| 30 | |
| 31 | protected: |
| 32 | required_device<generic_slot_device> m_cart; |
27 | 33 | }; |
28 | 34 | |
| 35 | MACHINE_RESET_MEMBER(mikrosha_state,mikrosha) |
| 36 | { |
| 37 | if (m_cart->exists()) |
| 38 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x8000, 0x8000+m_cart->get_rom_size()-1, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 39 | radio86_state::machine_reset(); |
| 40 | } |
29 | 41 | |
30 | 42 | /* Address maps */ |
31 | 43 | static ADDRESS_MAP_START(mikrosha_mem, AS_PROGRAM, 8, mikrosha_state ) |
32 | 44 | AM_RANGE( 0x0000, 0x0fff ) AM_RAMBANK("bank1") // First bank |
33 | 45 | AM_RANGE( 0x1000, 0x7fff ) AM_RAM // RAM |
34 | | AM_RANGE( 0x8000, 0xbfff ) AM_READ(radio_cpu_state_r) // Not connected |
35 | 46 | AM_RANGE( 0xc000, 0xc003 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x07fc) |
36 | 47 | AM_RANGE( 0xc800, 0xc803 ) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) AM_MIRROR(0x07fc) |
37 | 48 | AM_RANGE( 0xd000, 0xd001 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x07fe) // video |
r241789 | r241790 | |
189 | 200 | MCFG_CPU_PROGRAM_MAP(mikrosha_mem) |
190 | 201 | MCFG_CPU_IO_MAP(mikrosha_io) |
191 | 202 | |
192 | | MCFG_MACHINE_RESET_OVERRIDE(mikrosha_state, radio86 ) |
| 203 | MCFG_MACHINE_RESET_OVERRIDE(mikrosha_state, mikrosha) |
193 | 204 | |
194 | 205 | MCFG_DEVICE_ADD("ppi8255_1", I8255, 0) |
195 | 206 | MCFG_I8255_IN_PORTA_CB(READ8(radio86_state, radio86_8255_portb_r2)) |
r241789 | r241790 | |
238 | 249 | MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) |
239 | 250 | MCFG_CASSETTE_INTERFACE("mikrosha_cass") |
240 | 251 | |
| 252 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "mikrosha_cart") |
| 253 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 254 | |
241 | 255 | MCFG_SOFTWARE_LIST_ADD("cass_list","mikrosha") |
| 256 | MCFG_SOFTWARE_LIST_ADD("cart_list","mikrosha_cart") |
242 | 257 | MACHINE_CONFIG_END |
243 | 258 | |
244 | 259 | |