Previous 15994 Revisions Next

r15425 Friday 8th June, 2012 at 10:29:47 UTC by Robbbert
EACC - fixed nmi operation. System boots. [Robbbert]
[src/mess/drivers]eacc.c

src/mess/drivers/eacc.c
r15424r15425
2323*
2424*    ToDo:
2525*    - Proper artwork
26*    - There are various problems, seems to be another victim of inadequate
27*      6821 emulation.
26*    - Verify operation with the instructions
2827*
2928******************************************************************************/
3029
r15424r15425
5655   DECLARE_WRITE8_MEMBER( eacc_segment_w );
5756   bool m_cb1;
5857   bool m_cb2;
58   bool m_nmi;
59   virtual void machine_reset();
60private:
5961   UINT8 m_digit;
6062   UINT8 m_segment;
6163   void eacc_display();
62   virtual void machine_reset();
6364};
6465
6566
r15424r15425
124125   eacc_state *state = timer.machine().driver_data<eacc_state>();
125126
126127   if (state->m_cb2)
128   {
129      state->m_nmi = true;
127130      device_set_input_line(timer.machine().device("maincpu"), INPUT_LINE_NMI, ASSERT_LINE);
131   }
128132}
129133
130134READ_LINE_MEMBER( eacc_state::eacc_cb1_r )
r15424r15425
191195    //d1 segment f
192196    //d0 segment g
193197
194   m_segment = BITSWAP8(data, 7, 0, 1, 4, 5, 6, 2, 3);
195   eacc_display();
198   if (!m_nmi)
199   {
200      m_segment = BITSWAP8(data, 7, 0, 1, 4, 5, 6, 2, 3);
201      eacc_display();
202   }
196203}
197204
198205WRITE8_MEMBER( eacc_state::eacc_digit_w )
199206{
200   device_set_input_line(machine().device("maincpu"), INPUT_LINE_NMI, CLEAR_LINE);
207   if (m_nmi)
208   {
209      device_set_input_line(machine().device("maincpu"), INPUT_LINE_NMI, CLEAR_LINE);
210      m_nmi = false;
211   }
201212   m_digit = data & 0xf8;
202   eacc_display();
203213}
204214
205215static const pia6821_interface eacc_mc6821_intf =
r15424r15425
243253
244254ROM_START(eacc)
245255   ROM_REGION(0x10000, "maincpu", 0)
246   ROM_LOAD("eacc.bin", 0x4000, 0x0800, BAD_DUMP CRC(37370cf7) SHA1(6627552f709331ea66f18d681730dd6448ca1ff2) )
256   ROM_LOAD("eacc.bin", 0x4000, 0x0800, CRC(37370cf7) SHA1(6627552f709331ea66f18d681730dd6448ca1ff2) )
247257ROM_END
248258
249259

Previous 15994 Revisions Next


© 1998-2018 The MESS Team