Previous 15994 Revisions Next

r8922 Friday 27th August, 2010 at 14:24:23 UTC by Angelo Salese
[MZ2500]: Added fdc reverse register
[src/mess/drivers]mz2500.c

src/mess/drivers/mz2500.c
r8921r8922
3737static UINT8 bank_val[8],bank_addr;
3838static UINT8 irq_sel,irq_vector[4];
3939static UINT8 kanji_bank;
40static UINT8 fdc_reverse;
4041
4142#define WRAM_RESET 0
4243#define IPL_RESET 1
r8921r8922
424425   palette_set_color_rgb(space->machine, pal_entry+0x200,pal4bit(r[pal_entry]),pal4bit(g[pal_entry]),pal4bit(b[pal_entry]));
425426}
426427
427static READ8_DEVICE_HANDLER( mz2500_wd17xx_r )
428static READ8_DEVICE_HANDLER( mz2500_wd17xx_r )
428429{
429   return wd17xx_r(device, offset) ^ 0xff;
430   return wd17xx_r(device, offset) ^ fdc_reverse;
430431}
431432
432433static WRITE8_DEVICE_HANDLER( mz2500_wd17xx_w )
433434{
434   wd17xx_w(device, offset, data ^ 0xff);
435   wd17xx_w(device, offset, data ^ fdc_reverse);
435436}
436437
437438static ADDRESS_MAP_START(mz2500_io, ADDRESS_SPACE_IO, 8)
r8921r8922
700701   DEVCB_NULL
701702};
702703
704static WRITE8_DEVICE_HANDLER( opn_porta_w )
705{
706   /*
707   ---- x--- mouse select
708   ---- -x-- palette bit (16/4096 colors)
709   ---- --x- floppy reverse bit (controls wd17xx bits in command registers)
710   */
711
712   //printf("%02x\n",data);
713   fdc_reverse = data & 2 ? 0x00 : 0xff;
714}
715
703716static const ym2203_interface ym2203_interface_1 =
704717{
705718   {
r8921r8922
707720      AY8910_DEFAULT_LOADS,
708721      DEVCB_INPUT_PORT("DSW0"),   // read A
709722      DEVCB_INPUT_PORT("DSW1"),   // read B
710      DEVCB_NULL,               // write A
723      DEVCB_HANDLER(opn_porta_w),   // write A
711724      DEVCB_NULL               // write B
712725   },
713726   NULL

Previous 15994 Revisions Next


© 1998-2018 The MESS Team