trunk/src/mame/drivers/kenseim.c
| r30816 | r30817 | |
| 85 | 85 | GND |GROUND | 28 | f | GROUND | GND | |
| 86 | 86 | ----------------|------------------------------------------|----------------| |
| 87 | 87 | |
| 88 | CN1 - 12 pin connector, various cabinnet inputs / outputs |
| 89 | |
| 90 | 2P Start Lamp | 1 |
| 91 | 1P Start Lamp | 2 |
| 92 | Coin Lock | 3 |
| 93 | Coin Counter | 4 |
| 94 | GND | 5 |
| 95 | GND | 6 |
| 96 | Service Sw | 7 |
| 97 | 2P Start Sw | 8 |
| 98 | 1P Start Sw | 9 |
| 99 | Coin Sw | 10 |
| 100 | +24V | 11 |
| 101 | +24V | 12 |
| 102 | |
| 88 | 103 | CN2 - 20 pin connector, goes from DRIVE PCB to the JAMMA on CPS board |
| 89 | 104 | |
| 90 | 105 | ST4 | 1 |
| r30816 | r30817 | |
| 133 | 148 | |
| 134 | 149 | // certain |
| 135 | 150 | |
| 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 |
| 138 | 153 | |
| 139 | 154 | DECLARE_WRITE8_MEMBER(i8255_portc_w); // 20x LEDs |
| 140 | 155 | |
| r30816 | r30817 | |
| 144 | 159 | DECLARE_READ8_MEMBER(i8255_porte_r); // mole input 2? |
| 145 | 160 | |
| 146 | 161 | // 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 |
| 152 | 167 | |
| 153 | 168 | WRITE8_MEMBER(i8255_porta_w); // maybe molesa output? (6-bits?) |
| 154 | 169 | WRITE8_MEMBER(i8255_portb_w); // maybe molesb output? (6-bits?) |
| 155 | 170 | WRITE8_MEMBER(i8255_portf_w); // maybe strobe output? |
| 156 | 171 | |
| 157 | | DECLARE_READ8_MEMBER(porte_default_r) { logerror("%s read port E but no handler assigned\n", machine().describe_context()); return 0xff; } |
| 158 | 172 | |
| 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); } |
| 161 | 173 | |
| 162 | 174 | |
| 163 | | |
| 164 | 175 | DECLARE_READ8_MEMBER(i8255_porta_default_r) { logerror("%s i8255 read port A but no handler assigned\n", machine().describe_context()); return 0xff; } |
| 165 | 176 | DECLARE_READ8_MEMBER(i8255_portb_default_r) { logerror("%s i8255 read port B but no handler assigned\n", machine().describe_context()); return 0xff; } |
| 166 | 177 | DECLARE_READ8_MEMBER(i8255_portc_default_r) { logerror("%s i8255 read port C but no handler assigned\n", machine().describe_context()); return 0xff; } |
| r30816 | r30817 | |
| 172 | 183 | DECLARE_WRITE8_MEMBER(i8255_porte_default_w) { logerror("%s i8255 write %02x to port E but no handler assigned\n", machine().describe_context(), data); } |
| 173 | 184 | |
| 174 | 185 | |
| 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 | |
| 175 | 191 | UINT32 m_led_serial_data; |
| 176 | 192 | int m_led_clock; |
| 177 | 193 | int m_led_latch; |
| r30816 | r30817 | |
| 256 | 272 | |
| 257 | 273 | WRITE8_MEMBER(kenseim_state::portc_w) |
| 258 | 274 | { |
| 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); |
| 260 | 277 | } |
| 261 | 278 | |
| 262 | 279 | WRITE8_MEMBER(kenseim_state::portd_w) |
| 263 | 280 | { |
| 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); |
| 265 | 283 | } |
| 266 | 284 | |
| 267 | 285 | WRITE8_MEMBER(kenseim_state::porte_w) |
| r30816 | r30817 | |
| 272 | 290 | |
| 273 | 291 | READ8_MEMBER(kenseim_state::portd_r) |
| 274 | 292 | { |
| 293 | // port direction is set to 4-in 4-out |
| 294 | int ret = rand() & 0xf0; |
| 295 | |
| 275 | 296 | // 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. |
| 276 | 297 | logerror("%s read port D\n", machine().describe_context()); |
| 277 | | return rand();// rand();// 0x80; |
| 298 | return ret; |
| 278 | 299 | } |
| 279 | 300 | |
| 280 | 301 | READ8_MEMBER(kenseim_state::portc_r) |
| 281 | 302 | { |
| 303 | // port direction is set to 4-in 4-out |
| 304 | int ret = rand() & 0x0f; |
| 305 | |
| 282 | 306 | // bits 0x09 checked at 1171 |
| 283 | 307 | logerror("%s read port C\n", machine().describe_context()); |
| 284 | 308 | |
| 285 | | return rand();// |
| 286 | | //return 0x09;// rand(); |
| 309 | return ret; |
| 287 | 310 | } |
| 288 | 311 | |
| 289 | 312 | READ8_MEMBER(kenseim_state::porta_r) |
| r30816 | r30817 | |
| 478 | 501 | MCFG_CPU_ADD("gamecpu", TMPZ84C011, XTAL_16MHz/2) // tmpz84c011 - divider unknown |
| 479 | 502 | MCFG_CPU_PROGRAM_MAP(kenseim_map) |
| 480 | 503 | 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? |
| 483 | 506 | MCFG_TMPZ84C011_PORTC_WRITE_CALLBACK(WRITE8(kenseim_state, portc_w)) |
| 484 | 507 | MCFG_TMPZ84C011_PORTD_WRITE_CALLBACK(WRITE8(kenseim_state, portd_w)) |
| 485 | 508 | MCFG_TMPZ84C011_PORTE_WRITE_CALLBACK(WRITE8(kenseim_state, porte_w)) |
| r30816 | r30817 | |
| 487 | 510 | MCFG_TMPZ84C011_PORTB_READ_CALLBACK(READ8(kenseim_state, portb_r)) |
| 488 | 511 | MCFG_TMPZ84C011_PORTC_READ_CALLBACK(READ8(kenseim_state, portc_r)) |
| 489 | 512 | 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? |
| 491 | 514 | MCFG_CPU_CONFIG(daisy_chain_gamecpu) |
| 492 | 515 | |
| 493 | 516 | MCFG_DEVICE_ADD("gamecpu_ctc", Z80CTC, XTAL_16MHz/2 ) // part of the tmpz84? |