Previous 15994 Revisions Next

r10125 Friday 21st January, 2011 at 20:16:38 UTC by Angelo Salese
[PC-8801]: Added irq latch mechanism, makes Ys 2 to boot
[src/mess/drivers]pc8801.c

src/mess/drivers/pc8801.c
r10124r10125
2424   - American Success: reads the light pen?
2525   - Alpha (demo): crashes with "illegal function" msg;
2626   - Balance of Power: attempt to use the SIO port for mouse polling, worked around for now;
27   - Balance of Power: moans with a JP msg;
2827   - Battle Entry: moans with a JP msg then dies if you try to press either numpad 1 or 2 (asks if the user wants to use the sound board (yes 1 / no 2)
2928   - Bishoujo Baseball Gakuen: checks ym2608 after intro screen;
3029   - Blue Moon Story: moans with a kanji msg;.
r10124r10125
4847   - Tobira wo Akete (random crashes in parent pc8801 only)
4948
5049   games that needs to NOT have write-protect floppies (BTANBs):
50   - Balance of Power
5151   - Tobira wo Akete (hangs at title screen)
5252
5353   Notes:
r10124r10125
151151static UINT8 fdc_irq_opcode;
152152static UINT8 ext_rom_bank,gfx_ctrl,vram_sel,misc_ctrl,device_ctrl_data;
153153static UINT8 vrtc_irq_mask,rtc_irq_mask,sound_irq_mask;
154static UINT8 vrtc_irq_latch,rtc_irq_latch,sound_irq_latch;
154155static UINT8 window_offset_bank;
155156static UINT8 layer_mask;
156157static UINT8 i8214_irq_level,i8214_irq_state;
r10124r10125
909910   rtc_irq_mask = data & 1;
910911   vrtc_irq_mask = data & 2;
911912
913   if(rtc_irq_mask && rtc_irq_latch)
914   {
915      rtc_irq_latch = 0;
916      pc8801_raise_irq(space->machine,2);
917   }
918   else if(vrtc_irq_mask && vrtc_irq_latch)
919   {
920      vrtc_irq_latch = 0;
921      pc8801_raise_irq(space->machine,1);
922   }
923
912924   //if(data & 4)
913925   //   printf("IRQ mask %02x\n",data);
914926}
r10124r10125
939951   misc_ctrl = data;
940952
941953   sound_irq_mask = ((data & 0x80) == 0);
954
955   if(sound_irq_mask && sound_irq_latch)
956   {
957      sound_irq_latch = 0;
958      pc8801_raise_irq(space->machine,4);
959   }
942960}
943961
944962static WRITE8_HANDLER( pc8801_palram_w )
r10124r10125
16261644{
16271645   if(sound_irq_mask)
16281646      pc8801_raise_irq(device->machine,4);
1647   else
1648      sound_irq_latch = 1;
16291649}
16301650
16311651/* TODO: mouse routing (that's why I don't use DEVCB_INPUT_PORT here) */
r10124r10125
16741694   int level, i;
16751695
16761696   level = 0;
1677   for (i = 0; i < 8; i++)
1697   for (i = 8; i > 0; i--)
16781698   {
16791699      if ((i8214_irq_state & (1<<i))!=0)
1700      {
16801701         level = i;
1702      }
16811703   }
16821704
16831705   i8214_irq_state &= ~(1<<level);
1706
16841707   return level*2;
16851708}
16861709
r10124r10125
16881711{
16891712   if(rtc_irq_mask)
16901713      pc8801_raise_irq(machine,2);
1714   else
1715      rtc_irq_latch = 1;
16911716}
16921717
16931718static MACHINE_START( pc8801 )
r10124r10125
17371762      rtc_irq_mask = 0;
17381763      sound_irq_mask = 0;
17391764
1765      rtc_irq_latch = 0;
1766      vrtc_irq_latch = 0;
1767      sound_irq_latch = 0;
1768
17401769      i8214_irq_level = 0;
17411770      i8214_irq_state = 0;
17421771   }
r10124r10125
17791808{
17801809   if(vrtc_irq_mask)
17811810      pc8801_raise_irq(device->machine,1);
1811   else
1812      vrtc_irq_latch = 1;
17821813}
17831814
17841815static MACHINE_CONFIG_START( pc8801, driver_device )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team