Previous 199869 Revisions Next

r22724 Thursday 9th May, 2013 at 16:28:56 UTC by smf
modernised adc083x, ds2401, upd4701 [smf]
[src/emu/machine]adc083x.c adc083x.h ds2401.c ds2401.h upd4701.c upd4701.h
[src/mame/drivers]konamigx.c ksys573.c zr107.c

trunk/src/mame/drivers/konamigx.c
r22723r22724
14421442   PORT_INCLUDE( konamigx )
14431443
14441444   PORT_START("ADC-WRPORT")
1445   PORT_BIT( 0x1000000, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0834", adc083x_clk_write)
1446   PORT_BIT( 0x2000000, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0834", adc083x_di_write)
1447   PORT_BIT( 0x4000000, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0834", adc083x_cs_write)
1445   PORT_BIT( 0x1000000, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("adc0834", adc083x_device, clk_write)
1446   PORT_BIT( 0x2000000, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("adc0834", adc083x_device, di_write)
1447   PORT_BIT( 0x4000000, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("adc0834", adc083x_device, cs_write)
14481448
14491449   PORT_START("ADC-RDPORT")
1450   PORT_BIT( 0x1000000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("adc0834", adc083x_do_read)
1450   PORT_BIT( 0x1000000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("adc0834", adc083x_device, do_read)
14511451
14521452   PORT_START("AN0")   /* mask default type                     sens delta min max */
14531453   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x38,0xc8) PORT_SENSITIVITY(35) PORT_KEYDELTA(35) PORT_REVERSE
trunk/src/mame/drivers/ksys573.c
r22723r22724
536536      m_psxirq(*this, ":maincpu:irq"),
537537      m_cr589(*this, ":cdrom"),
538538      m_maincpu(*this, "maincpu"),
539      m_ram(*this, "maincpu:ram")
539      m_ram(*this, "maincpu:ram"),
540      m_upd4701(*this, "upd4701")
540541   {
541542   }
542543
r22723r22724
651652   void atapi_init();
652653   void cdrom_dma_read( UINT32 *ram, UINT32 n_address, INT32 n_size );
653654   void cdrom_dma_write( UINT32 *ram, UINT32 n_address, INT32 n_size );
654   void flash_init(  );
655   void update_mode(  );
655   void flash_init();
656   void update_mode();
656657   void sys573_vblank(screen_device &screen, bool vblank_state);
657658   void gx700pwbf_output( int offset, UINT8 data );
658659   void gx700pwfbf_init( void (ksys573_state::*output_callback_func)( int offset, int data ) );
r22723r22724
671672   void punchmania_output_callback( int offset, int data );
672673   required_device<psxcpu_device> m_maincpu;
673674   required_device<ram_device> m_ram;
675   optional_device<upd4701_device> m_upd4701;
674676};
675677
676678void ATTR_PRINTF(3,4)  ksys573_state::verboselog( int n_level, const char *s_fmt, ... )
r22723r22724
15101512
15111513READ32_MEMBER(ksys573_state::ge765pwbba_r)
15121514{
1513   device_t *upd4701 = machine().device("upd4701");
15141515   UINT32 data = 0;
15151516
15161517   switch (offset)
15171518   {
15181519   case 0x26:
1519      upd4701_y_add(upd4701, space, 0, ioport("uPD4701_y")->read_safe(0), 0xffff);
1520      upd4701_switches_set(upd4701, space, 0, ioport("uPD4701_switches")->read_safe(0));
1520      m_upd4701->y_add(ioport("uPD4701_y")->read_safe(0));
1521      m_upd4701->switches_set(ioport("uPD4701_switches")->read_safe(0));
15211522
1522      upd4701_cs_w(upd4701, space, 0, 0);
1523      upd4701_xy_w(upd4701, space, 0, 1);
1523      m_upd4701->cs_w(0);
1524      m_upd4701->xy_w(1);
15241525
15251526      if (ACCESSING_BITS_0_7)
15261527      {
1527         upd4701_ul_w(upd4701, space, 0, 0);
1528         data |= upd4701_d_r(upd4701, space, 0, 0xffff) << 0;
1528         m_upd4701->ul_w(0);
1529         data |= m_upd4701->d_r(space, 0, 0xffff) << 0;
15291530      }
15301531
15311532      if (ACCESSING_BITS_16_23)
15321533      {
1533         upd4701_ul_w(upd4701, space, 0, 1);
1534         data |= upd4701_d_r(upd4701, space, 0, 0xffff) << 16;
1534         m_upd4701->ul_w(1);
1535         data |= m_upd4701->d_r(space, 0, 0xffff) << 16;
15351536      }
15361537
1537      upd4701_cs_w(upd4701, space, 0, 1);
1538      m_upd4701->cs_w(1);
15381539      break;
15391540
15401541   default:
r22723r22724
15481549
15491550WRITE32_MEMBER(ksys573_state::ge765pwbba_w)
15501551{
1551   device_t *upd4701 = machine().device("upd4701");
15521552   switch (offset)
15531553   {
15541554   case 0x04:
r22723r22724
15711571   case 0x28:
15721572      if (ACCESSING_BITS_0_7)
15731573      {
1574         upd4701_resety_w(upd4701, space, 0, 1);
1575         upd4701_resety_w(upd4701, space, 0, 0);
1574         m_upd4701->resety_w(1);
1575         m_upd4701->resety_w(0);
15761576      }
15771577      break;
15781578
r22723r22724
29992999READ32_MEMBER(ksys573_state::gunmania_r)
30003000{
30013001   UINT32 data = 0;
3002   ds2401_device *ds2401 = machine().device<ds2401_device>("gunmania_id");
30033002
30043003   switch( offset )
30053004   {
30063005   case 0x20:
3007      data = ioport( "GUNX" )->read() | ds2401->read() << 7;
3006      data = ioport( "GUNX" )->read();
30083007      break;
30093008
30103009   case 0x22:
r22723r22724
33513350   PORT_BIT( 0xffffffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
33523351
33533352   PORT_START("OUT0")
3354   PORT_BIT( 0x00000002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0834", adc083x_cs_write)
3355   PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0834", adc083x_clk_write)
3356   PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0834", adc083x_di_write)
3353   PORT_BIT( 0x00000002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("adc0834", adc083x_device, cs_write)
3354   PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("adc0834", adc083x_device, clk_write)
3355   PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("adc0834", adc083x_device, di_write)
33573356
33583357   PORT_START("IN1")
33593358   PORT_DIPNAME( 0x00000001, 0x00000001, "Unused 1" ) PORT_DIPLOCATION( "DIP SW:1" )
r22723r22724
33793378//  PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_UNKNOWN )
33803379//  PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_UNKNOWN )
33813380//  PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNKNOWN )
3382   PORT_BIT( 0x00010000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("adc0834", adc083x_do_read)
3381   PORT_BIT( 0x00010000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("adc0834", adc083x_device, do_read)
33833382//  PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNKNOWN )
33843383   PORT_BIT( 0x00040000, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* x76f041/zs01 sda */
33853384   PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_UNKNOWN )
r22723r22724
36173616
36183617   PORT_START("GUNX")
36193618   PORT_BIT( 0x7f, 0x2f, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(0x00,0x5f) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_PLAYER(1)
3619   PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("gunmania_id", ds2401_device, read)
36203620
36213621   PORT_START("GUNY")
36223622   PORT_BIT( 0x7f, 0x1f, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0x00,0x3f) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_PLAYER(1)
r22723r22724
37043704   PORT_INCLUDE( konami573 )
37053705
37063706   PORT_MODIFY("IN1")
3707   PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("adc0838", adc083x_do_read)
3708   PORT_BIT( 0x00000200, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("adc0838", adc083x_sars_read)
3707   PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("adc0838", adc083x_device, do_read)
3708   PORT_BIT( 0x00000200, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("adc0838", adc083x_device, sars_read)
37093709   PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNUSED )
37103710
37113711   PORT_START( "OUT1" )
3712   PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0838", adc083x_cs_write)
3713   PORT_BIT( 0x00000002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0838", adc083x_clk_write)
3714   PORT_BIT( 0x00000020, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0838", adc083x_di_write)
3712   PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("adc0838", adc083x_device, cs_write)
3713   PORT_BIT( 0x00000002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("adc0838", adc083x_device, clk_write)
3714   PORT_BIT( 0x00000020, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("adc0838", adc083x_device, di_write)
37153715
37163716   PORT_MODIFY("IN2")
37173717   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_PLAYER(1) PORT_NAME( "Select L" ) /* P2 LEFT */
r22723r22724
55925592   DISK_IMAGE_READONLY( "gca18jaa", 0, SHA1(8adcc8ef76cbfb9f47fec5702b0b200565b5c561) )
55935593ROM_END
55945594
5595GAME( 1997, sys573,   0,        konami573,    konami573, ksys573_state, konami573,  ROT0, "Konami", "System 573 BIOS", GAME_IS_BIOS_ROOT )
5595GAME( 1997, sys573,   0,        konami573,    konami573, ksys573_state, konami573,    ROT0, "Konami", "System 573 BIOS", GAME_IS_BIOS_ROOT )
55965596
5597GAME( 1997, hndlchmp, sys573,   konami573,    hndlchmp, ksys573_state,  konami573,  ROT0, "Konami", "Handle Champ (GQ710 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5598GAME( 1998, darkhleg, sys573,   konami573x,   konami573, ksys573_state, konami573,  ROT0, "Konami", "Dark Horse Legend (GX706 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5599GAME( 1998, fbaitbc,  sys573,   k573baitx,    fbaitbc, ksys573_state,   ge765pwbba, ROT0, "Konami", "Fisherman's Bait - A Bass Challenge (GE765 VER. UAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5600GAME( 1998, bassangl, fbaitbc,  k573baitx,    fbaitbc, ksys573_state,   ge765pwbba, ROT0, "Konami", "Bass Angler (GE765 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5601GAME( 1998, pbballex, sys573,   konami573x,   konami573, ksys573_state, konami573,  ROT0, "Konami", "Powerful Pro Baseball EX (GX802 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5602GAME( 1998, konam80s, sys573,   konami573x,   konami573, ksys573_state, konami573,  ROT90, "Konami", "Konami 80's AC Special (GC826 VER. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5603GAME( 1998, konam80u, konam80s, konami573x,   konami573, ksys573_state, konami573,  ROT90, "Konami", "Konami 80's AC Special (GC826 VER. UAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5604GAME( 1998, konam80j, konam80s, konami573x,   konami573, ksys573_state, konami573,  ROT90, "Konami", "Konami 80's Gallery (GC826 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5605GAME( 1998, konam80a, konam80s, konami573x,   konami573, ksys573_state, konami573,  ROT90, "Konami", "Konami 80's AC Special (GC826 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5606GAME( 1998, konam80k, konam80s, konami573x,   konami573, ksys573_state, konami573,  ROT90, "Konami", "Konami 80's AC Special (GC826 VER. KAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5607GAME( 1999, dstage,   sys573,   konami573x,   ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dancing Stage (GN845 VER. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5608GAME( 1999, ddru,     dstage,   konami573x,   ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dance Dance Revolution (GN845 VER. UAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5609GAME( 1998, ddrj,     dstage,   konami573x,   ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dance Dance Revolution - Internet Ranking Ver (GC845 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5610GAME( 1998, ddrja,    dstage,   konami573x,   ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dance Dance Revolution (GC845 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5611GAME( 1998, ddrjb,    dstage,   konami573x,   ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dance Dance Revolution (GC845 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5612GAME( 1999, ddra,     dstage,   konami573x,   ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dance Dance Revolution (GN845 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5613GAME( 1998, fbait2bc, sys573,   k573baitx,    fbaitbc, ksys573_state,   ge765pwbba, ROT0, "Konami", "Fisherman's Bait 2 - A Bass Challenge (GE865 VER. UAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5614GAME( 1998, bassang2, fbait2bc, k573baitx,    fbaitbc, ksys573_state,   ge765pwbba, ROT0, "Konami", "Bass Angler 2 (GE865 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5615GAME( 1998, hyperbbc, sys573,   konami573,    hyperbbc, ksys573_state,  konami573,  ROT0, "Konami", "Hyper Bishi Bashi Champ (GQ876 VER. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5616GAME( 1998, hyperbbca,hyperbbc, konami573,    hyperbbc, ksys573_state,  konami573,  ROT0, "Konami", "Hyper Bishi Bashi Champ (GQ876 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5617GAME( 1999, gchgchmp, sys573,   pccard1x,     gchgchmp, ksys573_state, konami573,  ROT0, "Konami", "Gachaga Champ (GE877 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5618GAME( 1999, drmn,     sys573,   konami573x,   drmn, ksys573_state,      drmn,       ROT0, "Konami", "DrumMania (GQ881 VER. JAD)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5619GAME( 1999, gtrfrks,  sys573,   konami573x,   gtrfrks, ksys573_state,   gtrfrks,    ROT0, "Konami", "Guitar Freaks (GQ886 VER. EAC)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5620GAME( 1999, gtrfrksu, gtrfrks,  konami573x,   gtrfrks, ksys573_state,   gtrfrks,    ROT0, "Konami", "Guitar Freaks (GQ886 VER. UAC)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5621GAME( 1999, gtrfrksj, gtrfrks,  konami573x,   gtrfrks, ksys573_state,   gtrfrks,    ROT0, "Konami", "Guitar Freaks (GQ886 VER. JAC)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5622GAME( 1999, gtrfrksa, gtrfrks,  konami573x,   gtrfrks, ksys573_state,   gtrfrks,    ROT0, "Konami", "Guitar Freaks (GQ886 VER. AAC)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5623GAME( 1999, fbaitmc,  sys573,   k573baitx,    fbaitmc, ksys573_state,   ge765pwbba, ROT0, "Konami", "Fisherman's Bait - Marlin Challenge (GX889 VER. EA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5624GAME( 1999, fbaitmcu, fbaitmc,  k573baitx,    fbaitmc, ksys573_state,   ge765pwbba, ROT0, "Konami", "Fisherman's Bait - Marlin Challenge (GX889 VER. UA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5625GAME( 1999, fbaitmcj, fbaitmc,  k573baitx,    fbaitmc, ksys573_state,   ge765pwbba, ROT0, "Konami", "Fisherman's Bait - Marlin Challenge (GX889 VER. JA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5626GAME( 1999, fbaitmca, fbaitmc,  k573baitx,    fbaitmc, ksys573_state,   ge765pwbba, ROT0, "Konami", "Fisherman's Bait - Marlin Challenge (GX889 VER. AA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5627GAME( 1999, ddr2m,    sys573,   konami573x,   ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix (GN895 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5628GAME( 1999, ddr2ml,   ddr2m,    pccard1x,     ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix - Link Ver (GE885 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5629GAME( 1999, ddr2mla,  ddr2m,    pccard1x,     ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix - Link Ver (GE885 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5630GAME( 1999, ddrbocd,  ddr2m,    pccard1x,     ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dance Dance Revolution Best of Cool Dancers (GE892 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5631GAME( 1999, ddr2mc,   ddr2m,    konami573x,   ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix with beatmaniaIIDX CLUB VERSiON (GE896 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5632GAME( 1999, ddr2mc2,  ddr2m,    konami573x,   ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix with beatmaniaIIDX substream CLUB VERSiON 2 (GE984 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5633GAME( 1999, gtrfrk2m, sys573,   pccard1yi,    gtrfrks, ksys573_state,   gtrfrks,    ROT0, "Konami", "Guitar Freaks 2nd Mix Ver 1.01 (GQ883 VER. JAD)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5634GAME( 1999, dsftkd,   sys573,   konami573yi,  ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dancing Stage featuring TRUE KiSS DESTiNATiON (G*884 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5635GAME( 1999, cr589fw,  sys573,   konami573,    konami573, ksys573_state, konami573,  ROT0, "Konami", "CD-ROM Drive Updater 2.0 (700B04)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5636GAME( 1999, cr589fwa, sys573,   konami573,    konami573, ksys573_state, konami573,  ROT0, "Konami", "CD-ROM Drive Updater (700A04)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5637GAME( 2000, ddr3mk,   sys573,   pccard2dyyi,  ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution 3rd Mix - Ver.Korea2 (GN887 VER. KBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.3 */
5638GAME( 2000, ddr3mka,  ddr3mk,   pccard2dyyi,  ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution 3rd Mix - Ver.Korea (GN887 VER. KAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.3 */
5639GAME( 1999, ddr3ma,   ddr3mk,   pccard2dyyi,  ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution 3rd Mix (GN887 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.1 */
5640GAME( 1999, ddr3mj,   ddr3mk,   pccard2dyyi,  ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution 3rd Mix (GN887 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.0 */
5641GAME( 1999, ddrsbm,   sys573,   k573dyi,      ddrsolo, ksys573_state,   ddrsolo,    ROT0, "Konami", "Dance Dance Revolution Solo Bass Mix (GQ894 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5642GAME( 1999, ddrs2k,   sys573,   k573dyyi,     ddrsolo, ksys573_state,   ddrsolo,    ROT0, "Konami", "Dance Dance Revolution Solo 2000 (GC905 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.3 */
5643GAME( 1999, ddrs2kj,  ddrs2k,   k573dyyi,     ddrsolo, ksys573_state,   ddrsolo,    ROT0, "Konami", "Dance Dance Revolution Solo 2000 (GC905 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.2 */
5644GAME( 1999, hypbbc2p, sys573,   konami573y,   hypbbc2p, ksys573_state,  hyperbbc,   ROT0, "Konami", "Hyper Bishi Bashi Champ - 2 Player (GX908 1999/08/24 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5645GAME( 1999, hypbbc2pk,hypbbc2p, konami573y,   hypbbc2p, ksys573_state,  hyperbbc,   ROT0, "Konami", "Hyper Bishi Bashi Champ - 2 Player (GX908 1999/08/24 VER. KAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5646GAME( 1999, dsfdct,   sys573,   pccard2dyyi,  ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dancing Stage featuring Dreams Come True (GC910 VER. JCA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5647GAME( 1999, dsfdcta,  dsfdct,   pccard2yyi,   ddr, ksys573_state,       ddr,        ROT0, "Konami", "Dancing Stage featuring Dreams Come True (GC910 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5648GAME( 1999, drmn2m,   sys573,   k573dxzi,     drmn, ksys573_state,      drmndigital,ROT0, "Konami", "DrumMania 2nd Mix (GE912 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.5 */
5649GAME( 1999, drmn2mpu, drmn2m,   k573dxzi,     drmn, ksys573_state,      drmndigital,ROT0, "Konami", "DrumMania 2nd Mix Session Power Up Kit (GE912 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.5 */
5650GAME( 2000, dncfrks,  sys573,   k573dzi,      dmx, ksys573_state,       dmx,        ROT0, "Konami", "Dance Freaks (G*874 VER. KAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.6 */
5651GAME( 2000, dmx,      dncfrks,  k573dzi,      dmx, ksys573_state,       dmx,        ROT0, "Konami", "Dance Maniax (G*874 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.6 */
5652GAME( 2000, gunmania, sys573,   gunmania,     gunmania, ksys573_state,  gunmania,   ROT0, "Konami", "GunMania (GL906 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5653GAME( 2000, fghtmn,   sys573,   punchmania,   punchmania, ksys573_state,punchmania, ROT0, "Konami", "Fighting Mania (QG918 VER. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5654GAME( 2000, fghtmna,  fghtmn,   punchmania,   punchmania, ksys573_state,punchmania, ROT0, "Konami", "Fighting Mania (QG918 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5655GAME( 2000, pnchmn,   fghtmn,   punchmania,   punchmania, ksys573_state,punchmania, ROT0, "Konami", "Punch Mania: Hokuto No Ken (GQ918 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5656GAME( 2000, pnchmna,  fghtmn,   punchmania,   punchmania, ksys573_state,punchmania, ROT0, "Konami", "Punch Mania: Hokuto No Ken (GQ918 VER. JAB ALT CD)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5657GAME( 2000, fghtmnk,  fghtmn,   punchmania,   punchmania, ksys573_state,punchmania, ROT0, "Konami", "Fighting Mania (QG918 VER. KAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5658GAME( 2000, fghtmnu,  fghtmn,   punchmania,   punchmania, ksys573_state,punchmania, ROT0, "Konami", "Fighting Mania (QG918 VER. UAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5659GAME( 2000, dsem,     sys573,   k573dxi,      ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dancing Stage Euro Mix (G*936 VER. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.7 */
5660GAME( 2000, gtrfrk3m, sys573,   pccard1dxzi,  gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 3rd Mix (GE949 VER. JAC)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.4 */
5661GAME( 2000, gtfrk3ma, gtrfrk3m, pccard1dxzi,  gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 3rd Mix (GE949 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.4 */
5662GAME( 2000, gtfrk3mb, gtrfrk3m, pccard1dzi,   gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 3rd Mix - security cassette versionup (949JAZ02)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.4 */
5663GAME( 2000, pnchmn2,  sys573,   punchmania2,  punchmania, ksys573_state,punchmania, ROT0, "Konami", "Punch Mania 2: Hokuto No Ken (GQA09 JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5664GAME( 2000, salarymc, sys573,   konami573yi,  hypbbc2p, ksys573_state,  salarymc,   ROT0, "Konami", "Salary Man Champ (GCA18 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5665GAME( 2000, ddr3mp,   sys573,   pccard2dxzi,  ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution 3rd Mix Plus (G*A22 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.6 */
5666GAME( 2000, pcnfrk3m, sys573,   k573dxzi,     drmn, ksys573_state,      drmndigital,ROT0, "Konami", "Percussion Freaks 3rd Mix (G*A23 VER. KAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5667GAME( 2000, drmn3m,   pcnfrk3m, k573dxzi,     drmn, ksys573_state,      drmndigital,ROT0, "Konami", "DrumMania 3rd Mix (G*A23 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5668GAME( 2000, gtrfrk4m, sys573,   pccard1dxzi,  gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 4th Mix (G*A24 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5669GAME( 2000, ddr4m,    sys573,   pccard2dxzi,  ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution 4th Mix (G*A33 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5670GAME( 2000, ddr4mj,   ddr4m,    pccard2dxzi,  ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution 4th Mix (G*A33 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5671GAME( 2000, ddr4ms,   sys573,   pccard2dxzi,  ddrsolo, ksys573_state,   ddrsolo,    ROT0, "Konami", "Dance Dance Revolution 4th Mix Solo (G*A33 VER. ABA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5672GAME( 2000, ddr4msj,  ddr4ms,   pccard2dxzi,  ddrsolo, ksys573_state,   ddrsolo,    ROT0, "Konami", "Dance Dance Revolution 4th Mix Solo (G*A33 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5673GAME( 2000, dsfdr,    sys573,   k573dxzi,     ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dancing Stage Featuring Disney's Rave (GCA37JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5674GAME( 2000, ddrusa,   sys573,   k573dx,       ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution USA (G*A44 VER. UAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5675GAME( 2000, ddr4mp,   sys573,   pccard2dxzi,  ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution 4th Mix Plus (G*A34 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5676GAME( 2000, ddr4mps,  sys573,   pccard2dxzi,  ddrsolo, ksys573_state,   ddrsolo,    ROT0, "Konami", "Dance Dance Revolution 4th Mix Plus Solo (G*A34 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5677GAME( 2000, dmx2m,    sys573,   k573dzi,      dmx, ksys573_state,       dmx,        ROT0, "Konami", "Dance Maniax 2nd Mix (G*A39 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5678GAME( 2000, drmn4m,   sys573,   k573dzi,      drmn, ksys573_state,      drmndigital,ROT0, "Konami", "DrumMania 4th Mix (G*A25 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5679GAME( 2001, gtrfrk5m, sys573,   pccard1dzi,   gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 5th Mix (G*A26 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5680GAME( 2001, ddr5m,    sys573,   pccard2dzi,   ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution 5th Mix (G*A27 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5681GAME( 2001, dmx2majp, sys573,   konami573zi,  dmx, ksys573_state,       dmx,        ROT0, "Konami", "Dance Maniax 2nd Mix Append J-Paradise (G*A38 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5682GAME( 2001, mamboagg, sys573,   k573dzi,      mamboagg, ksys573_state,  mamboagg,   ROT0, "Konami", "Mambo A Go-Go (GQA40 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5683GAME( 2001, drmn5m,   sys573,   k573dzi,      drmn, ksys573_state,      drmndigital,ROT0, "Konami", "DrumMania 5th Mix (G*B05 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5684GAME( 2001, gtrfrk6m, sys573,   pccard1dzi,   gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 6th Mix (G*B06 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5685GAME( 2001, drmn6m,   sys573,   k573dzi,      drmn, ksys573_state,      drmndigital,ROT0, "Konami", "DrumMania 6th Mix (G*B16 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5686GAME( 2001, gtrfrk7m, sys573,   pccard1dzi,   gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 7th Mix (G*B17 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5687GAME( 2001, ddrmax,   sys573,   pccard2dzi,   ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "DDR Max - Dance Dance Revolution 6th Mix (G*B19 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5688GAME( 2002, ddrmax2,  sys573,   pccard2dzi,   ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "DDR Max 2 - Dance Dance Revolution 7th Mix (G*B20 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5689GAME( 2002, mrtlbeat, sys573,   pccard2dzi,   ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Martial Beat (G*B47 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5690GAME( 2002, drmn7m,   sys573,   k573dzi,      drmn, ksys573_state,      drmndigital,ROT0, "Konami", "DrumMania 7th Mix power-up ver. (G*C07 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5691GAME( 2002, drmn7ma,  drmn7m,   k573dzi,      drmn, ksys573_state,      drmndigital,ROT0, "Konami", "DrumMania 7th Mix (G*C07 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5692GAME( 2002, gtrfrk8m, sys573,   pccard1dzi,   gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 8th Mix power-up ver. (G*C08 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5693GAME( 2002, gtrfrk8ma,gtrfrk8m, pccard1dzi,   gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 8th Mix (G*C08 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5694GAME( 2002, dsem2,    sys573,   pccard2dzi,   ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dancing Stage Euro Mix 2 (G*C23 VER. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5695GAME( 2002, ddrextrm, sys573,   pccard2dzi,   ddr, ksys573_state,       ddrdigital, ROT0, "Konami", "Dance Dance Revolution Extreme (G*C36 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5696GAME( 2003, drmn8m,   sys573,   k573dzi,      drmn, ksys573_state,      drmndigital,ROT0, "Konami", "DrumMania 8th Mix (G*C07 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5697GAME( 2003, gtrfrk9m, sys573,   pccard1dzi,   gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 9th Mix (G*C39 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5698GAME( 2003, drmn9m,   sys573,   k573dzi,      drmn, ksys573_state,      drmndigital,ROT0, "Konami", "DrumMania 9th Mix (G*D09 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5699GAME( 2003, gtfrk10m, sys573,   pccard1dzi,   gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 10th Mix (G*D10 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5700GAME( 2003, gtfrk10ma,gtfrk10m, pccard1dzi,   gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 10th Mix (G*D10 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5701GAME( 2003, gtfrk10mb,gtfrk10m, pccard1dzi,   gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 10th Mix eAmusement (G*D10 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5702GAME( 2004, gtfrk11m, sys573,   pccard1dzi,   gtrfrks, ksys573_state,   gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 11th Mix (G*D39 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5703GAME( 2004, drmn10m,  sys573,   k573dzi,      drmn, ksys573_state,      drmndigital,ROT0, "Konami", "DrumMania 10th Mix (G*D40 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5597GAME( 1997, hndlchmp, sys573,   konami573,    hndlchmp,  ksys573_state, konami573,    ROT0, "Konami", "Handle Champ (GQ710 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5598GAME( 1998, darkhleg, sys573,   konami573x,   konami573, ksys573_state, konami573,    ROT0, "Konami", "Dark Horse Legend (GX706 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5599GAME( 1998, fbaitbc,  sys573,   k573baitx,    fbaitbc,   ksys573_state, ge765pwbba,   ROT0, "Konami", "Fisherman's Bait - A Bass Challenge (GE765 VER. UAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5600GAME( 1998, bassangl, fbaitbc,  k573baitx,    fbaitbc,   ksys573_state, ge765pwbba,   ROT0, "Konami", "Bass Angler (GE765 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5601GAME( 1998, pbballex, sys573,   konami573x,   konami573, ksys573_state, konami573,    ROT0, "Konami", "Powerful Pro Baseball EX (GX802 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5602GAME( 1998, konam80s, sys573,   konami573x,   konami573, ksys573_state, konami573,    ROT90, "Konami", "Konami 80's AC Special (GC826 VER. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5603GAME( 1998, konam80u, konam80s, konami573x,   konami573, ksys573_state, konami573,    ROT90, "Konami", "Konami 80's AC Special (GC826 VER. UAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5604GAME( 1998, konam80j, konam80s, konami573x,   konami573, ksys573_state, konami573,    ROT90, "Konami", "Konami 80's Gallery (GC826 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5605GAME( 1998, konam80a, konam80s, konami573x,   konami573, ksys573_state, konami573,    ROT90, "Konami", "Konami 80's AC Special (GC826 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5606GAME( 1998, konam80k, konam80s, konami573x,   konami573, ksys573_state, konami573,    ROT90, "Konami", "Konami 80's AC Special (GC826 VER. KAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5607GAME( 1999, dstage,   sys573,   konami573x,   ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dancing Stage (GN845 VER. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5608GAME( 1999, ddru,     dstage,   konami573x,   ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dance Dance Revolution (GN845 VER. UAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5609GAME( 1998, ddrj,     dstage,   konami573x,   ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dance Dance Revolution - Internet Ranking Ver (GC845 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5610GAME( 1998, ddrja,    dstage,   konami573x,   ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dance Dance Revolution (GC845 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5611GAME( 1998, ddrjb,    dstage,   konami573x,   ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dance Dance Revolution (GC845 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5612GAME( 1999, ddra,     dstage,   konami573x,   ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dance Dance Revolution (GN845 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5613GAME( 1998, fbait2bc, sys573,   k573baitx,    fbaitbc,   ksys573_state, ge765pwbba,   ROT0, "Konami", "Fisherman's Bait 2 - A Bass Challenge (GE865 VER. UAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5614GAME( 1998, bassang2, fbait2bc, k573baitx,    fbaitbc,   ksys573_state, ge765pwbba,   ROT0, "Konami", "Bass Angler 2 (GE865 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5615GAME( 1998, hyperbbc, sys573,   konami573,    hyperbbc,  ksys573_state, konami573,    ROT0, "Konami", "Hyper Bishi Bashi Champ (GQ876 VER. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5616GAME( 1998, hyperbbca,hyperbbc, konami573,    hyperbbc,  ksys573_state, konami573,    ROT0, "Konami", "Hyper Bishi Bashi Champ (GQ876 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5617GAME( 1999, gchgchmp, sys573,   pccard1x,     gchgchmp,  ksys573_state, konami573,    ROT0, "Konami", "Gachaga Champ (GE877 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5618GAME( 1999, drmn,     sys573,   konami573x,   drmn,      ksys573_state, drmn,         ROT0, "Konami", "DrumMania (GQ881 VER. JAD)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5619GAME( 1999, gtrfrks,  sys573,   konami573x,   gtrfrks,   ksys573_state, gtrfrks,      ROT0, "Konami", "Guitar Freaks (GQ886 VER. EAC)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5620GAME( 1999, gtrfrksu, gtrfrks,  konami573x,   gtrfrks,   ksys573_state, gtrfrks,      ROT0, "Konami", "Guitar Freaks (GQ886 VER. UAC)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5621GAME( 1999, gtrfrksj, gtrfrks,  konami573x,   gtrfrks,   ksys573_state, gtrfrks,      ROT0, "Konami", "Guitar Freaks (GQ886 VER. JAC)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5622GAME( 1999, gtrfrksa, gtrfrks,  konami573x,   gtrfrks,   ksys573_state, gtrfrks,      ROT0, "Konami", "Guitar Freaks (GQ886 VER. AAC)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5623GAME( 1999, fbaitmc,  sys573,   k573baitx,    fbaitmc,   ksys573_state, ge765pwbba,   ROT0, "Konami", "Fisherman's Bait - Marlin Challenge (GX889 VER. EA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5624GAME( 1999, fbaitmcu, fbaitmc,  k573baitx,    fbaitmc,   ksys573_state, ge765pwbba,   ROT0, "Konami", "Fisherman's Bait - Marlin Challenge (GX889 VER. UA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5625GAME( 1999, fbaitmcj, fbaitmc,  k573baitx,    fbaitmc,   ksys573_state, ge765pwbba,   ROT0, "Konami", "Fisherman's Bait - Marlin Challenge (GX889 VER. JA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5626GAME( 1999, fbaitmca, fbaitmc,  k573baitx,    fbaitmc,   ksys573_state, ge765pwbba,   ROT0, "Konami", "Fisherman's Bait - Marlin Challenge (GX889 VER. AA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5627GAME( 1999, ddr2m,    sys573,   konami573x,   ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dance Dance Revolution 2nd Mix (GN895 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5628GAME( 1999, ddr2ml,   ddr2m,    pccard1x,     ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dance Dance Revolution 2nd Mix - Link Ver (GE885 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5629GAME( 1999, ddr2mla,  ddr2m,    pccard1x,     ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dance Dance Revolution 2nd Mix - Link Ver (GE885 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5630GAME( 1999, ddrbocd,  ddr2m,    pccard1x,     ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dance Dance Revolution Best of Cool Dancers (GE892 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5631GAME( 1999, ddr2mc,   ddr2m,    konami573x,   ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dance Dance Revolution 2nd Mix with beatmaniaIIDX CLUB VERSiON (GE896 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5632GAME( 1999, ddr2mc2,  ddr2m,    konami573x,   ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dance Dance Revolution 2nd Mix with beatmaniaIIDX substream CLUB VERSiON 2 (GE984 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5633GAME( 1999, gtrfrk2m, sys573,   pccard1yi,    gtrfrks,   ksys573_state, gtrfrks,      ROT0, "Konami", "Guitar Freaks 2nd Mix Ver 1.01 (GQ883 VER. JAD)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5634GAME( 1999, dsftkd,   sys573,   konami573yi,  ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dancing Stage featuring TRUE KiSS DESTiNATiON (G*884 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5635GAME( 1999, cr589fw,  sys573,   konami573,    konami573, ksys573_state, konami573,    ROT0, "Konami", "CD-ROM Drive Updater 2.0 (700B04)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5636GAME( 1999, cr589fwa, sys573,   konami573,    konami573, ksys573_state, konami573,    ROT0, "Konami", "CD-ROM Drive Updater (700A04)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5637GAME( 2000, ddr3mk,   sys573,   pccard2dyyi,  ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dance Dance Revolution 3rd Mix - Ver.Korea2 (GN887 VER. KBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.3 */
5638GAME( 2000, ddr3mka,  ddr3mk,   pccard2dyyi,  ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dance Dance Revolution 3rd Mix - Ver.Korea (GN887 VER. KAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.3 */
5639GAME( 1999, ddr3ma,   ddr3mk,   pccard2dyyi,  ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dance Dance Revolution 3rd Mix (GN887 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.1 */
5640GAME( 1999, ddr3mj,   ddr3mk,   pccard2dyyi,  ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dance Dance Revolution 3rd Mix (GN887 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.0 */
5641GAME( 1999, ddrsbm,   sys573,   k573dyi,      ddrsolo,   ksys573_state, ddrsolo,      ROT0, "Konami", "Dance Dance Revolution Solo Bass Mix (GQ894 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5642GAME( 1999, ddrs2k,   sys573,   k573dyyi,     ddrsolo,   ksys573_state, ddrsolo,      ROT0, "Konami", "Dance Dance Revolution Solo 2000 (GC905 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.3 */
5643GAME( 1999, ddrs2kj,  ddrs2k,   k573dyyi,     ddrsolo,   ksys573_state, ddrsolo,      ROT0, "Konami", "Dance Dance Revolution Solo 2000 (GC905 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.2 */
5644GAME( 1999, hypbbc2p, sys573,   konami573y,   hypbbc2p,  ksys573_state, hyperbbc,     ROT0, "Konami", "Hyper Bishi Bashi Champ - 2 Player (GX908 1999/08/24 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5645GAME( 1999, hypbbc2pk,hypbbc2p, konami573y,   hypbbc2p,  ksys573_state, hyperbbc,     ROT0, "Konami", "Hyper Bishi Bashi Champ - 2 Player (GX908 1999/08/24 VER. KAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5646GAME( 1999, dsfdct,   sys573,   pccard2dyyi,  ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dancing Stage featuring Dreams Come True (GC910 VER. JCA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5647GAME( 1999, dsfdcta,  dsfdct,   pccard2yyi,   ddr,       ksys573_state, ddr,          ROT0, "Konami", "Dancing Stage featuring Dreams Come True (GC910 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5648GAME( 1999, drmn2m,   sys573,   k573dxzi,     drmn,      ksys573_state, drmndigital,  ROT0, "Konami", "DrumMania 2nd Mix (GE912 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.5 */
5649GAME( 1999, drmn2mpu, drmn2m,   k573dxzi,     drmn,      ksys573_state, drmndigital,  ROT0, "Konami", "DrumMania 2nd Mix Session Power Up Kit (GE912 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.5 */
5650GAME( 2000, dncfrks,  sys573,   k573dzi,      dmx,       ksys573_state, dmx,          ROT0, "Konami", "Dance Freaks (G*874 VER. KAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.6 */
5651GAME( 2000, dmx,      dncfrks,  k573dzi,      dmx,       ksys573_state, dmx,          ROT0, "Konami", "Dance Maniax (G*874 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.6 */
5652GAME( 2000, gunmania, sys573,   gunmania,     gunmania,  ksys573_state, gunmania,     ROT0, "Konami", "GunMania (GL906 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
5653GAME( 2000, fghtmn,   sys573,   punchmania,   punchmania,ksys573_state, punchmania,   ROT0, "Konami", "Fighting Mania (QG918 VER. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5654GAME( 2000, fghtmna,  fghtmn,   punchmania,   punchmania,ksys573_state, punchmania,   ROT0, "Konami", "Fighting Mania (QG918 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5655GAME( 2000, pnchmn,   fghtmn,   punchmania,   punchmania,ksys573_state, punchmania,   ROT0, "Konami", "Punch Mania: Hokuto No Ken (GQ918 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5656GAME( 2000, pnchmna,  fghtmn,   punchmania,   punchmania,ksys573_state, punchmania,   ROT0, "Konami", "Punch Mania: Hokuto No Ken (GQ918 VER. JAB ALT CD)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5657GAME( 2000, fghtmnk,  fghtmn,   punchmania,   punchmania,ksys573_state, punchmania,   ROT0, "Konami", "Fighting Mania (QG918 VER. KAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5658GAME( 2000, fghtmnu,  fghtmn,   punchmania,   punchmania,ksys573_state, punchmania,   ROT0, "Konami", "Fighting Mania (QG918 VER. UAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5659GAME( 2000, dsem,     sys573,   k573dxi,      ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dancing Stage Euro Mix (G*936 VER. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.7 */
5660GAME( 2000, gtrfrk3m, sys573,   pccard1dxzi,  gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 3rd Mix (GE949 VER. JAC)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.4 */
5661GAME( 2000, gtfrk3ma, gtrfrk3m, pccard1dxzi,  gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 3rd Mix (GE949 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.4 */
5662GAME( 2000, gtfrk3mb, gtrfrk3m, pccard1dzi,   gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 3rd Mix - security cassette versionup (949JAZ02)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.4 */
5663GAME( 2000, pnchmn2,  sys573,   punchmania2,  punchmania,ksys573_state, punchmania,   ROT0, "Konami", "Punch Mania 2: Hokuto No Ken (GQA09 JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* motor/artwork/network */
5664GAME( 2000, salarymc, sys573,   konami573yi,  hypbbc2p,  ksys573_state, salarymc,     ROT0, "Konami", "Salary Man Champ (GCA18 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
5665GAME( 2000, ddr3mp,   sys573,   pccard2dxzi,  ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dance Dance Revolution 3rd Mix Plus (G*A22 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.6 */
5666GAME( 2000, pcnfrk3m, sys573,   k573dxzi,     drmn,      ksys573_state, drmndigital,  ROT0, "Konami", "Percussion Freaks 3rd Mix (G*A23 VER. KAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5667GAME( 2000, drmn3m,   pcnfrk3m, k573dxzi,     drmn,      ksys573_state, drmndigital,  ROT0, "Konami", "DrumMania 3rd Mix (G*A23 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5668GAME( 2000, gtrfrk4m, sys573,   pccard1dxzi,  gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 4th Mix (G*A24 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5669GAME( 2000, ddr4m,    sys573,   pccard2dxzi,  ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dance Dance Revolution 4th Mix (G*A33 VER. AAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5670GAME( 2000, ddr4mj,   ddr4m,    pccard2dxzi,  ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dance Dance Revolution 4th Mix (G*A33 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5671GAME( 2000, ddr4ms,   sys573,   pccard2dxzi,  ddrsolo,   ksys573_state, ddrsolo,      ROT0, "Konami", "Dance Dance Revolution 4th Mix Solo (G*A33 VER. ABA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5672GAME( 2000, ddr4msj,  ddr4ms,   pccard2dxzi,  ddrsolo,   ksys573_state, ddrsolo,      ROT0, "Konami", "Dance Dance Revolution 4th Mix Solo (G*A33 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5673GAME( 2000, dsfdr,    sys573,   k573dxzi,     ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dancing Stage Featuring Disney's Rave (GCA37JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5674GAME( 2000, ddrusa,   sys573,   k573dx,       ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dance Dance Revolution USA (G*A44 VER. UAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5675GAME( 2000, ddr4mp,   sys573,   pccard2dxzi,  ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dance Dance Revolution 4th Mix Plus (G*A34 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5676GAME( 2000, ddr4mps,  sys573,   pccard2dxzi,  ddrsolo,   ksys573_state, ddrsolo,      ROT0, "Konami", "Dance Dance Revolution 4th Mix Plus Solo (G*A34 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5677GAME( 2000, dmx2m,    sys573,   k573dzi,      dmx,       ksys573_state, dmx,          ROT0, "Konami", "Dance Maniax 2nd Mix (G*A39 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5678GAME( 2000, drmn4m,   sys573,   k573dzi,      drmn,      ksys573_state, drmndigital,  ROT0, "Konami", "DrumMania 4th Mix (G*A25 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.8 */
5679GAME( 2001, gtrfrk5m, sys573,   pccard1dzi,   gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 5th Mix (G*A26 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5680GAME( 2001, ddr5m,    sys573,   pccard2dzi,   ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dance Dance Revolution 5th Mix (G*A27 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5681GAME( 2001, dmx2majp, sys573,   konami573zi,  dmx,       ksys573_state, dmx,          ROT0, "Konami", "Dance Maniax 2nd Mix Append J-Paradise (G*A38 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5682GAME( 2001, mamboagg, sys573,   k573dzi,      mamboagg,  ksys573_state, mamboagg,     ROT0, "Konami", "Mambo A Go-Go (GQA40 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5683GAME( 2001, drmn5m,   sys573,   k573dzi,      drmn,      ksys573_state, drmndigital,  ROT0, "Konami", "DrumMania 5th Mix (G*B05 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5684GAME( 2001, gtrfrk6m, sys573,   pccard1dzi,   gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 6th Mix (G*B06 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5685GAME( 2001, drmn6m,   sys573,   k573dzi,      drmn,      ksys573_state, drmndigital,  ROT0, "Konami", "DrumMania 6th Mix (G*B16 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5686GAME( 2001, gtrfrk7m, sys573,   pccard1dzi,   gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 7th Mix (G*B17 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5687GAME( 2001, ddrmax,   sys573,   pccard2dzi,   ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "DDR Max - Dance Dance Revolution 6th Mix (G*B19 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5688GAME( 2002, ddrmax2,  sys573,   pccard2dzi,   ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "DDR Max 2 - Dance Dance Revolution 7th Mix (G*B20 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5689GAME( 2002, mrtlbeat, sys573,   pccard2dzi,   ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Martial Beat (G*B47 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.9 */
5690GAME( 2002, drmn7m,   sys573,   k573dzi,      drmn,      ksys573_state, drmndigital,  ROT0, "Konami", "DrumMania 7th Mix power-up ver. (G*C07 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5691GAME( 2002, drmn7ma,  drmn7m,   k573dzi,      drmn,      ksys573_state, drmndigital,  ROT0, "Konami", "DrumMania 7th Mix (G*C07 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5692GAME( 2002, gtrfrk8m, sys573,   pccard1dzi,   gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 8th Mix power-up ver. (G*C08 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5693GAME( 2002, gtrfrk8ma,gtrfrk8m, pccard1dzi,   gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 8th Mix (G*C08 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5694GAME( 2002, dsem2,    sys573,   pccard2dzi,   ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dancing Stage Euro Mix 2 (G*C23 VER. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5695GAME( 2002, ddrextrm, sys573,   pccard2dzi,   ddr,       ksys573_state, ddrdigital,   ROT0, "Konami", "Dance Dance Revolution Extreme (G*C36 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5696GAME( 2003, drmn8m,   sys573,   k573dzi,      drmn,      ksys573_state, drmndigital,  ROT0, "Konami", "DrumMania 8th Mix (G*C07 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5697GAME( 2003, gtrfrk9m, sys573,   pccard1dzi,   gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 9th Mix (G*C39 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5698GAME( 2003, drmn9m,   sys573,   k573dzi,      drmn,      ksys573_state, drmndigital,  ROT0, "Konami", "DrumMania 9th Mix (G*D09 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5699GAME( 2003, gtfrk10m, sys573,   pccard1dzi,   gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 10th Mix (G*D10 VER. JAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5700GAME( 2003, gtfrk10ma,gtfrk10m, pccard1dzi,   gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 10th Mix (G*D10 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5701GAME( 2003, gtfrk10mb,gtfrk10m, pccard1dzi,   gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 10th Mix eAmusement (G*D10 VER. JBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5702GAME( 2004, gtfrk11m, sys573,   pccard1dzi,   gtrfrks,   ksys573_state, gtrfrkdigital,ROT0, "Konami", "Guitar Freaks 11th Mix (G*D39 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
5703GAME( 2004, drmn10m,  sys573,   k573dzi,      drmn,      ksys573_state, drmndigital,  ROT0, "Konami", "DrumMania 10th Mix (G*D40 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* BOOT VER 1.95 */
trunk/src/mame/drivers/zr107.c
r22723r22724
531531
532532   PORT_START("IN2")
533533   PORT_BIT( 0x7f, IP_ACTIVE_HIGH, IPT_UNKNOWN )
534   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("adc0838", adc083x_do_read)
534   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("adc0838", adc083x_device, do_read)
535535
536536   PORT_START("IN4")
537537   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* PARAACK */
538538   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
539   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("adc0838",adc083x_sars_read)
540   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom",eeprom_device,read_bit)
539   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("adc0838", adc083x_device, sars_read)
540   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit)
541541
542542   PORT_START("EEPROMOUT")
543543   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_device, write_bit)
r22723r22724
545545   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_device, set_cs_line)
546546
547547   PORT_START("OUT4")
548   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0838", adc083x_cs_write)
549   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0838", adc083x_di_write)
550   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE("adc0838", adc083x_clk_write)
548   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("adc0838", adc083x_device, cs_write)
549   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("adc0838", adc083x_device, di_write)
550   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("adc0838", adc083x_device, clk_write)
551551INPUT_PORTS_END
552552
553553static INPUT_PORTS_START( midnrun )
trunk/src/emu/machine/adc083x.c
r22723r22724
4747struct adc0831_state
4848{
4949   adc083x_input_convert_func input_callback_r;
50
51   INT32 cs;
52   INT32 clk;
53   INT32 di;
54   INT32 se;
55   INT32 sars;
56   INT32 _do;
57   INT32 sgl;
58   INT32 odd;
59   INT32 sel1;
60   INT32 sel0;
61   INT32 state;
62   INT32 bit;
63   INT32 output;
64   INT32 mux_bits;
6550};
6651
52const device_type ADC0831 = &device_creator<adc0831_device>;
53const device_type ADC0832 = &device_creator<adc0832_device>;
54const device_type ADC0834 = &device_creator<adc0834_device>;
55const device_type ADC0838 = &device_creator<adc0838_device>;
6756
57adc083x_device::adc083x_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
58   : device_t(mconfig, type, name, tag, owner, clock),
59   m_cs(0),
60   m_clk(0),
61   m_di(0),
62   m_se(0),
63   m_do(1),
64   m_sgl(0),
65   m_odd(0),
66   m_sel1(0),
67   m_sel0(0),
68   m_state(STATE_IDLE),
69   m_bit(0),
70   m_output(0)
71{
72}
6873
69/***************************************************************************
70    INLINE FUNCTIONS
71***************************************************************************/
74adc0831_device::adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
75   : adc083x_device(mconfig, ADC0831, "A/D Converters 0831", tag, owner, clock)
76{
77   m_mux_bits = 0;
78}
7279
73INLINE adc0831_state *get_safe_token( device_t *device )
80adc0832_device::adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
81   : adc083x_device(mconfig, ADC0832, "A/D Converters 0832", tag, owner, clock)
7482{
75   assert( device != NULL );
76   assert( ( device->type() == ADC0831 ) || ( device->type() == ADC0832 ) || ( device->type() == ADC0834 ) || ( device->type() == ADC0838 ) );
77   return (adc0831_state *) downcast<adc0831_device *>(device)->token();
83   m_mux_bits = 2;
7884}
7985
80INLINE const adc083x_interface *get_interface( device_t *device )
86adc0834_device::adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
87   : adc083x_device(mconfig, ADC0834, "A/D Converters 0834", tag, owner, clock)
8188{
82   assert( device != NULL );
83   assert( ( device->type() == ADC0831 ) || ( device->type() == ADC0832 ) || ( device->type() == ADC0834 ) || ( device->type() == ADC0838 ) );
84   return (const adc083x_interface *) device->static_config();
89   m_mux_bits = 3;
8590}
8691
92adc0838_device::adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
93   : adc083x_device(mconfig, ADC0838, "A/D Converters 0838", tag, owner, clock)
94{
95   m_mux_bits = 4;
96}
8797
88/***************************************************************************
89    IMPLEMENTATION
90***************************************************************************/
98//-------------------------------------------------
99//  device_config_complete - perform any
100//  operations now that the configuration is
101//  complete
102//-------------------------------------------------
91103
104void adc083x_device::device_config_complete()
105{
106   const adc083x_interface *intf = (const adc083x_interface *) static_config();
107
108   /* resolve callbacks */
109   m_input_callback_r = intf->input_callback_r;
110}
111
112
113
92114/*-------------------------------------------------
93    adc083x_clear_sars
115    adc083x_device::device_start
94116-------------------------------------------------*/
95117
96static void adc083x_clear_sars( device_t *device, adc0831_state *adc083x )
118void adc083x_device::device_start()
97119{
98   if( device->type() == ADC0834 ||device->type() == ADC0838 )
120   clear_sars();
121
122   /* register for state saving */
123   save_item( NAME(m_cs) );
124   save_item( NAME(m_clk) );
125   save_item( NAME(m_di) );
126   save_item( NAME(m_se) );
127   save_item( NAME(m_sars) );
128   save_item( NAME(m_do) );
129   save_item( NAME(m_sgl) );
130   save_item( NAME(m_odd) );
131   save_item( NAME(m_sel1) );
132   save_item( NAME(m_sel0) );
133   save_item( NAME(m_state) );
134   save_item( NAME(m_bit) );
135   save_item( NAME(m_output) );
136   save_item( NAME(m_mux_bits) );
137}
138
139/*-------------------------------------------------
140    adc083x_device::clear_sars
141-------------------------------------------------*/
142
143void adc083x_device::clear_sars()
144{
145   if( type() == ADC0834 || type() == ADC0838 )
99146   {
100      adc083x->sars = 1;
147      m_sars = 1;
101148   }
102149   else
103150   {
104      adc083x->sars = 0;
151      m_sars = 0;
105152   }
106153}
107154
108155/*-------------------------------------------------
109    adc083x_cs_write
156    adc083x_device::cs_write
110157-------------------------------------------------*/
111158
112WRITE_LINE_DEVICE_HANDLER( adc083x_cs_write )
159WRITE_LINE_MEMBER( adc083x_device::cs_write )
113160{
114   adc0831_state *adc083x = get_safe_token( device );
115
116   if( adc083x->cs != state )
161   if( m_cs != state )
117162   {
118      verboselog( 2, device->machine(), "adc083x_cs_write( %s, %d )\n", device->tag(), state );
163      verboselog( 2, machine(), "adc083x_cs_write( %s, %d )\n", tag(), state );
119164   }
120165
121   if( adc083x->cs == 0 && state != 0 )
166   if( m_cs == 0 && state != 0 )
122167   {
123      adc083x->state = STATE_IDLE;
124      adc083x_clear_sars( device, adc083x );
125      adc083x->_do = 1;
168      m_state = STATE_IDLE;
169      clear_sars();
170      m_do = 1;
126171   }
127172
128   if( adc083x->cs != 0 && state == 0 )
173   if( m_cs != 0 && state == 0 )
129174   {
130      if( device->type() == ADC0831 )
175      if( type() == ADC0831 )
131176      {
132         adc083x->state = STATE_MUX_SETTLE;
177         m_state = STATE_MUX_SETTLE;
133178      }
134179      else
135180      {
136         adc083x->state = STATE_WAIT_FOR_START;
181         m_state = STATE_WAIT_FOR_START;
137182      }
138183
139      adc083x_clear_sars( device, adc083x );
140      adc083x->_do = 1;
184      clear_sars();
185      m_do = 1;
141186   }
142187
143   adc083x->cs = state;
188   m_cs = state;
144189}
145190
146191/*-------------------------------------------------
147    adc083x_conversion
192    adc083x_device::conversion
148193-------------------------------------------------*/
149194
150static UINT8 adc083x_conversion( device_t *device )
195UINT8 adc083x_device::conversion()
151196{
152   adc0831_state *adc083x = get_safe_token( device );
153197   int result;
154198   int positive_channel = ADC083X_AGND;
155199   int negative_channel = ADC083X_AGND;
156200   double positive = 0;
157201   double negative = 0;
158   double gnd = adc083x->input_callback_r( device, ADC083X_AGND );
159   double vref = adc083x->input_callback_r( device, ADC083X_VREF );
202   double gnd = m_input_callback_r( this, ADC083X_AGND );
203   double vref = m_input_callback_r( this, ADC083X_VREF );
160204
161   if( device->type() == ADC0831 )
205   if( type() == ADC0831 )
162206   {
163207      positive_channel = ADC083X_CH0;
164208      negative_channel = ADC083X_CH1;
165209   }
166   else if( device->type() == ADC0832 )
210   else if( type() == ADC0832 )
167211   {
168      positive_channel = ADC083X_CH0 + adc083x->odd;
169      if( adc083x->sgl == 0 )
212      positive_channel = ADC083X_CH0 + m_odd;
213      if( m_sgl == 0 )
170214      {
171215         negative_channel = positive_channel ^ 1;
172216      }
r22723r22724
175219         negative_channel = ADC083X_AGND;
176220      }
177221   }
178   else if( device->type() == ADC0834 )
222   else if( type() == ADC0834 )
179223   {
180      positive_channel = ADC083X_CH0 + adc083x->odd + ( adc083x->sel1 * 2 );
181      if( adc083x->sgl == 0 )
224      positive_channel = ADC083X_CH0 + m_odd + ( m_sel1 * 2 );
225      if( m_sgl == 0 )
182226      {
183227         negative_channel = positive_channel ^ 1;
184228      }
r22723r22724
187231         negative_channel = ADC083X_AGND;
188232      }
189233   }
190   else if( device->type() == ADC0838 )
234   else if( type() == ADC0838 )
191235   {
192      positive_channel = ADC083X_CH0 + adc083x->odd + ( adc083x->sel0 * 2 ) + ( adc083x->sel1 * 4 );
193      if( adc083x->sgl == 0 )
236      positive_channel = ADC083X_CH0 + m_odd + ( m_sel0 * 2 ) + ( m_sel1 * 4 );
237      if( m_sgl == 0 )
194238      {
195239         negative_channel = positive_channel ^ 1;
196240      }
r22723r22724
202246
203247   if( positive_channel != ADC083X_AGND )
204248   {
205      positive = adc083x->input_callback_r( device, positive_channel ) - gnd;
249      positive = m_input_callback_r( this, positive_channel ) - gnd;
206250   }
207251
208252   if( negative_channel != ADC083X_AGND )
209253   {
210      negative = adc083x->input_callback_r( device, negative_channel ) - gnd;
254      negative = m_input_callback_r( this, negative_channel ) - gnd;
211255   }
212256
213257   result = (int) ( ( ( positive - negative ) * 255 ) / vref );
r22723r22724
224268}
225269
226270/*-------------------------------------------------
227    adc083x_clk_write
271    adc083x_device::clk_write
228272-------------------------------------------------*/
229273
230WRITE_LINE_DEVICE_HANDLER( adc083x_clk_write )
274WRITE_LINE_MEMBER( adc083x_device::clk_write )
231275{
232   adc0831_state *adc083x = get_safe_token( device );
233
234   if( adc083x->clk != state )
276   if( m_clk != state )
235277   {
236      verboselog( 2, device->machine(), "adc083x_clk_write( %s, %d )\n", device->tag(), state );
278      verboselog( 2, machine(), "adc083x_clk_write( %s, %d )\n", tag(), state );
237279   }
238280
239   if( adc083x->cs == 0 )
281   if( m_cs == 0 )
240282   {
241      if( adc083x->clk == 0 && state != 0 )
283      if( m_clk == 0 && state != 0 )
242284      {
243         switch( adc083x->state )
285         switch( m_state )
244286         {
245287         case STATE_WAIT_FOR_START:
246            if( adc083x->di != 0 )
288            if( m_di != 0 )
247289            {
248               verboselog( 1, device->machine(), "adc083x %s got start bit\n", device->tag() );
249               adc083x->state = STATE_SHIFT_MUX;
250               adc083x->sars = 0;
251               adc083x->sgl = 0;
252               adc083x->odd = 0;
253               adc083x->sel1 = 0;
254               adc083x->sel0 = 0;
255               adc083x->bit = 0;
290               verboselog( 1, machine(), "adc083x %s got start bit\n", tag() );
291               m_state = STATE_SHIFT_MUX;
292               m_sars = 0;
293               m_sgl = 0;
294               m_odd = 0;
295               m_sel1 = 0;
296               m_sel0 = 0;
297               m_bit = 0;
256298            }
257299            else
258300            {
259               verboselog( 1, device->machine(), "adc083x %s not start bit\n", device->tag() );
301               verboselog( 1, machine(), "adc083x %s not start bit\n", tag() );
260302            }
261303            break;
262304
263305         case STATE_SHIFT_MUX:
264            switch( adc083x->bit )
306            switch( m_bit )
265307            {
266308            case 0:
267               if( adc083x->di != 0 )
309               if( m_di != 0 )
268310               {
269                  adc083x->sgl = 1;
311                  m_sgl = 1;
270312               }
271               verboselog( 1, device->machine(), "adc083x %s sgl <- %d\n", device->tag(), adc083x->sgl );
313               verboselog( 1, machine(), "adc083x %s sgl <- %d\n", tag(), m_sgl );
272314               break;
273315
274316            case 1:
275               if( adc083x->di != 0 )
317               if( m_di != 0 )
276318               {
277                  adc083x->odd = 1;
319                  m_odd = 1;
278320               }
279               verboselog( 1, device->machine(), "adc083x %s odd <- %d\n", device->tag(), adc083x->odd );
321               verboselog( 1, machine(), "adc083x %s odd <- %d\n", tag(), m_odd );
280322               break;
281323
282324            case 2:
283               if( adc083x->di != 0 )
325               if( m_di != 0 )
284326               {
285                  adc083x->sel1 = 1;
327                  m_sel1 = 1;
286328               }
287               verboselog( 1, device->machine(), "adc083x %s sel1 <- %d\n", device->tag(), adc083x->sel1 );
329               verboselog( 1, machine(), "adc083x %s sel1 <- %d\n", tag(), m_sel1 );
288330               break;
289331
290332            case 3:
291               if( adc083x->di != 0 )
333               if( m_di != 0 )
292334               {
293                  adc083x->sel0 = 1;
335                  m_sel0 = 1;
294336               }
295               verboselog( 1, device->machine(), "adc083x %s sel0 <- %d\n", device->tag(), adc083x->sel0 );
337               verboselog( 1, machine(), "adc083x %s sel0 <- %d\n", tag(), m_sel0 );
296338               break;
297339            }
298340
299            adc083x->bit++;
300            if( adc083x->bit == adc083x->mux_bits )
341            m_bit++;
342            if( m_bit == m_mux_bits )
301343            {
302               adc083x->state = STATE_MUX_SETTLE;
344               m_state = STATE_MUX_SETTLE;
303345            }
304346
305347            break;
306348
307349         case STATE_WAIT_FOR_SE:
308            adc083x->sars = 0;
309            if( device->type() == ADC0838 && adc083x->se != 0 )
350            m_sars = 0;
351            if( type() == ADC0838 && m_se != 0 )
310352            {
311               verboselog( 1, device->machine(), "adc083x %s not se\n", device->tag() );
353               verboselog( 1, machine(), "adc083x %s not se\n", tag() );
312354            }
313355            else
314356            {
315               verboselog( 1, device->machine(), "adc083x %s got se\n", device->tag() );
316               adc083x->state = STATE_OUTPUT_LSB_FIRST;
317               adc083x->bit = 1;
357               verboselog( 1, machine(), "adc083x %s got se\n", tag() );
358               m_state = STATE_OUTPUT_LSB_FIRST;
359               m_bit = 1;
318360            }
319361            break;
320362         }
321363      }
322364
323      if( adc083x->clk != 0 && state == 0 )
365      if( m_clk != 0 && state == 0 )
324366      {
325         switch( adc083x->state )
367         switch( m_state )
326368         {
327369         case STATE_MUX_SETTLE:
328            verboselog( 1, device->machine(), "adc083x %s mux settle\n", device->tag() );
329            adc083x->output = adc083x_conversion( device );
330            adc083x->state = STATE_OUTPUT_MSB_FIRST;
331            adc083x->bit = 7;
332            adc083x_clear_sars( device, adc083x );
333            adc083x->_do = 0;
370            verboselog( 1, machine(), "adc083x %s mux settle\n", tag() );
371            m_output = conversion();
372            m_state = STATE_OUTPUT_MSB_FIRST;
373            m_bit = 7;
374            clear_sars();
375            m_do = 0;
334376            break;
335377
336378         case STATE_OUTPUT_MSB_FIRST:
337            adc083x->_do = ( adc083x->output >> adc083x->bit ) & 1;
338            verboselog( 1, device->machine(), "adc083x %s msb %d -> %d\n", device->tag(), adc083x->bit, adc083x->_do );
379            m_do = ( m_output >> m_bit ) & 1;
380            verboselog( 1, machine(), "adc083x %s msb %d -> %d\n", tag(), m_bit, m_do );
339381
340            adc083x->bit--;
341            if( adc083x->bit < 0 )
382            m_bit--;
383            if( m_bit < 0 )
342384            {
343               if( device->type() == ADC0831 )
385               if( type() == ADC0831 )
344386               {
345                  adc083x->state = STATE_FINISHED;
387                  m_state = STATE_FINISHED;
346388               }
347389               else
348390               {
349                  adc083x->state = STATE_WAIT_FOR_SE;
391                  m_state = STATE_WAIT_FOR_SE;
350392               }
351393            }
352394            break;
353395
354396         case STATE_OUTPUT_LSB_FIRST:
355            adc083x->_do = ( adc083x->output >> adc083x->bit ) & 1;
356            verboselog( 1, device->machine(), "adc083x %s lsb %d -> %d\n", device->tag(), adc083x->bit, adc083x->_do );
397            m_do = ( m_output >> m_bit ) & 1;
398            verboselog( 1, machine(), "adc083x %s lsb %d -> %d\n", tag(), m_bit, m_do );
357399
358            adc083x->bit++;
359            if( adc083x->bit == 8 )
400            m_bit++;
401            if( m_bit == 8 )
360402            {
361               adc083x->state = STATE_FINISHED;
403               m_state = STATE_FINISHED;
362404            }
363405            break;
364406
365407         case STATE_FINISHED:
366            adc083x->state = STATE_IDLE;
367            adc083x->_do = 0;
408            m_state = STATE_IDLE;
409            m_do = 0;
368410            break;
369411         }
370412      }
371413   }
372414
373   adc083x->clk = state;
415   m_clk = state;
374416}
375417
376418/*-------------------------------------------------
377    adc083x_di_write
419    adc083x_device::di_write
378420-------------------------------------------------*/
379421
380WRITE_LINE_DEVICE_HANDLER( adc083x_di_write )
422WRITE_LINE_MEMBER( adc083x_device::di_write )
381423{
382   adc0831_state *adc083x = get_safe_token( device );
383
384   if( adc083x->di != state )
424   if( m_di != state )
385425   {
386      verboselog( 2, device->machine(), "adc083x_di_write( %s, %d )\n", device->tag(), state );
426      verboselog( 2, machine(), "adc083x_di_write( %s, %d )\n", tag(), state );
387427   }
388428
389   adc083x->di = state;
429   m_di = state;
390430}
391431
392432/*-------------------------------------------------
393    adc083x_se_write
433    adc083x_device::se_write
394434-------------------------------------------------*/
395435
396WRITE_LINE_DEVICE_HANDLER( adc083x_se_write )
436WRITE_LINE_MEMBER( adc083x_device::se_write )
397437{
398   adc0831_state *adc083x = get_safe_token( device );
399
400   if( adc083x->se != state )
438   if( m_se != state )
401439   {
402      verboselog( 2, device->machine(), "adc083x_se_write( %s, %d )\n", device->tag(), state );
440      verboselog( 2, machine(), "adc083x_se_write( %s, %d )\n", tag(), state );
403441   }
404442
405   adc083x->se = state;
443   m_se = state;
406444}
407445
408446/*-------------------------------------------------
409    adc083x_sars_read
447    adc083x_device::sars_read
410448-------------------------------------------------*/
411449
412READ_LINE_DEVICE_HANDLER( adc083x_sars_read )
450READ_LINE_MEMBER( adc083x_device::sars_read )
413451{
414   adc0831_state *adc083x = get_safe_token( device );
415
416   verboselog( 1, device->machine(), "adc083x_sars_read( %s ) %d\n", device->tag(), adc083x->sars );
417   return adc083x->sars;
452   verboselog( 1, machine(), "adc083x_sars_read( %s ) %d\n", tag(), m_sars );
453   return m_sars;
418454}
419455
420456/*-------------------------------------------------
421    adc083x_do_read
457    adc083x_device::do_read
422458-------------------------------------------------*/
423459
424READ_LINE_DEVICE_HANDLER( adc083x_do_read )
460READ_LINE_MEMBER( adc083x_device::do_read )
425461{
426   adc0831_state *adc083x = get_safe_token( device );
427
428   verboselog( 1, device->machine(), "adc083x_do_read( %s ) %d\n", device->tag(), adc083x->_do );
429   return adc083x->_do;
462   verboselog( 1, machine(), "adc083x_do_read( %s ) %d\n", tag(), m_do );
463   return m_do;
430464}
431
432
433/*-------------------------------------------------
434    DEVICE_START( adc083x )
435-------------------------------------------------*/
436
437static DEVICE_START( adc0831 )
438{
439   adc0831_state *adc083x = get_safe_token( device );
440   const adc083x_interface *intf = get_interface( device );
441
442   adc083x->cs = 0;
443   adc083x->clk = 0;
444   adc083x->di = 0;
445   adc083x->se = 0;
446   adc083x_clear_sars( device, adc083x );
447   adc083x->_do = 1;
448   adc083x->sgl = 0;
449   adc083x->odd = 0;
450   adc083x->sel1 = 0;
451   adc083x->sel0 = 0;
452   adc083x->state = STATE_IDLE;
453   adc083x->bit = 0;
454   adc083x->output = 0;
455
456   if( device->type() == ADC0831 )
457   {
458      adc083x->mux_bits = 0;
459   }
460   else if( device->type() == ADC0832 )
461   {
462      adc083x->mux_bits = 2;
463   }
464   else if( device->type() == ADC0834 )
465   {
466      adc083x->mux_bits = 3;
467   }
468   else if( device->type() == ADC0838 )
469   {
470      adc083x->mux_bits = 4;
471   }
472
473   /* resolve callbacks */
474   adc083x->input_callback_r = intf->input_callback_r;
475
476   /* register for state saving */
477   device->save_item( NAME(adc083x->cs) );
478   device->save_item( NAME(adc083x->clk) );
479   device->save_item( NAME(adc083x->di) );
480   device->save_item( NAME(adc083x->se) );
481   device->save_item( NAME(adc083x->sars) );
482   device->save_item( NAME(adc083x->_do) );
483   device->save_item( NAME(adc083x->sgl) );
484   device->save_item( NAME(adc083x->odd) );
485   device->save_item( NAME(adc083x->sel1) );
486   device->save_item( NAME(adc083x->sel0) );
487   device->save_item( NAME(adc083x->state) );
488   device->save_item( NAME(adc083x->bit) );
489   device->save_item( NAME(adc083x->output) );
490   device->save_item( NAME(adc083x->mux_bits) );
491}
492
493
494/*-------------------------------------------------
495    DEVICE_RESET( adc083x )
496-------------------------------------------------*/
497
498static DEVICE_RESET( adc0831 )
499{
500   adc0831_state *adc083x = get_safe_token( device );
501
502   adc083x_clear_sars( device, adc083x );
503   adc083x->_do = 1;
504   adc083x->state = STATE_IDLE;
505}
506
507const device_type ADC0831 = &device_creator<adc0831_device>;
508
509adc0831_device::adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
510   : device_t(mconfig, ADC0831, "A/D Converters 0831", tag, owner, clock)
511{
512   m_token = global_alloc_clear(adc0831_state);
513}
514adc0831_device::adc0831_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
515   : device_t(mconfig, type, name, tag, owner, clock)
516{
517   m_token = global_alloc_clear(adc0831_state);
518}
519
520//-------------------------------------------------
521//  device_config_complete - perform any
522//  operations now that the configuration is
523//  complete
524//-------------------------------------------------
525
526void adc0831_device::device_config_complete()
527{
528}
529
530//-------------------------------------------------
531//  device_start - device-specific startup
532//-------------------------------------------------
533
534void adc0831_device::device_start()
535{
536   DEVICE_START_NAME( adc0831 )(this);
537}
538
539//-------------------------------------------------
540//  device_reset - device-specific reset
541//-------------------------------------------------
542
543void adc0831_device::device_reset()
544{
545   DEVICE_RESET_NAME( adc0831 )(this);
546}
547
548
549const device_type ADC0832 = &device_creator<adc0832_device>;
550
551adc0832_device::adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
552   : adc0831_device(mconfig, ADC0832, "A/D Converters 0832", tag, owner, clock)
553{
554}
555
556
557const device_type ADC0834 = &device_creator<adc0834_device>;
558
559adc0834_device::adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
560   : adc0831_device(mconfig, ADC0834, "A/D Converters 0834", tag, owner, clock)
561{
562}
563
564
565const device_type ADC0838 = &device_creator<adc0838_device>;
566
567adc0838_device::adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
568   : adc0831_device(mconfig, ADC0838, "A/D Converters 0838", tag, owner, clock)
569{
570}
trunk/src/emu/machine/adc083x.h
r22723r22724
99#ifndef __ADC083X_H__
1010#define __ADC083X_H__
1111
12#include "devlegcy.h"
12#include "emu.h"
1313
14/***************************************************************************
15    TYPE DEFINITIONS
16***************************************************************************/
1417
18typedef double (*adc083x_input_convert_func)(device_t *device, UINT8 input);
19
20struct adc083x_interface
21{
22   adc083x_input_convert_func input_callback_r;
23};
24
1525/***************************************************************************
1626    CONSTANTS
1727***************************************************************************/
r22723r22724
3242    MACROS / CONSTANTS
3343***************************************************************************/
3444
35class adc0831_device : public device_t
45class adc083x_device : public device_t
3646{
3747public:
38   adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
39   adc0831_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
40   ~adc0831_device() { global_free(m_token); }
48   adc083x_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
4149
42   // access to legacy token
43   void *token() const { assert(m_token != NULL); return m_token; }
50   DECLARE_WRITE_LINE_MEMBER( cs_write );
51   DECLARE_WRITE_LINE_MEMBER( clk_write );
52   DECLARE_WRITE_LINE_MEMBER( di_write );
53   DECLARE_WRITE_LINE_MEMBER( se_write );
54   DECLARE_READ_LINE_MEMBER( sars_read );
55   DECLARE_READ_LINE_MEMBER( do_read );
56
4457protected:
4558   // device-level overrides
4659   virtual void device_config_complete();
4760   virtual void device_start();
48   virtual void device_reset();
61
62   INT32 m_mux_bits;
63
4964private:
65   UINT8 conversion();
66
67   void clear_sars();
68
5069   // internal state
51   void *m_token;
70   INT32 m_cs;
71   INT32 m_clk;
72   INT32 m_di;
73   INT32 m_se;
74   INT32 m_sars;
75   INT32 m_do;
76   INT32 m_sgl;
77   INT32 m_odd;
78   INT32 m_sel1;
79   INT32 m_sel0;
80   INT32 m_state;
81   INT32 m_bit;
82   INT32 m_output;
83
84   adc083x_input_convert_func m_input_callback_r;
5285};
5386
54extern const device_type ADC0831;
87class adc0831_device : public adc083x_device
88{
89public:
90   adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
91};
5592
56class adc0832_device : public adc0831_device
93class adc0832_device : public adc083x_device
5794{
5895public:
5996   adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
6097};
6198
62extern const device_type ADC0832;
63
64class adc0834_device : public adc0831_device
99class adc0834_device : public adc083x_device
65100{
66101public:
67102   adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
68103};
69104
70extern const device_type ADC0834;
71
72class adc0838_device : public adc0831_device
105class adc0838_device : public adc083x_device
73106{
74107public:
75108   adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
76109};
77110
78extern const device_type ADC0838;
79
80
81111#define MCFG_ADC0831_ADD(_tag, _config) \
82112   MCFG_DEVICE_ADD(_tag, ADC0831, 0) \
83113   MCFG_DEVICE_CONFIG(_config)
r22723r22724
94124   MCFG_DEVICE_ADD(_tag, ADC0838, 0) \
95125   MCFG_DEVICE_CONFIG(_config)
96126
127extern const device_type ADC0831;
128extern const device_type ADC0832;
129extern const device_type ADC0834;
130extern const device_type ADC0838;
97131
98/***************************************************************************
99    TYPE DEFINITIONS
100***************************************************************************/
101
102typedef double (*adc083x_input_convert_func)(device_t *device, UINT8 input);
103
104struct adc083x_interface
105{
106   adc083x_input_convert_func input_callback_r;
107};
108
109
110/***************************************************************************
111    PROTOTYPES
112***************************************************************************/
113
114extern WRITE_LINE_DEVICE_HANDLER( adc083x_cs_write );
115extern WRITE_LINE_DEVICE_HANDLER( adc083x_clk_write );
116extern WRITE_LINE_DEVICE_HANDLER( adc083x_di_write );
117extern WRITE_LINE_DEVICE_HANDLER( adc083x_se_write );
118extern READ_LINE_DEVICE_HANDLER( adc083x_sars_read );
119extern READ_LINE_DEVICE_HANDLER( adc083x_do_read );
120
121132#endif  /* __ADC083X_H__ */
trunk/src/emu/machine/upd4701.c
r22723r22724
1111#include "emu.h"
1212#include "upd4701.h"
1313
14/***************************************************************************
15    TYPE DEFINITIONS
16***************************************************************************/
14#define MASK_SWITCHES ( 7 )
15#define MASK_COUNTER ( 0xfff )
1716
18struct upd4701_state
17const device_type UPD4701 = &device_creator<upd4701_device>;
18
19upd4701_device::upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
20   : device_t(mconfig, UPD4701, "NEC uPD4701 Encoder", tag, owner, clock)
1921{
20   int cs;
21   int xy;
22   int ul;
23   int resetx;
24   int resety;
25   int latchx;
26   int latchy;
27   int startx;
28   int starty;
29   int x;
30   int y;
31   int switches;
32   int latchswitches;
33   int cf;
34};
22}
3523
36/* x,y increments can be 12bit (see MASK_COUNTER), hence we need a couple of
3716bit handlers in the following  */
24//-------------------------------------------------
25//  device_config_complete - perform any
26//  operations now that the configuration is
27//  complete
28//-------------------------------------------------
3829
39#define MASK_SWITCHES ( 7 )
40#define MASK_COUNTER ( 0xfff )
30void upd4701_device::device_config_complete()
31{
32}
4133
34//-------------------------------------------------
35//  device_start - device-specific startup
36//-------------------------------------------------
4237
43/***************************************************************************
44    INLINE FUNCTIONS
45***************************************************************************/
46
47INLINE upd4701_state *get_safe_token(device_t *device)
38void upd4701_device::device_start()
4839{
49   assert(device != NULL);
50   assert((device->type() == UPD4701));
51   return (upd4701_state *)downcast<upd4701_device *>(device)->token();
40   save_item(NAME(m_cs));
41   save_item(NAME(m_xy));
42   save_item(NAME(m_ul));
43   save_item(NAME(m_resetx));
44   save_item(NAME(m_resety));
45   save_item(NAME(m_latchx));
46   save_item(NAME(m_latchy));
47   save_item(NAME(m_startx));
48   save_item(NAME(m_starty));
49   save_item(NAME(m_x));
50   save_item(NAME(m_y));
51   save_item(NAME(m_switches));
52   save_item(NAME(m_latchswitches));
53   save_item(NAME(m_cf));
5254}
5355
56//-------------------------------------------------
57//  device_reset - device-specific reset
58//-------------------------------------------------
5459
55/***************************************************************************
56    IMPLEMENTATION
57***************************************************************************/
60void upd4701_device::device_reset()
61{
62   m_cs = 1;
63   m_xy = 0;
64   m_ul = 0;
65   m_resetx = 0;
66   m_resety = 0;
67   m_latchx = 0;
68   m_latchy = 0;
69   m_startx = 0;
70   m_starty = 0;
71   m_x = 0;
72   m_y = 0;
73   m_switches = 0;
74   m_latchswitches = 0;
75   m_cf = 1;
76}
5877
78/* x,y increments can be 12bit (see MASK_COUNTER), hence we need a couple of
7916bit handlers in the following  */
80
5981/*-------------------------------------------------
60    upd4701_ul_w
82    ul_w
6183-------------------------------------------------*/
6284
63WRITE8_DEVICE_HANDLER( upd4701_ul_w )
85WRITE_LINE_MEMBER( upd4701_device::ul_w )
6486{
65   upd4701_state *upd4701 = get_safe_token(device);
66   upd4701->ul = data;
87   m_ul = state;
6788}
6889
6990/*-------------------------------------------------
70    upd4701_xy_w
91    xy_w
7192-------------------------------------------------*/
7293
73WRITE8_DEVICE_HANDLER( upd4701_xy_w )
94WRITE_LINE_MEMBER( upd4701_device::xy_w )
7495{
75   upd4701_state *upd4701 = get_safe_token(device);
76   upd4701->xy = data;
96   m_xy = state;
7797}
7898
7999/*-------------------------------------------------
80    upd4701_cs_w
100    cs_w
81101-------------------------------------------------*/
82102
83WRITE8_DEVICE_HANDLER( upd4701_cs_w )
103WRITE_LINE_MEMBER( upd4701_device::cs_w )
84104{
85   upd4701_state *upd4701 = get_safe_token(device);
86
87   if (data != upd4701->cs)
105   if (m_cs != state)
88106   {
89      upd4701->cs = data;
107      m_cs = state;
90108
91      if (!upd4701->cs)
109      if (!m_cs)
92110      {
93         upd4701->latchx = (upd4701->x - upd4701->startx) & MASK_COUNTER;
94         upd4701->latchy = (upd4701->y - upd4701->starty) & MASK_COUNTER;
111         m_latchx = (m_x - m_startx) & MASK_COUNTER;
112         m_latchy = (m_y - m_starty) & MASK_COUNTER;
95113
96         upd4701->latchswitches = (~upd4701->switches) & MASK_SWITCHES;
97         if (upd4701->latchswitches != 0)
114         m_latchswitches = (~m_switches) & MASK_SWITCHES;
115         if (m_latchswitches != 0)
98116         {
99            upd4701->latchswitches |= 8;
117            m_latchswitches |= 8;
100118         }
101119
102         upd4701->cf = 1;
120         m_cf = 1;
103121      }
104122   }
105123}
106124
107125/*-------------------------------------------------
108    upd4701_resetx_w
126    resetx_w
109127-------------------------------------------------*/
110128
111WRITE8_DEVICE_HANDLER( upd4701_resetx_w )
129WRITE_LINE_MEMBER( upd4701_device::resetx_w )
112130{
113   upd4701_state *upd4701 = get_safe_token(device);
114
115   if (upd4701->resetx != data)
131   if (m_resetx != state)
116132   {
117      upd4701->resetx = data;
133      m_resetx = state;
118134
119      if (upd4701->resetx)
135      if (m_resetx)
120136      {
121         upd4701->startx = upd4701->x;
137         m_startx = m_x;
122138      }
123139   }
124140}
125141
126142/*-------------------------------------------------
127    upd4701_resety_w
143    resety_w
128144-------------------------------------------------*/
129145
130WRITE8_DEVICE_HANDLER( upd4701_resety_w )
146WRITE_LINE_MEMBER( upd4701_device::resety_w )
131147{
132   upd4701_state *upd4701 = get_safe_token(device);
133
134   if (upd4701->resety != data)
148   if (m_resety != state)
135149   {
136      upd4701->resety = data;
150      m_resety = state;
137151
138      if (upd4701->resety)
152      if (m_resety)
139153      {
140         upd4701->starty = upd4701->y;
154         m_starty = m_y;
141155      }
142156   }
143157}
144158
145159/*-------------------------------------------------
146    upd4701_x_add
160    x_add
147161-------------------------------------------------*/
148162
149WRITE16_DEVICE_HANDLER( upd4701_x_add )
163void upd4701_device::x_add( INT16 data )
150164{
151   upd4701_state *upd4701 = get_safe_token(device);
152
153   if (!upd4701->resetx && data != 0)
165   if (!m_resetx && data != 0)
154166   {
155      upd4701->x += data;
167      m_x += data;
156168
157      if (upd4701->cs)
169      if (m_cs)
158170      {
159         upd4701->cf = 0;
171         m_cf = 0;
160172      }
161173   }
162174}
163175
164176/*-------------------------------------------------
165    upd4701_y_add
177    y_add
166178-------------------------------------------------*/
167179
168WRITE16_DEVICE_HANDLER( upd4701_y_add )
180void upd4701_device::y_add( INT16 data )
169181{
170   upd4701_state *upd4701 = get_safe_token(device);
171
172   if (!upd4701->resety && data != 0)
182   if (!m_resety && data != 0)
173183   {
174      upd4701->y += data;
184      m_y += data;
175185
176      if (upd4701->cs)
186      if (m_cs)
177187      {
178         upd4701->cf = 0;
188         m_cf = 0;
179189      }
180190   }
181191}
182192
183193/*-------------------------------------------------
184    upd4701_switches_set
194    switches_set
185195-------------------------------------------------*/
186196
187WRITE8_DEVICE_HANDLER( upd4701_switches_set )
197void upd4701_device::switches_set( UINT8 data )
188198{
189   upd4701_state *upd4701 = get_safe_token(device);
190   upd4701->switches = data;
199   m_switches = data;
191200}
192201
193202/*-------------------------------------------------
194    upd4701_d_r
203    d_r
195204-------------------------------------------------*/
196205
197READ16_DEVICE_HANDLER( upd4701_d_r )
206READ16_MEMBER( upd4701_device::d_r )
198207{
199   upd4701_state *upd4701 = get_safe_token(device);
200208   int data;
201209
202   if (upd4701->cs)
210   if (m_cs)
203211   {
204212      return 0xff;
205213   }
206214
207   if (upd4701->xy)
215   if (m_xy)
208216   {
209      data = upd4701->latchy;
217      data = m_latchy;
210218   }
211219   else
212220   {
213      data = upd4701->latchx;
221      data = m_latchx;
214222   }
215223
216   data |= upd4701->latchswitches << 12;
224   data |= m_latchswitches << 12;
217225
218   if (upd4701->ul)
226   if (m_ul)
219227   {
220228      return data >> 8;
221229   }
r22723r22724
226234}
227235
228236/*-------------------------------------------------
229    upd4701_sf_r
237    sf_r
230238-------------------------------------------------*/
231239
232READ8_DEVICE_HANDLER( upd4701_sf_r )
240READ_LINE_MEMBER( upd4701_device::sf_r )
233241{
234   upd4701_state *upd4701 = get_safe_token(device);
235
236   if ((upd4701->switches & MASK_SWITCHES) != MASK_SWITCHES)
242   if ((m_switches & MASK_SWITCHES) != MASK_SWITCHES)
237243   {
238244      return 0;
239245   }
r22723r22724
242248}
243249
244250/*-------------------------------------------------
245    upd4701_cf_r
251    cf_r
246252-------------------------------------------------*/
247253
248READ8_DEVICE_HANDLER( upd4701_cf_r )
254READ_LINE_MEMBER( upd4701_device::cf_r )
249255{
250   upd4701_state *upd4701 = get_safe_token(device);
251   return upd4701->cf;
256   return m_cf;
252257}
253
254/*-------------------------------------------------
255    DEVICE_START( upd4701 )
256-------------------------------------------------*/
257
258static DEVICE_START( upd4701 )
259{
260   upd4701_state *upd4701 = get_safe_token(device);
261
262   /* register for state saving */
263   device->save_item(NAME(upd4701->cs));
264   device->save_item(NAME(upd4701->xy));
265   device->save_item(NAME(upd4701->ul));
266   device->save_item(NAME(upd4701->resetx));
267   device->save_item(NAME(upd4701->resety));
268   device->save_item(NAME(upd4701->latchx));
269   device->save_item(NAME(upd4701->latchy));
270   device->save_item(NAME(upd4701->startx));
271   device->save_item(NAME(upd4701->starty));
272   device->save_item(NAME(upd4701->x));
273   device->save_item(NAME(upd4701->y));
274   device->save_item(NAME(upd4701->switches));
275   device->save_item(NAME(upd4701->latchswitches));
276   device->save_item(NAME(upd4701->cf));
277}
278
279/*-------------------------------------------------
280    DEVICE_RESET( upd4701 )
281-------------------------------------------------*/
282
283static DEVICE_RESET( upd4701 )
284{
285   upd4701_state *upd4701 = get_safe_token(device);
286
287   upd4701->cs = 1;
288   upd4701->xy = 0;
289   upd4701->ul = 0;
290   upd4701->resetx = 0;
291   upd4701->resety = 0;
292   upd4701->latchx = 0;
293   upd4701->latchy = 0;
294   upd4701->startx = 0;
295   upd4701->starty = 0;
296   upd4701->x = 0;
297   upd4701->y = 0;
298   upd4701->switches = 0;
299   upd4701->latchswitches = 0;
300   upd4701->cf = 1;
301}
302
303const device_type UPD4701 = &device_creator<upd4701_device>;
304
305upd4701_device::upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
306   : device_t(mconfig, UPD4701, "NEC uPD4701 Encoder", tag, owner, clock)
307{
308   m_token = global_alloc_clear(upd4701_state);
309}
310
311//-------------------------------------------------
312//  device_config_complete - perform any
313//  operations now that the configuration is
314//  complete
315//-------------------------------------------------
316
317void upd4701_device::device_config_complete()
318{
319}
320
321//-------------------------------------------------
322//  device_start - device-specific startup
323//-------------------------------------------------
324
325void upd4701_device::device_start()
326{
327   DEVICE_START_NAME( upd4701 )(this);
328}
329
330//-------------------------------------------------
331//  device_reset - device-specific reset
332//-------------------------------------------------
333
334void upd4701_device::device_reset()
335{
336   DEVICE_RESET_NAME( upd4701 )(this);
337}
trunk/src/emu/machine/upd4701.h
r22723r22724
1919{
2020public:
2121   upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
22   ~upd4701_device() { global_free(m_token); }
2322
24   // access to legacy token
25   void *token() const { assert(m_token != NULL); return m_token; }
23   void x_add( INT16 data );
24   void y_add( INT16 data );
25   void switches_set( UINT8 data );
26
27   DECLARE_WRITE_LINE_MEMBER( cs_w );
28   DECLARE_WRITE_LINE_MEMBER( xy_w );
29   DECLARE_WRITE_LINE_MEMBER( ul_w );
30   DECLARE_WRITE_LINE_MEMBER( resetx_w );
31   DECLARE_WRITE_LINE_MEMBER( resety_w );
32   
33   DECLARE_READ16_MEMBER( d_r );
34   DECLARE_READ_LINE_MEMBER( cf_r );
35   DECLARE_READ_LINE_MEMBER( sf_r );
36
2637protected:
2738   // device-level overrides
2839   virtual void device_config_complete();
r22723r22724
3041   virtual void device_reset();
3142private:
3243   // internal state
33   void *m_token;
44   int m_cs;
45   int m_xy;
46   int m_ul;
47   int m_resetx;
48   int m_resety;
49   int m_latchx;
50   int m_latchy;
51   int m_startx;
52   int m_starty;
53   int m_x;
54   int m_y;
55   int m_switches;
56   int m_latchswitches;
57   int m_cf;
3458};
3559
3660extern const device_type UPD4701;
r22723r22724
3963#define MCFG_UPD4701_ADD(_tag) \
4064   MCFG_DEVICE_ADD(_tag, UPD4701, 0)
4165
42
43/***************************************************************************
44    PROTOTYPES
45***************************************************************************/
46
47extern DECLARE_WRITE8_DEVICE_HANDLER( upd4701_cs_w );
48extern DECLARE_WRITE8_DEVICE_HANDLER( upd4701_xy_w );
49extern DECLARE_WRITE8_DEVICE_HANDLER( upd4701_ul_w );
50extern DECLARE_WRITE8_DEVICE_HANDLER( upd4701_resetx_w );
51extern DECLARE_WRITE8_DEVICE_HANDLER( upd4701_resety_w );
52extern DECLARE_WRITE16_DEVICE_HANDLER( upd4701_x_add );
53extern DECLARE_WRITE16_DEVICE_HANDLER( upd4701_y_add );
54extern DECLARE_WRITE8_DEVICE_HANDLER( upd4701_switches_set );
55
56extern DECLARE_READ16_DEVICE_HANDLER( upd4701_d_r );
57extern DECLARE_READ8_DEVICE_HANDLER( upd4701_cf_r );
58extern DECLARE_READ8_DEVICE_HANDLER( upd4701_sf_r );
59
60
6166#endif  /* __UPD4701_H__ */
trunk/src/emu/machine/ds2401.c
r22723r22724
6262
6363   if(m_region)
6464   {
65      // Ensure the size is correct though
66      if(m_region->bytes() != SIZE_DATA)
67         logerror("ds2401 %s: Wrong region length for id data, expected 0x%x, got 0x%x\n",
68                  tag(),
69                  SIZE_DATA,
70                  m_region->bytes());
71      else {
72         UINT8 *rb = m_region->base();
73         memcpy(data, rb, SIZE_DATA);
65      if(m_region->bytes() == SIZE_DATA)
66      {
67         memcpy(data, m_region->base(), SIZE_DATA);
7468         return;
7569      }
70
71      logerror("ds2401 %s: Wrong region length for id data, expected 0x%x, got 0x%x\n", tag(), SIZE_DATA, m_region->bytes());
7672   }
73   else
74   {
75      logerror("ds2401 %s: Warning, no id provided, answer will be all zeroes.\n", tag());
76   }
7777
78   // That chip is useless without an id, so bitch if there
79   // isn't one
80   logerror("ds2401 %s: Warning, no id provided, answer will be all zeroes.\n", tag());
8178   memset(data, 0, SIZE_DATA);
8279}
8380
8481void ds2401_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
8582{
86   switch(id) {
83   switch(id)
84   {
8785   case TIMER_RESET:
8886      verboselog(1, "timer_reset\n");
8987      state = STATE_RESET;
r22723r22724
9189      break;
9290
9391   case TIMER_MAIN:
94      switch(state) {
92      switch(state)
93      {
9594      case STATE_RESET1:
9695         verboselog(2, "timer_main state_reset1 %d\n", rx);
9796         tx = false;
r22723r22724
109108
110109      case STATE_COMMAND:
111110         verboselog(2, "timer_main state_command %d\n", rx);
111
112112         shift >>= 1;
113113         if(rx)
114         {
114115            shift |= 0x80;
116         }
117
115118         bit++;
116         if(bit == 8) {
117            switch(shift) {
119         if(bit == 8)
120         {
121            switch(shift)
122            {
118123            case COMMAND_READROM:
119124               verboselog(1, "timer_main readrom\n");
120125               bit = 0;
121126               byte = 0;
122127               state = STATE_READROM;
123128               break;
129
124130            default:
125131               verboselog(0, "timer_main command not handled %02x\n", shift);
126132               state = STATE_IDLE;
r22723r22724
131137
132138      case STATE_READROM:
133139         tx = true;
134         if(byte == SIZE_DATA) {
140
141         if(byte == SIZE_DATA)
142         {
135143            verboselog(1, "timer_main readrom finished\n");
136144            state = STATE_IDLE;
137         } else {
145         }
146         else
147         {
138148            verboselog(2, "timer_main readrom window closed\n");
139149         }
140150         break;
r22723r22724
145155   }
146156}
147157
148void ds2401_device::write(bool line)
158WRITE_LINE_MEMBER( ds2401_device::write )
149159{
150   verboselog(1, "write(%d)\n", line);
160   verboselog(1, "write(%d)\n", state);
151161
152   if(!line && rx) {
153      switch(state) {
162   if(!state && rx)
163   {
164      switch(state)
165      {
154166      case STATE_IDLE:
155167         break;
168
156169      case STATE_COMMAND:
157170         verboselog(2, "state_command\n");
158171         timer_main->adjust(t_samp);
159172         break;
173
160174      case STATE_READROM:
161         if(!bit) {
175         if(!bit)
176         {
162177            shift = data[7 - byte];
163178            verboselog(1, "<- data %02x\n", shift);
164179         }
180
165181         tx = shift & 1;
166182         shift >>= 1;
183
167184         bit++;
168         if(bit == 8) {
185         if(bit == 8)
186         {
169187            bit = 0;
170188            byte++;
171189         }
190
172191         verboselog(2, "state_readrom %d\n", tx);
173192         timer_main->adjust(t_rdv);
174193         break;
194
175195      default:
176196         verboselog(0, "state not handled: %d\n", state );
177197         break;
178198      }
199
179200      timer_reset->adjust(t_rstl);
180   } else if(line && !rx) {
181      switch(state) {
201   }
202   else if(state && !rx)
203   {
204      switch(state)
205      {
182206      case STATE_RESET:
183207         state = STATE_RESET1;
184208         timer_main->adjust(t_pdh);
185209         break;
186210      }
211
187212      timer_reset->adjust(attotime::never);
188213   }
189   rx = line;
214
215   rx = state;
190216}
191217
192bool ds2401_device::read()
218READ_LINE_MEMBER( ds2401_device::read )
193219{
194220   verboselog(2, "read %d\n", tx && rx);
195221   return tx && rx;
trunk/src/emu/machine/ds2401.h
r22723r22724
2020   // construction/destruction
2121   ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
2222
23   void write(bool line);
24   bool read();
23   DECLARE_WRITE_LINE_MEMBER( write );
24   DECLARE_READ_LINE_MEMBER( read );
2525   UINT8 direct_read(int index);
2626
2727protected:

Previous 199869 Revisions Next


© 1997-2024 The MAME Team