Previous 15994 Revisions Next

r14938 Sunday 15th April, 2012 at 20:41:49 UTC by Curt Coder
[C64] Added support for the Commodore CP/M cartridge. VICE Team, your move ;) [Curt Coder, R. Belmont]
[src/mess/machine]c64_cpm.c c64_cpm.h

src/mess/machine/c64_cpm.c
r14937r14938
7979 
8080inline void c64_cpm_cartridge_device::update_signals()
8181{
82   // NOTE: none of this works until the Z80 core has been rewritten
82   if (m_enabled)
83   {
84        device_set_input_line(m_maincpu, INPUT_LINE_HALT, CLEAR_LINE);
85        device_set_input_line(machine().firstcpu, INPUT_LINE_HALT, ASSERT_LINE);
8386 
87        if (m_reset)
88        {
89            device_set_input_line(m_maincpu, INPUT_LINE_RESET, ASSERT_LINE);
90            device_set_input_line(m_maincpu, INPUT_LINE_RESET, CLEAR_LINE);
91            m_maincpu->set_state(Z80_PC, 0);
92           m_reset = 0;
93        }       
94   }
95   else
96   {
97        device_set_input_line(m_maincpu, INPUT_LINE_HALT, ASSERT_LINE);
98        device_set_input_line(machine().firstcpu, INPUT_LINE_HALT, CLEAR_LINE);
99   }
100 
101/*
102   // NOTE: the following is how it actually works once the Z80 core has been rewritten
103 
84104   // C64 DMA
85105   m_slot->dma_w(m_enabled ? ASSERT_LINE : CLEAR_LINE);
86106 
r14937r14938
90110 
91111   // Z80 WAIT
92112   m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, m_enabled ? CLEAR_LINE : ASSERT_LINE);
113*/
93114}
94115 
95116 
r14937r14938
131152void c64_cpm_cartridge_device::device_reset()
132153{
133154   m_enabled = 0;
155   m_reset = 1;
134156 
135157   update_signals();
136158}
src/mess/machine/c64_cpm.h
r14937r14938
5757 
5858   int m_enabled;
5959   int m_ba;
60 
61   int m_reset;
6062};
6163 
6264 

Previous 15994 Revisions Next


© 1998-2018 The MESS Team