Previous 199869 Revisions Next

r36149 Saturday 28th February, 2015 at 22:48:17 UTC by hap
tmpacman preliminary i/o
[src/mess/drivers]hh_tms1k.c hh_ucom4.c

trunk/src/mess/drivers/hh_tms1k.c
r244660r244661
1111
1212  serial   device   etc.
1313--------------------------------------------------------------------
14 @MP0904A  TMS0970  1977, Milton Bradley Comp IV
14 @CP0904A  TMS0970  1977, Milton Bradley Comp IV
1515 @MP0905B  TMS0970  1977, Parker Brothers Codename Sector
16 @MP0914   TMS1000  1979, Entex Baseball
16 @MP0914   TMS1000  1978, Entex Baseball 1
1717 @MP1030   TMS1100  1980, APF Mathemagician
1818 @MP3226   TMS1000  1978, Milton Bradley Simon
1919 @MP3403   TMS1100  1978, unknown
r244660r244661
371371
372372void hh_tms1k_state::mathmagi_display()
373373{
374   m_display_maxx = 8;
374375   m_display_maxy = 11;
375   m_display_maxx = 8;
376376
377377   // R0-R7: 7seg leds
378378   for (int y = 0; y < 8; y++)
r244660r244661
535535
536536void hh_tms1k_state::amaztron_display()
537537{
538   m_display_maxx = 8;
538539   m_display_maxy = 3;
539   m_display_maxx = 8;
540540
541541   // R8,R9: select digit
542542   for (int y = 0; y < 2; y++)
r244660r244661
13471347
13481348WRITE16_MEMBER(hh_tms1k_state::cnsector_write_r)
13491349{
1350   m_display_maxx = 8;
13501351   m_display_maxy = 7;
1351   m_display_maxx = 8;
13521352
13531353   // R0-R5: select digit (right-to-left)
13541354   for (int y = 0; y < 6; y++)
r244660r244661
15551555
15561556WRITE16_MEMBER(hh_tms1k_state::stopthief_write_r)
15571557{
1558   m_display_maxx = 7;
15581559   m_display_maxy = 3;
1559   m_display_maxx = 7;
15601560
15611561   // R0-R2: select digit
15621562   UINT8 o = BITSWAP8(m_o,3,5,2,1,4,0,6,7) & 0x7f;
r244660r244661
22942294CONS( 1979, amaztron, 0, 0, amaztron, amaztron, driver_device, 0, "Coleco", "Amaze-A-Tron", GAME_SUPPORTS_SAVE )
22952295CONS( 1981, tc4, 0, 0, tc4, tc4, driver_device, 0, "Coleco", "Total Control 4", GAME_SUPPORTS_SAVE )
22962296
2297CONS( 1979, ebball, 0, 0, ebball, ebball, driver_device, 0, "Entex", "Baseball (Entex)", GAME_SUPPORTS_SAVE )
2297CONS( 1978, ebball, 0, 0, ebball, ebball, driver_device, 0, "Entex", "Electronic Baseball (Entex)", GAME_SUPPORTS_SAVE )
22982298
22992299CONS( 1979, elecdet, 0, 0, elecdet, elecdet, driver_device, 0, "Ideal", "Electronic Detective", GAME_SUPPORTS_SAVE )
23002300
trunk/src/mess/drivers/hh_ucom4.c
r244660r244661
8686   void tmtennis_set_clock();
8787   DECLARE_INPUT_CHANGED_MEMBER(tmtennis_difficulty_switch);
8888   DECLARE_MACHINE_RESET(tmtennis);
89
90   DECLARE_WRITE8_MEMBER(tmpacman_grid_w);
91   DECLARE_WRITE8_MEMBER(tmpacman_plate_w);
92   DECLARE_WRITE8_MEMBER(tmpacman_port_e_w);
8993   
9094   DECLARE_READ8_MEMBER(alnchase_input_r);
9195   DECLARE_WRITE8_MEMBER(alnchase_display_w);
r244660r244661
232236
233237WRITE8_MEMBER(hh_ucom4_state::edracula_grid_w)
234238{
235   // port C/D: vfd matrix grid
239   // ports C,D: vfd matrix grid
236240   int shift = (offset - NEC_UCOM4_PORTC) * 4;
237241   m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
238242
r244660r244661
241245
242246WRITE8_MEMBER(hh_ucom4_state::edracula_plate_w)
243247{
244   // port E/F/G/H/I01: vfd matrix plate
248   // ports E-H,I01: vfd matrix plate
245249   int shift = (offset - NEC_UCOM4_PORTE) * 4;
246250   m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
247251
r244660r244661
258262
259263
260264static INPUT_PORTS_START( edracula )
261   PORT_START("IN.0")
265   PORT_START("IN.0") // port A
262266   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT )
263267   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START )
264268   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
265269   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
266270
267   PORT_START("IN.1")
271   PORT_START("IN.1") // port B
268272   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
269273   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
270274   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
r244660r244661
321325
322326READ8_MEMBER(hh_ucom4_state::tmtennis_input_r)
323327{
324   // port A/B: buttons
328   // ports A,B: buttons
325329   return ~read_inputs(2) >> (offset*4);
326330}
327331
328WRITE8_MEMBER(hh_ucom4_state::tmtennis_port_e_w)
332WRITE8_MEMBER(hh_ucom4_state::tmtennis_grid_w)
329333{
330   // E0/E1: input mux
331   // E2: speaker out
332   // E3: N/C
333   m_inp_mux = data & 3;
334   m_speaker->level_w(data >> 2 & 1);
334   // ports G-I: vfd matrix grid
335   int shift = (offset - NEC_UCOM4_PORTG) * 4;
336   m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
337
338   display_matrix(12, 12, m_plate, m_grid);
335339}
336340
337341WRITE8_MEMBER(hh_ucom4_state::tmtennis_plate_w)
338342{
339   // port C/D/F: vfd matrix plate
343   // ports C-F: vfd matrix plate
340344   if (offset == NEC_UCOM4_PORTF) offset--;
341345   int shift = (offset - NEC_UCOM4_PORTC) * 4;
342346   m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
r244660r244661
344348   display_matrix(12, 12, m_plate, m_grid);
345349}
346350
347WRITE8_MEMBER(hh_ucom4_state::tmtennis_grid_w)
351WRITE8_MEMBER(hh_ucom4_state::tmtennis_port_e_w)
348352{
349   // port G/H/I: vfd matrix grid
350   int shift = (offset - NEC_UCOM4_PORTG) * 4;
351   m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
352
353   display_matrix(12, 12, m_plate, m_grid);
353   // E0,E1: input mux
354   // E2: speaker out
355   // E3: N/C
356   m_inp_mux = data & 3;
357   m_speaker->level_w(data >> 2 & 1);
354358}
355359
356360
357
358361/* Pro-Tennis physical button layout and labels is like this:
359362
360363    [SERVE] [1] [2] [3]       [3] [2] [1] [SERVE]
r244660r244661
456459
457460***************************************************************************/
458461
462WRITE8_MEMBER(hh_ucom4_state::tmpacman_grid_w)
463{
464   // ports C,D: vfd matrix grid
465   int shift = (offset - NEC_UCOM4_PORTC) * 4;
466   m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
467
468   display_matrix(19, 8, m_plate, m_grid);
469}
470
471WRITE8_MEMBER(hh_ucom4_state::tmpacman_plate_w)
472{
473   // ports E-I: vfd matrix plate
474   int shift = (offset - NEC_UCOM4_PORTE) * 4;
475   m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
476
477   display_matrix(19, 8, m_plate, m_grid);
478}
479
480WRITE8_MEMBER(hh_ucom4_state::tmpacman_port_e_w)
481{
482   // E1: speaker out
483   m_speaker->level_w(data >> 1 & 1);
484
485   tmpacman_plate_w(space, offset, data);
486}
487
488
459489static INPUT_PORTS_START( tmpacman )
490   PORT_START("IN.0") // port A
491   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // 4 separate directional buttons, hence 16way
492   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY
493   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY
494   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY
495
496   PORT_START("IN.1") // port B
497   PORT_CONFNAME( 0x00, 0x00, DEF_STR( Difficulty ) )
498   PORT_CONFSETTING(    0x00, "Amateur" )
499   PORT_CONFSETTING(    0x01, "Professional" )
500   PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
460501INPUT_PORTS_END
461502
462503
r244660r244661
464505
465506   /* basic machine hardware */
466507   MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_430kHz)
508   MCFG_UCOM4_READ_A_CB(IOPORT("IN.0"))
509   MCFG_UCOM4_READ_B_CB(IOPORT("IN.1"))
510   MCFG_UCOM4_WRITE_C_CB(WRITE8(hh_ucom4_state, tmpacman_grid_w))
511   MCFG_UCOM4_WRITE_D_CB(WRITE8(hh_ucom4_state, tmpacman_grid_w))
512   MCFG_UCOM4_WRITE_E_CB(WRITE8(hh_ucom4_state, tmpacman_port_e_w))
513   MCFG_UCOM4_WRITE_F_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
514   MCFG_UCOM4_WRITE_G_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
515   MCFG_UCOM4_WRITE_H_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
516   MCFG_UCOM4_WRITE_I_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
467517
518   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
468519   MCFG_DEFAULT_LAYOUT(layout_tmpacman)
469520
470521   /* no video! */
r244660r244661
495546
496547***************************************************************************/
497548
498
499
500549READ8_MEMBER(hh_ucom4_state::alnchase_input_r)
501550{
502551   // port A: buttons
r244660r244661
507556{
508557   if (offset <= NEC_UCOM4_PORTE)
509558   {
510      // C/D/E0: vfd matrix grid
559      // ports C,D,E0: vfd matrix grid
511560      int shift = (offset - NEC_UCOM4_PORTC) * 4;
512561      m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
513562
r244660r244661
518567
519568   if (offset >= NEC_UCOM4_PORTE)
520569   {
521      // E23/F/G/H/I: vfd matrix plate
570      // ports F-I,E23: vfd matrix plate
522571      int shift = (offset - NEC_UCOM4_PORTE) * 4;
523572      m_plate = ((m_plate << 2 & ~(0xf << shift)) | (data << shift)) >> 2;
524573   }
r244660r244661
528577
529578WRITE8_MEMBER(hh_ucom4_state::alnchase_port_e_w)
530579{
531   alnchase_display_w(space, offset, data);
532
533580   // E1: speaker out
534581   m_speaker->level_w(data >> 1 & 1);
582
583   alnchase_display_w(space, offset, data);
535584}
536585
537586/* physical button layout and labels is like this:


Previous 199869 Revisions Next


© 1997-2024 The MAME Team