Previous 199869 Revisions Next

r30817 Tuesday 3rd June, 2014 at 21:02:09 UTC by David Haywood
more notes (nw)
[src/emu/cpu/z80]z80.c
[src/mame/drivers]kenseim.c

trunk/src/mame/drivers/kenseim.c
r30816r30817
8585GND             |GROUND         | 28 | f  | GROUND         | GND            |
8686----------------|------------------------------------------|----------------|
8787
88CN1 - 12 pin connector, various cabinnet inputs / outputs
89
902P Start Lamp | 1
911P Start Lamp | 2
92Coin Lock     | 3
93Coin Counter  | 4
94GND           | 5
95GND           | 6
96Service Sw    | 7
972P Start Sw   | 8
981P Start Sw   | 9
99Coin Sw       | 10
100+24V          | 11
101+24V          | 12
102
88103CN2 - 20 pin connector, goes from DRIVE PCB to the JAMMA on CPS board
89104
90105ST4 | 1
r30816r30817
133148
134149   // certain
135150
136   DECLARE_READ8_MEMBER(porta_r); // dsw1
137   DECLARE_READ8_MEMBER(portb_r); // dsw2
151   DECLARE_READ8_MEMBER(porta_r); // dsw1 - 8 bit in
152   DECLARE_READ8_MEMBER(portb_r); // dsw2 - 8 bit in
138153
139154   DECLARE_WRITE8_MEMBER(i8255_portc_w); // 20x LEDs
140155
r30816r30817
144159   DECLARE_READ8_MEMBER(i8255_porte_r); // mole input 2?
145160
146161   // uncertain
147   DECLARE_WRITE8_MEMBER(portc_w);
148   DECLARE_WRITE8_MEMBER(portd_w);
149   DECLARE_READ8_MEMBER(portc_r);
150   DECLARE_READ8_MEMBER(portd_r);
151   DECLARE_WRITE8_MEMBER(porte_w);
162   DECLARE_WRITE8_MEMBER(portc_w); // 4 bit out
163   DECLARE_WRITE8_MEMBER(portd_w); // 4 bit out
164   DECLARE_READ8_MEMBER(portc_r);  // 4 bit in
165   DECLARE_READ8_MEMBER(portd_r);  // 4 bit in
166   DECLARE_WRITE8_MEMBER(porte_w); // 8 bit out
152167
153168   WRITE8_MEMBER(i8255_porta_w); // maybe molesa output? (6-bits?)
154169   WRITE8_MEMBER(i8255_portb_w); // maybe molesb output? (6-bits?)
155170   WRITE8_MEMBER(i8255_portf_w); // maybe strobe output?
156171
157   DECLARE_READ8_MEMBER(porte_default_r) { logerror("%s read port E but no handler assigned\n", machine().describe_context()); return 0xff; }
158172
159   DECLARE_WRITE8_MEMBER(porta_default_w) { logerror("%s write %02x to port A but no handler assigned\n", machine().describe_context(), data); }
160   DECLARE_WRITE8_MEMBER(portb_default_w) { logerror("%s write %02x to port B but no handler assigned\n", machine().describe_context(), data); }
161173
162174
163
164175   DECLARE_READ8_MEMBER(i8255_porta_default_r) { logerror("%s i8255 read port A but no handler assigned\n", machine().describe_context()); return 0xff; }
165176   DECLARE_READ8_MEMBER(i8255_portb_default_r) { logerror("%s i8255 read port B but no handler assigned\n", machine().describe_context()); return 0xff; }
166177   DECLARE_READ8_MEMBER(i8255_portc_default_r) { logerror("%s i8255 read port C but no handler assigned\n", machine().describe_context()); return 0xff; }
r30816r30817
172183   DECLARE_WRITE8_MEMBER(i8255_porte_default_w) { logerror("%s i8255 write %02x to port E but no handler assigned\n", machine().describe_context(), data); }
173184
174185
186   // unused based on port direction assignments
187   //DECLARE_READ8_MEMBER(porte_default_r) { logerror("%s read port E but no handler assigned\n", machine().describe_context()); return 0xff; }
188   //DECLARE_WRITE8_MEMBER(porta_default_w) { logerror("%s write %02x to port A but no handler assigned\n", machine().describe_context(), data); }
189   //DECLARE_WRITE8_MEMBER(portb_default_w) { logerror("%s write %02x to port B but no handler assigned\n", machine().describe_context(), data); }
190
175191   UINT32 m_led_serial_data;
176192   int m_led_clock;
177193   int m_led_latch;
r30816r30817
256272
257273WRITE8_MEMBER(kenseim_state::portc_w)
258274{
259   logerror("%s write %02x to port C\n", machine().describe_context(), data);
275   // port direction is set to 4-in 4-out
276   logerror("%s write %02x to port C (%02x masked)\n", machine().describe_context(), data, data & 0xf0);
260277}
261278
262279WRITE8_MEMBER(kenseim_state::portd_w)
263280{
264   logerror("%s write %02x to port D\n", machine().describe_context(), data);
281   // port direction is set to 4-in 4-out
282   logerror("%s write %02x to port D (%02x masked)\n", machine().describe_context(), data, data & 0x0f);
265283}
266284
267285WRITE8_MEMBER(kenseim_state::porte_w)
r30816r30817
272290
273291READ8_MEMBER(kenseim_state::portd_r)
274292{
293   // port direction is set to 4-in 4-out
294   int ret = rand() & 0xf0;
295
275296   // comms port maybe? checks for 0x10 (bit 4,a) to be clear in a tight loop (092B) then for bit 0x80 to be set in another tight loop  (0933) then at (0947) it checks that bits 0xe0 aren't set.
276297   logerror("%s read port D\n", machine().describe_context());
277   return rand();// rand();// 0x80;
298   return ret;
278299}
279300
280301READ8_MEMBER(kenseim_state::portc_r)
281302{
303   // port direction is set to 4-in 4-out
304   int ret = rand() & 0x0f;
305
282306   // bits 0x09 checked at 1171
283307   logerror("%s read port C\n", machine().describe_context());
284308
285   return rand();//
286   //return 0x09;// rand();
309   return ret;
287310}
288311
289312READ8_MEMBER(kenseim_state::porta_r)
r30816r30817
478501   MCFG_CPU_ADD("gamecpu", TMPZ84C011, XTAL_16MHz/2) // tmpz84c011 - divider unknown
479502   MCFG_CPU_PROGRAM_MAP(kenseim_map)
480503   MCFG_CPU_IO_MAP(kenseim_io_map)
481   MCFG_TMPZ84C011_PORTA_WRITE_CALLBACK(WRITE8(kenseim_state, porta_default_w)) // unused?
482   MCFG_TMPZ84C011_PORTB_WRITE_CALLBACK(WRITE8(kenseim_state, portb_default_w)) // unused?
504   //MCFG_TMPZ84C011_PORTA_WRITE_CALLBACK(WRITE8(kenseim_state, porta_default_w)) // unused?
505   //MCFG_TMPZ84C011_PORTB_WRITE_CALLBACK(WRITE8(kenseim_state, portb_default_w)) // unused?
483506   MCFG_TMPZ84C011_PORTC_WRITE_CALLBACK(WRITE8(kenseim_state, portc_w))
484507   MCFG_TMPZ84C011_PORTD_WRITE_CALLBACK(WRITE8(kenseim_state, portd_w))
485508   MCFG_TMPZ84C011_PORTE_WRITE_CALLBACK(WRITE8(kenseim_state, porte_w))   
r30816r30817
487510   MCFG_TMPZ84C011_PORTB_READ_CALLBACK(READ8(kenseim_state, portb_r))
488511   MCFG_TMPZ84C011_PORTC_READ_CALLBACK(READ8(kenseim_state, portc_r))
489512   MCFG_TMPZ84C011_PORTD_READ_CALLBACK(READ8(kenseim_state, portd_r))
490   MCFG_TMPZ84C011_PORTE_READ_CALLBACK(READ8(kenseim_state, porte_default_r)) // unused?
513   //MCFG_TMPZ84C011_PORTE_READ_CALLBACK(READ8(kenseim_state, porte_default_r)) // unused?
491514   MCFG_CPU_CONFIG(daisy_chain_gamecpu)
492515
493516   MCFG_DEVICE_ADD("gamecpu_ctc", Z80CTC, XTAL_16MHz/2 ) // part of the tmpz84?
trunk/src/emu/cpu/z80/z80.c
r30816r30817
39553955   m_inports2.resolve_safe(0);
39563956   m_inports3.resolve_safe(0);
39573957   m_inports4.resolve_safe(0);
3958
3959   save_item(NAME(m_pio_dir[0]));
3960   save_item(NAME(m_pio_latch[0]));
3961   save_item(NAME(m_pio_dir[1]));
3962   save_item(NAME(m_pio_latch[1]));
3963   save_item(NAME(m_pio_dir[2]));
3964   save_item(NAME(m_pio_latch[2]));
3965   save_item(NAME(m_pio_dir[3]));
3966   save_item(NAME(m_pio_latch[3]));
3967   save_item(NAME(m_pio_dir[4]));
3968   save_item(NAME(m_pio_latch[4]));
3969
3970
39583971}
39593972
39603973void tmpz84c011_device::device_reset()

Previous 199869 Revisions Next


© 1997-2024 The MAME Team