@@ -243,10 +243,7 @@ void scorpion_state::update_io(bool dos_enable)
243
243
244
244
scorpion_update_memory ();
245
245
246
- if (dos ())
247
- m_io_shadow_view.select (0 );
248
- else
249
- m_io_shadow_view.disable ();
246
+ m_io_shadow_view.select (dos () ? 1 : 0 );
250
247
}
251
248
252
249
u8 scorpion_state::port_ff_r ()
@@ -337,10 +334,7 @@ void scorpion_state::scorpion_mem(address_map &map)
337
334
void scorpion_state::scorpion_io (address_map &map)
338
335
{
339
336
map.unmap_value_high ();
340
- map (0x0022 , 0x0022 ).select (0xffdc ) // FE | xxxxxxxxxx1xxx10
341
- .rw (FUNC (scorpion_state::spectrum_ula_r), FUNC (scorpion_state::spectrum_ula_w));
342
- map (0x0023 , 0x0023 ).mirror (0xffdc ) // FF | xxxxxxxxxx1xxx11
343
- .r (FUNC (scorpion_state::port_ff_r));
337
+
344
338
map (0x0021 , 0x0021 ).mirror (0x3fdc ) // 1FFD | 00xxxxxxxx1xxx01
345
339
.w (FUNC (scorpion_state::port_1ffd_w));
346
340
map (0x4021 , 0x4021 ).mirror (0x3fdc ) // 7FFD | 01xxxxxxxx1xxx01
@@ -351,23 +345,28 @@ void scorpion_state::scorpion_io(address_map &map)
351
345
map (0xe021 , 0xe021 ).mirror (0x1fdc ) // FFFD | 111xxxxxxx1xxx01
352
346
.lr8 (NAME ([this ]() { return m_ay[m_ay_selected]->data_r (); })).w (FUNC (scorpion_state::ay_address_w));
353
347
354
- // Mouse
355
- map (0xfadf , 0xfadf ).lr8 (NAME ([this ]() -> u8 { return 0x80 | (m_io_mouse[2 ]->read () & 0x07 ); }));
356
- map (0xfbdf , 0xfbdf ).lr8 (NAME ([this ]() -> u8 { return m_io_mouse[0 ]->read (); }));
357
- map (0xffdf , 0xffdf ).lr8 (NAME ([this ]() -> u8 { return ~m_io_mouse[1 ]->read (); }));
358
- map (0x0003 , 0x0003 ) // 1F | xxxxxxxx0x0xxx11
348
+ map (0x0000 , 0xffff ).view (m_io_shadow_view);
349
+
350
+ // !Shadow
351
+ m_io_shadow_view[0 ](0x0022 , 0x0022 ).select (0xffdc ) // FE | xxxxxxxxxx1xxx10
352
+ .rw (FUNC (scorpion_state::spectrum_ula_r), FUNC (scorpion_state::spectrum_ula_w));
353
+ m_io_shadow_view[0 ](0x0023 , 0x0023 ).mirror (0xffdc ) // FF | xxxxxxxxxx1xxx11
354
+ .r (FUNC (scorpion_state::port_ff_r));
355
+ m_io_shadow_view[0 ](0xfadf , 0xfadf ).lr8 (NAME ([this ]() -> u8 { return 0x80 | (m_io_mouse[2 ]->read () & 0x07 ); }));
356
+ m_io_shadow_view[0 ](0xfbdf , 0xfbdf ).lr8 (NAME ([this ]() -> u8 { return m_io_mouse[0 ]->read (); }));
357
+ m_io_shadow_view[0 ](0xffdf , 0xffdf ).lr8 (NAME ([this ]() -> u8 { return ~m_io_mouse[1 ]->read (); }));
358
+ m_io_shadow_view[0 ](0x0003 , 0x0003 ) // 1F | xxxxxxxx0x0xxx11
359
359
.select (0xff5c ).lr8 (NAME ([this ]() -> u8 { return (m_beta->state_r () & 0xc0 ) | 0x00 ; })); // TODO Kepmston Joystick
360
360
361
361
// Shadow
362
362
// DOS + xxxxxxxx0nnxxx11
363
- map (0x0000 , 0xffff ).view (m_io_shadow_view);
364
- m_io_shadow_view[0 ](0x0003 , 0x0003 ).mirror (0xff1c ).rw (m_beta, FUNC (beta_disk_device::status_r), FUNC (beta_disk_device::command_w));
365
- m_io_shadow_view[0 ](0x0023 , 0x0023 ).mirror (0xff1c ).rw (m_beta, FUNC (beta_disk_device::track_r), FUNC (beta_disk_device::track_w));
366
- m_io_shadow_view[0 ](0x0043 , 0x0043 ).mirror (0xff1c ).rw (m_beta, FUNC (beta_disk_device::sector_r), FUNC (beta_disk_device::sector_w));
367
- m_io_shadow_view[0 ](0x0063 , 0x0063 ).mirror (0xff1c ).rw (m_beta, FUNC (beta_disk_device::data_r), FUNC (beta_disk_device::data_w));
368
- m_io_shadow_view[0 ](0x00e3 , 0x00e3 ).mirror (0xff1c ).rw (m_beta, FUNC (beta_disk_device::state_r), FUNC (beta_disk_device::param_w));
363
+ m_io_shadow_view[1 ](0x0003 , 0x0003 ).mirror (0xff1c ).rw (m_beta, FUNC (beta_disk_device::status_r), FUNC (beta_disk_device::command_w));
364
+ m_io_shadow_view[1 ](0x0023 , 0x0023 ).mirror (0xff1c ).rw (m_beta, FUNC (beta_disk_device::track_r), FUNC (beta_disk_device::track_w));
365
+ m_io_shadow_view[1 ](0x0043 , 0x0043 ).mirror (0xff1c ).rw (m_beta, FUNC (beta_disk_device::sector_r), FUNC (beta_disk_device::sector_w));
366
+ m_io_shadow_view[1 ](0x0063 , 0x0063 ).mirror (0xff1c ).rw (m_beta, FUNC (beta_disk_device::data_r), FUNC (beta_disk_device::data_w));
367
+ m_io_shadow_view[1 ](0x00e3 , 0x00e3 ).mirror (0xff1c ).rw (m_beta, FUNC (beta_disk_device::state_r), FUNC (beta_disk_device::param_w));
369
368
370
- subdevice<zxbus_device>(" zxbus" )->install_shadow_io (m_io_shadow_view[0 ]);
369
+ subdevice<zxbus_device>(" zxbus" )->set_io_space (m_io_shadow_view[0 ], m_io_shadow_view[ 1 ]);
371
370
}
372
371
373
372
void scorpion_state::scorpion_switch (address_map &map)
@@ -531,9 +530,8 @@ void scorpion_state::scorpion(machine_config &config)
531
530
config.device_remove (" exp" );
532
531
533
532
zxbus_device &zxbus (ZXBUS (config, " zxbus" , 0 ));
534
- zxbus.set_iospace (" maincpu" , AS_IO);
535
- ZXBUS_SLOT (config, " zxbus:1" , 0 , " zxbus" , zxbus_gmx_cards, nullptr );
536
- ZXBUS_SLOT (config, " zxbus:2" , 0 , " zxbus" , zxbus_gmx_cards, nullptr );
533
+ ZXBUS_SLOT (config, " zxbus:1" , 0 , zxbus, zxbus_gmx_cards, nullptr );
534
+ ZXBUS_SLOT (config, " zxbus:2" , 0 , zxbus, zxbus_gmx_cards, nullptr );
537
535
}
538
536
539
537
void scorpion_state::profi (machine_config &config)
0 commit comments