Previous 199869 Revisions Next

r36721 Friday 27th March, 2015 at 23:48:09 UTC by hap
coleco pacman/mspacman WIP
[src/mess/drivers]hh_hmcs40.c hh_tms1k.c hh_ucom4.c

trunk/src/mess/drivers/hh_hmcs40.c
r245232r245233
101101   DECLARE_WRITE16_MEMBER(alnattck_grid_w);
102102   DECLARE_READ16_MEMBER(alnattck_input_r);
103103
104   DECLARE_WRITE8_MEMBER(cpacman_plate_w);
105   DECLARE_WRITE16_MEMBER(cpacman_grid_w);
106   DECLARE_READ8_MEMBER(cpacman_input_r);
107
108   DECLARE_WRITE8_MEMBER(cmspacmn_plate_w);
109   DECLARE_WRITE16_MEMBER(cmspacmn_grid_w);
110   DECLARE_READ8_MEMBER(cmspacmn_input_r);
111
104112   void egalaxn2_display();
105113   DECLARE_WRITE8_MEMBER(egalaxn2_plate_w);
106114   DECLARE_WRITE16_MEMBER(egalaxn2_grid_w);
r245232r245233
257265   m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
258266
259267   // update display
260   UINT32 plate = BITSWAP16(m_plate,13,8,4,12,9,10,14,1,7,0,15,11,6,3,5,2);
268   UINT16 plate = BITSWAP16(m_plate,13,8,4,12,9,10,14,1,7,0,15,11,6,3,5,2);
261269
262270   display_matrix(16, 9, plate, m_grid);
263271}
r245232r245233
452460
453461static INPUT_PORTS_START( alnattck )
454462   PORT_START("IN.0") // D5 D7
455   PORT_CONFNAME( 0x01, 0x00, "Skill" )
463   PORT_CONFNAME( 0x01, 0x00, "Skill Level" )
456464   PORT_CONFSETTING(    0x00, "1" )
457465   PORT_CONFSETTING(    0x01, "2" )
458466
r245232r245233
583591
584592***************************************************************************/
585593
594WRITE8_MEMBER(hh_hmcs40_state::cpacman_plate_w)
595{
596   // R1x-R6x, D1,D2: vfd matrix plate
597   int shift = (offset - HMCS40_PORT_R1X) * 4;
598   m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
599
600   // update display
601   
602   // 31,30,29,28,27,13,14, 8,12,11,10, 9,15,16,17,18, 7, 6, 5, 4,19,20,21,22, 0, 1, 2, 3,23,24,25,26
603   // 31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
604   // 31,30,29,28,27, 0, 1, 2, 3, 8, 9,10,11,16,17,18,19,25,26,23,22,21,20,24,15,14,13,12, 4, 5, 6, 7
605   
606   UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,0,1,2,3,4,5,6,7,8,9,10);
607   UINT32 plate = BITSWAP32(m_plate,31,30,29,28,27,0,1,2,3,8,9,10,11,16,17,18,19,25,26,23,22,21,20,24,15,14,13,12,4,5,6,7);
608   plate |= 0x2000; // plate 13(maze) is always on
609
610   display_matrix(27, 11, plate, grid);
611}
612
613WRITE16_MEMBER(hh_hmcs40_state::cpacman_grid_w)
614{
615   // D0: speaker out
616   m_speaker->level_w(data & 1);
617
618   // D13-D15: input mux
619   m_inp_mux = data >> 13 & 7;
620
621   // D5-D15: vfd matrix grid
622   m_grid = data >> 5 & 0x7ff;
623
624   // D1,D2: plate 8,14 (update display there)
625   cpacman_plate_w(space, 6 + HMCS40_PORT_R1X, data >> 1 & 3);
626}
627
628READ8_MEMBER(hh_hmcs40_state::cpacman_input_r)
629{
630   // R0x: multiplexed inputs
631   return read_inputs(3);
632}
633
634
586635static INPUT_PORTS_START( cpacman )
636   PORT_START("IN.0") // D13 port R0x
637   PORT_CONFNAME( 0x01, 0x01, "Skill Level" )
638   PORT_CONFSETTING(    0x01, "1" )
639   PORT_CONFSETTING(    0x00, "2" )
640   PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
641
642   PORT_START("IN.1") // D14 port R0x
643   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
644   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
645   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
646   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
647
648   PORT_START("IN.2") // D15 port R0x
649   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
650   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
651   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
652   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
587653INPUT_PORTS_END
588654
589655
r245232r245233
591657
592658   /* basic machine hardware */
593659   MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc.
660   MCFG_HMCS40_READ_R_CB(0, READ8(hh_hmcs40_state, cpacman_input_r))
661   MCFG_HMCS40_WRITE_R_CB(1, WRITE8(hh_hmcs40_state, cpacman_plate_w))
662   MCFG_HMCS40_WRITE_R_CB(2, WRITE8(hh_hmcs40_state, cpacman_plate_w))
663   MCFG_HMCS40_WRITE_R_CB(3, WRITE8(hh_hmcs40_state, cpacman_plate_w))
664   MCFG_HMCS40_WRITE_R_CB(4, WRITE8(hh_hmcs40_state, cpacman_plate_w))
665   MCFG_HMCS40_WRITE_R_CB(5, WRITE8(hh_hmcs40_state, cpacman_plate_w))
666   MCFG_HMCS40_WRITE_R_CB(6, WRITE8(hh_hmcs40_state, cpacman_plate_w))
667   MCFG_HMCS40_WRITE_D_CB(WRITE16(hh_hmcs40_state, cpacman_grid_w))
594668
595//  MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
669   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
596670   MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
597671
598672   /* no video! */
r245232r245233
618692
619693***************************************************************************/
620694
695WRITE8_MEMBER(hh_hmcs40_state::cmspacmn_plate_w)
696{
697   // R1x-R6x, D0,D1: vfd matrix plate
698   int shift = (offset - HMCS40_PORT_R1X) * 4;
699   m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
700
701   // update display
702   //                   22,17                               18,13
703   // 31,30,29,28,27,26, 6,11,23,21,20,19,15, 2, 1, 0,32,31,30,29,12, 9, 4, 8,25,26,27,28,16,10, 3, 5
704   // 31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
705   // 14,13,12, 4, 5, 6, 7,24,23,25,22,21,20,13,24, 3,19,14,12,11,24, 2,10, 8, 7,25, 0, 9, 1,18,17,16
706   
707   UINT16 grid = BITSWAP16(m_grid,15,14,13,11,10,9,8,7,6,5,4,3,2,1,1,0);
708   UINT64 plate = BIT(m_plate,15)<<32 | BITSWAP32(m_plate,14,13,12,4,5,6,7,24,23,25,22,21,20,13,24,3,19,14,12,11,24,2,10,8,7,25,0,9,1,18,17,16);
709   plate |= 0x1004080; // plates 7,14,24 are always on
710
711   display_matrix(33, 12, plate, grid);
712}
713
714WRITE16_MEMBER(hh_hmcs40_state::cmspacmn_grid_w)
715{
716   // D2: speaker out
717   m_speaker->level_w(data >> 2 & 1);
718
719   // D13-D15: input mux
720   m_inp_mux = data >> 13 & 7;
721
722   // D5-D15: vfd matrix grid
723   m_grid = data >> 5 & 0x7ff;
724
725   // D0,D1: plate 11+17,6+22 (update display there)
726   cmspacmn_plate_w(space, 6 + HMCS40_PORT_R1X, data & 3);
727}
728
729READ8_MEMBER(hh_hmcs40_state::cmspacmn_input_r)
730{
731   // R0x: multiplexed inputs
732   return read_inputs(3);
733}
734
735
621736static INPUT_PORTS_START( cmspacmn )
737   PORT_START("IN.0") // D13 port R0x
738   PORT_CONFNAME( 0x01, 0x01, "Skill Level" )
739   PORT_CONFSETTING(    0x01, "1" )
740   PORT_CONFSETTING(    0x00, "2" )
741   PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
742
743   PORT_START("IN.1") // D14 port R0x
744   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
745   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
746   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
747   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
748
749   PORT_START("IN.2") // D15 port R0x
750   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
751   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
752   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
753   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
622754INPUT_PORTS_END
623755
624756
r245232r245233
626758
627759   /* basic machine hardware */
628760   MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc.
761   MCFG_HMCS40_READ_R_CB(0, READ8(hh_hmcs40_state, cmspacmn_input_r))
762   MCFG_HMCS40_WRITE_R_CB(1, WRITE8(hh_hmcs40_state, cmspacmn_plate_w))
763   MCFG_HMCS40_WRITE_R_CB(2, WRITE8(hh_hmcs40_state, cmspacmn_plate_w))
764   MCFG_HMCS40_WRITE_R_CB(3, WRITE8(hh_hmcs40_state, cmspacmn_plate_w))
765   MCFG_HMCS40_WRITE_R_CB(4, WRITE8(hh_hmcs40_state, cmspacmn_plate_w))
766   MCFG_HMCS40_WRITE_R_CB(5, WRITE8(hh_hmcs40_state, cmspacmn_plate_w))
767   MCFG_HMCS40_WRITE_R_CB(6, WRITE8(hh_hmcs40_state, cmspacmn_plate_w))
768   MCFG_HMCS40_WRITE_D_CB(WRITE16(hh_hmcs40_state, cmspacmn_grid_w))
629769
630//  MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
770   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
631771   MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
632772
633773   /* no video! */
r245232r245233
654794
655795void hh_hmcs40_state::egalaxn2_display()
656796{
657   UINT32 grid = BITSWAP16(m_grid,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14);
797   UINT16 grid = BITSWAP16(m_grid,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14);
658798   UINT32 plate = BITSWAP24(m_plate,23,22,21,20,15,14,13,12,7,6,5,4,3,2,1,0,19,18,17,16,11,10,9,8);
659799
660800   display_matrix(24, 15, plate, grid);
r245232r245233
675815
676816WRITE8_MEMBER(hh_hmcs40_state::egalaxn2_plate_w)
677817{
678   // R10-R63: vfd matrix plate
818   // R1x-R6x: vfd matrix plate
679819   int shift = (offset - HMCS40_PORT_R1X) * 4;
680820   m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
681821
r245232r245233
710850
711851   PORT_START("IN.3") // D4 port R0x
712852   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
713   PORT_CONFNAME( 0x02, 0x02, "Skill" )
853   PORT_CONFNAME( 0x02, 0x02, "Skill Level" )
714854   PORT_CONFSETTING(    0x02, "1" )
715855   PORT_CONFSETTING(    0x00, "2" )
716856   PORT_CONFNAME( 0x0c, 0x00, "Players" )
r245232r245233
758898
759899***************************************************************************/
760900
761// hardware is identical to Galaxian 2, so we can use those handlers
901// i/o hookup is identical to Galaxian 2, so we can use those handlers
762902// note: plate numbers are 0-23, not 1-24(with 0 always-on)
763903
764904static INPUT_PORTS_START( epacman2 )
r245232r245233
782922
783923   PORT_START("IN.3") // D4 port R0x
784924   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
785   PORT_CONFNAME( 0x02, 0x02, "Skill" )
925   PORT_CONFNAME( 0x02, 0x02, "Skill Level" )
786926   PORT_CONFSETTING(    0x00, "1" )
787927   PORT_CONFSETTING(    0x02, "2" )
788928   PORT_CONFNAME( 0x0c, 0x04, "Players" )
trunk/src/mess/drivers/hh_tms1k.c
r245232r245233
77  part of a series is (or will be) in its own driver.
88
99  Let's use this driver for a list of known devices and their serials,
10  excluding TI's own products (see for example ticalc1x.c, tispeak.c)
10  excluding TI's own products (see ticalc1x.c, tispeak.c)
1111
1212  serial   device   etc.
1313--------------------------------------------------------------------
r245232r245233
2121 @MP1204   TMS1100  1980, Entex Baseball 3
2222 *MP1221   TMS1100  1980, Entex Raise The Devil
2323 *MP1312   TMS1100  198?, Tandy/RadioShack Science Fair Microcomputer Trainer
24 *MP2139   ?        1982, Gakken Galaxy Invader 1000
25 *MP2788   ?        1980, Bandai Flight Time
24 *MP2139   ?        1982, Gakken Galaxy Invader 1000 (? note: VFD-capable)
25 *MP2788   ?        1980, Bandai Flight Time (? note: VFD-capable)
2626 @MP3226   TMS1000  1978, Milton Bradley Simon
2727 *MP3301   TMS1000  1979, Milton Bradley Bigtrak
2828 *MP3320A  TMS1000  1979, Coleco Head to Head Basketball
r245232r245233
4545  M34047   TMS1100  1982, MicroVision cartridge: Super Blockbuster
4646 @MP6100A  TMS0980  1979, Ideal Electronic Detective
4747 @MP6101B  TMS0980  1979, Parker Brothers Stop Thief
48 *MP6361   ?        1983, Defender Strikes
48 *MP6361   ?        1983, Defender Strikes (? note: VFD-capable)
4949 *MP7303   TMS1400? 19??, Tiger 7-in-1 Sports Stadium
5050 @MP7313   TMS1400  1980, Parker Brothers Bank Shot
5151 @MP7314   TMS1400  1980, Parker Brothers Split Second
5252  MP7332   TMS1400  1981, Milton Bradley Dark Tower -> mbdtower.c
5353 @MP7334   TMS1400  1981, Coleco Total Control 4
54 *MP7573   ?        1981, Entex Select-a-Game cartridge: Football (? note: 40-pin, VFD-capable)
55 *M95041   ?        1983, Tsukuda Game Pachinko (? note: 40-pin, VFD-capable)
5456
5557  inconsistent:
5658
trunk/src/mess/drivers/hh_ucom4.c
r245232r245233
265265void hh_ucom4_state::ssfball_display()
266266{
267267   UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,11,7,3,12,17,13,18,16,14,15,10,9,8,0,1,2,4,5,6);
268
268269   display_matrix(16, 9, plate, m_grid);
269270}
270271
r245232r245233
374375void hh_ucom4_state::splasfgt_display()
375376{
376377   UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,18,17,13,1,0,8,6,0,10,11,14,15,16,9,5,7,4,2,3);
378
377379   display_matrix(16, 9, plate, m_grid);
378380}
379381
r245232r245233
511513
512514void hh_ucom4_state::astrocmd_display()
513515{
514   UINT32 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,4,5,6,7,0,1,2,3);
516   UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,4,5,6,7,0,1,2,3);
515517   UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,3,2,12,13,14,15,16,17,18,0,1,4,8,5,9,7,11,6,10);
516518
517519   display_matrix(17, 9, plate, grid);
r245232r245233
611613   int shift = (offset - NEC_UCOM4_PORTC) * 4;
612614   m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
613615
614   display_matrix(18, 8, m_plate, m_grid);
616   display_matrix(18+1, 8, m_plate, m_grid);
615617}
616618
617619WRITE8_MEMBER(hh_ucom4_state::edracula_plate_w)
r245232r245233
623625   // E,F,G,H,I01: vfd matrix plate
624626   int shift = (offset - NEC_UCOM4_PORTE) * 4;
625627   m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
628   m_plate |= 1 << 18; // for always-on plates
626629
627   display_matrix(18, 8, m_plate, m_grid);
630   display_matrix(18+1, 8, m_plate, m_grid);
628631}
629632
630633
r245232r245233
834837
835838void hh_ucom4_state::tmpacman_display()
836839{
837   UINT32 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
840   UINT16 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
838841   UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,16,17,18,11,10,9,8,0,2,3,1,4,5,6,7,12,13,14,15);
842   plate |= 0x100; // plate 8(maze) is always on
839843
840   display_matrix(19, 8, plate | 0x100, grid); // plate 8 (maze) is always on
844   display_matrix(19, 8, plate, grid);
841845}
842846
843847WRITE8_MEMBER(hh_ucom4_state::tmpacman_grid_w)
r245232r245233
947951      // E23,F,G,H,I: vfd matrix plate
948952      int shift = (offset - NEC_UCOM4_PORTE) * 4;
949953      m_plate = ((m_plate << 2 & ~(0xf << shift)) | (data << shift)) >> 2;
954      m_plate |= 1 << 17; // for always-on plates
950955   }
951956
952   display_matrix(17, 9, m_plate, m_grid);
957   display_matrix(17+1, 9, m_plate, m_grid);
953958}
954959
955960READ8_MEMBER(hh_ucom4_state::alnchase_input_r)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team