Previous 15994 Revisions Next

r6189 Sunday 25th October, 2009 at 17:21:33 UTC by Angelo Salese
[PC98]: added a kludge to a ppi testing, bios now crashes due of missing verr/verw implementation
[src/mess/drivers]pc98.c

src/mess/drivers/pc98.c
r6188r6189
300300
301301static READ8_HANDLER( sys_port_r )
302302{
303   if(cpu_get_pc(space->cpu) == 0xf9088)
304      return 0x18; //FIXME: kludge to get over a probable PPI bug.
305
303306   if(offset & 1)
304307      return ppi8255_r(devtag_get_device(space->machine, "ppi8255_0"), (offset & 6) >> 1);
305308
r6188r6189
450453   if(offset & 1)
451454   {
452455      logerror("pit port $70 R access %02x\n",offset >> 1);
453      /* FIXME */
454456      return pit8253_r(devtag_get_device(space->machine, "pit8253"), (offset & 6) >> 1);
455457   }
456458
r6188r6189
474476   if(!(offset & 1))
475477   {
476478      logerror("pic8259 port $00 R access %02x\n",offset >> 1);
477      if((offset>>1) >= 4)
478         return pic8259_r(devtag_get_device(space->machine, "pic8259_slave"), (offset & 2) >> 1);
479      else
480         return pic8259_r(devtag_get_device(space->machine, "pic8259_master"), (offset & 2) >> 1);
479      return pic8259_r(devtag_get_device(space->machine, (offset & 8) ? "pic8259_slave" : "pic8259_master"), (offset & 2) >> 1);
481480   }
482481
483482   //logerror("DMA port $00 R access %02x\n",offset >> 1);
r6188r6189
489488   if(!(offset & 1))
490489   {
491490      logerror("pic8259 port $00 W access %02x %02x\n",offset >> 1,data);
492      if((offset>>1) >= 4)
493         pic8259_w(devtag_get_device(space->machine, "pic8259_slave"), (offset & 2) >> 1, data);
494      else
495         pic8259_w(devtag_get_device(space->machine, "pic8259_master"), (offset & 2) >> 1, data);
491      pic8259_w(devtag_get_device(space->machine, (offset & 8) ? "pic8259_slave" : "pic8259_master"), (offset & 2) >> 1, data);
496492   }
497493   else
498494   {
r6188r6189
704700   return 0;
705701}
706702
707static const gfx_layout charset =
703static const gfx_layout charset_8x8 =
708704{
709705   8,8,
710   RGN_FRAC(1,1),
706   256,
711707   1,
712708   { 0 },
713709   { 0, 1, 2, 3, 4, 5, 6, 7 },
r6188r6189
715711   8*8
716712};
717713
714static const gfx_layout charset_8x16 =
715{
716   8,16,
717   RGN_FRAC(1,1),
718   1,
719   { 0 },
720   { 0, 1, 2, 3, 4, 5, 6, 7 },
721   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
722   8*16
723};
724
718725static GFXDECODE_START( pc9801 )
719   GFXDECODE_ENTRY( "gfx1",   0x00000, charset,    0x000, 0x01 )
726   GFXDECODE_ENTRY( "gfx1",   0x00000, charset_8x8,    0x000, 0x01 )
727   GFXDECODE_ENTRY( "gfx1",   0x00800, charset_8x16,   0x000, 0x01 )
720728GFXDECODE_END
721729
722730/*
r6188r6189
735743
736744   tmp ^= 1; //<- actually related to the RTC somehow
737745   //printf("PPI Port B read\n");
738   return 0xf8 | tmp;
746   return 0xf8 | tmp; //bit 2 seems used for error stuff (returns parity error or ems error on different spots), don't know the real use of it...
739747}
740748
741749static READ8_DEVICE_HANDLER( pc98_portc_r )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team