Previous 15994 Revisions Next

r15853 Saturday 11th August, 2012 at 21:17:17 UTC by Angelo Salese
[PC-8801]: added pending sound irq mechanism, fixes Megami Tensei gameplay hang
[src/mess/drivers]pc8801.c

src/mess/drivers/pc8801.c
r15852r15853
8181    - Daikoukai Jidai
8282   - Day Dream (hangs at the CrossMedia Soft logo)
8383   - Demons Ring
84   (Dennou Suikoden)
84   - Dennou Tsuushin
8585    - Door Door MK-2 (sets up TC in the middle of execution phase read then wants status bit 6 to be low PC=0x7050 of fdc cpu)
8686    - Harakiri
8787    - MakaiMura (attempts to r/w the sio ports, but it's clearly crashed)
r15852r15853
9494   - Alpha (demo): stuck note in title screen, doesn't seem to go further;
9595    - Ayumi: black screen after new game / load game screen;
9696    - Brunette: No sound, eventually hangs at gameplay;
97    - Digital Devil Story Megami Tensei: hangs at gameplay (sound irq issue)
98    - Double Face: hangs at logo (sound irq issue)
9799
98100    games that needs to NOT have write-protect floppies (BTANBs):
99101    - Balance of Power
r15852r15853
280282   UINT8 m_timer_irq_latch;
281283   UINT8 m_sound_irq_mask;
282284   UINT8 m_sound_irq_latch;
285   UINT8 m_sound_irq_pending;
283286#endif
284287   UINT8 m_has_clock_speed;
285288   UINT8 m_clock_setting;
r15852r15853
12991302
13001303   if(m_timer_irq_latch == 0 && m_vrtc_irq_latch == 0 && m_sound_irq_latch == 0)
13011304      cputag_set_input_line(machine(),"maincpu",0,CLEAR_LINE);
1305
1306   if(m_sound_irq_mask && m_sound_irq_pending)
1307   {
1308      cputag_set_input_line(machine(),"maincpu",0,HOLD_LINE);
1309      m_sound_irq_latch = 1;
1310      m_sound_irq_pending = 0;
1311   }
1312
13021313   #endif
13031314}
13041315
r15852r15853
16561667
16571668      if(m_timer_irq_latch == 0 && m_vrtc_irq_latch == 0 && m_sound_irq_latch == 0)
16581669         cputag_set_input_line(machine(),"maincpu",0,CLEAR_LINE);
1670
1671      if(m_sound_irq_mask && m_sound_irq_pending)
1672      {
1673         cputag_set_input_line(machine(),"maincpu",0,HOLD_LINE);
1674         m_sound_irq_latch = 1;
1675         m_sound_irq_pending = 0;
1676      }
16591677   }
16601678}
16611679
r15852r15853
23042322
23052323//   printf("%02x %02x %02x\n",state->m_sound_irq_mask,state->m_i8214_irq_level,irq);
23062324   /* TODO: correct i8214 irq level? */
2307   if(state->m_sound_irq_mask && irq)
2325   if(irq)
23082326   {
2309      state->m_sound_irq_latch = 1;
2310      //IRQ_LOG(("sound\n"));
2311      cputag_set_input_line(device->machine(),"maincpu",0,HOLD_LINE);
2327      if(state->m_sound_irq_mask)
2328      {
2329         state->m_sound_irq_latch = 1;
2330         state->m_sound_irq_pending = 0;
2331         //IRQ_LOG(("sound\n"));
2332         cputag_set_input_line(device->machine(),"maincpu",0,HOLD_LINE);
2333      }
2334      else
2335         state->m_sound_irq_pending = 1;
23122336   }
23132337}
23142338
r15852r15853
23972421      state->m_sound_irq_mask = 0;
23982422      state->m_sound_irq_latch = 0;
23992423      state->m_i8214_irq_level = 0;
2424      state->m_sound_irq_pending = 0;
24002425   }
24012426   #endif
24022427

Previous 15994 Revisions Next


© 1998-2018 The MESS Team