summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Scott Stone <Tafoid@users.noreply.github.com>2014-12-19 12:02:36 -0500
committer Scott Stone <Tafoid@users.noreply.github.com>2014-12-19 12:02:36 -0500
commit8644c3686b46b96d278964c3e05c04c18cbd124d (patch)
tree6f40d846305e8b47be76436c359be6ffba12fd19
parentbb652cbfec5e86d97f45bf9ddb48337aa49c74ab (diff)
MZ-2500: Fixed floppy drive reverse behaviour, allows Laydock to get farther [Takeda Toshiya, Angelo Salese]
-rw-r--r--src/mess/drivers/mz2500.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mess/drivers/mz2500.c b/src/mess/drivers/mz2500.c
index 9508f5a7b27..002709ca562 100644
--- a/src/mess/drivers/mz2500.c
+++ b/src/mess/drivers/mz2500.c
@@ -1183,13 +1183,14 @@ WRITE8_MEMBER(mz2500_state::mz2500_irq_data_w)
WRITE8_MEMBER(mz2500_state::mz2500_fdc_w)
{
mb8877_device *fdc = machine().device<mb8877_device>("mb8877a");
-
+ UINT8 drivenum;
switch(offset+0xdc)
{
case 0xdc:
- fdc->set_drive(data & 3);
- floppy_get_device(machine(), data & 3)->floppy_mon_w((data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
- floppy_get_device(machine(), data & 3)->floppy_drive_set_ready_state(1,0);
+ drivenum = (data & 3) ^ m_fdc_reverse;
+ fdc->set_drive(drivenum);
+ floppy_get_device(machine(), drivenum)->floppy_mon_w((data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
+ floppy_get_device(machine(), drivenum)->floppy_drive_set_ready_state(1,0);
break;
case 0xdd:
fdc->set_side((data & 1));
@@ -1267,13 +1268,13 @@ WRITE8_MEMBER(mz2500_state::palette4096_io_w)
READ8_MEMBER(mz2500_state::mz2500_wd17xx_r)
{
mb8877_device *fdc = machine().device<mb8877_device>("mb8877a");
- return fdc->read(space, offset) ^ m_fdc_reverse;
+ return fdc->read(space, offset) ^ 0xff;
}
WRITE8_MEMBER(mz2500_state::mz2500_wd17xx_w)
{
mb8877_device *fdc = machine().device<mb8877_device>("mb8877a");
- fdc->write(space, offset, data ^ m_fdc_reverse);
+ fdc->write(space, offset, data ^ 0xff);
}
READ8_MEMBER(mz2500_state::mz2500_bplane_latch_r)
@@ -1982,7 +1983,7 @@ WRITE8_MEMBER(mz2500_state::opn_porta_w)
---- --x- floppy reverse bit (controls wd17xx bits in command registers)
*/
- m_fdc_reverse = (data & 2) ? 0x00 : 0xff;
+ m_fdc_reverse = data & 2;
m_pal_select = (data & 4) ? 1 : 0;
m_ym_porta = data;