From 028b4c5b216073566fc9660f7e21bf9a8e9c5e40 Mon Sep 17 00:00:00 2001 From: Brad Hughes Date: Wed, 2 Mar 2016 16:23:45 -0500 Subject: Fix DirectWrite font module init error handling --- src/osd/modules/font/font_dwrite.cpp | 11 +++++++++-- src/osd/windows/winutil.cpp | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/osd/modules/font/font_dwrite.cpp b/src/osd/modules/font/font_dwrite.cpp index 8f78badda3b..d455a928671 100644 --- a/src/osd/modules/font/font_dwrite.cpp +++ b/src/osd/modules/font/font_dwrite.cpp @@ -665,9 +665,15 @@ public: { HRESULT result; + osd_printf_verbose("FontProvider: Initializing DirectWrite\n"); + // Make sure we can initialize our api functions - HR_RET1(m_pfnD2D1CreateFactory.initialize()); - HR_RET1(m_pfnDWriteCreateFactory.initialize()); + if (m_pfnD2D1CreateFactory.initialize() + || m_pfnDWriteCreateFactory.initialize()) + { + osd_printf_error("ERROR: FontProvider: Failed to load DirectWrite functions.\n"); + return -1; + } // Create a Direct2D factory. HR_RET1(m_pfnD2D1CreateFactory( @@ -692,6 +698,7 @@ public: __uuidof(IWICImagingFactory), (void**)&m_wicFactory)); + osd_printf_verbose("FontProvider: DirectWrite initialized successfully.\n"); return 0; } diff --git a/src/osd/windows/winutil.cpp b/src/osd/windows/winutil.cpp index fe835301907..05dd1541ced 100644 --- a/src/osd/windows/winutil.cpp +++ b/src/osd/windows/winutil.cpp @@ -187,14 +187,20 @@ int lazy_loaded_function::initialize() } if (m_module == NULL) + { + osd_printf_verbose("Could not find DLL to dynamically link function %s.\n", m_name.c_str()); return ERROR_DLL_NOT_FOUND; + } } if (m_pfn == nullptr) { m_pfn = GetProcAddress(m_module, m_name.c_str()); if (m_pfn == nullptr) + { + osd_printf_verbose("Could not find function address to dynamically link function %s.\n", m_name.c_str()); return ERROR_NOT_FOUND; + } } m_initialized = true; -- cgit v1.2.3-70-g09d2 From 6d4f62703558fdf53edfcf26656f44699bb6df90 Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Thu, 3 Mar 2016 01:52:34 +0100 Subject: menu: fixed top line computation. (nw) --- src/emu/ui/filesel.cpp | 4 ++-- src/emu/ui/menu.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/emu/ui/filesel.cpp b/src/emu/ui/filesel.cpp index 18555c4809b..ec8d4c2ea22 100644 --- a/src/emu/ui/filesel.cpp +++ b/src/emu/ui/filesel.cpp @@ -712,7 +712,7 @@ void ui_menu_file_selector::handle() // from current entry to the end for (entry = cur_selected; entry != nullptr; entry = entry->next) { - if (entry->basename != nullptr && m_filename_buffer != nullptr) + if (entry->basename != nullptr && m_filename_buffer[0] != '\0') { int match = 0; for (int i = 0; i < ARRAY_LENGTH(m_filename_buffer); i++) @@ -731,7 +731,7 @@ void ui_menu_file_selector::handle() // and from the first entry to current one for (entry = m_entrylist; entry != cur_selected; entry = entry->next) { - if (entry->basename != nullptr && m_filename_buffer != nullptr) + if (entry->basename != nullptr && m_filename_buffer[0] != '\0') { int match = 0; for (int i = 0; i < ARRAY_LENGTH(m_filename_buffer); i++) diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp index f6154c41638..56c41062afd 100644 --- a/src/emu/ui/menu.cpp +++ b/src/emu/ui/menu.cpp @@ -544,7 +544,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput) machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); // determine the first visible line based on the current selection - if (selected > top_line + visible_lines) + if (selected > top_line + visible_lines || selected < top_line - visible_lines) top_line = selected - (visible_lines / 2); if (top_line < 0 || selected == 0) top_line = 0; -- cgit v1.2.3-70-g09d2 From b3a99d76e1a4a33a73e00ab53ceafea2ee25e3f3 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 3 Mar 2016 12:17:55 +0100 Subject: messed up yesterdays commit (nw) --- src/mame/mame.lst | 3986 ++++++++++++++++++++++++++--------------------------- 1 file changed, 1993 insertions(+), 1993 deletions(-) (limited to 'src') diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 92d4cb3884f..541f9f28b86 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -10,7 +10,7 @@ ******************************************************************************/ -//@source:1942.cpp +@source:1942.cpp 1942 // 12/1984 (c) 1984 1942a // 12/1984 (c) 1984 1942abl // bootleg @@ -19,7 +19,7 @@ 1942p // prototype 1942w // 12/1984 (c) 1984 + Williams Electronics license (c) 1985 -//@source:1943.cpp +@source:1943.cpp 1943 // 6/1987 (c) 1987 (Euro) 1943b // bootleg 1943bj // bootleg @@ -29,11 +29,11 @@ 1943u // 6/1987 (c) 1987 (US) Rev C 1943ua // 6/1987 (c) 1987 (US) -//@source:1945kiii.cpp +@source:1945kiii.cpp 1945kiii // (c) 2000 Oriental flagrall // ? -//@source:20pacgal.cpp +@source:20pacgal.cpp 20pacgal // (c) 2000 Ver 1.08 20pacgalr0 // (c) 2000 Ver 1.00 20pacgalr1 // (c) 2000 Ver 1.01 @@ -43,16 +43,16 @@ flagrall // ? 25pacman // (c) 2006 Ver 3.0 25pacmano // (c) 2005 Ver 2.0 - Same hardware as 20pacgal -//@source:24cdjuke.cpp +@source:24cdjuke.cpp 24cdjuke // (c) 1988 Midcoin -//@source:2mindril.cpp +@source:2mindril.cpp 2mindril // (c) 1993 Taito -//@source:30test.cpp +@source:30test.cpp 30test // (c) 1997 -//@source:39in1.cpp +@source:39in1.cpp 19in1 // MAME based bootleg 39in1 // MAME based bootleg 48in1 // MAME based bootleg @@ -62,50 +62,50 @@ flagrall // ? 4in1b // MAME based bootleg 60in1 // MAME based bootleg -//@source:3do.cpp +@source:3do.cpp 3do // 3DO consoles 3do_pal // 3dobios // orbatak // -//@source:3x3puzzl.cpp +@source:3x3puzzl.cpp 3x3puzzl // (c) 199? Ace 3x3puzzla // (c) 199? Ace casanova // -//@source:4004clk.cpp +@source:4004clk.cpp 4004clk // -//@source:40love.cpp +@source:40love.cpp 40love // A30 (c) 1984 Taito fieldday // A23 (c) 1984 Taito undoukai // A17 (c) 1984 Taito -//@source:4dpi.cpp +@source:4dpi.cpp sgi_ip6 // IP6: 4D/PI, R2000, 20MHz -//@source:4enlinea.cpp +@source:4enlinea.cpp 4enlinea // (c) 1991 System Compumatic -//@source:4enraya.cpp +@source:4enraya.cpp 4enraya // (c) 1990 IDSA 4enrayaa // unkpacg // (c) 19?? ??? -//@source:4roses.cpp +@source:4roses.cpp 4roses // (c) 1999 Unknown 4rosesa // (c) 1999 Unknown rugby // (c) 1999 C.M.C. -//@source:5clown.cpp +@source:5clown.cpp 5clown // (c) IGS 1993 5clowna // (c) IGS 1993 5clownsp // (c) IGS 1993 -//@source:68ksbc.cpp +@source:68ksbc.cpp 68ksbc // -//@source:8080bw.cpp +@source:8080bw.cpp alieninv // Margamatics alieninvp2 // bootleg astropal // (c) 19?? Sidam @@ -217,69 +217,69 @@ vortex // 852 [1980] Zilec Electronics Ltd. yosakdon // (c) 1979 Yosaku To Donbei yosakdona // (c) 1979 Yosaku To Donbei -//@source:88games.cpp +@source:88games.cpp 88games // GX861 (c) 1988 hypsptsp // GX861 (c) 1988 (Japan) konami88 // GX861 (c) 1988 -//@source:a1supply.cpp +@source:a1supply.cpp tv21 // (c) 197? A-1 Supply tv21_3 // (c) 197? A-1 Supply tvpoker // (c) 197? A-1 Supply -//@source:a2600.cpp +@source:a2600.cpp a2600 // Atari 2600 a2600p // Atari 2600 PAL -//@source:a310.cpp +@source:a310.cpp a3010 // 1988 Acorn Archimedes 3010 a3020 // 1988 Acorn Archimedes 3020 a310 // 1988 Acorn Archimedes 310 -//@source:a5105.cpp +@source:a5105.cpp a5105 // -//@source:a51xx.cpp +@source:a51xx.cpp a5120 // a5130 // -//@source:a6809.cpp +@source:a6809.cpp a6809 // -//@source:a7150.cpp +@source:a7150.cpp a7150 // -//@source:a7800.cpp +@source:a7800.cpp a7800 // Atari 7800 NTSC a7800p // Atari 7800 PAL -//@source:abc1600.cpp +@source:abc1600.cpp abc1600 // -//@source:abc80.cpp +@source:abc80.cpp abc80 // -//@source:abc80x.cpp +@source:abc80x.cpp abc800c // abc800m // abc802 // abc806 // -//@source:ac1.cpp +@source:ac1.cpp ac1 // 1984 Amateurcomputer AC1 ac1_32 // 1984 Amateurcomputer AC1 (32 lines) ac1scch // 1984 Amateurcomputer AC1 SCCH -//@source:ace.cpp +@source:ace.cpp ace // [1976 Allied Leisure] -//@source:acefruit.cpp +@source:acefruit.cpp acefruit // (c) 1982? ACE sidewndr // (c) 1981? ACE spellbnd // (c) 1981? ACE starspnr // (c) 1982? ACE -//@source:aces1.cpp +@source:aces1.cpp ac1bbclb // Big Break Club (Ace) ac1bbclba // ac1bluec // Blue Chip (Pcp) @@ -328,7 +328,7 @@ ac1taklv // Take It Or Leave It (Ace) ac1totb // Top Of The Bill (Ace) ac1xpres // Xpress (Pcp) -//@source:acesp.cpp +@source:acesp.cpp sp_atw // Around the World (Crystal) sp_beau // Beau Peep (Ace) sp_beau2 // Further Adventures Of Beau Peep (Ace) @@ -825,23 +825,23 @@ sp_zigzgk // sp_zigzgl // sp_zigzgm // -//@source:acommand.cpp +@source:acommand.cpp acommand // (c) 1990 -//@source:acrnsys1.cpp +@source:acrnsys1.cpp acrnsys1 // 1979 Acorn System 1 (Microcomputer Kit) -//@source:actfancr.cpp +@source:actfancr.cpp actfancr // (c) 1989 Data East Corporation (World) actfancr1 // (c) 1989 Data East Corporation (World) actfancrj // (c) 1989 Data East Corporation (Japan) triothep // (c) 1989 Data East Corporation (World) triothepj // (c) 1989 Data East Corporation (Japan) -//@source:adam.cpp +@source:adam.cpp adam // Coleco Adam -//@source:adp.cpp +@source:adp.cpp backgamn // (c) 1990 fashiong // (c) 1997 fashiong2 // (c) 1997 @@ -851,14 +851,14 @@ quickjac // (c) 1993 skattv // (c) 1994 skattva // (c) 1995 -//@source:advision.cpp +@source:advision.cpp advision // Entex -//@source:aeroboto.cpp +@source:aeroboto.cpp aeroboto // (c) 1984 Williams formatz // (c) 1984 Jaleco -//@source:aerofgt.cpp +@source:aerofgt.cpp aerfboo2 // bootleg aerfboot // bootleg aerofgt // (c) 1992 Video System Co. @@ -885,32 +885,32 @@ svolly91 // (c) 1991 Video System Co. (Japan) turbofrc // (c) 1991 Video System Co. wbbc97 // (c) 1997 Comad -//@source:age_candy.cpp +@source:age_candy.cpp age_cand // AGE Candy Crane -//@source:aim65.cpp +@source:aim65.cpp aim65 // Rockwell AIM65 -//@source:aim65_40.cpp +@source:aim65_40.cpp aim65_40 // Rockwell AIM65/40 -//@source:airbustr.cpp +@source:airbustr.cpp airbustr // (c) 1990 Kaneko + Namco airbustrb // bootleg airbustrj // (c) 1990 Kaneko + Namco (Japan) -//@source:ajax.cpp +@source:ajax.cpp ajax // GX770 (c) 1987 ajaxj // GX770 (c) 1987 (Japan) typhoon // GX770 (c) 1987 -//@source:albazc.cpp +@source:albazc.cpp hanaroku // (c) 1988 Alba -//@source:albazg.cpp +@source:albazg.cpp yumefuda // (c) 198? Alba -//@source:aleck64.cpp +@source:aleck64.cpp 11beat // (c) 1998 Hudson aleck64 // (c) 1998 Nintendo/Seta doncdoon // (c) 2003 Aruze (Arcade TV Game List - P.90, Right, 8 from bottom) @@ -923,16 +923,16 @@ starsldr // (c) 1998 Hudson/Seta twrshaft // (c) 2003 Aruze vivdolls // (c) 1998 Visco -//@source:aleisttl.cpp +@source:aleisttl.cpp sburners // (c) 1975 Allied Leisure -//@source:alesis.cpp +@source:alesis.cpp hr16 // hr16b // mmt8 // sr16 // -//@source:alg.cpp +@source:alg.cpp alg_bios // aplatoon // (c) 199? Nova? crimep2 // (c) 1993 @@ -959,10 +959,10 @@ wsjr // (c) 1991 wsjr_15 // (c) 1991 zortonbr // (c) 1993 Web Picmatic -//@source:alien.cpp +@source:alien.cpp alien // (c) 2005 -//@source:aliens.cpp +@source:aliens.cpp aliens // GX875 (c) 1990 (World) aliens2 // GX875 (c) 1990 (World) aliens3 // GX875 (c) 1990 (World) @@ -971,10 +971,10 @@ aliensj // GX875 (c) 1990 (Japan) aliensj2 // GX875 (c) 1990 (Japan) aliensu // GX875 (c) 1990 (US) -//@source:alinvade.cpp +@source:alinvade.cpp alinvade // -//@source:allied.cpp +@source:allied.cpp allied // circa33 // disco79 // @@ -988,7 +988,7 @@ suprpick // takefive // thndbolt // -//@source:alpha68k.cpp +@source:alpha68k.cpp btlfield // Alpha-68K96II 'BT' (c) 1987 btlfieldb // bootleg gangwars // Alpha-68K96V (c) 1989 Alpha Denshi Co. @@ -1016,23 +1016,23 @@ tnextspc // A8003 'NS' (c) 1989 - MASKROM tnextspc2 // A8003 'NS' (c) 1989 - EPROMs tnextspcj // A8003 'NS' (c) 1989 - Japan -//@source:alphasma.cpp +@source:alphasma.cpp asma2k // asmapro // -//@source:alphatro.cpp +@source:alphatro.cpp alphatro // -//@source:altair.cpp +@source:altair.cpp al8800bt // -//@source:alto2.cpp +@source:alto2.cpp alto2 // -//@source:altos5.cpp +@source:altos5.cpp altos5 // -//@source:alvg.cpp +@source:alvg.cpp agsoccer // dinoeggs // mystcast // @@ -1043,7 +1043,7 @@ usafootb // wrldtour // wrldtour2 // -//@source:amaticmg.cpp +@source:amaticmg.cpp am_mg24 // (c) 2000 Amatic am_mg3 // (c) 2000 Amatic am_mg31i // (c) Amatic @@ -1053,22 +1053,22 @@ am_mg35i // (c) Amatic am_mg3a // (c) 2000 Amatic suprstar // (c) 1996 Amatic -//@source:amazonlf.cpp +@source:amazonlf.cpp crospuzl // -//@source:ambush.cpp +@source:ambush.cpp ambush // (c) 1983 ambushh // (c) 1983 ambushj // (c) 1983 Nippon Amuse license ambushv // (c) 1983 Volt Electronics license -//@source:amerihok.cpp +@source:amerihok.cpp amerihok // -//@source:amico2k.cpp +@source:amico2k.cpp amico2k // -//@source:amiga.cpp +@source:amiga.cpp a1000 // Commodore Amiga 1000 a1000n // a1200 // Commodore Amiga 1200 @@ -1094,7 +1094,7 @@ cd32n // cdtv // Commodore CDTV cdtvn // -//@source:ampoker2.cpp +@source:ampoker2.cpp ampkr228 // 1990 bootleg ampkr2b1 // 1990 bootleg ampkr2b2 // 1990 bootleg @@ -1109,14 +1109,14 @@ sigma2k // (c) 2000 Sigma sigmapkr // (c) 1995 Sigma videomat // 1990 bootleg -//@source:ampro.cpp +@source:ampro.cpp ampro // -//@source:amspdwy.cpp +@source:amspdwy.cpp amspdwy // no copyright notice, but (c) 1987 Enerdyne Technologies, Inc. amspdwya // no copyright notice, but (c) 1987 Enerdyne Technologies, Inc. -//@source:amstr_pc.cpp +@source:amstr_pc.cpp pc20 // 1988 Amstrad PC20 pc200 // 1988 Sinclair PC200 pc2086 // @@ -1124,7 +1124,7 @@ pc3086 // ppc512 // 1987 Amstrad PPC512 ppc640 // 1987 Amstrad PPC640 -//@source:amstrad.cpp +@source:amstrad.cpp al520ex // Patisonic Aleste 520EX (1993) cpc464 // Amstrad (Schneider in Germany) 1984 cpc464p // Amstrad CPC464 Plus - 1990 @@ -1136,30 +1136,30 @@ cpc664 // Amstrad (Schneider in Germany) 1985 gx4000 // Amstrad GX4000 - 1990 kccomp // VEB KC compact -//@source:amusco.cpp +@source:amusco.cpp amusco // 1987, Amusco. -//@source:amust.cpp +@source:amust.cpp amust // -//@source:angelkds.cpp +@source:angelkds.cpp angelkds // 833-6599 (c) 1988 Sega / Nasco? spcpostn // (c) 1986 Sega / Nasco" -//@source:apc.cpp +@source:apc.cpp apc // -//@source:apexc.cpp +@source:apexc.cpp apexc // 1955(?) APEXC: All-Purpose Electronic X-ray Computer -//@source:apf.cpp +@source:apf.cpp apfimag // apfm1000 // -//@source:apogee.cpp +@source:apogee.cpp apogee // -//@source:apollo.cpp +@source:apollo.cpp dn3000 // Apollo Workstation DN3000 15" Color (1988) dn3000_19i // Apollo Workstation DN3000 19" Monochrome (1987) dn3500 // Apollo Workstation DN3500 15" Color (1989) @@ -1170,10 +1170,10 @@ dsp3000 // Apollo Server DSP3000 (1987) dsp3500 // Apollo Server DSP3500 (1989) dsp5500 // Apollo Server DSP5500 (1991) -//@source:apple1.cpp +@source:apple1.cpp apple1 // Jul 1976 Apple 1 -//@source:apple2.cpp +@source:apple2.cpp ace100 // ??? 1982 Franklin Ace 100 agat7 // Agat-7 agat9 // Agat-9 @@ -1192,7 +1192,7 @@ uniap2en // 1982 Unitron AP II (in English) uniap2pt // 1982 Unitron AP II (in Brazilian Portuguese) uniap2ti // 1982 Unitron AP II+ (Teclado Inteligente) -//@source:apple2e.cpp +@source:apple2e.cpp apple2c // Apr 1984 Apple //c apple2c0 // ??? 1985 Apple //c (3.5 ROM) apple2c3 // Sep 1986 Apple //c (Original Mem. Exp.) @@ -1210,7 +1210,7 @@ mprof3 // Microprofessor III prav8c // Pravetz 8C tk3000 // Microdigital TK3000 -//@source:apple2gs.cpp +@source:apple2gs.cpp apple2gs // Aug 1989 Apple IIgs ROM03 apple2gsr0 // Sep 1986 Apple IIgs ROM00 apple2gsr0p // June 19, 1986 Apple IIgs ROM00 prototype @@ -1219,49 +1219,49 @@ apple2gsr1 // Sep 1987 Apple IIgs ROM01 apple2gsr3lp // ??? 1989 Apple IIgs ROM03 late? prototype apple2gsr3p // ??? 198? Apple IIgs ROM03 prototype -//@source:apple3.cpp +@source:apple3.cpp apple3 // May 1980 Apple /// -//@source:applix.cpp +@source:applix.cpp applix // -//@source:appoooh.cpp +@source:appoooh.cpp appoooh // (c) 1984 Sega, made by Sanritsu robowres // (c) 1986 Sega robowresb // bootleg -//@source:apricot.cpp +@source:apricot.cpp apricot // 1983 ACT apricotxi // 1984 ACT -//@source:apricotf.cpp +@source:apricotf.cpp f1 // f10 // f1e // f2 // -//@source:apricotp.cpp +@source:apricotp.cpp fp // -//@source:aquarium.cpp +@source:aquarium.cpp aquarium // (c) 1996 Excellent System aquariumj // (c) 1996 Excellent System -//@source:aquarius.cpp +@source:aquarius.cpp aquarius // 1983 Aquarius -//@source:arabian.cpp +@source:arabian.cpp arabian // TVG13 (c) 1983 Sun Electronics arabiana // 136019 (c) 1983 Atari -//@source:arachnid.cpp +@source:arachnid.cpp arac6000 // -//@source:arcadecl.cpp +@source:arcadecl.cpp arcadecl // (proto) (c) 1992 sparkz // (proto) (c) 1992 -//@source:arcadia.cpp +@source:arcadia.cpp advsnha // Advision Home Arcade arcadia // Emerson Arcadia 2001 bndarc // Bandai Arcadia @@ -1295,19 +1295,19 @@ tunixha // Tunix Home Arcade tvg2000 // Schmid TVG 2000 vdmaster // Video Master -//@source:argo.cpp +@source:argo.cpp argo // -//@source:argox.cpp +@source:argox.cpp os214 // -//@source:argus.cpp +@source:argus.cpp argus // (c) 1986 Jaleco butasan // (c) 1987 Jaleco - english subtitled butasanj // (c) 1987 Jaleco valtric // (c) 1986 Jaleco -//@source:aristmk4.cpp +@source:aristmk4.cpp 3bagflnz // (c) 1994 3bagflvt // (c) 1994 86lions // (c) 1985? @@ -1337,7 +1337,7 @@ topgear // (c) 1996 wildone // (c) 1997 wtigernz // (c) 1996 -//@source:aristmk5.cpp +@source:aristmk5.cpp adonis // (c) 1998 adonisa // (c) 1998 adonise // (c) 2001 @@ -1378,7 +1378,7 @@ trpdlght // (c) 1997 wldcougr // (c) 1997 wtiger // (c) 1999 -//@source:aristmk6.cpp +@source:aristmk6.cpp 50lions // (c) 2002 50lionsa // (c) 2003 antcleo // (c) 2004 @@ -1391,7 +1391,7 @@ whalecsh // (c) 2002 wheregld // (c) 2004 wildways // (c) 2003 -//@source:arkanoid.cpp +@source:arkanoid.cpp ark1ball // bootleg arkangc // bootleg arkangc2 // bootleg @@ -1418,7 +1418,7 @@ hexaa // paddle2 // bootleg tetrsark // ??? (c) D.R.Korea -//@source:armedf.cpp +@source:armedf.cpp armedf // (c) 1988 armedff // (c) 1988 Fillmore license bigfghtr // (c) 1989 @@ -1435,7 +1435,7 @@ terrafj // (c) 1987 Nichibutsu Japan terrafjb // (c) 1987 terrafu // (c) 1987 Nichibutsu USA -//@source:arsystems.cpp +@source:arsystems.cpp ar_airh // (c) 1988 ar_airh2 // (c) 1988 ar_argh // @@ -1461,7 +1461,7 @@ ar_spot // (c) 1990 ar_sprg // (c) 1987 ar_xeon // (c) 1988 -//@source:artmagic.cpp +@source:artmagic.cpp cheesech // (c) 1994 shtstar // (c) 1994 Nova stonebal // (c) 1994 @@ -1469,21 +1469,21 @@ stonebal2 // (c) 1994 ultennis // (c) 1993 ultennisj // (c) 1993 -//@source:ashnojoe.cpp +@source:ashnojoe.cpp ashnojoe // ??? (c) 1990 Wave / Taito scessjoe // ??? (c) 1990 Wave / Taito -//@source:asst128.cpp +@source:asst128.cpp asst128 // -//@source:asterix.cpp +@source:asterix.cpp asterix // GX068 (c) 1992 (World) asterixaad // GX068 (c) 1992 (Asia) asterixeaa // GX068 (c) 1992 (World) asterixeac // GX068 (c) 1992 (World) asterixj // GX068 (c) 1992 (Japan) -//@source:asteroid.cpp +@source:asteroid.cpp aerolitos // Rodmar Elec. bootleg astdelux // 0351xx (c) 1980 astdelux1 // 0351xx (c) 1980 @@ -1502,7 +1502,7 @@ meteorho // Hoei? bootleg (c) 1980 meteorts // VCC bootleg (c) 1979 spcrocks // J.Estevez (c) 1981 -//@source:astinvad.cpp +@source:astinvad.cpp astinvad // (c) 1980 Stern kamikaze // (c) 1979 Leijac Corporation kosmokil // bootleg @@ -1510,7 +1510,7 @@ spaceint // [1980] Shoei spaceintj // [1980] Shoei spcking2 // (c) 1979 Konami -//@source:astrafr.cpp +@source:astrafr.cpp as_acp // unknown ACP (Astra) as_bbr // Bullion Bars (Astra) as_bbra // @@ -1685,7 +1685,7 @@ as_wwc // as_wwd // as_wwe // -//@source:astrcorp.cpp +@source:astrcorp.cpp astoneag // (c) 2004? Astro Corp. dinodino // (c) 2003? Astro Corp. hacher // (c) 2005? bootleg (Gametron) @@ -1698,7 +1698,7 @@ winbingo // (c) 2005? Astro Corp. winbingoa // (c) 2005? Astro Corp. zoo // (c) 2005? Astro Corp. -//@source:astrocde.cpp +@source:astrocde.cpp demndrgn // (c) 1982 Bally Midway ebases // (c) 1980 gorf // (c) 1981 @@ -1712,7 +1712,7 @@ tenpindx // (c) 1983 Bally Midway wow // (c) 1980 wowg // (c) 1980 -//@source:astrof.cpp +@source:astrof.cpp abattle // Sidam abattle2 // Sidam acombat // bootleg @@ -1728,12 +1728,12 @@ sstarbtl // bootleg tomahawk // (c) 1980 Data East, Inc. tomahawk1 // (c) 1980 Data East, Inc. -//@source:astrohome.cpp +@source:astrohome.cpp astrocde // Bally Professional Arcade / Astrocade astrocdl // Bally Home Library Computer astrocdw // Bally Computer System (white case) -//@source:astropc.cpp +@source:astropc.cpp blackbd // blackbda // blackbdb // @@ -1743,7 +1743,7 @@ hawaii // oligam // rasce // -//@source:asuka.cpp +@source:asuka.cpp asuka // B68 (c) 1988 Taito Corporation (World) asukaj // B68 (c) 1988 Taito Corporation (Japan) bonzeadv // B41 (c) 1988 Taito Corporation Japan (World) @@ -1766,7 +1766,7 @@ galmedes // (c) 1992 Visco (Japan) jigkmgri // B41 (c) 1988 Taito Corporation (Japan) mofflott // C17 (c) 1989 Taito Corporation (Japan) -//@source:at.cpp +@source:at.cpp aplannb // 1990 Apricot LANstation (Novell Remote Boot) aplanst // 1990 Apricot LANstation (Krypton Motherboard) aplsbon // 1992 Apricot LS Pro (Bonsai Motherboard) @@ -1809,20 +1809,20 @@ xb42663 // 1988 Apricot Qi 300 (Rev D,E & F Motherboard) xb42664 // 1989 Apricot XEN-S (Venus I Motherboard 386) (Bios:3.10.17i) xb42664a // 1990 Apricot XEN-S (Venus II Motherboard 386) (Bios:1.02.17) -//@source:atari_s1.cpp +@source:atari_s1.cpp aavenger // atarians // midearth // spcrider // time2000 // -//@source:atari_s2.cpp +@source:atari_s2.cpp fourx4 // hercules // roadrunr // supermap // -//@source:atari400.cpp +@source:atari400.cpp a1200xl // 1982 Atari 1200 XL a130xe // 1986 Atari 130 XE a400 // 1979 Atari 400 @@ -1838,7 +1838,7 @@ a800xl // 1983 Atari 800 XL a800xlp // 1983 Atari 800 XL (PAL) xegs // 1987 Atari XE Game System -//@source:atarifb.cpp +@source:atarifb.cpp abaseb // 034711-034738 1979/06 [6502] abaseb2 // 034711-034738 1979/06 [6502] atarifb // 033xxx 1978/10 [6502] @@ -1847,7 +1847,7 @@ atarifb2 // 035330-035350 ??? [6502] atarifb4 // 034754 1979/04 [6502] soccer // 035222-035260 1980/04 [6502] -//@source:atarig1.cpp +@source:atarig1.cpp hydra // 136079 (c) 1990 hydrap // (proto) (c) 1990 hydrap2 // (proto) (c) 1990 @@ -1860,12 +1860,12 @@ pitfight7 // 136081 (c) 1990 pitfightb // bootleg pitfightj // Japan -//@source:atarig42.cpp +@source:atarig42.cpp guardian // 136092 (c) 1992 roadriot // 136089 (c) 1991 roadrioto // 136089 (c) 1991 -//@source:atarigt.cpp +@source:atarigt.cpp primrage // 136102 (c) 1994 primrage20 // 136102 (c) 1994 tmek // 136100 (c) 1994 @@ -1874,7 +1874,7 @@ tmek44 // 136100 (c) 1994 tmek45 // 136100 (c) 1994 tmek51p // 136100 (c) 1994 -//@source:atarigx2.cpp +@source:atarigx2.cpp motofren // 136094 (c) 1992 motofrenft // 136094 (c) 1992 motofrenmd // 136094 (c) 1992 @@ -1887,7 +1887,7 @@ spclordsa // 136095 (c) 1992 spclordsb // 136095 (c) 1992 spclordsg // 136095 (c) 1992 -//@source:atarist.cpp +@source:atarist.cpp falcon30 // Atari Falcon030 falcon40 // Atari Falcon040 (prototype) megast // Atari Mega ST @@ -1925,7 +1925,7 @@ tt030_fr // tt030_pl // tt030_uk // -//@source:atarisy1.cpp +@source:atarisy1.cpp atarisy1 // 136033 (c) 1984 indytemp // 136036 (c) 1985 indytemp2 // 136036 (c) 1985 @@ -1954,7 +1954,7 @@ roadrunn // 136040 (c) 1985 roadrunn1 // 136040 (c) 1985 roadrunn2 // 136040 (c) 1985 -//@source:atarisy2.cpp +@source:atarisy2.cpp 720 // 136047 (c) 1986 720g // 136047 (c) 1986 720gr1 // 136047 (c) 1986 @@ -1989,11 +1989,11 @@ ssprintg // 136042 (c) 1986 ssprintg1 // 136042 (c) 1986 ssprints // 136042 (c) 1986 -//@source:atarisy4.cpp +@source:atarisy4.cpp airrace // (proto) (c) 1985 laststar // (proto) (c) 1984 -//@source:atarittl.cpp +@source:atarittl.cpp antiairc // (c) 1975 Atari crashnsc // (c) 1975 Atari indy4 // (c) 1976 Atari / Kee @@ -2007,7 +2007,7 @@ stuntcyc // (c) 1976 Atari tank // (c) 1974 Atari / Kee tankii // (c) 1975 Atari / Kee -//@source:ataxx.cpp +@source:ataxx.cpp asylum // (c) 1991 Leland ataxx // (c) 1990 Leland ataxxa // (c) 1990 Leland @@ -2017,7 +2017,7 @@ brutforc // (c) 1991 Leland indyheat // (c) 1991 Leland wsf // (c) 1990 Leland -//@source:atetris.cpp +@source:atetris.cpp atetris // 136066 (c) 1988 atetrisa // 136066 (c) 1988 atetrisb // (bootleg) @@ -2026,26 +2026,26 @@ atetrisb3 // (bootleg) atetrisc // 136066 (c) 1989 atetrisc2 // 136066 (c) 1989 -//@source:atlantis.cpp +@source:atlantis.cpp mwskins // (c) 2000 Midway mwskinsa // (c) 2000 Midway mwskinso // (c) 2000 Midway -//@source:atm.cpp +@source:atm.cpp atm // atmtb2 // -//@source:atom.cpp +@source:atom.cpp atom // 1979 Acorn Atom atombb // 1979 Acorn Atom atomeb // 1979 Acorn Atom -//@source:atpci.cpp +@source:atpci.cpp at586 // 19?? AT 586 at586x3 // 19?? AT 586 ficvt503 // 1997 FIC VT-503 -//@source:atronic.cpp +@source:atronic.cpp 3wishrd // Three Wishes Red abigchs // Big Cheese aclown // Clown @@ -2076,64 +2076,64 @@ shpinxii // Sphinx II splmastr // Spell Master tajmah // Tajmahal -//@source:attache.cpp +@source:attache.cpp attache // -//@source:attckufo.cpp +@source:attckufo.cpp attckufo // (c) 1980 Ryoto Electric Co. -//@source:atvtrack.cpp +@source:atvtrack.cpp atvtrack // (c) 2002 - Ref 020419 atvtracka // (c) 2002 - Ref 020419 smashdrv // (c) 2000 -//@source:aussiebyte.cpp +@source:aussiebyte.cpp aussieby // -//@source:avalnche.cpp +@source:avalnche.cpp avalnche // 030574 1978/04 [6502] cascade // bootleg catchp // 008837 prototype 1977/?? [6502] -//@source:avigo.cpp +@source:avigo.cpp avigo // 1997 Avigo avigo_de // 1997 Avigo (German) avigo_es // 1997 Avigo (Spanish) avigo_fr // 1997 Avigo (French) avigo_it // 1997 Avigo (Italian) -//@source:avt.cpp +@source:avt.cpp avtbingo // (c) 1985 AVT avtnfl // (c) 1989 AVT avtsym14 // (c) 1985 AVT avtsym25 // (c) 1985 AVT -//@source:ax20.cpp +@source:ax20.cpp ax20 // -//@source:aztarac.cpp +@source:aztarac.cpp aztarac // (c) 1983 Centuri (vector game) -//@source:b16.cpp +@source:b16.cpp b16 // -//@source:b2m.cpp +@source:b2m.cpp b2m // b2mrom // -//@source:babbage.cpp +@source:babbage.cpp babbage // -//@source:backfire.cpp +@source:backfire.cpp backfire // MBZ (c) 1995 backfirea // MBZ (c) 1995 -//@source:badlands.cpp +@source:badlands.cpp badlands // 136074 (c) 1989 badlandsb // bootleg badlandsb2 // bootleg set 2 -//@source:bagman.cpp +@source:bagman.cpp bagman // (c) 1982 bagmans // (c) 1982 + Stern license bagmans2 // (c) 1982 + Stern license @@ -2147,11 +2147,11 @@ sbagman // (c) 1984 sbagmans // (c) 1984 + Stern license squaitsa // (c) 1985 -//@source:bailey.cpp +@source:bailey.cpp fun4 // (c) 1976 Bailey fun4a // (c) 1976 Bailey -//@source:balsente.cpp +@source:balsente.cpp cshift // (c) 1984 gghost // (c) 1984 gimeabrk // (c) 1985 @@ -2186,46 +2186,46 @@ triviag2 // (c) 1984 triviasp // (c) 1984 triviayp // (c) 1984 -//@source:banctec.cpp +@source:banctec.cpp banctec // BancTec ESeries panel -//@source:bankp.cpp +@source:bankp.cpp bankp // (c) 1984 Sega, made by Sanritsu combh // (c) 1987 Sega, made by Sanritsu -//@source:baraduke.cpp +@source:baraduke.cpp aliensec // (c) 1985 baraduke // (c) 1985 metrocrs // (c) 1985 metrocrsa // (c) 1985 -//@source:barata.cpp +@source:barata.cpp barata // -//@source:bartop52.cpp +@source:bartop52.cpp barbball // (proto) (c) 1983 -//@source:basic52.cpp +@source:basic52.cpp basic31 // basic52 // -//@source:batman.cpp +@source:batman.cpp batman // 136085 (c) 1991 -//@source:battlane.cpp +@source:battlane.cpp battlane // -0215, -0216 (Data East part number) (c) 1986 + Taito license battlane2 // -0215, -0216 (Data East part number) (c) 1986 + Taito license battlane3 // -0215, -0216 (Data East part number) (c) 1986 + Taito license -//@source:battlera.cpp +@source:battlera.cpp battlera // (c) 1988 Data East Corporation (World) bldwolf // (c) 1988 Data East USA (US) bldwolfj // (c) 1988 Data East Corporation (Japan) -//@source:battlex.cpp +@source:battlex.cpp battlex // (c) 1982 Omori E. Co., Ltd. -//@source:battlnts.cpp +@source:battlnts.cpp battlnts // GX777 (c) 1987 battlntsa // GX777 (c) 1987 battlntsj // GX777 (c) 1987 (Japan) @@ -2233,7 +2233,7 @@ rackemup // GX765 (c) 1987 thehustl // GX765 (c) 1987 (Japan) thehustlj // GX765 (c) 1987 (Japan) -//@source:bbc.cpp +@source:bbc.cpp abc110 // 1985 ABC 110 abc310 // 1985 ABC 310 acw443 // 1985 ABC 210/Cambridge Workstation @@ -2258,10 +2258,10 @@ torchf // 1982 Torch CF240 torchh10 // 1982 Torch CH240/10 torchh21 // 1982 Torch CH240/21 -//@source:bbcbc.cpp +@source:bbcbc.cpp bbcbc // 1985 BBC Bridge Companion -//@source:bbusters.cpp +@source:bbusters.cpp bbusters // A9003 'BB' (c) 1989 bbustersu // A9003 'BB' (c) 1989 bbustersua // A9003 'BB' (c) 1989 @@ -2270,32 +2270,32 @@ mechattj // A8002 'MA' (c) 1989 mechattu // A8002 'MA' (c) 1989 mechattu1 // A8002 'MA' (c) 1989 -//@source:bcs3.cpp +@source:bcs3.cpp bcs3 // bcs3a // bcs3b // bcs3c // bcs3d // -//@source:beaminv.cpp +@source:beaminv.cpp beaminv // (c) 1979 Tekunon Kougyou (Arcade TV Game List - P.95, Left, 9 from top) pacominv // (c) 1979 Pacom Corporation -//@source:beathead.cpp +@source:beathead.cpp beathead // (proto) (c) 1993 -//@source:bebox.cpp +@source:bebox.cpp bebox // BeBox Dual603-66 bebox2 // BeBox Dual603-133 -//@source:beehive.cpp +@source:beehive.cpp beehive // -//@source:beezer.cpp +@source:beezer.cpp beezer // (c) 1982 beezer1 // (c) 1982 -//@source:belatra.cpp +@source:belatra.cpp fairyl2 // fairyl2a // fairyl2b // @@ -2304,7 +2304,7 @@ ldrink // ldrinka // merryjn // -//@source:berzerk.cpp +@source:berzerk.cpp berzerk // (c) 1980 berzerk1 // (c) 1980 berzerkf // (c) 1980 (French speech) @@ -2313,17 +2313,17 @@ berzerks // (c) 1980 Sonic license(Spanish speech) frenzy // (c) 1982 moonwarp // (c) 1982 - prototype -//@source:besta.cpp +@source:besta.cpp besta88 // -//@source:bestleag.cpp +@source:bestleag.cpp bestleag // bootleg, by Playmark? bestleaw // bootleg -//@source:beta.cpp +@source:beta.cpp beta // -//@source:bfcobra.cpp +@source:bfcobra.cpp beeline // 1991 BFM escounts // 1990 BFM inquiztr // 1989 BFM @@ -2333,7 +2333,7 @@ qosb // 1992 BFM quizvadr // 1991 BFM trebltop // 1991 BFM -//@source:bfm_ad5sw.cpp +@source:bfm_ad5sw.cpp ad5bpfpm // Bullseye Pounds For Points (Mazooma) ad5bpfpma // ad5bpfpmb // @@ -2582,7 +2582,7 @@ ad5vpaa // ad5vpab // ad5vpac // -//@source:bfm_sc1.cpp +@source:bfm_sc1.cpp m_tppokr // (c) 1996 BFM/ELAM,Game Card 95-750-899, uses Adder board for feature gfx sc1actv8 // sc1armad // @@ -2795,7 +2795,7 @@ sc1wthn // Wild Thing (Eurocoin) sc1wud // What's Up Dr sc1zep // Zeppelin (Bellfruit) -//@source:bfm_sc2.cpp +@source:bfm_sc2.cpp gldncrwn // 1997 paradice // 1995 pokio // 1994 @@ -3288,7 +3288,7 @@ sltblgp1 // 1996 sltblgpo // 1996 sltblgtk // 1996 -//@source:bfm_sc4.cpp +@source:bfm_sc4.cpp ad4ctl // ad4ctla // ad4film // @@ -6409,7 +6409,7 @@ sc4ziggye // sc4ziggyf // sc4ziggyg // -//@source:bfm_sc5sw.cpp +@source:bfm_sc5sw.cpp sc5_3414 // sc5_3434 // sc5_3435 // @@ -8085,17 +8085,17 @@ sc5woka // sc5wotw // War Of The Wads (Mazooma) sc5wotwa // -//@source:bfm_swp.cpp +@source:bfm_swp.cpp c3_ppays // The Phrase That Pays c3_rtime // Radio Times c3_telly // Telly Addicts c3_totp // Top of the Pops -//@source:bfmsys83.cpp +@source:bfmsys83.cpp b83catms // b83cops // -//@source:bfmsys85.cpp +@source:bfmsys85.cpp b85bdclb // b85bdclba // b85bdclbb // @@ -8131,31 +8131,31 @@ b85royal // b85scard // (c) 198? BFM b85sngam // -//@source:bgt.cpp +@source:bgt.cpp bg_barmy // bg_ddb // bg_max // bg_maxa // -//@source:big10.cpp +@source:big10.cpp big10 // (c) 198? Unknown -//@source:bigbord2.cpp +@source:bigbord2.cpp bigbord2 // -//@source:bigevglf.cpp +@source:bigevglf.cpp bigevglf // A67 (c) 1986 Taito America Corporation (US) bigevglfj // A67 (c) 1986 Taito Corporation (Japan) -//@source:bigstrkb.cpp +@source:bigstrkb.cpp bigstrkb // bootleg on different hardware bigstrkba // alt set of 'bigstrkb' with Italian teams -//@source:binbug.cpp +@source:binbug.cpp binbug // dg680 // -//@source:bingo.cpp +@source:bingo.cpp brooklyn // brooklyna // cntine31 // @@ -8181,60 +8181,60 @@ topgame // topgamet // tripjok // -//@source:bingoc.cpp +@source:bingoc.cpp bingoc // (c) 1989 Sega -//@source:bingoman.cpp +@source:bingoman.cpp bingoman // bingomana // -//@source:bingor.cpp +@source:bingor.cpp bingor1 // (c) 2002 Unknown bingor2 // (c) 2002 Unknown bingor3 // (c) 2002 Unknown bingor4 // (c) 2002 Unknown bingor5 // (c) 2002 Unknown -//@source:bionicc.cpp +@source:bionicc.cpp bionicc // 3/1987 (c) 1987 (Euro) bionicc1 // 3/1987 (c) 1987 (US) bionicc2 // 3/1987 (c) 1987 (US) bioniccbl // bootleg topsecrt // 3/1987 (c) 1987 (Japan) -//@source:bishi.cpp +@source:bishi.cpp bishi // GX575 (c) 1996 (Japan) sbishi // GX675 (c) 1998 (Japan) sbishik // GX675 (c) 1998 (Korea) -//@source:bitgraph.cpp +@source:bitgraph.cpp bitgrpha // bitgrphb // -//@source:bk.cpp +@source:bk.cpp bk0010 // bk001001 // bk0010fd // bk0011m // -//@source:bking.cpp +@source:bking.cpp bking // DM (c) 1982 Taito Corporation bking2 // AD6 (c) 1983 Taito Corporation bking3 // A24 (c) 1984 Taito Corporation -//@source:blackt96.cpp +@source:blackt96.cpp blackt96 // (c) 1996 D.G.R.M. of Korea -//@source:bladestl.cpp +@source:bladestl.cpp bladestl // GX797 (c) 1987 bladestle // GX797 (c) 1987 bladestll // GX797 (c) 1987 -//@source:blitz.cpp +@source:blitz.cpp megadpkr // (c) 1990 Blitz System Inc megadpkrb // (c) 1990 Blitz System Inc -//@source:blitz68k.cpp +@source:blitz68k.cpp bankrob // (c) 1993 Entertainment Technology Corp. bankroba // (c) 1993 Entertainment Technology Corp. cj3play // (c) 1998 Cadillac Jack @@ -8249,7 +8249,7 @@ megadblj // (c) 1990 Blitz Systems Inc. poker52 // (c) 1993 Blitz Systems Inc. ? steaser // (c) 1993 unknown -//@source:blktiger.cpp +@source:blktiger.cpp blkdrgon // 8/1987 (c) 1987 (Japan) blkdrgonb // bootleg, hacked to say Black Tiger blktiger // 8/1987 (c) 1987 (US) @@ -8258,12 +8258,12 @@ blktigerb1 // bootleg blktigerb2 // bootleg blktigerb3 // bootleg? -//@source:blmbycar.cpp +@source:blmbycar.cpp blmbycar // (c) 1994 ABM & Gecas - uses same gfx chip as powerins? blmbycaru // (c) 1994 ABM & Gecas - uses same gfx chip as powerins? watrball // (c) 1996 ABM -//@source:blockade.cpp +@source:blockade.cpp blasto // [1978 Gremlin] blockade // 1-4 [1977 Gremlin] comotion // 5-7 [1977 Gremlin] @@ -8271,100 +8271,100 @@ hustle // 16-21 [1977 Gremlin] mineswpr // [1977 Amutech] mineswpr4 // [1977 Amutech] -//@source:blockhl.cpp +@source:blockhl.cpp blockhl // GX973 (c) 1989 quarth // GX973 (c) 1989 (Japan) -//@source:blockout.cpp +@source:blockout.cpp agress // TA-0029 (c) 1991 Palco agressb // TA-0029 (c) 1991 Palco blockout // TA-0029 (c) 1989 + California Dreams blockout2 // TA-0029 (c) 1989 + California Dreams blockoutj // TA-0029 (c) 1989 + California Dreams (Japan) -//@source:bloodbro.cpp +@source:bloodbro.cpp bloodbro // (c) 1990 Tad bloodbroa // (c) 1990 Tad bloodbrob // (c) 1990 Tad skysmash // (c) 1990 Nihon System Inc. weststry // bootleg -//@source:blstroid.cpp +@source:blstroid.cpp blstroid // 136057 (c) 1987 blstroid2 // 136057 (c) 1987 blstroid3 // 136057 (c) 1987 blstroidg // 136057 (c) 1987 blstroidh // (proto) (c) 1987 -//@source:blueprnt.cpp +@source:blueprnt.cpp blueprnt // (c) 1982 Bally Midway (Zilec in ROM 3U, and the programmer names) blueprntj // (c) 1982 Jaleco (Zilec in ROM 3U, and the programmer names) grasspin // (c) 1983 Jaleco (Zilec / Ashby programmer names in sound rom) saturnzi // (c) 1983 Jaleco (Zilec in ROM R6, and the programmer names) -//@source:bmcbowl.cpp +@source:bmcbowl.cpp bmcbowl // (c) 1994 BMC -//@source:bmcpokr.cpp +@source:bmcpokr.cpp bmcpokr // (c) 1999 BMC mjmaglmp // (c) 2000 BMC -//@source:bmjr.cpp +@source:bmjr.cpp bmjr // -//@source:bml3.cpp +@source:bml3.cpp bml3 // bml3mk2 // bml3mk5 // -//@source:bnstars.cpp +@source:bnstars.cpp bnstars1 // (c) 1997 -//@source:bntyhunt.cpp +@source:bntyhunt.cpp bntyhunt // (c) 200? GCTech Co., LTD -//@source:bob85.cpp +@source:bob85.cpp bob85 // -//@source:bogeyman.cpp +@source:bogeyman.cpp bogeyman // -0204-0 (Data East part number) (c) 1985 (Arcade TV Game List - P.96, Right, 8 from top) -//@source:bombjack.cpp +@source:bombjack.cpp bombjack // (c) 1984 Tehkan bombjack2 // (c) 1984 Tehkan bombjackt // (c) 1984 Tehkan + Tecfri license -//@source:boogwing.cpp +@source:boogwing.cpp boogwing // MBD (c) 1992 (Euro, v1.5) boogwinga // MBD (c) 1992 (Asia, v1.5) boogwingu // MBD (c) 1992 (USA, v1.7) ragtime // MBD (c) 1992 (Japan, v1.5) ragtimea // MBD (c) 1992 (Japan, v1.3) -//@source:bottom9.cpp +@source:bottom9.cpp bottom9 // GX891 (c) 1989 bottom9n // GX891 (c) 1989 mstadium // GX891 (c) 1989 (Japan) -//@source:bowltry.cpp +@source:bowltry.cpp bowltry // (c) 200? Atlus -//@source:boxer.cpp +@source:boxer.cpp boxer // ?????? prototype 1978 [6502] -//@source:br8641.cpp +@source:br8641.cpp br8641 // -//@source:brkthru.cpp +@source:brkthru.cpp brkthru // (c) 1986 Data East USA (US) brkthruj // (c) 1986 Data East Corporation (Japan) darwin // (c) 1986 Data East Corporation (Japan) forcebrk // (c) 1986 Data East Corporation (Japan) -//@source:bsktball.cpp +@source:bsktball.cpp bsktball // 034756-034766 1979/05 [6502] -//@source:btime.cpp +@source:btime.cpp bnj // (c) 1982 bnjm // (c) 1982 + Midway brubber // (c) 1982 @@ -8385,10 +8385,10 @@ tisland // (c) 1982 wtennis // bootleg 1982 zoar // (c) 1982 -//@source:btoads.cpp +@source:btoads.cpp btoads // (c) 1994 Rare -//@source:bublbobl.cpp +@source:bublbobl.cpp bbredux // bootleg / hack boblbobl // bootleg boblcave // hack @@ -8412,28 +8412,28 @@ tokiob // bootleg tokioo // A71 1986 tokiou // A71 1986 -//@source:buggychl.cpp +@source:buggychl.cpp buggychl // A22 (c) 1984 Taito Corporation buggychlt // A22 (c) 1984 Taito Corporation + Tefri license -//@source:bullet.cpp +@source:bullet.cpp wmbullet // wmbulletf // -//@source:busicom.cpp +@source:busicom.cpp busicom // -//@source:buster.cpp +@source:buster.cpp buster // (c) 1987 Marian Electronics Ltd. -//@source:bw12.cpp +@source:bw12.cpp bw12 // bw14 // -//@source:bw2.cpp +@source:bw2.cpp bw2 // -//@source:bwidow.cpp +@source:bwidow.cpp bwidow // 136017 (c) 1982 bwidowp // (proto) (c) 1982 gravitar // 136010 (c) 1982 @@ -8445,14 +8445,14 @@ spacduel // 136006 (c) 1980 spacduel0 // 136006 (c) 1980 spacduel1 // 136006 (c) 1980 -//@source:bwing.cpp +@source:bwing.cpp bwings // (c) 1984 bwingsa // (c) 1984 bwingso // (c) 1984 zaviga // (c) zavigaj // (c) -//@source:by17.cpp +@source:by17.cpp blackjck // bowarrow // eightbll // @@ -8464,7 +8464,7 @@ nightrdr // pwerplay // stk_sprs // -//@source:by35.cpp +@source:by35.cpp bbbowlin // blakpyra // blbeauty // @@ -8537,7 +8537,7 @@ xenon // xenonf // xsandos // -//@source:by6803.cpp +@source:by6803.cpp atlantip // beatclck // black100 // @@ -8562,7 +8562,7 @@ strngsci // trucksp2 // trucksp3 // -//@source:by68701.cpp +@source:by68701.cpp eballdlxp1 // eballdlxp2 // eballdlxp3 // @@ -8570,12 +8570,12 @@ eballdlxp4 // flashgdnp1 // flashgdnp2 // -//@source:byvid.cpp +@source:byvid.cpp babypac // babypac2 // granny // -//@source:bzone.cpp +@source:bzone.cpp bradley // ?? (c) 1980 bzone // 0364xx (c) 1980 bzonea // 0364xx (c) 1980 @@ -8583,10 +8583,10 @@ bzonec // 0364xx (c) 1980 redbaron // 036995-037007 (c) 1980 redbarona // 036995-037007 (c) 1980 -//@source:c10.cpp +@source:c10.cpp c10 // -//@source:c128.cpp +@source:c128.cpp c128 // c128_de // c128_se // @@ -8600,7 +8600,7 @@ c128dcrp // c128dp // c128p // -//@source:c64.cpp +@source:c64.cpp c64 // c64_jp // Commodore 64 (Japan) c64_se // Commodore 64 (Sweden) @@ -8619,20 +8619,20 @@ sx64p // tesa6240 // vip64 // Commodore VIP64 (SX64, PAL, Swedish) -//@source:c64dtv.cpp +@source:c64dtv.cpp c64dtv // Commodore 64 Direct-to-TV -//@source:c65.cpp +@source:c65.cpp c64dx // 1991 C65 / C64DX (Prototype, German PAL) c65 // 1991 C65 / C64DX (Prototype, NTSC) -//@source:c80.cpp +@source:c80.cpp c80 // -//@source:c900.cpp +@source:c900.cpp c900 // -//@source:cabal.cpp +@source:cabal.cpp cabal // (c) 1988 Tad + Fabtek license cabala // (c) 1988 Tad + Fabtek license cabalbl // bootleg @@ -8641,15 +8641,15 @@ cabalus // (c) 1988 Tad + Fabtek license cabalus2 // (c) 1988 Tad + Fabtek license cabaluk // -//@source:cabaret.cpp +@source:cabaret.cpp cabaret // (c) 1992 AMT -//@source:calchase.cpp +@source:calchase.cpp calchase // (c) 1999 The Game Room eggsplc // (c) 2002 The Game Room hostinv // (c) 1998 The Game Room -//@source:calomega.cpp +@source:calomega.cpp comg074 // (c) 1981 Cal Omega Inc. comg076 // (c) 1981 Cal Omega Inc. comg079 // (c) 1981 Cal Omega Inc. @@ -8694,23 +8694,23 @@ ssipkr24 // (c) 1988 SSI ssipkr30 // (c) 1988 SSI ssipkr40 // (c) 1990 SSI -//@source:calorie.cpp +@source:calorie.cpp calorie // (c) 1986 Sega calorieb // (c) 1986 Sega (but bootleg) -//@source:camplynx.cpp +@source:camplynx.cpp lynx128k // lynx48k // lynx96k // -//@source:canon_s80.cpp +@source:canon_s80.cpp canons80 // -//@source:canyon.cpp +@source:canyon.cpp canyon // 009493-009504 1977/10 [6502] canyonp // 009493-009504 1977/10 [6502] -//@source:capbowl.cpp +@source:capbowl.cpp bowlrama // (c) 1991 P & P Marketing capbowl // (c) 1988 Incredible Technologies capbowl2 // (c) 1988 Incredible Technologies @@ -8718,7 +8718,7 @@ capbowl3 // (c) 1988 Incredible Technologies capbowl4 // (c) 1989 Incredible Technologies clbowl // (c) 1989 Incredible Technologies -//@source:capcom.cpp +@source:capcom.cpp abv106 // abv106r // bbb108 // @@ -8734,41 +8734,41 @@ kpv106 // pmv112 // pmv112r // -//@source:capr1.cpp +@source:capr1.cpp cspin2 // -//@source:caprcyc.cpp +@source:caprcyc.cpp caprcyc // -//@source:cardline.cpp +@source:cardline.cpp cardline // (c) 199? Veltmeijer -//@source:carjmbre.cpp +@source:carjmbre.cpp carjmbre // (c) 1983 Omori Electric Co., Ltd. -//@source:carpolo.cpp +@source:carpolo.cpp carpolo // (c) 1977 -//@source:carrera.cpp +@source:carrera.cpp carrera // (c) 19?? BS Electronics -//@source:casloopy.cpp +@source:casloopy.cpp casloopy // -//@source:castle.cpp +@source:castle.cpp castfpt // Fortune Pot castrev // Revolution -//@source:caswin.cpp +@source:caswin.cpp caswin // (c) 1985 rcasino // (c) 1984 Dyna Electronics (D-2608208A1-2) rcasino1 // (c) 1984 Dyna Electronics (D-2608208A1-1, Larger Board) rcasinoo // (c) 1984 Dyna Electronics (D-2608208A1-1, Smaller Board) -//@source:cat.cpp +@source:cat.cpp cat // -//@source:cave.cpp +@source:cave.cpp agallet // (c) 1996 Banpresto / Gazelle (country is in EEPROM) agalleth // (c) 1996 Banpresto / Gazelle (country is in EEPROM) agalletj // (c) 1996 Banpresto / Gazelle (country is in EEPROM) @@ -8820,20 +8820,20 @@ tjumpman // (c) 1999 Namco uopoko // (c) 1998 Cave + Jaleco license uopokoj // (c) 1998 Cave + Jaleco license -//@source:cavepc.cpp +@source:cavepc.cpp deathsm2 // -//@source:cb2001.cpp +@source:cb2001.cpp cb2001 // (c) 2001 Dyna Electronics scherrym // (c) 2001? Dyna Electronics -//@source:cball.cpp +@source:cball.cpp cball // ?????? prototype 1976/?? [6800] -//@source:cbasebal.cpp +@source:cbasebal.cpp cbasebal // 10/1989 (c) 1989 Capcom (Japan) (different hardware) -//@source:cbm2.cpp +@source:cbm2.cpp b128 // Commodore B128 b128hp // Commodore B128HP b256 // Commodore B256 @@ -8851,17 +8851,17 @@ cbm730 // p500 // Commodore P500 (proto, a.k.a. C128-40, PET-II) p500p // -//@source:cbuster.cpp +@source:cbuster.cpp cbuster // MAB (c) 1990 Data East Corporation (World) cbusterj // MAB (c) 1990 Data East Corporation (Japan) cbusterw // MAB (c) 1990 Data East Corporation (World) twocrude // MAB (c) 1990 Data East USA (US) twocrudea // MAB (c) 1990 Data East USA (US) -//@source:cc40.cpp +@source:cc40.cpp cc40 // 1983 TI CC-40 -//@source:ccastles.cpp +@source:ccastles.cpp ccastles // 136022 (c) 1983 ccastles1 // 136022 (c) 1983 ccastles2 // 136022 (c) 1983 @@ -8871,14 +8871,14 @@ ccastlesg // 136022 (c) 1983 ccastlesj // 136022 (c) 1983 ccastlesp // 136022 (c) 1983 -//@source:cchance.cpp +@source:cchance.cpp cchance // (c)1987 Taito? -//@source:cchasm.cpp +@source:cchasm.cpp cchasm // cchasm1 // (c) 1983 Cinematronics / GCE -//@source:cclimber.cpp +@source:cclimber.cpp bagmanf // bootleg on Falcon FCK-00 (Falcon Crazy Kong) PCB bigkong // bootleg cannonb // (c) 1985 Soft @@ -8913,20 +8913,20 @@ toprollr // (c) 1983 Jaleco yamato // (c) 1983 Sega yamato2 // (c) 1983 Sega -//@source:ccs2810.cpp +@source:ccs2810.cpp ccs2422 // ccs2810 // -//@source:ccs300.cpp +@source:ccs300.cpp ccs300 // -//@source:cd2650.cpp +@source:cd2650.cpp cd2650 // -//@source:cdc721.cpp +@source:cdc721.cpp cdc721 // -//@source:cdi.cpp +@source:cdi.cpp cdi490a // cdi910 // cdibios // Base unit @@ -8944,7 +8944,7 @@ quizard4 // (c) TAB Austria 1998 quizard4_40 // (c) TAB Austria 1997 quizard4_41 // (c) TAB Austria 1998 -//@source:centiped.cpp +@source:centiped.cpp bullsdrt // (c) 1985 Shinkai caterplr // (bootleg) centipdb // (bootleg) @@ -8962,28 +8962,28 @@ millpac // Valadon multiped // hack warlords // 037153-037159 (c) 1980 -//@source:cesclass.cpp +@source:cesclass.cpp ccclass // hrclass // tsclass // -//@source:cfx9850.cpp +@source:cfx9850.cpp cfx9850 // Casio CFX-9850 -//@source:cgc7900.cpp +@source:cgc7900.cpp cgc7900 // -//@source:cgenie.cpp +@source:cgenie.cpp cgenie // Colour Genie EG2000 cgenienz // Colour Genie EG2000 (New Zealand) -//@source:chaknpop.cpp +@source:chaknpop.cpp chaknpop // AO4 (c) 1983 Taito Corporation -//@source:cham24.cpp +@source:cham24.cpp cham24 // 2002 -//@source:champbas.cpp +@source:champbas.cpp champbas // (c) 1983 Sega champbasj // (c) 1983 Alpha Denshi Co. champbasja // (c) 1983 Alpha Denshi Co. @@ -8999,20 +8999,20 @@ exctsccrjo // (c) 1983 Alpha Denshi Co. exctsccru // (c) 1983 Alpha Denshi Co. talbot // Volt Electronics -//@source:champbwl.cpp +@source:champbwl.cpp champbwl // (c)1989 Romstar. not Taito, but the same Seta video chips doraemon // Sunsoft / Epoch / Fujiko - Shogakukan - TV Asahi (prototype) -//@source:chanbara.cpp +@source:chanbara.cpp chanbara // (c) 1985 Data East -//@source:chance32.cpp +@source:chance32.cpp chance32 // (c) 19?? PAL Company -//@source:changela.cpp +@source:changela.cpp changela // ??? (c) 1983 Taito Corporation -//@source:channelf.cpp +@source:channelf.cpp channelf // Fairchild Channel F VES - 1976 channlf2 // Fairchild Channel F II - 1978 ingtelma // Ingelen Tele-Match Processor (PAL) @@ -9022,27 +9022,27 @@ luxorves // Luxor Video Entertainment System (PAL) sabavdpl // SABA Videoplay - 1977 (PAL) sabavpl2 // SABA Videoplay 2 (PAL) -//@source:chaos.cpp +@source:chaos.cpp chaos // -//@source:cheekyms.cpp +@source:cheekyms.cpp cheekyms // 8004 (c) [1980?] -//@source:chessmst.cpp +@source:chessmst.cpp chessmst // -//@source:chesstrv.cpp +@source:chesstrv.cpp borisdpl // chesstrv // -//@source:chexx.cpp +@source:chexx.cpp chexx83 // 1983 ICE faceoffh // 1983 SoftLogic / Entertainment Enterprises -//@source:chicago.cpp +@source:chicago.cpp dmodrbcc // (c) 1976 Chicago Coin -//@source:chihiro.cpp +@source:chihiro.cpp ccfboxa // 2009.03.31 Firmware Update For Compact Flash Box (Rev A) chihiro // 2002.?? Chihiro BIOS crtaxihr // 2003.02.24 Crazy Taxi High Roller (Rev B) @@ -9065,31 +9065,31 @@ wangmd2b // 2005.10 Wangan Midnight Maximum Tune 2 (Expor wangmid // 2004.07 Wangan Midnight Maximum Tune (export) (Rev B) wangmid2 // 2005.04 Wangan Midnight Maximum Tune 2 (Japan) -//@source:chinagat.cpp +@source:chinagat.cpp chinagat // TA-0023 (c) 1988 Taito + Romstar license (US) saiyugou // TA-0023 (c) 1988 (Japan) saiyugoub1 // bootleg saiyugoub2 // bootleg -//@source:chinsan.cpp +@source:chinsan.cpp chinsan // (c) 1987 Sanritsu -//@source:chqflag.cpp +@source:chqflag.cpp chqflag // GX717 (c) 1988 chqflagj // GX717 (c) 1988 (Japan) -//@source:chsuper.cpp +@source:chsuper.cpp chmpnum // unknown chsuper2 // unknown chsuper3 // unknown -//@source:cidelsa.cpp +@source:cidelsa.cpp altair // (c) 1981 Cidelsa destryer // (c) 1981 Cidelsa destryera // (c) 1981 Cidelsa draco // (c) 1981 Cidelsa -//@source:cinemat.cpp +@source:cinemat.cpp armora // (c) 1980 armorap // (c) 1980 armorar // (c) 1980 Cinematronics (Rock-ola license) @@ -9115,7 +9115,7 @@ warrior // (c) 1979 Vectorbeam wotw // (c) 1981 wotwc // (c) 1981 -//@source:circus.cpp +@source:circus.cpp circus // no copyright notice [1977?] crash // Exidy [1979?] ripcord // Exidy [1977?] @@ -9123,7 +9123,7 @@ robotbwl // no copyright notice smash // bootleg springbd // Sub-Electro bootleg of Circus -//@source:circusc.cpp +@source:circusc.cpp circusc // GX380 (c) 1984 circusc2 // GX380 (c) 1984 circusc3 // GX380 (c) 1984 @@ -9131,7 +9131,7 @@ circusc4 // GX380 (c) 1984 circuscc // GX380 (c) 1984 + Centuri license circusce // GX380 (c) 1984 + Centuri license -//@source:cischeat.cpp +@source:cischeat.cpp armchmp2 // (c) 1992 Jaleco armchmp2o // (c) 1992 Jaleco bigrun // (c) 1989 Jaleco @@ -9142,24 +9142,24 @@ f1gpstr2 // (c) 1993 Jaleco scudhamm // (c) 1994 Jaleco wildplt // (c) 1992 Jaleco -//@source:citycon.cpp +@source:citycon.cpp citycon // (c) 1985 Jaleco citycona // (c) 1985 Jaleco cruisin // (c) 1985 Jaleco/Kitkorp -//@source:clayshoo.cpp +@source:clayshoo.cpp clayshoo // [1979 Allied Leisure] -//@source:clcd.cpp +@source:clcd.cpp clcd // Commodore LCD -//@source:cliffhgr.cpp +@source:cliffhgr.cpp cliffhgr // (c) 1983 cliffhgra // (c) 1983 cliffhgra2 // (c) 1983 goaltogo // (c) 1983 -//@source:cloak.cpp +@source:cloak.cpp agentx1 // 136023 (c) 1983 agentx2 // 136023 (c) 1983 agentx3 // 136023 (c) 1983 @@ -9169,26 +9169,26 @@ cloakfr // 136023 (c) 1983 cloakgr // 136023 (c) 1983 cloaksp // 136023 (c) 1983 -//@source:cloud9.cpp +@source:cloud9.cpp cloud9 // (proto) (c) 1983 firebeas // (proto) (c) 1983 -//@source:clowndwn.cpp +@source:clowndwn.cpp clowndwn // Elwood Clown Roll Down -//@source:clshroad.cpp +@source:clshroad.cpp clshroad // (c) 1986 Wood Place Inc. clshroadd // (c) 1986 Wood Place Inc. (Data East license) clshroads // (c) 1986 Wood Place Inc. (Status Games license) firebatl // (c) 1984 Taito -//@source:cm1800.cpp +@source:cm1800.cpp cm1800 // -//@source:cmmb.cpp +@source:cmmb.cpp cmmb162 // -//@source:cninja.cpp +@source:cninja.cpp cninja // MAG (c) 1991 Data East Corporation (World) cninja1 // MAG (c) 1991 Data East Corporation (World) cninjabl // bootleg @@ -9210,17 +9210,17 @@ robocop2u // MAH (c) 1991 Data East Corporation (US) robocop2ua // MAH (c) 1991 Data East Corporation (US) stoneage // bootleg -//@source:cntsteer.cpp +@source:cntsteer.cpp cntsteer // (c) 1985 Data East Corporation gekitsui // (c) 1985 Data East Corporation (Japan) zerotrgt // (c) 1985 Data East Corporation zerotrgta // (c) 1985 Data East Corporation -//@source:cobra.cpp +@source:cobra.cpp bujutsu // G?645 (c)1997 racjamdx // G?676 (c)1997 Japan JAA -//@source:coco12.cpp +@source:coco12.cpp coco // Color Computer coco2 // Color Computer 2 coco2b // Color Computer 2B (uses M6847T1 video chip) @@ -9229,19 +9229,19 @@ cp400 // Prologica CP400 lzcolor64 // Digiponto LZ Color64 mx1600 // Dynacom MX-1600 -//@source:coco3.cpp +@source:coco3.cpp coco3 // Color Computer 3 (NTSC) coco3dw1 // Coco 3 with HDB-DOS coco3h // Hacked Color Computer 3 (6309) coco3p // Color Computer 3 (PAL) -//@source:cocoloco.cpp +@source:cocoloco.cpp cocoloco // 198?, Petaco S.A. -//@source:codata.cpp +@source:codata.cpp codata // -//@source:coinmstr.cpp +@source:coinmstr.cpp jpcoin // (c) 19?? Coinmaster jpcoin2 // (c) 19?? Coinmaster pokeroul // (c) 1990 Coinmaster @@ -9249,14 +9249,14 @@ quizmstr // (c) 1985 Coinmaster supnudg2 // (c) 1989 Coinmaster trailblz // (c) 1987 Coinmaster -//@source:coinmvga.cpp +@source:coinmvga.cpp cmkenosp // (c) 2000 Coinmaster-Gaming, Ltd. cmkenospa // (c) 2000 Coinmaster-Gaming, Ltd. cmrltv75 // (c) 2001 Coinmaster-Gaming, Ltd. colorama // (c) 2000 Coinmaster-Gaming, Ltd. coloramas // (c) 2000 Coinmaster-Gaming, Ltd. -//@source:coleco.cpp +@source:coleco.cpp coleco // ColecoVision (Original BIOS) colecop // Colecovision PAL (Italy) czz50 // Bit Corporation Chuang Zao Zhe 50 @@ -9265,7 +9265,7 @@ onyx // Microdigital ONYX (Brazilian Coleco clone / u prsarcde // Telegames Personal Arcade svi603 // Spectravideo SVI-603 Coleco Game Adapter -//@source:combatsc.cpp +@source:combatsc.cpp bootcamp // GX611 (c) 1987 bootcampa // GX611 (c) 1987 combatsc // GX611 (c) 1988 @@ -9273,10 +9273,10 @@ combatscb // bootleg combatscj // GX611 (c) 1987 (Japan) combatsct // GX611 (c) 1987 -//@source:comebaby.cpp +@source:comebaby.cpp comebaby // (c) 2000 ExPotato -//@source:commando.cpp +@source:commando.cpp commando // 5/1985 (c) 1985 (World) commandob // bootleg commandob2 // bootleg 2 @@ -9286,28 +9286,28 @@ commandou2 // 5/1985 (c) 1985 + Data East license (US) sinvasn // Europe original? sinvasnb // bootleg -//@source:compgolf.cpp +@source:compgolf.cpp compgolf // (c) 1985 Data East Corporation (Japan) compgolfo // (c) 1985 Data East Corporation (Japan) -//@source:compis.cpp +@source:compis.cpp compis // 1985 Telenova Compis compis2 // 1985 Telenova Compis -//@source:compucolor.cpp +@source:compucolor.cpp compclr2 // -//@source:comquest.cpp +@source:comquest.cpp comquest // Comquest Plus German -//@source:comx35.cpp +@source:comx35.cpp comx35n // comx35p // -//@source:concept.cpp +@source:concept.cpp concept // 1982 Corvus Concept -//@source:contra.cpp +@source:contra.cpp contra // GX633 (c) 1987 contra1 // GX633 (c) 1987 contrab // bootleg @@ -9319,7 +9319,7 @@ contraj1 // GX633 (c) 1987 (Japan) gryzor // GX633 (c) 1987 gryzor1 // GX633 (c) 1987 -//@source:coolpool.cpp +@source:coolpool.cpp 9ballsht // (c) 1993 E-Scape EnterMedia + "marketed by Bundra Games" 9ballsht2 // (c) 1993 E-Scape EnterMedia + "marketed by Bundra Games" 9ballsht3 // (c) 1993 E-Scape EnterMedia + "marketed by Bundra Games" @@ -9329,24 +9329,24 @@ amerdart2 // (c) 1989 Ameri Corporation amerdart3 // (c) 1989 Ameri Corporation coolpool // (c) 1992 Catalina Games -//@source:coolridr.cpp +@source:coolridr.cpp aquastge // coolridr // 1995.04 Cool Riders -//@source:cop01.cpp +@source:cop01.cpp cop01 // (c) 1985 cop01a // (c) 1985 mightguy // (c) 1986 -//@source:cops.cpp +@source:cops.cpp cops // (c) 1994 copsuk // (c) 1994 (Nova/Deith Leisure) revlatns // (c) 199? -//@source:copsnrob.cpp +@source:copsnrob.cpp copsnrob // 005625 1976/07 [6502] -//@source:corona.cpp +@source:corona.cpp luckyrlt // (c) 1990 unknown rcirulet // (c) 199? Entretenimientos GEMINIS re800ea // (c) 1991 Entretenimientos GEMINIS @@ -9356,10 +9356,10 @@ winner81 // (c) 1981 Corona Co, Ltd. winner81b // (c) 1981 Corona Co, Ltd. winner82 // (c) 1982 Corona Co, Ltd. -//@source:cortex.cpp +@source:cortex.cpp cortex // -//@source:cosmic.cpp +@source:cosmic.cpp cosmica // 7910-AII (c) [1979] cosmica1 // 7910-A (c) [1979] cosmica2 // 7910 (c) 1979 @@ -9377,13 +9377,13 @@ panic3 // 8015 (c) 1980 panicger // 8015 (c) 1980 panich // 8015 (c) 1980 -//@source:cosmicos.cpp +@source:cosmicos.cpp cosmicos // -//@source:cp1.cpp +@source:cp1.cpp cp1 // -//@source:cps1.cpp +@source:cps1.cpp 1941 // 27/02/1990 (c) 1990 (World) 1941j // 2/1990 (c) 1990 (Japan) 1941r1 // 2/1990 (c) 1990 (World) @@ -9573,7 +9573,7 @@ wofr1 // 02/10/1992 (c) 1992 (World) (CPS1 + QSound) wofu // 31/10/1992 (c) 1992 (USA) (CPS1 + QSound) wonder3 // 20/05/1991 (c) 1991 (Japan) -//@source:cps2.cpp +@source:cps2.cpp 1944 // 20/06/2000 (c) 2000 Eighting/Raizing (USA) 1944d // 1944j // 20/06/2000 (c) 2000 Eighting/Raizing (Japan) @@ -9872,7 +9872,7 @@ xmvsfu1d // xmvsfur1 // 04/10/1996 (c) 1996 (USA) xmvsfur2 // 10/09/1996 (c) 1996 (USA) -//@source:cps3.cpp +@source:cps3.cpp cps3boot // bootleg cps3boota // bootleg cps3bootao // bootleg @@ -9917,14 +9917,14 @@ sfiiiu // 04/02/1997 (c) 1997 (USA) warzard // 21/11/1996 (c) 1996 (Japan) warzardr1 // 23/10/1996 (c) 1996 (Japan) -//@source:craft.cpp +@source:craft.cpp craft // Craft, by [lft] -//@source:crbaloon.cpp +@source:crbaloon.cpp crbaloon // CL (c) 1980 Taito Corporation crbaloon2 // CL (c) 1980 Taito Corporation -//@source:crgolf.cpp +@source:crgolf.cpp crgolf // (c) 1984 Nasco Japan crgolfa // (c) 1984 Nasco Japan crgolfb // (c) 1984 Nasco Japan @@ -9932,21 +9932,21 @@ crgolfbt // bootleg crgolfc // (c) 1984 Nasco Japan crgolfhi // (c) 1984 Nasco Japan -//@source:crimfght.cpp +@source:crimfght.cpp crimfght // GX821 (c) 1989 (US) crimfght2 // GX821 (c) 1989 (World) crimfghtj // GX821 (c) 1989 (Japan) -//@source:crospang.cpp +@source:crospang.cpp bestri // (c) F2 System crospang // (c) 1998 F2 System heuksun // (c) 1998 Oksan / F2 System -//@source:crshrace.cpp +@source:crshrace.cpp crshrace // (c) 1993 Video System Co. crshrace2 // (c) 1993 Video System Co. -//@source:crvision.cpp +@source:crvision.cpp crvisio2 // crvisioj // crvision // 1981 creatiVision @@ -9956,7 +9956,7 @@ rameses // vz2000 // wizzard // -//@source:crystal.cpp +@source:crystal.cpp crysbios // crysking // 2001 Brezzasoft. Crystal of the kings ddz // (c) 200? @@ -9967,11 +9967,11 @@ psattack // 2004 Uniana topbladv // 2002 Sonokong. Top Blade V trivrus // 2009 AGT. Trivia R Us -//@source:cshooter.cpp +@source:cshooter.cpp airraid // (c) 1987 Seibu Kaihatsu cshootere // (c) 1987 JKH (bootleg) -//@source:csplayh5.cpp +@source:csplayh5.cpp bikiniko // (c) 1999 csplayh1 // (c) 1995 csplayh5 // (c) 1998 @@ -9982,17 +9982,17 @@ junai2 // (c) 1998 mjmania // (c) 1999 thenanpa // (c) 1999 -//@source:cswat.cpp +@source:cswat.cpp cswat // (c) 1984 -//@source:ct486.cpp +@source:ct486.cpp ct486 // 1993? 486 with CS4031 -//@source:cubeqst.cpp +@source:cubeqst.cpp cubeqst // (c) 1983 Simutrek Inc. cubeqsta // (c) 1983 Simutrek Inc. -//@source:cubo.cpp +@source:cubo.cpp cndypuzl // (c) 1995 cubo // Base unit haremchl // (c) 1995 @@ -10003,10 +10003,10 @@ mgnumber // (c) 1995 mgprem11 // (c) 1995 odeontw2 // (c) 1999 -//@source:cultures.cpp +@source:cultures.cpp cultures // (c) 1994 Face -//@source:cupidon.cpp +@source:cupidon.cpp cashtrn // funnyfm // funnyfma // @@ -10015,7 +10015,7 @@ gangrose // tsarevna // tsarevnaa // -//@source:cv1k.cpp +@source:cv1k.cpp ddpdfk // (c) 2008 Cave (AMI license) - 2008/06/23 MASTER VER 1.5 ddpdfk10 // (c) 2008 Cave (AMI license) - 2008/05/16 MASTER VER deathsml // (c) 2007 Cave (AMI license) - 2007/10/09 MASTER VER @@ -10042,10 +10042,10 @@ pinkswtsa // (c) 2006 Cave (AMI license) - 2006/04/06 MAST pinkswtsb // (c) 2006 Cave (AMI license) - 2006/04/06 MASTER VER. pinkswtsx // (c) 2006 Cave (AMI license) - 2006/xx/xx MASTER VER. -//@source:cvicny.cpp +@source:cvicny.cpp cvicny // -//@source:cvs.cpp +@source:cvs.cpp 8ball // (c) 1982 Century 8ball1 // (c) 1982 Century cosmos // (c) 1981 Century @@ -10069,10 +10069,10 @@ spacefrt // (c) 1981 Century superbik // (c) 1983 Century wallst // (c) 1982 Century -//@source:cxhumax.cpp +@source:cxhumax.cpp hxhdci2k // -//@source:cyberbal.cpp +@source:cyberbal.cpp cyberbal // 136064 (c) 1989 cyberbal2 // 136064 (c) 1989 cyberbal2p // 136071 (c) 1989 @@ -10083,67 +10083,67 @@ cyberbalp // 136064 (c) 1989 cyberbalt // 136073 (c) 1989 cyberbalt1 // 136073 (c) 1989 -//@source:cybertnk.cpp +@source:cybertnk.cpp cybertnk // (c) 1990 Coreland -//@source:cybiko.cpp +@source:cybiko.cpp cybikov1 // Cybiko Wireless Intertainment System - Classic V1 cybikov2 // Cybiko Wireless Intertainment System - Classic V2 cybikoxt // Cybiko Wireless Intertainment System - Xtreme -//@source:cyclemb.cpp +@source:cyclemb.cpp cyclemb // P0 (c) 1984 Taito Corporation [+ Seta] skydest // PD0 (c) 1985 Taito Corporation -//@source:czk80.cpp +@source:czk80.cpp czk80 // -//@source:d6800.cpp +@source:d6800.cpp d6800 // Dream 6800 -//@source:d6809.cpp +@source:d6809.cpp d6809 // -//@source:d9final.cpp +@source:d9final.cpp d9final // (c) 1992 Excellent System -//@source:dacholer.cpp +@source:dacholer.cpp dacholer // (c) 1983 itaten // (c) 1984 + Alice kickboy // (c) 1983 -//@source:dai.cpp +@source:dai.cpp dai // DAI -//@source:dai3wksi.cpp +@source:dai3wksi.cpp dai3wksi // 1979.09 Dai San Wakusei (The Third Planet) -//@source:dambustr.cpp +@source:dambustr.cpp dambustr // (c) 1981 South West Research dambustra // (c) 1981 South West Research dambustruk // (c) 1981 South West Research -//@source:darius.cpp +@source:darius.cpp darius // A96 (c) 1986 Taito Corporation Japan (World) dariuse // A96 (c) 1986 Taito Corporation (Japan) dariusj // A96 (c) 1986 Taito Corporation (Japan) dariuso // A96 (c) 1986 Taito Corporation (Japan) dariusu // A96 (c) 1986 Taito America Corporation (US) -//@source:darkmist.cpp +@source:darkmist.cpp darkmist // (c) 1986 Taito -//@source:darkseal.cpp +@source:darkseal.cpp darkseal // MAC (c) 1990 Data East Corporation (World) darkseal1 // MAC (c) 1990 Data East Corporation (World) darksealj // MAC (c) 1990 Data East Corporation (Japan) gatedoom // MAC (c) 1990 Data East Corporation (US) gatedoom1 // MAC (c) 1990 Data East Corporation (US) -//@source:daruma.cpp +@source:daruma.cpp ds348 // Sigtron Daruma -//@source:dassault.cpp +@source:dassault.cpp dassault // MAJ (c) 1991 Data East Corporation (US) dassault4 // MAJ (c) 1991 Data East Corporation (US) - 4 Player only thndzone // MAJ (c) 1991 Data East Corporation (World) - Rev 1 @@ -10151,24 +10151,24 @@ thndzone4 // MAJ (c) 1991 Data East Corporation (World) - thndzonea // MAJ (c) 1991 Data East Corporation (World) thndzonej // MAJ (c) 1991 Data East Corporation (Japan) - Some MASK ROMS stamped MAL -//@source:dblcrown.cpp +@source:dblcrown.cpp dblcrown // (c) 1994 Excellent System -//@source:dblewing.cpp +@source:dblewing.cpp dblewing // MBE (c) 1993 Mitchell -//@source:dbz.cpp +@source:dbz.cpp dbz // (c) 1993 Banpresto dbz2 // (c) 1994 Banpresto dbza // (c) 1993 Banpresto -//@source:dccons.cpp +@source:dccons.cpp dc // 1999 Sega Dreamcast (USA) dcdev // 1998 Sega HKT-0120 Sega Dreamcast Development Box dceu // 1999 Sega Dreamcast (Europe) dcjp // 1998 Sega Dreamcast (Japan) -//@source:dcheese.cpp +@source:dcheese.cpp cecmatch // (c) 1993 Coastal Amusements dcheese // (c) 1993 HAR fredmem // (c) 1994 Coastal Amusements @@ -10179,25 +10179,25 @@ fredmemus // (c) 1994 Coastal Amusements fredmesp // (c) 1994 Coastal Amusements lottof2 // (c) 1993 HAR -//@source:dcon.cpp +@source:dcon.cpp dcon // (c) 1992 Success. sdgndmps // (c) Banpresto / Bandai (Japan) -//@source:dct11em.cpp +@source:dct11em.cpp dct11em // -//@source:dday.cpp +@source:dday.cpp dday // (c) 1982 Olympia ddayc // (c) 1982 Olympia + Centuri license -//@source:ddayjlc.cpp +@source:ddayjlc.cpp ddayjlc // (c) 1984 Jaleco ddayjlca // (c) 1984 Jaleco -//@source:ddealer.cpp +@source:ddealer.cpp ddealer // (c) 1991 NMK -//@source:ddenlovr.cpp +@source:ddenlovr.cpp akamaru // "501" (c) 1996 Dynax animaljr // "75" (c) 1993 Nakanihon/Taito (USA) animaljrj // "75" (c) 1993 Nakanihon/Taito (Japan) @@ -10247,7 +10247,7 @@ sryudens // "502" (c) 1996 Dynax / Face ultrchmp // "104" (c) 1995 Nakanihon ultrchmph // "114" (c) 1995 Nakanihon -//@source:ddragon.cpp +@source:ddragon.cpp darktowr // Game Room ddragon // TA-0021 (c) 1987 ddragon2 // TA-0026 (c) 1988 (World) @@ -10272,7 +10272,7 @@ toffy // (c) 1993 Midas tstrike // East Coast Coin Company (Melbourne) tstrikea // Game Room -//@source:ddragon3.cpp +@source:ddragon3.cpp ctribe // TA-0028 (c) 1990 (US) ctribe1 // TA-0028 (c) 1990 (US) ctribeb // bootleg @@ -10289,11 +10289,11 @@ wwfwfestb // bootleg wwfwfestj // TA-0031 (c) 1991 (Japan) wwfwfestk // TA-0031 (c) 1991 (Korea) -//@source:ddribble.cpp +@source:ddribble.cpp ddribble // GX690 (c) 1986 ddribblep // GX690 (c) 1986 -//@source:de_2.cpp +@source:de_2.cpp bttf_a20 // bttf_a21 // bttf_a27 // @@ -10312,7 +10312,7 @@ tmac_a18 // tmac_a24 // torp_e21 // -//@source:de_3.cpp +@source:de_3.cpp aar_101 // btmn_101 // btmn_103 // @@ -10360,7 +10360,7 @@ trek_201 // wwfr_103 // wwfr_106 // -//@source:de_3b.cpp +@source:de_3b.cpp batmanf // batmanf3 // bay_e400 // @@ -10388,13 +10388,13 @@ mav_400 // mav_401 // mav_402 // -//@source:deadang.cpp +@source:deadang.cpp deadang // (c) 1988 Seibu Kaihatsu ghunter // (c) 1988 Seibu Kaihatsu ghunters // (c) 1988 Seibu Kaihatsu + Segasa/Sonic license leadang // (c) 1988 Seibu Kaihatsu -//@source:dec0.cpp +@source:dec0.cpp automat // bootleg baddudes // EI (c) 1988 Data East USA (US) birdtry // (c) 1988 Data East Corporation (Japan) @@ -10427,7 +10427,7 @@ slyspy // (c) 1989 Data East USA (US) slyspy2 // (c) 1989 Data East USA (US) slyspy3 // (c) 1989 Data East USA (US) -//@source:dec8.cpp +@source:dec8.cpp breywood // (c) 1986 Data East Corporation (Japan) cobracom // (c) 1988 Data East Corporation (World) cobracomj // (c) 1988 Data East Corporation (Japan) @@ -10452,14 +10452,14 @@ shackled // (c) 1986 Data East USA (US) srdarwin // (c) 1987 Data East Corporation (World) srdarwinj // (c) 1987 Data East Corporation (Japan) -//@source:deco_ld.cpp +@source:deco_ld.cpp begas // (c) 1983 begas1 // (c) 1983 cobra // (c) 1984 cobraa // rblaster // (c) 1985 -//@source:deco_mlc.cpp +@source:deco_mlc.cpp avengrgs // MCG (c) 1995 Data East Corporation (World) avengrgsj // MCG (c) 1995 Data East Corporation (Japan) ddream95 // MCE (c) 1996 Data East Corporation @@ -10471,14 +10471,14 @@ stadhr96 // MCM (c) 1996 Data East Corporation (World) stadhr96j // MCM (c) 1996 Data East Corporation (Japan) stadhr96u // MCM (c) 1996 Data East Corporation (USA) -//@source:deco156.cpp +@source:deco156.cpp hvysmsh // MBG (c) 1993 Data East Corporation (World) hvysmsha // MBG (c) 1993 Data East Corporation (Asia) hvysmshj // MBG (c) 1993 Data East Corporation (Japan) wcvol95 // MBX (c) 1993 Data East wcvol95x // ? -//@source:deco32.cpp +@source:deco32.cpp captaven // MAN (c) 1991 Data East Corporation (Asia) captavena // MAN (c) 1991 Data East Corporation (Asia) captavene // MAN (c) 1991 Data East Corporation (UK) @@ -10508,7 +10508,7 @@ nslasheru // MBH (c) 1993 Data East Corporation (US) tattass // prototype (c) 1994 Data East Pinball (US) tattassa // prototype (c) 1994 Data East Pinball (Asia) -//@source:decocass.cpp +@source:decocass.cpp cadanglr // 25 1982.10 Angler Dangler castfant // 07 1981.02 Astro Fantasia cbdash // 44 1985.08 Boulder Dash @@ -10559,32 +10559,32 @@ ctsttape // ? czeroize // 37 1983.10 Zeroize decocass // -//@source:dectalk.cpp +@source:dectalk.cpp dectalk // 1983 Digital Equipment Corporation -//@source:decwritr.cpp +@source:decwritr.cpp la120 // 1978 Digital Equipment Corporation -//@source:deniam.cpp +@source:deniam.cpp croquis // (c) 1996 Deniam (Germany) karianx // (c) 1996 Deniam logicpr2 // (c) 1997 Deniam (Japan) logicpro // (c) 1996 Deniam -//@source:deshoros.cpp +@source:deshoros.cpp destiny // (c) 1983 -//@source:destroyr.cpp +@source:destroyr.cpp destroyr // 030131-030136 1977/10 [6800] destroyr1 // 030131-030136 1977/10 [6800] -//@source:dfruit.cpp +@source:dfruit.cpp dfruit // -//@source:dgn_beta.cpp +@source:dgn_beta.cpp dgnbeta // Dragon Beta -//@source:dgpix.cpp +@source:dgpix.cpp elfin // (c) 1999 dgPIX Entertainment Inc fmaniac3 // (c) 2002 Saero Entertainment jumpjump // (c) 1999 dgPIX Entertainment Inc @@ -10592,36 +10592,36 @@ kdynastg // (c) 1999 EZ Graphics xfiles // (c) 1999 dgPIX Entertainment Inc xfilesk // (c) 1999 dgPIX Entertainment Inc (censored for the Korean market) -//@source:didact.cpp +@source:didact.cpp md6802 // mp68a // -//@source:dietgo.cpp +@source:dietgo.cpp dietgo // MAY (c) 1993 dietgoe // MAY (c) 1993 dietgoj // MAY (c) 1993 dietgou // MAY (c) 1993 -//@source:digel804.cpp +@source:digel804.cpp digel804 // ep804 // -//@source:dim68k.cpp +@source:dim68k.cpp dim68k // -//@source:discoboy.cpp +@source:discoboy.cpp discoboy // (c) 1993 Soft Art Co. discoboyp // (c) 1993 Soft Art Co. (Promat license?) -//@source:diverboy.cpp +@source:diverboy.cpp diverboy // (c) 1992 Electronic Devices -//@source:djboy.cpp +@source:djboy.cpp djboy // (c) 1989 Kaneko djboya // (c) 1989 Kaneko djboyj // (c) 1989 Kaneko -//@source:djmain.cpp +@source:djmain.cpp bm1stmix // GQ753 (c) 1997 (Japan) bm2ndmix // GX853 (c) 1998 (Japan) bm2ndmxa // GX853 (c) 1998 (Japan) @@ -10642,7 +10642,7 @@ popn1 // GX803 (c) 1998 (Asia) popn2 // GX831 (c) 1998 (Japan) popn3 // GX980 (c) 1999 (Japan) -//@source:dkong.cpp +@source:dkong.cpp 8ballact // (c) 1984 Seatongrove Ltd (Magic Eletronics USA license) 8ballact2 // (c) 1984 Seatongrove Ltd (Magic Eletronics USA license) dkingjr // bootleg @@ -10681,7 +10681,7 @@ spcfrcii // (c) 1985 Senko Industries (Magic Eletronics I spclforc // (c) 1985 Senko Industries (Magic Eletronics Inc. license) strtheat // (c) 1985 Epos Corporation -//@source:dlair.cpp +@source:dlair.cpp dlair // (c) 1983 Cinematronics dlair_1 // (c) 1983 Cinematronics dlair_2 // (c) 1983 Cinematronics @@ -10699,7 +10699,7 @@ spaceacea // (c) 1983 Cinematronics spaceacea2 // (c) 1983 Cinematronics spaceaceeuro // (c) 1983 Atari -//@source:dlair2.cpp +@source:dlair2.cpp dlair2 // (c) 1991 Leland dlair2_200 // (c) 1991 Leland dlair2_211 // (c) 1991 Leland @@ -10716,25 +10716,25 @@ dlair2_319s // (c) 1991 Leland spacea91 // (c) 1991 Leland spacea91_13e // (c) 1991 Leland -//@source:dm7000.cpp +@source:dm7000.cpp dm500 // dm5620 // dm7000 // -//@source:dmndrby.cpp +@source:dmndrby.cpp dmndrby // G4001 'DD' (c) 1986 dmndrbya // G4001 'DD' (c) 1986 -//@source:dms5000.cpp +@source:dms5000.cpp dms5000 // -//@source:dms86.cpp +@source:dms86.cpp dms86 // -//@source:dmv.cpp +@source:dmv.cpp dmv // -//@source:docastle.cpp +@source:docastle.cpp asoccer // 8461 (c) 1987 docastle // 8302 (c) 1983 docastle2 // 8302 (c) 1983 @@ -10751,19 +10751,19 @@ jjack // ???? (c) 1984 kickridr // ???? (c) 1984 spiero // ???? (c) 1987 -//@source:dogfgt.cpp +@source:dogfgt.cpp dogfgt // TA-0011 (c) 1984 dogfgtj // TA-0011 (c) 1984 dogfgtu // TA-0011 (c) 1985 Data East USA, Inc. -//@source:dolphunk.cpp +@source:dolphunk.cpp dauphin // -//@source:dominob.cpp +@source:dominob.cpp dominob // (c) 1996 Wonwoo Systems dominobv2 // (c) 1996 Wonwoo Systems -//@source:dooyong.cpp +@source:dooyong.cpp bluehawk // (c) 1993 Dooyong bluehawkn // (c) 1993 NTC ddaydoo // (c) 1990 Dooyong @@ -10787,17 +10787,17 @@ sadari // (c) 1993 NTC superx // (c) 1994 NTC superxm // (c) 1994 Mitchell -//@source:dorachan.cpp +@source:dorachan.cpp dorachan // (c) 1980 Craul Denshi -//@source:dotrikun.cpp +@source:dotrikun.cpp dotrikun // cabinet test board dotrikun2 // cabinet test board -//@source:dps1.cpp +@source:dps1.cpp dps1 // -//@source:dragon.cpp +@source:dragon.cpp d64plus // Dragon 64 + Compusense Plus addon dgnalpha // Dragon Alpha dragon200 // Dragon 200 @@ -10806,13 +10806,13 @@ dragon32 // Dragon 32 dragon64 // Dragon 64 tanodr64 // Tano Dragon 64 (NTSC) -//@source:dragrace.cpp +@source:dragrace.cpp dragrace // 008505-008521 1977/06 [6800] -//@source:dreambal.cpp +@source:dreambal.cpp dreambal // MM -//@source:dreamwld.cpp +@source:dreamwld.cpp baryon // (c) 1997 SemiCom baryona // (c) 1997 SemiCom cutefght // (c) 1998 SemiCom @@ -10820,41 +10820,41 @@ dreamwld // (c) 2000 SemiCom gaialast // (c) 1999 SemiCom rolcrush // (c) 1999 Trust -//@source:drgnmst.cpp +@source:drgnmst.cpp drgnmst // (c) 1994 -//@source:dribling.cpp +@source:dribling.cpp dribling // (c) 1983 Model Racing driblingbr // bootleg driblingo // (c) 1983 Olympia -//@source:drmicro.cpp +@source:drmicro.cpp drmicro // (c) 1983 Sanritsu -//@source:drtomy.cpp +@source:drtomy.cpp drtomy // (c) 1993 no copyright message (1993 on pcb), some code taken from 'Big Karnak' -//@source:drw80pkr.cpp +@source:drw80pkr.cpp drw80pk2 // (c) 1983 IGT drw80pkr // (c) 1982 IGT -//@source:dsb46.cpp +@source:dsb46.cpp dsb46 // -//@source:dual68.cpp +@source:dual68.cpp dual68 // -//@source:dunhuang.cpp +@source:dunhuang.cpp dunhuang // (c) 1995 -//@source:dvk_kcgd.cpp +@source:dvk_kcgd.cpp dvk_kcgd // -//@source:dvk_ksm.cpp +@source:dvk_ksm.cpp dvk_ksm // dvk_ksm01 // -//@source:dwarfd.cpp +@source:dwarfd.cpp dwarfd // (c) 198? Electro-Sports dwarfda // (c) 198? Electro-Sports qc // (c) 1995 ArJay Exports/Prestige Games @@ -10862,10 +10862,10 @@ quarterh // (c) 1983 Electro-Sports quarterha // (c) 1983 Electro-Sports quarterhb // (c) 1983 Electro-Sports -//@source:dynadice.cpp +@source:dynadice.cpp dynadice // ? -//@source:dynax.cpp +@source:dynax.cpp 7jigen // "37" 7jigen no Youseitachi 1990 Dynax blktouch // (c) Yang Gi Co Ltd. cdracula // (c) 1994 Y.S.E. @@ -10912,7 +10912,7 @@ tenkaicb // (c) 1991 bootleg tenkaie // (c) 1991 Dynax yarunara // "55" Mahjong Yarunara 1991 Dynax -//@source:dynduke.cpp +@source:dynduke.cpp dbldynj // (c) 1989 Seibu Kaihatsu dbldynu // (c) 1989 Seibu Kaihatsu + Fabtek license dynduke // (c) 1989 Seibu Kaihatsu @@ -10920,20 +10920,20 @@ dyndukea // (c) 1989 Seibu Kaihatsu dyndukej // (c) 1989 Seibu Kaihatsu dyndukeu // (c) 1989 Seibu Kaihatsu + Fabtek license -//@source:eacc.cpp +@source:eacc.cpp eacc // -//@source:ec184x.cpp +@source:ec184x.cpp ec1840 // ec1841 // ec1845 // ec1847 // -//@source:ec65.cpp +@source:ec65.cpp ec65 // ec65k // -//@source:ecoinf1.cpp +@source:ecoinf1.cpp ec_bar5 // Bar 5 (older PCB) (Electrocoin) ec_barxo // Bar X (older PCB) (Electrocoin) ec_barxoa // @@ -10944,7 +10944,7 @@ ec_barxoe // ec_casbxo // Casino Bar X (older PCB) (Electrocoin) ec_casbxoa // -//@source:ecoinf2.cpp +@source:ecoinf2.cpp ec_oxocg // Oxo Classic Gold (Electrocoin) ec_oxocl // Oxo Club (Electrocoin) ec_oxogb // Oxo Golden Bars (Electrocoin) @@ -10955,7 +10955,7 @@ ec_sumnc // Casino Super Multi Nudger (Concept/Electrocoi ec_sumnd // Super Multi Nudger (Concept/Electrocoin) ec_suprl // Super Reels (Electrocoin) -//@source:ecoinf3.cpp +@source:ecoinf3.cpp ec_laby // Labyrinth (Electrocoin) ec_labya // ec_penni // Pennies From Heaven (Electrocoin) @@ -10969,7 +10969,7 @@ ec_sphinb // ec_stair // Stairway to Heaven ec_staira // -//@source:ecoinfr.cpp +@source:ecoinfr.cpp ec_bar7 // Bar 7 (Concept) ec_barx // Bar X (Electrocoin) ec_barx__0 // @@ -11410,44 +11410,44 @@ ec_unk5__b // ec_unk5__c // ec_unkt // Unknown 'T' (MAB PCB) (Concept - Electrocoin) -//@source:egghunt.cpp +@source:egghunt.cpp egghunt // (c) 1995 Invi Image -//@source:einstein.cpp +@source:einstein.cpp einst256 // einstei2 // einstein // -//@source:elecbowl.cpp +@source:elecbowl.cpp elecbowl // Marx -//@source:electra.cpp +@source:electra.cpp avenger // (c) 1975 Electra -//@source:electron.cpp +@source:electron.cpp electron // 1983 Acorn Electron -//@source:elekscmp.cpp +@source:elekscmp.cpp elekscmp // -//@source:elf.cpp +@source:elf.cpp elf2 // -//@source:elwro800.cpp +@source:elwro800.cpp elwro800 // -//@source:embargo.cpp +@source:embargo.cpp embargo // -//@source:enigma2.cpp +@source:enigma2.cpp enigma2 // (c) 1981 Game Plan (Zilec Electronics license) enigma2a // (c) 1984 Zilec Electronics (bootleg?) enigma2b // (c) 1981 Zilec Electronics -//@source:enmirage.cpp +@source:enmirage.cpp enmirage // 1985 Mirage Digital Multi-Sampler -//@source:eolith.cpp +@source:eolith.cpp candy // (c) 1999 Eolith fort2b // (c) 2001 Eolith fort2ba // (c) 2001 Eolith @@ -11468,15 +11468,15 @@ puzzlekg // (c) 1998 Eolith raccoon // (c) 1999 Eolith stealsee // (c) 2000 Moov Generation / Eolith -//@source:eolith16.cpp +@source:eolith16.cpp klondkp // (c) 1999 Eolith -//@source:ep64.cpp +@source:ep64.cpp ep128 // Enterprise 128 ep64 // Enterprise 64 phc64 // Hegener & Glaser Mephisto PHC 64 -//@source:epos.cpp +@source:epos.cpp catapult // (c) 1982 dealer // (c) 198? igmo // (c) 1984 @@ -11487,14 +11487,14 @@ theglob // (c) 1983 theglob2 // (c) 1983 theglob3 // (c) 1983 -//@source:eprom.cpp +@source:eprom.cpp eprom // 136069 (c) 1989 eprom2 // 136069 (c) 1989 guts // prototype klaxp1 // prototype klaxp2 // prototype -//@source:equites.cpp +@source:equites.cpp bullfgtr // (c) 1984 Alpha Denshi Co. bullfgtrs // (c) 1984 Alpha Denshi Co./Sega equites // (c) 1984 Alpha Denshi Co. @@ -11504,13 +11504,13 @@ hvoltage // (c) 1985 Alpha Denshi Co. kouyakyu // (c) 1985 Alpha Denshi Co. splndrbt // (c) 1985 Alpha Denshi Co. -//@source:ertictac.cpp +@source:ertictac.cpp ertictac // (c) 1992 Sisteme ertictaca // (c) 1992 Sisteme ertictacb // (c) 1992 Sisteme poizone // (c) 1990 Sisteme -//@source:esd16.cpp +@source:esd16.cpp deluxe5 // (c) 2000 ESD deluxe5a // (c) 2000 ESD deluxe5b // (c) 2000 ESD @@ -11528,22 +11528,22 @@ multchmpk // (c) 1998 (Korea) swatpolc // (c) 2001 ESD tangtang // (c) 2000 ESD -//@source:esh.cpp +@source:esh.cpp esh // (c) 1984 Funai / Gakken esha // (c) 1984 Funai / Gakken eshb // (c) 1984 Funai / Gakken -//@source:espial.cpp +@source:espial.cpp espial // (c) 1983 Thunderbolt, Orca logo is hidden in title screen espialu // (c) 1983 Thunderbolt, Orca logo is hidden in title screen netwars // (c) 1983 Orca + Esco Trading Co license -//@source:esq1.cpp +@source:esq1.cpp esq1 // 1986 ESQ-1 Digital Wave Synthesizer esqm // 1986 ESQ-M rack-mount ESQ-1 sq80 // 1988 SQ-80 Digital Wave Synthesizer -//@source:esq5505.cpp +@source:esq5505.cpp eps // 1988 EPS eps16p // 1990 EPS 16 Plus sd1 // 1990 SD-1 @@ -11553,58 +11553,58 @@ sqrack // 1990 SQ-Rack vfx // 1989 VFX vfxsd // 1989 VFX-SD -//@source:esqasr.cpp +@source:esqasr.cpp asr10 // 1992 ASR-10 asrx // 1997 ASR-X -//@source:esqkt.cpp +@source:esqkt.cpp kt76 // 1996 KT-76 -//@source:esqmr.cpp +@source:esqmr.cpp mr61 // 1996 MR-61 mrrack // 1996 MR-Rack -//@source:esripsys.cpp +@source:esripsys.cpp turbosub // (c) 1985 Entertainment Sciences turbosub6 // (c) 1985 Entertainment Sciences turbosub7 // (c) 1985 Entertainment Sciences -//@source:et3400.cpp +@source:et3400.cpp et3400 // -//@source:eti660.cpp +@source:eti660.cpp eti660 // -//@source:ettrivia.cpp +@source:ettrivia.cpp promutrv // (c) 1985 Enerdyne Technologies Inc promutrva // (c) 1985 Enerdyne Technologies Inc promutrvb // (c) 1985 Enerdyne Technologies Inc promutrvc // (c) 1985 Enerdyne Technologies Inc strvmstr // (c) 1986 Enerdyne Technologies Inc -//@source:europc.cpp +@source:europc.cpp europc // 1988 Schneider Euro PC (CGA or Hercules) -//@source:evmbug.cpp +@source:evmbug.cpp evmbug // -//@source:excali64.cpp +@source:excali64.cpp excali64 // -//@source:exedexes.cpp +@source:exedexes.cpp exedexes // 2/1985 (c) 1985 savgbees // 2/1985 (c) 1985 + Memetron license -//@source:exelv.cpp +@source:exelv.cpp exeltel // exl100 // -//@source:exerion.cpp +@source:exerion.cpp exerion // (c) 1983 Jaleco exerionb // bootleg exeriont // (c) 1983 Jaleco + Taito America license -//@source:exidy.cpp +@source:exidy.cpp fax // (c) 1983 fax2 // (c) 1983 hardhat // (c) 1982 @@ -11629,7 +11629,7 @@ venture // (c) 1981 venture2 // (c) 1981 venture4 // (c) 1981 -//@source:exidy440.cpp +@source:exidy440.cpp catch22 // (c) 1985 cheyenne // (c) 1984 chiller // (c) 1986 @@ -11646,15 +11646,15 @@ whodunit8 // (c) 1988 yukon // (c) 1989 yukon1 // (c) 1989 -//@source:exidyttl.cpp +@source:exidyttl.cpp attckexd // (c) 1977 Exidy attckexd2 // (c) 1977 Exidy deathrac // (c) 1976 Exidy -//@source:exp85.cpp +@source:exp85.cpp exp85 // -//@source:expro02.cpp +@source:expro02.cpp fantasia // (c) 1994 Comad & New Japan System fantasiaa // (c) 1994 Comad & New Japan System fantasiab // (c) 1994 Comad & New Japan System @@ -11682,7 +11682,7 @@ supmodel // (c) 1994 Comad & New Japan System wownfant // (c) 2002 Comad zipzap // (c) 1995 Barko Corp -//@source:exprraid.cpp +@source:exprraid.cpp exprraid // (c) 1986 Data East Corporation exprraidi // (c) 1986 Data East Corporation PCB manufactured by Gecas under license exprraidu // (c) 1986 Data East USA (US) @@ -11691,10 +11691,10 @@ wexpressb1 // bootleg wexpressb2 // bootleg wexpressb3 // bootleg -//@source:exterm.cpp +@source:exterm.cpp exterm // (c) 1989 Premier Technology - a Gottlieb game -//@source:extrema.cpp +@source:extrema.cpp adults // Adults Only (Russia) bloto // Blits Loto (Russia) blpearl // Black Pearl (Russia) @@ -11706,38 +11706,38 @@ luckshel // Lucky Shell (Russia) maski // Maski Show (Russia) strlink // Strong Link (Russia) -//@source:exzisus.cpp +@source:exzisus.cpp exzisus // B12 (c) 1987 Taito Corporation (Japan) exzisusa // B23 (c) 1987 Taito Corporation (Japan) exzisust // B23 (c) 1987 TAD Corp (based on Japan Conversion) -//@source:f1gp.cpp +@source:f1gp.cpp f1gp // (c) 1991 Video System Co. f1gp2 // (c) 1992 Video System Co. f1gpb // bootleg -//@source:f-32.cpp +@source:f-32.cpp mosaicf2 // (c) 1999 F2 System royalpk2 // -//@source:famibox.cpp +@source:famibox.cpp famibox // 1986 -//@source:fantland.cpp +@source:fantland.cpp borntofi // (c) International Games? fantland // (c) 198? Electronic Devices Italy fantlanda // (c) 198? Electronic Devices Italy galaxygn // (c) 1989 Electronic Devices Italy wheelrun // (c) 1988? International Games -//@source:fanucs15.cpp +@source:fanucs15.cpp fanucs15 // 1990 -//@source:fanucspmg.cpp +@source:fanucspmg.cpp fanucspg // 1983 fanucspgm // 1983 -//@source:fastfred.cpp +@source:fastfred.cpp boggy84 // (c) 1984 Kaneko boggy84b // bootleg fastfred // 136009 (c) 1982 Atari @@ -11749,23 +11749,23 @@ jumpcoas // (c) 1983 Kaneko jumpcoast // (c) 1983 Taito redrobin // (c) 1986 Elettronolo -//@source:fastinvaders.cpp +@source:fastinvaders.cpp fi6845 // fi8275 // -//@source:fastlane.cpp +@source:fastlane.cpp fastlane // GX752 (c) 1987 -//@source:fb01.cpp +@source:fb01.cpp fb01 // 1986 FB-01 -//@source:fc100.cpp +@source:fc100.cpp fc100 // -//@source:fcombat.cpp +@source:fcombat.cpp fcombat // (c) 1985 Jaleco -//@source:fcrash.cpp +@source:fcrash.cpp cawingb2 // bootleg cawingbl // bootleg dinopic // bootleg @@ -11787,14 +11787,14 @@ sf2mdtb // bootleg sgyxz // bootleg (All-In Electronics) slampic // bootleg -//@source:feversoc.cpp +@source:feversoc.cpp feversoc // (c) 2004 -//@source:fgoal.cpp +@source:fgoal.cpp fgoal // TF (c) 1979 Taito Corporation fgoala // MF (c) 1979 Taito Corporation -//@source:fidel6502.cpp +@source:fidel6502.cpp csc // CSC: Champion Sensory Chess Challenger (English) cscfr // * French cscg // * German @@ -11803,13 +11803,13 @@ fexcel // fexcelv // fscc12 // -//@source:fidel68k.cpp +@source:fidel68k.cpp feagv10 // feagv11 // feagv2 // feagv7 // -//@source:fidelz80.cpp +@source:fidelz80.cpp bridgec3 // cc10 // cc7 // @@ -11827,14 +11827,14 @@ vscfr // * French vscg // * German vscsp // * Spanish -//@source:finalizr.cpp +@source:finalizr.cpp finalizr // GX523 (c) 1985 finalizrb // bootleg -//@source:fireball.cpp +@source:fireball.cpp fireball // -//@source:firebeat.cpp +@source:firebeat.cpp bm36th // GCA21 (c) 2001 (Japan) bm37th // GCB07 (c) 2002 (Japan JCA) bm3core // GCA05 (c) 2000 (Japan) @@ -11853,46 +11853,46 @@ ppp // GQ977 (c) 2000 (Japan) ppp11 // GQ977 (c) 2000 (Japan) ppp1mp // GQA11 (c) 2000 (Japan) -//@source:firefox.cpp +@source:firefox.cpp firefox // 136026 (c) 1984 firefoxa // 136026 (c) 1984 -//@source:firetrap.cpp +@source:firetrap.cpp firetrap // (c) 1986 Data East USA (US) firetrapa // (c) 1986 Data East USA (US) firetrapbl // bootleg firetrapj // (c) 1986 Wood Place Inc. (Japan) -//@source:firetrk.cpp +@source:firetrk.cpp firetrk // 030926 1978/06 [6808] montecar // 035763-035780 1980/04 [6502] superbug // 009115-009467 1977/09 [6800] -//@source:fitfight.cpp +@source:fitfight.cpp bbprot // unfinished prototype fitfight // bootleg of Art of Fighting histryma // bootleg of Fighter's History hotmindff // (c) Playmark -//@source:fk1.cpp +@source:fk1.cpp fk1 // -//@source:flicker.cpp +@source:flicker.cpp flicker // -//@source:flipjack.cpp +@source:flipjack.cpp flipjack // 1983? Jackson Co., Ltd. -//@source:flkatck.cpp +@source:flkatck.cpp flkatck // GX669 (c) 1987 (Japan) flkatcka // GX669 (c) 1987 (Japan) mx5000 // GX669 (c) 1987 -//@source:flower.cpp +@source:flower.cpp flower // (c) 1986 Komax license flowerj // 834-5998 (c) 1986 Sega / Alpha license? -//@source:flstory.cpp +@source:flstory.cpp flstory // A45 (c) 1985 Taito Corporation flstoryj // A45 (c) 1985 Taito Corporation (Japan) onna34ro // A52 (c) 1985 Taito Corporation (Japan) @@ -11900,11 +11900,11 @@ onna34roa // A52 (c) 1985 Taito Corporation (Japan) rumba // A23 (c) 1985 Taito Corporation (Japan) victnine // A16 (c) 1985 Taito Corporation (Japan) -//@source:flyball.cpp +@source:flyball.cpp flyball // 005629 1976/07 [6502] flyball1 // 005629 1976/07 [6502] -//@source:fm7.cpp +@source:fm7.cpp fm11 // 1982 FM-11 EX fm16beta // 1983 FM-16 Beta fm7 // @@ -11913,7 +11913,7 @@ fm77av // fm8 // 1981 fmnew7 // -//@source:fmtowns.cpp +@source:fmtowns.cpp carmarty // Fujitsu FM-Towns Car Marty fmtmarty // 1993 Fujitsu FM-Towns Marty fmtmarty2 // 1993 Fujitsu FM-Towns Marty 2 @@ -11925,32 +11925,32 @@ fmtownsmx // FM-Towns II MX fmtownssj // FM-Towns II SJ fmtownsux // 1991.11 FM-Towns II UX -//@source:foodf.cpp +@source:foodf.cpp foodf // 136020 (c) 1982 // made by Gencomp foodf1 // 136020 (c) 1982 // made by Gencomp foodf2 // 136020 (c) 1982 // made by Gencomp foodfc // 136020 (c) 1982 // made by Gencomp -//@source:force68k.cpp +@source:force68k.cpp fccpu1 // -//@source:forte2.cpp +@source:forte2.cpp pesadelo // (c) 1989 Forte II Games -//@source:fortecar.cpp +@source:fortecar.cpp fortecar // fortecrd // -//@source:fp1100.cpp +@source:fp1100.cpp fp1100 // -//@source:fp200.cpp +@source:fp200.cpp fp200 // -//@source:fp6000.cpp +@source:fp6000.cpp fp6000 // -//@source:freekick.cpp +@source:freekick.cpp countrun // (c) 1988 Nihon System (+ optional Sega) NS6201-A 1988.3 countrunb // (c) 1988 bootleg countrunb2 // (c) 1988 bootleg @@ -11967,15 +11967,15 @@ pbillrd // (c) 1987 Nihon System pbillrds // (c) 1987 Nihon System (Sega license?) pbillrdsa // (c) 1987 Nihon System (Sega license?) -//@source:fresh.cpp +@source:fresh.cpp fresh // (c) Chain Leisure -//@source:fromanc2.cpp +@source:fromanc2.cpp fromanc2 // (c) 1995 Video System Co. (Japan) fromanc4 // (c) 1998 Video System Co. (Japan) fromancr // (c) 1995 Video System Co. (Japan) -//@source:fromance.cpp +@source:fromance.cpp daiyogen // [1990] Video System Co. (Japan) fromance // (c) 1991 Video System Co. (Japan) idolmj // [1988] (c) System Service (Japan) @@ -11985,33 +11985,33 @@ natsuiro // [1989] Video System presents (Japan) nekkyoku // [1988] Video System Co. (Japan) nmsengen // (c) 1991 Video System (Japan) -//@source:fruitpc.cpp +@source:fruitpc.cpp fruitpc // ??? gogostrk // -//@source:ft68m.cpp +@source:ft68m.cpp ft68m // -//@source:fungames.cpp +@source:fungames.cpp biplane4 // (c) 1976 Fun Games take5 // (c) 1975 Fun Games -//@source:funkball.cpp +@source:funkball.cpp funkball // (c) 1998 dgPIX Entertainment Inc -//@source:funkybee.cpp +@source:funkybee.cpp funkybee // (c) 1982 Orca funkybeeb // (c) 1982 Orca skylancr // (c) 1983 Orca skylancre // (c) 1983 Orca + Esco Trading Co license -//@source:funkyjet.cpp +@source:funkyjet.cpp funkyjet // MAT (c) 1992 Data East (Mitchell license) (World, Rev 1) funkyjeta // MAT (c) 1992 Data East (Mitchell license) (World) - Rev unverified funkyjetj // MAT (c) 1992 Data East (Mitchell license) (Japan, Rev 2) sotsugyo // (c) 1995 Mitchell (Atlus license) -//@source:funworld.cpp +@source:funworld.cpp bigdeal // (c) 1986 Fun World bigdealb // (c) 1986 Fun World bonuscrd // (c) 1986 Fun World @@ -12090,26 +12090,26 @@ vegasmil // (c) 1993 Mile vegasslw // (c) 1993 Fun World witchryl // (c) 199? Video Klein -//@source:funybubl.cpp +@source:funybubl.cpp funybubl // (c) 1999 In Chang Electronic Co funybublc // (c) 1999 Comad Industries -//@source:fuukifg2.cpp +@source:fuukifg2.cpp gogomile // (c) 1995 gogomileo // (c) 1995 (Japan) pbancho // (c) 1996 (Japan) -//@source:fuukifg3.cpp +@source:fuukifg3.cpp asurabld // (c) 1998 (Japan) asurabus // (c) 2000 (Japan) asurabusa // review build -//@source:g627.cpp +@source:g627.cpp rota_101 // rota_115 // rotation // -//@source:gaelco.cpp +@source:gaelco.cpp bigkarnk // (c) 1991 - Ref 901112-1 biomtoy // (c) 1995 - Ref 922804/2 - (unprotected) biomtoya // (c) 1995 - Ref 922804/2 - (unprotected) @@ -12117,7 +12117,7 @@ maniacsp // (c) 1996 - Ref 922804/2 - (prototype) squash // (c) 1992 - Ref 922804/2 thoop // (c) 1992 - Ref 922804/1 -//@source:gaelco2.cpp +@source:gaelco2.cpp aligator // (c) 1994 - Ref 940411 aligatorun // (c) 1994 - Ref 940411 (unprotected) bang // (c) 1998 - Ref ??? @@ -12133,7 +12133,7 @@ touchgoe // (c) 1995 - Ref 950510-1 touchgon // (c) 1995 - Ref 950906 wrally2 // (c) 1995 - Ref 950510 -//@source:gaelco3d.cpp +@source:gaelco3d.cpp radikalb // (c) 1998 - Ref ??? radikalba // (c) 1998 - Ref ??? speedup // (c) 1996 - Ref ??? @@ -12141,7 +12141,7 @@ speedup10 // (c) 1996 - Ref ??? surfplnt // (c) 1997 - Ref 971223 surfplnt40 // (c) 1997 - Ref 970514 -//@source:gaiden.cpp +@source:gaiden.cpp drgnbowl // (c) 1992 Nics drgnbowla // (c) 1992 Nics gaiden // 6215 - (c) 1988 Tecmo (US) @@ -12156,10 +12156,10 @@ tknight // (c) 1989 Tecmo wildfang // (c) 1989 Tecmo wildfangs // (c) 1989 Tecmo -//@source:gal3.cpp +@source:gal3.cpp gal3 // (c) 1992 (Arcade TV Game List - P.73, Right, 6 from top) -//@source:galaga.cpp +@source:galaga.cpp battles // bootleg bosco // (c) 1981 boscomd // (c) 1981 Midway @@ -12187,22 +12187,22 @@ xeviousa // 136018 (c) 1982 + Atari license xeviousb // 136018 (c) 1982 + Atari license xeviousc // 136018 (c) 1982 + Atari license -//@source:galastrm.cpp +@source:galastrm.cpp galastrm // C99 (c) 1992 Taito Corporation -//@source:galaxi.cpp +@source:galaxi.cpp galaxi // (c) 2000 BRL S.R.L. Bologna lastfour // (c) 2001 BRL S.R.L. Bologna magjoker // (c) 2000 BRL S.R.L. Bologna -//@source:galaxia.cpp +@source:galaxia.cpp astrowar // (c) 1980 galaxia // (c) 1979 galaxiaa // (c) 1979 galaxiab // (c) 1979 galaxiac // (c) 1979 -//@source:galaxian.cpp +@source:galaxian.cpp 600 // GX353 (c) 1981 Konami amidar // GX337 (c) 1982 Konami amidar1 // GX337 (c) 1981 Konami @@ -12385,7 +12385,7 @@ zerotimed // hack zigzagb // (c) 1982 LAX (bootleg) zigzagb2 // (c) 1982 LAX (bootleg) -//@source:galaxold.cpp +@source:galaxold.cpp 4in1 // (c) 1981 Armenia / Food and Fun bagmanm2 // (c) 1984 Valadon Automation / GIB bagmanmc // bootleg @@ -12420,17 +12420,17 @@ tazzmang2 // bootleg trvchlng // [1985] Joyland (Senko license) vpool // bootleg -//@source:galaxy.cpp +@source:galaxy.cpp galaxy // galaxyp // -//@source:galeb.cpp +@source:galeb.cpp galeb // -//@source:galgame.cpp +@source:galgame.cpp galgame // (c) 1971 Computer Recreations, Inc -//@source:galivan.cpp +@source:galivan.cpp dangar // (c) 1986 dangar2 // (c) 1986 dangarb // bootleg @@ -12443,7 +12443,7 @@ youma2 // (c) 1986 (Japan) youmab // bootleg youmab2 // bootleg -//@source:galpani2.cpp +@source:galpani2.cpp galpani2 // (c) 1993 Kaneko galpani2e // (c) 1993 Kaneko galpani2e2 // (c) 1993 Kaneko @@ -12455,40 +12455,40 @@ galpani2t // (c) 1993 Kaneko gp2quiz // (c) 1993 Kaneko gp2se // (c) 1994 Kaneko -//@source:galpani3.cpp +@source:galpani3.cpp galpani3 // (c) 1995 Kaneko (World) galpani3hk // (c) 1995 Kaneko (Hong Kong) galpani3j // (c) 1995 Kaneko (Japan) galpani3k // (c) 1995 Kaneko (Korea) -//@source:galpanic.cpp +@source:galpanic.cpp galpanic // (c) 1990 Kaneko galpanica // (c) 1990 Kaneko -//@source:galspnbl.cpp +@source:galspnbl.cpp galspnbl // (c) 1996 Comad hotpinbl // (c) 1995 Comad & New Japan System -//@source:gamate.cpp +@source:gamate.cpp gamate // Bit Corp Gamate -//@source:gambl186.cpp +@source:gambl186.cpp gambl186 // unknown gambl186a // unknown gambl186b // unknown -//@source:gamecom.cpp +@source:gamecom.cpp gamecom // Tiger Game.com -//@source:gamecstl.cpp +@source:gamecstl.cpp gamecst2 // MAME based bootleg, version 2.613 gamecstl // MAME based bootleg -//@source:gameking.cpp +@source:gameking.cpp gamekin3 // gameking // -//@source:gameplan.cpp +@source:gameplan.cpp challeng // (c) 1981 Centuri kaos // (c) 1981 killcom // (c) 1980 Centuri @@ -12498,14 +12498,14 @@ megatack // (c) 1980 Centuri piratetr // (c) 1982 potogold // (c) 1982 -//@source:gamepock.cpp +@source:gamepock.cpp gamepock // Epoch Game Pocket Computer -//@source:gammagic.cpp +@source:gammagic.cpp 99bottles // (c) 1999 Bally Gaming Co. gammagic // (c) 1999 Bally Gaming Co. -//@source:gamtor.cpp +@source:gamtor.cpp ancienta // ancientaa // ancientab // @@ -12687,7 +12687,7 @@ llcharm // llcharma // megakat // -//@source:gaplus.cpp +@source:gaplus.cpp galaga3 // (c) 1984 galaga3a // (c) 1984 galaga3b // (c) 1984 @@ -12698,12 +12698,12 @@ gaplusa // (c) 1984 gaplusd // (c) 1984 gaplust // (c) 1984 -//@source:gatron.cpp +@source:gatron.cpp bingo // Game-A-Tron? poker41 // (c) 1983 Game-A-Tron pulltabs // (c) 1983 Game-A-Tron -//@source:gauntlet.cpp +@source:gauntlet.cpp gaunt2 // 136043 (c) 1986 gaunt22p // 136043 (c) 1986 gaunt22p1 // 136043 (c) 1986 @@ -12733,7 +12733,7 @@ vindctr2 // 136059 (c) 1988 vindctr2r1 // 136059 (c) 1988 vindctr2r2 // 136059 (c) 1988 -//@source:gb.cpp +@source:gb.cpp gameboy // Nintendo Game Boy Handheld gbcolor // Nintendo Game Boy Color Handheld gbpocket // Nintendo Game Boy Pocket Handheld @@ -12741,19 +12741,19 @@ megaduck // Megaduck supergb // Nintendo Super Game Boy SNES Cartridge supergb2 // -//@source:gba.cpp +@source:gba.cpp gba // Nintendo Game Boy Advance Handheld -//@source:gberet.cpp +@source:gberet.cpp gberet // GX577 (c) 1985 gberetb // bootleg on different hardware mrgoemon // GX621 (c) 1986 (Japan) rushatck // GX577 (c) 1985 -//@source:gcpinbal.cpp +@source:gcpinbal.cpp gcpinbal // (c) 1994 Excellent System -//@source:gei.cpp +@source:gei.cpp amuse // (c) 1982 Greyhound Electronics amuse1 // (c) 1982 Greyhound Electronics amuse1a // (c) 1983 Greyhound Electronics @@ -12804,10 +12804,10 @@ suprpokr // (c) 1986 Grayhound Electronics suprpokra // (c) 1986 Grayhound Electronics suprpokrb // (c) 1986 Grayhound Electronics -//@source:geneve.cpp +@source:geneve.cpp geneve // 1987? Myarc Geneve 9640 -//@source:geniusiq.cpp +@source:geniusiq.cpp bs9009cx // 1999 BrainStation 9009 CXL (Germany) gl8008cx // 1999 Genius Leader 8008 CX (Germany) glmmc // 199? Genius Master Mega Color @@ -12817,38 +12817,38 @@ iqtv512 // IQ TV512 (Germany) iqunlim // 199? IQ Unlimited (680x0) itunlim // 199? IT Unlimited -//@source:genpc.cpp +@source:genpc.cpp pc // 1987 PC with CGA pcega // 1987 PC with EGA pcherc // 1987 PC with Hercules (for testing hercules) pcmda // 1987 PC with MDA xtvga // 198? PC-XT (VGA, MF2 Keyboard) -//@source:ggconnie.cpp +@source:ggconnie.cpp ggconnie // (c) ???? Capcom -//@source:ghosteo.cpp +@source:ghosteo.cpp bballoon // (c) 2003 Eolith hapytour // (c) 2005 GAV Company (on Eolith's Ghost hardware) touryuu // (c) 200? Yuki Enterprise -//@source:gijoe.cpp +@source:gijoe.cpp gijoe // GX069 (c) 1991 (World) gijoea // GX069 (c) 1991 (World) gijoej // GX069 (c) 1991 (Japan) gijoeu // GX069 (c) 1991 (US) -//@source:gimix.cpp +@source:gimix.cpp gimix // -//@source:ginganin.cpp +@source:ginganin.cpp ginganin // (c) 1987 Jaleco ginganina // (c) 1987 Jaleco -//@source:gizmondo.cpp +@source:gizmondo.cpp gizmondo // -//@source:gkigt.cpp +@source:gkigt.cpp gkigt4 // gkigt43 // gkigt43n // @@ -12859,14 +12859,14 @@ gkkey // igtsc // ms72c // -//@source:gladiatr.cpp +@source:gladiatr.cpp gcastle // QB (c) 1986 Taito Corporation (prototype?) gladiatr // QB (c) 1986 Taito America Corporation (US) greatgur // QB (c) 1986 Taito Corporation (Japan?) ogonsiro // QB (c) 1986 Taito Corporation (Japan) ppking // QO (c) 1985 Taito America Corporation (US) -//@source:glasgow.cpp +@source:glasgow.cpp amsterd // Amsterdam dallas // Dallas dallas16 // Dallas @@ -12875,13 +12875,13 @@ glasgow // Glasgow roma // Roma roma32 // Roma -//@source:glass.cpp +@source:glass.cpp glass // (c) 1993 - Ref 931021 glass10 // (c) 1993 - Ref 931021 glass10a // (c) 1993 - Ref 931021 shows "Break Edition" on a real PCB glasskr // (c) 1994 - Ref 931021 shows 1994 version, Anime girls, unprotected -//@source:globalfr.cpp +@source:globalfr.cpp gl_coc // Carry On Clubbin' (Global) gl_coc29 // gl_coc29p // @@ -12905,7 +12905,7 @@ gl_wywh24 // gl_wywh24p // gl_wywhp // -//@source:globalvr.cpp +@source:globalvr.cpp bhead2k // Beach Head 2000 Install - 05/27/03 bhead2k2 // Beach Head 2002 Install - 05/27/03 bhead2k3 // Beach Head 2003 Desert War Install - 05/27/03 @@ -12916,13 +12916,13 @@ hyperv2 // Hyper V2 (Global VR) Install - 06/12/02 hyperv2a // Hyper V2 (Global VR) Install - 09/30/01 nfsug // Need For Speed: Underground Install (2 Discs) (v1.1) -//@source:gluck2.cpp +@source:gluck2.cpp gluck2 // 1992 Yung Yu / CYE -//@source:gmaster.cpp +@source:gmaster.cpp gmaster // Hartung Gamemaster -//@source:gng.cpp +@source:gng.cpp diamond // (c) 1989 KH Video (NOT A CAPCOM GAME but runs on GnG hardware) gng // 9/1985 (c) 1985 gnga // 9/1985 (c) 1985 @@ -12935,23 +12935,23 @@ makaimur // 9/1985 (c) 1985 makaimurc // 9/1985 (c) 1985 makaimurg // 9/1985 (c) 1985 -//@source:go2000.cpp +@source:go2000.cpp go2000 // (c) 2000 SA -//@source:goal92.cpp +@source:goal92.cpp goal92 // bootleg -//@source:goindol.cpp +@source:goindol.cpp goindol // (c) 1987 Sun a Electronics goindolk // (c) 1987 Sun a Electronics goindolu // (c) 1987 Sun a Electronics homo // bootleg -//@source:goldngam.cpp +@source:goldngam.cpp moviecrd // (c) 1998 Golden Games swisspkr // (c) 1990 Golden Games -//@source:goldnpkr.cpp +@source:goldnpkr.cpp animpkr // 198?, Unknown animpkra // 198?, Unknown bchancep // 198?, Unknown @@ -13077,7 +13077,7 @@ wupndownb // (c) 1998, Video Klein wupndownc // (c) 1998, Video Klein wupndownd // (c) 1998, Video Klein -//@source:goldstar.cpp +@source:goldstar.cpp bingowng // (c) 1993 Wing Co. Ltd bingownga // (c) 1993 Wing Co. Ltd bonusch // (c) 1990 Wing Co. Ltd @@ -13186,22 +13186,22 @@ unkch4 // bootleg wcat3 // wcherry // bootleg -//@source:gomoku.cpp +@source:gomoku.cpp gomoku // (c) 1981 -//@source:good.cpp +@source:good.cpp good // (c) 1998 -//@source:goodejan.cpp +@source:goodejan.cpp goodejan // (c) 1991 Seibu/Tecmo goodejana // (c) 1991 Seibu/Tecmo totmejan // (c) 1991 Seibu/Tecmo -//@source:gotcha.cpp +@source:gotcha.cpp gotcha // (c) 1997 Dongsung + "presented by Para" ppchamp // (c) 1997 Dongsung + "presented by Para" -//@source:gottlieb.cpp +@source:gottlieb.cpp 3stooges // GV-113 (c) 1984 Mylstar 3stoogesa // GV-113 (c) 1984 Mylstar argusg // GV-??? (c) 1982 Gottlieb - never released @@ -13228,14 +13228,14 @@ usvsthem // GV-??? (c) 198? Mylstar vidvince // GV-??? (c) 1984 Mylstar - never released wizwarz // GV-??? (c) 1984 Mylstar - never released -//@source:gotya.cpp +@source:gotya.cpp gotya // (c) 1981 Game-A-Tron thehand // (c) 1981 T.I.C. -//@source:goupil.cpp +@source:goupil.cpp goupilg1 // -//@source:gp_1.cpp +@source:gp_1.cpp blvelvet // camlight // chucklck // @@ -13247,7 +13247,7 @@ rio // startrip // vegasgp // -//@source:gp_2.cpp +@source:gp_2.cpp agent777 // andromep // andromepa // @@ -13264,39 +13264,39 @@ sshootep // sshootr2 // suprnova // -//@source:gp2x.cpp +@source:gp2x.cpp gp2x // GP2X 2005 -//@source:gp32.cpp +@source:gp32.cpp gp32 // GP32 2001 -//@source:gpworld.cpp +@source:gpworld.cpp gpworld // (c) 1984 -//@source:gradius3.cpp +@source:gradius3.cpp gradius3 // GX945 (c) 1989 (World) gradius3a // GX945 (c) 1989 (Asia) gradius3j // GX945 (c) 1989 (Japan) gradius3js // GX945 (c) 1989 (Japan, split) -//@source:grchamp.cpp +@source:grchamp.cpp grchamp // GM (c) 1981 Taito Corporation -//@source:grfd2301.cpp +@source:grfd2301.cpp grfd2301 // -//@source:gridlee.cpp +@source:gridlee.cpp gridlee // [1983 Videa] prototype - no copyright notice -//@source:groundfx.cpp +@source:groundfx.cpp groundfx // D51 (c) 1992 Taito Corporation -//@source:gstream.cpp +@source:gstream.cpp gstream // (c) 2002, Oriental Soft Japan x2222 // (c) 2000, Oriental Soft x2222o // (c) 2000, Oriental Soft -//@source:gstriker.cpp +@source:gstriker.cpp gstriker // (c) [1993] Human gstrikera // (c) [1993] Human gstrikerj // (c) [1993] Human @@ -13305,12 +13305,12 @@ twrldc94a // (c) 1994 Tecmo vgoalsca // (c) 199? Temco vgoalsoc // (c) 199? Temco -//@source:gsword.cpp +@source:gsword.cpp gsword // AC (c) 1984 Taito Corporation gsword2 // AC (c) 1984 Taito Corporation josvolly // AA (c) 1983 Taito Corporation -//@source:gticlub.cpp +@source:gticlub.cpp gticlub // GX688 (c)1996 Euro EAA gticluba // GX688 (c)1996 Asia AAA gticlubj // GX688 (c)1996 Japan JAA @@ -13321,7 +13321,7 @@ slrasslt // GX792 (c)1996 USA UAA thunderh // GX680 (c)1996 Euro EAA thunderhu // GX680 (c)1996 USA UAA -//@source:gts1.cpp +@source:gts1.cpp astannie // buckrgrs // charlies // @@ -13344,7 +13344,7 @@ sys1test // torch // totem // -//@source:gts3.cpp +@source:gts3.cpp bellring // cactjack // carhop // @@ -13362,7 +13362,7 @@ tfight // tt_game // vegas // -//@source:gts3a.cpp +@source:gts3a.cpp andretti // andretti4 // barbwire // @@ -13399,7 +13399,7 @@ wcsoccer // wcsoccerd2 // wipeout // -//@source:gts80.cpp +@source:gts80.cpp blckhole // blckhole2 // blckhols // @@ -13422,7 +13422,7 @@ vlcno_1a // vlcno_1b // vlcno_ax // -//@source:gts80a.cpp +@source:gts80a.cpp alienstr // amazonh // caveman // @@ -13446,7 +13446,7 @@ striker // thegames // touchdn // -//@source:gts80b.cpp +@source:gts80b.cpp arena // badgirls // bighouse // @@ -13473,12 +13473,12 @@ triplay // txsector // victoryp // -//@source:guab.cpp +@source:guab.cpp crisscrs // (c) 1986 guab // (c) 1986 tenup // (c) 1988 -//@source:gumbo.cpp +@source:gumbo.cpp dblpoint // (c) 1995 Min Corp. dblpointd // (c) 1995 Dong Bang Electron gumbo // (c) 1994 Min Corp. @@ -13487,12 +13487,12 @@ mspuzzle // (c) 1994 Min Corp. mspuzzleg // (c) 1994 Min Corp. mspuzzlen // (c) 1994 Min Corp. -//@source:gunbustr.cpp +@source:gunbustr.cpp gunbustr // D27 (c) 1992 Taito Corporation Japan (World) gunbustrj // D27 (c) 1992 Taito Corporation (Japan) gunbustru // D27 (c) 1992 Taito America Corporation (US) -//@source:gundealr.cpp +@source:gundealr.cpp gundealr // (c) 1990 Dooyong gundealra // (c) 1990 Dooyong gundealrbl // bootleg @@ -13501,10 +13501,10 @@ wiseguy // (c) 1990 Dooyong yamyam // (c) 1990 Dooyong yamyamk // (c) 1990 Dooyong -//@source:gunpey.cpp +@source:gunpey.cpp gunpey // (c) 2000 Banpresto -//@source:gunsmoke.cpp +@source:gunsmoke.cpp gunsmoke // 11/1985 (c) 1985 (World) gunsmokeb // gunsmokej // 11/1985 (c) 1985 (Japan) @@ -13512,39 +13512,39 @@ gunsmokeu // 11/1985 (c) 1985 + Romstar (US) gunsmokeua // 11/1985 (c) 1985 (US) gunsmokeub // 11/1985 (c) 1985 (US) -//@source:gyruss.cpp +@source:gyruss.cpp gyruss // GX347 (c) 1983 gyrussb // bootleg or actual Taito NZ license? gyrussce // GX347 (c) 1983 + Centuri license venus // bootleg -//@source:h19.cpp +@source:h19.cpp h19 // -//@source:h8.cpp +@source:h8.cpp h8 // -//@source:h89.cpp +@source:h89.cpp h89 // -//@source:halleys.cpp +@source:halleys.cpp benberob // A26 halley87 // A62 (c) 1986 Taito Corporation (Japan) halleycj // A62 (c) 1986 Taito Corporation (Japan) halleys // A62 (c) 1986 Taito America Corporation + Coin It (US) halleysc // A62 (c) 1986 Taito Corporation (Japan) -//@source:hanaawas.cpp +@source:hanaawas.cpp hanaawas // (c) SetaKikaku -//@source:hankin.cpp +@source:hankin.cpp empsback // fjholden // howzat // orbit1 // shark // -//@source:harddriv.cpp +@source:harddriv.cpp harddriv // 136052 (c) 1988 harddriv1 // 136052 (c) 1988 harddriv2 // 136052 (c) 1988 @@ -13599,23 +13599,23 @@ stunrune // 136070 (c) 1989 stunrunj // 136070 (c) 1989 stunrunp // (proto) (c) 1989 -//@source:harriet.cpp +@source:harriet.cpp harriet // 1990 -//@source:hazelgr.cpp +@source:hazelgr.cpp hg_frd // Fruit Deuce -//@source:hcastle.cpp +@source:hcastle.cpp akumajou // GX768 (c) 1988 (Japan) akumajoun // GX768 (c) 1988 (Japan) hcastle // GX768 (c) 1988 hcastlee // GX768 (c) 1988 hcastlek // GX768 (c) 1988 -//@source:headonb.cpp +@source:headonb.cpp headonb // bootleg, headonb.cpp -//@source:hec2hrp.cpp +@source:hec2hrp.cpp hec2hr // hec2hrp // hec2hrx // @@ -13624,11 +13624,11 @@ hec2mx40 // hec2mx80 // victor // -//@source:hexion.cpp +@source:hexion.cpp hexion // GX122 (c) 1992 hexionb // bootleg -//@source:hh_cop400.cpp +@source:hh_cop400.cpp ctstein // Castle Toy einvaderc // Entex funjacks // Mattel @@ -13637,7 +13637,7 @@ h2hbaskb // Coleco lightfgt // Milton Bradley plus1 // Milton Bradley -//@source:hh_hmcs40.cpp +@source:hh_hmcs40.cpp alnattck // Coleco bambball // Bambino bbtime // Bandai @@ -13670,19 +13670,19 @@ tmtron // Tomy vinvader // VTech zackman // Bandai -//@source:hh_melps4.cpp +@source:hh_melps4.cpp cfrogger // Coleco gjungler // Gakken -//@source:hh_pic16.cpp +@source:hh_pic16.cpp maniac // Ideal -//@source:hh_sm510.cpp +@source:hh_sm510.cpp gnwmndon // Nintendo ktmnt // Konami ktopgun // Konami -//@source:hh_tms1k.cpp +@source:hh_tms1k.cpp amaztron // Coleco astro // Kosmos bankshot // Parker Bros @@ -13721,7 +13721,7 @@ tbreakup // Tomy tc4 // Coleco zodiac // Coleco -//@source:hh_ucom4.cpp +@source:hh_ucom4.cpp alnchase // Tomy astrocmd // Epoch bcclimbr // Bandai @@ -13743,13 +13743,13 @@ tmscramb // Tomy tmtennis // Tomy ufombs // Bambino -//@source:hideseek.cpp +@source:hideseek.cpp hideseek // -//@source:higemaru.cpp +@source:higemaru.cpp higemaru // 9/1984 (c) 1984 -//@source:highvdeo.cpp +@source:highvdeo.cpp brasil // (c) 2000 unknown cfever1k // (c) 2000 High Video cfever40 // (c) 2000 High Video @@ -13768,7 +13768,7 @@ record // (c) 2000 High Video tour4000 // (c) 2000 High Video tour4010 // (c) 2000 High Video -//@source:hikaru.cpp +@source:hikaru.cpp airtrix // 2001.02 Air Trix braveff // 1999.06 Syouboushi Brave Fire Fighters hikaru // 2000.?? Hikaru BIOS @@ -13776,10 +13776,10 @@ pharrier // 2000.12 Planet Harriers podrace // 2000.06 Star Wars: Racer Arcade sgnascar // 2000.09 Nascar Arcade -//@source:himesiki.cpp +@source:himesiki.cpp himesiki // (c) 1989 Hi-Soft -//@source:hitme.cpp +@source:hitme.cpp barricad // (c) 1976 Ramtek brickyrd // (c) 1976 Ramtek hitme // (c) 05/1976 Ramtek @@ -13787,18 +13787,18 @@ hitme1 // (c) 05/1976 Ramtek m21 // (c) 08/1976 Mirco super21 // (c) 1978 Mirco -//@source:hitpoker.cpp +@source:hitpoker.cpp hitpoker // (c) 1997 -//@source:hk68v10.cpp +@source:hk68v10.cpp hk68v10 // -//@source:hnayayoi.cpp +@source:hnayayoi.cpp hnayayoi // "02" (c) 1987 Dyna Electronics hnfubuki // "06" (c) 1987 Dynax untoucha // "08" (c) 1987 Dynax -//@source:hng64.cpp +@source:hng64.cpp bbust2 // 004 1998/09/11 Beast Busters: Second Nightmare buriki // 007 1999/05/21 Buriki One fatfurwa // 006 1999/01/28 Fatal Fury: Wild Ambition / Garou Densetsu: Wild Ambition @@ -13808,13 +13808,13 @@ sams64 // 002 1997/12/19 Samurai Shodown 64 / Samurai S sams64_2 // 005 1998/10/16 Samurai Shodown: Warrior's Rage / Samurai Spirits: Asura Zanmaden xrally // 003 1998/05/13 Xtreme Rally / Off Beat Racer! -//@source:holeland.cpp +@source:holeland.cpp crzrally // (c) 1985 crzrallya // (c) 1985 crzrallyg // (c) 1985 holeland // (c) 1984 -//@source:homedata.cpp +@source:homedata.cpp battlcry // (c) 1991 Home Data hourouki // (c) 1987 Home Data jogakuen // (c) 1992 Windom corporation @@ -13832,26 +13832,26 @@ mrokumei // (c) 1988 Home Data reikaids // (c) 1988 Home Data vitaminc // (c) 1989 Home Data -//@source:homelab.cpp +@source:homelab.cpp brailab4 // braiplus // homelab2 // homelab3 // homelab4 // -//@source:homerun.cpp +@source:homerun.cpp dynashot // (c) 1988 Jaleco ganjaja // (c) 1990 Jaleco homerun // (c) 1988 Jaleco -//@source:homez80.cpp +@source:homez80.cpp homez80 // -//@source:horizon.cpp +@source:horizon.cpp nshrz // vector1 // -//@source:hornet.cpp +@source:hornet.cpp gradius4 // GX837 (c)1999 nbapbp // GX778 (c)1998 sscope // GX830 (c)1999 @@ -13862,22 +13862,22 @@ sscopec // GX830 (c)1999 terabrst // GX715 (c)1998 USA UEL 1998/07/17 terabrsta // GX715 (c)1998 Asia AAA 1998/02/25 -//@source:hotblock.cpp +@source:hotblock.cpp hotblock // (c) 1993 Nics? / Nix? -//@source:hotstuff.cpp +@source:hotstuff.cpp hotstuff // -//@source:hp_ipc.cpp +@source:hp_ipc.cpp hp_ipc // -//@source:hp16500.cpp +@source:hp16500.cpp hp16500b // hp1650b // hp1651b // hp165ka0 // -//@source:hp48.cpp +@source:hp48.cpp hp38g // hp39g // hp48g // HP 48G @@ -13887,13 +13887,13 @@ hp48s // HP 48S hp48sx // HP 48SX hp49g // -//@source:hp49gp.cpp +@source:hp49gp.cpp hp49gp // HP 49G+ -//@source:hp64k.cpp +@source:hp64k.cpp hp64k // -//@source:hp9845.cpp +@source:hp9845.cpp hp9835a // hp9835b // hp9845a // @@ -13902,10 +13902,10 @@ hp9845c // hp9845s // hp9845t // -//@source:hp9k.cpp +@source:hp9k.cpp hp9816 // -//@source:hp9k_3xx.cpp +@source:hp9k_3xx.cpp hp9k310 // hp9k320 // hp9k330 // @@ -13914,97 +13914,97 @@ hp9k370 // hp9k380 // hp9k382 // -//@source:hprot1.cpp +@source:hprot1.cpp hprot1 // hprot2r6 // hprotr8a // -//@source:hpz80unk.cpp +@source:hpz80unk.cpp hpz80unk // -//@source:hshavoc.cpp +@source:hshavoc.cpp hshavoc // (c) 1993 Data East -//@source:ht68k.cpp +@source:ht68k.cpp ht68k // -//@source:huebler.cpp +@source:huebler.cpp amu880 // -//@source:hunter2.cpp +@source:hunter2.cpp hunter2 // -//@source:hvyunit.cpp +@source:hvyunit.cpp hvyunit // (c) 1988 Kaneko hvyunitj // (c) 1988 Kaneko hvyunitjo // (c) 1988 Kaneko hvyunitu // (c) 1988 Kaneko -//@source:hx20.cpp +@source:hx20.cpp ehx20 // ehx20e // -//@source:hyhoo.cpp +@source:hyhoo.cpp hyhoo // (c) 1987 hyhoo2 // (c) 1987 -//@source:hyperscan.cpp +@source:hyperscan.cpp hs // -//@source:hyperspt.cpp +@source:hyperspt.cpp hpolym84 // GX330 (c) 1984 hyperspt // GX330 (c) 1984 + Centuri hypersptb // bootleg roadf // GX461 (c) 1984 roadf2 // GX461 (c) 1984 -//@source:hyprduel.cpp +@source:hyprduel.cpp hyprduel // (c) 1993 Technosoft (Japan) hyprduel2 // (c) 1993 Technosoft (Japan) magerror // (c) 1994 Technosoft (Japan) (Arcade TV Game List - P.100, Left, 13 from Bottom) -//@source:i7000.cpp +@source:i7000.cpp i7000 // -//@source:ibm6580.cpp +@source:ibm6580.cpp ibm6580 // -//@source:ibmpc.cpp +@source:ibmpc.cpp ibm5140 // 1985 IBM 5140 ibm5150 // 1981 IBM 5150 ibm5155 // 1982 IBM 5155 ibm5160 // 1982 IBM XT 5160 -//@source:ibmpcjr.cpp +@source:ibmpcjr.cpp ibmpcjr // 1984 IBM PC Jr ibmpcjx // 1985 IBM PC JX -//@source:icatel.cpp +@source:icatel.cpp icatel // -//@source:ice_bozopail.cpp +@source:ice_bozopail.cpp ice_bozo // ICE - Bozo Pail Toss -//@source:ice_tbd.cpp +@source:ice_tbd.cpp ice_tbd // ICE - Turbo Drive -//@source:icecold.cpp +@source:icecold.cpp icecold // zekepeak // -//@source:ichiban.cpp +@source:ichiban.cpp ichiban // (c) 199? Excel -//@source:ie15.cpp +@source:ie15.cpp ie15 // -//@source:if800.cpp +@source:if800.cpp if800 // -//@source:igs_fear.cpp +@source:igs_fear.cpp fearless // (c) 2006 -//@source:igs_m027.cpp +@source:igs_m027.cpp amazoni2 // (c) 2002 amazonia // (c) 1999 chessc2 // (c) 200? @@ -14020,7 +14020,7 @@ sdwx // (c) 2002 slqz3 // (c) 1999 zhongguo // (c) 2000 -//@source:igs_m036.cpp +@source:igs_m036.cpp cjddzsp // (c) 200? cjdh2 // (c) 200? cjdh2a // (c) 200? @@ -14028,7 +14028,7 @@ cjdh2b // (c) 200? cjdh2c // (c) 200? igsm312 // (c) 200? -//@source:igs009.cpp +@source:igs009.cpp gp98 // (c) 1998 jingbell // (c) 1997 jingbella // (c) 1997 @@ -14036,7 +14036,7 @@ jingbellb // (c) 1997 jingbellc // (c) 1995 jingbelli // (c) 1995? -//@source:igs011.cpp +@source:igs011.cpp dbc // (c) 199? drgnwrld // (c) 1997 drgnwrldv10c // (c) 1995 @@ -14056,7 +14056,7 @@ vbowlj // (c) 1996 wlcc // (c) 1996 xymg // (c) 1996 -//@source:igs017.cpp +@source:igs017.cpp iqblocka // (c) 1996 iqblockf // (c) 1996 lhzb2 // (c) 1998 @@ -14072,11 +14072,11 @@ tarzan // (c) 1999? tarzana // (c) 1999? tjsb // (c) 1997 -//@source:igspc.cpp +@source:igspc.cpp eztouch // (c) 200? speeddrv // (c) 2004 -//@source:igspoker.cpp +@source:igspoker.cpp chleague // (c) 199? IGS chleagul // (c) 199? IGS citalcup // (c) SGS (bootleg of IGS v220it) @@ -14095,24 +14095,24 @@ numbr10l // (c) IGS (Board labeled Playmark Srl) pktet346 // (c) 199? IGS stellecu // (c) 1998 -//@source:ikki.cpp +@source:ikki.cpp farmer // TVG17 (c) 1985 Sun Electronics ikki // TVG17 (c) 1985 Sun Electronics (Japan) -//@source:imds.cpp +@source:imds.cpp imds // intel -//@source:imds2.cpp +@source:imds2.cpp imds2 // Intellec MDS series-II -//@source:imolagp.cpp +@source:imolagp.cpp imolagp // (c) 198? RB Bologna imolagpo // (c) 198? RB Bologna -//@source:imsai.cpp +@source:imsai.cpp imsai // -//@source:inder.cpp +@source:inder.cpp atleta // brvteam // canasta // @@ -14124,29 +14124,29 @@ mundial // pinclown // pinmoonl // -//@source:indiana.cpp +@source:indiana.cpp indiana // -//@source:indigo.cpp +@source:indigo.cpp indigo3k // IP12: Indigo 1, R3000, 33MHz indigo4k // IP20: Indigo 1, R4400, 150MHz -//@source:indy_indigo2.cpp +@source:indy_indigo2.cpp ip224613 // IP22: Indy, R4600, 133MHz ip225015 // IP22: Indy, R5000, 150MHz ip244415 // IP24: Indigo 2, R4400, 150MHz -//@source:instruct.cpp +@source:instruct.cpp instruct // -//@source:interact.cpp +@source:interact.cpp hector1 // interact // -//@source:intrscti.cpp +@source:intrscti.cpp intrscti // ???? -//@source:intv.cpp +@source:intv.cpp intv // Mattel Intellivision - 1979 AKA INTV intv2 // Mattel Intellivision II- 1982? intvecs // 1983 - Mattel Intellivision w/ECS and IntelliVoice expansions @@ -14154,55 +14154,55 @@ intvkbd // 1981 - Mattel Intellivision Keyboard Componen intvoice // Mattel Intellivision + IntelliVoice expansion - 1982 intvsrs // Intellivision (Sears License) - 19?? -//@source:inufuku.cpp +@source:inufuku.cpp 3on3dunk // (c) 1996 Video System Co. (Japan) inufuku // (c) 1998 Video System Co. (Japan) -//@source:invqix.cpp +@source:invqix.cpp invqix // F34 (c) 2003 Taito Corporation -//@source:ipc.cpp +@source:ipc.cpp ipb // intel ipc // intel -//@source:ipds.cpp +@source:ipds.cpp ipds // intel -//@source:iq151.cpp +@source:iq151.cpp iq151 // -//@source:iqblock.cpp +@source:iqblock.cpp grndtour // (c) 1993 iqblock // (c) 1993 -//@source:iris3130.cpp +@source:iris3130.cpp sgi_ip2 // IP2: IRIS 3xx0, 68020, 16MHz -//@source:irisha.cpp +@source:irisha.cpp irisha // -//@source:irobot.cpp +@source:irobot.cpp irobot // 136029 (c) 1983 -//@source:ironhors.cpp +@source:ironhors.cpp dairesya // GX560 (c) 1986 (Japan) farwest // bootleg ironhors // GX560 (c) 1986 -//@source:isbc.cpp +@source:isbc.cpp isbc286 // isbc2861 // isbc86 // rpc86 // -//@source:iskr103x.cpp +@source:iskr103x.cpp iskr1030m // iskr1031 // -//@source:istellar.cpp +@source:istellar.cpp istellar // (c) 1983 Funai / Gakken -//@source:iteagle.cpp +@source:iteagle.cpp bbhcotw // bbhsc // carnking // @@ -14220,7 +14220,7 @@ gtfore06 // iteagle // (c) 2000 Incredible Technologies virtpool // -//@source:itech32.cpp +@source:itech32.cpp bloodstm // (c) 1994 Strata/Incredible Technologies bloodstm10 // (c) 1994 Strata/Incredible Technologies bloodstm11 // (c) 1994 Strata/Incredible Technologies @@ -14293,7 +14293,7 @@ wcbowl161 // (c) 1995 Incredible Technologies wcbowl165 // (c) 1995 Incredible Technologies wcbowldx // (c) 1999 Incredible Technologies -//@source:itech8.cpp +@source:itech8.cpp arlingtn // (c) 1991 Strata/Incredible Technologies dynobop // (c) 1990 Grand Products/Incredible Technologies gpgolf // (c) 1992 Strata/Incredible Technologies @@ -14325,7 +14325,7 @@ stratabs // (c) 1990 Strata/Incredible Technologies wfortune // (c) 1989 GameTek wfortunea // (c) 1989 GameTek -//@source:itgambl2.cpp +@source:itgambl2.cpp cmagica // (c) 200? unknown elvis // (c) 200? unknown europass // (c) 200? unknown @@ -14344,7 +14344,7 @@ trstar2k // (c) 1999 A.M. unkh8gam // (c) 200? unknown wizard // (c) 1999 A.A. -//@source:itgambl3.cpp +@source:itgambl3.cpp ejollyx5 // (c) 200? Solar Games ejollyx9 // grandprx // (c) 200? 4fun @@ -14352,7 +14352,7 @@ queenotg // supjolly // (c) 200? unknown x5jokers // (c) 200? Electronic Projects -//@source:itgamble.cpp +@source:itgamble.cpp abacus // (c) 200? unknown bookthr // (c) 200? unknown capcor // (c) 2001 Nazionale Elettronica @@ -14364,10 +14364,10 @@ laperla // (c) 2002 Nazionale Elettronica laperlag // (c) 2001 Nazionale Elettronica mnumber // (c) 200? M.M. - B.R.L. -//@source:itt3030.cpp +@source:itt3030.cpp itt3030 // -//@source:jack.cpp +@source:jack.cpp brix // (c) 1982 Cinematronics + Advanced Microcomputer Systems freeze // Cinematronics jack // (c) 1982 Cinematronics @@ -14384,23 +14384,23 @@ unclepoo // (c) 1983 Diatec zzyzzyxx // (c) 1982 Cinematronics + Advanced Microcomputer Systems zzyzzyxx2 // (c) 1982 Cinematronics + Advanced Microcomputer Systems -//@source:jackal.cpp +@source:jackal.cpp jackal // GX631 (c) 1986 (World) jackalj // GX631 (c) 1986 (Japan) jackalr // GX631 (c) 1986 (World) topgunbl // bootleg topgunr // GX631 (c) 1986 (US) -//@source:jackie.cpp +@source:jackie.cpp jackie // (c) 1993 IGS -//@source:jackpool.cpp +@source:jackpool.cpp jackpool // (c) 1997 Electronic Projects -//@source:jade.cpp +@source:jade.cpp jade // -//@source:jaguar.cpp +@source:jaguar.cpp a51mxr3k // ?? (c) 1998 area51 // 136105 (c) 1995 area51a // 136105 (c) 1995 @@ -14422,12 +14422,12 @@ maxf_ng // ?? (c) 1996 maxforce // ?? (c) 1996 vcircle // (proto) (c) 1996 -//@source:jailbrek.cpp +@source:jailbrek.cpp jailbrek // GX507 (c) 1986 jailbrekb // bootleg manhatan // GX507 (c) 1986 (Japan) -//@source:jalmah.cpp +@source:jalmah.cpp daireika // (c) 1989 Jaleco/NMK kakumei // (c) 1990 kakumei2 // (c) 1992 @@ -14435,7 +14435,7 @@ mjzoomin // (c) 1990 suchipi // (c) 1993 urashima // UPL-89052 -//@source:jangou.cpp +@source:jangou.cpp cntrygrl // (c) 1984 Royal Denshi cntrygrla // (c) 1984 fruitbun // (c) 1984 @@ -14445,46 +14445,46 @@ luckygrl // (c) 1984 Wing? macha // (c) 1983 Logitec roylcrdn // (c) 1985 -//@source:jankenmn.cpp +@source:jankenmn.cpp jankenmn // (c) 1985 Sunwise -//@source:jantotsu.cpp +@source:jantotsu.cpp jantotsu // (c) 1983 Sanritsu -//@source:jchan.cpp +@source:jchan.cpp jchan // (c) 1995 Kaneko jchan2 // (c) 1995 Kaneko -//@source:jclub2.cpp +@source:jclub2.cpp darkhors // bootleg of Jockey Club II jclub2 // (c) 199? Seta jclub2o // (c) 199? Seta jclub2ob // (c) 199? Seta -//@source:jedi.cpp +@source:jedi.cpp jedi // 136030 (c) 1984 -//@source:jeutel.cpp +@source:jeutel.cpp leking // olympic // -//@source:jokrwild.cpp +@source:jokrwild.cpp jokrwild // (c) 1988 Sigma -//@source:jollyjgr.cpp +@source:jollyjgr.cpp fspiderb // bootleg jollyjgr // KD (c) 1982 Taito Corporation -//@source:jongkyo.cpp +@source:jongkyo.cpp jongkyo // (c) 1985 Kiwako -//@source:jonos.cpp +@source:jonos.cpp jonos // -//@source:joystand.cpp +@source:joystand.cpp joystand // 1997 Yuvo -//@source:jp.cpp +@source:jp.cpp america // aqualand // faeton // @@ -14496,7 +14496,7 @@ petaco // petaco2 // pimbal // -//@source:jpmimpct.cpp +@source:jpmimpct.cpp buzzundr // Buzzundrum (Ace) cluedo // (c) 1995 cluedo2 // (c) 1995 @@ -14515,7 +14515,7 @@ trivialp // (c) 1996 trivialpd // (c) 1996 trivialpo // (c) 1996 -//@source:jpmimpctsw.cpp +@source:jpmimpctsw.cpp j6aceclb // Ace Of Clubs (Crystal) j6aceclba // j6acehi // Aces High (Ace) @@ -15489,7 +15489,7 @@ j6wthing // Wild Thing (Empire) j6wthinga // j6wthingb // -//@source:jpmmps.cpp +@source:jpmmps.cpp j2008 // zzz_unk 008 (Unk) j2adnote // Add A Note (JPM) j2adnotea // @@ -15683,7 +15683,7 @@ j2westrn // Western (JPM) j2wrb // Wild Reel Bingo (JPM) j2xxx // Triple X (Bwb) -//@source:jpms80.cpp +@source:jpms80.cpp j80alad // Aladdin's Cave (PCP) j80bac // Bank A Coin (JPM) j80blbnk // Blankity Bank (PCP) @@ -15708,7 +15708,7 @@ j80wsprt // Winsprint (JPM) j80wsprt2 // Winsprint (JPM) j80wsprt3 // Winsprint (JPM) -//@source:jpmsru.cpp +@source:jpmsru.cpp j_ewnd20 // j_ewnda // j_ewnud // Each Way Nudger @@ -15722,14 +15722,14 @@ j_plus2 // Plus 2 j_super2 // Super 2 j_unk // -//@source:jpmsys5.cpp +@source:jpmsys5.cpp cashcade // Cashcade (JPM) monoplcl // Monopoly Classic (JPM) monopldx // Monopoly Deluxe (JPM) monopoly // Monopoly (JPM) monopolya // Monopoly (JPM) -//@source:jpmsys5sw.cpp +@source:jpmsys5sw.cpp j5ar80 // Around The World In Eighty Days (JPM) j5ar80a // j5ar80b // @@ -15893,7 +15893,7 @@ j5ujb // j5wsc // Wall Street Club (JPM) j5wsca // -//@source:jpmsys7.cpp +@source:jpmsys7.cpp j7bmagic // Black Magic (JPM) j7bullio // Bullionaire (Ace) j7cexprs // Cash Xpress (JPM) @@ -15907,58 +15907,58 @@ j7razzmaa // j7tubgld // Turbo Gold (JPM) j7wldwkd // Wild 'N' Wicked (JPM) -//@source:jr100.cpp +@source:jr100.cpp jr100 // jr100u // -//@source:jr200.cpp +@source:jr200.cpp jr200 // jr200u // -//@source:jrpacman.cpp +@source:jrpacman.cpp jrpacman // (c) 1983 Midway jrpacmanf // speedup hack -//@source:jtc.cpp +@source:jtc.cpp jtc // jtces23 // jtces40 // jtces88 // -//@source:jubilee.cpp +@source:jubilee.cpp jubileep // -//@source:juicebox.cpp +@source:juicebox.cpp juicebox // -//@source:junior.cpp +@source:junior.cpp junior // -//@source:junofrst.cpp +@source:junofrst.cpp junofrst // GX310 (c) 1983 Konami junofrstg // GX310 (c) 1983 Konami + Gottlieb license -//@source:jupace.cpp +@source:jupace.cpp jupace // Jupiter Ace -//@source:jupiter.cpp +@source:jupiter.cpp jupiter2 // jupiter3 // -//@source:jvh.cpp +@source:jvh.cpp escape // movmastr // -//@source:k1003.cpp +@source:k1003.cpp k1003 // -//@source:k28.cpp +@source:k28.cpp k28 // Tiger Electronics -//@source:k8915.cpp +@source:k8915.cpp k8915 // -//@source:kaneko16.cpp +@source:kaneko16.cpp bakubrkr // (c) 1992 Kaneko berlwall // (c) 1991 Kaneko berlwallk // (c) 1991 Kaneko (Korea, Inter license) @@ -15989,13 +15989,13 @@ shogwarr // (c) 1992 Kaneko shogwarru // (c) 1992 Kaneko wingforc // (c) 1993 Atlus (Japan, prototype) -//@source:kangaroo.cpp +@source:kangaroo.cpp fnkyfish // (c) 1981 Sun Electronics kangaroo // (c) 1982 Sun Electronics kangarooa // 136008 (c) 1982 Atari kangaroob // (bootleg) -//@source:karnov.cpp +@source:karnov.cpp chelnov // (c) 1988 Data East USA (World) chelnovj // (c) 1988 Data East Corporation (Japan) chelnovjbl // bootleg @@ -16006,10 +16006,10 @@ karnova // (c) 1987 Data East USA (US) karnovj // (c) 1987 Data East Corporation (Japan) wndrplnt // (c) 1987 Data East Corporation (Japan) -//@source:kas89.cpp +@source:kas89.cpp kas89 // 1989, SFC S.R.L. -//@source:kaypro.cpp +@source:kaypro.cpp kaypro10 // Kaypro 10 kaypro2x // Kaypro 2 - 2/84 kaypro4 // Kaypro 4 - 4/83 @@ -16019,47 +16019,47 @@ kayproii // Kaypro II - 2/83 omni2 // Omni II robie // Kaypro Robie -//@source:kc.cpp +@source:kc.cpp kc85_2 // VEB KC 85/2 kc85_3 // VEB KC 85/3 kc85_4 // VEB KC 85/4 kc85_5 // VEB KC 85/5 -//@source:kchamp.cpp +@source:kchamp.cpp karatedo // (c) 1984 Data East Corporation (Japan) karatevs // (c) 1984 Data East Corporation (Japan) kchamp // (c) 1984 Data East USA (US) kchampvs // (c) 1984 Data East USA (US) kchampvs2 // (c) 1984 Data East USA (US) -//@source:kenseim.cpp +@source:kenseim.cpp kenseim // 18/04/1994 (c) 1994 Togo/Sigma (Japan) not listed on Capcom's site -//@source:kickgoal.cpp +@source:kickgoal.cpp actionhw // (c) 1995 kickgoal // (c) 1995 -//@source:kim1.cpp +@source:kim1.cpp kim1 // Commodore (MOS) KIM-1 1975 -//@source:kingdrby.cpp +@source:kingdrby.cpp cowrace // (c) 20?? hack kingdrbb // (c) 1986 hack kingdrbb2 // (c) 198? hack kingdrby // (c) 1981 Tatsumi -//@source:kingobox.cpp +@source:kingobox.cpp kingofb // (c) 1985 Wood Place Inc. ringking // (c) 1985 Data East USA ringking2 // (c) 1985 Data East USA ringking3 // (c) 1985 Data East USA ringkingw // (c) 1985 Wood Place Inc. -//@source:kingpin.cpp +@source:kingpin.cpp kingpin // (c) 1983 American Communications Laboratories Inc. maxideal // (c) 1983 American Communications Laboratories Inc. -//@source:kinst.cpp +@source:kinst.cpp kinst // (c) 1994 Rare kinst13 // (c) 1994 Rare kinst14 // (c) 1994 Rare @@ -16071,10 +16071,10 @@ kinst2k3 // (c) 1995 Rare kinst2k4 // (c) 1995 Rare kinstp // (c) 1994 Rare -//@source:kissproto.cpp +@source:kissproto.cpp kissp // -//@source:klax.cpp +@source:klax.cpp klax // 136075 (c) 1989 klax2 // 136075 (c) 1989 klax2bl // bootleg @@ -16082,21 +16082,21 @@ klax3 // 136075 (c) 1989 klaxd // 136075 (c) 1989 (Germany) klaxj // 136075 (c) 1989 (Japan) -//@source:kncljoe.cpp +@source:kncljoe.cpp bcrusher // bootleg kncljoe // (c) 1985 Taito Corporation kncljoea // (c) 1985 Taito Corporation -//@source:koftball.cpp +@source:koftball.cpp koftball // (c) 1995 BMC -//@source:koikoi.cpp +@source:koikoi.cpp koikoi // (c) 1983 Kiwako -//@source:konamigq.cpp +@source:konamigq.cpp cryptklr // Crypt Killer (GQ420 UAA) -//@source:konamigv.cpp +@source:konamigv.cpp btchamp // GV053, UAA01 hyperath // GV021, Japan 1.00 kdeadeye // GV054, UA01 @@ -16113,7 +16113,7 @@ tmoshsp // GE756, JAB tmoshspa // GE756, JAA weddingr // GX624, JAA -//@source:konamigx.cpp +@source:konamigx.cpp crzcross // 1994.?? GX315 (Europe) daiskiss // 1996.03 GX535 (Japan) dragoona // 1995.?? GX417 (Asia) @@ -16154,7 +16154,7 @@ vsnetscru // 1996.?? GX627 (US) winspike // 1997.?? GX705 (Europe) winspikej // 1997.07 GX705 (Japan) -//@source:konamim2.cpp +@source:konamim2.cpp 3do_m2 // btltryst // GX636 (c)1998 evilngt // GX810 (c)1998 @@ -16167,7 +16167,7 @@ totlvice // GX639 (c)1997 totlvicj // GX639 (c)1997 totlvicu // GX639 (c)1997 -//@source:konendev.cpp +@source:konendev.cpp aadvent // African Adventure dragnfly // Dragonfly enchlamp // Enchanted Lamp @@ -16185,22 +16185,22 @@ spiceup // Spice It Up sultanw // Sultan W whiterus // White Russia -//@source:konin.cpp +@source:konin.cpp konin // -//@source:kontest.cpp +@source:kontest.cpp kontest // GX800 (c) 198? (Japan) -//@source:kopunch.cpp +@source:kopunch.cpp kopunch // 834-0103 (c) 1981 Sega -//@source:kramermc.cpp +@source:kramermc.cpp kramermc // 1987 Kramer MC -//@source:ksayakyu.cpp +@source:ksayakyu.cpp ksayakyu // ??? (c) 1985 Taito Corporation -//@source:ksys573.cpp +@source:ksys573.cpp bassang2 // 1998 - Bass Angler 2 (GE865 VER. JAA) bassangl // 1998 - Bass Angler (GE765 VER. JAA) cr589fw // 1999 - CR-589 Firmware (700B04) @@ -16313,14 +16313,14 @@ salarymc // 2000 - Salary Man Champ (G*A18 VER. JAA) stepchmp // 1999 - Step Champ (GE930 VER. JA) sys573 // -//@source:kungfur.cpp +@source:kungfur.cpp kungfur // (c) 1987 -//@source:kurukuru.cpp +@source:kurukuru.cpp kurukuru // (c) 1990 Success / Taiyo Jidoki. ppj // (c) 199? Success / Taiyo Jidoki. -//@source:kyocera.cpp +@source:kyocera.cpp kc85 // m10 // npc8300 // @@ -16330,7 +16330,7 @@ tandy102 // tandy200 // trsm100 // -//@source:kyugo.cpp +@source:kyugo.cpp 99lstwar // (c) 1985 Proma 99lstwara // (c) 1985 Proma 99lstwark // (c) 1985 Kyugo @@ -16351,12 +16351,12 @@ skywolf3 // bootleg sonofphx // bootleg srdmissn // (c) 1986 Taito Corporation -//@source:labyrunr.cpp +@source:labyrunr.cpp labyrunr // GX771 (c) 1987 (Japan) labyrunrk // GX771 (c) 1987 (Japan) tricktrp // GX771 (c) 1987 -//@source:ladybug.cpp +@source:ladybug.cpp cavenger // 8106 (c) 1981 dorodon // Falcon dorodon2 // Falcon @@ -16366,26 +16366,26 @@ ladybugb // bootleg snapjack // ???? (c) sraider // ???? (c) 1982 Universal -//@source:ladyfrog.cpp +@source:ladyfrog.cpp ladyfrog // (c) 1990 Mondial Games toucheme // touchemea // -//@source:laser3k.cpp +@source:laser3k.cpp las3000 // 1983 Laser 3000 -//@source:laserbas.cpp +@source:laserbas.cpp futflash // (c) 1981 HOEI (Arcade TV Game List - P.96, Right, 18 from top) laserbas // (c) 1981 Amstar/HOEI laserbasa // (c) 1981 Amstar/HOEI -//@source:laserbat.cpp +@source:laserbat.cpp catnmous // (c) 1982 catnmousa // (c) 1982 laserbat // (c) 1981 lazarian // (c) 1981 -//@source:lasso.cpp +@source:lasso.cpp chameleo // (c) 1983 Jaleco lasso // 'WM' (c) 1982 photof // (c) 1984 Jaleco / Casio @@ -16394,10 +16394,10 @@ pinboa // (c) 1984 Jaleco pinbos // (c) 1985 Strike wwjgtin // (c) 1984 Jaleco / Casio -//@source:lastbank.cpp +@source:lastbank.cpp lastbank // (c) 1994 Excellent System -//@source:lastduel.cpp +@source:lastduel.cpp lastduel // 7/1988 (c) 1988 (US) lastduelb // bootleg lastduelj // 7/1988 (c) 1988 (Japan) @@ -16408,40 +16408,40 @@ ledstorm // 1988 (c) 1988 (US) madgear // 2/1989 (c) 1989 (US) madgearj // 2/1989 (c) 1989 (Japan) -//@source:lastfght.cpp +@source:lastfght.cpp lastfght // (c) 2000 Subsino -//@source:laz_aftrshok.cpp +@source:laz_aftrshok.cpp aftrshok // Lazer-tron After Shock aftrshoka // -//@source:laz_awetoss.cpp +@source:laz_awetoss.cpp awetoss // Lazer-tron Awesome Toss'em -//@source:laz_ribrac.cpp +@source:laz_ribrac.cpp ribrac // Lazer-tron Ribbit Racing -//@source:lazercmd.cpp +@source:lazercmd.cpp bbonk // [1976?] lazercmd // [1976?] medlanes // [1977?] -//@source:lbeach.cpp +@source:lbeach.cpp lbeach // (c) 1979 Olympia / Seletron -//@source:lc80.cpp +@source:lc80.cpp lc80 // lc80_2 // sc80 // -//@source:lcmate2.cpp +@source:lcmate2.cpp lcmate2 // -//@source:leapster.cpp +@source:leapster.cpp leapster // leapstertv // -//@source:legionna.cpp +@source:legionna.cpp cupsoc // (c) 1992 Seibu cupsoca // (c) 1992 Seibu cupsocb // (c) 1992 Seibu @@ -16465,7 +16465,7 @@ olysoc92 // (c) 1992 Seibu olysoc92a // (c) 1992 Seibu olysoc92b // (c) 1992 Seibu -//@source:leland.cpp +@source:leland.cpp aafb // (c) 1989 Leland aafbb // (c) 1989 Leland aafbc // (c) 1989 Leland @@ -16492,10 +16492,10 @@ upyoural // (c) 1987 Cinematronics viper // (c) 1988 Leland wseries // (c) 1985 Cinematronics -//@source:lemmings.cpp +@source:lemmings.cpp lemmings // prototype (c) 1991 Data East USA (US) -//@source:lethal.cpp +@source:lethal.cpp lethalen // GX191 (c) 1992 lethaleneaa // GX191 (c) 1992 lethaleneab // GX191 (c) 1992 @@ -16505,7 +16505,7 @@ lethalenua // GX191 (c) 1992 lethalenub // GX191 (c) 1992 lethalenux // GX191 (c) 1992 -//@source:lethalj.cpp +@source:lethalj.cpp cclownz // (c) 1999 LAI Games cfarm // (c) 1999 LAI Games eggventr // (c) 1997 The Game Room @@ -16519,18 +16519,18 @@ lethalj // (c) 1996 The Game Room ripribit // (c) 1997 LAI Games ripribita // (c) 1997 LAI Games -//@source:lft.cpp +@source:lft.cpp lft1230 // lft1510 // -//@source:lg-dvd.cpp +@source:lg-dvd.cpp lggp40 // -//@source:lgp.cpp +@source:lgp.cpp lgp // (c) 1983 Taito lgpalt // (c) 1983 Taito -//@source:liberate.cpp +@source:liberate.cpp boomrang // (c) 1983 boomranga // (c) 1983 dualaslt // (c) 1984 Data East USA (US) @@ -16543,18 +16543,18 @@ prosporta // (c) 1983 yellowcbb // bootleg yellowcbj // (c) 1984 -//@source:liberatr.cpp +@source:liberatr.cpp liberatr // 136012 (c) 1982 liberatr2 // 136012 (c) 1982 -//@source:limenko.cpp +@source:limenko.cpp dynabomb // (c) 2000 Limenko legendoh // (c) 2000 Limenko sb2003 // (c) 2003 Limenko sb2003a // (c) 2003 Limenko spotty // (c) 2001 Prince Co. -//@source:lindbergh.cpp +@source:lindbergh.cpp 2spicy // abclimax // ghostsev // @@ -16574,16 +16574,16 @@ segartv // vf5 // vtennis3 // -//@source:lisa.cpp +@source:lisa.cpp lisa // 1983 Apple Lisa lisa2 // 1984 Apple Lisa 2 lisa210 // 1984 Apple Lisa 2/10 macxl // 1985 Apple Macintosh XL -//@source:littlerb.cpp +@source:littlerb.cpp littlerb // (c) 1993 TCH -//@source:lkage.cpp +@source:lkage.cpp bygone // A53 (c) 1985 Taito Corporation - prototype ? lkage // A54 (c) 1984 Taito Corporation lkageb // bootleg @@ -16592,39 +16592,39 @@ lkageb3 // bootleg lkageo // A54 (c) 1984 Taito Corporation lkageoo // A54 (c) 1984 Taito Corporation -//@source:llc.cpp +@source:llc.cpp llc1 // llc2 // -//@source:lockon.cpp +@source:lockon.cpp lockon // (c) 1986 Tatsumi lockonc // (c) 1986 Tatsumi -//@source:lola8a.cpp +@source:lola8a.cpp lola8a // -//@source:looping.cpp +@source:looping.cpp looping // (c) 1982 Video Games GmbH loopingv // (c) 1982 Video Games GmbH (Venture Line license) loopingva // (c) 1982 Video Games GmbH (Venture Line license) skybump // (c) 1982 Venture Line -//@source:lordgun.cpp +@source:lordgun.cpp aliencha // (c) 1994 alienchac // (c) 1994 lordgun // (c) 1994 -//@source:lsasquad.cpp +@source:lsasquad.cpp daikaiju // A74 (c) 1986 Taito lsasquad // A64 (c) 1986 Taito Corporation / Taito America (dip switch) storming // A64 (c) 1986 Taito Corporation -//@source:ltcasino.cpp +@source:ltcasino.cpp ltcasinn // (c) 1984 Digital Controls Inc ltcasino // (c) 1982 Digital Controls Inc mv4in1 // (c) 1983 Entertainment Enterprises -//@source:ltd.cpp +@source:ltd.cpp alcapone // atla_ltd // bhol_ltd // @@ -16633,25 +16633,25 @@ cowboy // pecmen // zephy // -//@source:luckgrln.cpp +@source:luckgrln.cpp 7smash // (c) 1993 Sovic luckgrln // (c) 1991 Wing Co. Ltd -//@source:lucky74.cpp +@source:lucky74.cpp excitbj // (c) 1992 Wing Co. Ltd lucky74 // (c) 1988 Wing Co. Ltd lucky74a // (c) 1988 Wing Co. Ltd lucky74b // (c) 1988 Wing Co. Ltd -//@source:lvcards.cpp +@source:lvcards.cpp lvcards // (c) 1985 Tehkan lvpoker // ???? - (c) 1985 Tehkan ponttehk // 6011 - (c) 1985 Tehkan -//@source:lviv.cpp +@source:lviv.cpp lviv // Lviv/L'vov -//@source:lwings.cpp +@source:lwings.cpp avengers // 2/1987 (c) 1987 (US) avengers2 // 2/1987 (c) 1987 (US) buraiken // 2/1987 (c) 1987 (Japan) @@ -16668,10 +16668,10 @@ trojanb // bootleg trojanj // 4/1986 (c) 1986 (Japan) trojanr // 4/1986 (c) 1986 + Romstar -//@source:lynx.cpp +@source:lynx.cpp lynx // Atari Lynx Handheld -//@source:m10.cpp +@source:m10.cpp andromed // (c) 1979 greenber // Irem headoni // Irem no copyright notice (1979 - Arcade TV Game List - P.98, Left, 7 from top) @@ -16680,7 +16680,7 @@ ipminvad1 // M10 incomplete dump skychut // Irem [1980] spacbeam // M15 no copyright notice -//@source:m107.cpp +@source:m107.cpp airass // (c) 1993 Irem (World) dsoccr94 // (c) 1994 Irem (Data East Corporation license) dsoccr94k // @@ -16688,33 +16688,33 @@ firebarr // (c) 1993 Irem (Japan) kftgoal // (c) 1994 Jaleco wpksoc // (c) 1995 Jaleco -//@source:m14.cpp +@source:m14.cpp ptrmj // M14 (c) 1979 -//@source:m20.cpp +@source:m20.cpp m20 // m40 // -//@source:m24.cpp +@source:m24.cpp m24 // m240 // -//@source:m5.cpp +@source:m5.cpp m5 // m5p // m5p_brno // -//@source:m52.cpp +@source:m52.cpp alpha1v // Vision Electronics mpatrol // M52 (c) 1982 mpatrolw // M52 (c) 1982 + Williams license mranger // bootleg -//@source:m57.cpp +@source:m57.cpp newtangl // (c) 1983 troangel // (c) 1983 -//@source:m58.cpp +@source:m58.cpp 10yard // (c) 1983 10yard85 // (c) 1985 10yardj // (c) 1983 @@ -16722,7 +16722,7 @@ vs10yard // (c) 1983/1984 vs10yardj // (c) 1983/1984 vs10yardu // (c) 1983/1984 -//@source:m62.cpp +@source:m62.cpp battroad // (c) 1984 horizon // (c) 1985 kidniki // (c) 1986 + Data East USA license @@ -16746,16 +16746,16 @@ spelunkrj // (c) 1985 licensed from Broderbund yanchamr // (c) 1986 (Japan) youjyudn // (c) 1986 (Japan) -//@source:m63.cpp +@source:m63.cpp atomboy // M63 (c) 1985 Irem + Memetron license atomboya // M63 (c) 1985 Irem + Memetron license fghtbskt // (c) 1984 Paradise Co. Ltd. wilytowr // M63 (c) 1984 -//@source:m6805evs.cpp +@source:m6805evs.cpp m6805evs // -//@source:m72.cpp +@source:m72.cpp airduel // (c) 1990 (World) airduelm72 // (c) 1990 (Japan) bchopper // (c) 1987 @@ -16797,13 +16797,13 @@ rtypeu // (c) 1987 + Nintendo USA license (US) xmultipl // (c) 1989 (Japan) xmultiplm72 // (c) 1989 (Japan) -//@source:m79152pc.cpp +@source:m79152pc.cpp m79152pc // -//@source:m79amb.cpp +@source:m79amb.cpp m79amb // (c) 1977 RamTek -//@source:m90.cpp +@source:m90.cpp atompunk // (c) 1991 Irem America (licensed from Hudson Soft) bbmanw // (c) 1992 Irem (World) bbmanwj // (c) 1992 Irem (Japan) @@ -16821,7 +16821,7 @@ quizf1 // (c) 1992 Irem (Japan) riskchal // (c) 1993 Irem shisen2 // (c) 1993 Tamtex -//@source:m92.cpp +@source:m92.cpp bmaster // (c) 1991 Irem crossbld // (c) 1991 Irem (Japan) dsoccr94j // (c) 1994 Irem (Japan) @@ -16859,7 +16859,7 @@ uccopsar // (c) 1992 Irem (World) uccopsj // (c) 1992 Irem (Japan) uccopsu // (c) 1992 Irem (US) -//@source:mac.cpp +@source:mac.cpp mac128k // 1984 Apple Macintosh mac2fdhd // 1988 Apple Macintosh II (FDHD) mac512k // 1985 Apple Macintosh 512k @@ -16898,14 +16898,14 @@ macsefd // 1988 Apple Macintosh SE (FDHD) pmac6100 // 1993 Apple Power Macintosh 6100 unitron // 1985 Unitron -//@source:macpci.cpp +@source:macpci.cpp pippin // -//@source:macrossp.cpp +@source:macrossp.cpp macrossp // (c) 1996 Banpresto quizmoon // (c) 1997 Banpresto -//@source:macs.cpp +@source:macs.cpp cultname // (c) 1995 I'Max kisekaeh // (c) 1995 I'Max kisekaem // (c) 1995 I'Max @@ -16914,15 +16914,15 @@ macsbios // yujan // (C) 1999 Yubis yuka // (c) 1999 Yubis -//@source:madalien.cpp +@source:madalien.cpp madalien // (c) 1980 madaliena // (c) 1980 madalienb // (c) 1980 -//@source:madmotor.cpp +@source:madmotor.cpp madmotor // (c) [1989] Mitchell -//@source:magic10.cpp +@source:magic10.cpp hotslot // (c) 1996 ABM Electronics magic10 // (c) 1995 A.W.P. Games magic102 // (c) 1997 ABM Games @@ -16934,7 +16934,7 @@ musicsrt // (c) 1995 ABM Games sgsafari // (c) 1996 New Impeuropex Corp. suprpool // (c) 1997 ABM Games -//@source:magicard.cpp +@source:magicard.cpp hotslots // (c) 2002 Impera magicard // (c) 199? Impera magicarda // (c) 199? Impera @@ -16943,22 +16943,22 @@ magicarde // (c) 1994 Impera magicardj // (c) 1998 Impera magicle // (c) 1998 Impera -//@source:magicfly.cpp +@source:magicfly.cpp 7mezzo // 198? Unknown bchance // 198? Unknown magicfly // (c) 198? P&A GAMES -//@source:magictg.cpp +@source:magictg.cpp magictg // (c) 199? Acclaim magictga // (c) 199? Acclaim -//@source:magmax.cpp +@source:magmax.cpp magmax // (c) 1985 -//@source:magtouch.cpp +@source:magtouch.cpp magtouch // (c) 1995 -//@source:mainevt.cpp +@source:mainevt.cpp devstors // GX890 (c) 1988 devstors2 // GX890 (c) 1988 devstors3 // GX890 (c) 1988 @@ -16968,21 +16968,21 @@ mainevt2p // GX799 (c) 1988 mainevto // GX799 (c) 1988 ringohja // GX799 (c) 1988 (Japan) -//@source:mainsnk.cpp +@source:mainsnk.cpp canvas // A3008 (c) 1985 mainsnk // (c) 1984 -//@source:majorpkr.cpp +@source:majorpkr.cpp majorpkr // (c) 1994 PAL System. -//@source:malzak.cpp +@source:malzak.cpp malzak // (c) 1980? Kitronix malzak2 // (c) 1980? Kitronix -//@source:manohman.cpp +@source:manohman.cpp manohman // 199?, Merkur. -//@source:mappy.cpp +@source:mappy.cpp digdug2 // (c) 1985 digdug2o // (c) 1985 grobda // (c) 1984 @@ -17002,7 +17002,7 @@ todruaga // (c) 1984 todruagao // (c) 1984 todruagas // (c) 1984 pcb manufactured by Sidam -//@source:marineb.cpp +@source:marineb.cpp bcruzm12 // (c) 1983 Sigma Ent. Inc. changes // (c) 1982 Orca changesa // (c) 1982 Orca + Eastern Micro Electronics license @@ -17014,10 +17014,10 @@ marineb // (c) 1982 Orca springer // (c) 1982 Orca wanted // (c) 1984 Sigma Ent. Inc. -//@source:marinedt.cpp +@source:marinedt.cpp marinedt // MG (c) 1981 Taito Corporation -//@source:mario.cpp +@source:mario.cpp dkong3abl // mario // (c) 1983 Nintendo of America mariobl // bootleg @@ -17026,31 +17026,31 @@ marioj // (c) 1983 Nintendo marioo // (c) 1983 Nintendo of America masao // bootleg -//@source:markham.cpp +@source:markham.cpp markham // TVG14 (c) 1983 Sun Electronics -//@source:marywu.cpp +@source:marywu.cpp marywu // -//@source:mastboy.cpp +@source:mastboy.cpp mastboy // (c) 1987 - No Ref on the PCB mastboyi // (c) 1987 - No Ref on the PCB mastboyia // (c) 1987 - No Ref on the PCB -//@source:matmania.cpp +@source:matmania.cpp excthour // TA-0015 (c) 1985 + Taito license maniach // TA-0017 (c) 1986 + Taito America license maniach2 // TA-0017 (c) 1986 + Taito America license matmania // TA-0015 (c) 1985 + Taito America license -//@source:maxaflex.cpp +@source:maxaflex.cpp maxaflex // mf_achas // (c) 1982 Exidy / First Star Software mf_bdash // (c) 1984 Exidy / First Star Software mf_brist // (c) 1983 Exidy / First Star Software mf_flip // (c) 1983 Exidy / First Star Software -//@source:maygay1bsw.cpp +@source:maygay1bsw.cpp m1albsq // Albert Square (Maygay) m1albsq1 // m1albsq1p // @@ -18139,7 +18139,7 @@ m1wotw // War Of The Worlds (Maygay) m1wotwa // m1wotwb // -//@source:maygayep.cpp +@source:maygayep.cpp ep_21clb // Twenty One Club (Maygay) ep_21clba // ep_25crt // 25 Carrot Gold (Maygay) @@ -18929,7 +18929,7 @@ ep_xspotb // ep_xtra // X-tra X-tra (Maygay) ep_xtraa // -//@source:maygaysw.cpp +@source:maygaysw.cpp mg_alad // Aladdin's Cave mg_bb // Big Break mg_ewg // Each Way Gambler @@ -18941,7 +18941,7 @@ mg_pbw // Pinball Wizard mg_risk // Risk mg_scl // Super Clue -//@source:maygayv1.cpp +@source:maygayv1.cpp mv1bon // Believe It Or Not mv1cpc // Caesar's Palace Club mv1cpca // @@ -18963,24 +18963,24 @@ screenp3a // screenp4 // screenpl // Screenplay -//@source:mayumi.cpp +@source:mayumi.cpp mayumi // (c) 1988 Victory L.L.C., made by Sanritsu -//@source:mazerbla.cpp +@source:mazerbla.cpp greatgun // (c) 1983 mazerbla // (c) 1983 mazerblaa // (c) 1983 -//@source:mbc200.cpp +@source:mbc200.cpp mbc200 // -//@source:mbc55x.cpp +@source:mbc55x.cpp mbc55x // Sanyo MBC-550, MBC-555 -//@source:mbdtower.cpp +@source:mbdtower.cpp mbdtower // Milton Bradley -//@source:mbee.cpp +@source:mbee.cpp mbee // Microbee 16 Standard or Plus mbee128 // Microbee 128K standard (CP/M) mbee128p // Microbee 128K premium (CP/M) @@ -18994,24 +18994,24 @@ mbeepc85s // Microbee 32 PC85 (Swedish) mbeeppc // Microbee 32 PPC85 mbeett // Microbee Teleterm -//@source:mc10.cpp +@source:mc10.cpp alice // Matra & Hachette Ordinateur Alice alice32 // Matra & Hachette Alice 32 alice90 // Matra & Hachette Alice 90 mc10 // MC-10 -//@source:mc1000.cpp +@source:mc1000.cpp mc1000 // -//@source:mc1502.cpp +@source:mc1502.cpp mc1502 // pk88 // -//@source:mc80.cpp +@source:mc80.cpp mc8020 // MC 80.2x mc8030 // MC 80.3x -//@source:mcatadv.cpp +@source:mcatadv.cpp catt // (c) 1993 Wintechno mcatadv // (c) 1993 Wintechno mcatadvj // (c) 1993 Wintechno @@ -19019,14 +19019,14 @@ nost // (c) 1993 Face nostj // (c) 1993 Face nostk // (c) 1993 Face -//@source:mcb216.cpp +@source:mcb216.cpp cb308 // mcb216 // -//@source:mccpm.cpp +@source:mccpm.cpp mccpm // -//@source:mcr.cpp +@source:mcr.cpp demoderb // (c) 1984 demoderbc // (c) 1984 domino // (c) 1982 @@ -19057,7 +19057,7 @@ twotiger // (c) 1984 twotigerc // (c) 1984 wacko // (c) 1982 -//@source:mcr3.cpp +@source:mcr3.cpp crater // (c) 1984 demoderm // (c) 1984 maxrpm // (c) 1986 @@ -19071,7 +19071,7 @@ spyhuntpr // stargrds // (c) 1987 turbotag // (c) 1985 -//@source:mcr68.cpp +@source:mcr68.cpp archrivl // (c) 1989 archrivla // (c) 1989 archrivlb // bootleg @@ -19086,23 +19086,23 @@ trisport // (c) 1989 xenophob // (c) 1987 zwackery // (c) 1984 -//@source:meadows.cpp +@source:meadows.cpp bowl3d // [1978?] deadeye // [1978?] gypsyjug // [1978?] minferno // [1978?] -//@source:meadwttl.cpp +@source:meadwttl.cpp bombaway // (c) 1976 Meadows cgunship // (c) 1976 Meadows ckidzo // (c) 1976 Meadows mead4in1 // (c) 197? Meadows -//@source:mediagx.cpp +@source:mediagx.cpp a51site4 // ?? (c) 1998 a51site4a // Sept.11,1998 (c) 1998 -//@source:megadriv.cpp +@source:megadriv.cpp 32x // 1994 Sega 32X (USA) 32x_mcd // 1995 Sega Mega-CD (Europe w/32X addon) 32x_mcdj // 1994 Sega Mega-CD (Japan w/32X addon) @@ -19129,7 +19129,7 @@ wmega // 1992 Sega Wondermega (Japan) wmegam2 // 1993 Victor Wondermega M2 (Japan) xeye // 1993 JVC X'eye (USA) -//@source:megadrvb.cpp +@source:megadrvb.cpp aladmdb // MegaDrive-based hack mk3mdb // MegaDrive-based hack sonic2mb // MegaDrive-based hack @@ -19137,10 +19137,10 @@ srmdb // MegaDrive-based hack ssf2mdb // MegaDrive-based hack topshoot // (c) 1995 Sun Mixing -//@source:megaphx.cpp +@source:megaphx.cpp megaphx // (c) 1991 Dinamic / Inder -//@source:megaplay.cpp +@source:megaplay.cpp megaplay // mp_bio // 06 mp_col3 // ?? @@ -19154,7 +19154,7 @@ mp_sonic // 01 mp_sor2 // 05 mp_twc // 04 -//@source:megasys1.cpp +@source:megasys1.cpp 64street // (c) 1991 64streetj // (c) 1991 (Japan) 64streetja // (c) 1991 (Japan) @@ -19196,7 +19196,7 @@ stdragonb // bootleg tshingen // (c) 1988 (Japan) tshingena // (c) 1988 (Japan) -//@source:megatech.cpp +@source:megatech.cpp megatech // mt_aftrb // 10 mt_arrow // 44 @@ -19247,20 +19247,20 @@ mt_tout // 61 mt_wcsoc // 21 mt_wwar // 48 -//@source:megazone.cpp +@source:megazone.cpp megazone // GX319 (c) 1983 megazonea // GX319 (c) 1983 megazoneb // GX319 (c) 1983 + Kosuka megazonec // GX319 (c) 1983 + Kosuka megazonei // GX319 (c) 1983 + Interlogic / Kosuka -//@source:meijinsn.cpp +@source:meijinsn.cpp meijinsn // (c) 1986 SNK -//@source:mekd2.cpp +@source:mekd2.cpp mekd2 // 1977 Motorola Evaluation Kit -//@source:mephisto.cpp +@source:mephisto.cpp mm2 // Mephisto 2 mm4 // Mephisto 4 mm4tk // Mephisto 4 Turbo Kit @@ -19269,11 +19269,11 @@ mm50 // Mephisto 5.0 ROM mm5tk // Mephisto 5.1 ROM Turbo Kit Speed rebel5 // Mephisto 5 -//@source:mephistp.cpp +@source:mephistp.cpp mephistp // mephistp1 // -//@source:merit.cpp +@source:merit.cpp bigappg // (c) 1986 Merit / Big Apple Games casino5 // (c) 1984 Merit couple // (c) 1988 Merit @@ -19312,7 +19312,7 @@ trvwzha // (c) 1985 Merit trvwzhb // (c) 1985 Merit trvwzv // (c) 1985 Merit -//@source:meritm.cpp +@source:meritm.cpp americna // (c) 1987 Merit americnaa // (c) 1987 Merit dodgecty // (c) 1988 Merit @@ -19366,21 +19366,21 @@ pitbosssc // (c) 1992 Merit realbrod // (c) 1995 Merit spitboss // (c) 1988 Merit -//@source:mermaid.cpp +@source:mermaid.cpp mermaid // (c) 1982 Rock-ola, made by Sanritsu rougien // (c) 1982 Sanritsu yachtmn // (c) 1982 [Sanritsu] Esco -//@source:mes.cpp +@source:mes.cpp mes // -//@source:metalmx.cpp +@source:metalmx.cpp metalmx // 136103? (c) 1994 -//@source:metlclsh.cpp +@source:metlclsh.cpp metlclsh // (c) 1985 Data East -//@source:metro.cpp +@source:metro.cpp 3kokushi // (c) 1996 Mitchell balcube // (c) 1996 bangball // (c) 1996 Banpresto / Kunihiko Tashiro+Goodhouse @@ -19423,7 +19423,7 @@ toride2j // (c) 1994 vmetal // (c) 1995 Excellent System? vmetaln // (c) 1995 Excellent System? -//@source:mexico86.cpp +@source:mexico86.cpp kicknrun // A87 (c) 1986 Taito Corporation kicknrunu // A87 (c) 1986 Taito Corporation kikikai // A85 (c) 1986 Taito Corporation @@ -19431,27 +19431,27 @@ knightb // bootleg mexico86 // bootleg (Micro Research) mexico86a // bootleg -//@source:meyc8080.cpp +@source:meyc8080.cpp casbjack // (c) 1983 Meyco Games mdrawpkr // (c) 1984 Meyco Games mdrawpkra // (c) 1984 Meyco Games wldarrow // (c) 1982 Meyco Games -//@source:meyc8088.cpp +@source:meyc8088.cpp gldarrow // (c) 1984 Meyco Games -//@source:mgames.cpp +@source:mgames.cpp mgames // (c) 1981 Merit -//@source:mgavegas.cpp +@source:mgavegas.cpp mgavegas // mgavegas133 // mgavegas21 // -//@source:mgolf.cpp +@source:mgolf.cpp mgolf // ?????? prototype 1978 [6502] -//@source:mhavoc.cpp +@source:mhavoc.cpp alphaone // (proto) (c) 1983 alphaonea // (proto) (c) 1983 mhavoc // 136025 (c) 1983 @@ -19459,51 +19459,51 @@ mhavoc2 // 136025 (c) 1983 mhavocp // 136025 (c) 1983 mhavocrv // (hack) -//@source:mice.cpp +@source:mice.cpp mice // -//@source:micral.cpp +@source:micral.cpp micral // -//@source:micro3d.cpp +@source:micro3d.cpp botss // (c) 1992 Microprose Games Inc. botss11 // (c) 1992 Microprose Games Inc. f15se // (c) 1991 Microprose Games Inc. f15se21 // (c) 1991 Microprose Games Inc. tankbatl // (c) 1992 Microprose Games Inc. -//@source:microdec.cpp +@source:microdec.cpp md2 // md3 // -//@source:microkit.cpp +@source:microkit.cpp microkit // -//@source:micronic.cpp +@source:micronic.cpp micronic // -//@source:micropin.cpp +@source:micropin.cpp pentacup // pentacup2 // -//@source:microtan.cpp +@source:microtan.cpp microtan // 1979 Microtan 65 -//@source:microvsn.cpp +@source:microvsn.cpp microvsn // Milton Bradley -//@source:midas.cpp +@source:midas.cpp hammer // (c) 2000 Andamiro livequiz // (c) 1999 Andamiro -//@source:midqslvr.cpp +@source:midqslvr.cpp arctthnd // (c) 2001 Midway Games hydrthnd // (c) 1999 Midway Games offrthnd // (c) 2000 Midway Games ultarctc // (c) 2001 Midway Games ultarctcup // (c) 2001 Midway Games -//@source:midtunit.cpp +@source:midtunit.cpp jdreddp // (c) 1993 Midway mk // (c) 1992 Midway mk2 // (c) 1993 Midway @@ -19528,7 +19528,7 @@ nbajamte2 // (c) 1994 Midway nbajamte3 // (c) 1994 Midway nbajamten // (c) 1995 Midway -//@source:midvunit.cpp +@source:midvunit.cpp crusnusa // (c) 1994 Midway crusnusa21 // (c) 1994 Midway crusnusa40 // (c) 1994 Midway @@ -19548,7 +19548,7 @@ wargods // (c) 1996 Midway (HD 10/09/1996 - Dual Resolut wargodsa // (c) 1996 Midway (HD 08/15/1996) wargodsb // (c) 1996 Midway (HD 12/11/1995) -//@source:midwunit.cpp +@source:midwunit.cpp mk3 // (c) 1994 Midway mk3p40 // (c) 1994 Midway mk3r10 // (c) 1994 Midway @@ -19566,11 +19566,11 @@ wwfmania // (c) 1995 Midway wwfmaniab // (c) 1995 Midway wwfmaniac // (c) 1995 Midway -//@source:midxunit.cpp +@source:midxunit.cpp revx // (c) 1994 Midway revxp5 // (c) 1994 Midway -//@source:midyunit.cpp +@source:midyunit.cpp hiimpact // (c) 1990 Williams hiimpact1 // (c) 1990 Williams hiimpact2 // (c) 1990 Williams @@ -19617,7 +19617,7 @@ trog4 // (c) 1990 Midway trogpa4 // (c) 1990 Midway trogpa6 // (c) 1990 Midway -//@source:midzeus.cpp +@source:midzeus.cpp crusnexo // (c) 1999 Midway (v2.4) Latest offical release crusnexoa // (c) 1999 Midway (v2.0) crusnexob // (c) 1999 Midway (v1.6) @@ -19632,25 +19632,25 @@ mk4b // (c) 1997 Midway (v1.0) thegrid // (c) 2001 Midway (v1.2) Latest offical release thegrida // (c) 2001 Midway (v1.1) -//@source:mikie.cpp +@source:mikie.cpp mikie // GX469 (c) 1984 mikiehs // GX469 (c) 1984 mikiej // GX469 (c) 1984 -//@source:mikro80.cpp +@source:mikro80.cpp kristall2 // mikro80 // radio99 // -//@source:mikromik.cpp +@source:mikromik.cpp mm1m6 // mm1m7 // -//@source:mikrosha.cpp +@source:mikrosha.cpp m86rk // mikrosha // -//@source:mil4000.cpp +@source:mil4000.cpp chewheel // (c) 200? Assogiochi Assago (Mi) mil4000 // (c) 2000 Sure Milano mil4000a // (c) 2000 Sure Milano @@ -19658,32 +19658,32 @@ mil4000b // (c) 2000 Sure Milano mil4000c // (c) 2000 Sure Milano top21 // (c) 200? Assogiochi Assago (Mi) -//@source:mini2440.cpp +@source:mini2440.cpp mini2440 // -//@source:miniboy7.cpp +@source:miniboy7.cpp miniboy7 // (c) 1983, Bonanza Enterprises miniboy7a // (c) 1983, Bonanza Enterprises -//@source:minicom.cpp +@source:minicom.cpp mcom4_02 // minicom // -//@source:minivadr.cpp +@source:minivadr.cpp minivadr // D26 cabinet test board -//@source:mirage.cpp +@source:mirage.cpp mirage // (c) 1994 Mitchell -//@source:mirax.cpp +@source:mirax.cpp mirax // (c) 1985 Current Technologies miraxa // (c) 1985 Current Technologies -//@source:missb2.cpp +@source:missb2.cpp bublpong // bootleg on enhanced hardware missb2 // bootleg on enhanced hardware -//@source:missile.cpp +@source:missile.cpp mcombat // bootleg mcombata // bootleg mcombats // bootleg @@ -19694,7 +19694,7 @@ missilem // hack suprmatk // (c) 1980 + (c) 1981 Gencomp suprmatkd // (c) 1980 + (c) 1981 Gencomp -//@source:mitchell.cpp +@source:mitchell.cpp 7toitsu // (c) 1988 Yuga bbros // (c) 1989 Capcom (US) not listed on Capcom's site block // 19/12/1991 (c) 1991 Capcom (World) (Joystick version) @@ -19726,48 +19726,48 @@ spang // 14/09/1990 (c) 1990 Mitchell (World) spangbl // bootleg spangj // --/--/1990 (c) 1990 Mitchell (Japan) -//@source:mits680b.cpp +@source:mits680b.cpp mits680b // -//@source:mjkjidai.cpp +@source:mjkjidai.cpp mjkjidai // (c) 1986 Sanritsu -//@source:mjsister.cpp +@source:mjsister.cpp mjsister // (c) 1986 Toaplan -//@source:mk1.cpp +@source:mk1.cpp ccmk1 // Chess Champion MK I -//@source:mk14.cpp +@source:mk14.cpp mk14 // -//@source:mk2.cpp +@source:mk2.cpp ccmk2 // Chess Champion MK II -//@source:mk85.cpp +@source:mk85.cpp mk85 // -//@source:mk90.cpp +@source:mk90.cpp mk90 // -//@source:mkit09.cpp +@source:mkit09.cpp mkit09 // mkit09a // -//@source:mlanding.cpp +@source:mlanding.cpp mlanding // ??? (c) 1987 Taito America Corporation (US) -//@source:mmagic.cpp +@source:mmagic.cpp mmagic // (c) 1979 Nintendo -//@source:mmd1.cpp +@source:mmd1.cpp mmd1 // mmd2 // -//@source:mmm.cpp +@source:mmm.cpp mmm_ldip // Lucky Dip -//@source:mmodular.cpp +@source:mmodular.cpp academy // 1989 Mephisto Academy Schachcomputer alm16 // 1988 Mephisto Almeria 68000 alm32 // 1988 Mephisto Alimera 68020 @@ -19794,10 +19794,10 @@ sfortec // 1989 Novag Super Forte C Chess Computer van16 // 1991 Mephisto Vancouver 68000 van32 // 1991 Mephisto Vancouver 68020 -//@source:mod8.cpp +@source:mod8.cpp mod8 // -//@source:model1.cpp +@source:model1.cpp netmerc // ?? Info available in time ?? swa // 1994.04 Star Wars Arcade vf // 1993.12 Virtua Fighter @@ -19807,7 +19807,7 @@ wingwar // 1994.06 Wing War wingwarj // 1994.06 Wing War (Japan) wingwaru // 1994.09 Wing War (US) -//@source:model2.cpp +@source:model2.cpp bel // 1998.12 Behind Enemy Lines daytona // 1994.03 Daytona USA (Japan, Revision A) daytona93 // @@ -19875,7 +19875,7 @@ zeroguna // 1997.12 Zero Gunner (Export) zerogunaj // 1997.12 Zero Gunner (Japan) zerogunj // 1997.12 Zero Gunner (Japan) -//@source:model3.cpp +@source:model3.cpp bass // 1997.12 Get Bass bassdx // dayto2pe // 1998.12 Daytone USA 2 Power Edition @@ -19921,34 +19921,34 @@ vs299a // 1999.?? Virtual Striker 2 ver.99 (rev A) vs299b // 1999.?? Virtual Striker 2 ver.99 (rev B) vs2v991 // 1999.?? Virtual Striker 2 ver.99.1 -//@source:modellot.cpp +@source:modellot.cpp modellot // -//@source:mogura.cpp +@source:mogura.cpp mogura // GX141 (c) 1991 -//@source:mole.cpp +@source:mole.cpp mole // (c) 1982 Yachiyo Electronics, Ltd. -//@source:molecular.cpp +@source:molecular.cpp molecula // -//@source:momoko.cpp +@source:momoko.cpp momoko // (c) 1986 Jaleco -//@source:monacogp.cpp +@source:monacogp.cpp monacogp // (c) 1980 Sega monacogpa // (c) 1980 Sega -//@source:monty.cpp +@source:monty.cpp mmonty // Ritam monty // Ritam -//@source:monzagp.cpp +@source:monzagp.cpp monzagp // (c) 1981 Olympia monzagpb // bootleg -//@source:moo.cpp +@source:moo.cpp bucky // GX173 (c) 1992 (World) buckyaab // GX173 (c) 1992 (Asia) buckyea // GX173 (c) 1992 (World) @@ -19959,32 +19959,32 @@ moomesabl // bootleg moomesauab // GX151 (c) 1992 (US) moomesauac // GX151 (c) 1992 (US) -//@source:mosaic.cpp +@source:mosaic.cpp gfire2 // (c) 1992 Topis Corp mosaic // (c) 1990 Space mosaica // (c) 1990 Space + Fuuki license -//@source:mouser.cpp +@source:mouser.cpp mouser // UPL-83001 (c) 1983 mouserc // UPL-83001 (c) 1983 -//@source:mpf1.cpp +@source:mpf1.cpp mpf1 // 1979 Multitech Micro Professor 1 mpf1b // 1979 Multitech Micro Professor 1B mpf1p // -//@source:mps1230.cpp +@source:mps1230.cpp mps1000 // 1986 Commodore MPS-1000 (dot matrix printer) mps1230 // 1988 Commodore MPS-1230 near-letter-quality dot matrix printer -//@source:mpu12wbk.cpp +@source:mpu12wbk.cpp fruitstb // -//@source:mpu2.cpp +@source:mpu2.cpp m2hilite // Hi-Lights (Barcrest) (MPU2) m2svlite // Silver Lights (Barcrest) (MPU2) -//@source:mpu3.cpp +@source:mpu3.cpp m3acech // Ace Chase (Bwb) m3autort // Autoroute (Barcrest) m3bankr // Banker (Bwb) @@ -20067,7 +20067,7 @@ m3xchngg // Exchanges Galore (Barcrest) m3xchngu // Exchanges Unlimited (Barcrest) m3xchngua // -//@source:mpu4.cpp +@source:mpu4.cpp m4aao // Against All Odds (Eurotek) m4addrd // m4aliz // AlizBaz (Qps) @@ -20327,7 +20327,7 @@ m4wnud // Unknown MPU4 'W Nudge' m4zill // Zillionare's Challenge (Pure Leisure) m4zilla // -//@source:mpu4avan.cpp +@source:mpu4avan.cpp m4abeaut // m4abeaut_1 // m4abeaut_2 // @@ -20829,7 +20829,7 @@ m4trg__x // m4trg__y // m4trg__z // -//@source:mpu4bwb.cpp +@source:mpu4bwb.cpp m4abra // Abracadabra (Bwb) m4abra__a // m4abra__b // @@ -21291,7 +21291,7 @@ m4xtrm // X-treme (Bwb) m4xtrm__a // m4xtrm__b // -//@source:mpu4concept.cpp +@source:mpu4concept.cpp m4nudgwc // Nudge a Win (Concept) m4nudgwc__a // m4nudgwc__b // @@ -21363,7 +21363,7 @@ m4spnwnc // Spin-A-Win (Concept) m4spnwnc__a // m4spnwnc__b // -//@source:mpu4crystal.cpp +@source:mpu4crystal.cpp m4aladn // Aladdin's Cave (Crystal) m4aladna // m4aladnb // @@ -21466,10 +21466,10 @@ m4twstrd // m4tylb // Thank Your Lucky Bars (Crystal) m4tylba // -//@source:mpu4dealem.cpp +@source:mpu4dealem.cpp v4dealem // Deal 'Em -//@source:mpu4empire.cpp +@source:mpu4empire.cpp m4apachg // Apache Gold (Empire) m4apachga // m4apachgb // @@ -21552,7 +21552,7 @@ m4ttrail // Treasure Trail (Empire) m4ttraila // m4ttrailb // -//@source:mpu4mdm.cpp +@source:mpu4mdm.cpp m42punlm // 2p Unlimited (Mdm) m4bigapl // The Big Apple (Mdm) m4bigapla // @@ -21598,7 +21598,7 @@ m4themob // The Mob (Mdm) m4themoba // m4themobb // -//@source:mpu4misc.cpp +@source:mpu4misc.cpp m4bangin // Bangin' Away (Global) m4bangina // m4banginb // @@ -21737,7 +21737,7 @@ m4wwc // Wacky Weekend Club (Global) m4wwca // m4wwcb // -//@source:mpu4mod2sw.cpp +@source:mpu4mod2sw.cpp m421 // Twenty One (Barcrest) m421club // 21 Club (Barcrest) m4actbnka // @@ -21982,7 +21982,7 @@ m4wayin // Way In (Barcrest) m4wayina // m4wildms // Wild Mystery (Barcrest) -//@source:mpu4mod4yam.cpp +@source:mpu4mod4yam.cpp m4acechs // Ace Chase (Bwb) m4acechs__a // m4acechs__b // @@ -22265,7 +22265,7 @@ m4vivalv__y // m4vivalv__z // m4voodoo // Voodoo 1000 (Barcrest) -//@source:mpu4plasma.cpp +@source:mpu4plasma.cpp m4apach // Apache (Barcrest) m4bigchf // Big Chief (Barcrest) m4bigchfa // @@ -22274,7 +22274,7 @@ m4bigchfc // m4click // Clickity Click (Barcrest) m4elite // Elite (Barcrest) -//@source:mpu4sw.cpp +@source:mpu4sw.cpp m4actbnk // Action Bank (Barcrest) m4actbnk__a // m4actbnk__b // @@ -25654,7 +25654,7 @@ m4wta__x // m4wta__y // m4wta__z // -//@source:mpu4union.cpp +@source:mpu4union.cpp m4crzbn // Crazy Bingo m4cwalk // Cake Walk (Union) m4eezee // Eezee Fruits (Union) @@ -25688,7 +25688,7 @@ m4uniboxa // m4unique // Unique (Union) m4uniquep // -//@source:mpu4vid.cpp +@source:mpu4vid.cpp v4addlad // Adders and Ladders v4addlad20 // v4barqs2 // Barquest 2 (v0.3) @@ -25767,7 +25767,7 @@ v4vgpok // Vegas Poker (prototype release 2) v4wize // Wize Move (v1.3d) v4wizea // Wize Move -//@source:mpu5.cpp +@source:mpu5.cpp m55050 // Fifty Fifty (Bwb) m5aceclb // Ace Of Clubs (Empire) m5aceclba // @@ -26399,13 +26399,13 @@ m5xfact04 // m5xfact11 // m5zigzag // Zig Zag -//@source:mpz80.cpp +@source:mpz80.cpp mpz80 // -//@source:mquake.cpp +@source:mquake.cpp mquake // (c) 1987 -//@source:mrdo.cpp +@source:mrdo.cpp mrdo // 8201 (c) 1982 mrdofix // 8201 (c) 1982 + Taito license mrdot // 8201 (c) 1982 + Taito license @@ -26414,25 +26414,25 @@ mrdu // bootleg mrlo // bootleg yankeedo // bootleg -//@source:mrflea.cpp +@source:mrflea.cpp mrflea // (c) 1982 -//@source:mrgame.cpp +@source:mrgame.cpp dakar // macattck // motrshow // motrshowa // wcup90 // -//@source:mrjong.cpp +@source:mrjong.cpp blkbustr // (c) 1983 Kiwako + ECI license crazyblk // (c) 1983 Kiwako + ECI license mrjong // (c) 1983 Kiwako -//@source:ms0515.cpp +@source:ms0515.cpp ms0515 // -//@source:ms32.cpp +@source:ms32.cpp 47pie2 // (c) 1994 47pie2o // (c) 1994 akiss // (c) 1995 @@ -26451,19 +26451,19 @@ tetrisp // (c) 1995 Jaleco / BPS tp2m32 // (c) 1997 wpksocv2 // (c) 1997 -//@source:ms9540.cpp +@source:ms9540.cpp ms9540 // -//@source:msbc1.cpp +@source:msbc1.cpp msbc1 // -//@source:msisaac.cpp +@source:msisaac.cpp msisaac // A34 (c) 1985 Taito Corporation -//@source:mstation.cpp +@source:mstation.cpp mstation // -//@source:msx.cpp +@source:msx.cpp ax150 // ax170 // ax350 // @@ -26711,18 +26711,18 @@ yis503m // yis604 // yis60464 // -//@source:mt735.cpp +@source:mt735.cpp mt735 // -//@source:mtx.cpp +@source:mtx.cpp mtx500 // 1983 Memotech MTX 500 mtx512 // 1983 Memotech MTX 512 rs128 // 1984 Memotech RS 128 -//@source:mugsmash.cpp +@source:mugsmash.cpp mugsmash // (c) Electronic Devices (Italy) / 3D Games (England) -//@source:multfish.cpp +@source:multfish.cpp crzmon2 // (c) 2010 crzmon2_2 // (c) 2010 crzmon2_3 // (c) 2010 @@ -26820,7 +26820,7 @@ sweetl2_3 // (c) 2007 sweetl2_4 // (c) 2007 windjamr // (c) 2002 -//@source:multfish_boot.cpp +@source:multfish_boot.cpp czmon_7a // bootleg - Crazy Monkey czmon_7b // bootleg czmon_8a // bootleg @@ -26932,13 +26932,13 @@ sweetl2_2d // bootleg sweetla // bootleg - Sweet Life sweetlb // bootleg -//@source:multi16.cpp +@source:multi16.cpp multi16 // -//@source:multi8.cpp +@source:multi8.cpp multi8 // -//@source:multigam.cpp +@source:multigam.cpp multigam // 1992 multigm2 // 1992 multigm3 // 19?? @@ -26947,27 +26947,27 @@ multigmt // sgmt1 // 1994 supergm3 // 1996 -//@source:munchmo.cpp +@source:munchmo.cpp joyfulr // A2001 (c) 1983 mnchmobl // A2001 (c) 1983 + Centuri license -//@source:murogem.cpp +@source:murogem.cpp lasvegas // hack murogem // ??? murogema // ??? murogemb // ??? -//@source:murogmbl.cpp +@source:murogmbl.cpp murogmbl // ??? -//@source:mustache.cpp +@source:mustache.cpp mustache // (c) 1987 March -//@source:mw18w.cpp +@source:mw18w.cpp 18w // 653 (c) 1979 Midway 18w2 // 653 (c) 1979 Midway -//@source:mw8080bw.cpp +@source:mw8080bw.cpp 280zzzap // 610 [1976] blueshrk // 742 [1978] boothill // 612 [1977] @@ -26996,27 +26996,27 @@ spacwalk // 640 [1978] spcenctr // 645 (c) 1980 Midway tornbase // 605 [1976] -//@source:mwarr.cpp +@source:mwarr.cpp mwarr // -//@source:mwsub.cpp +@source:mwsub.cpp submar // 760 (c) 1979 Midway -//@source:mx2178.cpp +@source:mx2178.cpp mx2178 // -//@source:myb3k.cpp +@source:myb3k.cpp myb3k // -//@source:mycom.cpp +@source:mycom.cpp mycom // -//@source:mystston.cpp +@source:mystston.cpp mystston // TA-0010 (c) 1984 myststono // TA-0010 (c) 1984 myststonoi // PCB manufactured by Itisa -//@source:mystwarr.cpp +@source:mystwarr.cpp dadandrn // GX170 (c) 1993 (Japan) gaiapols // GX123 (c) 1993 (Europe) gaiapolsj // GX123 (c) 1993 (Japan) @@ -27043,43 +27043,43 @@ viostormj // GX168 (c) 1993 (Japan) viostormu // GX168 (c) 1993 (US) viostormub // GX168 (c) 1993 (US) -//@source:myvision.cpp +@source:myvision.cpp myvision // -//@source:mz2000.cpp +@source:mz2000.cpp mz2000 // 1981 Sharp MZ2000 mz2200 // 1981 Sharp MZ2200 -//@source:mz2500.cpp +@source:mz2500.cpp mz2500 // 1985 Sharp MZ2500 mz2520 // 1985 Sharp MZ2520 -//@source:mz3500.cpp +@source:mz3500.cpp mz3500 // 198? Sharp MZ3500 -//@source:mz6500.cpp +@source:mz6500.cpp mz6500 // 198? Sharp MZ6500 -//@source:mz700.cpp +@source:mz700.cpp mz1500 // 1984 Sharp MZ1500 mz700 // 1982 Sharp MZ700 mz700j // 1982 Sharp MZ700 Japan mz800 // 1984 Sharp MZ800 -//@source:mz80.cpp +@source:mz80.cpp mz80a // 1982 Sharp MZ80A mz80b // 1981 Sharp MZ80B mz80k // 1979 Sharp MZ80K mz80kj // 1979 Sharp MZ80K -//@source:mzr8105.cpp +@source:mzr8105.cpp mzr8105 // -//@source:n64.cpp +@source:n64.cpp n64 // Nintendo N64 n64dd // Nintendo N64 (64DD Attachment) -//@source:n8080.cpp +@source:n8080.cpp bandido // (c) 1980 Exidy helifire // (c) 1980 Nintendo helifirea // (c) 1980 Nintendo @@ -27093,7 +27093,7 @@ spacefevo2 // (c) 1979 Nintendo spacelnc // (c) 1979 Nintendo westgun2 // (c) 1980 Taito Corporation -//@source:nakajies.cpp +@source:nakajies.cpp dator3k // 199? Dator 3000 (Spanish) drwrt100 // 199? NTS DreamWriter T100 drwrt200 // 199? NTS DreamWriter T200 @@ -27102,13 +27102,13 @@ drwrt450 // 199? NTS DreamWriter 450 es210_es // wales210 // 199? Walther ES-210 (German) -//@source:namcofl.cpp +@source:namcofl.cpp finalapr // (c) 1995 finalaprj // (c) 1995 finalapro // (c) 1995 speedrcr // (c) 1995 -//@source:namcona1.cpp +@source:namcona1.cpp bkrtmaq // (c) 1992 (Japan) cgangpzl // (c) 1992 (US) cgangpzlj // (c) 1992 (Japan) @@ -27130,7 +27130,7 @@ swcourtj // (c) 1992 (Japan) tinklpit // (c) 1993 (Japan) xday2 // (c) 1995 (Japan) -//@source:namconb1.cpp +@source:namconb1.cpp gslgr94j // (c) 1994 (Japan) gslgr94u // (c) 1994 gslugrsj // (c) 1993 (Japan) @@ -27148,14 +27148,14 @@ sws96 // (c) 1996 (Japan) sws97 // (c) 1997 (Japan) vshoot // (c) 1994 -//@source:namcond1.cpp +@source:namcond1.cpp ncv1 // (c) 1995 ncv1j // (c) 1995 (Japan) ncv1j2 // (c) 1995 (Japan) ncv2 // (c) 1996 ncv2j // (c) 1996 (Japan) -//@source:namcops2.cpp +@source:namcops2.cpp bldyr3b // cobrata // dragchrn // @@ -27209,7 +27209,7 @@ zgundmdx // zoidiexp // zoidsinf // -//@source:namcos1.cpp +@source:namcos1.cpp bakutotu // (c) 1988 (Japan) berabohm // (c) 1988 (Japan, Rev C) berabohmb // (c) 1988 (Japan, Rev B) @@ -27249,7 +27249,7 @@ ws90 // (c) 1990 (Japan) youkaidk1 // (c) 1987 (Japan, old version (YD1)) youkaidk2 // (c) 1987 (Japan, new version (YD2, Rev B)) -//@source:namcos10.cpp +@source:namcos10.cpp chocovdr // 2002.10 Uchuu Daisakusen : Chocovader Contactee gamshara // 2002.08 Gamshara (10021 Ver.A) gjspace // 2001.12 Gekitoride-Jong Space (10011 Ver.A) @@ -27265,7 +27265,7 @@ panikuru // 2002.03 Panicuru Panekuru ptblank3 // 2000.12 Point Blank 3 (GNN2 Ver.A) startrgn // 2002.07 Star Trigon (STT1 Ver.A) -//@source:namcos11.cpp +@source:namcos11.cpp danceyes // 1996.10 Dancing Eyes (US, DC3/VER.C) danceyesj // 1996.09 Dancing Eyes (Japan, DC1/VER.A) dunkmnia // 1996.05 Dunk Mania (Asia, DM2/VER.C) @@ -27292,7 +27292,7 @@ tekkenac // 1995.01 Tekken (Asia, TE2/VER.C) tekkenjb // 1994.12 Tekken (Japan, TE1/VER.B) xevi3dg // 1996.05 Xevious 3D/G (Japan, XV31/VER.A) -//@source:namcos12.cpp +@source:namcos12.cpp aplarail // 1998.12 Attack Pla Rail aquarush // 2000.02 Aqua Rush (AQ1/VER.A1, Japan) ehrgeiz // 1998.?? Ehrgeiz (US, EG3/VER.A) @@ -27346,7 +27346,7 @@ tenkomorja // 1998.12 Tenkomori Shooting (Japan, TKM1/VER.A toukon3 // 1997.12 Shin Nihon Pro Wrestling Toukon Retsuden 3 Arcade Edition (Japan, TR1/VER.A) truckk // 2000.06 Truck Kyousoukyoku (Metro) -//@source:namcos2.cpp +@source:namcos2.cpp assault // (c) 1988 assaultj // (c) 1988 (Japan) assaultp // (c) 1988 (Japan) @@ -27402,7 +27402,7 @@ sws92g // (c) 1992 (Japan) sws93 // (c) 1993 (Japan) valkyrie // (c) 1989 (Japan) -//@source:namcos21.cpp +@source:namcos21.cpp aircomb // (c) 1992 (US) aircombj // (c) 1992 (Japan) cybsled // (c) 1993 (World) @@ -27415,7 +27415,7 @@ winrun // (c) 1988 winrun91 // (c) 1991 winrungp // (c) 1989 -//@source:namcos22.cpp +@source:namcos22.cpp acedrvrw // (c) 1994 adillor // (c) 1997 airco22b // (c) 1995 @@ -27445,7 +27445,7 @@ timecrisa // (c) 1995 tokyowar // (c) 1996 victlapw // (c) 1996 -//@source:namcos23.cpp +@source:namcos23.cpp 500gp // March 1999 aking // Angler King - March 1999 crszone // Crisis Zone - December 1999 @@ -27474,7 +27474,7 @@ timecrs2 // April 1998 timecrs2v2b // April 1998 timecrs2v4a // April 1998 -//@source:namcos86.cpp +@source:namcos86.cpp genpeitd // (c) 1986 hopmappy // (c) 1986 roishtar // (c) 1986 @@ -27487,10 +27487,10 @@ skykiddx // (c) 1986 skykiddxo // (c) 1986 wndrmomo // (c) 1987 -//@source:nanos.cpp +@source:nanos.cpp nanos // -//@source:naomi.cpp +@source:naomi.cpp 18wheelr // 2000.01 18 Wheeler Deluxe (Rev A) 18wheels // 2000.01 18 Wheeler (Standard) 18wheelu // 2000.01 18 Wheeler (Upright) @@ -27757,12 +27757,12 @@ zombrvn // 1999.03 Zombie Revenge (Rev A) zombrvno // 1999.02 Zombie Revenge zunou // 2006.07 Touch de Zunou -//@source:nascom1.cpp +@source:nascom1.cpp nascom1 // 1978 Nascom 1 nascom2 // 1979 Nascom 2 nascom2c // 1980 Nascom 2 (CP/M) -//@source:naughtyb.cpp +@source:naughtyb.cpp naughtyb // (c) 1982 Jaleco naughtyba // bootleg naughtybc // (c) 1982 Jaleco + Cinematronics @@ -27776,7 +27776,7 @@ trvmstra // (c) 1985 Enerdyne Technologies Inc. trvmstrb // (c) 1985 Enerdyne Technologies Inc. trvmstrc // (c) 1985 Enerdyne Technologies Inc. -//@source:nbmj8688.cpp +@source:nbmj8688.cpp apparel // (c) 1986 Central Denshi barline // (c) 1986? bijokkog // (c) 1988 @@ -27817,7 +27817,7 @@ seiha // (c) 1987 seiham // (c) 1987 vipclub // (c) 1988 Daiichi Denshi -//@source:nbmj8891.cpp +@source:nbmj8891.cpp abunai // (c) 1989 bananadr // (c) 1989 DIGITAL SOFT chinmoku // (c) 1990 @@ -27853,11 +27853,11 @@ scandalm // (c) 1989 taiwanmb // (c) 1988 telmahjn // (c) 1988 -//@source:nbmj8900.cpp +@source:nbmj8900.cpp ohpaipee // (c) 1990 Nichibutsu togenkyo // (c) 1990 Nichibutsu -//@source:nbmj8991.cpp +@source:nbmj8991.cpp av2mj1bb // (c) 1991 MIKI SYOUJI/AV JAPAN av2mj2rg // (c) 1991 MIKI SYOUJI/AV JAPAN finalbny // (c) 1991 @@ -27877,7 +27877,7 @@ triplew2 // (c) 1990 uchuuai // (c) 1989 vanilla // (c) 1991 -//@source:nbmj9195.cpp +@source:nbmj9195.cpp bakuhatu // (c) 1991 cmehyou // (c) 1992 Nichibutsu/Kawakusu gal10ren // (c) 1993 FUJIC @@ -27911,13 +27911,13 @@ wcatcher // (c) 1993 yosimotm // (c) 1994 Nichibutsu/Yoshimoto Kougyou yosimoto // (c) 1994 Nichibutsu/Yoshimoto Kougyou -//@source:nc.cpp +@source:nc.cpp dw225 // nc100 // 1992 NC100 nc150 // 1992 NC150 nc200 // 1993 NC200 -//@source:nemesis.cpp +@source:nemesis.cpp blkpnthr // GX604 (c) 1987 (Japan) bubsys // citybomb // GX787 (c) 1987 (World) @@ -27938,10 +27938,10 @@ salamand // GX587 (c) 1986 salamandj // GX587 (c) 1986 twinbee // GX412 (c) 1985 -//@source:neogeo.cpp +@source:neogeo.cpp neogeo // -//@source:neogeo_noslot.cpp +@source:neogeo_noslot.cpp 2020bb // 0030 (c) 1991 SNK / Pallas 2020bba // 0030 (c) 1991 SNK / Pallas 2020bbh // 0030 (c) 1991 SNK / Pallas @@ -28198,16 +28198,16 @@ zedblade // 0076 (c) 1994 NMK zintrckb // 0211 hack - this is not a genuine MVS proto, its a bootleg made from the CD version zupapa // 0070 Zupapa - released in 2001, 1994 prototype probably exists -//@source:neoprint.cpp +@source:neoprint.cpp 98best44 // neoprint // npcartv1 // nprsp // -//@source:neptunp2.cpp +@source:neptunp2.cpp neptunp2 // -//@source:nes.cpp +@source:nes.cpp dendy // Dendy (Classic russian famiclone) drpcjr // Bung Doctor PC Jr famicom // Nintendo Family Computer (a.k.a. Famicom) @@ -28218,16 +28218,16 @@ m82 // Nintendo M82 Display Unit nes // Nintendo Entertainment System nespal // Nintendo Entertainment System PAL -//@source:newbrain.cpp +@source:newbrain.cpp newbrain // newbraina // newbrainmd // -//@source:news.cpp +@source:news.cpp news // "Virus"??? ((c) 1993 Poby in ROM VIRUS.4) newsa // "Jeansole / Poby -//@source:next.cpp +@source:next.cpp next // nextct // nextctc // @@ -28237,29 +28237,29 @@ nextsc // nextst // nextstc // -//@source:nexus3d.cpp +@source:nexus3d.cpp acheart // acheartf // (c) 2006 Examu -//@source:ng_aes.cpp +@source:ng_aes.cpp aes // NeoGeo AES neocd // NeoGeo CD neocdz // NeoGeo CDZ neocdzj // -//@source:ngen.cpp +@source:ngen.cpp 386i // 199? ngen // 1983 ngenb38 // 1991 -//@source:ngp.cpp +@source:ngp.cpp ngp // NeoGeo Pocket ngpc // NeoGeo Pocket Color -//@source:nibble.cpp +@source:nibble.cpp l9nibble // unknown Nibble game. -//@source:nightgal.cpp +@source:nightgal.cpp ngalsumr // (c) 1985 ngtbunny // (c) 1984 nightgal // (c) 1984 @@ -28268,7 +28268,7 @@ royalqn // sexygal // (c) 1985 sweetgal // (c) 1985 -//@source:ninjakd2.cpp +@source:ninjakd2.cpp arkarea // UPL-87007 (c) 1988 (Arcade TV Game List - P.67, Right, 2 from top) jt104 // hack? mnight // UPL-????? (c) 1987 distributed by Kawakus @@ -28283,23 +28283,23 @@ robokid // UPL-88013 (c) 1988 robokidj // UPL-88013 (c) 1988 robokidj2 // UPL-88013 (c) 1988 -//@source:ninjaw.cpp +@source:ninjaw.cpp darius2 // C07 (c) 1989 Taito Corporation (Japan) ninjaw // B31 (c) 1987 Taito Corporation Japan (World) ninjawj // B31 (c) 1987 Taito Corporation (Japan) ninjawu // B31 (c) 1987 Taito America Corporation (US) -//@source:nitedrvr.cpp +@source:nitedrvr.cpp nitedrvr // 006321 1976/10 [6502] -//@source:niyanpai.cpp +@source:niyanpai.cpp 4psimasy // (c) 1994 mhhonban // (c) 199? musobana // (c) 1995 niyanpai // (c) 1996 zokumahj // (c) 199? -//@source:nmg5.cpp +@source:nmg5.cpp 7ordi // (c) 2002 Yun Sung garogun // (c) 2000 Yun Sung nmg5 // (c) 1998 Yun Sung @@ -28313,7 +28313,7 @@ searchp2 // (c) 1999 Yun Sung wondstck // (c) ???? Yun Sung wondstcka // (c) ???? Yun Sung -//@source:nmk16.cpp +@source:nmk16.cpp acrobatm // UPL-91073 (c) 1991 UPL + Taito license airattck // (c) 1996 Comad airattcka // (c) 1996 Comad @@ -28383,7 +28383,7 @@ vandykeb // bootleg vandykejal // UPL-90064 (c) Jaleco vandykejal2 // UPL-90064 (c) Jaleco -//@source:nokia_3310.cpp +@source:nokia_3310.cpp noki3210 // noki3310 // noki3330 // @@ -28397,7 +28397,7 @@ noki8250 // noki8850 // noki8890 // -//@source:norautp.cpp +@source:norautp.cpp bjpoker // (c) M. Kramer Inc. cgip30cs // (c) 1999, CGI df_djpkr // (c) DellFern Ltd. @@ -28435,10 +28435,10 @@ smshilo // (c) 1983 SMS Manufacturing Corp. ssjkrpkr // (c) 1982 Southern Systems & Assembly, Ltd. tpoker2 // (c) 1993 Micro Manufacturing, Inc. -//@source:notetaker.cpp +@source:notetaker.cpp notetakr // -//@source:nova2001.cpp +@source:nova2001.cpp ninjakun // UPL-84003 (c) 1984 Taito Corporation nova2001 // UPL-83005 (c) 1983 nova2001h // hack? @@ -28448,13 +28448,13 @@ pkunwarj // UPL-????? (c) 1985 (Arcade Game TV List - P.9 raiders5 // UPL-85004 (c) 1985 raiders5t // UPL-85004 (c) 1985 Taito license -//@source:nsm.cpp +@source:nsm.cpp firebird // -//@source:nsmpoker.cpp +@source:nsmpoker.cpp nsmpoker // -//@source:nss.cpp +@source:nss.cpp nss // nss_actr // 1992 Enix nss_adam // 1992 Ocean @@ -28469,7 +28469,7 @@ nss_smw // 1991 Nintendo nss_ssoc // 1992 Human Inc. nss_sten // 199? Nintendo -//@source:nwk-tr.cpp +@source:nwk-tr.cpp racingj // GX676 (c)1998 racingj2 // GX888 (c)1999 (EAE) racingj2j // GX888 (c)1999 (JAE) @@ -28477,96 +28477,96 @@ thrilld // GX713 (c)1998 Japan JAE thrilldae // GX713 (c)1998 Europe EAA thrilldb // GX713 (c)1998 Japan JAB -//@source:nycaptor.cpp +@source:nycaptor.cpp bronx // bootleg colt // bootleg cyclshtg // A97 (c) 1986 Taito Corporation nycaptor // A50 (c) 1985 Taito Corporation -//@source:nyny.cpp +@source:nyny.cpp nyny // (c) 1980 Sigma Ent. Inc. nynyg // (c) 1980 Sigma Ent. Inc. + Gottlieb warcadia // (c) 1982 Sigma Ent. Inc. -//@source:ob68k1a.cpp +@source:ob68k1a.cpp ob68k1a // -//@source:octopus.cpp +@source:octopus.cpp octopus // -//@source:odyssey2.cpp +@source:odyssey2.cpp g7400 // 1983 Videopac Plus G7400 jopac // 1983 Jopac JO7400 odyssey2 // Magnavox Odyssey 2 - 1978-1983 odyssey3 // Magnavox Odyssey 3 / Command Center (prototype) videopac // 1979 Videopac G7000/C52 -//@source:offtwall.cpp +@source:offtwall.cpp offtwall // 136090 (c) 1991 offtwallc // 136090 (c) 1991 -//@source:ohmygod.cpp +@source:ohmygod.cpp naname // (c) 1994 Atlus (Japan) ohmygod // (c) 1993 Atlus (Japan) -//@source:ojankohs.cpp +@source:ojankohs.cpp ccasino // [1987] V-System Co. (Japan) ojanko2 // [1987] V-System Co. (Japan) ojankoc // [1986] V-System Co. (Japan) ojankohs // [1988] V-System Co. (Japan) ojankoy // [1986] V-System Co. (Japan) -//@source:okean240.cpp +@source:okean240.cpp okean240 // okean240a // okean240t // -//@source:olibochu.cpp +@source:olibochu.cpp olibochu // M47 (c) 1981 + "GDI presents" -//@source:omegrace.cpp +@source:omegrace.cpp deltrace // bootleg omegrace // (c) 1981 Midway omegrace2 // (c) 1981 Midway -//@source:ondra.cpp +@source:ondra.cpp ondrat // ondrav // -//@source:oneshot.cpp +@source:oneshot.cpp maddonna // (c) 1995 Tuning maddonnb // (c) 1995 Tuning oneshot // no copyright notice -//@source:onetwo.cpp +@source:onetwo.cpp onetwo // (c) 1997 Barko onetwoe // (c) 1997 Barko -//@source:onyx.cpp +@source:onyx.cpp c8002 // -//@source:opwolf.cpp +@source:opwolf.cpp opwolf // B20 (c) 1987 Taito Corporation Japan (World) opwolfa // B20 (c) 1987 Taito Corporation Japan (World) opwolfb // bootleg opwolfj // B20 (c) 1987 Taito Corporation (Japan) opwolfu // B20 (c) 1987 Taito America Corporation (US) -//@source:orao.cpp +@source:orao.cpp orao // orao103 // -//@source:orbit.cpp +@source:orbit.cpp orbit // 033689-033702 1978/11 [6800] -//@source:oric.cpp +@source:oric.cpp oric1 // 1983 Oric 1 orica // 1984 Oric Atmos prav8d // 1985 Pravetz 8D prav8dd // 1989 Pravetz 8D (Disk ROM) telstrat // ??? Oric Telestrat/Stratos -//@source:orion.cpp +@source:orion.cpp orion128 // orionide // orionidm // @@ -28575,54 +28575,54 @@ orionpro // orionz80 // orionzms // -//@source:osbexec.cpp +@source:osbexec.cpp osbexec // 1982 Osborne Executive -//@source:osborne1.cpp +@source:osborne1.cpp osborne1 // 1981 Osborne-1 -//@source:osi.cpp +@source:osi.cpp c1p // c1pmf // sb2m600b // uk101 // -//@source:othello.cpp +@source:othello.cpp othello // (c) 1984 Success. -//@source:othunder.cpp +@source:othunder.cpp othunder // B67 (c) 1988 Taito Corporation Japan (World) othunderj // B67 (c) 1988 Taito Corporation (Japan) othunderu // B67 (c) 1988 Taito America Corporation (US) othunderuo // B67 (c) 1988 Taito America Corporation (US) -//@source:overdriv.cpp +@source:overdriv.cpp overdriv // GX789 (c) 1990 overdriva // GX789 (c) 1990 overdrivb // GX789 (c) 1990 -//@source:p112.cpp +@source:p112.cpp p112 // -//@source:p2000t.cpp +@source:p2000t.cpp p2000m // 1980 P2000M p2000t // 1980 P2000T -//@source:p8k.cpp +@source:p8k.cpp p8000 // p8000_16 // -//@source:pachifev.cpp +@source:pachifev.cpp pachifev // (c) 1983? -//@source:pacland.cpp +@source:pacland.cpp pacland // (c) 1984 paclandj // (c) 1984 paclandjo // (c) 1984 paclandjo2 // (c) 1984 paclandm // (c) 1984 Midway -//@source:pacman.cpp +@source:pacman.cpp 8bpm // (c) 1985 Seatongrove Ltd (Magic Eletronics USA license) abscam // hack acitya // (c) 1983 Epos Corporation @@ -28729,7 +28729,7 @@ vanvank // (c) 1983 Karateco (bootleg?) woodpeca // (c) 1981 Amenip Nova Games Ltd. woodpeck // (c) 1981 Amenip (Palcom Queen River) -//@source:palm.cpp +@source:palm.cpp palmiii // Palm III palmiiic // Palm IIIc palmm100 // Palm m100 @@ -28747,20 +28747,20 @@ spt1700 // Symbol SPT 1700 spt1740 // Symbol SPT 1740 visor // Palm Visor Edge -//@source:palmz22.cpp +@source:palmz22.cpp palmz22 // Palm Z22 -//@source:pandoras.cpp +@source:pandoras.cpp pandoras // GX328 (c) 1984 + Interlogic -//@source:pangofun.cpp +@source:pangofun.cpp pangofun // (c) 1995 InfoCube -//@source:panicr.cpp +@source:panicr.cpp panicr // Seibu / Taito panicrg // Seibu / TV-Tuning (Germany) -//@source:paradise.cpp +@source:paradise.cpp madball // (c) 1998 Yun Sung madballn // (c) 1998 Yun Sung para2dx // (c) >1994 Yun Sung @@ -28773,58 +28773,58 @@ tgtball // (c) 1995 Yun Sung tgtballa // (c) 1995 Yun Sung torus // (c) 1996 Yun Sung -//@source:paranoia.cpp +@source:paranoia.cpp paranoia // (c) 1990 Naxat Soft -//@source:parodius.cpp +@source:parodius.cpp parodius // GX955 (c) 1990 (World) parodiusa // GX955 (c) 1990 (Asia) parodiuse // GX955 (c) 1990 (World) parodiusj // GX955 (c) 1990 (Japan) -//@source:partner.cpp +@source:partner.cpp partner // -//@source:pasha2.cpp +@source:pasha2.cpp pasha2 // (c) 1998 Dong Sung -//@source:paso1600.cpp +@source:paso1600.cpp paso1600 // -//@source:pasogo.cpp +@source:pasogo.cpp pasogo // KOEI PasoGo -//@source:pasopia.cpp +@source:pasopia.cpp pasopia // -//@source:pasopia7.cpp +@source:pasopia7.cpp pasopia7 // pasopia7lcd // -//@source:pass.cpp +@source:pass.cpp pass // (c) 1992 Oksan -//@source:pastelg.cpp +@source:pastelg.cpp galds // (c) 1985 pastelg // (c) 1985 threeds // (c) 1985 -//@source:patinho_feio.cpp +@source:patinho_feio.cpp patinho // 1972 Patinho Feio -//@source:pb1000.cpp +@source:pb1000.cpp ai1000 // Casio AI-1000 pb1000 // Casio PB-1000 pb2000c // Casio PB-2000C -//@source:pbaction.cpp +@source:pbaction.cpp pbaction // (c) 1985 Tehkan pbaction2 // (c) 1985 Tehkan pbaction3 // (c) 1985 Tehkan pbaction4 // (c) 1985 Tehkan pbaction5 // (c) 1985 Tehkan -//@source:pc.cpp +@source:pc.cpp ataripc3 // bw230 // 1985 Bondwell (CGA) compc1 // 1984 Commodore PC-1 @@ -28844,13 +28844,13 @@ ssam88s // sx16 // Sanyo SX-16 zdsupers // -//@source:pc100.cpp +@source:pc100.cpp pc100 // -//@source:pc1500.cpp +@source:pc1500.cpp pc1500 // Pocket Computer 1500 -//@source:pc1512.cpp +@source:pc1512.cpp pc1512 // pc1512dd // pc1512hd10 // @@ -28860,7 +28860,7 @@ pc1640dd // pc1640hd20 // pc1640hd30 // -//@source:pc2000.cpp +@source:pc2000.cpp gbs5505x // 2001 Genius BrainStation 5505X (Germany) gl2000 // 1993 Genius Leader 2000 gl2000c // 1994 Genius Leader 2000 Compact @@ -28879,25 +28879,25 @@ ordisava // 1988 Ordisavant (France) pc1000 // 1988 PreComputer 1000 pc2000 // 1993 PreComputer 2000 -//@source:pc4.cpp +@source:pc4.cpp pc4 // -//@source:pc6001.cpp +@source:pc6001.cpp pc6001 // pc6001a // pc6001mk2 // pc6001sr // pc6601 // -//@source:pc8001.cpp +@source:pc8001.cpp pc8001 // pc8001mk2 // -//@source:pc8401a.cpp +@source:pc8401a.cpp pc8401a // roms needed pc8500 // -//@source:pc8801.cpp +@source:pc8801.cpp pc8801 // pc8801fa // pc8801ma // @@ -28909,11 +28909,11 @@ pc8801mk2fr // pc8801mk2mr // pc8801mk2sr // -//@source:pc88va.cpp +@source:pc88va.cpp pc88va // pc88va2 // -//@source:pc9801.cpp +@source:pc9801.cpp pc486mu // pc9801bx2 // 1993 pc9801f // 1983 @@ -28930,11 +28930,11 @@ pc9821v13 // pc9821v20 // pc9821xs // -//@source:pcat_dyn.cpp +@source:pcat_dyn.cpp toursol // (c) 1995 Dynamo toursol1 // (c) 1995 Dynamo -//@source:pcat_nit.cpp +@source:pcat_nit.cpp bonanza // (c) 1993 bonanzar2 // (c) 1993 streetg // (c) 1993 @@ -28942,24 +28942,24 @@ streetg2 // (c) 1993 streetg2r5 // (c) 1993 streetgr3 // (c) 1993 -//@source:pcd.cpp +@source:pcd.cpp pcd // Siemens PC-D pcx // Siemens PC-X -//@source:pce.cpp +@source:pce.cpp pce // PC/Engine NEC 1987-1993 sgx // SuperGrafX NEC 1989 tg16 // Turbo Grafix-16 NEC 1989-1993 -//@source:pce220.cpp +@source:pce220.cpp pce220 // Pocket Computer E220 pcg850v // Pocket Computer G850V -//@source:pcfx.cpp +@source:pcfx.cpp pcfx // PC-FX NEC 1994 pcfxga // PC-FX NEC 199? (PC-FX on a PC ISA Card) -//@source:pcktgal.cpp +@source:pcktgal.cpp pcktgal // (c) 1987 Data East Corporation (Japan) pcktgal2 // (c) 1989 Data East Corporation (World?) pcktgal2j // (c) 1989 Data East Corporation (World?) @@ -28967,50 +28967,50 @@ pcktgalb // bootleg spool3 // (c) 1989 Data East Corporation (World?) spool3i // (c) 1990 Data East Corporation + I-Vics license -//@source:pcm.cpp +@source:pcm.cpp pcm // PC/M Mugler -//@source:pcw.cpp +@source:pcw.cpp pcw10 // 198? PCW10 pcw8256 // 198? PCW8256 pcw8512 // 198? PCW8512 pcw9256 // 198? PCW9256 pcw9512 // 198? PCW9512 (+) -//@source:pcw16.cpp +@source:pcw16.cpp pcw16 // 1995 PCW16 -//@source:pcxt.cpp +@source:pcxt.cpp filetto // (c) 1990 Novamatic tetriskr // (c) 1988? bootleg -//@source:pda600.cpp +@source:pda600.cpp pda600 // -//@source:pdp1.cpp +@source:pdp1.cpp pdp1 // 1961 DEC PDP1 -//@source:pdp11.cpp +@source:pdp11.cpp pdp11qb // pdp11ub // pdp11ub2 // sms1000 // -//@source:pecom.cpp +@source:pecom.cpp pecom32 // pecom64 // -//@source:pegasus.cpp +@source:pegasus.cpp pegasus // pegasusm // -//@source:pencil2.cpp +@source:pencil2.cpp pencil2 // -//@source:pengadvb.cpp +@source:pengadvb.cpp pengadvb // (c) 1988 Screen -//@source:pengo.cpp +@source:pengo.cpp jrpacmbl // bootleg on Pengo HW pengo // 834-0386 (c) 1982 Sega pengo2 // 834-0386 (c) 1982 Sega @@ -29020,14 +29020,14 @@ pengo4 // 834-0386 (c) 1982 Sega pengob // bootleg penta // bootleg -//@source:pentagon.cpp +@source:pentagon.cpp pent1024 // pentagon // -//@source:peoplepc.cpp +@source:peoplepc.cpp olypeopl // Olympia People PC -//@source:peplus.cpp +@source:peplus.cpp pebe0014 // (c) 1994 IGT - International Game Technology pebe0014a // (c) 1994 IGT - International Game Technology peip0028 // (c) 1987 IGT - International Game Technology @@ -29526,10 +29526,10 @@ pexmp026 // (c) 1997 IGT - International Game Technology pexmp030 // (c) 1997 IGT - International Game Technology pexmp030a // (c) 1997 IGT - International Game Technology -//@source:pes.cpp +@source:pes.cpp pes // -//@source:pet.cpp +@source:pet.cpp cbm3008 // cbm3016 // cbm3032 // @@ -29566,7 +29566,7 @@ pet4032f // pet8032 // superpet // -//@source:peyper.cpp +@source:peyper.cpp gamatros // nemesisp // odin // @@ -29578,7 +29578,7 @@ sonstwar // sonstwr2 // wolfman // -//@source:pgm.cpp +@source:pgm.cpp ddp2 // (c) 2001 DoDonPachi 2 - Bee Storm ddp2100 // ddp2100c // @@ -29699,7 +29699,7 @@ theglad100 // theglad101 // thegladpcb // -//@source:pgm2.cpp +@source:pgm2.cpp ddpdojh // kov2nl // (c) 2008 kov2nlo // @@ -29709,11 +29709,11 @@ orleg2 // (c) 2007 orleg2o // orleg2oa // -//@source:phc25.cpp +@source:phc25.cpp phc25 // phc25j // -//@source:phoenix.cpp +@source:phoenix.cpp avefenix // bootleg (Video Game) avefenixl // bootleg (Laguna) avefenixrf // bootleg (Recreativos Franco) @@ -29749,23 +29749,23 @@ vautour // bootleg (Jeutel) vautourz // bootleg vautourza // bootleg (Jeutal) -//@source:photon.cpp +@source:photon.cpp phklad // phpython // phtetris // -//@source:photon2.cpp +@source:photon2.cpp black // brod // kok // -//@source:photoply.cpp +@source:photoply.cpp photoply // -//@source:phunsy.cpp +@source:phunsy.cpp phunsy // -//@source:piggypas.cpp +@source:piggypas.cpp 3lilpigs // dumpump // fidlstix // @@ -29774,28 +29774,28 @@ jackbean // piggypas // rndrndqs // -//@source:pimps.cpp +@source:pimps.cpp pimps // -//@source:pinball2k.cpp +@source:pinball2k.cpp rfmpb // rfmpbr2 // swe1pb // -//@source:pingpong.cpp +@source:pingpong.cpp cashquiz // (c) 1986 Zilec-Zenitone merlinmm // (c) 1986 Zilec-Zenitone pingpong // GX555 (c) 1985 -//@source:pinkiri8.cpp +@source:pinkiri8.cpp janshi // pinkiri8 // ronjan // -//@source:pipbug.cpp +@source:pipbug.cpp pipbug // -//@source:pipedrm.cpp +@source:pipedrm.cpp hatris // (c) 1990 Video System Co. (US) hatrisj // (c) 1990 Video System Co. (Japan) pipedrm // (c) 1990 Video System Co. (World) @@ -29803,51 +29803,51 @@ pipedrmj // (c) 1990 Video System Co. (Japan) pipedrmt // (c) 1990 Video System Co. (Taiwan) pipedrmu // (c) 1990 Video System Co. (US) -//@source:pipeline.cpp +@source:pipeline.cpp pipeline // (c) 1990 Daehyun Electronics -//@source:pirates.cpp +@source:pirates.cpp genix // (c) 199? NIX pirates // (c) 1994 NIX piratesb // bootleg? -//@source:pitagjr.cpp +@source:pitagjr.cpp pitagjr // Pitagorin Junior -//@source:pitnrun.cpp +@source:pitnrun.cpp pitnrun // PR (c) 1984 Taito Corporation pitnruna // PR (c) 1984 Taito Corporation -//@source:pk8000.cpp +@source:pk8000.cpp hobby // pk8002 // vesta // -//@source:pk8020.cpp +@source:pk8020.cpp bk8t // kontur // korvet // neiva // -//@source:pkscram.cpp +@source:pkscram.cpp pkscram // (c) 1993 Cosmo Electronics Corporation -//@source:pktgaldx.cpp +@source:pktgaldx.cpp pktgaldx // MAZ (c) 1993 Data East (Euro v3.00) pktgaldxb // bootleg pktgaldxj // MAZ (c) 1993 -//@source:plan80.cpp +@source:plan80.cpp plan80 // -//@source:play_1.cpp +@source:play_1.cpp bigtown // chance // lastlap // party // spcgambl // -//@source:play_2.cpp +@source:play_2.cpp antar // antar2 // attack // @@ -29857,11 +29857,11 @@ evlfight // madrace // zira // -//@source:play_3.cpp +@source:play_3.cpp megaaton // megaatona // -//@source:play_5.cpp +@source:play_5.cpp fldragon // kz26 // nautilus // @@ -29874,7 +29874,7 @@ theraid // trailer // ufo_x // -//@source:playch10.cpp +@source:playch10.cpp pc_1942 // (c) 1985 Capcom pc_bball // (c) 1984 Nintendo of America pc_bfght // (c) 1984 Nintendo @@ -29932,7 +29932,7 @@ pc_wgnmn // (c) 1984 Nintendo pc_ynoid // (c) 1990 Capcom USA (Nintendo of America license) playch10 // -//@source:playmark.cpp +@source:playmark.cpp bigtwin // (c) 1995 bigtwinb // (c) 1995 excelsr // (c) 1995 @@ -29945,7 +29945,7 @@ wbeachvl // (c) 1995 wbeachvl2 // (c) 1995 wbeachvl3 // (c) 1995 -//@source:plus4.cpp +@source:plus4.cpp c116 // c16 // c16_hu // @@ -29956,7 +29956,7 @@ plus4 // plus4p // v364 // -//@source:pluto5.cpp +@source:pluto5.cpp hb_bar7 // Bar Seven (Fairgames) hb_bar7a // hb_bigx // Big X (JPM) @@ -30052,14 +30052,14 @@ hb_ringbe // hb_ydd // Yabba-Dabba-Dough (Qps) hb_ydda // -//@source:plygonet.cpp +@source:plygonet.cpp plygonet // GX305 (c) 1993 polynetw // GX305 too? (c) 1993 -//@source:pm68k.cpp +@source:pm68k.cpp pm68k // -//@source:pmd85.cpp +@source:pmd85.cpp alfa // Alfa (PMD-85.1 clone) c2717 // Consul 2717 (PMD-85.2 clone) c2717pmd // Consul 2717 with PMD-32 @@ -30070,13 +30070,13 @@ pmd852a // PMD-85.2A pmd852b // PMD-85.2B pmd853 // PMD-85.3 -//@source:pmi80.cpp +@source:pmi80.cpp pmi80 // -//@source:pntnpuzl.cpp +@source:pntnpuzl.cpp pntnpuzl // Century? -//@source:pocketc.cpp +@source:pocketc.cpp pc1245 // Pocket Computer 1245 pc1250 // Pocket Computer 1250 pc1251 // Pocket Computer 1251 @@ -30092,24 +30092,24 @@ pc1403h // Pocket Computer 1403H pc1450 // Pocket Computer 1450 trs80pc3 // Tandy TRS80 PC-3 -//@source:pockstat.cpp +@source:pockstat.cpp pockstat // 1999 Sony PocketStation -//@source:poisk1.cpp +@source:poisk1.cpp poisk1 // -//@source:pokechmp.cpp +@source:pokechmp.cpp billlist // pokechmp // Korean hack of Pocket Gal pokechmpa // -//@source:pokemini.cpp +@source:pokemini.cpp pokemini // Nintendo Pokemon Mini -//@source:poker72.cpp +@source:poker72.cpp poker72 // -//@source:polepos.cpp +@source:polepos.cpp polepos // (c) 1982 polepos2 // (c) 1983 polepos2a // 136014 (c) 1983 + Atari license @@ -30123,7 +30123,7 @@ topracer // bootleg topracera // bootleg topracern // bootleg -//@source:policetr.cpp +@source:policetr.cpp policetr // (c) 1996 P&P Marketing policetr10 // (c) 1996 P&P Marketing policetr11 // (c) 1996 P&P Marketing @@ -30134,80 +30134,80 @@ sshooter11 // (c) 1998 P&P Marketing sshooter12 // (c) 1998 P&P Marketing sshooter17 // (c) 1998 P&P Marketing -//@source:poly.cpp +@source:poly.cpp poly1 // -//@source:poly88.cpp +@source:poly88.cpp poly88 // poly8813 // -//@source:poly880.cpp +@source:poly880.cpp poly880 // -//@source:polyplay.cpp +@source:polyplay.cpp polyplay // -//@source:pong.cpp +@source:pong.cpp breakout // (c) 1976 Atari pong // (c) 1972 Atari pongd // (c) 1973 Atari pongf // (c) 1972 Atari -//@source:poolshrk.cpp +@source:poolshrk.cpp poolshrk // 006281 1977/06 [6800] -//@source:pooyan.cpp +@source:pooyan.cpp pootan // bootleg pooyan // GX320 (c) 1982 pooyans // GX320 (c) 1982 Stern -//@source:popeye.cpp +@source:popeye.cpp popeye // (c) 1982 popeyebl // bootleg popeyef // (c) 1982 popeyeu // (c) 1982 skyskipr // (c) 1981 -//@source:popobear.cpp +@source:popobear.cpp popobear // (c) 2000 BMC -//@source:popper.cpp +@source:popper.cpp popper // (c) 1983 Omori Electric Co., Ltd. -//@source:portfoli.cpp +@source:portfoli.cpp pofo // -//@source:portrait.cpp +@source:portrait.cpp portrait // (c) 1983 Olympia portraita // (c) 1983 Olympia -//@source:potgoldu.cpp +@source:potgoldu.cpp potgoldu // (c) 200? U.S. Games -//@source:powerbal.cpp +@source:powerbal.cpp hotminda // (c) 1995 magicstk // (c) 1995 powerbal // (c) 1994 -//@source:powerins.cpp +@source:powerins.cpp powerins // (c) 1993 Atlus (USA) powerinsa // (c) 1993 Atlus (bootleg of USA version) powerinsb // (c) 1993 Atlus (bootleg of USA version) powerinsj // (c) 1993 Atlus (Japan) -//@source:pp01.cpp +@source:pp01.cpp pp01 // -//@source:ppmast93.cpp +@source:ppmast93.cpp ppmast93 // (c) 1993 Electronic Devices S.R.L. -//@source:prehisle.cpp +@source:prehisle.cpp gensitou // A8003 'GT' (c) 1989 prehisle // A8003 'GT' (c) 1989 prehislek // A8003 'GT' (c) 1989 prehisleu // A8003 'GT' (c) 1989 -//@source:prestige.cpp +@source:prestige.cpp cars2lap // CARS 2 Laptop (Germany) gj4000 // Genius Junior 4000 (Germany) gj5000 // Genius Junior 5000 (Germany) @@ -30227,7 +30227,7 @@ prestige // PreComputer Prestige Elite snotec // Bandai Super Note Club (Japan) snotecex // Bandai Super Note Club EX (Japan) -//@source:primo.cpp +@source:primo.cpp primoa32 // Primo A-32 primoa48 // Primo A-48 primoa64 // Primo A-64 @@ -30236,10 +30236,10 @@ primob48 // Primo B-48 primob64 // Primo B-64 primoc64 // Primo C-64 -//@source:pro80.cpp +@source:pro80.cpp pro80 // -//@source:proconn.cpp +@source:proconn.cpp pr_5xcsh // 5x Cash (Project) pr_7hvn // 777 Heaven (Project) pr_7hvna // @@ -30373,24 +30373,24 @@ pr_whlft // Wheel Of Fortune (Project) pr_wldkn // Wild Kings (Project) pr_wnstk // Winning Streak (Coinworld) -//@source:prof180x.cpp +@source:prof180x.cpp prof180x // prof181x // -//@source:prof80.cpp +@source:prof80.cpp prof80 // -//@source:progolf.cpp +@source:progolf.cpp progolf // (c) 1981 progolfa // (c) 1981 -//@source:prophet600.cpp +@source:prophet600.cpp prpht600 // 1983 Sequential Circuits -//@source:proteus3.cpp +@source:proteus3.cpp proteus3 // -//@source:ps2.cpp +@source:ps2.cpp i8530286 // IBM PS/2 Model 30-286 i8530h31 // IBM PS/2 8530-H31 (Model 30/286) i8535043 // IBM PS/2 8535-043 (Model 35) @@ -30400,13 +30400,13 @@ i8555081 // IBM PS/2 8550-081 (Model 55SX) i8580071 // IBM PS/2 8580-071 (Model 80) i8580111 // IBM PS/2 8580-111 (Model 80) -//@source:pse.cpp +@source:pse.cpp bazooka // (c) 1976 PSE bazookabr // (c) 1977 Taito do Brasil dpatrol // (c) 1977 PSE dpatrola // (c) 1977 PSE / Telegames -//@source:psikyo.cpp +@source:psikyo.cpp btlkroad // (c) 1994 btlkroadk // (c) 1994 gunbird // (c) 1994 @@ -30424,7 +30424,7 @@ sngkacea // (c) 1993 (Japan) tengai // (c) 1996 tengaij // (c) 1996 -//@source:psikyo4.cpp +@source:psikyo4.cpp hgkairak // (c) 1998 hotdebut // (c) 2000 hotgm4ev // (c) 2000 @@ -30434,7 +30434,7 @@ hotgmcki // (c) 2001 loderndf // (c) 2000 loderndfa // (c) 2000 -//@source:psikyosh.cpp +@source:psikyosh.cpp daraku // (c) 1998 dragnblz // (c) 2000 gnbarich // (c) 2001 @@ -30448,7 +30448,7 @@ soldivid // (c) 1997 tgm2 // (c) 2000 tgm2p // (c) 2000 -//@source:psion.cpp +@source:psion.cpp psion1 // psioncm // psionla // @@ -30461,37 +30461,37 @@ psionp350 // psionp464 // psionxp // -//@source:psx.cpp +@source:psx.cpp psa // 1995 Sony PlayStation (Asia-Pacific) pse // 1995 Sony PlayStation (Europe) psj // 1994 Sony PlayStation (Japan) psu // 1995 Sony PlayStation (USA) -//@source:psychic5.cpp +@source:psychic5.cpp bombsa // (c) 1988 Jaleco psychic5 // (c) 1987 Jaleco psychic5j // (c) 1987 Jaleco -//@source:pt68k4.cpp +@source:pt68k4.cpp pt68k2 // pt68k4 // -//@source:ptcsol.cpp +@source:ptcsol.cpp sol20 // -//@source:pturn.cpp +@source:pturn.cpp pturn // (c) 1984 Jaleco -//@source:puckpkmn.cpp +@source:puckpkmn.cpp jzth // puckpkmn // (c) 2000 Genie puckpkmna // (c) 2000 IBS puckpkmnb // (c) 2000 IBS -//@source:pulsar.cpp +@source:pulsar.cpp pulsarlb // -//@source:punchout.cpp +@source:punchout.cpp armwrest // (c) 1985 punchita // bootleg punchout // (c) 1984 @@ -30501,42 +30501,42 @@ spnchout // (c) 1984 spnchouta // (c) 1984 spnchoutj // (c) 1984 (Japan) -//@source:pv1000.cpp +@source:pv1000.cpp pv1000 // Casio PV-1000 -//@source:pv2000.cpp +@source:pv2000.cpp pv2000 // Casio PV-2000 -//@source:pv9234.cpp +@source:pv9234.cpp pv9234 // -//@source:pve500.cpp +@source:pve500.cpp pve500 // SONY PVE-500 -//@source:px4.cpp +@source:px4.cpp px4 // 1985 Epson PX-4 px4p // 1985 Epson PX-4+ -//@source:px8.cpp +@source:px8.cpp px8 // -//@source:pyl601.cpp +@source:pyl601.cpp pyl601 // pyl601a // -//@source:pyson.cpp +@source:pyson.cpp pyson // Konami Pyson Bios wswe // World Soccer Winning Eleven wswe2k3 // World Soccer Winning Eleven 2003 -//@source:pzletime.cpp +@source:pzletime.cpp pzletime // -//@source:qdrmfgp.cpp +@source:qdrmfgp.cpp qdrmfgp // 1994.12 GQ460 (Japan) qdrmfgp2 // 1995.09 GE557 (Japan) -//@source:qix.cpp +@source:qix.cpp complexx // CX (c) 1984 Taito America Corporation elecyoyo // YY (c) 1982 Taito America Corporation elecyoyo2 // YY (c) 1982 Taito America Corporation @@ -30555,7 +30555,7 @@ zookeep // ZA (c) 1982 Taito America Corporation zookeep2 // ZA (c) 1982 Taito America Corporation zookeep3 // ZA (c) 1982 Taito America Corporation -//@source:ql.cpp +@source:ql.cpp ql // 1984 Sinclair QL (UK) ql_de // 1984 Sinclair QL (Germany) ql_dk // 1984 Sinclair QL (Denmark) @@ -30567,62 +30567,62 @@ ql_se // 1984 Sinclair QL (Sweden) ql_us // 1984 Sinclair QL (USA) tonto // -//@source:qtsbc.cpp +@source:qtsbc.cpp qtsbc // -//@source:quakeat.cpp +@source:quakeat.cpp quake // (c) 19?? Lazer-Tron / iD Software -//@source:quantum.cpp +@source:quantum.cpp quantum // 136016 (c) 1982 // made by Gencomp quantum1 // 136016 (c) 1982 // made by Gencomp quantump // 136016 (c) 1982 // made by Gencomp -//@source:quasar.cpp +@source:quasar.cpp quasar // (c) 1980 Zelco Games Italy quasara // (c) 1980 Zelco Games Italy -//@source:queen.cpp +@source:queen.cpp queen // -//@source:quizdna.cpp +@source:quizdna.cpp gakupara // (c) 1991 NMK gekiretu // (c) 1992 Face quizdna // (c) 1992 Face -//@source:quizo.cpp +@source:quizo.cpp quizo // (c) 1985 Seoul Coin Corp. quizoa // (c) 1985 Seoul Coin Corp. -//@source:quizpani.cpp +@source:quizpani.cpp quizpani // (c) 1993 NMK -//@source:quizpun2.cpp +@source:quizpun2.cpp quizpun // (c) 1989 Space Computer System of Korea quizpun2 // (c) 1989 Space Computer System of Korea -//@source:quizshow.cpp +@source:quizshow.cpp quizshow // 005464 1976/04 [2650] -//@source:qx10.cpp +@source:qx10.cpp qx10 // -//@source:r2dtank.cpp +@source:r2dtank.cpp r2dtank // (c) 1980 Sigma Ent. Inc. -//@source:r2dx_v33.cpp +@source:r2dx_v33.cpp nzeroteam // (c) 1997 Seibu Kaihatsu r2dx_v33 // (c) 1996 Seibu Kaihatsu r2dx_v33_r2 // (c) 1996 Seibu Kaihatsu zerotm2k // (c) 2000 Seibu Kaihatsu -//@source:r9751.cpp +@source:r9751.cpp r9751 // ROLM 9751 phone system -//@source:rabbit.cpp +@source:rabbit.cpp rabbit // (c) 1997 Electronic Arts -//@source:radio86.cpp +@source:radio86.cpp impuls03 // kr03 // mikron2 // @@ -30635,7 +30635,7 @@ rk7007 // rk700716 // spektr01 // -//@source:raiden.cpp +@source:raiden.cpp raiden // (c) 1990 Seibu Kaihatsu raidena // (c) 1990 Seibu Kaihatsu raidenb // (c) 1990 Seibu Kaihatsu @@ -30644,7 +30644,7 @@ raident // (c) 1990 Seibu Kaihatsu + Liang HWA Electroni raidenu // (c) 1990 Seibu Kaihatsu + Fabtek license raidenua // (c) 1990 Seibu Kaihatsu + Fabtek license -//@source:raiden2.cpp +@source:raiden2.cpp raiden2 // (c) 1993 Seibu Kaihatsu + Fabtek license raiden2dx // (c) 1993 Seibu Kaihatsu raiden2e // (c) 1993 Seibu Kaihatsu @@ -30677,12 +30677,12 @@ zeroteamd // (c) 1993 Seibu Kaihatsu + Dreamsoft license zeroteams // (c) 1993 Seibu Kaihatsu zeroteamsr // (c) 1993 Seibu Kaihatsu -//@source:rainbow.cpp +@source:rainbow.cpp rainbow // 1983 DEC Rainbow 100-B rainbow100a // 1982 DEC Rainbow 100-A rainbow190 // 1985 DEC Rainbow 190 -//@source:rallyx.cpp +@source:rallyx.cpp commsega // (c) 1983 Sega cottong // bootleg gutangtn // GX359 (c) 1982 Konami + Sega license @@ -30701,15 +30701,15 @@ savanna // Olympia (c) 1982 (Jungler bootleg) tactcian // GX335 (c) 1982 Sega tactcian2 // GX335 (c) 1981 Sega -//@source:rambo.cpp +@source:rambo.cpp metamaq2 // Metamaquina 2 desktop 3d printer -//@source:rampart.cpp +@source:rampart.cpp rampart // 136082 (c) 1990 rampart2p // 136082 (c) 1990 rampartj // 136082 (c) 1990 (Japan) -//@source:ramtek.cpp +@source:ramtek.cpp bballrmt // (c) 1974 Ramtek cleanswp // (c) 1974 Ramtek hockyrmt // (c) 1973 Ramtek @@ -30718,7 +30718,7 @@ trivia // (c) 1976 Ramtek vollyrmt // (c) 1973 Ramtek wipeormt // (c) 1974 Ramtek -//@source:rastan.cpp +@source:rastan.cpp rastan // B04 (c) 1987 Taito Corporation Japan (World) rastana // B04 (c) 1987 Taito Corporation Japan (World) rastanu // B04 (c) 1987 Taito America Corporation (US) @@ -30727,15 +30727,15 @@ rastanub // B04 (c) 1987 Taito America Corporation (US) rastsaga // B04 (c) 1987 Taito Corporation (Japan) rastsagaa // B04 (c) 1987 Taito Corporation (Japan) -//@source:rastersp.cpp +@source:rastersp.cpp fbcrazy // 1997 rotr // 1994 -//@source:ravens.cpp +@source:ravens.cpp ravens // ravens2 // -//@source:rbisland.cpp +@source:rbisland.cpp jumping // bootleg jumpinga // bootleg (Seyutu) jumpingi // bootleg (Seyutu / Imnoe) @@ -30743,26 +30743,26 @@ rbisland // B22 (c) 1987 Taito Corporation rbislande // B39 (c) 1988 Taito Corporation rbislando // B22 (c) 1987 Taito Corporation -//@source:rbmk.cpp +@source:rbmk.cpp rbmk // (c) 1995 GMS -//@source:rc759.cpp +@source:rc759.cpp rc759 // 1984 RC759 -//@source:rcorsair.cpp +@source:rcorsair.cpp rcorsair // (c) 1984 Nakasawa -//@source:rd100.cpp +@source:rd100.cpp rd100 // -//@source:rd110.cpp +@source:rd110.cpp d110 // -//@source:re900.cpp +@source:re900.cpp bs94 // (c) 1994 Entretenimientos GEMINIS re900 // (c) 1993 Entretenimientos GEMINIS -//@source:realbrk.cpp +@source:realbrk.cpp dai2kaku // "522" DaiDaiKakumei (Japan) pkgnsh // "505" Pachinko Gindama Shoubu 1998 (Japan) pkgnshdx // "522" Pachinko Gindama Shoubu DX 1998 (Japan) @@ -30771,13 +30771,13 @@ realbrkj // "523" Billiard Academy Real Break 1998 (Japan realbrkk // "600" Billiard Academy Real Break 1998 (Korea) realbrko // "600" Billiard Academy Real Break 1998 (Europe) -//@source:redalert.cpp +@source:redalert.cpp demoneye // M27 (c) 1981 panther // M27 no copyright notice redalert // M27 (c) 1981 + "GDI presents" ww3 // M27 (c) 1981 -//@source:redclash.cpp +@source:redclash.cpp redclash // (c) 1981 Tehkan redclasha // (c) 1981 Tehkan redclashk // (c) Kaneko (bootleg?) @@ -30785,33 +30785,33 @@ zerohour // 8011 (c) Universal zerohoura // 8011 (c) Universal zerohouri // -//@source:relief.cpp +@source:relief.cpp relief // 136093 (c) 1992 relief2 // 136093 (c) 1992 relief3 // 136093 (c) 1992 -//@source:renegade.cpp +@source:renegade.cpp kuniokun // TA-0018 (c) 1986 kuniokunb // bootleg renegade // TA-0018 (c) 1986 + Taito America license -//@source:replicator.cpp +@source:replicator.cpp replica1 // Makerbot Replicator 1 desktop 3d printer -//@source:retofinv.cpp +@source:retofinv.cpp retofinv // A37 (c) 1985 Taito Corporation retofinv1 // bootleg retofinv2 // bootleg -//@source:rex6000.cpp +@source:rex6000.cpp ds2 // oz750 // 199? Sharp Wizard OZ-750 rex6000 // -//@source:rgum.cpp +@source:rgum.cpp rgum // -//@source:riscpc.cpp +@source:riscpc.cpp a7000 // 1995 Acorn Archimedes 7000 a7000p // 1997 Acorn Archimedes 7000+ rpc600 // @@ -30819,37 +30819,37 @@ rpc700 // sarpc // sarpc_j233 // -//@source:rltennis.cpp +@source:rltennis.cpp rltennis // (c) 1993 TCH -//@source:rm380z.cpp +@source:rm380z.cpp rm380z // -//@source:rmhaihai.cpp +@source:rmhaihai.cpp rmhaihai // (c) 1985 Alba rmhaihib // (c) 1985 Alba rmhaijin // (c) 1986 Alba rmhaisei // (c) 1986 Visco themj // (c) 1987 Visco -//@source:rmnimbus.cpp +@source:rmnimbus.cpp nimbus // RM Nimbus 186 -//@source:rmt32.cpp +@source:rmt32.cpp cm32l // mt32 // -//@source:rockrage.cpp +@source:rockrage.cpp rockrage // GX620 (c) 1986 (World?) rockragea // GX620 (c) 1986 (Prototype?) rockragej // GX620 (c) 1986 (Japan) -//@source:rocnrope.cpp +@source:rocnrope.cpp rocnrope // GX364 (c) 1983 rocnropek // GX364 (c) 1983 + Kosuka ropeman // (c) 1983 bootleg -//@source:rohga.cpp +@source:rohga.cpp darkseal2 // MAS (c) 1992 Data East Corporation (Japan) gunball // MAV (c) 1992 Data East Corporation (Japan) nitrobal // MAV (c) 1992 Data East Corporation (World) @@ -30864,25 +30864,25 @@ wizdfire // MAS (c) 1992 Data East Corporation (Over Sea) wizdfireu // MAS (c) 1992 Data East Corporation (US) wolffang // MAM (c) 1991 Data East Corporation (Japan) -//@source:rollerg.cpp +@source:rollerg.cpp rollerg // GX999 (c) 1991 (US) rollergj // GX999 (c) 1991 (Japan) -//@source:rollext.cpp +@source:rollext.cpp rollext // (c) 1999 - Ref 991015 -//@source:rollrace.cpp +@source:rollrace.cpp fightrol // (c) 1983 Taito rollace // (c) 1983 Williams rollace2 // (c) 1983 Williams -//@source:rotaryf.cpp +@source:rotaryf.cpp rotaryf // -//@source:roul.cpp +@source:roul.cpp roul // (c) 1990 -//@source:route16.cpp +@source:route16.cpp route16 // (c) 1981 Tehkan/Sun + Centuri license route16a // (c) 1981 Tehkan/Sun + Centuri license route16bl // bootleg @@ -30896,10 +30896,10 @@ stratvox // [1980 Sun Electronics] Taito stratvoxb // bootleg ttmahjng // Taito -//@source:rowamet.cpp +@source:rowamet.cpp heavymtl // -//@source:royalmah.cpp +@source:royalmah.cpp cafebrk // "528" Mahjong Cafe Break (C) 1999 Nakanihon / Dynax cafedoll // "76" (c) 1993 Dynax cafepara // "001" 1999 Techno-Top @@ -30939,7 +30939,7 @@ suzume // 04? (c) 1986 Dyna Electronics tahjong // (c) 1985 Bally Pond / Nasco tontonb // "09" (c) 1987 Dynax -//@source:rpunch.cpp +@source:rpunch.cpp rabiolep // (c) 1987 V-System Co. (Japan) rpunch // (c) 1987 V-System Co. + Bally/Midway/Sente license (US) svolley // (c) 1989 V-System Co. (Japan) @@ -30947,19 +30947,19 @@ svolleybl // bootleg svolleyk // (c) 1989 V-System Co. (Korea) svolleyu // (c) 1989 V-System Co. + Data East license (US) -//@source:rsc55.cpp +@source:rsc55.cpp sc55 // 1991 Sound Canvas SC-55 -//@source:rt1715.cpp +@source:rt1715.cpp rt1715 // rt1715lc // (latin/cyrillic) rt1715w // -//@source:runaway.cpp +@source:runaway.cpp qwak // (proto) (c) 1982 runaway // (proto) (c) 1982 -//@source:rungun.cpp +@source:rungun.cpp rungun // GX247 (c) 1993 (World) runguna // GX247 (c) 1993 (World) rungunad // GX247 (c) 1993 (World) @@ -30972,13 +30972,13 @@ rungunud // GX247 (c) 1993 (US) slmdunkj // GX247 (c) 1993 (Japan) slmdunkjd // GX247 (c) 1993 (Japan) -//@source:rvoice.cpp +@source:rvoice.cpp rvoicepc // -//@source:rx78.cpp +@source:rx78.cpp rx78 // -//@source:s11.cpp +@source:s11.cpp gmine_l2 // grand_l4 // hs_l3 // @@ -30992,7 +30992,7 @@ tdawg_l1 // tts_l1 // tts_l2 // -//@source:s11a.cpp +@source:s11a.cpp f14_l1 // f14_p3 // f14_p4 // @@ -31004,7 +31004,7 @@ pb_l3 // pb_l5 // pb_p4 // -//@source:s11b.cpp +@source:s11b.cpp bcats_l2 // bcats_l5 // bguns_l7 // @@ -31053,7 +31053,7 @@ whirl_l2 // whirl_l3 // whirl_lg3 // -//@source:s11c.cpp +@source:s11c.cpp bbnny_l2 // bbnny_lu // dd_l2 // @@ -31080,7 +31080,7 @@ rollr_p2 // rvrbt_l3 // strax_p7 // -//@source:s3.cpp +@source:s3.cpp cntct_l1 // disco_l1 // httip_l1 // @@ -31089,7 +31089,7 @@ phnix_l1 // pkrno_l1 // wldcp_l1 // -//@source:s4.cpp +@source:s4.cpp arist_l1 // bstrk_l1 // flash_l1 // @@ -31107,7 +31107,7 @@ trizn_l1 // trizn_t1 // tstrk_l1 // -//@source:s6.cpp +@source:s6.cpp blkou_f1 // blkou_l1 // blkou_t1 // @@ -31121,13 +31121,13 @@ lzbal_t2 // scrpn_l1 // scrpn_t1 // -//@source:s6a.cpp +@source:s6a.cpp algar_l1 // alpok_f6 // alpok_l2 // alpok_l6 // -//@source:s7.cpp +@source:s7.cpp barra_l1 // bk_f4 // bk_l3 // @@ -31152,14 +31152,14 @@ tmfnt_l5 // vrkon_l1 // wrlok_l3 // -//@source:s8.cpp +@source:s8.cpp pfevr_l2 // pfevr_p3 // -//@source:s8a.cpp +@source:s8a.cpp scrzy_l1 // -//@source:s9.cpp +@source:s9.cpp alcat_l7 // comet_l4 // comet_l5 // @@ -31170,17 +31170,17 @@ sshtl_l7 // szone_l2 // szone_l5 // -//@source:sacstate.cpp +@source:sacstate.cpp sacstate // -//@source:safarir.cpp +@source:safarir.cpp safarir // (c) 1980 Shin Nihon Kikaku (SNK) + Taito license safarirj // (c) 1979 Shin Nihon Kikaku (SNK) -//@source:sage2.cpp +@source:sage2.cpp sage2 // -//@source:sam.cpp +@source:sam.cpp 24_130 // 24_140 // 24_144 // @@ -31380,89 +31380,89 @@ wpt_1400gf // wpt_1400i // wpt_1400l // -//@source:samcoupe.cpp +@source:samcoupe.cpp samcoupe // 1989 Sam Coupe -//@source:sandscrp.cpp +@source:sandscrp.cpp sandscrp // (c) 1992 Face sandscrpa // (c) 1992 Face sandscrpb // (c) 1992 Face -//@source:sangho.cpp +@source:sangho.cpp pzlestar // (c) 199? Sang Ho Soft sexyboom // (c) 1992 Sang Ho Soft -//@source:sanremmg.cpp +@source:sanremmg.cpp sanremmg // San Remo / Elsy -//@source:sanremo.cpp +@source:sanremo.cpp number1 // 1996 San Remo Games -//@source:sansa_fuze.cpp +@source:sansa_fuze.cpp sanfuze2 // -//@source:sapi1.cpp +@source:sapi1.cpp sapi1 // sapizps2 // sapizps3 // sapizps3a // sapizps3b // -//@source:saturn.cpp +@source:saturn.cpp hisaturn // Hitachi HiSaturn saturn // 1995 Sega Saturn (USA) saturneu // 1995 Sega Saturn (Europe) saturnjp // 1994 Sega Saturn (Japan) vsaturn // JVC V-Saturn -//@source:sauro.cpp +@source:sauro.cpp sauro // (c) 1987 saurop // (c) 1987 saurorr // (c) 1987 trckydoc // (c) 1987 trckydoca // (c) 1987 -//@source:savia84.cpp +@source:savia84.cpp savia84 // -//@source:savquest.cpp +@source:savquest.cpp savquest // -//@source:sbasketb.cpp +@source:sbasketb.cpp sbasketb // GX405 (c) 1984 (Version I, Encrypted) sbaskete // GX405 (c) 1984 (Version E, Encrypted) sbasketg // GX405 (c) 1984 (Version G, Encrypted) sbasketh // GX405 (c) 1984 (Version H, Unprotected) -//@source:sbc6510.cpp +@source:sbc6510.cpp sbc6510 // -//@source:sbowling.cpp +@source:sbowling.cpp sbowling // KB (c) 1982 Taito Corporation -//@source:sbrain.cpp +@source:sbrain.cpp sbrain // -//@source:sbrkout.cpp +@source:sbrkout.cpp sbrkout // 033453-033455 1978/09 [6502] sbrkout3 // 033442-033452 1978/09 [6502] sbrkoutc // unrealeased proto sbrkoutct // 034555-034559 proto ???? [6502] -//@source:sbugger.cpp +@source:sbugger.cpp sbugger // (c) 1981 Game-A-Tron sbuggera // (c) 1981 Game-A-Tron -//@source:sc1.cpp +@source:sc1.cpp sc1 // -//@source:sc2.cpp +@source:sc2.cpp sc2 // -//@source:scm_500.cpp +@source:scm_500.cpp scm_500 // -//@source:scobra.cpp +@source:scobra.cpp aponow // bootleg billiard // bootleg darkplnt // (c) 1982 Stern @@ -31483,17 +31483,17 @@ stratgyx // GX306 (c) 1981 Konami strongx // bootleg tazmani2 // (c) 1982 Stern -//@source:scorpion.cpp +@source:scorpion.cpp bestzx // kay1024 // profi // quorum // scorpio // -//@source:scotrsht.cpp +@source:scotrsht.cpp scotrsht // GX545 (c) 1985 -//@source:scramble.cpp +@source:scramble.cpp 800fath // (c) 1981 Amenip + U.S. Billiards license ad2083 // (c) 1983 Midcoin cavelon // (c) 1983 Jetsoft @@ -31523,17 +31523,17 @@ triplep // (c) 1982 KKI / made by Sanritsu? triplepa // (c) 1982 KKI / made by Sanritsu? turpins // (c) 1981 bootleg -//@source:scregg.cpp +@source:scregg.cpp dommy // TA-00?? (c) 1983 (Arcade TV Game List - P.90, Left, 13 from top) eggs // TA-0002 (c) 1983 Universal USA rockduck // bootleg? 1983 Datel SAS scregg // TA-0001 (c) 1983 -//@source:scv.cpp +@source:scv.cpp scv // scv_pal // -//@source:sderby.cpp +@source:sderby.cpp croupier // (c) 1997 Playmark croupiera // (c) 1997 Playmark luckboom // @@ -31541,23 +31541,23 @@ sderby // (c) 1996 sderbya // (c) 1996 spacewin // -//@source:sdk80.cpp +@source:sdk80.cpp sdk80 // -//@source:sdk85.cpp +@source:sdk85.cpp sdk85 // -//@source:sdk86.cpp +@source:sdk86.cpp sdk86 // -//@source:seabattl.cpp +@source:seabattl.cpp seabattl // (c) 1980 seabattla // (c) 1980 -//@source:sealy.cpp +@source:sealy.cpp crzyddz // (c) 2004? Sealy -//@source:seattle.cpp +@source:seattle.cpp biofreak // (c) 1997 Midway Games (prototype) blitz // (c) 1997 Midway Games blitz11 // (c) 1997 Midway Games @@ -31578,13 +31578,13 @@ vaportrx // (c) 1998 Atari Games vaportrxp // (c) 1998 Atari Games wg3dh // (c) 1996 Atari Games -//@source:seattlecmp.cpp +@source:seattlecmp.cpp seattle // -//@source:sega_sawatte.cpp +@source:sega_sawatte.cpp sawatte // -//@source:segac2.cpp +@source:segac2.cpp bloxeedc // (c) 1989 Sega / Elorg bloxeedu // (c) 1989 Sega / Elorg borench // (c) 1990 Sega @@ -31625,10 +31625,10 @@ twinsqua // (c) 1991 Sega wwmarine // (c) 1992 Sega zunkyou // (c) 1994 Sega -//@source:segacoin.cpp +@source:segacoin.cpp westdrm // -//@source:segae.cpp +@source:segae.cpp astrofl // 834-5803 (c) 1986 fantzn2 // (c) 1988 hangonjr // (c) 1985 @@ -31637,7 +31637,7 @@ ridleofp // (c) 1986 Sega / Nasco tetrisse // (c) 1988 transfrm // 834-5803 (c) 1986 -//@source:segag80r.cpp +@source:segag80r.cpp 005 // (c) 1981 astrob // (c) 1981 astrob1 // (c) 1981 @@ -31652,7 +31652,7 @@ sindbadm // 834-5244 (c) 1983 Sega spaceod // (c) 1981 spaceod2 // (c) 1981 -//@source:segag80v.cpp +@source:segag80v.cpp elim2 // (c) 1981 Gremlin elim2a // (c) 1981 Gremlin elim2c // (c) 1981 Gremlin @@ -31665,7 +31665,7 @@ startrek // (c) 1982 tacscan // (c) 1982 zektor // (c) 1982 -//@source:segahang.cpp +@source:segahang.cpp endurob2 // (c) 1985 (Beta bootleg) endurobl // (c) 1985 (Herb bootleg) enduror // (c) 1985 (FD1089B) @@ -31680,10 +31680,10 @@ shangonro // (c) 1987 (FD1094) sharrier // (c) 1985 sharrier1 // (c) 1985 -//@source:segajw.cpp +@source:segajw.cpp segajw // -//@source:segald.cpp +@source:segald.cpp astron // (c) 1983 astronp // (c) 1983 cobraseg // (c) ???? @@ -31691,10 +31691,10 @@ galaxyr // (c) 1983 galaxyrp // (c) 1983 sblazerp // (c) 1983 -//@source:segam1.cpp +@source:segam1.cpp bingpty // ? -//@source:segaorun.cpp +@source:segaorun.cpp outrun // Revision B outrunb // 1986 (protected beta bootleg) outrundx // Deluxe version @@ -31721,16 +31721,16 @@ toutrunj1 // 1987 (FD1094) toutrunj1d // bootleg toutrunjd // bootleg -//@source:segapico.cpp +@source:segapico.cpp copera // 1993 Sega / Yamaha pico // 1994 Sega Pico (Europe) picoj // 1993 Sega Pico (Japan) picou // 1994 Sega Pico (USA) -//@source:segapm.cpp +@source:segapm.cpp segapm // 1996 Sega Picture Magic (32x type hardware) -//@source:segas16a.cpp +@source:segas16a.cpp aceattaca // (c) 1988 (FD1094) afighter // (c) 1986 (FD1089A) alexkidd // (c) 1986 (Unprotected) @@ -31768,7 +31768,7 @@ wb31d // wb35 // (c) 1988 Sega / Westone (FD1089A) wb35d // -//@source:segas16b.cpp +@source:segas16b.cpp aceattac // (c) 1988 (FD1094) aliensyn // (c) 1987 (Unprotected) aliensyn3 // (c) 1987 (FD1089A) @@ -31902,7 +31902,7 @@ wrestwar1d // wrestwar2 // (c) 1989 (FD1094) wrestwar2d // -//@source:segas18.cpp +@source:segas18.cpp astorm // 1990.?? Alien Storm (World, FD1094, 2 Players) astorm3 // 1990.?? Alien Storm (World, FD1094) astorm3d // @@ -31953,7 +31953,7 @@ wwallyja // 1992.06 Wally wo Sagase! (Japan, FD1094) wwallyjad // wwallyjd // -//@source:segas24.cpp +@source:segas24.cpp bnzabros // 1990.08 Bonanza Bros. (US) bnzabrosj // 1990.06 Bonanza Bros. (Japan) crkdown // 1989.?? Crack Down (World, FD1094) @@ -31982,7 +31982,7 @@ sspiritj // 1988.10 Scramble Spirits (Japan) sspirits // 1988.?? Scramble Spirits (World) sspirtfc // 1988.?? Scramble Spirits (FD1094) -//@source:segas32.cpp +@source:segas32.cpp alien3 // 1993.?? Aliens 3 (World) alien3u // 1993.11 Aliens 3 (US) arabfgt // 1992.?? Arabian Fight (World) @@ -32036,7 +32036,7 @@ titlef // 1993.?? Title Fight (World) titlefj // 1993.03 Title Fight (Japan) titlefu // 1993.04 Title Fight (US) -//@source:segasp.cpp +@source:segasp.cpp brickppl // dinoki25 // dinoking // 2005.09 Kodai Ouja Kyouryuu King / Ancient Ruler Dinosaur King @@ -32048,7 +32048,7 @@ segasp // tetgiano // tetgiant // -//@source:segaufo.cpp +@source:segaufo.cpp newufo // newufo_nfl // newufo_sonic // @@ -32057,7 +32057,7 @@ ufo21 // ufo800 // ufomini // -//@source:segaxbd.cpp +@source:segaxbd.cpp abcop // 1990.?? A.B.Cop (World, FD1094) abcopd // abcopj // 1991.01 A.B.Cop (Japan, FD1094) @@ -32101,7 +32101,7 @@ thndrbld // 1988.02 Thunder Blade (US?, upright, FD1094) thndrbld1 // 1987.12 Thunder Blade (Japan, deluxe/standard) thndrbldd // -//@source:segaybd.cpp +@source:segaybd.cpp gforce2 // 1988.?? Galaxy Force II (World) gforce2j // 1988.07 Galaxy Force II (Japan) gforce2ja // 1988.07 Galaxy Force II (Japan) @@ -32119,7 +32119,7 @@ rchasej // 1991.09 Rail Chase (Japan) strkfgtr // 1991.06 Strike Fighter (World) strkfgtrj // 1991.06 Strike Fighter (Japan) -//@source:seibuspi.cpp +@source:seibuspi.cpp batlball // (c) 1995 Seibu Kaihatsu (Tuning License) batlballa // (c) 1995 Seibu Kaihatsu (Metrotainment License) batlballe // (c) 1995 Seibu Kaihatsu (Metrotainment License) @@ -32170,7 +32170,7 @@ viprp1s // (c) 1995 Seibu Kaihatsu viprp1u // (c) 1995 Seibu Kaihatsu (Fabtek license) viprp1ua // (c) 1995 Seibu Kaihatsu (Fabtek license) -//@source:seicross.cpp +@source:seicross.cpp friskyt // (c) 1981 friskyta // (c) 1981 friskytb // (c) 1981 @@ -32178,14 +32178,14 @@ radrad // (c) 1982 Nichibutsu USA sectrzon // (c) 1984 + Alice seicross // (c) 1984 + Alice -//@source:selz80.cpp +@source:selz80.cpp dagz80 // selz80 // -//@source:sengokmj.cpp +@source:sengokmj.cpp sengokmj // (c) 1991 Sigma -//@source:senjyo.cpp +@source:senjyo.cpp baluba // (c) 1986 Able Corp. megaforc // (c) 1985 Tehkan + Video Ware license senjyo // (c) 1983 Tehkan @@ -32194,7 +32194,7 @@ starforca // (c) 1984 Tehkan starforcb // (c) 1984 Tehkan starforce // (c) 1984 Tehkan -//@source:seta.cpp +@source:seta.cpp arbalest // UK (c) 1989 + Jordan, Romstar or Taito license (DSW) atehate // (C) 1993 Athena blandia // (c) 1992 Allumer @@ -32263,7 +32263,7 @@ zombraid // (c) 1995 American Sammy zombraidp // (c) 1995 American Sammy zombraidpj // (c) 1995 Sammy Industries Co.,Ltd. -//@source:seta2.cpp +@source:seta2.cpp deerhunt // (c) 2000 Sammy USA Corporation deerhunta // (c) 2000 Sammy USA Corporation deerhuntb // (c) 2000 Sammy USA Corporation @@ -32291,14 +32291,14 @@ wschamp // (c) 2001 Sammy USA Corporation wschampa // (c) 2001 Sammy USA Corporation wschampb // (c) 2001 Sammy USA Corporation -//@source:sf.cpp +@source:sf.cpp sf // 8/1987 (c) 1987 (US) sfan // 8/1987 (c) 1987 (World) sfj // 8/1987 (c) 1987 (Japan) sfp // 8/1987 (c) 1987 sfua // 8/1987 (c) 1987 (US) -//@source:sfbonus.cpp +@source:sfbonus.cpp abnudge // (c) 2003 Amcoe - Animal Bonus Nudge abnudgeb // (c) 2003 Amcoe abnudged // (c) 2003 Amcoe @@ -32534,19 +32534,19 @@ version4v // (c) 2006 Amcoe version4v2 // (c) 2006 Amcoe version4v3 // (c) 2006 Amcoe -//@source:sfcbox.cpp +@source:sfcbox.cpp pss61 // 199? Nintendo pss62 // 199? T & E Soft / I'Max pss63 // 199? Nintendo / BPS pss64 // 199? Nintendo / Hudson Soft sfcbox // -//@source:sfkick.cpp +@source:sfkick.cpp sfkick // (c) 1988 Haesung/HJ Corp sfkicka // (c) 198? Haesung spinkick // (c) 1988 Haesung/Seojin -//@source:sg1000.cpp +@source:sg1000.cpp omv1000 // Tsukuda Original Othello Multivision FG-1000 omv2000 // Tsukuda Original Othello Multivision FG-2000 sc3000 // Sega SC-3000 (Japan) @@ -32555,34 +32555,34 @@ sf7000 // Sega SC-3000 w/ SF-7000 (Japan) sg1000 // Sega SG-1000 (Japan) sg1000m2 // Sega SG-1000 Mark II (Japan) -//@source:sg1000a.cpp +@source:sg1000a.cpp chboxing // (c) 1984 chwrestl // (c) 1985 dokidoki // (c) 1985 -//@source:sh4robot.cpp +@source:sh4robot.cpp sh4robot // -//@source:shadfrce.cpp +@source:shadfrce.cpp shadfrce // TA-0032 (c) 1993 (World) shadfrcej // TA-0032 (c) 1993 (Japan) shadfrceu // TA-0032 (c) 1993 (US) -//@source:shangha3.cpp +@source:shangha3.cpp blocken // (c) 1994 KID / Visco heberpop // (c) 1994 Sunsoft / Atlus shangha3 // (c) 1993 Sunsoft shangha3j // (c) 1993 Sunsoft shangha3u // (c) 1993 Sunsoft -//@source:shanghai.cpp +@source:shanghai.cpp kothello // (c) 1990 Success. shangha2 // (c) 1989 Sunsoft (Sun Electronics) shangha2a // (c) 1989 Sunsoft (Sun Electronics) shanghai // (c) 1988 Sunsoft (Sun Electronics) shanghaij // (c) 1988 Sunsoft (Sun Electronics) -//@source:shangkid.cpp +@source:shangkid.cpp chinhero // (c) 1984 Taiyo chinhero2 // (c) 1984 Taiyo chinhero3 // (c) 1984 Taiyo @@ -32591,34 +32591,34 @@ dynamski // (c) 1984 Taiyo hiryuken // (c) 1985 Taito shangkid // (c) 1985 Taiyo + Data East license -//@source:shaolins.cpp +@source:shaolins.cpp kicker // GX477 (c) 1985 shaolinb // bootleg shaolins // GX477 (c) 1985 -//@source:shisen.cpp +@source:shisen.cpp matchit // (c) 1989 Tamtex shisen // (c) 1989 Tamtex sichuan2 // (c) 1989 Tamtex sichuan2a // (c) 1989 Tamtex -//@source:shootout.cpp +@source:shootout.cpp shootout // (c) 1985 Data East USA (US) shootoutb // bootleg shootoutj // (c) 1985 Data East USA (Japan) -//@source:shougi.cpp +@source:shougi.cpp shougi // (c) 1982 (Arcade TV Game List - P.80, Left, 9 from top) shougi2 // (c) 1982 (Arcade TV Game List - P.80, Left, 10 from top) -//@source:shtzone.cpp +@source:shtzone.cpp shtzone // (c) 1987 -//@source:shuuz.cpp +@source:shuuz.cpp shuuz // 136083 (c) 1990 shuuz2 // 136083 (c) 1990 -//@source:sidearms.cpp +@source:sidearms.cpp dyger // (c) 1989 Philko (NOT A CAPCOM GAME but runs on modified Sidearms hardware) dygera // (c) 1989 Philko (NOT A CAPCOM GAME but runs on modified Sidearms hardware) sidearms // 12/1986 (c) 1986 (World) @@ -32633,18 +32633,18 @@ turtshipko // (c) 1988 Philko (NOT A CAPCOM GAME but runs o twinfalc // (c) 1989 Philko (Poara Enterprises license) (NOT A CAPCOM GAME but runs on modified Sidearms hardware) whizz // (c) 1989 Philko (NOT A CAPCOM GAME but runs on modified Sidearms hardware) -//@source:sidepckt.cpp +@source:sidepckt.cpp sidepckt // (c) 1986 Data East Corporation sidepcktb // bootleg sidepcktj // (c) 1986 Data East Corporation -//@source:sigmab52.cpp +@source:sigmab52.cpp jwildb52 // (c) 199? Sigma jwildb52a // (c) 199? Sigma jwildb52h // (c) 199? Sigma s8waysfc // (c) 199? Sigma -//@source:sigmab98.cpp +@source:sigmab98.cpp animalc // (c) 2000 Sammy b3rinsya // b9805 (c) 1997 Sigma dashhero // b9811 (c) 1999 Sigma @@ -32660,16 +32660,16 @@ tbeastw2 // b9808 (c) 1998 Sigma / Transformer Production tdoboon // (c) 2000 Sammy ucytokyu // b9809 (c) 1997 Sigma -//@source:silkroad.cpp +@source:silkroad.cpp silkroad // (c) 1999 silkroada // (c) 1999 -//@source:silvmil.cpp +@source:silvmil.cpp puzzlove // (c) 1994 Para puzzlovek // (c) 1994 Para silvmil // (c) 1995 Para -//@source:simpl156.cpp +@source:simpl156.cpp candance // MCF (c) 1996 Mitchell chainrec // MCC (c) 1994 charlien // MBR (c) 1994 Mitchell @@ -32682,7 +32682,7 @@ magdropp // MCC (c) 1995 Data East osman // MCF (c) 1996 Mitchell prtytime // MCB (c) 1995 Mitchell -//@source:simple_st0016.cpp +@source:simple_st0016.cpp dcrown // 199? unknown dcrowna // 199? unknown gostop // 2001 Visco @@ -32692,7 +32692,7 @@ mayjisn2 // (c) 1994 Seta nratechu // (c) 1996 Seta renju // (c) 1994 Visco -//@source:simpsons.cpp +@source:simpsons.cpp simpsons // GX072 (c) 1991 simpsons2p // GX072 (c) 1991 simpsons2p2 // GX072 (c) 1991 @@ -32701,42 +32701,42 @@ simpsons2pa // GX072 (c) 1991 (Asia) simpsons2pj // GX072 (c) 1991 (Japan) simpsons4pa // GX072 (c) 1991 -//@source:sitcom.cpp +@source:sitcom.cpp sitcom // -//@source:skeetsht.cpp +@source:skeetsht.cpp popshot // (c) 1991 (prototype) skeetsht // (c) 1991 -//@source:skimaxx.cpp +@source:skimaxx.cpp skimaxx // (c) 1996 Kyle Hodgetts/ICE -//@source:skullxbo.cpp +@source:skullxbo.cpp skullxbo // 136072 (c) 1989 skullxbo1 // 136072 (c) 1989 skullxbo2 // 136072 (c) 1989 skullxbo3 // 136072 (c) 1989 skullxbo4 // 136072 (c) 1989 -//@source:skyarmy.cpp +@source:skyarmy.cpp skyarmy // (c) 1982 Shoei -//@source:skydiver.cpp +@source:skydiver.cpp skydiver // 009787 1978/06 [6800] -//@source:skyfox.cpp +@source:skyfox.cpp exerizer // (c) 1987? Jaleco exerizerb // bootleg skyfox // (c) 1987 Jaleco + Nichibutsu USA license -//@source:skykid.cpp +@source:skykid.cpp drgnbstr // (c) 1984 skykid // (c) 1985 skykidd // (c) 1985 skykido // (c) 1985 skykids // (c) 1985 -//@source:skylncr.cpp +@source:skylncr.cpp butrfly // (c) 1995 Bordun International gallag50 // Bootleg? leader // Bootleg? @@ -32746,10 +32746,10 @@ neraidou // Bootleg? skylncr // (c) 1995 Bordun International sstar97 // (c) 199? Bordun International -//@source:skyraid.cpp +@source:skyraid.cpp skyraid // 009709 1978/03 [6502] -//@source:slapfght.cpp +@source:slapfght.cpp alcon // A77 / TP-??? getstarb1 // GX-006 bootleg but (c) 1986 Taito Corporation getstarb2 // GX-006 bootleg but (c) 1986 Taito Corporation @@ -32768,35 +32768,35 @@ tigerhb2 // bootleg but (c) 1985 Taito Corporation tigerhb3 // bootleg but (c) 1985 Taito Corporation tigerhj // A47 (c) 1985 Taito Corporation GX-551 [not a Konami board!] -//@source:slapshot.cpp +@source:slapshot.cpp opwolf3 // D74 (c) 1994 Taito opwolf3u // D74 (c) 1994 Taito slapshot // D71 (c) 1994 Taito Corporation (Japan) -//@source:slc1.cpp +@source:slc1.cpp slc1 // -//@source:sleic.cpp +@source:sleic.cpp sleicpin // -//@source:slicer.cpp +@source:slicer.cpp slicer // 1983 Slicer Computers -//@source:sliver.cpp +@source:sliver.cpp sliver // (c) 1996 Hollow Corp slivera // -//@source:slotcarn.cpp +@source:slotcarn.cpp slotcarn // (c) 1985 Wing Co. Ltd spielbud // (c) 1985 ADP -//@source:sm1800.cpp +@source:sm1800.cpp sm1800 // -//@source:smc777.cpp +@source:smc777.cpp smc777 // -//@source:sms.cpp +@source:sms.cpp gamegeaj // Sega GameGear (Japan) gamegear // Sega GameGear sg1000m3 // Sega SG-1000 Mark III (Japan) @@ -32810,17 +32810,17 @@ smskr // Samsung Gam*Boy II (Korea) smspal // Sega Master System II (PAL) smssdisp // Sega Master System Store Display Unit -//@source:smsmcorp.cpp +@source:smsmcorp.cpp secondch // (c) 1985 SMS MFG CORP sureshot // (c) 1985 SMS MFG CORP trvhang // (c) 1984 SMS MFG CORP trvhanga // (c) 1984 SMS MFG CORP -//@source:snes.cpp +@source:snes.cpp snes // Nintendo Super Nintendo NTSC snespal // Nintendo Super Nintendo PAL -//@source:snesb.cpp +@source:snesb.cpp denseib // bootleg endless // bootleg ffight2b // bootleg @@ -32829,7 +32829,7 @@ kinstb // bootleg mk3snes // bootleg sblast2b // bootleg -//@source:snk.cpp +@source:snk.cpp alphamis // (c) 1985 arian // (c) 1985 aso // (c) 1985 @@ -32879,7 +32879,7 @@ vangrd2 // A2005 (c) 1984 victroad // A6002 (c) 1986 worldwar // A6004 'WW' (c) 1987 -//@source:snk6502.cpp +@source:snk6502.cpp fantasy // (c) 1981 SNK fantasyj // (c) 1981 SNK fantasyu // (c) 1981 Rock-Ola @@ -32899,7 +32899,7 @@ vanguardc // (c) 1981 SNK + Centuri vanguardj // (c) 1981 SNK zarzon // (c) 1981 Taito, gameplay says SNK -//@source:snk68.cpp +@source:snk68.cpp ikari3 // A7007 'IK3'(c) 1989 ikari3j // A7007 'IK3'(c) 1989 ikari3k // A7007 'IK3'(c) 1989 @@ -32914,13 +32914,13 @@ streetsm1 // A7008 'S2' (c) 1989 streetsmj // A8007 'S2' (c) 1989 streetsmw // (c) 1989 -//@source:snookr10.cpp +@source:snookr10.cpp apple10 // (c) 1998 Sandii' crystalc // 199? unknown snookr10 // (c) 1998 Sandii' tenballs // 1997 unknown -//@source:snowbros.cpp +@source:snowbros.cpp 3in1semi // (c) 1998 SemiCom 4in1boot // (c) 2002 KISoft (includes hacks of Semicom games + Snowbros) ballboy // bootleg @@ -32951,32 +32951,32 @@ twinadvk // (c) 1995 Barko Corp twinkle // (c) 1997 SemiCom wintbob // bootleg -//@source:socrates.cpp +@source:socrates.cpp iqunlimz // 1991 IQ Unlimited (Z80) profweis // 1988 (Yeno) Professor Weiss-Alles (Germany) socrates // 1988 Socrates Educational Video System (USA) socratfc // 1988 Socrates SAITOUT (French Canada) -//@source:softbox.cpp +@source:softbox.cpp softbox // -//@source:solomon.cpp +@source:solomon.cpp solomon // (c) 1986 Tecmo solomonj // (c) 1986 Tecmo -//@source:sonson.cpp +@source:sonson.cpp sonson // 7/1984 (c) 1984 sonsonj // 7/1984 (c) 1984 (Japan) -//@source:sorcerer.cpp +@source:sorcerer.cpp sorcerer // Sorcerer sorcerer2 // monitor 1.1 1979 sorcererd // Sorcerer with floppies -//@source:sothello.cpp +@source:sothello.cpp sothello // (c) 1986 Success / Fujiwara. -//@source:spacefb.cpp +@source:spacefb.cpp spacebrd // bootleg spacedem // (c) 1980 Fortrek + made by Nintendo spacefb // (c) [1980?] Nintendo @@ -32987,38 +32987,38 @@ spacefbe2 // (c) [1980?] Nintendo spacefbg // 834-0031 (c) 1980 Gremlin starwarr // Potomac Mortgage -//@source:spaceg.cpp +@source:spaceg.cpp spaceg // (c) 19?? -//@source:spbactn.cpp +@source:spbactn.cpp spbactn // 9002 - (c) 1991 Tecmo spbactnj // 9002 - (c) 1991 Tecmo spbactnp // prototype -//@source:spc1000.cpp +@source:spc1000.cpp spc1000 // -//@source:spc1500.cpp +@source:spc1500.cpp spc1500 // -//@source:spcforce.cpp +@source:spcforce.cpp meteor // (c) 1981 Venture Line meteors // (c) 1981 Amusement World spcforc2 // bootleg spcforce // (c) 1980 Venture Line -//@source:spdodgeb.cpp +@source:spdodgeb.cpp nkdodge // TA-0022 (c) 1987 (Japan) nkdodgeb // TA-0022 (c) 1987 (Japan) spdodgeb // TA-0022 (c) 1987 -//@source:spec128.cpp +@source:spec128.cpp hc128 // 1991 HC-128 hc2000 // 1992 HC-2000 spec128 // 1986 ZX Spectrum 128 specpls2 // 1986 ZX Spectrum +2 -//@source:special.cpp +@source:special.cpp erik // lik // pioner // @@ -33027,7 +33027,7 @@ specialm // specialp // specimx // -//@source:specpls3.cpp +@source:specpls3.cpp sp3e8bit // 2002 ZX Spectrum +3e 8bit IDE sp3eata // 2002 ZX Spectrum +3e ZXATASP sp3ezcf // 2002 ZX Spectrum +3e ZXCF @@ -33035,10 +33035,10 @@ specpl2a // 1987 ZX Spectrum +2a specpl3e // 2000 ZX Spectrum +3e specpls3 // 1987 ZX Spectrum +3 -//@source:spectra.cpp +@source:spectra.cpp spectra // -//@source:spectrum.cpp +@source:spectrum.cpp blitzs // 1990 Blic byte // 1990 Byte cip01 // 1987 CIP-01 @@ -33072,33 +33072,33 @@ tk90x // 1985 TK90x Color Computer tk95 // 1986 TK95 Color Computer zvezda // 1990 Zvezda -//@source:speedatk.cpp +@source:speedatk.cpp speedatk // CB-0 (c) SetaKikaku -//@source:speedbal.cpp +@source:speedbal.cpp musicbal // (c) 1987 speedbal // (c) 1987 -//@source:speedspn.cpp +@source:speedspn.cpp speedspn // (c) 1994 -//@source:speglsht.cpp +@source:speglsht.cpp speglsht // (c) 1994 Seta -//@source:spiders.cpp +@source:spiders.cpp spiders // (c) 1981 Sigma Ent. Inc. spiders2 // (c) 1981 Sigma Ent. Inc. spiders3 // (c) 1981 Sigma Ent. Inc. spinner // bootleg -//@source:spinb.cpp +@source:spinb.cpp bushido // bushidoa // jolypark // mach2 // vrnwrld // -//@source:splash.cpp +@source:splash.cpp funystrp // not a gaelco game but on similar hw to splash paintlad // (c) 1992 - ver 1.3 puckpepl // not a gaelco game but on similar hw to splash @@ -33108,26 +33108,26 @@ roldfroga // not a gaelco game but based on splash code splash // (c) 1992 - Ref 922804 splash10 // (c) 1992 - Ref 922804 -//@source:splus.cpp +@source:splus.cpp spss4240 // -//@source:spoker.cpp +@source:spoker.cpp 3super8 // unknown spk115it // (c) 199? IGS spk116it // (c) 199? IGS -//@source:spool99.cpp +@source:spool99.cpp spool99 // (c) 1998 Electronic Projects spool99a // (c) 1998 Electronic Projects spool99b // (c) 1998 Electronic Projects spool99c // (c) 1998 Electronic Projects vcarn // (c) 1999 Electronic Projects -//@source:sprcros2.cpp +@source:sprcros2.cpp sprcros2 // (c) 1986 GM Shoji sprcros2a // (c) 1986 GM Shoji -//@source:sprint2.cpp +@source:sprint2.cpp dominos // 007305 1977/01 [6502] dominos4 // 007754-007765 ??????? [6502] sprint1 // 006443 1978/01 [6502] @@ -33135,22 +33135,22 @@ sprint2 // 005922 1976/11 [6502] sprint2a // 005922 1976/11 [6502] sprint2h // 005922 romkit -//@source:sprint4.cpp +@source:sprint4.cpp sprint4 // 008716 1977/12 [6502] sprint4a // 008716 1977/12 [6502] -//@source:sprint8.cpp +@source:sprint8.cpp sprint8 // ?????? 1977/05 [6800] sprint8a // ?????? 1977/05 [6800] -//@source:spy.cpp +@source:spy.cpp spy // GX857 (c) 1989 (World) spyu // GX857 (c) 1989 (US) -//@source:squale.cpp +@source:squale.cpp squale // -//@source:srmp2.cpp +@source:srmp2.cpp mjyuugi // (c) 1990 Visco mjyuugia // (c) 1990 Visco ponchin // (c) 1991 Visco @@ -33160,58 +33160,58 @@ srmp1 // UB or UC?? (c) 1987 srmp2 // UB or UC?? (c) 1987 srmp3 // ZA-0? (c) 1988 -//@source:srmp5.cpp +@source:srmp5.cpp srmp5 // (c) 199? Seta -//@source:srmp6.cpp +@source:srmp6.cpp srmp6 // (c) 1996 Seta (Japan) -//@source:srumbler.cpp +@source:srumbler.cpp rushcrsh // 9/1986 (c) 1986 srumbler // 9/1986 (c) 1986 srumbler2 // 9/1986 (c) 1986 srumbler3 // 9/1986 (c) 1986 + Tecfri -//@source:ssem.cpp +@source:ssem.cpp ssem // Manchester Small-Scale Experimental Machine, "Baby" -//@source:ssfindo.cpp +@source:ssfindo.cpp ppcar // (c) 1999 Icarus ssfindo // (c) 1999 Icarus tetfight // (c) 2001 Sego -//@source:sshangha.cpp +@source:sshangha.cpp sshangha // (c) 1992 Hot-B sshanghab // bootleg -//@source:sshot.cpp +@source:sshot.cpp gunchamps // (c) 1980 Model Racing (sshot.cpp) sshot // (c) 1979 Model Racing -//@source:ssingles.cpp +@source:ssingles.cpp atamanot // (c) 1983 Yachiyo Denki / Uni Enterprize ssingles // Yachiyo? -//@source:sslam.cpp +@source:sslam.cpp powerbals // (c) 1994 sslam // (c) 1993 - hack of Namco's Super World Court sslama // ^ sslamb // ^ -//@source:ssozumo.cpp +@source:ssozumo.cpp ssozumo // TA-0008 (c) 1984 -//@source:sspeedr.cpp +@source:sspeedr.cpp sspeedr // 1979 Midway -//@source:ssrj.cpp +@source:ssrj.cpp ssrj // A40 (c) 1985 Taito Corporation -//@source:sstrangr.cpp +@source:sstrangr.cpp sstrangr // (c) 1978 Yachiyo Electronics, Ltd. sstrangr2 // (c) 1979 Yachiyo Electronics, Ltd. -//@source:ssv.cpp +@source:ssv.cpp cairblad // (c) 1999 Sammy drifto94 // (c) 1994 Visco dynagear // (c) 1993 Sammy @@ -33244,10 +33244,10 @@ vasara // (c) 2000 Visco vasara2 // (c) 2001 Visco vasara2a // (c) 2001 Visco -//@source:ssystem3.cpp +@source:ssystem3.cpp ssystem3 // Chess Champion Super System III / MK III -//@source:st_mp100.cpp +@source:st_mp100.cpp dracula // hothand // lectrono // @@ -33261,7 +33261,7 @@ stingray // trident // wildfyre // -//@source:st_mp200.cpp +@source:st_mp200.cpp ali // biggame // blkshpsq // @@ -33285,7 +33285,7 @@ st_game // stargzr // viperp // -//@source:st17xx.cpp +@source:st17xx.cpp st1700h // st1701 // st1702 // @@ -33297,33 +33297,33 @@ st1707 // st1708 // st1714 // -//@source:stactics.cpp +@source:stactics.cpp stactics // (c) 1981 Sega -//@source:stadhero.cpp +@source:stadhero.cpp stadhero // (c) 1988 Data East Corporation (Japan) -//@source:starcrus.cpp +@source:starcrus.cpp starcrus // (c) 1977 Ramtek -//@source:starfire.cpp +@source:starfire.cpp fireone // (c) 1979 Exidy starfir2 // (c) 1979 Exidy starfire // Exidy [1979?] starfirea // Exidy [1979?] -//@source:starshp1.cpp +@source:starshp1.cpp starshp1 // 007513-007531 1977/07 [6502] starshpp // 007513-007531 1977/07 [6502] -//@source:starwars.cpp +@source:starwars.cpp esb // 136031 (c) 1985 starwars // 136021 (c) 1983 starwars1 // 136021 (c) 1983 starwarso // 136021 (c) 1983 tomcatsw // (proto) (c) 1983 -//@source:statriv2.cpp +@source:statriv2.cpp cstripxi // (c) 1981 Status Games funcsino // (c) 1981 Status Games hangman // (c) 1984 Status Games @@ -33338,11 +33338,11 @@ supertr3 // (c) 1986 Status Games tripdraw // (c) 1981 Status Games trivquiz // (c) 1984 Status Games -//@source:stellafr.cpp +@source:stellafr.cpp st_ohla // st_vulkn // -//@source:stfight.cpp +@source:stfight.cpp cshooter // (c) 1987 Taito empcity // (c) 1986 Seibu Kaihatsu (bootleg?) empcityi // (c) 1986 Seibu Kaihatsu (Eurobed license) @@ -33351,21 +33351,21 @@ empcityu // (c) 1986 Taito (Romstar License) stfight // (c) 1986 Seibu Kaihatsu (Germany) (bootleg?) stfighta // (c) 1986 Seibu Kaihatsu (bootleg?) -//@source:stlforce.cpp +@source:stlforce.cpp stlforce // (c) 1994 Electronic Devices (Italy) / Ecogames S.L. (Spain) twinbrat // (c) 1995 twinbrata // (c) 1995 -//@source:stratos.cpp +@source:stratos.cpp stratos // Kasparov Stratos Chess Computer -//@source:strnskil.cpp +@source:strnskil.cpp banbam // TVG16 (c) 1984 Sun Electronics guiness // TVG15 (c) 1984 Sun Electronics pettanp // TVG16 (c) 1984 Sun Electronics (Japan) strnskil // TVG15 (c) 1984 Sun Electronics -//@source:studio2.cpp +@source:studio2.cpp apollo80 // cm1200 // mpt02 // @@ -33375,10 +33375,10 @@ shmc1200 // studio2 // 1977 Studio II visicom // -//@source:stuntair.cpp +@source:stuntair.cpp stuntair // (c) 1983 Nuova Videotron -//@source:stv.cpp +@source:stv.cpp astrass // 1998.06 Astra Super Stars (Sunsoft) bakubaku // 1995.04 Bakubaku Animal batmanfr // 1996.02 Batman Forever (Acclaim) @@ -33463,19 +33463,19 @@ vmahjong // 1997.02 Virtual Mahjong (Micronet) winterht // 1997.10 Winter Heat (Data East) znpwfv // 1997.12 Zen Nippon Pro Wrestling featuring Virtua -//@source:su2000.cpp +@source:su2000.cpp su2000 // (c) 1993 Virtuality -//@source:sub.cpp +@source:sub.cpp sub // (c) 1985 Sigma Ent. Inc. -//@source:subhuntr.cpp +@source:subhuntr.cpp subhuntr // 1979 Model Racing -//@source:subs.cpp +@source:subs.cpp subs // 033714 1979/05 [6502] -//@source:subsino.cpp +@source:subsino.cpp crsbingo // (c) 1991 Subsino mtrainnv // (c) 1996 Subsino sharkpy // (c) 1996 Subsino @@ -33496,7 +33496,7 @@ victor6 // (c) 1995 Subsino (Alpha license) victor6a // (c) 1995 Subsino (Alpha license) victor6b // (c) 1995 Subsino (Alpha license) -//@source:subsino2.cpp +@source:subsino2.cpp bishjan // (c) 1999 Subsino expcard // (c) 1998 American Alpha mtrain // (c) 1996 Subsino @@ -33506,21 +33506,21 @@ wtrnymph // (c) 1996 Subsino xplan // (c) 2006 Subsino xtrain // (c) 1999 Subsino -//@source:summit.cpp +@source:summit.cpp pushover // (c)1981 Summit Coin -//@source:sumt8035.cpp +@source:sumt8035.cpp sm_ngacc // Nudge Accumulator sm_ultng // Ultimate Nudge -//@source:sun1.cpp +@source:sun1.cpp sun1 // -//@source:sun2.cpp +@source:sun2.cpp sun2_120 // sun2_50 // -//@source:sun3.cpp +@source:sun3.cpp sun3_110 // sun3_150 // sun3_260 // @@ -33530,7 +33530,7 @@ sun3_60 // sun3_80 // sun3_e // -//@source:sun4.cpp +@source:sun4.cpp sun_s10 // sun_s20 // sun4_20 // @@ -33540,14 +33540,14 @@ sun4_50 // sun4_60 // sun4_75 // -//@source:suna16.cpp +@source:suna16.cpp bestbest // (c) 1994 SunA bssoccer // (c) 1996 SunA bssoccera // (c) 1996 SunA sunaq // (c) 1994 SunA uballoon // (c) 1996 SunA -//@source:suna8.cpp +@source:suna8.cpp brickzn // (c) 1992 SunA brickzn11 // (c) 1992 SunA brickznv4 // (c) 1992 SunA @@ -33569,24 +33569,24 @@ srangero // (c) 1988 srangerw // (c) 1988 SunA (WDK License) starfigh // (c) 1990 SunA -//@source:supbtime.cpp +@source:supbtime.cpp chinatwn // MAK (c) 1991 Data East Corporation (Japan) supbtime // MAE (c) 1990 Data East Corporation (World) supbtimea // MAE (c) 1990 Data East Corporation (World) supbtimej // MAE (c) 1990 Data East Corporation (Japan) -//@source:supdrapo.cpp +@source:supdrapo.cpp supdrapo // (c) 1983 + Stern license supdrapoa // (c) 1983 + Jeutel license? supdrapob // bootleg -//@source:supduck.cpp +@source:supduck.cpp supduck // (c) Comad -//@source:super6.cpp +@source:super6.cpp super6 // -//@source:super80.cpp +@source:super80.cpp super80 // super80d // super80e // @@ -33594,25 +33594,25 @@ super80m // super80r // super80v // -//@source:superchs.cpp +@source:superchs.cpp superchs // D46 (c) 1992 Taito Corporation Japan (World) superchsj // D46 (c) 1992 Taito Corporation (Japan) superchsp // prototype superchsu // D46 (c) 1992 Taito America Corporation (US) -//@source:supercon.cpp +@source:supercon.cpp supercon // -//@source:supercrd.cpp +@source:supercrd.cpp fruitstr // (c) 1992 Fun World supercrd // (c) 1992 Fun World -//@source:superdq.cpp +@source:superdq.cpp superdq // ???? (c) 1984 superdqa // ???? (c) 1984 superdqs // ???? (c) 1984 -//@source:superqix.cpp +@source:superqix.cpp hotsmash // B18 (c) 1987 Taito pbillian // (c) 1986 Taito perestro // (c) 1994 Promat @@ -33623,27 +33623,27 @@ sqixb2 // bootleg? but (c) 1987 sqixr1 // B03 1987 sqixu // B03 1987 -//@source:superslave.cpp +@source:superslave.cpp superslv // -//@source:supertnk.cpp +@source:supertnk.cpp supertnk // (c) 1981 VIDEO GAMES GmbH, W.-GERMANY -//@source:superwng.cpp +@source:superwng.cpp superwng // (c) 1985 Wing Co. Ltd -//@source:supracan.cpp +@source:supracan.cpp supracan // -//@source:suprgolf.cpp +@source:suprgolf.cpp albatross // suprgolf // (c) 1989 Nasco -//@source:suprloco.cpp +@source:suprloco.cpp suprloco // (c) 1982 Sega suprlocoo // (c) 1982 Sega -//@source:suprnova.cpp +@source:suprnova.cpp cyvern // 1998.02 (c) 1998 Kaneko (US) cyvernj // 1998.02 (c) 1998 Kaneko (Japan) galpani4 // 1996.09 (c) 1996 Kaneko (Japan) @@ -33675,21 +33675,21 @@ skns // teljan // 1999.11 (c) 1999 Electro Design Co. (Japan) vblokbrk // 1997.?? (c) 1997 Kaneko / Mediaworks (Asia) -//@source:suprridr.cpp +@source:suprridr.cpp suprridr // (c) 1983 Venture Line + Taito license -//@source:suprslam.cpp +@source:suprslam.cpp suprslam // (c) 1995 Banpresto -//@source:surpratk.cpp +@source:surpratk.cpp suratk // GX911 (c) 1990 (World) suratka // GX911 (c) 1990 (Asia) suratkj // GX911 (c) 1990 (Japan) -//@source:sv8000.cpp +@source:sv8000.cpp sv8000 // Super Vision 8000 -//@source:svi318.cpp +@source:svi318.cpp sv328n80 // SVI-328 (NTSC) + SVI-806 80 column card sv328p80 // SVI-328 (PAL) + SVI-806 80 column card svi318 // SVI-318 (PAL) @@ -33697,38 +33697,38 @@ svi318n // SVI-318 (NTSC) svi328 // SVI-328 (PAL) svi328n // SVI-328 (NTSC) -//@source:svision.cpp +@source:svision.cpp svision // Supervision Handheld svisionn // svisionp // svisions // tvlinkp // -//@source:svmu.cpp +@source:svmu.cpp svmu // 1998 Sega Visual Memory Unit -//@source:swtpc.cpp +@source:swtpc.cpp swtpc // -//@source:swtpc09.cpp +@source:swtpc09.cpp swtpc09 // S09, DMF2 Floppy SBUG rom - FLEX swtpc09d3 // S09, DMF3 Floppy UNIBUG U3 rom - UniFLEX U3 swtpc09i // S09, DC4 Floppy + PIA IDE SBUG rom - FLEX swtpc09u // S09, DMF2 Floppy UNIBUG rom - UniFLEX -//@source:swyft.cpp +@source:swyft.cpp swyft // -//@source:sym1.cpp +@source:sym1.cpp sym1 // Synertek SYM-1 -//@source:sys2900.cpp +@source:sys2900.cpp sys2900 // -//@source:systec.cpp +@source:systec.cpp systec // -//@source:system1.cpp +@source:system1.cpp 4dwarrio // 834-5918 (c) 1985 Coreland / Sega (S1) blockgal // 834-6303 (S1) blockgalb // bootleg @@ -33806,7 +33806,7 @@ wboyu // 834-5753 (? maybe a conversion) (c) 1986 + Es wboyub // bootleg of wboyu wmatch // (c) 1984 (S1) -//@source:system16.cpp +@source:system16.cpp altbeastbl // astormb2 // BOOTLEG astormbl // BOOTLEG @@ -33831,16 +33831,16 @@ tturfbl // (c) 1989 (Datsu bootleg) wb3bbl // bootleg wb3bble // bootleg -//@source:tagteam.cpp +@source:tagteam.cpp bigprowr // TA-0007 (c) 1983 tagteam // TA-0007 (c) 1983 + Data East license -//@source:tail2nos.cpp +@source:tail2nos.cpp sformula // [1989] V-System Co. (Japan) sformulaa // [1989] V-System Co. (Japan) tail2nos // [1989] V-System Co. -//@source:taito.cpp +@source:taito.cpp cavnegro // cavnegro1 // cavnegro2 // @@ -33879,7 +33879,7 @@ vortexp // zarza // zarza1 // -//@source:taito_b.cpp +@source:taito_b.cpp ashura // C43 (c) 1990 Taito Corporation Japan (World) ashuraj // C43 (c) 1990 Taito Corporation (Japan) ashurau // C43 (c) 1990 Taito America Corporation (US) @@ -33916,7 +33916,7 @@ viofightj // C16 (c) 1989 Taito Corporation (Japan) viofightu // C16 (c) 1989 Taito America Corporation (US) yukiwo // prototype -//@source:taito_f2.cpp +@source:taito_f2.cpp cameltry // 1990.?? C38 (c) 1989 Taito America Corporation (US) cameltrya // 1990.?? C38 (c) 1989 Taito America Corporation (US) cameltryau // 1990.?? C38 (c) 1989 Taito America Corporation (US) @@ -33979,7 +33979,7 @@ thundfoxu // 1990.06 C28 (c) 1990 Taito America Corporatio yesnoj // 1992.03 D20 (c) 1992 Taito Corporation (Japan) yuyugogo // 1991.03 C83 (c) 1990 Taito Corporation (Japan) -//@source:taito_f3.cpp +@source:taito_f3.cpp akkanvdr // 1995.07 E06 (c) 1995 Taito Corporation (Japan) arabianm // 1992.?? D29 (c) 1992 Taito Corporation Japan (World) arabianmj // 1992.09 D29 (c) 1992 Taito Corporation (Japan) @@ -34073,7 +34073,7 @@ trstaro // 1993.?? D53 (c) 1993 Taito Corporation (World trstaroj // 1993.07 D53 (c) 1993 Taito Corporation (Japan) twinqix // 1995.03 ??? (c) 1995 Taito America Corporation (US) -//@source:taito_h.cpp +@source:taito_h.cpp dleague // C02 (c) 1990 Taito America Corporation (US) dleaguej // C02 (c) 1990 Taito Corporation (Japan) gogold // B56 (c) 1988 Taito Corporation (Japan) @@ -34082,7 +34082,7 @@ syvalion // B51 (c) 1988 Taito Corporation (Japan) syvalionp // tetristh // C26 (c) 1988 Sega Enterprises,Ltd. (Japan) -//@source:taito_l.cpp +@source:taito_l.cpp cachat // ??? (c) 1993 Taito Corporation (Japan) champwr // C01 (c) 1989 Taito Corporation Japan (World) champwrj // C01 (c) 1989 Taito Corporation (Japan) @@ -34116,10 +34116,10 @@ raimaisj // B36 (c) 1988 Taito Corporation raimaisjo // B36 (c) 1988 Taito Corporation tubeit // ??? no copyright message -//@source:taito_o.cpp +@source:taito_o.cpp parentj // C42 (c) 199? Taito -//@source:taito_x.cpp +@source:taito_x.cpp ballbros // no copyright notice daisenpu // B87 (c) 1989 Taito Corporation (Japan) gigandes // (c) 1989 East Technology @@ -34131,7 +34131,7 @@ supermanu // B61 (c) 1988 Taito Corporation twinhawk // B87 (c) 1989 Taito Corporation Japan (World) twinhawku // B87 (c) 1989 Taito America Corporation (US) -//@source:taito_z.cpp +@source:taito_z.cpp aquajack // B77 (c) 1990 Taito Corporation Japan (World) aquajackj // B77 (c) 1990 Taito Corporation (Japan) aquajacku // B77 (c) 1990 Taito America Corporation (US) @@ -34167,12 +34167,12 @@ spacegun // C57 (c) 1990 Taito Corporation Japan (World) spacegunj // C57 (c) 1990 Taito Corporation (Japan) spacegunu // C57 (c) 1990 Taito America Corporation (US) -//@source:taitoair.cpp +@source:taitoair.cpp ainferno // C45 (c) 1990 Taito America Corporation (US) ainfernoj // C45 (c) 1990 Taito Corporation (Japan) topland // B62 (c) 1988 Taito Corporation Japan (World) -//@source:taitogn.cpp +@source:taitogn.cpp chaoshea // 1998.10 Chaos Heat (V2.09O) chaosheaj // 1998.10 Chaos Heat (V2.08J) flipmaze // 1999.09 Flip Maze (V2.04J) @@ -34201,7 +34201,7 @@ xiistag // 2002.07 XII Stag (V2.01J) zokuoten // 2000.12 Zoku Otenamihaiken (V2.03J) zooo // 2004.05 Zooo -//@source:taitojc.cpp +@source:taitojc.cpp dangcurv // 1995.?? E09 (c) 1995 Taito Corporation dendego // 1997.03 E35 (c) 1996 Taito Corporation (Japan) - Ver 2.2 J dendego2 // 1998.03 E52 (c) 1998 Taito Corporation (Japan) - Ver 2.5 J @@ -34216,10 +34216,10 @@ sidebs2 // 1997.?? E38 (c) 1997 Taito Corporation (US) - sidebs2j // 1997.07 E38 (c) 1997 Taito Corporation (Japan) - Ver 2.4 J sidebsja // 1996.07 E23 (c) 1996 Taito Corporation (Japan) - Ver 2.5 J -//@source:taitopjc.cpp +@source:taitopjc.cpp optiger // 1998.09 E63 (c) 1998 Taito -//@source:taitosj.cpp +@source:taitosj.cpp alpine // RH (c) 1982 Taito Corporation alpinea // RH (c) 1982 Taito Corporation bioatack // AA8 (c) 1983 Taito Corporation + Fox Video Games license @@ -34245,13 +34245,13 @@ waterski // A03 (c) 1983 Taito Corporation wwestern // WW (c) 1982 Taito Corporation wwestern1 // WW (c) 1982 Taito Corporation -//@source:taitottl.cpp +@source:taitottl.cpp gunman // (c) 1977 Taito missilex // (c) 1977 Taito ttblock // (c) 1977 Taito zzblock // (c) 1979 Taito -//@source:taitotx.cpp +@source:taitotx.cpp chaosbrk // (c) 2004 Taito Corporation chasehq2 // (c) 2006 Taito Corporation goketsuj // (c) 2009 Atlus @@ -34268,7 +34268,7 @@ trbwtchs // (c) 2008 Adventure Planning Service/Studio Si usagiol // (c) 2005 Taito Corporation/Warashi wontmuch // (c) 2006 Capcom -//@source:taitotz.cpp +@source:taitotz.cpp batlgear // E68 (c) 1999 Taito batlgr2 // E87 (c) 2000 Taito (2.04J) batlgr2a // E87 (c) 2000 Taito (2.01J) @@ -34280,13 +34280,13 @@ raizpinj // styphp // E98 (c) 2000 Taito taitotz // -//@source:taitowlf.cpp +@source:taitowlf.cpp pf2012 // E59 (c) 1997 Taito -//@source:tamag1.cpp +@source:tamag1.cpp tama // Bandai -//@source:tandy1t.cpp +@source:tandy1t.cpp t1000hx // 1987 Tandy 1000 HX (similiar to PCJr) t1000rl // 1989 Tandy 1000 RL t1000sl2 // 198? Tandy 1000 SL/2 @@ -34294,46 +34294,46 @@ t1000sx // 1987 Tandy 1000 SX (similiar to PCJr) t1000tl2 // 1989 Tandy 1000 TL/2 t1000tx // 1987 Tandy 1000 TX -//@source:tandy2k.cpp +@source:tandy2k.cpp tandy2k // tandy2khd // -//@source:tank8.cpp +@source:tank8.cpp tank8 // ?????? 1976/04 [6800] tank8a // ?????? 1976/04 [6800] tank8b // ?????? 1976/04 [6800] tank8c // ?????? 1976/04 [6800] tank8d // ?????? 1976/04 [6800] -//@source:tankbatt.cpp +@source:tankbatt.cpp tankbatt // (c) 1980 Namco tankbattb // bootleg -//@source:tankbust.cpp +@source:tankbust.cpp tankbust // (c) 1985 -//@source:taotaido.cpp +@source:taotaido.cpp taotaido // (c) 1993 Video System Co. taotaido3 // (c) 1993 Video System Co. taotaidoa // (c) 1993 Video System Co. -//@source:tapatune.cpp +@source:tapatune.cpp smartoss // srockbwl // tapatune // -//@source:targeth.cpp +@source:targeth.cpp targeth // (c) 1994 - Ref 940531 targetha // (c) 1994 - Ref 940531 -//@source:tasman.cpp +@source:tasman.cpp dragsphr // ivorytsk // kingtut // moneybnk // vikingt // -//@source:tatsumi.cpp +@source:tatsumi.cpp apache3 // (c) 1988 Tatsumi apache3a // (c) 1988 Tatsumi + Kana Corporation license bigfight // (c) 1992 Tatsumi @@ -34341,42 +34341,42 @@ cyclwarr // (c) 1991 Tatsumi cyclwarra // (c) 1991 Tatsumi roundup5 // (c) 1989 Tatsumi -//@source:tattack.cpp +@source:tattack.cpp tattack // (c) 198? Shonan -//@source:tavernie.cpp +@source:tavernie.cpp cpu09 // ivg09 // -//@source:taxidriv.cpp +@source:taxidriv.cpp taxidriv // [1984 Graphic Techno] -//@source:tb303.cpp +@source:tb303.cpp tb303 // Roland -//@source:tbowl.cpp +@source:tbowl.cpp tbowl // 6206 - (c) 1987 Tecmo tbowlj // 6206 - (c) 1987 Tecmo tbowlp // Suspected proto of Japanese version for US Market -//@source:tceptor.cpp +@source:tceptor.cpp tceptor // (c) 1986 tceptor2 // (c) 1986 -//@source:tcl.cpp +@source:tcl.cpp tcl // (c) 1995 Uniwang -//@source:tdv2324.cpp +@source:tdv2324.cpp tdv2324 // -//@source:tec1.cpp +@source:tec1.cpp tec1 // Talking Electronics Computer tecjmon // Talking Electronics Computer -//@source:techno.cpp +@source:techno.cpp xforce // -//@source:tecmo.cpp +@source:tecmo.cpp backfirt // bootleg [(c) 1988 Tecmo] gemini // (c) 1987 Tecmo rygar // 6002 - (c) 1986 Tecmo @@ -34386,39 +34386,39 @@ rygarj // 6002 - (c) 1986 Tecmo silkworm // 6217 - (c) 1988 Tecmo silkwormj // 6217 - (c) 1988 Tecmo -//@source:tecmo16.cpp +@source:tecmo16.cpp fstarfrc // (c) 1992 Tecmo fstarfrcj // (c) 1992 Tecmo ginkun // (c) 1995 Tecmo riot // (c) 1992 NMK -//@source:tecmosys.cpp +@source:tecmosys.cpp deroon // (c) 1996 Tecmo tkdensho // (c) 1996 Tecmo tkdenshoa // (c) 1996 Tecmo -//@source:tecnbras.cpp +@source:tecnbras.cpp tecnbras // -//@source:tehkanwc.cpp +@source:tehkanwc.cpp gridiron // (c) 1985 Tehkan teedoff // 6102 - (c) 1986 Tecmo tehkanwc // (c) 1985 Tehkan tehkanwcb // bootleg tehkanwcc // bootleg -//@source:tek405x.cpp +@source:tek405x.cpp tek4051 // tek4052a // -//@source:tek410x.cpp +@source:tek410x.cpp tek4107a // tek4109a // -//@source:tekxp33x.cpp +@source:tekxp33x.cpp tekxp330 // -//@source:tempest.cpp +@source:tempest.cpp tempest // 136002 (c) 1980 tempest1 // 136002 (c) 1980 tempest1r // 136002 (c) 1980 @@ -34426,10 +34426,10 @@ tempest2 // 136002 (c) 1980 tempest3 // 136002 (c) 1980 temptube // (hack) -//@source:terak.cpp +@source:terak.cpp terak // -//@source:terracre.cpp +@source:terracre.cpp amatelas // (c) 1986 amazon // (c) 1986 boobhack // bootleg @@ -34440,11 +34440,11 @@ terracrea // (c) 1985 terracren // (c) 1985 terracreo // (c) 1985 -//@source:test_t400.cpp +@source:test_t400.cpp test410 // test420 // -//@source:tetrisp2.cpp +@source:tetrisp2.cpp nndmseal // (c) 1997 I'Max/Jaleco nndmseala // (c) 1997 I'Max/Jaleco rockn // (c) 1999 Jaleco @@ -34459,21 +34459,21 @@ tetrisp2 // (c) 1997 Jaleco tetrisp2j // (c) 1997 Jaleco tetrisp2ja // (c) 1997 Jaleco -//@source:tgtpanic.cpp +@source:tgtpanic.cpp tgtpanic // GX601 (c) 1996 -//@source:thayers.cpp +@source:thayers.cpp thayers // (c) 1983 RDI Video Systems thayersa // (c) 1983 RDI Video Systems -//@source:thedealr.cpp +@source:thedealr.cpp thedealr // Visco Games -//@source:thedeep.cpp +@source:thedeep.cpp rundeep // (c) 1988 Cream (bootleg?) thedeep // (c) 1987 Wood Place -//@source:thepit.cpp +@source:thepit.cpp desertdn // (c) 1982 Video Optics dockman // (c) 1982 Taito Corp. fitter // (c) 1981 Taito @@ -34496,13 +34496,13 @@ thepitu2 // (c) 1982 Centuri (licensed) ttfitter // bootleg zaryavos // (c) 1983 Nova Games of Canada (prototype) -//@source:thief.cpp +@source:thief.cpp natodef // (c) 1982 natodefa // (c) 1982 sharkatt // (c) 1980 thief // (c) 1981 -//@source:thomson.cpp +@source:thomson.cpp mo5 // 1984 Thomson MO5 mo5e // 1986 Thomson MO5E (export version) mo5nr // 1986 Thomson MO5 NR @@ -34517,14 +34517,14 @@ to8d // 1987 Thomson T08D to9 // 1985 Thomson T09 to9p // 1986 Thomson T09+ -//@source:thoop2.cpp +@source:thoop2.cpp thoop2 // (c) 1994 - Ref ??? -//@source:thunderj.cpp +@source:thunderj.cpp thunderj // 136076 (c) 1990 thunderja // 136076 (c) 1990 -//@source:thunderx.cpp +@source:thunderx.cpp crazycop // GX878 (c) 1988 (Japan) gbusters // GX878 (c) 1988 gbustersa // GX878 (c) 1988 @@ -34535,14 +34535,14 @@ thunderxa // GX873 (c) 1988 thunderxb // GX873 (c) 1988 thunderxj // GX873 (c) 1988 (Japan) -//@source:ti630.cpp +@source:ti630.cpp ti630 // -//@source:ti74.cpp +@source:ti74.cpp ti74 // 1985 TI-74 ti95 // 1986 TI-95 -//@source:ti85.cpp +@source:ti85.cpp ti73 // 1990 TI-73 ti81 // 1990 TI-81 (Z80 2 MHz) ti81v2 // 1990 TI-81 (Z80 2 MHz) @@ -34555,21 +34555,21 @@ ti84pse // 2004 TI-84 Plus Silver Edition ti85 // 1992 TI-85 (Z80 6 MHz) ti86 // 1997 TI-86 (Z80 6 MHz) -//@source:ti89.cpp +@source:ti89.cpp ti89 // 1998 TI-89 ti89t // 2004 TI-89 Titanium ti92 // 1995 TI-92 ti92p // 1999 TI-92 Plus v200 // 2002 Voyage 200 PLT -//@source:ti99_2.cpp +@source:ti99_2.cpp ti99_224 // 1983 TI 99/2 (24kb ROMs) ti99_232 // 1983 TI 99/2 (32kb ROMs) -//@source:ti99_4p.cpp +@source:ti99_4p.cpp ti99_4p // 1996 SNUG 99/4P (a.k.a. SGCPU) -//@source:ti99_4x.cpp +@source:ti99_4x.cpp ti99_4 // 1979 TI-99/4 ti99_4a // 1981 TI-99/4A ti99_4ae // 1981 TI-99/4A with 50Hz video @@ -34578,24 +34578,24 @@ ti99_4ev // 1994 TI-99/4A with EVPC video card ti99_4qe // 1983 TI-99/4QI with 50Hz video ti99_4qi // 1983 TI-99/4QI -//@source:ti99_8.cpp +@source:ti99_8.cpp ti99_8 // 1983 TI-99/8 ti99_8e // 1983 TI-99/8 with 50Hz video -//@source:ti990_10.cpp +@source:ti990_10.cpp ti990_10 // 1975 TI 990/10 -//@source:ti990_4.cpp +@source:ti990_4.cpp ti990_4 // 1976 TI 990/4 ti990_4v // 1976 TI 990/4 with video display terminal -//@source:tiamc1.cpp +@source:tiamc1.cpp bilyard // (c) 1988 Terminal konek // (c) 1988 Terminal koroleva // (c) 1988 Terminal sosterm // (c) 1988 Terminal -//@source:ticalc1x.cpp +@source:ticalc1x.cpp dataman // lilprof // lilprof78 // @@ -34610,7 +34610,7 @@ tisr16 // tisr16ii // wizatron // -//@source:tickee.cpp +@source:tickee.cpp ghoshunt // (c) 1995? Hanaho Games maletmad // (c) 1999 Hanaho Games, licensed to Capcom mouseatk // (c) 1996 ICE @@ -34620,7 +34620,7 @@ rapidfire // (c) 1998 Hanaho Games tickee // (c) 1994 Raster Elite tutstomb // (c) 199?? Island Design -//@source:tigeroad.cpp +@source:tigeroad.cpp bballs // (c) 1991 Comad bballsa // (c) 1991 Comad f1dream // 4/1988 (c) 1988 + Romstar @@ -34635,21 +34635,21 @@ tigeroadb // bootleg tigeroadu // 11/1987 (c) 1987 + Romstar (US) toramich // 11/1987 (c) 1987 (Japan -//@source:tiki100.cpp +@source:tiki100.cpp kontiki // tiki100 // -//@source:tim011.cpp +@source:tim011.cpp tim011 // -//@source:tim100.cpp +@source:tim100.cpp tim100 // -//@source:timelimt.cpp +@source:timelimt.cpp progress // (c) 1984 Chuo Co. Ltd timelimt // (c) 1983 Chuo Co. Ltd -//@source:timeplt.cpp +@source:timeplt.cpp bikkuric // Peni Soft (NOT Konami) chkun // Peni Soft (NOT Konami) psurge // (c) 1988 unknown (NOT Konami) @@ -34658,15 +34658,15 @@ timeplt // GX393 (c) 1982 timeplta // GX393 (c) 1982 + Atari license timepltc // GX393 (c) 1982 + Centuri license -//@source:timetrv.cpp +@source:timetrv.cpp timetrv // (c) 1991.10 Virtual Image Productions -//@source:timex.cpp +@source:timex.cpp tc2048 // 198? TC2048 ts2068 // 1983 TS2068 uk2086 // 1986 UK2086 -//@source:tispeak.cpp +@source:tispeak.cpp k28m2 // Tiger Electronics lantutor // snmath // @@ -34691,28 +34691,28 @@ tntellp // tntelluk // vocaid // -//@source:tispellb.cpp +@source:tispellb.cpp mrchalgr // spellb // -//@source:tk2000.cpp +@source:tk2000.cpp tk2000 // Microdigital TK2000 -//@source:tk80.cpp +@source:tk80.cpp ics8080 // mikrolab // nd80z // nectk85 // tk80 // -//@source:tk80bs.cpp +@source:tk80bs.cpp tk80bs // -//@source:tm990189.cpp +@source:tm990189.cpp 990189 // 1978 TM 990/189 990189v // 1980 TM 990/189 with Color Video Board -//@source:tmaster.cpp +@source:tmaster.cpp galgame2 // (c) 1998 Creative Electronics & Software (CES) / Namco galgbios // (c) 1998 Creative Electronics & Software (CES) tm // (c) 1996 Midway Games @@ -34741,21 +34741,21 @@ tm8k // (c) 2000 Midway Games tm8k902 // (c) 2000 Midway Games tmdo // (c) 1996 Midway Games -//@source:tmc1800.cpp +@source:tmc1800.cpp nano // tmc2000 // -//@source:tmc2000e.cpp +@source:tmc2000e.cpp tmc2000e // -//@source:tmc600.cpp +@source:tmc600.cpp tmc600s2 // -//@source:tmmjprd.cpp +@source:tmmjprd.cpp tmmjprd // (c) 1997 Media / Sonnet tmpdoki // (c) 1998 Media Syouji -//@source:tmnt.cpp +@source:tmnt.cpp blswhstl // GX060 (c) 1991 (World) blswhstla // GX060 (c) 1991 (Asia) cuebrick // GX903 (c) 1989 @@ -34808,10 +34808,10 @@ tmntu // GX963 (c) 1989 (US) tmntua // GX963 (c) 1989 (US) trigon // GX939 (c) 1990 (Japan) -//@source:tmspoker.cpp +@source:tmspoker.cpp tmspoker // -//@source:tnzs.cpp +@source:tnzs.cpp arknoid2 // B08 (c) 1987 Taito Corporation Japan (World) arknoid2b // B08 (c) 1987 (bootleg) arknoid2j // B08 (c) 1987 Taito Corporation (Japan) @@ -34840,7 +34840,7 @@ tnzsjo // B53 (c) 1988 Taito Corporation (Japan) (new l tnzso // B53 (c) 1988 Taito Corporation Japan (World) (old logo) tnzsop // B53?(c) 1988 Taito Corporation Japan (World) (old logo) -//@source:toaplan1.cpp +@source:toaplan1.cpp demonwld // TP-O16 (c) 1990 Toaplan (+ Taito license when set to Japan) demonwld1 // TP-O16 (c) 1989 Toaplan + Taito license demonwld2 // TP-O16 (c) 1989 Toaplan @@ -34869,7 +34869,7 @@ zerowing // TP-O15 (c) 1989 Toaplan zerowing1 // TP-O15 (c) 1989 Toaplan zerowingw // TP-O15 (c) 1989 Williams Electronics -//@source:toaplan2.cpp +@source:toaplan2.cpp batrider // (c) 1998 Raizing/8ing batriderc // (c) 1998 Raizing/8ing batriderhk // (c) 1998 Raizing/8ing @@ -34937,7 +34937,7 @@ truxton2 // TP-024 (c) 1992 Toaplan vfive // TP-027 (c) 1993 Toaplan (Japan) whoopee // TP-025 -//@source:toki.cpp +@source:toki.cpp juju // (c) 1989 Tad (Japan) jujub // bootleg jujuba // bootleg @@ -34947,16 +34947,16 @@ tokib // bootleg tokiu // (c) 1989 Tad + Fabtek license (US) tokiua // (c) 1989 Tad + Fabtek license (US) -//@source:tokyocop.cpp +@source:tokyocop.cpp tokyocop // (c) 2003 (Arcade TV Game List - P.168, Right, 19 from bottom) -//@source:tomcat.cpp +@source:tomcat.cpp tomcat // (proto) (c) 1985 -//@source:tonton.cpp +@source:tonton.cpp tonton // (c) 199? Success / Taiyo Jidoki. -//@source:toobin.cpp +@source:toobin.cpp toobin // 136061 (c) 1988 toobin1 // 136061 (c) 1988 toobin2 // 136061 (c) 1988 @@ -34964,20 +34964,20 @@ toobin2e // 136061 (c) 1988 toobine // 136061 (c) 1988 toobing // 136061 (c) 1988 -//@source:topspeed.cpp +@source:topspeed.cpp fullthrl // B14 (c) 1987 Taito Corporation (Japan) topspeed // B14 (c) 1987 Taito Corporation Japan (World) topspeedu // B14 (c) 1987 Taito America Corporation (US) -//@source:toratora.cpp +@source:toratora.cpp toratora // (c) 1980 Game Plan toratorab // (c) 1980 Game Plan -//@source:tourtabl.cpp +@source:tourtabl.cpp tourtab2 // 030170 1978/03 [6507] tourtabl // 030170 1978/03 [6507] -//@source:tourvis.cpp +@source:tourvis.cpp tourvis // (c) ???? Tourvision tv1943 // (c) 1991 Capcom / Nexat Soft (Tourvision bootleg) tvablast // (c) 1990 Hudson / Kaneko (Tourvision bootleg) @@ -35046,19 +35046,19 @@ tvwnshot // (c) 1989 Data East Corp. (Tourvision bootleg) tvwring // (c) 1990 Naxat Soft (Tourvision bootleg) tvxvious // (c) 1990 Namco Ltd. / Namcot (Tourvision bootleg) -//@source:toypop.cpp +@source:toypop.cpp liblrabl // (c) 1983 toypop // (c) 1986 -//@source:tp84.cpp +@source:tp84.cpp tp84 // GX388 (c) 1984 tp84a // GX388 (c) 1984 tp84b // GX388 (c) 1984 -//@source:tr606.cpp +@source:tr606.cpp tr606 // Roland -//@source:trackfld.cpp +@source:trackfld.cpp atlantol // bootleg hyprolym // GX361 (c) 1983 hyprolymb // bootleg @@ -35072,7 +35072,7 @@ wizzquiz // (c) 1985 Konami wizzquiza // (c) 1985 Zilec-Zenitone yieartf // GX361 (c) 1985 -//@source:travrusa.cpp +@source:travrusa.cpp motorace // (c) 1983 Williams license mototour // (c) 1983 Tecfri shtrider // (c) 1984 Seibu Kaihatsu @@ -35081,10 +35081,10 @@ shtriderb // bootleg travrusa // (c) 1983 travrusab // (c) 1983 I.P. (bootleg) -//@source:tricep.cpp +@source:tricep.cpp tricep // -//@source:triforce.cpp +@source:triforce.cpp avalnc12 // 2004.03 The Key Of Avalon 1.20 - Summon The New Monsters (client) (Rev A) avalnc13 // 2004.06.08 The Key Of Avalon 1.30 - Chaotic Sabbat (client) (Rev C) avalns12 // 2004.03 The Key Of Avalon 1.20 - Summon The New Monsters (server) (Rev A) @@ -35114,10 +35114,10 @@ vs42006 // 2006.05 Virtua Striker 4 Ver.2006 (Japan) (Re vs42k6ex // 2006.01.31 Virtua Striker 4 Ver.2006 (Export) vs4j // 2004.10 Virtua Striker 4 (Japan) (Rev E) -//@source:triplhnt.cpp +@source:triplhnt.cpp triplhnt // 008422-008791 1977/04 [6800] -//@source:trs80.cpp +@source:trs80.cpp ht108064 // Hradstechnika Szvetkezet HT-1080Z/64 ht1080z // Hradstechnika Szvetkezet HT-1080Z ht1080z2 // Hradstechnika Szvetkezet HT-1080Z Series II @@ -35132,37 +35132,37 @@ trs80m3 // TRS-80 Model III - Radio Shack/Tandy trs80m4 // trs80m4p // -//@source:trs80m2.cpp +@source:trs80m2.cpp trs80m16 // trs80m2 // -//@source:truco.cpp +@source:truco.cpp truco // (c) 198? Playtronic SRL -//@source:trucocl.cpp +@source:trucocl.cpp trucocl // (c) 1991 Miky SRL -//@source:trvmadns.cpp +@source:trvmadns.cpp trvmadns // (c) 1985 Thunderhead Inc. trvmadnsa // (c) 1985 Thunderhead Inc. -//@source:trvquest.cpp +@source:trvquest.cpp trvquest // (c) 1984 Sunn / Techstar -//@source:tryout.cpp +@source:tryout.cpp tryout // (c) 1985 Data East Corporation (Japan) -//@source:ts802.cpp +@source:ts802.cpp ts802 // ts802h // -//@source:ts803.cpp +@source:ts803.cpp ts803h // -//@source:ts816.cpp +@source:ts816.cpp ts816 // -//@source:tsamurai.cpp +@source:tsamurai.cpp alphaxz // AZ (c) 1986 Ed/Wood Place ladymstr // A49 (c) 1985 Taito m660 // ??? (c) 1986 Taito America Corporation @@ -35177,25 +35177,25 @@ tsamuraih // bootleg vsgongf // (c) 1984 Kaneko yamagchi // A38 (c) 1985 Taito -//@source:tsispch.cpp +@source:tsispch.cpp prose2k // prose2ko // -//@source:ttchamp.cpp +@source:ttchamp.cpp ttchamp // ttchampa // -//@source:tubep.cpp +@source:tubep.cpp rjammer // (c) 1984 + Alice tubep // (c) 1984 + Fujitek tubepb // (c) 1984 + bootleg -//@source:tugboat.cpp +@source:tugboat.cpp berenstn // (c) 1984 Enter-Tech noahsark // (c) 1983 Enter-Tech tugboat // (c) 1982 ETM -//@source:tumbleb.cpp +@source:tumbleb.cpp bcstry // (c) 1997 SemiCom bcstrya // (c) 1997 SemiCom carket // @@ -35218,15 +35218,15 @@ tumblepba // wlstar // (c) 1995 Mijin wondl96 // (c) 1996 SemiCom -//@source:tumblep.cpp +@source:tumblep.cpp tumblep // MAP (c) 1991 Data East Corporation (World) tumblepj // MAP (c) 1991 Data East Corporation (Japan) -//@source:tunhunt.cpp +@source:tunhunt.cpp tunhunt // 136000 (c) 1979 tunhuntc // 136000 (c) 1981 // licensed to / distributed by Centuri -//@source:turbo.cpp +@source:turbo.cpp buckrog // (c) 1982 Sega buckrogn // (c) 1982 Sega buckrogn2 // (c) 1982 Sega @@ -35239,33 +35239,33 @@ turboc // (c) 1981 Sega turbod // (c) 1981 Sega zoom909 // (c) 1982 Sega -//@source:turrett.cpp +@source:turrett.cpp turrett // (c) 2001 licensed from Dell Electronics -//@source:tutankhm.cpp +@source:tutankhm.cpp tutankhm // GX350 (c) 1982 Konami tutankhms // GX350 (c) 1982 Stern -//@source:tutor.cpp +@source:tutor.cpp pyuuta // 1982 Tomy Pyuuta pyuutajr // 1982 Tomy Pyuuta Jr. tutor // 1983? Tomy Tutor -//@source:tv950.cpp +@source:tv950.cpp tv950 // -//@source:tvc.cpp +@source:tvc.cpp tvc64 // tvc64p // tvc64pru // -//@source:tvcapcom.cpp +@source:tvcapcom.cpp tvcapcom // -//@source:tvgame.cpp +@source:tvgame.cpp tvgame // -//@source:twin16.cpp +@source:twin16.cpp cuebrickj // GX903 (c) 1989 (Japan) darkadv // GX687 (c) 1987 devilw // GX687 (c) 1987 @@ -35281,7 +35281,7 @@ vulcan // GX785 (c) 1988 vulcana // GX785 (c) 1988 vulcanb // GX785 (c) 1988 -//@source:twincobr.cpp +@source:twincobr.cpp fnshark // bootleg fshark // B02 / TP-007 (c) 1987 Taito Corporation (World) fsharkbt // bootleg @@ -35294,7 +35294,7 @@ skysharka // B02 / TP-007 (c) 1987 Taito America Corporati twincobr // B30 / TP-011 (c) 1987 Taito Corporation (World) twincobru // B30 / TP-011 (c) 1987 Taito America Corporation + Romstar license (US) -//@source:twinkle.cpp +@source:twinkle.cpp bmiidx // bmiidx2 // bmiidx3 // @@ -35312,45 +35312,45 @@ bmiidxca // bmiidxs // gq863 // -//@source:twins.cpp +@source:twins.cpp spider // twins // (c) 1994 twinsa // (c) 1994 -//@source:tx0.cpp +@source:tx0.cpp tx0_64kw // April 1956 MIT TX-0 (64kw RAM) tx0_8kw // 1962 MIT TX-0 (8kw RAM) -//@source:tx1.cpp +@source:tx1.cpp buggyboy // (c) 1985 Tatsumi buggyboyjr // (c) 1986 Tatsumi tx1 // (c) 1983 Tatsumi + Atari, Namco and Taito license tx1jb // (c) 1983 Tatsumi tx1jc // (c) 1983 Tatsumi -//@source:uapce.cpp +@source:uapce.cpp aliencr // (c) 1989 Hudson Soft blazlaz // (c) 1989 Hudson Soft keith // (c) 1989 Hudson Soft paclandp // (c) 1989 Namco -//@source:uknc.cpp +@source:uknc.cpp uknc // -//@source:ultraman.cpp +@source:ultraman.cpp ultraman // GX910 (c) 1991 Banpresto/Bandai -//@source:ultratnk.cpp +@source:ultratnk.cpp ultratnk // 009801 1978/02 [6502] -//@source:ultrsprt.cpp +@source:ultrsprt.cpp fiveside // GX479 (c)1995 -//@source:umipoker.cpp +@source:umipoker.cpp saiyukip // umipoker // -//@source:undrfire.cpp +@source:undrfire.cpp cbombers // D83 (c) 1993 Taito Corporation Japan (World) cbombersj // D83 (c) 1993 Taito Corporation (Japan) cbombersp // @@ -35358,35 +35358,35 @@ undrfire // D67 (c) 1993 Taito Corporation Japan (World) undrfirej // D67 (c) 1993 Taito Corporation (Japan) undrfireu // D67 (c) 1993 Taito America Corporation (US) -//@source:unichamp.cpp +@source:unichamp.cpp unichamp // -//@source:unico.cpp +@source:unico.cpp burglarx // (c) 1997 zeropnt // (c) 1998 zeropnt2 // (c) 1999 zeropnta // (c) 1998 zeropntj // (c) 1998 (Japan) -//@source:unior.cpp +@source:unior.cpp unior // -//@source:unistar.cpp +@source:unistar.cpp unistar // -//@source:univac.cpp +@source:univac.cpp uts20 // -//@source:unixpc.cpp +@source:unixpc.cpp 3b1 // 3B1 "Unix PC" -//@source:unkhorse.cpp +@source:unkhorse.cpp unkhorse // -//@source:upscope.cpp +@source:upscope.cpp upscope // (c) 1986 Grand products -//@source:usgames.cpp +@source:usgames.cpp superten // (c) 1988 usg182 // (c) 1989 usg185 // (c) 1990 @@ -35396,20 +35396,20 @@ usg82 // (c) 1988 usg83x // (c) 1988 usgames // (c) 1992 -//@source:ut88.cpp +@source:ut88.cpp ut88 // ut88mini // -//@source:uzebox.cpp +@source:uzebox.cpp uzebox // -//@source:v1050.cpp +@source:v1050.cpp v1050 // -//@source:v6809.cpp +@source:v6809.cpp v6809 // -//@source:vamphalf.cpp +@source:vamphalf.cpp aoh // (c) 2001 boonggab // (c) 2001 Taff System coolmini // (c) 1999 SemiCom @@ -35435,32 +35435,32 @@ wyvernwg // (c) 2001 Semicom / Game Vision wyvernwga // (c) 2001 Semicom / Game Vision yorijori // (c) -//@source:vaportra.cpp +@source:vaportra.cpp kuhga // MAA (c) 1989 Data East Corporation (Japan) vaportra // MAA (c) 1989 Data East Corporation (World) vaportra3 // MAA (c) 1989 Data East Corporation (World) vaportrau // MAA (c) 1989 Data East Corporation (US) -//@source:vastar.cpp +@source:vastar.cpp pprobe // Kyugo? vastar // (c) 1983 Sesame Japan vastar2 // (c) 1983 Sesame Japan vastar3 // (c) 1983 Sesame Japan vastar4 // (c) 1983 Sesame Japan -//@source:vax11.cpp +@source:vax11.cpp vax785 // -//@source:vball.cpp +@source:vball.cpp vball // TA-0025 (c) 1988 (US) vball2pj // TA-0025 (c) 1988 (Japan) vball2pjb // bootleg (of Japan set) vballb // bootleg (of US set) -//@source:vboy.cpp +@source:vboy.cpp vboy // -//@source:vc4000.cpp +@source:vc4000.cpp 1292apvs // 1392apvs // cx3000tc // @@ -35487,37 +35487,37 @@ vc4000 // Interton vc4000 vc6000 // vmdtbase // -//@source:vcombat.cpp +@source:vcombat.cpp shadfgtr // (c) 1993 DUTECH Inc. vcombat // (c) 1993 VR8 Inc. -//@source:vcs80.cpp +@source:vcs80.cpp vcs80 // -//@source:vd.cpp +@source:vd.cpp break86 // papillon // -//@source:vector06.cpp +@source:vector06.cpp krista2 // pk6128c // vec1200 // vector06 // -//@source:vector4.cpp +@source:vector4.cpp vector4 // -//@source:vectrex.cpp +@source:vectrex.cpp raaspec // (c) Roy Abel & Associates 1984 vectrex // General Consumer Electric Vectrex - 1982-1984 -//@source:vega.cpp +@source:vega.cpp vega // (c) 19?? Olympia? -//@source:vegaeo.cpp +@source:vegaeo.cpp crazywar // (c) 2002 Eolith -//@source:vegas.cpp +@source:vegas.cpp cartfury // (c) 2000 Midway Games gauntdl // (c) 1999 Midway Games gauntdl24 // (c) 1999 Midway Games @@ -35534,7 +35534,7 @@ tenthdeg // (c) 1998 Atari Games (prototype) warfa // (c) 1999 Atari Games warfaa // (c) 1999 Atari Games -//@source:vendetta.cpp +@source:vendetta.cpp esckids // GX975 (c) 1991 (Asia) esckidsj // GX975 (c) 1991 (Japan) vendetta // GX081 (c) 1991 (World) @@ -35546,22 +35546,22 @@ vendettaj // GX081 (c) 1991 (Japan) vendettar // GX081 (c) 1991 (World) vendettaz // GX081 (c) 1991 (World) -//@source:vertigo.cpp +@source:vertigo.cpp topgunnr // (c) 1986 -//@source:vg5k.cpp +@source:vg5k.cpp vg5k // 1984 VG-5000 -//@source:vic10.cpp +@source:vic10.cpp vic10 // Commodore Max Machine (Japan) -//@source:vic20.cpp +@source:vic20.cpp vic1001 // Commodore VIC-1001 (Japan) vic20 // Commodore VIC 20 (NTSC) vic20_se // Commodore VIC 20 (Swedish Expanson Kit) vic20p // Commodore VIC 20 (PAL) -//@source:vicdual.cpp +@source:vicdual.cpp alphaho // Data East brdrlinb // Karateco bootleg brdrline // (c) 1980 Sega @@ -35607,21 +35607,21 @@ subhunt // ? [1977 Taito] supcrash // bootleg tranqgun // 413-428 (c) 1980 Sega -//@source:victor9k.cpp +@source:victor9k.cpp victor9k // -//@source:victory.cpp +@source:victory.cpp victorba // (c) 1982 victory // (c) 1982 -//@source:vidbrain.cpp +@source:vidbrain.cpp vidbrain // -//@source:videopin.cpp +@source:videopin.cpp solarwar // 036154-036169 1979 [6502] videopin // 034253-034267 1979/02 [6502] -//@source:videopkr.cpp +@source:videopkr.cpp babydad // (c) 1987 Recreativos Franco babypkr // (c) 1987 Recreativos Franco blckjack // (c) 1984 InterFlip @@ -35631,7 +35631,7 @@ videocba // (c) 1987 InterFlip videodad // (c) 1987 InterFlip videopkr // (c) 1984 InterFlip -//@source:vigilant.cpp +@source:vigilant.cpp buccanrs // (c) 1989 Duintronic buccanrsa // (c) 1989 Duintronic kikcubic // (c) 1988 (Japan) @@ -35645,14 +35645,14 @@ vigilantd // (c) 1988 (Japan Rev D) vigilantg // (c) 1988 (US Rev G) vigilanto // (c) 1988 (US) -//@source:vii.cpp +@source:vii.cpp batmantv // The Batman, 2004 vii // Chintendo / KenSingTon / Jungle Soft / Siatronics Vii vsmile // vsmilef // walle // -//@source:vindictr.cpp +@source:vindictr.cpp vindictr // 136059 (c) 1988 vindictr1 // 136059 (c) 1988 vindictr2 // 136059 (c) 1988 @@ -35662,11 +35662,11 @@ vindictre3 // 136059 (c) 1988 vindictre4 // 136059 (c) 1988 vindictrg // 136059 (c) 1988 -//@source:vip.cpp +@source:vip.cpp vip // 1977 Cosmac VIP VP-711 vp111 // 1977 Cosmac VIP VP-111 -//@source:viper.cpp +@source:viper.cpp boxingm // 2001 code1d // 2000 code1db // 2000 @@ -35707,16 +35707,16 @@ wcombatk // 2002 wcombatu // 2002 xtrial // 2002 -//@source:vixen.cpp +@source:vixen.cpp vixen // -//@source:vk100.cpp +@source:vk100.cpp vk100 // 1980 Digital Equipment Corporation -//@source:vlc.cpp +@source:vlc.cpp nevada // -//@source:volfied.cpp +@source:volfied.cpp volfied // C04 (c) 1989 Taito Corporation Japan (World) volfiedj // C04 (c) 1989 Taito Corporation (Japan) volfiedjo // C04 (c) 1989 Taito Corporation (Japan) @@ -35724,27 +35724,27 @@ volfiedo // C04 (c) 1989 Taito Corporation Japan (World) volfiedu // C04 (c) 1989 Taito America Corporation (US) volfieduo // C04 (c) 1989 Taito America Corporation (US) -//@source:votrpss.cpp +@source:votrpss.cpp votrpss // 1982 Votrax Personal Speech System -//@source:votrtnt.cpp +@source:votrtnt.cpp votrtnt // 1980 Votrax Type-'N-Talk -//@source:voyager.cpp +@source:voyager.cpp voyager // (c) 2002 Team Play, Inc. -//@source:vp101.cpp +@source:vp101.cpp jnero // (c) 2004 ICE/Play Mechanix specfrce // (c) 2002 ICE/Play Mechanix -//@source:vpoker.cpp +@source:vpoker.cpp 5acespkr // (c) 198? vpoker // (c) 198? -//@source:vroulet.cpp +@source:vroulet.cpp vroulet // (c) 1989 World Game -//@source:vsnes.cpp +@source:vsnes.cpp balonfgt // (c) 1984 Nintendo bnglngby // (c) 1985 Nintendo licensed by Broderbund Software Inc. btlecity // (c) 1985 Namco @@ -35800,7 +35800,7 @@ vstennisb // (c) 1984 Nintendo Co., Ltd. / Nintendo of Ame vstetris // (c) 1988 Atari wrecking // (c) 1984 Nintendo -//@source:vt100.cpp +@source:vt100.cpp vt100 // 1978 Digital Equipment Corporation vt101 // 1981 Digital Equipment Corporation vt102 // 1981 Digital Equipment Corporation @@ -35808,23 +35808,23 @@ vt105 // 1978 Digital Equipment Corporation vt131 // 1981 Digital Equipment Corporation vt180 // 1981 Digital Equipment Corporation -//@source:vt220.cpp +@source:vt220.cpp vt220 // 1983 Digital Equipment Corporation -//@source:vt240.cpp +@source:vt240.cpp mc7105 // Elektronika MC7105 vt240 // 1983 Digital Equipment Corporation -//@source:vt320.cpp +@source:vt320.cpp vt320 // 1987 Digital Equipment Corporation -//@source:vt520.cpp +@source:vt520.cpp vt520 // 1994 Digital Equipment Corporation -//@source:vta2000.cpp +@source:vta2000.cpp vta2000 // -//@source:vtech1.cpp +@source:vtech1.cpp fellow // 1983 Salora Fellow laser110 // 1983 Laser 110 laser200 // 1983 Laser 200 @@ -35836,37 +35836,37 @@ vz200 // 1984 Dick Smith Electronics VZ-200 vz200de // 1983 VZ-200 (Germany) vz300 // 1984 Dick Smith Electronics VZ-300 -//@source:vtech2.cpp +@source:vtech2.cpp laser350 // 1984? Laser 350 laser500 // 1984? Laser 500 laser700 // 1984? Laser 700 -//@source:vulgus.cpp +@source:vulgus.cpp vulgus // 5/1984 (c) 1984 vulgusa // 5/1984 (c) 1984 vulgusj // 5/1984 (c) 1984 -//@source:wacky_gator.cpp +@source:wacky_gator.cpp wackygtr // Wacky Gator -//@source:wallc.cpp +@source:wallc.cpp brkblast // bootleg (Fadesa) sidampkr // wallc // (c) 1984 Midcoin wallca // (c) 1984 Midcoin -//@source:wangpc.cpp +@source:wangpc.cpp wangpc // -//@source:wardner.cpp +@source:wardner.cpp pyros // B25 / TP-009 (c) 1987 Taito America Corporation (US) wardner // B25 / TP-009 (c) 1987 Taito Corporation Japan (World) wardnerj // B25 / TP-009 (c) 1987 Taito Corporation (Japan) -//@source:warpsped.cpp +@source:warpsped.cpp warpsped // 197? -//@source:warpwarp.cpp +@source:warpwarp.cpp bombbee // [1979] Namco cutieq // (c) 1979 Namco geebee // [1978] Namco @@ -35880,47 +35880,47 @@ warpwarp // (c) 1981 Namco warpwarpr // (c) 1981 [Namco] (Rock-ola license) warpwarpr2 // (c) 1981 [Namco] (Rock-ola license) -//@source:warriorb.cpp +@source:warriorb.cpp darius2d // C07 (c) 1989 Taito Corporation (Japan) darius2do // C07 (c) 1989 Taito Corporation (Japan) sagaia // C07 (c) 1989 Taito Corporation Japan (World) warriorb // D24 (c) 1991 Taito Corporation (Japan) -//@source:wc90.cpp +@source:wc90.cpp pac90 // bootleg wc90 // (c) 1989 Tecmo wc90a // (c) 1989 Tecmo wc90b // (c) 1989 Tecmo wc90t // (c) 1989 Tecmo -//@source:wc90b.cpp +@source:wc90b.cpp wc90b1 // bootleg wc90b2 // bootleg wc90ba // bootleg -//@source:wecleman.cpp +@source:wecleman.cpp hotchase // GX763 (c) 1988 hotchasea // wecleman // GX602 (c) 1986 weclemana // GX602?(c) 1988 weclemanb // GX602 (c) 1986 -//@source:welltris.cpp +@source:welltris.cpp quiz18k // (c) 1992 EIM (Welltris hardware) welltris // (c) 1991 Video System Co. (Japan) welltrisj // (c) 1991 Video System Co. (Japan) -//@source:wgp.cpp +@source:wgp.cpp wgp // C32 (c) 1989 Taito America Corporation (US) wgp2 // C73 (c) 1990 Taito Corporation (Japan) wgpj // C32 (c) 1989 Taito Corporation (Japan) wgpjoy // C32 (c) 1989 Taito Corporation (Japan) wgpjoya // C32 (c) 1989 Taito Corporation (Japan) -//@source:wheelfir.cpp +@source:wheelfir.cpp wheelfir // (c) 199? TCH -//@source:white_mod.cpp +@source:white_mod.cpp elvisf // elvisf302 // elvisf303 // @@ -36074,7 +36074,7 @@ sopranos_204 // sopranos_300 // sopranos_400 // -//@source:whitestar.cpp +@source:whitestar.cpp apollo13 // apollo13_10 // aust201 // @@ -36256,20 +36256,20 @@ wackadoo // xfiles2 // xfilesp // -//@source:wicat.cpp +@source:wicat.cpp wicat // -//@source:wico.cpp +@source:wico.cpp aftor // -//@source:wildfire.cpp +@source:wildfire.cpp wildfire // Parker Bros -//@source:wildpkr.cpp +@source:wildpkr.cpp tabpkr // 199?, TAB Austira wildpkr // 199?, TAB Austria. -//@source:williams.cpp +@source:williams.cpp alienar // (c) 1985 Duncan Brown alienaru // (c) 1985 Duncan Brown batlzone // bootleg? @@ -36317,21 +36317,21 @@ tshoot // (c) 1984 zero // bootleg zero2 // bootleg -//@source:wink.cpp +@source:wink.cpp wink // (c) 1985 Midcoin winka // (c) 1985 Midcoin -//@source:wiping.cpp +@source:wiping.cpp rugrats // (c) 1983 wiping // (c) 1982 -//@source:witch.cpp +@source:witch.cpp pbchmp95 // (c) 1995 Veltmeijer Automaten witch // (c) 1992 Excellent System witchb // (c) 1992 Excellent System witchs // (c) 1992 Sega / Vic Tokai license -//@source:wiz.cpp +@source:wiz.cpp kungfut // (c) 1984 Seibu Kaihatsu kungfuta // (c) 1984 Seibu Kaihatsu scion // (c) 1984 Seibu Denshi @@ -36342,10 +36342,10 @@ wiz // (c) 1985 Seibu Kaihatsu wizt // (c) 1985 Taito Corporation wizta // (c) 1985 Taito Corporation -//@source:wmg.cpp +@source:wmg.cpp wmg // Williams 6in1 Multigame, Clay Cowgill -//@source:wms.cpp +@source:wms.cpp btippers // Big Tippers (Russian) cashcrop // Cash Crop (Russian) filthyr // Filthy Rich (Russian) @@ -36373,10 +36373,10 @@ wmsboom // Boom (Russian) wmstopb // Top Banana (Russian) yukongld // Yukon Gold (Russian) -//@source:wolfpack.cpp +@source:wolfpack.cpp wolfpack // ?????? prototype [6502] -//@source:wpc_95.cpp +@source:wpc_95.cpp afm_10 // afm_11 // afm_113 // @@ -36440,7 +36440,7 @@ totan_13 // totan_14 // ttt_10 // -//@source:wpc_an.cpp +@source:wpc_an.cpp bop_l2 // bop_l3 // bop_l4 // @@ -36459,7 +36459,7 @@ hd_l1 // hd_l3 // tfa_13 // -//@source:wpc_dcs.cpp +@source:wpc_dcs.cpp afv_l4 // dm_h5 // dm_h6 // @@ -36493,7 +36493,7 @@ sttng_p8 // sttng_s7 // sttng_x7 // -//@source:wpc_dot.cpp +@source:wpc_dot.cpp gi_l3 // gi_l4 // gi_l6 // @@ -36513,7 +36513,7 @@ t2_l8 // t2_p2f // tfdmd_l3 // -//@source:wpc_flip1.cpp +@source:wpc_flip1.cpp taf_h4 // taf_l1 // taf_l2 // @@ -36524,7 +36524,7 @@ taf_l6 // taf_l7 // taf_p2 // -//@source:wpc_flip2.cpp +@source:wpc_flip2.cpp br_l1 // br_l3 // br_l4 // @@ -36575,7 +36575,7 @@ ww_lh6 // ww_p1 // ww_p8 // -//@source:wpc_s.cpp +@source:wpc_s.cpp corv_21 // corv_la1 // corv_lx1 // @@ -36634,57 +36634,57 @@ wd_11 // wd_12 // wd_12g // -//@source:wrally.cpp +@source:wrally.cpp wrally // (c) 1993 - Ref 930705 wrallya // (c) 1993 - Ref 930705 wrallyat // (c) 1993 - Ref 930217 wrallyb // (c) 1993 - Ref 930217 -//@source:wswan.cpp +@source:wswan.cpp wscolor // Bandai WonderSwan Color Handheld wswan // Bandai WonderSwan Handheld -//@source:wwfsstar.cpp +@source:wwfsstar.cpp wwfsstar // TA-0024 (c) 1989 (Europe) wwfsstarb // TA-0024 (c) 1989 (Japan) wwfsstarj // TA-0024 (c) 1989 (Japan) wwfsstaru // TA-0024 (c) 1989 (US, newer) wwfsstarua // TA-0024 (c) 1989 (US) -//@source:wyvernf0.cpp +@source:wyvernf0.cpp wyvernf0 // A39 (c) 1985 Taito Corporation (Japan) -//@source:x07.cpp +@source:x07.cpp x07 // -//@source:x1.cpp +@source:x1.cpp x1 // 1982 Sharp X1 x1turbo // 1984 Sharp X1 Turbo (Model 10) x1turbo40 // 1985 Sharp X1 Turbo (Model 40) -//@source:x1twin.cpp +@source:x1twin.cpp x1twin // 1986 Sharp X1 Twin -//@source:x68k.cpp +@source:x68k.cpp x68000 // Sharp X68000 (1987) x68030 // Sharp X68030 (1993) x68ksupr // Sharp X68000 Super (1990) x68kxvi // Sharp X68000 XVI (1991) -//@source:xain.cpp +@source:xain.cpp solrwarr // TA-0019 (c) 1986 + Taito / Memetron license xsleena // TA-0019 (c) 1986 + Taito license xsleenab // bootleg xsleenaba // bootleg xsleenaj // TA-0019 (c) 1986 -//@source:xavix.cpp +@source:xavix.cpp taitons1 // -//@source:xbox.cpp +@source:xbox.cpp xbox // -//@source:xerox820.cpp +@source:xerox820.cpp bigboard // mk82 // mk83 // @@ -36692,13 +36692,13 @@ x168 // x820 // x820ii // -//@source:xexex.cpp +@source:xexex.cpp orius // GX067 (c) 1991 (USA) xexex // GX067 (c) 1991 (World) xexexa // GX067 (c) 1991 (Asia) xexexj // GX067 (c) 1991 (Japan) -//@source:xmen.cpp +@source:xmen.cpp xmen // GX065 (c) 1992 (US) xmen2pa // GX065 (c) 1992 (Asia) xmen2pe // GX065 (c) 1992 (World) @@ -36711,40 +36711,40 @@ xmenaa // GX065 (c) 1992 (Asia) xmene // GX065 (c) 1992 (World) xmenj // GX065 (c) 1992 (Japan) -//@source:xor100.cpp +@source:xor100.cpp xor100 // -//@source:xorworld.cpp +@source:xorworld.cpp xorworld // (c) 1990 - prototype -//@source:xtheball.cpp +@source:xtheball.cpp xtheball // (c) 1991 Rare -//@source:xtom3d.cpp +@source:xtom3d.cpp xtom3d // -//@source:xxmissio.cpp +@source:xxmissio.cpp xxmissio // UPL-86001 [1986] -//@source:xybots.cpp +@source:xybots.cpp xybots // 136054 (c) 1987 xybots0 // 136054 (c) 1987 xybots1 // 136054 (c) 1987 xybotsf // 136054 (c) 1987 xybotsg // 136054 (c) 1987 -//@source:xyonix.cpp +@source:xyonix.cpp xyonix // [1989 Philko] -//@source:yiear.cpp +@source:yiear.cpp yiear // GX407 (c) 1985 yiear2 // GX407 (c) 1985 -//@source:ymmu100.cpp +@source:ymmu100.cpp mu100 // 1997 MU-100 mu100r // 1997 MU-100 Rackable version -//@source:yunsun16.cpp +@source:yunsun16.cpp bombkick // (c) 1998 Yun Sung bombkicka // (c) 1998 Yun Sung magicbub // (c) Yun Sung @@ -36755,33 +36755,33 @@ shocking // (c) 1997 Yun Sung shockingk // (c) 1997 Yun Sung shockingko // (c) 1997 Yun Sung -//@source:yunsung8.cpp +@source:yunsung8.cpp cannball // (c) 1995 Yun Sung / Soft Visio cannballv // (c) 1995 Yun Sung / T&K magix // (c) 1995 Yun Sung magixb // bootleg rocktris // (c) 1994? Yun Sung -//@source:z100.cpp +@source:z100.cpp z100 // -//@source:z1013.cpp +@source:z1013.cpp z1013 // z1013a2 // z1013k69 // z1013k76 // z1013s60 // -//@source:z80dev.cpp +@source:z80dev.cpp z80dev // -//@source:z80ne.cpp +@source:z80ne.cpp z80ne // 1980 - Z80NE z80net // 1980 - Z80NE + LX388 Video Interface z80netb // 1980 - Z80NE + LX388 Video Interface + 16Kb BASIC z80netf // 1980 - Z80NE + LX.388 Video Interface + LX.390 FD Controller -//@source:z88.cpp +@source:z88.cpp z88 // Z88 (UK) z88ch // Z88 (Swiss) z88de // Z88 (German) @@ -36794,7 +36794,7 @@ z88no // Z88 (Norwegian) z88se // Z88 (Swedish) z88tr // Z88 (Turkish) -//@source:z9001.cpp +@source:z9001.cpp kc85_111 // kc87_10 // kc87_11 // @@ -36802,7 +36802,7 @@ kc87_20 // kc87_21 // z9001 // -//@source:zac_1.cpp +@source:zac_1.cpp ewf // firemntn // futurwld // @@ -36815,7 +36815,7 @@ stargoda // strapids // wsports // -//@source:zac_2.cpp +@source:zac_2.cpp bbeltzac // clown // dvlrider // @@ -36855,26 +36855,26 @@ tmachzacf // tmachzacg // zankor // -//@source:zac_proto.cpp +@source:zac_proto.cpp skijump // spacecty // strike // -//@source:zac2650.cpp +@source:zac2650.cpp dodgem // (c) 1979 sia2650 // (c) 1978 tinv2650 // (c) 1978 -//@source:zaccaria.cpp +@source:zaccaria.cpp jackrabt // (c) 1984 jackrabt2 // (c) 1984 jackrabts // (c) 1984 monymony // (c) 1983 -//@source:zapcomputer.cpp +@source:zapcomputer.cpp zapcomp // (1981) ZAP computer - Z80 Applications Processor -//@source:zaurus.cpp +@source:zaurus.cpp zsl5500 // Sharp Zaurus SL-5500 "Collie" zsl5600 // Sharp Zaurus SL-5600 / SL-B500 "Poodle" zslc1000 // Sharp Zaurus SL-C1000 "Akita" @@ -36882,7 +36882,7 @@ zslc3000 // Sharp Zaurus SL-C3000 "Spitz" zslc750 // Sharp Zaurus SL-C750 "Shepherd" zslc760 // Sharp Zaurus SL-C760 "Husky" -//@source:zaxxon.cpp +@source:zaxxon.cpp congo // 605-5167 (c) 1983 (2 board stack) congoa // 605-5167 (c) 1983 (3 board stack) futspy // (c) 1984 @@ -36896,14 +36896,14 @@ zaxxon3 // (c) 1982 zaxxonb // bootleg zaxxonj // (c) 1982 -//@source:zerozone.cpp +@source:zerozone.cpp lvgirl94 // (c) 1994 Comad zerozone // (c) 1993 Comad -//@source:zexall.cpp +@source:zexall.cpp zexall // zexall z80 test suite with kevtris' preloader/serial interface at 0000-00ff -//@source:zn.cpp +@source:zn.cpp 1on1gov // 1 on 1 Government (JAPAN) acpsx // aerofgts // Aero Fighters Special (TAIWAN) @@ -37006,17 +37006,17 @@ ts2a // Battle Arena Toshinden 2 (USA 951124) ts2j // Battle Arena Toshinden 2 (JAPAN 951124) vspsx // -//@source:zodiack.cpp +@source:zodiack.cpp bounty // (c) 1982 Orca dogfight // (c) 1983 Thunderbolt moguchan // (c) 1982 Orca + Eastern Commerce Inc. license (doesn't appear on screen) percuss // (c) 1981 Orca zodiack // (c) 1983 Orca + Esco Trading Co license -//@source:zorba.cpp +@source:zorba.cpp zorba // -//@source:zr107.cpp +@source:zr107.cpp jetwave // GX678 (c)1996 Euro EAB jetwavej // GX678 (c)1996 Japan JAB midnrun // GX476 (c)1995 Europe EAA @@ -37027,13 +37027,13 @@ windheata // GX677 (c)1996 Asia AAA windheatj // GX677 (c)1996 Japan JAA windheatu // GX677 (c)1996 USA UBC -//@source:zrt80.cpp +@source:zrt80.cpp zrt80 // -//@source:zsbc3.cpp +@source:zsbc3.cpp zsbc3 // -//@source:zx.cpp +@source:zx.cpp lambda // Lambda 8300 pc8300 // Your Computer - PC8300 pow3000 // Creon Enterprises - Power 3000 -- cgit v1.2.3-70-g09d2 From 61b531522a9cdfe08754a684b4a354c41699af03 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Thu, 3 Mar 2016 13:03:42 +1100 Subject: Implement swappable concept properly --- src/lib/util/vecstream.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/util/vecstream.h b/src/lib/util/vecstream.h index fb472df95cd..498e35eac5e 100644 --- a/src/lib/util/vecstream.h +++ b/src/lib/util/vecstream.h @@ -19,6 +19,10 @@ #include #include +#include +#include +#include +#include #include #include #include @@ -103,10 +107,11 @@ public: void swap(basic_vectorbuf &that) { + using std::swap; std::basic_streambuf::swap(that); - std::swap(m_mode, that.m_mode); - m_storage.swap(that.m_storage); - std::swap(m_threshold, that.m_threshold); + swap(m_mode, that.m_mode); + swap(m_storage, that.m_storage); + swap(m_threshold, that.m_threshold); } void reserve(typename vector_type::size_type size) @@ -382,6 +387,16 @@ typedef basic_ovectorstream wovectorstream; typedef basic_vectorstream vectorstream; typedef basic_vectorstream wvectorstream; +template +void swap(basic_vectorbuf &a, basic_vectorbuf &b) { a.swap(b); } + +template +void swap(basic_ivectorstream &a, basic_ivectorstream &b) { a.swap(b); } +template +void swap(basic_ovectorstream &a, basic_ovectorstream &b) { a.swap(b); } +template +void swap(basic_vectorstream &a, basic_vectorstream &b) { a.swap(b); } + } // namespace util #endif // __MAME_UTIL_VECSTREAM_H__ -- cgit v1.2.3-70-g09d2 From 33b77a8722c3c809386ea28a11cedf4500bb6f10 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Thu, 3 Mar 2016 13:34:23 +1100 Subject: Reduce number of formatting template instantiations needed - should reduce compile time and executable size a bit Small run-time performance penalty shouldn't be a big deal --- src/lib/util/strformat.h | 137 +++++++++++++++++------------------------------ 1 file changed, 48 insertions(+), 89 deletions(-) (limited to 'src') diff --git a/src/lib/util/strformat.h b/src/lib/util/strformat.h index ac7301dc6bd..f0f481bb3f3 100644 --- a/src/lib/util/strformat.h +++ b/src/lib/util/strformat.h @@ -1040,7 +1040,7 @@ public: { return (m_end && (m_end == it)) || (m_check_nul && (format_chars::nul == *it)); } - std::size_t size() const + std::size_t argument_count() const { return m_argument_count; } @@ -1131,6 +1131,9 @@ class format_argument_pack_impl , public format_argument_pack { public: + using typename format_argument_pack::iterator; + using format_argument_pack::operator[]; + template format_argument_pack_impl(Format &&fmt, Params &&... args) : std::array, Count>({ { format_argument(std::forward(args))... } }) @@ -1147,15 +1150,9 @@ public: //************************************************************************** -// ARGUMENT PACK CREATOR FUNCTIONS +// ARGUMENT PACK CREATOR FUNCTION //************************************************************************** -template -inline std::array, sizeof...(Params)> make_format_arguments(Params &&... args) -{ - return std::array, sizeof...(Params)>({ { format_argument(std::forward(args))... } }); -} - template inline format_argument_pack_impl make_format_argument_pack(Format &&fmt, Params &&... args) { @@ -1164,54 +1161,16 @@ inline format_argument_pack_impl make_format_argument //************************************************************************** -// FORMAT STRING PARSING HELPERS +// FORMAT STRING PARSING HELPER //************************************************************************** template -class format_helper_base : public format_chars()))> > > -{ -public: - typedef std::remove_reference_t()))> iterator; - static iterator begin(Format const &fmt) { return std::cbegin(fmt); } - static bool at_end(Format const &fmt, iterator const &it) { return std::cend(fmt) == it; } -}; - -template -class format_helper_base : public format_chars > -{ -public: - typedef Character const *iterator; - static iterator begin(Character const *fmt) { return fmt; } - static bool at_end(Character const *fmt, iterator const &it) { return format_helper_base::nul == *it; } -}; - -template -class format_helper_base : public format_chars > -{ -public: - typedef Character const *iterator; - static iterator begin(std::remove_const_t (&fmt)[Length]) { return std::cbegin(fmt); } - static iterator begin(std::add_const_t (&fmt)[Length]) { return std::cbegin(fmt); } - static bool at_end(std::remove_const_t (&fmt)[Length], iterator const &it) { return (std::cend(fmt) == it) || (format_chars::nul == *it); } - static bool at_end(std::add_const_t (&fmt)[Length], iterator const &it) { return (std::cend(fmt) == it) || (format_helper_base::nul == *it); } -}; - -template -class format_helper_base > : public format_chars::char_type> -{ -public: - typedef typename format_argument_pack::iterator iterator; - static iterator begin(format_argument_pack const &fmt) { return fmt.format_begin(); } - static bool at_end(format_argument_pack const &fmt, iterator const &it) { return fmt.format_at_end(it); } -}; - -template -class format_helper : public format_helper_base +class format_helper : public format_chars { public: static bool parse_format( Format const &fmt, - typename format_helper::iterator &it, + typename Format::iterator &it, format_flags &flags, int &next_position, int &argument_position, @@ -1219,7 +1178,7 @@ public: int &precision_position) { static_assert((format_helper::nine - format_helper::zero) == 9, "Digits must be contiguous"); - assert(!format_helper::at_end(fmt, it)); + assert(!fmt.format_at_end(it)); assert(format_helper::percent == *it); int num; @@ -1231,8 +1190,8 @@ public: precision_position = -1; // Leading zeroes are tricky - they could be a zero-pad flag or part of a position specifier - bool const leading_zero(!format_helper::at_end(fmt, it) && (format_helper::zero == *it)); - while (!format_helper::at_end(fmt, it) && (format_helper::zero == *it)) ++it; + bool const leading_zero(!fmt.format_at_end(it) && (format_helper::zero == *it)); + while (!fmt.format_at_end(it) && (format_helper::zero == *it)) ++it; // Digits encountered at this point could be a field width or a position specifier num = 0; @@ -1258,7 +1217,7 @@ public: } // Parse flag characters - while (!format_helper::at_end(fmt, it)) + while (!fmt.format_at_end(it)) { switch (*it) { @@ -1275,7 +1234,7 @@ public: } // Check for literal or parameterised field width - if (!format_helper::at_end(fmt, it)) + if (!fmt.format_at_end(it)) { if (is_digit(*it)) { @@ -1302,14 +1261,14 @@ public: } // Check for literal or parameterised precision - if (!format_helper::at_end(fmt, it) && (*it == format_helper::point)) + if (!fmt.format_at_end(it) && (*it == format_helper::point)) { ++it; if (have_digit(fmt, it)) { flags.set_precision(read_number(fmt, it)); } - else if (!format_helper::at_end(fmt, it) && (format_helper::asterisk == *it)) + else if (!fmt.format_at_end(it) && (format_helper::asterisk == *it)) { ++it; if (have_digit(fmt, it)) @@ -1333,11 +1292,11 @@ public: } // Check for length modifiers - if (!format_helper::at_end(fmt, it)) switch (*it) + if (!fmt.format_at_end(it)) switch (*it) { case format_helper::h: ++it; - if (!format_helper::at_end(fmt, it) && (format_helper::h == *it)) + if (!fmt.format_at_end(it) && (format_helper::h == *it)) { ++it; flags.set_length(format_flags::length::character); @@ -1349,7 +1308,7 @@ public: break; case format_helper::l: ++it; - if (!format_helper::at_end(fmt, it) && (format_helper::l == *it)) + if (!fmt.format_at_end(it) && (format_helper::l == *it)) { ++it; flags.set_length(format_flags::length::long_long_integer); @@ -1379,13 +1338,13 @@ public: { ++it; format_flags::length length = format_flags::length::size_type; - if (!format_helper::at_end(fmt, it)) + if (!fmt.format_at_end(it)) { if ((typename format_helper::char_type(format_helper::zero) + 3) == *it) { - typename format_helper::iterator tmp(it); + typename Format::iterator tmp(it); ++tmp; - if (!format_helper::at_end(fmt, tmp) && ((typename format_helper::char_type(format_helper::zero) + 2) == *tmp)) + if (!fmt.format_at_end(tmp) && ((typename format_helper::char_type(format_helper::zero) + 2) == *tmp)) { length = format_flags::length::integer_32; it = ++tmp; @@ -1393,9 +1352,9 @@ public: } else if ((typename format_helper::char_type(format_helper::zero) + 6) == *it) { - typename format_helper::iterator tmp(it); + typename Format::iterator tmp(it); ++tmp; - if (!format_helper::at_end(fmt, tmp) && ((typename format_helper::char_type(format_helper::zero) + 4) == *tmp)) + if (!fmt.format_at_end(tmp) && ((typename format_helper::char_type(format_helper::zero) + 4) == *tmp)) { length = format_flags::length::integer_64; it = ++tmp; @@ -1414,8 +1373,8 @@ public: } // Now we should find a conversion specifier - assert(!format_helper::at_end(fmt, it)); // missing conversion - if (format_helper::at_end(fmt, it)) return false; + assert(!fmt.format_at_end(it)); // missing conversion + if (fmt.format_at_end(it)) return false; switch (*it) { case format_helper::d: @@ -1498,14 +1457,14 @@ public: } private: - static bool have_dollar(Format const &fmt, typename format_helper::iterator const &it) + static bool have_dollar(Format const &fmt, typename Format::iterator const &it) { - return !format_helper::at_end(fmt, it) && (*it == format_helper::dollar); + return !fmt.format_at_end(it) && (*it == format_helper::dollar); } - static bool have_digit(Format const &fmt, typename format_helper::iterator const &it) + static bool have_digit(Format const &fmt, typename Format::iterator const &it) { - return !format_helper::at_end(fmt, it) && is_digit(*it); + return !fmt.format_at_end(it) && is_digit(*it); } static bool is_digit(typename format_helper::char_type value) @@ -1524,7 +1483,7 @@ private: num = (num * 10) + digit_value(digit); } - static int read_number(Format const &fmt, typename format_helper::iterator &it) + static int read_number(Format const &fmt, typename Format::iterator &it) { assert(have_digit(fmt, it)); int value = 0; @@ -1538,11 +1497,11 @@ private: // CORE FORMATTING FUNCTION //************************************************************************** -template -typename Stream::off_type stream_format(Stream &str, Format &&fmt, Params &&args) +template +typename Stream::off_type stream_format(Stream &str, Format const &args) { - typedef format_helper > > format_helper; - typedef typename format_helper::iterator iterator; + typedef format_helper > format_helper; + typedef typename Format::iterator iterator; class stream_preserver { public: @@ -1572,21 +1531,21 @@ typename Stream::off_type stream_format(Stream &str, Format &&fmt, Params &&args typename Stream::pos_type const begin(str.tellp()); stream_preserver const preserver(str); int next_pos(1); - iterator start = format_helper::begin(fmt); - for (iterator it = start; !format_helper::at_end(fmt, start); ) + iterator start = args.format_begin(); + for (iterator it = start; !args.format_at_end(start); ) { - while (!format_helper::at_end(fmt, it) && (format_helper::percent != *it)) ++it; + while (!args.format_at_end(it) && (format_helper::percent != *it)) ++it; if (start != it) { str.write(&*start, it - start); start = it; } - if (!format_helper::at_end(fmt, it)) + if (!args.format_at_end(it)) { // Try to parse a percent format specification format_flags flags; int arg_pos, width_pos, prec_pos; - if (!format_helper::parse_format(fmt, it, flags, next_pos, arg_pos, width_pos, prec_pos)) + if (!format_helper::parse_format(args, it, flags, next_pos, arg_pos, width_pos, prec_pos)) continue; // Handle parameterised width @@ -1594,8 +1553,8 @@ typename Stream::off_type stream_format(Stream &str, Format &&fmt, Params &&args { assert(flags.get_field_width() == 0U); assert(0 < width_pos); - assert(args.size() >= unsigned(width_pos)); - if ((0 < width_pos) && (args.size() >= unsigned(width_pos))) + assert(args.argument_count() >= unsigned(width_pos)); + if ((0 < width_pos) && (args.argument_count() >= unsigned(width_pos))) { int width; if (args[width_pos - 1].make_integer(width)) @@ -1622,8 +1581,8 @@ typename Stream::off_type stream_format(Stream &str, Format &&fmt, Params &&args { assert(flags.get_precision() < 0); assert(0 < prec_pos); - assert(args.size() >= unsigned(prec_pos)); - if ((0 < prec_pos) && (args.size() >= unsigned(prec_pos))) + assert(args.argument_count() >= unsigned(prec_pos)); + if ((0 < prec_pos) && (args.argument_count() >= unsigned(prec_pos))) { int precision; if (args[prec_pos - 1].make_integer(precision)) @@ -1648,8 +1607,8 @@ typename Stream::off_type stream_format(Stream &str, Format &&fmt, Params &&args else { assert(0 < arg_pos); - assert(args.size() >= unsigned(arg_pos)); - if ((0 >= arg_pos) || (args.size() < unsigned(arg_pos))) + assert(args.argument_count() >= unsigned(arg_pos)); + if ((0 >= arg_pos) || (args.argument_count() < unsigned(arg_pos))) continue; if (format_flags::conversion::tell == flags.get_conversion()) { @@ -1683,19 +1642,19 @@ typename Stream::off_type stream_format(Stream &str, Format &&fmt, Params &&args template inline typename Stream::off_type stream_format(Stream &str, Format const &fmt, Params &&... args) { - return detail::stream_format(str, fmt, detail::make_format_arguments(std::forward(args)...)); + return detail::stream_format(str, detail::make_format_argument_pack(fmt, std::forward(args)...)); } template inline typename Stream::off_type stream_format(Stream &str, detail::format_argument_pack const &args) { - return detail::stream_format(str, args, args); + return detail::stream_format(str, args); } template inline typename Stream::off_type stream_format(Stream &str, detail::format_argument_pack &&args) { - return detail::stream_format(str, args, args); + return detail::stream_format(str, args); } -- cgit v1.2.3-70-g09d2 From 2c3d6845706cf29e1abdd42885df947ac4abd15a Mon Sep 17 00:00:00 2001 From: angelosa Date: Thu, 3 Mar 2016 15:28:47 +0100 Subject: This HW actually runs at 256 x 224, especially noticeable in Go Go Mr. Yamaguchi, nw --- src/mame/drivers/tsamurai.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/tsamurai.cpp b/src/mame/drivers/tsamurai.cpp index f157d504367..cf80d064683 100644 --- a/src/mame/drivers/tsamurai.cpp +++ b/src/mame/drivers/tsamurai.cpp @@ -721,7 +721,7 @@ static MACHINE_CONFIG_START( tsamurai, tsamurai_state ) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(32*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8) + MCFG_SCREEN_VISIBLE_AREA(0, 255, 16, 255-16) MCFG_SCREEN_UPDATE_DRIVER(tsamurai_state, screen_update) MCFG_SCREEN_PALETTE("palette") @@ -762,7 +762,7 @@ static MACHINE_CONFIG_START( vsgongf, tsamurai_state ) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(32*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8) + MCFG_SCREEN_VISIBLE_AREA(0, 255, 16, 255-16) MCFG_SCREEN_UPDATE_DRIVER(tsamurai_state, screen_update_vsgongf) MCFG_SCREEN_PALETTE("palette") @@ -807,7 +807,7 @@ static MACHINE_CONFIG_START( m660, tsamurai_state ) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(32*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8) + MCFG_SCREEN_VISIBLE_AREA(0, 255, 16, 255-16) MCFG_SCREEN_UPDATE_DRIVER(tsamurai_state, screen_update) MCFG_SCREEN_PALETTE("palette") -- cgit v1.2.3-70-g09d2 From 23ae468189b32e04557e3449e70b656eb4a1298b Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 3 Mar 2016 15:46:15 +0100 Subject: use chrono calls for time handling in core (nw) --- src/mame/video/igs017_igs031.cpp | 2 +- src/osd/eigccppc.h | 19 ----- src/osd/eigccx86.h | 36 --------- src/osd/eivcx86.h | 41 ---------- src/osd/modules/debugger/debugqt.cpp | 2 +- src/osd/modules/lib/osdlib_macosx.cpp | 146 ---------------------------------- src/osd/modules/lib/osdlib_unix.cpp | 67 +--------------- src/osd/modules/lib/osdlib_win32.cpp | 106 ------------------------ src/osd/osdcore.cpp | 40 ++++++++++ src/osd/sdl/window.cpp | 2 +- 10 files changed, 44 insertions(+), 417 deletions(-) (limited to 'src') diff --git a/src/mame/video/igs017_igs031.cpp b/src/mame/video/igs017_igs031.cpp index 8e8993e0fa7..9708d4413e8 100644 --- a/src/mame/video/igs017_igs031.cpp +++ b/src/mame/video/igs017_igs031.cpp @@ -374,7 +374,7 @@ int igs017_igs031_device::debug_viewer(bitmap_ind16 &bitmap,const rectangle &cli popmessage("a: %08X w: %03X p: %02x-%02x-%02x",a,w,m_sprites_gfx[a/3*3+0],m_sprites_gfx[a/3*3+1],m_sprites_gfx[a/3*3+2]); m_debug_addr = a; m_debug_width = w; - osd_sleep(200000); + osd_sleep(osd_ticks_per_second() / 1000 * 200); return 1; } #endif diff --git a/src/osd/eigccppc.h b/src/osd/eigccppc.h index d9cd2ee1828..7d61ee49752 100644 --- a/src/osd/eigccppc.h +++ b/src/osd/eigccppc.h @@ -284,23 +284,4 @@ _count_leading_ones(UINT32 value) return result; } - -/*************************************************************************** - INLINE TIMING FUNCTIONS -***************************************************************************/ - -/*------------------------------------------------- - get_profile_ticks - return a tick counter - from the processor that can be used for - profiling. It does not need to run at any - particular rate. --------------------------------------------------*/ - -#define get_profile_ticks _get_profile_ticks -static inline INT64 ATTR_UNUSED ATTR_FORCE_INLINE _get_profile_ticks(void) -{ - // fix me - should use the time base - return osd_ticks(); -} - #endif /* __EIGCCPPC__ */ diff --git a/src/osd/eigccx86.h b/src/osd/eigccx86.h index 3494e33b5db..1d5c30d151c 100644 --- a/src/osd/eigccx86.h +++ b/src/osd/eigccx86.h @@ -521,40 +521,4 @@ _count_leading_ones(UINT32 value) return result; } -/*************************************************************************** - INLINE TIMING FUNCTIONS -***************************************************************************/ - -/*------------------------------------------------- - get_profile_ticks - return a tick counter - from the processor that can be used for - profiling. It does not need to run at any - particular rate. --------------------------------------------------*/ - -#define get_profile_ticks _get_profile_ticks - -#ifndef __x86_64__ -static inline UINT64 ATTR_UNUSED ATTR_FORCE_INLINE _get_profile_ticks(void) -{ - UINT64 result; - __asm__ __volatile__ ( - "rdtsc" - : "=A" (result) - ); - return result; -} -#else -static inline UINT64 ATTR_UNUSED ATTR_FORCE_INLINE _get_profile_ticks(void) -{ - _x86_union r; - __asm__ __volatile__ ( - "rdtsc" - : "=a" (r.u32.l), "=d" (r.u32.h) - ); - - return (UINT64) r.u64; -} -#endif - #endif /* __EIGCCX86__ */ diff --git a/src/osd/eivcx86.h b/src/osd/eivcx86.h index b6139f70c26..503594d3a99 100644 --- a/src/osd/eivcx86.h +++ b/src/osd/eivcx86.h @@ -460,45 +460,4 @@ static inline UINT8 _count_leading_ones(UINT32 value) } #endif - - -/*************************************************************************** - INLINE TIMING FUNCTIONS -***************************************************************************/ - -/*------------------------------------------------- - get_profile_ticks - return a tick counter - from the processor that can be used for - profiling. It does not need to run at any - particular rate. --------------------------------------------------*/ - -#define get_profile_ticks _get_profile_ticks - -#ifdef PTR64 - -static inline osd_ticks_t _get_profile_ticks(void) -{ - return __rdtsc(); -} - -#else - -static inline osd_ticks_t _get_profile_ticks(void) -{ - UINT64 result; - UINT64 *presult = &result; - - __asm { - __asm _emit 0Fh __asm _emit 031h // rdtsc - mov ebx, presult - mov [ebx],eax - mov [ebx+4],edx - } - - return result; -} - -#endif - #endif /* __EIVCX86__ */ diff --git a/src/osd/modules/debugger/debugqt.cpp b/src/osd/modules/debugger/debugqt.cpp index e553585f729..ac6c6a9d95c 100644 --- a/src/osd/modules/debugger/debugqt.cpp +++ b/src/osd/modules/debugger/debugqt.cpp @@ -317,7 +317,7 @@ void debug_qt::wait_for_debugger(device_t &device, bool firststop) mainQtWindow->setProcessor(&device); // Run our own QT event loop - osd_sleep(50000); + osd_sleep(osd_ticks_per_second() / 1000 * 50); qApp->processEvents(QEventLoop::AllEvents, 1); // Refresh everyone if requested diff --git a/src/osd/modules/lib/osdlib_macosx.cpp b/src/osd/modules/lib/osdlib_macosx.cpp index 0d89e6c3596..501719c1e3c 100644 --- a/src/osd/modules/lib/osdlib_macosx.cpp +++ b/src/osd/modules/lib/osdlib_macosx.cpp @@ -14,11 +14,6 @@ #include #include -#include -#include -#include -#include - // MAME headers #include "osdcore.h" #include "osdlib.h" @@ -54,30 +49,6 @@ void osd_process_kill(void) kill(getpid(), SIGKILL); } -//============================================================ -// osd_num_processors -//============================================================ - -int osd_get_num_processors(void) -{ - int processors = 1; - - struct host_basic_info host_basic_info; - unsigned int count; - kern_return_t r; - mach_port_t my_mach_host_self; - - count = HOST_BASIC_INFO_COUNT; - my_mach_host_self = mach_host_self(); - if ( ( r = host_info(my_mach_host_self, HOST_BASIC_INFO, (host_info_t)(&host_basic_info), &count)) == KERN_SUCCESS ) - { - processors = host_basic_info.avail_cpus; - } - mach_port_deallocate(mach_task_self(), my_mach_host_self); - - return processors; -} - //============================================================ // osd_malloc //============================================================ @@ -166,120 +137,3 @@ void osd_break_into_debugger(const char *message) #endif } - -//============================================================ -// PROTOTYPES -//============================================================ - -static osd_ticks_t init_cycle_counter(void); -static osd_ticks_t mach_cycle_counter(void); - -//============================================================ -// STATIC VARIABLES -//============================================================ - -static osd_ticks_t (*cycle_counter)(void) = init_cycle_counter; -static osd_ticks_t (*ticks_counter)(void) = init_cycle_counter; -static osd_ticks_t ticks_per_second; - -//============================================================ -// init_cycle_counter -// -// to avoid total grossness, this function is split by subarch -//============================================================ - -static osd_ticks_t init_cycle_counter(void) -{ - osd_ticks_t start, end; - osd_ticks_t a, b; - - cycle_counter = mach_cycle_counter; - ticks_counter = mach_cycle_counter; - - // wait for an edge on the timeGetTime call - a = SDL_GetTicks(); - do - { - b = SDL_GetTicks(); - } while (a == b); - - // get the starting cycle count - start = (*cycle_counter)(); - - // now wait for 1/4 second total - do - { - a = SDL_GetTicks(); - } while (a - b < 250); - - // get the ending cycle count - end = (*cycle_counter)(); - - // compute ticks_per_sec - ticks_per_second = (end - start) * 4; - - // return the current cycle count - return (*cycle_counter)(); -} - -//============================================================ -// performance_cycle_counter -//============================================================ - -//============================================================ -// mach_cycle_counter -//============================================================ -static osd_ticks_t mach_cycle_counter(void) -{ - return mach_absolute_time(); -} - -//============================================================ -// osd_ticks -//============================================================ - -osd_ticks_t osd_ticks(void) -{ - return (*cycle_counter)(); -} - - -//============================================================ -// osd_ticks_per_second -//============================================================ - -osd_ticks_t osd_ticks_per_second(void) -{ - if (ticks_per_second == 0) - { - // if we haven't computed the value yet, there's no time like the present - init_cycle_counter(); - } - return ticks_per_second; -} - - - -//============================================================ -// osd_sleep -//============================================================ - -void osd_sleep(osd_ticks_t duration) -{ - UINT32 msec; - - // make sure we've computed ticks_per_second - if (ticks_per_second == 0) - (void)osd_ticks(); - - // convert to milliseconds, rounding down - msec = (UINT32)(duration * 1000 / ticks_per_second); - - // only sleep if at least 2 full milliseconds - if (msec >= 2) - { - // take a couple of msecs off the top for good measure - msec -= 2; - usleep(msec*1000); - } -} diff --git a/src/osd/modules/lib/osdlib_unix.cpp b/src/osd/modules/lib/osdlib_unix.cpp index a275eb04192..3075ea63769 100644 --- a/src/osd/modules/lib/osdlib_unix.cpp +++ b/src/osd/modules/lib/osdlib_unix.cpp @@ -13,8 +13,7 @@ #include #include #include -#include -#include + #ifdef SDLMAME_EMSCRIPTEN #include #endif @@ -50,20 +49,6 @@ void osd_process_kill(void) kill(getpid(), SIGKILL); } -//============================================================ -// osd_num_processors -//============================================================ - -int osd_get_num_processors(void) -{ - int processors = 1; - -#if defined(_SC_NPROCESSORS_ONLN) - processors = sysconf(_SC_NPROCESSORS_ONLN); -#endif - return processors; -} - //============================================================ // osd_malloc //============================================================ @@ -150,53 +135,3 @@ void osd_break_into_debugger(const char *message) printf("Ignoring MAME exception: %s\n", message); #endif } - - -//============================================================ -// osd_ticks -//============================================================ - -osd_ticks_t osd_ticks(void) -{ -#ifdef SDLMAME_EMSCRIPTEN - return (osd_ticks_t)(emscripten_get_now() * 1000.0); -#else - struct timeval tp; - static osd_ticks_t start_sec = 0; - - gettimeofday(&tp, NULL); - if (start_sec==0) - start_sec = tp.tv_sec; - return (tp.tv_sec - start_sec) * (osd_ticks_t) 1000000 + tp.tv_usec; -#endif -} - - -//============================================================ -// osd_ticks_per_second -//============================================================ - -osd_ticks_t osd_ticks_per_second(void) -{ - return (osd_ticks_t) 1000000; -} - -//============================================================ -// osd_sleep -//============================================================ - -void osd_sleep(osd_ticks_t duration) -{ - UINT32 msec; - - // convert to milliseconds, rounding down - msec = (UINT32)(duration * 1000 / osd_ticks_per_second()); - - // only sleep if at least 2 full milliseconds - if (msec >= 2) - { - // take a couple of msecs off the top for good measure - msec -= 2; - usleep(msec*1000); - } -} diff --git a/src/osd/modules/lib/osdlib_win32.cpp b/src/osd/modules/lib/osdlib_win32.cpp index 75218574aff..bb6f136be90 100644 --- a/src/osd/modules/lib/osdlib_win32.cpp +++ b/src/osd/modules/lib/osdlib_win32.cpp @@ -100,21 +100,6 @@ void osd_process_kill(void) TerminateProcess(GetCurrentProcess(), -1); } -//============================================================ -// osd_num_processors -//============================================================ - -int osd_get_num_processors(void) -{ - SYSTEM_INFO info; - - // otherwise, fetch the info from the system - GetSystemInfo(&info); - - // max out at 4 for now since scaling above that seems to do poorly - return MIN(info.dwNumberOfProcessors, 4); -} - //============================================================ // osd_malloc //============================================================ @@ -256,94 +241,3 @@ void osd_break_into_debugger(const char *message) #endif } -//============================================================ -// GLOBAL VARIABLES -//============================================================ - -static osd_ticks_t ticks_per_second = 0; -static osd_ticks_t suspend_ticks = 0; -static BOOL using_qpc = TRUE; - - - -//============================================================ -// osd_ticks -//============================================================ - -osd_ticks_t osd_ticks(void) -{ - LARGE_INTEGER performance_count; - - // if we're suspended, just return that - if (suspend_ticks != 0) - return suspend_ticks; - - // if we have a per second count, just go for it - if (ticks_per_second != 0) - { - // QueryPerformanceCounter if we can - if (using_qpc) - { - QueryPerformanceCounter(&performance_count); - return (osd_ticks_t)performance_count.QuadPart - suspend_ticks; - } - - // otherwise, fall back to timeGetTime - else - return (osd_ticks_t)timeGetTime() - suspend_ticks; - } - - // if not, we have to determine it - using_qpc = QueryPerformanceFrequency(&performance_count) && (performance_count.QuadPart != 0); - if (using_qpc) - ticks_per_second = (osd_ticks_t)performance_count.QuadPart; - else - ticks_per_second = 1000; - - // call ourselves to get the first value - return osd_ticks(); -} - - -//============================================================ -// osd_ticks_per_second -//============================================================ - -osd_ticks_t osd_ticks_per_second(void) -{ - if (ticks_per_second == 0) - osd_ticks(); - return ticks_per_second; -} - -//============================================================ -// osd_sleep -//============================================================ - -void osd_sleep(osd_ticks_t duration) -{ - DWORD msec; - - // make sure we've computed ticks_per_second - if (ticks_per_second == 0) - (void)osd_ticks(); - - // convert to milliseconds, rounding down - msec = (DWORD)(duration * 1000 / ticks_per_second); - - // only sleep if at least 2 full milliseconds - if (msec >= 2) - { - HANDLE current_thread = GetCurrentThread(); - int old_priority = GetThreadPriority(current_thread); - - // take a couple of msecs off the top for good measure - msec -= 2; - - // bump our thread priority super high so that we get - // priority when we need it - SetThreadPriority(current_thread, THREAD_PRIORITY_TIME_CRITICAL); - Sleep(msec); - SetThreadPriority(current_thread, old_priority); - } -} diff --git a/src/osd/osdcore.cpp b/src/osd/osdcore.cpp index 632124e2e7c..206cb5ed642 100644 --- a/src/osd/osdcore.cpp +++ b/src/osd/osdcore.cpp @@ -2,6 +2,8 @@ // copyright-holders:Aaron Giles #include "osdcore.h" +#include +#include static const int MAXSTACK = 10; static osd_output *m_stack[MAXSTACK]; @@ -141,3 +143,41 @@ void CLIB_DECL osd_printf_log(const char *format, ...) va_end(argptr); } #endif + +//============================================================ +// osd_ticks +//============================================================ + +osd_ticks_t osd_ticks(void) +{ + return std::chrono::high_resolution_clock::now().time_since_epoch().count(); +} + + +//============================================================ +// osd_ticks_per_second +//============================================================ + +osd_ticks_t osd_ticks_per_second(void) +{ + return std::chrono::high_resolution_clock::period::den; +} + +//============================================================ +// osd_sleep +//============================================================ + +void osd_sleep(osd_ticks_t duration) +{ + std::this_thread::sleep_for(std::chrono::high_resolution_clock::duration(duration)); +} + +//============================================================ +// osd_num_processors +//============================================================ + +int osd_get_num_processors(void) +{ + // max out at 4 for now since scaling above that seems to do poorly + return MIN(std::thread::hardware_concurrency(), 4); +} diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp index 0c5bb7a51ca..2a0147afea5 100644 --- a/src/osd/sdl/window.cpp +++ b/src/osd/sdl/window.cpp @@ -310,7 +310,7 @@ static void sdlwindow_sync(void) while (!osd_work_queue_wait(work_queue, osd_ticks_per_second()*10)) { osd_printf_warning("sdlwindow_sync: Sleeping...\n"); - osd_sleep(100000); + osd_sleep(osd_ticks_per_second() / 1000 * 100); } } } -- cgit v1.2.3-70-g09d2 From e153edfaec8a556b1d831df7134f65102f4e5b37 Mon Sep 17 00:00:00 2001 From: Brad Hughes Date: Thu, 3 Mar 2016 11:26:08 -0500 Subject: Code cleanup in rawinput plus use common code for dynamic function binding. --- src/osd/modules/input/input_rawinput.cpp | 96 ++++++++++++++------------------ src/osd/windows/winutil.cpp | 2 +- src/osd/windows/winutil.h | 22 ++++++++ 3 files changed, 64 insertions(+), 56 deletions(-) (limited to 'src') diff --git a/src/osd/modules/input/input_rawinput.cpp b/src/osd/modules/input/input_rawinput.cpp index 5f930e5d780..84d8a96fec3 100644 --- a/src/osd/modules/input/input_rawinput.cpp +++ b/src/osd/modules/input/input_rawinput.cpp @@ -27,6 +27,7 @@ #include "strconv.h" // MAMEOS headers +#include "winutil.h" #include "winmain.h" #include "window.h" @@ -44,10 +45,10 @@ #endif // RawInput APIs -typedef /*WINUSERAPI*/ INT(WINAPI *get_rawinput_device_list_ptr)(OUT PRAWINPUTDEVICELIST pRawInputDeviceList, IN OUT PINT puiNumDevices, IN UINT cbSize); -typedef /*WINUSERAPI*/ INT(WINAPI *get_rawinput_data_ptr)(IN HRAWINPUT hRawInput, IN UINT uiCommand, OUT LPVOID pData, IN OUT PINT pcbSize, IN UINT cbSizeHeader); -typedef /*WINUSERAPI*/ INT(WINAPI *get_rawinput_device_info_ptr)(IN HANDLE hDevice, IN UINT uiCommand, OUT LPVOID pData, IN OUT PINT pcbSize); -typedef /*WINUSERAPI*/ BOOL(WINAPI *register_rawinput_devices_ptr)(IN PCRAWINPUTDEVICE pRawInputDevices, IN UINT uiNumDevices, IN UINT cbSize); +typedef lazy_loaded_function_p3 get_rawinput_device_list_ptr; +typedef lazy_loaded_function_p5 get_rawinput_data_ptr; +typedef lazy_loaded_function_p4 get_rawinput_device_info_ptr; +typedef lazy_loaded_function_p3 register_rawinput_devices_ptr; //============================================================ // reg_query_string @@ -289,19 +290,11 @@ public: // rawinput_mouse_device //============================================================ -struct rawinput_mouse_state -{ - int raw_x; - int raw_y; - int raw_z; -}; - class rawinput_mouse_device : public rawinput_device { private: std::mutex m_device_lock; public: - //rawinput_mouse_state raw_mouse; mouse_state mouse; rawinput_mouse_device(running_machine& machine, const char* name, input_module& module) @@ -317,18 +310,6 @@ public: mouse.lZ = 0; rawinput_device::poll(); - - //std::lock_guard scope_lock(m_device_lock); - - //// copy the accumulated raw state to the actual state - //mouse.lX = raw_mouse.raw_x; - //mouse.lY = raw_mouse.raw_y; - //mouse.lZ = raw_mouse.raw_z; - //raw_mouse.raw_x = 0; - //raw_mouse.raw_y = 0; - //raw_mouse.raw_z = 0; - - //osd_printf_verbose("At poll: lX=%d, lY=%d, lZ=%d\n", (int)mouse.lX, (int)mouse.lY, (int)mouse.lZ); } void reset() override @@ -345,13 +326,6 @@ public: mouse.lX += rawinput.data.mouse.lLastX * INPUT_RELATIVE_PER_PIXEL; mouse.lY += rawinput.data.mouse.lLastY * INPUT_RELATIVE_PER_PIXEL; - /*osd_printf_verbose( - "Mouse Abs : lastX = %d, lastY = %d, rawx = %d, rawy = %d\n", - (int)rawinput.data.mouse.lLastX, - (int)rawinput.data.mouse.lLastY, - (int)raw_mouse.raw_x, - (int)raw_mouse.raw_y);*/ - // update zaxis if (rawinput.data.mouse.usButtonFlags & RI_MOUSE_WHEEL) mouse.lZ += (INT16)rawinput.data.mouse.usButtonData * INPUT_RELATIVE_PER_PIXEL; @@ -370,6 +344,13 @@ public: } }; +/* +register_rawinput_devices = (register_rawinput_devices_ptr)GetProcAddress(user32, "RegisterRawInputDevices"); +get_rawinput_device_list = (get_rawinput_device_list_ptr)GetProcAddress(user32, "GetRawInputDeviceList"); +get_rawinput_device_info = (get_rawinput_device_info_ptr)GetProcAddress(user32, "GetRawInputDeviceInfo" UNICODE_SUFFIX); +get_rawinput_data = (get_rawinput_data_ptr)GetProcAddress(user32, "GetRawInputData"); +*/ + //============================================================ // rawinput_module - base class for rawinput modules //============================================================ @@ -387,25 +368,38 @@ private: public: rawinput_module(const char *type, const char* name) : wininput_module(type, name), - get_rawinput_device_list(nullptr), - get_rawinput_data(nullptr), - get_rawinput_device_info(nullptr), - register_rawinput_devices(nullptr) + get_rawinput_device_list("GetRawInputDeviceList", L"user32.dll"), + get_rawinput_data("GetRawInputData", L"user32.dll"), + get_rawinput_device_info("GetRawInputDeviceInfoW", L"user32.dll"), + register_rawinput_devices("RegisterRawInputDevices", L"user32.dll") { } + bool probe() override + { + int status = get_rawinput_device_list.initialize(); + status |= get_rawinput_data.initialize(); + status |= get_rawinput_device_info.initialize(); + status |= register_rawinput_devices.initialize(); + + if (status != 0) + return false; + + return true; + } + void input_init(running_machine &machine) override { // get the number of devices, allocate a device list, and fetch it int device_count = 0; - if ((*get_rawinput_device_list)(NULL, &device_count, sizeof(RAWINPUTDEVICELIST)) != 0) + if (get_rawinput_device_list(NULL, &device_count, sizeof(RAWINPUTDEVICELIST)) != 0) return; if (device_count == 0) return; auto rawinput_devices = std::make_unique(device_count); - if ((*get_rawinput_device_list)(rawinput_devices.get(), &device_count, sizeof(RAWINPUTDEVICELIST)) == -1) + if (get_rawinput_device_list(rawinput_devices.get(), &device_count, sizeof(RAWINPUTDEVICELIST)) == -1) return; // iterate backwards through devices; new devices are added at the head @@ -433,7 +427,7 @@ public: registration.hwndTarget = win_window_list->m_hwnd; // register the device - (*register_rawinput_devices)(®istration, 1, sizeof(registration)); + register_rawinput_devices(®istration, 1, sizeof(registration)); } protected: @@ -443,23 +437,15 @@ protected: int init_internal() override { - HMODULE user32; - - // look in user32 for the raw input APIs - user32 = LoadLibrary(TEXT("user32.dll")); - if (user32 == NULL) - return 1; - // look up the entry points - register_rawinput_devices = (register_rawinput_devices_ptr)GetProcAddress(user32, "RegisterRawInputDevices"); - get_rawinput_device_list = (get_rawinput_device_list_ptr)GetProcAddress(user32, "GetRawInputDeviceList"); - get_rawinput_device_info = (get_rawinput_device_info_ptr)GetProcAddress(user32, "GetRawInputDeviceInfo" UNICODE_SUFFIX); - get_rawinput_data = (get_rawinput_data_ptr)GetProcAddress(user32, "GetRawInputData"); - if (register_rawinput_devices == NULL || get_rawinput_device_list == NULL || get_rawinput_device_info == NULL || get_rawinput_data == NULL) + int status = get_rawinput_device_list.initialize(); + status |= get_rawinput_data.initialize(); + status |= get_rawinput_device_info.initialize(); + status |= register_rawinput_devices.initialize(); + if (status != 0) return 1; osd_printf_verbose("RawInput: APIs detected\n"); - return 0; } @@ -469,11 +455,11 @@ protected: TDevice* devinfo = nullptr; INT name_length = 0; // determine the length of the device name, allocate it, and fetch it if not nameless - if ((*get_rawinput_device_info)(rawinputdevice->hDevice, RIDI_DEVICENAME, NULL, &name_length) != 0) + if (get_rawinput_device_info(rawinputdevice->hDevice, RIDI_DEVICENAME, NULL, &name_length) != 0) return nullptr; std::unique_ptr tname = std::make_unique(name_length + 1); - if (name_length > 1 && (*get_rawinput_device_info)(rawinputdevice->hDevice, RIDI_DEVICENAME, tname.get(), &name_length) == -1) + if (name_length > 1 && get_rawinput_device_info(rawinputdevice->hDevice, RIDI_DEVICENAME, tname.get(), &name_length) == -1) return nullptr; // if this is an RDP name, skip it @@ -514,7 +500,7 @@ protected: return FALSE; // determine the size of databuffer we need - if ((*get_rawinput_data)(rawinputdevice, RID_INPUT, NULL, &size, sizeof(RAWINPUTHEADER)) != 0) + if (get_rawinput_data(rawinputdevice, RID_INPUT, NULL, &size, sizeof(RAWINPUTHEADER)) != 0) return FALSE; // if necessary, allocate a temporary buffer and fetch the data @@ -527,7 +513,7 @@ protected: } // fetch the data and process the appropriate message types - result = (*get_rawinput_data)((HRAWINPUT)rawinputdevice, RID_INPUT, data, &size, sizeof(RAWINPUTHEADER)); + result = get_rawinput_data((HRAWINPUT)rawinputdevice, RID_INPUT, data, &size, sizeof(RAWINPUTHEADER)); if (result) { std::lock_guard scope_lock(m_module_lock); diff --git a/src/osd/windows/winutil.cpp b/src/osd/windows/winutil.cpp index 05dd1541ced..eb63eecacd0 100644 --- a/src/osd/windows/winutil.cpp +++ b/src/osd/windows/winutil.cpp @@ -160,7 +160,7 @@ lazy_loaded_function::lazy_loaded_function(const char * name, const wchar_t* dll } lazy_loaded_function::lazy_loaded_function(const char * name, const wchar_t** dll_names, int dll_count) - : m_name(name), m_initialized(false), m_pfn(nullptr) + : m_name(name), m_module(NULL), m_initialized(false), m_pfn(nullptr) { for (int i = 0; i < dll_count; i++) m_dll_names.push_back(std::wstring(dll_names[i])); diff --git a/src/osd/windows/winutil.h b/src/osd/windows/winutil.h index 8f205e5a8ba..530327dcf61 100644 --- a/src/osd/windows/winutil.h +++ b/src/osd/windows/winutil.h @@ -153,4 +153,26 @@ public: } }; +// Five parameters +template +class lazy_loaded_function_p5 : public lazy_loaded_function +{ +public: + lazy_loaded_function_p5(const char * name, const wchar_t* dll_name) + : lazy_loaded_function(name, &dll_name, 1) + { + } + + lazy_loaded_function_p5(const char * name, const wchar_t** dll_names, int dll_count) + : lazy_loaded_function(name, dll_names, dll_count) + { + } + + TRet operator ()(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) + { + check_init(); + return ((TRet(__stdcall *) (P1, P2, P3, P4, P5))m_pfn)(p1, p2, p3, p4, p5); + } +}; + #endif // __WINUTIL__ -- cgit v1.2.3-70-g09d2 From 4fadaa781d4a11f0a5a55efc6e30aa70cf7c705f Mon Sep 17 00:00:00 2001 From: Brad Hughes Date: Thu, 3 Mar 2016 11:27:09 -0500 Subject: Add module probe support for directwrite so we can fall back cleanly. --- src/osd/modules/font/font_dwrite.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/osd/modules/font/font_dwrite.cpp b/src/osd/modules/font/font_dwrite.cpp index d455a928671..cfcc952ef0d 100644 --- a/src/osd/modules/font/font_dwrite.cpp +++ b/src/osd/modules/font/font_dwrite.cpp @@ -661,6 +661,18 @@ public: { } + virtual bool probe() override + { + // This module is available if it can load the expected API Functions + if (m_pfnD2D1CreateFactory.initialize() != 0 + || m_pfnDWriteCreateFactory.initialize() != 0) + { + return false; + } + + return true; + } + virtual int init(const osd_options &options) override { HRESULT result; -- cgit v1.2.3-70-g09d2 From 4e692234c415c131e14596cb697457220a915d92 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 3 Mar 2016 17:37:53 +0100 Subject: Update license for Hau on his request (nw) --- src/mame/drivers/dai3wksi.cpp | 2 +- src/mame/drivers/galastrm.cpp | 2 +- src/mame/drivers/metro.cpp | 2 +- src/mame/drivers/qdrmfgp.cpp | 6 +++--- src/mame/drivers/tecmo16.cpp | 6 +++--- src/mame/includes/galastrm.h | 2 +- src/mame/includes/qdrmfgp.h | 4 ++-- src/mame/includes/tecmo16.h | 4 ++-- src/mame/video/galastrm.cpp | 2 +- src/mame/video/qdrmfgp.cpp | 4 ++-- src/mame/video/tecmo16.cpp | 4 ++-- 11 files changed, 19 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/dai3wksi.cpp b/src/mame/drivers/dai3wksi.cpp index 08bfc4febc7..879163b3fb9 100644 --- a/src/mame/drivers/dai3wksi.cpp +++ b/src/mame/drivers/dai3wksi.cpp @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Hau,Derrick Renaud /* diff --git a/src/mame/drivers/galastrm.cpp b/src/mame/drivers/galastrm.cpp index b3a303b083d..9c242647aae 100644 --- a/src/mame/drivers/galastrm.cpp +++ b/src/mame/drivers/galastrm.cpp @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Hau /* diff --git a/src/mame/drivers/metro.cpp b/src/mame/drivers/metro.cpp index c00f2dd51ee..ef372c617ee 100644 --- a/src/mame/drivers/metro.cpp +++ b/src/mame/drivers/metro.cpp @@ -96,7 +96,7 @@ Notes: - vmetal: has Sega and Taito logos in the roms ?! -driver modified by Eisuke Watanabe +driver modified by Hau ***************************************************************************/ #include "emu.h" diff --git a/src/mame/drivers/qdrmfgp.cpp b/src/mame/drivers/qdrmfgp.cpp index cfc4084b392..6e8a59867eb 100644 --- a/src/mame/drivers/qdrmfgp.cpp +++ b/src/mame/drivers/qdrmfgp.cpp @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Eisuke Watanabe +// license:BSD-3-Clause +// copyright-holders:Hau /*************************************************************************** Quiz Do Re Mi Fa Grand Prix (Japan) (GQ460) (c)1994 Konami @@ -16,7 +16,7 @@ TODO: command -- -driver by Eisuke Watanabe +driver by Hau Note: GP1 HDD data contents: diff --git a/src/mame/drivers/tecmo16.cpp b/src/mame/drivers/tecmo16.cpp index 9ef5e52641b..820de48507a 100644 --- a/src/mame/drivers/tecmo16.cpp +++ b/src/mame/drivers/tecmo16.cpp @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Eisuke Watanabe, Nicola Salmoria +// license:BSD-3-Clause +// copyright-holders:Hau, Nicola Salmoria /****************************************************************************** Ganbare Ginkun (Japan) (c)1995 TECMO @@ -8,7 +8,7 @@ -- -driver by Eisuke Watanabe, Nicola Salmoria +driver by Hau, Nicola Salmoria special thanks to Nekomata, NTD & code-name'Siberia' diff --git a/src/mame/includes/galastrm.h b/src/mame/includes/galastrm.h index c2413a6d11d..b62d797cdc1 100644 --- a/src/mame/includes/galastrm.h +++ b/src/mame/includes/galastrm.h @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Hau #include "machine/eepromser.h" diff --git a/src/mame/includes/qdrmfgp.h b/src/mame/includes/qdrmfgp.h index 5c8968e12ee..565b507933b 100644 --- a/src/mame/includes/qdrmfgp.h +++ b/src/mame/includes/qdrmfgp.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Eisuke Watanabe +// license:BSD-3-Clause +// copyright-holders:Hau #include "machine/ataintf.h" #include "sound/k054539.h" #include "machine/k053252.h" diff --git a/src/mame/includes/tecmo16.h b/src/mame/includes/tecmo16.h index cfdbb55acf1..f4a10d1f5be 100644 --- a/src/mame/includes/tecmo16.h +++ b/src/mame/includes/tecmo16.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Eisuke Watanabe, Nicola Salmoria +// license:BSD-3-Clause +// copyright-holders:Hau, Nicola Salmoria #include "video/tecmo_spr.h" #include "video/tecmo_mix.h" diff --git a/src/mame/video/galastrm.cpp b/src/mame/video/galastrm.cpp index b2841777249..0bda7291482 100644 --- a/src/mame/video/galastrm.cpp +++ b/src/mame/video/galastrm.cpp @@ -1,4 +1,4 @@ -// license:??? +// license:BSD-3-Clause // copyright-holders:Hau #include "emu.h" #include "includes/galastrm.h" diff --git a/src/mame/video/qdrmfgp.cpp b/src/mame/video/qdrmfgp.cpp index ce98f259cc0..b86c9e12b5d 100644 --- a/src/mame/video/qdrmfgp.cpp +++ b/src/mame/video/qdrmfgp.cpp @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Eisuke Watanabe +// license:BSD-3-Clause +// copyright-holders:Hau /*************************************************************************** video.c diff --git a/src/mame/video/tecmo16.cpp b/src/mame/video/tecmo16.cpp index 7a49c8c705a..c1ca267b720 100644 --- a/src/mame/video/tecmo16.cpp +++ b/src/mame/video/tecmo16.cpp @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Eisuke Watanabe, Nicola Salmoria +// license:BSD-3-Clause +// copyright-holders:Hau, Nicola Salmoria /****************************************************************************** Ganbare Ginkun (Japan) (c)1995 TECMO -- cgit v1.2.3-70-g09d2 From cc01279d44755a89af12463e60b732dd7f2732f1 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 3 Mar 2016 17:56:31 +0100 Subject: Ed was a dumper (nw) --- src/mame/drivers/bking.cpp | 4 ++-- src/mame/includes/bking.h | 4 ++-- src/mame/video/bking.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/bking.cpp b/src/mame/drivers/bking.cpp index 9b1dcc9a100..6d25f92bba9 100644 --- a/src/mame/drivers/bking.cpp +++ b/src/mame/drivers/bking.cpp @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Ed Mueller, Mike Balfour, Zsolt Vasvari +// license:BSD-3-Clause +// copyright-holders:Mike Balfour, Zsolt Vasvari /*************************************************************************** diff --git a/src/mame/includes/bking.h b/src/mame/includes/bking.h index ffd455d3421..c6776381cb0 100644 --- a/src/mame/includes/bking.h +++ b/src/mame/includes/bking.h @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Ed Mueller, Mike Balfour, Zsolt Vasvari +// license:BSD-3-Clause +// copyright-holders:Mike Balfour, Zsolt Vasvari #include "machine/buggychl.h" class bking_state : public driver_device diff --git a/src/mame/video/bking.cpp b/src/mame/video/bking.cpp index ac3851e7217..d9b82ddd7e5 100644 --- a/src/mame/video/bking.cpp +++ b/src/mame/video/bking.cpp @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Ed Mueller, Mike Balfour, Zsolt Vasvari +// license:BSD-3-Clause +// copyright-holders:Mike Balfour, Zsolt Vasvari /*************************************************************************** bking.c -- cgit v1.2.3-70-g09d2 From b68fef4f050eb7c4505fbf2cba2ca4fc5d838478 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 3 Mar 2016 18:06:54 +0100 Subject: Phil Stroffolino did rewrite and made driver functional, Enriques initial investigation deserves thanks-to at least (nw) --- src/mame/drivers/yiear.cpp | 6 +++--- src/mame/includes/yiear.h | 5 +++-- src/mame/video/yiear.cpp | 5 +++-- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/yiear.cpp b/src/mame/drivers/yiear.cpp index 18beaa4ca3e..444a644dfab 100644 --- a/src/mame/drivers/yiear.cpp +++ b/src/mame/drivers/yiear.cpp @@ -1,9 +1,9 @@ -// license:??? -// copyright-holders:Enrique Sanchez +// license:BSD-3-Clause +// copyright-holders:Phil Stroffolino +// thanks-to:Enrique Sanchez /*************************************************************************** Yie Ar Kung-Fu memory map (preliminary) - enrique.sanchez@cs.us.es CPU: Motorola 6809 diff --git a/src/mame/includes/yiear.h b/src/mame/includes/yiear.h index 1c495709603..d7af61a6429 100644 --- a/src/mame/includes/yiear.h +++ b/src/mame/includes/yiear.h @@ -1,5 +1,6 @@ -// license:??? -// copyright-holders:Enrique Sanchez +// license:BSD-3-Clause +// copyright-holders:Phil Stroffolino +// thanks-to:Enrique Sanchez #include "sound/sn76496.h" #include "sound/vlm5030.h" diff --git a/src/mame/video/yiear.cpp b/src/mame/video/yiear.cpp index 5fa3cac6f7a..c45ec809c1c 100644 --- a/src/mame/video/yiear.cpp +++ b/src/mame/video/yiear.cpp @@ -1,5 +1,6 @@ -// license:??? -// copyright-holders:Enrique Sanchez +// license:BSD-3-Clause +// copyright-holders:Phil Stroffolino +// thanks-to:Enrique Sanchez /*************************************************************************** video.c -- cgit v1.2.3-70-g09d2 From ccc12869fdf38e2373d2b34c0adb4359dcc3bb89 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 3 Mar 2016 19:30:37 +0100 Subject: these are constexpr so calculation does not cost (nw) --- src/osd/osdcore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/osd/osdcore.cpp b/src/osd/osdcore.cpp index 206cb5ed642..fef7d0d0f7a 100644 --- a/src/osd/osdcore.cpp +++ b/src/osd/osdcore.cpp @@ -160,7 +160,7 @@ osd_ticks_t osd_ticks(void) osd_ticks_t osd_ticks_per_second(void) { - return std::chrono::high_resolution_clock::period::den; + return std::chrono::high_resolution_clock::period::den / std::chrono::high_resolution_clock::period::num; } //============================================================ -- cgit v1.2.3-70-g09d2 From 4fbd1d7babedb9423cd2462548fc8935aee5aaf7 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Thu, 3 Mar 2016 18:38:56 +0000 Subject: remove all drivers by 'insideoutboy' due to unresolved licensing, replaced with skeleton drivers (rom loading only) --- scripts/target/mame/arcade.lua | 7 - src/mame/audio/flower.cpp | 337 --------------------- src/mame/drivers/carjmbre.cpp | 218 +------------- src/mame/drivers/flower.cpp | 218 +------------- src/mame/drivers/marinedt.cpp | 668 +---------------------------------------- src/mame/drivers/popper.cpp | 360 +--------------------- src/mame/drivers/sprcros2.cpp | 301 ++----------------- src/mame/includes/carjmbre.h | 44 --- src/mame/includes/flower.h | 126 -------- src/mame/includes/popper.h | 71 ----- src/mame/video/carjmbre.cpp | 156 ---------- src/mame/video/flower.cpp | 192 ------------ src/mame/video/popper.cpp | 245 --------------- 13 files changed, 78 insertions(+), 2865 deletions(-) delete mode 100644 src/mame/audio/flower.cpp delete mode 100644 src/mame/includes/carjmbre.h delete mode 100644 src/mame/includes/flower.h delete mode 100644 src/mame/includes/popper.h delete mode 100644 src/mame/video/carjmbre.cpp delete mode 100644 src/mame/video/flower.cpp delete mode 100644 src/mame/video/popper.cpp (limited to 'src') diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index b84d17d69d5..550b3a7c77f 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -2823,11 +2823,7 @@ files { MAME_DIR .. "src/mame/includes/battlex.h", MAME_DIR .. "src/mame/video/battlex.cpp", MAME_DIR .. "src/mame/drivers/carjmbre.cpp", - MAME_DIR .. "src/mame/includes/carjmbre.h", - MAME_DIR .. "src/mame/video/carjmbre.cpp", MAME_DIR .. "src/mame/drivers/popper.cpp", - MAME_DIR .. "src/mame/includes/popper.h", - MAME_DIR .. "src/mame/video/popper.cpp", MAME_DIR .. "src/mame/drivers/spaceg.cpp", } @@ -4293,9 +4289,6 @@ files { MAME_DIR .. "src/mame/drivers/fireball.cpp", MAME_DIR .. "src/mame/drivers/flipjack.cpp", MAME_DIR .. "src/mame/drivers/flower.cpp", - MAME_DIR .. "src/mame/includes/flower.h", - MAME_DIR .. "src/mame/audio/flower.cpp", - MAME_DIR .. "src/mame/video/flower.cpp", MAME_DIR .. "src/mame/drivers/fortecar.cpp", MAME_DIR .. "src/mame/drivers/fresh.cpp", MAME_DIR .. "src/mame/drivers/freekick.cpp", diff --git a/src/mame/audio/flower.cpp b/src/mame/audio/flower.cpp deleted file mode 100644 index fc8ef87b559..00000000000 --- a/src/mame/audio/flower.cpp +++ /dev/null @@ -1,337 +0,0 @@ -// license:??? -// copyright-holders:hap, insideoutboy -/* Clarue Flower sound driver. -Initial version was based on the Wiping sound driver, which was based on the old namco.c sound driver. - -TODO: -- timing (see main driver file), but also of samplerate and effects counter -- what do the unknown bits in soundregs do? -- Are channel effects correct? It's currently mostly guesswork, the pitch effects sound pretty convincing though. - Considering that the game sound hardware isn't complicated (no dedicated soundchip) these bits are possibly - for something way simpler, such as a length counter. PCB sound recordings would be useful! - -*/ - -#include "emu.h" -#include "includes/flower.h" - -#define FLOWER_VERBOSE 0 // show register writes - -#define MIXER_SAMPLERATE 48000 /* ? (native freq is probably in the MHz range) */ -#define MIXER_DEFGAIN 48 - - -const device_type FLOWER = &device_creator; - -flower_sound_device::flower_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, FLOWER, "Flower Audio Custom", tag, owner, clock, "flower_sound", __FILE__), - device_sound_interface(mconfig, *this) -{ -} - -//------------------------------------------------- -// device_config_complete - perform any -// operations now that the configuration is -// complete -//------------------------------------------------- - -void flower_sound_device::device_config_complete() -{ -} - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void flower_sound_device::device_start() -{ - flower_sound_channel *voice; - - m_effect_timer = timer_alloc(TIMER_CLOCK_EFFECT); - m_stream = machine().sound().stream_alloc(*this, 0, 1, MIXER_SAMPLERATE); - m_mixer_buffer = std::make_unique(MIXER_SAMPLERATE); - make_mixer_table(8, MIXER_DEFGAIN); - - /* extract globals from the interface */ - m_last_channel = m_channel_list + 8; - - m_sample_rom = machine().root_device().memregion("sound1")->base(); - m_volume_rom = machine().root_device().memregion("sound2")->base(); - - /* register for savestates */ - for (int i = 0; i < 8; i++) - { - voice = &m_channel_list[i]; - - save_item(NAME(voice->freq), i+1); - save_item(NAME(voice->pos), i+1); - save_item(NAME(voice->volume), i+1); - save_item(NAME(voice->voltab), i+1); - save_item(NAME(voice->effect), i+1); - save_item(NAME(voice->ecount), i+1); - save_item(NAME(voice->oneshot), i+1); - save_item(NAME(voice->active), i+1); - save_item(NAME(voice->start), i+1); - } -} - -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void flower_sound_device::device_reset() -{ - flower_sound_channel *voice; - attotime period; - - /* reset effect timer, period is unknown/guessed */ - period = attotime::from_hz(MIXER_SAMPLERATE / 256); - m_effect_timer->adjust(period, 0, period); - - /* reset all the voices */ - for (auto & elem : m_channel_list) - { - voice = &elem; - - voice->freq = 0; - voice->pos = 0; - voice->volume = 0; - voice->voltab = 0; - voice->effect = 0; - voice->ecount = 0; - voice->oneshot = 1; - voice->active = 0; - voice->start = 0; - } - - memset(m_soundregs1, 0, 0x40); - memset(m_soundregs2, 0, 0x40); -} - -/* build a table to divide by the number of voices; gain is specified as gain*16 */ -void flower_sound_device::make_mixer_table(int voices, int gain) -{ - int count = voices * 128; - - /* allocate memory */ - m_mixer_table = std::make_unique(256 * voices); - - /* find the middle of the table */ - m_mixer_lookup = m_mixer_table.get() + (128 * voices); - - /* fill in the table - 16 bit case */ - for (int i = 0; i < count; i++) - { - int val = i * gain * 16 / voices; - if (val > 32767) val = 32767; - m_mixer_lookup[ i] = val; - m_mixer_lookup[-i] =-val; - } -} - - -/* clock sound channel effect counters */ -void flower_sound_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) -{ - switch (id) - { - case TIMER_CLOCK_EFFECT: - flower_sound_channel *voice; - m_stream->update(); - - for (voice = m_channel_list; voice < m_last_channel; voice++) - voice->ecount += (voice->ecount < (1<<22)); - break; - - default: - assert_always(FALSE, "Unknown id in flower_sound_device::device_timer"); - } -} - -/********************************************************************************/ - -#if FLOWER_VERBOSE -static int r_numwrites[2][8] = {{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0}}; -void flower_sound_device::show_soundregs() -{ - int set,reg,chan; - char text[0x100]; - char message[0x1000] = {0}; - UINT8 *base = m_soundregs1; - - for (set=0;set<2;set++) - { - for (reg=0;reg<8;reg++) - { - sprintf(text,"R%d%d:",set+1,reg); - strcat(message,text); - - for (chan=0;chan<8;chan++) - { - sprintf(text," %02X",base[reg + 8*chan]); - strcat(message,text); - } - sprintf(text," - %07d\n",r_numwrites[set][reg]); - strcat(message,text); - } - strcat(message,"\n"); - base = m_soundregs2; - } - popmessage("%s",message); -} -#endif // FLOWER_VERBOSE - - -/* register functions (preliminary): -offset: cccrrr c=channel, r=register - -set 1: -R 76543210 -0 xxxxxxxx frequency (which nibble?) -1 xxxxxxxx * -2 xxxxxxxx * -3 xxxxxxxx * -4 ...x.... one-shot sample -5 ...x.... ??? same as R4? -6 ........ unused -7 xxxx.... volume - -set 2: -R 76543210 -0 ....xxxx start address -1 ....xxxx * -2 ....xxxx * -3 ....xxxx * -4 xxxx assume it's channel pitch/volume effects - xxxx start address -5 x... ??? - xxxx start address -6 ........ unused -7 ......xx volume table + start trigger - -*/ - -WRITE8_MEMBER( flower_sound_device::sound1_w ) -{ - flower_sound_channel *voice = &m_channel_list[offset >> 3 & 7]; - int c = offset & 0xf8; - UINT8 *base1 = m_soundregs1; -// UINT8 *base2 = m_soundregs2; - - m_stream->update(); - base1[offset] = data; -#if FLOWER_VERBOSE - r_numwrites[0][offset & 7]++; - show_soundregs(); -#endif - - // recompute voice parameters - voice->freq = (base1[c+2] & 0xf) << 12 | (base1[c+3] & 0xf) << 8 | (base1[c+0] & 0xf) << 4 | (base1[c+1] & 0xf); - voice->volume = base1[c+7] >> 4; -} - -WRITE8_MEMBER( flower_sound_device::sound2_w ) -{ - flower_sound_channel *voice = &m_channel_list[offset >> 3 & 7]; - int i, c = offset & 0xf8; - UINT8 *base1 = m_soundregs1; - UINT8 *base2 = m_soundregs2; - - m_stream->update(); - base2[offset] = data; -#if FLOWER_VERBOSE - r_numwrites[1][offset & 7]++; - show_soundregs(); -#endif - - // reg 7 is start trigger! - if ((offset & 7) != 7) - return; - - voice->voltab = (base2[c+7] & 3) << 4; - voice->oneshot = (~base1[c+4] & 0x10) >> 4; - voice->effect = base2[c+4] >> 4; - voice->ecount = 0; - voice->pos = 0; - voice->active = 1; - - // full start address is 6 nibbles - voice->start = 0; - for (i = 5; i >= 0; i--) - voice->start = (voice->start << 4) | (base2[c+i] & 0xf); -} - - -//------------------------------------------------- -// sound_stream_update - handle a stream update -//------------------------------------------------- - -void flower_sound_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) -{ - stream_sample_t *buffer = outputs[0]; - flower_sound_channel *voice; - short *mix; - int i; - - /* zap the contents of the mixer buffer */ - memset(m_mixer_buffer.get(), 0, samples * sizeof(short)); - - /* loop over each voice and add its contribution */ - for (voice = m_channel_list; voice < m_last_channel; voice++) - { - int f = voice->freq; - int v = voice->volume; - - if (!voice->active) - continue; - - // effects - // bit 0: volume slide down? - if (voice->effect & 1 && !voice->oneshot) - { - // note: one-shot samples are fixed volume - v -= (voice->ecount >> 4); - if (v < 0) v = 0; - } - // bit 1: used often, but hard to figure out what for - // bit 2: probably pitch slide - if (voice->effect & 4) - { - f -= (voice->ecount << 7); - if (f < 0) f = 0; - } - // bit 3: not used much, maybe pitch slide the other way? - - v |= voice->voltab; - mix = m_mixer_buffer.get(); - - for (i = 0; i < samples; i++) - { - // add sample - if (voice->oneshot) - { - UINT8 sample = m_sample_rom[(voice->start + voice->pos) >> 7 & 0x7fff]; - if (sample == 0xff) - { - voice->active = 0; - break; - } - else - *mix++ += m_volume_rom[v << 8 | sample] - 0x80; - } - else - { - UINT8 sample = m_sample_rom[(voice->start >> 7 & 0x7e00) | (voice->pos >> 7 & 0x1ff)]; - *mix++ += m_volume_rom[v << 8 | sample] - 0x80; - } - - // update counter - voice->pos += f; - } - } - - /* mix it down */ - mix = m_mixer_buffer.get(); - for (i = 0; i < samples; i++) - *buffer++ = m_mixer_lookup[*mix++]; -} diff --git a/src/mame/drivers/carjmbre.cpp b/src/mame/drivers/carjmbre.cpp index 3c387d19531..e32fc2b77de 100644 --- a/src/mame/drivers/carjmbre.cpp +++ b/src/mame/drivers/carjmbre.cpp @@ -1,5 +1,8 @@ -// license:??? -// copyright-holders:insideoutboy, Nicola Salmoria +// license:BSD-3-Clause +// copyright-holders:David Haywood + +// **** SKELETON DRIVER **** original removed due to unresolved licensing. + /*************************************************************************** Car Jamboree @@ -28,216 +31,25 @@ 8910 SW 8910 -Notes: - -- some sprite glitches from sprite number/colour changes happening on - different frames, possibly original behaviour. eg cars changing colour - just before exploding, animals displaying as the wrong sprite for one - frame when entering the arena - -- colours look wrong, maybe address bitswap? - -- background colour calculation is a guess - ***************************************************************************/ #include "emu.h" -#include "cpu/z80/z80.h" -#include "sound/ay8910.h" -#include "includes/carjmbre.h" - -/************************************* - * - * Memory maps - * - *************************************/ -WRITE8_MEMBER(carjmbre_state::nmi_mask_w) +class carjmbre_state : public driver_device { - m_nmi_mask = data & 1; -} - - -static ADDRESS_MAP_START( carjmbre_map, AS_PROGRAM, 8, carjmbre_state ) - AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0x8000, 0x87ff) AM_RAM -// AM_RANGE(0x8800, 0x8800) AM_READNOP // watchdog? - AM_RANGE(0x8803, 0x8803) AM_WRITE(nmi_mask_w) - AM_RANGE(0x8805, 0x8805) AM_WRITE(carjmbre_bgcolor_w) // guessed - AM_RANGE(0x8806, 0x8806) AM_WRITE(carjmbre_8806_w) // video related? - AM_RANGE(0x8807, 0x8807) AM_WRITE(carjmbre_flipscreen_w) -// AM_RANGE(0x8fc1, 0x8fc1) AM_WRITENOP // overrun during initial screen clear -// AM_RANGE(0x8fe1, 0x8fe1) AM_WRITENOP // overrun during initial screen clear - AM_RANGE(0x9000, 0x97ff) AM_RAM_WRITE(carjmbre_videoram_w) AM_SHARE("videoram") - AM_RANGE(0x9800, 0x985f) AM_MIRROR(0x80) AM_WRITEONLY AM_SHARE("spriteram") - AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1") - AM_RANGE(0xa800, 0xa800) AM_READ_PORT("P2") - AM_RANGE(0xb800, 0xb800) AM_READ_PORT("DSW") AM_WRITE(soundlatch_byte_w) -ADDRESS_MAP_END - -static ADDRESS_MAP_START( carjmbre_sound_map, AS_PROGRAM, 8, carjmbre_state ) - AM_RANGE(0x0000, 0x0fff) AM_MIRROR(0x1000) AM_ROM - AM_RANGE(0x2000, 0x27ff) AM_RAM -ADDRESS_MAP_END - - -static ADDRESS_MAP_START( carjmbre_sound_io_map, AS_IO, 8, carjmbre_state ) - ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) - AM_RANGE(0x10, 0x10) AM_WRITENOP //?? written on init/0xff sound command reset - AM_RANGE(0x20, 0x21) AM_DEVWRITE("ay1", ay8910_device, address_data_w) - AM_RANGE(0x22, 0x22) AM_WRITENOP //?? written before and after 0x21 with same value - AM_RANGE(0x24, 0x24) AM_READNOP //?? - AM_RANGE(0x30, 0x31) AM_DEVWRITE("ay2", ay8910_device, address_data_w) - AM_RANGE(0x32, 0x32) AM_WRITENOP //?? written before and after 0x31 with same value -ADDRESS_MAP_END +public: + carjmbre_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + {} +}; -/************************************* - * - * Input ports - * - *************************************/ static INPUT_PORTS_START( carjmbre ) - PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) //coin error if held high for 1s - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) //or if many coins inserted quickly - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY - - PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL - - PORT_START("DSW") - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2") - PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x18, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:4,5") - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x08, "4" ) - PORT_DIPSETTING( 0x10, "5" ) - PORT_DIPSETTING( 0x18, "Free") // 250 (cheat) - PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:6") - PORT_DIPSETTING( 0x00, "10k, then every 100k" ) - PORT_DIPSETTING( 0x20, "20k, then every 100k" ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW1:7") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) INPUT_PORTS_END -/************************************* - * - * Graphics definitions - * - *************************************/ - -static const gfx_layout carjmbre_charlayout = -{ - 8,8, - RGN_FRAC(2,4), - 2, - { RGN_FRAC(0,4), RGN_FRAC(2,4) }, - { STEP8(0,1) }, - { STEP8(0,8) }, - 8*8 -}; - -static const gfx_layout carjmbre_spritelayout = -{ - 16,16, - RGN_FRAC(1,4), - 2, - { RGN_FRAC(2,4), RGN_FRAC(0,4) }, - { STEP8(0,1), STEP8(256*16*8,1) }, - { STEP16(0,8) }, - 16*8 -}; - -static GFXDECODE_START( carjmbre ) - GFXDECODE_ENTRY( "gfx1", 0, carjmbre_charlayout, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0, carjmbre_spritelayout, 0, 16 ) -GFXDECODE_END - - -/************************************* - * - * Machine driver - * - *************************************/ - -void carjmbre_state::machine_reset() -{ - m_flipscreen = 0; - m_bgcolor = 0; -} - -INTERRUPT_GEN_MEMBER(carjmbre_state::vblank_irq) -{ - if(m_nmi_mask) - device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); -} - static MACHINE_CONFIG_START( carjmbre, carjmbre_state ) - - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) - MCFG_CPU_PROGRAM_MAP(carjmbre_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", carjmbre_state, vblank_irq) - - - MCFG_CPU_ADD("audiocpu", Z80, XTAL_18_432MHz/6/2) - MCFG_CPU_PROGRAM_MAP(carjmbre_sound_map) - MCFG_CPU_IO_MAP(carjmbre_sound_io_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", carjmbre_state, irq0_line_hold) - - /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ - MCFG_SCREEN_SIZE(32*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_DRIVER(carjmbre_state, screen_update_carjmbre) - MCFG_SCREEN_PALETTE("palette") - - MCFG_GFXDECODE_ADD("gfxdecode", "palette", carjmbre) - MCFG_PALETTE_ADD("palette", 64) - MCFG_PALETTE_INIT_OWNER(carjmbre_state, carjmbre) - - /* sound hardware */ - MCFG_SPEAKER_STANDARD_MONO("mono") - - MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/6/2) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.12) - - MCFG_SOUND_ADD("ay2", AY8910, XTAL_18_432MHz/6/2) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.12) MACHINE_CONFIG_END -/************************************* - * - * ROM definition - * - *************************************/ - ROM_START( carjmbre ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "c1", 0x0000, 0x1000, CRC(62b21739) SHA1(710e5c52f27603aa8f864f6f28d7272f21271d60) ) @@ -267,10 +79,4 @@ ROM_START( carjmbre ) ROM_LOAD( "c.d18", 0x0020, 0x0020, CRC(7b9ed1b0) SHA1(ec5e1f56e5a2fc726083866c08ac0e1de0ed6ace) ) ROM_END -/************************************* - * - * Game driver - * - *************************************/ - -GAME( 1983, carjmbre, 0, carjmbre, carjmbre, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Car Jamboree", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) +GAME( 1983, carjmbre, 0, carjmbre, carjmbre, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Car Jamboree", MACHINE_IS_SKELETON ) diff --git a/src/mame/drivers/flower.cpp b/src/mame/drivers/flower.cpp index 06891e9c4a2..26197104508 100644 --- a/src/mame/drivers/flower.cpp +++ b/src/mame/drivers/flower.cpp @@ -1,12 +1,13 @@ -// license:??? -// copyright-holders:insideoutboy, David Haywood, Stephh +// license:BSD-3-Clause +// copyright-holders:David Haywood + +// **** SKELETON DRIVER **** original removed due to unresolved licensing. + /* Flower (c)1986 Komax (USA license) (c)1986 Sega/Alpha (Sega game number 834-5998) - - Driver by InsideOutBoy, further improvements by MAME team - There is a PCB picture that shows two stickers, the first says "Flower (c) 1986 Clarue" while the second one is an original serial number tag also showing "Clarue". GFX ROM contents also @@ -74,215 +75,22 @@ CHIP # POSITION TYPE #include "emu.h" #include "cpu/z80/z80.h" -#include "includes/flower.h" - - -WRITE8_MEMBER(flower_state::flower_maincpu_irq_ack) -{ - m_maincpu->set_input_line(0, CLEAR_LINE); -} -WRITE8_MEMBER(flower_state::flower_subcpu_irq_ack) +class flower_state : public driver_device { - m_subcpu->set_input_line(0, CLEAR_LINE); -} +public: + flower_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + { } +}; -WRITE8_MEMBER(flower_state::flower_soundcpu_irq_ack) -{ - m_audiocpu->set_input_line(0, CLEAR_LINE); -} -WRITE8_MEMBER(flower_state::flower_coin_counter_w) -{ - machine().bookkeeping().coin_counter_w(0, data & 1); -} - -WRITE8_MEMBER(flower_state::flower_coin_lockout_w) -{ - machine().bookkeeping().coin_lockout_global_w(~data & 1); -} -WRITE8_MEMBER(flower_state::sound_command_w) -{ - soundlatch_byte_w(space, 0, data); - - if (*m_sn_nmi_enable & 1) - m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); -} - -static ADDRESS_MAP_START( flower_cpu1_2, AS_PROGRAM, 8, flower_state ) - AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0xa000, 0xa000) AM_WRITE(flower_coin_lockout_w) - AM_RANGE(0xa001, 0xa001) AM_WRITE(flower_flipscreen_w) - AM_RANGE(0xa002, 0xa002) AM_WRITE(flower_maincpu_irq_ack) - AM_RANGE(0xa003, 0xa003) AM_WRITE(flower_subcpu_irq_ack) - AM_RANGE(0xa004, 0xa004) AM_WRITE(flower_coin_counter_w) - AM_RANGE(0xa005, 0xa005) AM_WRITENOP // subcpu nmi (unused) - AM_RANGE(0xa100, 0xa100) AM_READ_PORT("IN0CPU1") - AM_RANGE(0xa101, 0xa101) AM_READ_PORT("IN1CPU1") - AM_RANGE(0xa102, 0xa102) AM_READ_PORT("IN0CPU0") - AM_RANGE(0xa103, 0xa103) AM_READ_PORT("IN1CPU0") - AM_RANGE(0xa400, 0xa400) AM_WRITE(sound_command_w) - AM_RANGE(0xc000, 0xddff) AM_RAM AM_SHARE("mainram1") - AM_RANGE(0xde00, 0xdfff) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(flower_textram_w) AM_SHARE("textram") - AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("mainram2") // only cleared? - AM_RANGE(0xf000, 0xf1ff) AM_RAM_WRITE(flower_bg0ram_w) AM_SHARE("bg0ram") - AM_RANGE(0xf200, 0xf200) AM_RAM AM_SHARE("bg0_scroll") - AM_RANGE(0xf800, 0xf9ff) AM_RAM_WRITE(flower_bg1ram_w) AM_SHARE("bg1ram") - AM_RANGE(0xfa00, 0xfa00) AM_RAM AM_SHARE("bg1_scroll") -ADDRESS_MAP_END - -static ADDRESS_MAP_START( flower_sound_cpu, AS_PROGRAM, 8, flower_state ) - AM_RANGE(0x0000, 0x3fff) AM_ROM - AM_RANGE(0x4000, 0x4000) AM_WRITE(flower_soundcpu_irq_ack) - AM_RANGE(0x4001, 0x4001) AM_WRITEONLY AM_SHARE("sn_nmi_enable") - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) - AM_RANGE(0x8000, 0x803f) AM_DEVWRITE("flower", flower_sound_device, sound1_w) - AM_RANGE(0xa000, 0xa03f) AM_DEVWRITE("flower", flower_sound_device, sound2_w) - AM_RANGE(0xc000, 0xc7ff) AM_RAM -ADDRESS_MAP_END - - -INPUT_CHANGED_MEMBER(flower_state::coin_inserted) -{ - m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE); -} static INPUT_PORTS_START( flower ) - PORT_START("IN0CPU0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, flower_state,coin_inserted, 0) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) - PORT_DIPNAME( 0x08, 0x08, "Energy Decrease" ) PORT_DIPLOCATION("SW2:4") - PORT_DIPSETTING( 0x08, "Slow" ) - PORT_DIPSETTING( 0x00, "Fast" ) - PORT_DIPNAME( 0x10, 0x10, "Invulnerability (Cheat)") PORT_DIPLOCATION("SW2:5") - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, "Keep Weapons When Destroyed" ) PORT_DIPLOCATION("SW2:6") // check code at 0x74a2 - PORT_DIPSETTING( 0x20, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:7") // "Enemy Bullets" - PORT_DIPSETTING( 0x40, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) - PORT_DIPNAME( 0x80, 0x80, "Shot Range" ) PORT_DIPLOCATION("SW2:8") // check code at 0x75f9 - PORT_DIPSETTING( 0x80, "Short" ) - PORT_DIPSETTING( 0x00, "Long" ) - - PORT_START("IN1CPU0") - PORT_DIPNAME( 0x07, 0x05, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2,3") - PORT_DIPSETTING( 0x07, "1" ) - PORT_DIPSETTING( 0x06, "2" ) - PORT_DIPSETTING( 0x05, "3" ) - PORT_DIPSETTING( 0x04, "4" ) - PORT_DIPSETTING( 0x03, "5" ) - PORT_DIPSETTING( 0x02, "6" ) - PORT_DIPSETTING( 0x01, "7" ) - PORT_DIPSETTING( 0x00, "Infinite (Cheat)") - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:4,5") - PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) - PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:6") // check code at 0x759f - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:7") - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x80, "30k, then every 50k" ) - PORT_DIPSETTING( 0x00, "50k, then every 80k" ) - - PORT_START("IN0CPU1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Laser") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Missile") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Cutter") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("IN1CPU1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Laser") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Missile") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL PORT_NAME("P2 Cutter") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END -static const gfx_layout flower_charlayout = -{ - 8,8, - RGN_FRAC(1,1), - 2, - { 0, 4 }, - { STEP4(0,1), STEP4(8,1) }, - { STEP8(0,16) }, - 8*8*2 -}; - -static const gfx_layout flower_tilelayout = -{ - 16,16, - RGN_FRAC(1,2), - 4, - { 0, 4, RGN_FRAC(1,2), RGN_FRAC(1,2)+4 }, - { STEP4(0,1), STEP4(8,1), STEP4(8*8*2,1), STEP4(8*8*2+8,1) }, - { STEP8(0,16), STEP8(8*8*4,16) }, - 16*16*2 -}; - -static GFXDECODE_START( flower ) - GFXDECODE_ENTRY( "gfx1", 0, flower_charlayout, 0, 64 ) - GFXDECODE_ENTRY( "gfx2", 0, flower_tilelayout, 0, 16 ) - GFXDECODE_ENTRY( "gfx3", 0, flower_tilelayout, 0, 16 ) -GFXDECODE_END - - static MACHINE_CONFIG_START( flower, flower_state ) - - /* basic machine hardware */ - // clock divider (of all cpus) is unknown. /6 (3.072 MHz) is too slow - // cpus are Z80 "A" type, official maximum speed of 4 MHz, but 4.6 MHz has been proven to work in practice - MCFG_CPU_ADD("maincpu", Z80,XTAL_18_432MHz/4) - MCFG_CPU_PROGRAM_MAP(flower_cpu1_2) - MCFG_CPU_VBLANK_INT_DRIVER("screen", flower_state, irq0_line_hold) - - MCFG_CPU_ADD("subcpu", Z80,XTAL_18_432MHz/4) - MCFG_CPU_PROGRAM_MAP(flower_cpu1_2) - MCFG_CPU_PERIODIC_INT_DRIVER(flower_state, irq0_line_hold, 120) // controls game speed? irqsource and frequency unknown - - MCFG_CPU_ADD("audiocpu", Z80,XTAL_18_432MHz/4) - MCFG_CPU_PROGRAM_MAP(flower_sound_cpu) - MCFG_CPU_PERIODIC_INT_DRIVER(flower_state, irq0_line_hold, 90) // controls music speed. irqsource and frequency unknown, same as subcpu perhaps? - - // tight sync, slowdowns otherwise -// MCFG_QUANTUM_PERFECT_CPU("maincpu") - MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - - /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) // ? - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(34*8, 33*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 34*8-1, 0*8, 28*8-1) - MCFG_SCREEN_UPDATE_DRIVER(flower_state, screen_update_flower) - MCFG_SCREEN_PALETTE("palette") - - MCFG_GFXDECODE_ADD("gfxdecode", "palette", flower) - MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", 256) - - /* sound hardware */ - MCFG_SPEAKER_STANDARD_MONO("mono") - - MCFG_SOUND_ADD("flower", FLOWER, 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END @@ -373,5 +181,5 @@ ROM_START( flowerj ) /* Sega/Alpha version. Sega game number 834-5998 */ ROM_END -GAME( 1986, flower, 0, flower, flower, driver_device, 0, ROT0, "Clarue (Komax license)", "Flower (US)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1986, flowerj, flower, flower, flower, driver_device, 0, ROT0, "Clarue (Sega / Alpha Denshi Co. license)", "Flower (Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE) +GAME( 1986, flower, 0, flower, flower, driver_device, 0, ROT0, "Clarue (Komax license)", "Flower (US)", MACHINE_IS_SKELETON ) +GAME( 1986, flowerj, flower, flower, flower, driver_device, 0, ROT0, "Clarue (Sega / Alpha Denshi Co. license)", "Flower (Japan)", MACHINE_IS_SKELETON ) diff --git a/src/mame/drivers/marinedt.cpp b/src/mame/drivers/marinedt.cpp index 0f8e24b6199..73139b4b655 100644 --- a/src/mame/drivers/marinedt.cpp +++ b/src/mame/drivers/marinedt.cpp @@ -1,22 +1,9 @@ -// license:??? -// copyright-holders:insideoutboy -/* ---------------------------- -Marine Date by TAITO (1981) -MAME driver by insideoutboy ---------------------------- -a static underwater scene with obstacles in it, like seaweed, -crabs and other stuff. You have a limited number of "strokes" -per screen as well as a timer to work against. Your goal is -to *bounce* yourself around the screen using *Strokes* on the -trackball to try to reach a *female* octopus before you run out -of strokes or time. You sort of bounce yourself around the screen -like a billiard ball would bounce, but once in a while bubbles -and other stuff will come up from underneath you and carry you -away from where you are trying to get. When you reach your goal -you get another more difficult screen, etc. +// license:BSD-3-Clause +// copyright-holders:David Haywood -------------------------------------------------------------------------- +// **** SKELETON DRIVER **** original removed due to unresolved licensing. + +/* Marine Date Taito 1981 @@ -108,657 +95,26 @@ Notes: Top and Middle PCBs are plugged in with the solder-sides together. Lower PCB is plugged in with components facing up. ------------------------------------------------------------------------- - -todo: -in cocktail mopde p1 is flipped -after inking the shark on the far right octi was moved to goal? -for the colours, goal has to be black otherwise it would register - as a hit, is goal pen 0 or 6? -rom writes when finishing a game - worth looking at before the collision is correct? -playing dot hit when eaten by a shark? -dont use any ints, s/b UINT8? -enemy sprite not disabled at end of game -tilemap -palette may only be around 4 colours - is 14 the palette? -how do you know if you've got any ink left? -prom 14 is the top bits? 4 bpp? or so? -why is level 37 chosen? -should it be 30fps? - check other taito games of the time -look at other taito 1981 games for ideas on the ports - bking - jhunt? -"Marine Deto" or "Marine Date" - look in the roms for all the text -simplify gfx decode -why does the player sprite need 4 colours? - check if more than 1 are used -check service test ram wipes for confirmation of ram spots - anything after trackball test? -obj1 to obj2 draw order -2nd trackball -flip/cocktail issues - -done: -timer? - you get 200 for each shot, don't think it's actually a timer -have I been using x/y consistently, i.e. non rotated or rotated origin? - yes, seems to be best using xy raw (i.e. non-rotated) -p2 ink doesn't always light up in test mode - after p1 ink pressed, p2 ink doesn't light up - this is correct behavior if DSW set as Upright mode */ #include "emu.h" -#include "cpu/z80/z80.h" class marinedt_state : public driver_device { public: marinedt_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_tx_tileram(*this, "tx_tileram"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - /* memory pointers */ - required_shared_ptr m_tx_tileram; - - /* video-related */ - std::unique_ptr m_tile; - std::unique_ptr m_obj1; - std::unique_ptr m_obj2; - tilemap_t *m_tx_tilemap; - - UINT8 m_obj1_a; - UINT8 m_obj1_x; - UINT8 m_obj1_y; - UINT8 m_obj2_a; - UINT8 m_obj2_x; - UINT8 m_obj2_y; - UINT8 m_pd; - UINT8 m_pf; - UINT8 m_music; - UINT8 m_sound; - UINT8 m_coll; - UINT8 m_cx; - UINT8 m_cyr; - UINT8 m_cyq; - UINT8 m_collh; - UINT8 m_cxh; - UINT8 m_cyrh; - UINT8 m_cyqh; - DECLARE_WRITE8_MEMBER(tx_tileram_w); - DECLARE_READ8_MEMBER(marinedt_port1_r); - DECLARE_READ8_MEMBER(marinedt_coll_r); - DECLARE_READ8_MEMBER(marinedt_obj1_x_r); - DECLARE_READ8_MEMBER(marinedt_obj1_yr_r); - DECLARE_READ8_MEMBER(marinedt_obj1_yq_r); - DECLARE_WRITE8_MEMBER(marinedt_obj1_a_w); - DECLARE_WRITE8_MEMBER(marinedt_obj1_x_w); - DECLARE_WRITE8_MEMBER(marinedt_obj1_y_w); - DECLARE_WRITE8_MEMBER(marinedt_obj2_a_w); - DECLARE_WRITE8_MEMBER(marinedt_obj2_x_w); - DECLARE_WRITE8_MEMBER(marinedt_obj2_y_w); - DECLARE_WRITE8_MEMBER(marinedt_music_w); - DECLARE_WRITE8_MEMBER(marinedt_sound_w); - DECLARE_WRITE8_MEMBER(marinedt_pd_w); - DECLARE_WRITE8_MEMBER(marinedt_pf_w); - TILE_GET_INFO_MEMBER(get_tile_info); - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; - DECLARE_PALETTE_INIT(marinedt); - UINT32 screen_update_marinedt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; + : driver_device(mconfig, type, tag) + { } }; -WRITE8_MEMBER(marinedt_state::tx_tileram_w) -{ - m_tx_tileram[offset] = data; - m_tx_tilemap->mark_tile_dirty(offset); -} - -READ8_MEMBER(marinedt_state::marinedt_port1_r) -{ - //might need to be reversed for cocktail stuff - - /* x/y multiplexed */ - return ioport(((m_pf & 0x08) >> 3) ? "TRACKY" : "TRACKX")->read(); -} - -READ8_MEMBER(marinedt_state::marinedt_coll_r) -{ - //76543210 - //x------- obj1 to obj2 collision - //-xxx---- unused - //----x--- obj1 to playfield collision - //-----xxx unused - - return m_coll | m_collh; -} - -//are these returning only during a collision? -//I'd imagine they are returning the pf char where the collision took place? -//what about where there is lots of collisions? -//maybe the first on a scanline basis -READ8_MEMBER(marinedt_state::marinedt_obj1_x_r) -{ - //76543210 - //xxxx---- unknown - //----xxxx x pos in tile ram - - UINT8 *RAM = memregion("maincpu")->base(); - - if (RAM[0x430e]) - --m_cx; - else - ++m_cx; - - //figure out why inc/dec based on 430e? - return m_cx | (m_cxh << 4); -} - -READ8_MEMBER(marinedt_state::marinedt_obj1_yr_r) -{ - //76543210 - //xxxx---- unknown - //----xxxx row in current screen quarter - - - //has to be +1 if cx went over? - if (m_cx == 0x10) - m_cyr++; - - return m_cyr | (m_cyrh << 4); -} - -READ8_MEMBER(marinedt_state::marinedt_obj1_yq_r) -{ - //76543210 - //xx------ unknown - //--xx---- screen quarter when flipped? - //----xx-- unknown - //------xx screen quarter - - return m_cyq | (m_cyqh << 4); -} - -WRITE8_MEMBER(marinedt_state::marinedt_obj1_a_w){ m_obj1_a = data; } -WRITE8_MEMBER(marinedt_state::marinedt_obj1_x_w){ m_obj1_x = data; } -WRITE8_MEMBER(marinedt_state::marinedt_obj1_y_w){ m_obj1_y = data; } -WRITE8_MEMBER(marinedt_state::marinedt_obj2_a_w){ m_obj2_a = data; } -WRITE8_MEMBER(marinedt_state::marinedt_obj2_x_w){ m_obj2_x = data; } -WRITE8_MEMBER(marinedt_state::marinedt_obj2_y_w){ m_obj2_y = data; } - -WRITE8_MEMBER(marinedt_state::marinedt_music_w){ m_music = data; } - -WRITE8_MEMBER(marinedt_state::marinedt_sound_w) -{ - //76543210 - //xx------ ?? - //--x----- jet sound - //---x---- foam - //----x--- ink - //-----x-- collision - //------x- dots hit - //-------x ?? - - m_sound = data; -} - -WRITE8_MEMBER(marinedt_state::marinedt_pd_w) -{ - //76543210 - //xxx----- ?? unused - //---x---- ?? the rest should be used based on the table - //----x--- ?? - //-----x-- ?? - //------x- obj2 enable - //-------x obj1 enable - - m_pd = data; -} - -/* -upright -marinedt_pf_w: 00 // upright -marinedt_pf_w: 01 // ?? - -cocktail -marinedt_pf_w: 02 // cocktail -marinedt_pf_w: 03 // ?? - -marinedt_pf_w: 01 // upright -marinedt_pf_w: 05 // flip sprite? - -marinedt_pf_w: 07 // cocktail -marinedt_pf_w: 03 // non-flip sprite? -*/ -WRITE8_MEMBER(marinedt_state::marinedt_pf_w) -{ - //76543210 - //xxxx---- ?? unused (will need to understand table of written values) - //----x--- xy trackball select - //-----x-- ?? flip screen/controls - //------x- ?? upright/cocktail - //-------x ?? service mode (coin lockout??) - - - //if ((m_pf & 0x07) != (data & 0x07)) - // osd_printf_debug("marinedt_pf_w: %02x\n", data & 0x07); - - if ((m_pf & 0x02) != (data & 0x02)) - { - if (data & 0x02) - osd_printf_debug("tile flip\n"); - else - osd_printf_debug("tile non-flip\n"); - - if (data & 0x02) - m_tx_tilemap->set_flip(TILEMAP_FLIPX | TILEMAP_FLIPY); - else - m_tx_tilemap->set_flip(0); - } - - m_pf = data; - - //if (data & 0xf0) - // logerror("pf:%02x %d\n", m_pf); - //logerror("pd:%02x %d\n", m_pd, m_screen->frame_number()); - -} - -static ADDRESS_MAP_START( marinedt_map, AS_PROGRAM, 8, marinedt_state ) - AM_RANGE(0x0000, 0x37ff) AM_ROM - AM_RANGE(0x4000, 0x43ff) AM_RAM - AM_RANGE(0x4400, 0x47ff) AM_RAM //unused, vram mirror? - AM_RANGE(0x4800, 0x4bff) AM_RAM_WRITE(tx_tileram_w) AM_SHARE("tx_tileram") - AM_RANGE(0x4c00, 0x4c00) AM_WRITENOP //?? maybe off by one error -ADDRESS_MAP_END - -static ADDRESS_MAP_START( marinedt_io_map, AS_IO, 8, marinedt_state ) - ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW0") //dips coinage - AM_RANGE(0x01, 0x01) AM_READ(marinedt_port1_r) //trackball xy muxed - AM_RANGE(0x02, 0x02) AM_READWRITE(marinedt_obj1_x_r, marinedt_obj1_a_w) - AM_RANGE(0x03, 0x03) AM_READ_PORT("IN0") AM_WRITE(marinedt_obj1_x_w) - AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW1") AM_WRITE(marinedt_obj1_y_w) - AM_RANGE(0x05, 0x05) AM_WRITE(marinedt_music_w) - AM_RANGE(0x06, 0x06) AM_READWRITE(marinedt_obj1_yr_r, marinedt_sound_w) - AM_RANGE(0x08, 0x08) AM_WRITE(marinedt_obj2_a_w) - AM_RANGE(0x09, 0x09) AM_WRITE(marinedt_obj2_x_w) - AM_RANGE(0x0a, 0x0a) AM_READWRITE(marinedt_obj1_yq_r, marinedt_obj2_y_w) - AM_RANGE(0x0d, 0x0d) AM_WRITE(marinedt_pd_w) - AM_RANGE(0x0e, 0x0e) AM_READWRITE(marinedt_coll_r, watchdog_reset_w) - AM_RANGE(0x0f, 0x0f) AM_WRITE(marinedt_pf_w) -ADDRESS_MAP_END - - static INPUT_PORTS_START( marinedt ) - PORT_START("DSW0") - PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 9C_1C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 8C_1C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 7C_1C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 6C_1C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 5C_1C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 1C_8C ) ) - PORT_DIPNAME( 0xf0, 0x00, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 9C_1C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 8C_1C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 7C_1C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 6C_1C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 1C_8C ) ) - - PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_TILT ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 ) - - PORT_START("DSW1") - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x01, "5000" ) - PORT_DIPSETTING( 0x00, "10000" ) -//cheat? - PORT_DIPNAME( 0x02, 0x00, "ignore internal bounce?" ) //maybe die / bounce off rocks & coral? - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) -//freezes the game before the reset -//doesn't seem to be done as a dip, but what about mixing with dips like this? - PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x10, 0x00, "Coin Chutes" ) - PORT_DIPSETTING( 0x00, "Common" ) - PORT_DIPSETTING( 0x10, "Individual" ) - PORT_DIPNAME( 0x20, 0x00, "Year Display" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x40, "4" ) - PORT_DIPSETTING( 0x80, "5" ) - PORT_DIPSETTING( 0xc0, "6" ) - - PORT_START("TRACKX") /* FAKE MUXED */ -//check all bits are used - PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_REVERSE - - PORT_START("TRACKY") /* FAKE MUXED */ - PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) INPUT_PORTS_END -static const gfx_layout marinedt_charlayout = -{ - 8,8, - RGN_FRAC(1,3), - 3, - { RGN_FRAC(2,3), RGN_FRAC(1,3), RGN_FRAC(0,3) }, //maybe 120 - { STEP8(0,1) }, - { STEP8(0,8) }, - 8*8 -}; - -static const gfx_layout marinedt_objlayout = -{ - 32,32, - RGN_FRAC(1,1), - 2, - { 0, 4 }, - { STEP4(32*8*7,1), STEP4(32*8*6,1), STEP4(32*8*5,1), STEP4(32*8*4,1), STEP4(32*8*3,1), STEP4(32*8*2,1), STEP4(32*8*1,1), STEP4(32*8*0,1) }, - { STEP16(0,8), STEP16(16*8,8) }, - 32*32*2 -}; - -static GFXDECODE_START( marinedt ) - GFXDECODE_ENTRY( "gfx1", 0, marinedt_charlayout, 0, 4 ) //really only 1 colour set? - GFXDECODE_ENTRY( "gfx2", 0, marinedt_objlayout, 48, 4 ) - GFXDECODE_ENTRY( "gfx3", 0, marinedt_objlayout, 32, 4 ) -GFXDECODE_END - -PALETTE_INIT_MEMBER(marinedt_state, marinedt) -{ - const UINT8 *color_prom = memregion("proms")->base(); - int i,r,b,g; - - for (i = 0; i < palette.entries(); i++) - { - int bit0, bit1, bit2; - - /* red component */ - bit0 = (~color_prom[i] >> 0) & 0x01; - bit1 = (~color_prom[i] >> 1) & 0x01; - bit2 = (~color_prom[i] >> 2) & 0x01; -// *(palette++) = 0x92 * bit0 + 0x46 * bit1 + 0x27 * bit2; - r = 0x27 * bit0 + 0x46 * bit1 + 0x92 * bit2; - /* green component */ - bit0 = (~color_prom[i] >> 3) & 0x01; - bit1 = (~color_prom[i] >> 4) & 0x01; - bit2 = (~color_prom[i] >> 5) & 0x01; -// *(palette++) = 0x92 * bit0 + 0x46 * bit1 + 0x27 * bit2; - g = 0x27 * bit0 + 0x46 * bit1 + 0x92 * bit2; - /* blue component */ - bit0 = (~color_prom[i] >> 5) & 0x01; - bit1 = (~color_prom[i] >> 6) & 0x01; - bit2 = (~color_prom[i] >> 7) & 0x01; -bit0 = 0; -// *(palette++) = 0x92 * bit0 + 0x46 * bit1 + 0x27 * bit2; - b = 0x27 * bit0 + 0x46 * bit1 + 0x92 * bit2; - - palette.set_pen_color(i, rgb_t(r, g, b)); - } -} - - -TILE_GET_INFO_MEMBER(marinedt_state::get_tile_info) -{ - int code = m_tx_tileram[tile_index]; - int color = 0; - int flags = TILE_FLIPX; - - SET_TILE_INFO_MEMBER(0, code, color, flags); -} - -void marinedt_state::video_start() -{ - m_tx_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(marinedt_state::get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); - - m_tx_tilemap->set_transparent_pen(0); - m_tx_tilemap->set_scrolldx(0, 4*8); - m_tx_tilemap->set_scrolldy(0, -4*8); - - m_tile = std::make_unique(32 * 8, 32 * 8); - m_obj1 = std::make_unique(32, 32); - m_obj2 = std::make_unique(32, 32); -} - - -// x------- flipy -// -x------ unused ?? -// --xxx--- sprite code -// -----x-- bank -// ------xx colour - -#define OBJ_CODE(a) ((((a) & 0x04) << 1) + (((a) & 0x38) >> 3)) -#define OBJ_COLOR(a) ((a) & 0x03) -#define OBJ_X(x) (256 - 32 - (x)) -#define OBJ_Y(y) (256 - 1 - (y)) -#define OBJ_FLIPX(a) ((m_pf & 0x02) == 0) -#define OBJ_FLIPY(a) ((a) & 0x80) - -UINT32 marinedt_state::screen_update_marinedt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - int sx, sy; - - m_tile->fill(0); - m_tx_tilemap->draw(screen, *m_tile, cliprect, 0, 0); - - m_obj1->fill(0); - m_gfxdecode->gfx(1)->transpen(*m_obj1,m_obj1->cliprect(), - OBJ_CODE(m_obj1_a), - OBJ_COLOR(m_obj1_a), - OBJ_FLIPX(m_obj1_a), OBJ_FLIPY(m_obj1_a), - 0, 0, 0); - - m_obj2->fill(0); - m_gfxdecode->gfx(2)->transpen(*m_obj2,m_obj2->cliprect(), - OBJ_CODE(m_obj2_a), - OBJ_COLOR(m_obj2_a), - OBJ_FLIPX(m_obj2_a), OBJ_FLIPY(m_obj2_a), - 0, 0, 0); - - bitmap.fill(0); - - if (m_pd & 0x02) - copybitmap_trans(bitmap, *m_obj2, 0, 0, OBJ_X(m_obj2_x), OBJ_Y(m_obj2_y), cliprect, 0); - - if (m_pd & 0x01) - copybitmap_trans(bitmap, *m_obj1, 0, 0, OBJ_X(m_obj1_x), OBJ_Y(m_obj1_y), cliprect, 0); - - copybitmap_trans(bitmap, *m_tile, 0, 0, 0, 0, cliprect, 0); - - m_coll = m_cx = m_cyr = m_cyq = 0; - if (m_pd & 0x01) - { - for (sx = 0; sx < 32; sx++) - for (sy = 0; sy < 32; sy++) - { - int x = OBJ_X(m_obj1_x) + sx; - int y = OBJ_Y(m_obj1_y) + sy; - - if (!cliprect.contains(x, y)) - continue; - - if (m_obj1->pix16(sy, sx) == 0) - continue; - - if (m_tile->pix16(y, x) != 0) - { - m_coll = 0x08; - - m_cx = (x % 128) / 8; - m_cx &= 0x0f; - - m_cyr = ((y % 64) / 8) * 2 + (x > 127 ? 1 : 0); - m_cyr &= 0x0f; - - m_cyq = y / 64; - m_cyq &= 0x0f; - - break; - } - } - } - - m_collh = m_cxh = m_cyrh = m_cyqh = 0; - if ((m_pd & 0x03) == 0x03) - { - for (sx = 0; sx < 32; sx++) - for (sy = 0; sy < 32; sy++) - { - int x = OBJ_X(m_obj1_x + sx); - int y = OBJ_Y(m_obj1_y + sy); - - int xx = OBJ_X(m_obj2_x) - x; - int yy = OBJ_Y(m_obj2_y) - y; - - if (xx < 0 || xx >= 32 || yy < 0 || yy >= 32) - continue; - - if (m_obj1->pix16(sy, sx) == 0) - continue; - - if (m_obj2->pix16(yy, xx) != 0) - { - m_collh = 0x80; - - m_cxh = (x % 128) / 8; - m_cxh &= 0x0f; - - m_cyrh = ((y % 64) / 8) * 2 + (x > 127 ? 1 : 0); - m_cyrh &= 0x0f; - - m_cyqh= y / 64; - m_cyqh &= 0x0f; - - break; - } - } - } - return 0; -} - -void marinedt_state::machine_start() -{ - save_item(NAME(m_obj1_a)); - save_item(NAME(m_obj1_x)); - save_item(NAME(m_obj1_y)); - save_item(NAME(m_obj2_a)); - save_item(NAME(m_obj2_x)); - save_item(NAME(m_obj2_y)); - save_item(NAME(m_pd)); - save_item(NAME(m_pf)); - save_item(NAME(m_music)); - save_item(NAME(m_sound)); - save_item(NAME(m_coll)); - save_item(NAME(m_cx)); - save_item(NAME(m_cyr)); - save_item(NAME(m_cyq)); - save_item(NAME(m_collh)); - save_item(NAME(m_cxh)); - save_item(NAME(m_cyrh)); - save_item(NAME(m_cyqh)); -} - -void marinedt_state::machine_reset() -{ - m_obj1_a = 0; - m_obj1_x = 0; - m_obj1_y = 0; - m_obj2_a = 0; - m_obj2_x = 0; - m_obj2_y = 0; - m_pd = 0; - m_pf = 0; - m_music = 0; - m_sound = 0; - m_coll = 0; - m_cx = 0; - m_cyr = 0; - m_cyq = 0; - m_collh = 0; - m_cxh = 0; - m_cyrh = 0; - m_cyqh = 0; -} static MACHINE_CONFIG_START( marinedt, marinedt_state ) - - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", Z80,10000000/4) - MCFG_CPU_PROGRAM_MAP(marinedt_map) - MCFG_CPU_IO_MAP(marinedt_io_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", marinedt_state, irq0_line_hold) - - - /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(4*8+32*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 32*8-1) - MCFG_SCREEN_UPDATE_DRIVER(marinedt_state, screen_update_marinedt) - MCFG_SCREEN_PALETTE("palette") - - MCFG_GFXDECODE_ADD("gfxdecode", "palette", marinedt) - MCFG_PALETTE_ADD("palette", 64) - MCFG_PALETTE_INIT_OWNER(marinedt_state, marinedt) - - /* sound hardware */ - //discrete sound MACHINE_CONFIG_END - -/*************************************************************************** - - Game driver(s) - -***************************************************************************/ - ROM_START( marinedt ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "mg01.3d", 0x0000, 0x0800, CRC(ad09f04d) SHA1(932fc973b4a2fbbebd7e6437ed30c8444e3d4afb)) @@ -781,10 +137,10 @@ ROM_START( marinedt ) ROM_LOAD( "mg13.6h", 0x0000, 0x1000, CRC(17817044) SHA1(8c9b96620e3c414952e6d85c6e81b0df85c88e7a) ) ROM_REGION( 0x0080, "proms", 0 ) - ROM_LOAD( "mg14.2a", 0x0000, 0x0020, CRC(f75f4e3a) SHA1(36e665987f475c57435fa8c224a2a3ce0c5e672b) ) //char clr - ROM_LOAD( "mg15.1a", 0x0020, 0x0020, CRC(cd3ab489) SHA1(a77478fb94d0cf8f4317f89cc9579def7c294b4f) ) //obj clr - ROM_LOAD( "mg16.4e", 0x0040, 0x0020, CRC(92c868bc) SHA1(483ae6f47845ddacb701528e82bd388d7d66a0fb) ) //?? collisions - ROM_LOAD( "mg17.bpr", 0x0060, 0x0020, CRC(13261a02) SHA1(050edd18e4f79d19d5206f55f329340432fd4099) ) //?? table of increasing values + ROM_LOAD( "mg14.2a", 0x0000, 0x0020, CRC(f75f4e3a) SHA1(36e665987f475c57435fa8c224a2a3ce0c5e672b) ) + ROM_LOAD( "mg15.1a", 0x0020, 0x0020, CRC(cd3ab489) SHA1(a77478fb94d0cf8f4317f89cc9579def7c294b4f) ) + ROM_LOAD( "mg16.4e", 0x0040, 0x0020, CRC(92c868bc) SHA1(483ae6f47845ddacb701528e82bd388d7d66a0fb) ) + ROM_LOAD( "mg17.bpr", 0x0060, 0x0020, CRC(13261a02) SHA1(050edd18e4f79d19d5206f55f329340432fd4099) ) ROM_END -GAME( 1981, marinedt, 0, marinedt, marinedt, driver_device, 0, ROT270, "Taito", "Marine Date", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1981, marinedt, 0, marinedt, marinedt, driver_device, 0, ROT270, "Taito", "Marine Date", MACHINE_IS_SKELETON ) diff --git a/src/mame/drivers/popper.cpp b/src/mame/drivers/popper.cpp index 42a79abdfe9..d0fa2557645 100644 --- a/src/mame/drivers/popper.cpp +++ b/src/mame/drivers/popper.cpp @@ -1,5 +1,8 @@ -// license:??? -// copyright-holders:David Haywood,insideoutboy, Pierpaolo Prazzoli +// license:BSD-3-Clause +// copyright-holders:David Haywood + +// **** SKELETON DRIVER **** original removed due to unresolved licensing. + /*************************************************************************** Popper @@ -24,358 +27,26 @@ 8910 SW2 SW1 p.m4 p.m3 -Notes: - -- a lower interleave causes some sounds to miss, different interleave values - change random elements eg position of falling logs, it may be enough to - synchronise the cpus on read/writes to the 0xdd00/0f range - -- it's possible that the two score rows shouldn't be overlaid or shouldn't be - drawn at all times, the only time there is anything underneath is the colour - bars on the startup screen - -- on odd/bonus levels the chars are not aligned with the sprites when the pylons - are initially drawn (too low) resulting in the top 3 pylons being black, as - the pylons move up the screen the chars go out of alignment again (this time - too high) for a single frame to show another glitch - -- front to back ordering of object/enemy sprites appears wrong - -- on even levels the front most balloon carrying new enemies swaps between the - left and middle one, clipping to 16 pixel strips solves this but causes other - obvious sprite drawing errors - -- balloon sprites not displayed on high score entry due to the way videoram is - being drawn, possibly trying to create a stencil effect - -- bursting a balloon on bonus levels just before dying from a log causes a - sprite glitch for a few frames and then a 9999 point bonus - -- reads from 0xffff appear to be a harmless bug in the code that initialises - memory blocks for enemies on odd levels, it goes on to read from 0x001f, - 0x003f, 0x005f, 0x007f in the rom before giving up - -- a reset while a game is in progress or with credits inserted shows a - "sorry!! over run" message instead of the test screen during startup, - looks like the game assumes the reset was caused by the watchdog after a - hang/crash and is apologising to the player for the loss of their game - -- title screen sprite colour glitch in lower right corner of the large pylon - when an even level was shown before, caused by the game trying to colour - the top of the pylon in the same way as for odd levels - -- enemies stop moving on even levels on rare occasions - -- enemy sprites entering from the bridges on odd levels are clipped by a - few pixels at the top, this would happen even without the overlay as the - first few rows of videoram are high priority solid chars most of the time - -- unknown 0xe002 writes, on for title and level 2 off for all else, looks - to be graphic related - -- bottom of screen is scrappy on odd levels, amongst other things the sprites - leave early, screen size could be clipped tighter or there could be some - special handling needed, possibly tied to the 0xe002 writes - -- the game freezes in much the same way as the stop dip switch when the coin - inputs are high (a short PORT_IMPULSE duration will still cause a hitch), - so potentially there's a coin lockout mechanism - ***************************************************************************/ #include "emu.h" -#include "cpu/z80/z80.h" -#include "sound/ay8910.h" -#include "includes/popper.h" - - -/************************************* - * - * Memory handlers - * - *************************************/ -//e000 e001 e002 e003 -//76543210 76543210 76543210 76543210 -//x------- unused x------- unused x------- unused x------- unused -//-x------ dsw1:1 -x------ dsw1:2 -x------ dsw1:3 -x------ dsw1:4 -//--x----- unused --x----- unused --x----- unused --x----- unused -//---x---- dsw2:1 ---x---- dsw2:2 ---x---- dsw2:3 ---x---- dsw2:4 -//----x--- service ----xxxx p1 udlr ----x--- unused ----xxxx p2 udlr -//-----x-- coin a -----x-- coin b -//------x- start 1 ------x- start 2 -//-------x p1 b1 -------x p2 b1 -// -//e004 e005 e006 e007 -//x------- dsw1:5 x------- dsw1:6 x------- dsw1:7 x------- dsw1:8 -//-x------ unused -x------ unused -x------ unused -x------ unused -//--x----- dsw2:5 --x----- dsw2:6 --x----- dsw2:7 --x----- dsw2:8 -//---xxxxx unused ---xxxxx unused ---xxxxx unused ---xxxxx unused -// -//dsw1 dsw2 -//87654321 87654321 -//xx------ extra x------- stop -//--xx---- poppers -x------ clear (current level) -//----xx-- coin b --x----- upright (cabinet) -//------xx coin a ---x---- crt dir. (flip screen) -// ----x--- pass (unlimited lives) -// -----x-- free play -// ------x- continue -// -------x sound -READ8_MEMBER(popper_state::popper_input_ports_r) -{ - UINT8 data = 0; - switch (offset) - { - // player inputs dsw1 dsw2 - case 0: data = ioport("IN0")->read() | ((ioport("DSW1")->read() & 0x02) << 5) | ((ioport("DSW2")->read() & 0x01) << 4); break; - case 1: data = ioport("IN1")->read() | ((ioport("DSW1")->read() & 0x01) << 6) | ((ioport("DSW2")->read() & 0x02) << 3); break; - case 2: data = ioport("IN2")->read() | ((ioport("DSW1")->read() & 0x08) << 3) | ((ioport("DSW2")->read() & 0x04) << 2); break; - case 3: data = ioport("IN3")->read() | ((ioport("DSW1")->read() & 0x04) << 4) | ((ioport("DSW2")->read() & 0x08) << 1); break; - case 4: data = ((ioport("DSW1")->read() & 0x20) << 2) | ((ioport("DSW2")->read() & 0x10) << 1); break; - case 5: data = ((ioport("DSW1")->read() & 0x10) << 3) | ((ioport("DSW2")->read() & 0x20) << 0); break; - case 6: data = ((ioport("DSW1")->read() & 0x80) << 0) | ((ioport("DSW2")->read() & 0x40) >> 1); break; - case 7: data = ((ioport("DSW1")->read() & 0x40) << 1) | ((ioport("DSW2")->read() & 0x80) >> 2); break; - } - return data; -} - -READ8_MEMBER(popper_state::popper_soundcpu_nmi_r) -{ - m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); - return 0; -} -WRITE8_MEMBER(popper_state::nmi_mask_w) +class popper_state : public driver_device { - m_nmi_mask = data & 1; -} - - -/************************************* - * - * Memory maps - * - *************************************/ - -static ADDRESS_MAP_START( popper_map, AS_PROGRAM, 8, popper_state ) - AM_RANGE(0x0000, 0x5fff) AM_ROM - AM_RANGE(0xc000, 0xc1bf) AM_RAM - AM_RANGE(0xc1c0, 0xc1ff) AM_RAM_WRITE(popper_ol_videoram_w) AM_SHARE("ol_videoram") - AM_RANGE(0xc200, 0xc61f) AM_RAM_WRITE(popper_videoram_w) AM_SHARE("videoram") - AM_RANGE(0xc620, 0xc9bf) AM_RAM - AM_RANGE(0xc9c0, 0xc9ff) AM_RAM_WRITE(popper_ol_attribram_w) AM_SHARE("ol_attribram") - AM_RANGE(0xca00, 0xce1f) AM_RAM_WRITE(popper_attribram_w) AM_SHARE("attribram") - AM_RANGE(0xce20, 0xcfff) AM_RAM - AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE("share1") - AM_RANGE(0xe000, 0xe007) AM_READ(popper_input_ports_r) - AM_RANGE(0xe000, 0xe000) AM_WRITE(nmi_mask_w) - AM_RANGE(0xe001, 0xe001) AM_WRITE(popper_flipscreen_w) - AM_RANGE(0xe002, 0xe002) AM_WRITE(popper_e002_w) //?? seems to be graphic related - AM_RANGE(0xe003, 0xe003) AM_WRITE(popper_gfx_bank_w) - AM_RANGE(0xe004, 0xe007) AM_WRITENOP //?? range cleared once when the SP is set - AM_RANGE(0xe400, 0xe400) AM_READ(popper_soundcpu_nmi_r) - AM_RANGE(0xf800, 0xf800) AM_READNOP //?? read once at startup - AM_RANGE(0xfc00, 0xfc00) AM_READNOP //?? possibly watchdog - AM_RANGE(0xffff, 0xffff) AM_READNOP -ADDRESS_MAP_END - -static ADDRESS_MAP_START( popper_sound_map, AS_PROGRAM, 8, popper_state ) - AM_RANGE(0x0000, 0x0fff) AM_ROM - AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) - AM_RANGE(0x8002, 0x8002) AM_READNOP //?? all read once at startup and the - AM_RANGE(0x8002, 0x8002) AM_WRITENOP //?? same writes as 0x8000 (mostly) - AM_RANGE(0x8003, 0x8003) AM_READNOP //?? result ignored, looks like part - AM_RANGE(0xa000, 0xa001) AM_DEVWRITE("ay2", ay8910_device, address_data_w) - AM_RANGE(0xa002, 0xa002) AM_READNOP //?? of AY8910 initialisation - AM_RANGE(0xa002, 0xa002) AM_WRITENOP //?? same writes as 0xa000 - AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE("share1") -ADDRESS_MAP_END +public: + popper_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + { } +}; -/************************************* - * - * Input ports - * - *************************************/ static INPUT_PORTS_START( popper ) - PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) //ignored if held for 12 or more frames - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE1 ) - - PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY - - PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) //ignored if held for 12 or more frames - - PORT_START("IN3") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - - PORT_START("DSW1") /* FAKE DSW1 */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) //SW1:1-2 - PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) ) - PORT_DIPNAME( 0x0c, 0x08, DEF_STR( Coin_B ) ) //SW1:3-4 - PORT_DIPSETTING( 0x00, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0x30, 0x10, DEF_STR( Lives ) ) //SW1:5-6 - PORT_DIPSETTING( 0x00, "2" ) - PORT_DIPSETTING( 0x10, "3" ) - PORT_DIPSETTING( 0x20, "4" ) - PORT_DIPSETTING( 0x30, "5" ) - PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Bonus_Life ) ) //SW1:7-8 - PORT_DIPSETTING( 0x00, "20k, then every 70k" ) - PORT_DIPSETTING( 0x40, "30k, then every 70k" ) - PORT_DIPSETTING( 0x80, "40k, then every 70k" ) - PORT_DIPSETTING( 0xc0, "50k, then every 70k" ) - - PORT_START("DSW2") /* FAKE DSW2 */ - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) //SW2:1 - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Allow_Continue ) ) //SW2:2 (stored in 0xd987, never read) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Free_Play ) ) //SW2:3 - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, "Pass (Unlimited Lives) (Cheat)") //SW2:4 - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Flip_Screen ) ) //SW2:5 - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Cabinet ) ) //SW2:6 - PORT_DIPSETTING( 0x20, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x40, 0x00, "Clear (Current Level) (Cheat)") //SW2:7 - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, "Stop" ) //SW2:8 - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END -/************************************* - * - * Graphics definitions - * - *************************************/ - -static const gfx_layout popper_charlayout = -{ - 8,8, - RGN_FRAC(2,2), - 2, - { 0, 4 }, - { STEP4(8,1), STEP4(0,1) }, - { STEP8(0,16) }, - 16*8 -}; - -static const gfx_layout popper_spritelayout = -{ - 16,16, - RGN_FRAC(1,2), - 2, - { 0, RGN_FRAC(1,2) }, - { STEP8(8,1), STEP8(0,1) }, - { STEP16(0, 16) }, - 16*2*8 -}; - -static GFXDECODE_START( popper ) - GFXDECODE_ENTRY( "gfx1", 0, popper_charlayout, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0, popper_spritelayout, 0, 16 ) -GFXDECODE_END - -/************************************* - * - * Machine driver - * - *************************************/ - -void popper_state::machine_start() -{ - save_item(NAME(m_flipscreen)); - save_item(NAME(m_e002)); - save_item(NAME(m_gfx_bank)); -} - -void popper_state::machine_reset() -{ - m_flipscreen = 0; - m_e002 = 0; - m_gfx_bank = 0; -} - -INTERRUPT_GEN_MEMBER(popper_state::vblank_irq) -{ - if(m_nmi_mask) - device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); -} - - static MACHINE_CONFIG_START( popper, popper_state ) - - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", Z80,18432000/6) - MCFG_CPU_PROGRAM_MAP(popper_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", popper_state, vblank_irq) - - MCFG_CPU_ADD("audiocpu", Z80,18432000/12) - MCFG_CPU_PROGRAM_MAP(popper_sound_map) - MCFG_CPU_PERIODIC_INT_DRIVER(popper_state, irq0_line_hold, 4*60) //NMIs caused by the main CPU - - MCFG_QUANTUM_TIME(attotime::from_hz(1800)) - - - /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(33*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 33*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_DRIVER(popper_state, screen_update_popper) - MCFG_SCREEN_PALETTE("palette") - - MCFG_GFXDECODE_ADD("gfxdecode", "palette", popper) - MCFG_PALETTE_ADD("palette", 64) - MCFG_PALETTE_INIT_OWNER(popper_state, popper) - - /* sound hardware */ - MCFG_SPEAKER_STANDARD_MONO("mono") - - MCFG_SOUND_ADD("ay1", AY8910, 18432000/12) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - - MCFG_SOUND_ADD("ay2", AY8910, 18432000/12) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END - -/************************************* - * - * ROM definition - * - *************************************/ - ROM_START( popper ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "p1", 0x0000, 0x2000, CRC(56881b70) SHA1(d3ade7a54a6cb8a0babf0d667a6b27f492a739dc) ) @@ -397,11 +68,4 @@ ROM_START( popper ) ROM_LOAD( "p.m4", 0x0020, 0x0020, CRC(384de5c1) SHA1(892c89a01c11671c5708113b4e4c27b84be37ea6) ) ROM_END - -/************************************* - * - * Game driver - * - *************************************/ - -GAME( 1983, popper, 0, popper, popper, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Popper", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) +GAME( 1983, popper, 0, popper, popper, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Popper", MACHINE_IS_SKELETON ) diff --git a/src/mame/drivers/sprcros2.cpp b/src/mame/drivers/sprcros2.cpp index ac9b81efa33..040b508ee5c 100644 --- a/src/mame/drivers/sprcros2.cpp +++ b/src/mame/drivers/sprcros2.cpp @@ -1,5 +1,8 @@ -// license:??? -// copyright-holders:insideoutboy +// license:BSD-3-Clause +// copyright-holders:David Haywood + +// **** SKELETON DRIVER **** original removed due to unresolved licensing. + /* Super Cross II (JPN Ver.) (c)1986 GM Shoji @@ -36,266 +39,25 @@ SCM-23.5B SC-60.4K SC-61.5A -Notes: - -- sprites pop in at the wrong place sometimes before entering the screen - -- correct drawing/animation of bg is very sensitive to cpu speed/interrupts/ - interleave, current settings aren't correct but don't think there's any - visible problems - -- engine rev sound may not be completely correct - -- bg not using second half of prom, of interest is this half is identical to - the second half of a bankp/appoooh prom, hardware is similar to bankp/appoooh - in a few ways, there's also an unused SEGA logo in the bg graphics - -- fg not using odd colours, shouldn't matter as the colours are duplicated - -- sprite priorities are wrong when bikes are jumping as they are ordered on - vertical position only, assume this is original behaviour */ #include "emu.h" -#include "cpu/z80/z80.h" -#include "sound/sn76496.h" -#include "includes/sprcros2.h" - - - - -WRITE8_MEMBER(sprcros2_state::m_port7_w) -{ - //76543210 - //x------- unused - //-x------ bankswitch halves of scm-01.10k into c000-dfff - //--xx---- unused - //----x--- irq enable - //-----x-- ?? off with title flash and screen clears, possibly layer/sprite enable - //------x- flip screen - //-------x nmi enable - - if((m_port7^data)&0x40) - membank("masterbank")->set_entry((data&0x40)>>6); - machine().tilemap().set_flip_all(data&0x02?(TILEMAP_FLIPX|TILEMAP_FLIPY):0 ); - - m_port7 = data; -} - -WRITE8_MEMBER(sprcros2_state::s_port3_w) +class sprcros2_state : public driver_device { - //76543210 - //xxxx---- unused - //----x--- bankswitch halves of scs-27.5k into c000-dfff - //-----xx- unused - //-------x nmi enable - - if((m_s_port3^data)&0x08) - membank("slavebank")->set_entry((data&0x08)>>3); - - m_s_port3 = data; -} +public: + sprcros2_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + { } -static ADDRESS_MAP_START( sprcros2_master_map, AS_PROGRAM, 8, sprcros2_state ) - AM_RANGE(0x0000, 0xbfff) AM_ROM - AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("masterbank") - AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(fgvideoram_w) AM_SHARE("fgvideoram") - AM_RANGE(0xe800, 0xe817) AM_RAM //always zero - AM_RANGE(0xe818, 0xe83f) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0xe840, 0xefff) AM_RAM //always zero - AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE("share1") //shared with slave cpu -ADDRESS_MAP_END - -static ADDRESS_MAP_START( sprcros2_master_io_map, AS_IO, 8, sprcros2_state ) - ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") AM_DEVWRITE("sn1", sn76489_device, write) - AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") AM_DEVWRITE("sn2", sn76489_device, write) - AM_RANGE(0x02, 0x02) AM_READ_PORT("EXTRA") AM_DEVWRITE("sn3", sn76489_device, write) - AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW1") - AM_RANGE(0x05, 0x05) AM_READ_PORT("DSW2") - AM_RANGE(0x07, 0x07) AM_WRITE(m_port7_w) -ADDRESS_MAP_END - -static ADDRESS_MAP_START( sprcros2_slave_map, AS_PROGRAM, 8, sprcros2_state ) - AM_RANGE(0x0000, 0xbfff) AM_ROM - AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("slavebank") - AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(bgvideoram_w) AM_SHARE("bgvideoram") - AM_RANGE(0xe800, 0xefff) AM_RAM //always zero - AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE("share1") -ADDRESS_MAP_END +}; -static ADDRESS_MAP_START( sprcros2_slave_io_map, AS_IO, 8, sprcros2_state ) - ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_WRITE(bgscrollx_w) - AM_RANGE(0x01, 0x01) AM_WRITE(bgscrolly_w) - AM_RANGE(0x03, 0x03) AM_WRITE(s_port3_w) -ADDRESS_MAP_END static INPUT_PORTS_START( sprcros2 ) - PORT_START("P1") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("P2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("EXTRA") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("DSW1") - PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 1C_6C ) ) - PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("DSW2") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_UNUSED ) //unused coinage bits - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END -static const gfx_layout sprcros2_bglayout = -{ - 8,8, - RGN_FRAC(1,3), - 3, - { RGN_FRAC(0,3), RGN_FRAC(1,3), RGN_FRAC(2,3) }, - { STEP8(0,1) }, - { STEP8(0,8) }, - 8*8 -}; - -static const gfx_layout sprcros2_spritelayout = -{ - 32,32, - RGN_FRAC(1,3), - 3, - { RGN_FRAC(0,3), RGN_FRAC(1,3), RGN_FRAC(2,3) }, - { STEP8(0,1), STEP8(256,1), STEP8(512,1), STEP8(768,1) }, - { STEP16(0,8), STEP16(128,8) }, - 32*32 -}; - -static const gfx_layout sprcros2_fglayout = -{ - 8,8, - RGN_FRAC(1,1), - 2, - { 0, 4 }, - { STEP4(64,1), STEP4(0,1) }, - { STEP8(0,8) }, - 8*8*2 -}; - -static GFXDECODE_START( sprcros2 ) - GFXDECODE_ENTRY( "gfx1", 0, sprcros2_bglayout, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0, sprcros2_spritelayout, 256, 6 ) - GFXDECODE_ENTRY( "gfx3", 0, sprcros2_fglayout, 512, 64 ) -GFXDECODE_END - -TIMER_DEVICE_CALLBACK_MEMBER(sprcros2_state::m_interrupt) -{ - int scanline = param; - - if (scanline == 240) - { - if(m_port7&0x01) - m_master->set_input_line(INPUT_LINE_NMI, PULSE_LINE); - } - else if(scanline == 0) - { - if(m_port7&0x08) - m_master->set_input_line(0, HOLD_LINE); - } -} - -INTERRUPT_GEN_MEMBER(sprcros2_state::s_interrupt) -{ - if(m_s_port3&0x01) - device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); -} - -void sprcros2_state::machine_start() -{ - membank("masterbank")->configure_entries(0, 2, memregion("master")->base() + 0x10000, 0x2000); - membank("slavebank")->configure_entries(0, 2, memregion("slave")->base() + 0x10000, 0x2000); - - save_item(NAME(m_port7)); - save_item(NAME(m_s_port3)); -} static MACHINE_CONFIG_START( sprcros2, sprcros2_state ) - - /* basic machine hardware */ - MCFG_CPU_ADD("master", Z80,10000000/2) - MCFG_CPU_PROGRAM_MAP(sprcros2_master_map) - MCFG_CPU_IO_MAP(sprcros2_master_io_map) - MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sprcros2_state, m_interrupt, "screen", 0, 1) - - MCFG_CPU_ADD("slave", Z80,10000000/2) - MCFG_CPU_PROGRAM_MAP(sprcros2_slave_map) - MCFG_CPU_IO_MAP(sprcros2_slave_io_map) - MCFG_CPU_PERIODIC_INT_DRIVER(sprcros2_state, s_interrupt, 2*60) //2 nmis - - - /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(32*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_DRIVER(sprcros2_state, screen_update) - MCFG_SCREEN_PALETTE("palette") - - MCFG_GFXDECODE_ADD("gfxdecode", "palette", sprcros2) - MCFG_PALETTE_ADD("palette", 768) - MCFG_PALETTE_INDIRECT_ENTRIES(32) - MCFG_PALETTE_INIT_OWNER(sprcros2_state, sprcros2) - - /* sound hardware */ - MCFG_SPEAKER_STANDARD_MONO("mono") - - MCFG_SOUND_ADD("sn1", SN76489, 10000000/4) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - - MCFG_SOUND_ADD("sn2", SN76489, 10000000/4) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - - MCFG_SOUND_ADD("sn3", SN76489, 10000000/4) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MACHINE_CONFIG_END ROM_START( sprcros2 ) @@ -303,15 +65,13 @@ ROM_START( sprcros2 ) ROM_LOAD( "scm-03.10g", 0x00000, 0x4000, CRC(b9757908) SHA1(d59cb2aac1b6268fc766306850f5711d4a12d897) ) ROM_LOAD( "scm-02.10j", 0x04000, 0x4000, CRC(849c5c87) SHA1(0e02c4990e371d6a290efa53301818e769648945) ) ROM_LOAD( "scm-01.10k", 0x08000, 0x4000, CRC(385a62de) SHA1(847bf9d97ab3fa8949d9198e4e509948a940d6aa) ) - - ROM_LOAD( "scm-00.10l", 0x10000, 0x4000, CRC(13fa3684) SHA1(611b7a237e394f285dcc5beb027dacdbdd58a7a0) ) //banked into c000-dfff + ROM_LOAD( "scm-00.10l", 0x10000, 0x4000, CRC(13fa3684) SHA1(611b7a237e394f285dcc5beb027dacdbdd58a7a0) ) ROM_REGION( 0x14000, "slave", 0 ) ROM_LOAD( "scs-30.5f", 0x00000, 0x4000, CRC(c0a40e41) SHA1(e74131b353855749258dffa45091c825ccdbf05a) ) ROM_LOAD( "scs-29.5h", 0x04000, 0x4000, CRC(83d49fa5) SHA1(7112110df2f382bbc0e651adcec975054a485b9b) ) ROM_LOAD( "scs-28.5j", 0x08000, 0x4000, CRC(480d351f) SHA1(d1b86f441ae0e58b30e0f089ab25de219d5f30e3) ) - - ROM_LOAD( "scs-27.5k", 0x10000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) //banked into c000-dfff + ROM_LOAD( "scs-27.5k", 0x10000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) ROM_REGION( 0xc000, "gfx1", 0 ) //bg ROM_LOAD( "scs-26.4b", 0x0000, 0x4000, CRC(f958b56d) SHA1(a1973179d336d2ba57294155550515f2b8a33a09) ) @@ -319,7 +79,7 @@ ROM_START( sprcros2 ) ROM_LOAD( "scs-24.4e", 0x8000, 0x4000, CRC(87783c36) SHA1(7102be795afcddd76b4d41823e95c65fe1ffbca0) ) ROM_REGION( 0xc000, "gfx2", 0 ) - ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) //sprites + ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) ROM_LOAD( "scm-22.5e", 0x4000, 0x4000, CRC(0cad254c) SHA1(36e30e30b652b3a388a3c4a82251196f79368f59) ) ROM_LOAD( "scm-21.5g", 0x8000, 0x4000, CRC(b6b68998) SHA1(cc3c6d996beeedcc7e5199f10d65c5b1d3c6e666) ) @@ -327,28 +87,25 @@ ROM_START( sprcros2 ) ROM_LOAD( "scm-20.5k", 0x0000, 0x4000, CRC(67a099a6) SHA1(43981abdcaa0ff36183027a3c691ce2df7f06ec7) ) ROM_REGION( 0x0420, "proms", 0 ) - ROM_LOAD( "sc-64.6a", 0x0000, 0x0020, CRC(336dd1c0) SHA1(f0a0d2c13617fd84ee55c0cb96643761a8735147) ) //palette - ROM_LOAD( "sc-63.3b", 0x0020, 0x0100, CRC(9034a059) SHA1(1801965b4f0f3e04ca4b3faf0ba3a27dbb008474) ) //bg clut lo nibble - ROM_LOAD( "sc-62.3a", 0x0120, 0x0100, CRC(3c78a14f) SHA1(8f9c196a3e18bdce2d4855bc285bd5bde534bf09) ) //bg clut hi nibble - ROM_LOAD( "sc-61.5a", 0x0220, 0x0100, CRC(2f71185d) SHA1(974fbb52285f01f4353e9acb1992dcd6fdefedcb) ) //sprite clut - ROM_LOAD( "sc-60.4k", 0x0320, 0x0100, CRC(d7a4e57d) SHA1(6db02ec6aa55b05422cb505e63c71e36b4b11b4a) ) //fg clut + ROM_LOAD( "sc-64.6a", 0x0000, 0x0020, CRC(336dd1c0) SHA1(f0a0d2c13617fd84ee55c0cb96643761a8735147) ) + ROM_LOAD( "sc-63.3b", 0x0020, 0x0100, CRC(9034a059) SHA1(1801965b4f0f3e04ca4b3faf0ba3a27dbb008474) ) + ROM_LOAD( "sc-62.3a", 0x0120, 0x0100, CRC(3c78a14f) SHA1(8f9c196a3e18bdce2d4855bc285bd5bde534bf09) ) + ROM_LOAD( "sc-61.5a", 0x0220, 0x0100, CRC(2f71185d) SHA1(974fbb52285f01f4353e9acb1992dcd6fdefedcb) ) + ROM_LOAD( "sc-60.4k", 0x0320, 0x0100, CRC(d7a4e57d) SHA1(6db02ec6aa55b05422cb505e63c71e36b4b11b4a) ) ROM_END -/* this is probably an old revision */ ROM_START( sprcros2a ) ROM_REGION( 0x14000, "master", 0 ) ROM_LOAD( "15.bin", 0x00000, 0x4000, CRC(b9d02558) SHA1(775404c6c7648d9dab02b496541739ea700cd481) ) ROM_LOAD( "scm-02.10j", 0x04000, 0x4000, CRC(849c5c87) SHA1(0e02c4990e371d6a290efa53301818e769648945) ) ROM_LOAD( "scm-01.10k", 0x08000, 0x4000, CRC(385a62de) SHA1(847bf9d97ab3fa8949d9198e4e509948a940d6aa) ) - - ROM_LOAD( "scm-00.10l", 0x10000, 0x4000, CRC(13fa3684) SHA1(611b7a237e394f285dcc5beb027dacdbdd58a7a0) ) //banked into c000-dfff + ROM_LOAD( "scm-00.10l", 0x10000, 0x4000, CRC(13fa3684) SHA1(611b7a237e394f285dcc5beb027dacdbdd58a7a0) ) ROM_REGION( 0x14000, "slave", 0 ) ROM_LOAD( "scs-30.5f", 0x00000, 0x4000, CRC(c0a40e41) SHA1(e74131b353855749258dffa45091c825ccdbf05a) ) ROM_LOAD( "scs-29.5h", 0x04000, 0x4000, CRC(83d49fa5) SHA1(7112110df2f382bbc0e651adcec975054a485b9b) ) ROM_LOAD( "scs-28.5j", 0x08000, 0x4000, CRC(480d351f) SHA1(d1b86f441ae0e58b30e0f089ab25de219d5f30e3) ) - - ROM_LOAD( "scs-27.5k", 0x10000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) //banked into c000-dfff + ROM_LOAD( "scs-27.5k", 0x10000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) ROM_REGION( 0xc000, "gfx1", 0 ) //bg ROM_LOAD( "scs-26.4b", 0x0000, 0x4000, CRC(f958b56d) SHA1(a1973179d336d2ba57294155550515f2b8a33a09) ) @@ -356,7 +113,7 @@ ROM_START( sprcros2a ) ROM_LOAD( "scs-24.4e", 0x8000, 0x4000, CRC(87783c36) SHA1(7102be795afcddd76b4d41823e95c65fe1ffbca0) ) ROM_REGION( 0xc000, "gfx2", 0 ) - ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) //sprites + ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) ROM_LOAD( "scm-22.5e", 0x4000, 0x4000, CRC(0cad254c) SHA1(36e30e30b652b3a388a3c4a82251196f79368f59) ) ROM_LOAD( "scm-21.5g", 0x8000, 0x4000, CRC(b6b68998) SHA1(cc3c6d996beeedcc7e5199f10d65c5b1d3c6e666) ) @@ -364,12 +121,12 @@ ROM_START( sprcros2a ) ROM_LOAD( "scm-20.5k", 0x0000, 0x4000, CRC(67a099a6) SHA1(43981abdcaa0ff36183027a3c691ce2df7f06ec7) ) ROM_REGION( 0x0420, "proms", 0 ) - ROM_LOAD( "sc-64.6a", 0x0000, 0x0020, CRC(336dd1c0) SHA1(f0a0d2c13617fd84ee55c0cb96643761a8735147) ) //palette - ROM_LOAD( "sc-63.3b", 0x0020, 0x0100, CRC(9034a059) SHA1(1801965b4f0f3e04ca4b3faf0ba3a27dbb008474) ) //bg clut lo nibble - ROM_LOAD( "sc-62.3a", 0x0120, 0x0100, CRC(3c78a14f) SHA1(8f9c196a3e18bdce2d4855bc285bd5bde534bf09) ) //bg clut hi nibble - ROM_LOAD( "sc-61.5a", 0x0220, 0x0100, CRC(2f71185d) SHA1(974fbb52285f01f4353e9acb1992dcd6fdefedcb) ) //sprite clut - ROM_LOAD( "sc-60.4k", 0x0320, 0x0100, CRC(d7a4e57d) SHA1(6db02ec6aa55b05422cb505e63c71e36b4b11b4a) ) //fg clut + ROM_LOAD( "sc-64.6a", 0x0000, 0x0020, CRC(336dd1c0) SHA1(f0a0d2c13617fd84ee55c0cb96643761a8735147) ) + ROM_LOAD( "sc-63.3b", 0x0020, 0x0100, CRC(9034a059) SHA1(1801965b4f0f3e04ca4b3faf0ba3a27dbb008474) ) + ROM_LOAD( "sc-62.3a", 0x0120, 0x0100, CRC(3c78a14f) SHA1(8f9c196a3e18bdce2d4855bc285bd5bde534bf09) ) + ROM_LOAD( "sc-61.5a", 0x0220, 0x0100, CRC(2f71185d) SHA1(974fbb52285f01f4353e9acb1992dcd6fdefedcb) ) + ROM_LOAD( "sc-60.4k", 0x0320, 0x0100, CRC(d7a4e57d) SHA1(6db02ec6aa55b05422cb505e63c71e36b4b11b4a) ) ROM_END -GAME( 1986, sprcros2, 0, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, sprcros2a,sprcros2, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, sprcros2, 0, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 1)", MACHINE_IS_SKELETON ) +GAME( 1986, sprcros2a,sprcros2, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 2)", MACHINE_IS_SKELETON ) diff --git a/src/mame/includes/carjmbre.h b/src/mame/includes/carjmbre.h deleted file mode 100644 index e19917b9f43..00000000000 --- a/src/mame/includes/carjmbre.h +++ /dev/null @@ -1,44 +0,0 @@ -// license:??? -// copyright-holders:insideoutboy, Nicola Salmoria -/*************************************************************************** - - Car Jamboree - -***************************************************************************/ - -class carjmbre_state : public driver_device -{ -public: - carjmbre_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_videoram(*this, "videoram"), - m_spriteram(*this, "spriteram"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - /* memory pointers */ - required_shared_ptr m_videoram; - required_shared_ptr m_spriteram; - - /* video-related */ - tilemap_t *m_cj_tilemap; - UINT8 m_flipscreen; - UINT16 m_bgcolor; - - UINT8 m_nmi_mask; - DECLARE_WRITE8_MEMBER(nmi_mask_w); - DECLARE_WRITE8_MEMBER(carjmbre_flipscreen_w); - DECLARE_WRITE8_MEMBER(carjmbre_bgcolor_w); - DECLARE_WRITE8_MEMBER(carjmbre_8806_w); - DECLARE_WRITE8_MEMBER(carjmbre_videoram_w); - TILE_GET_INFO_MEMBER(get_carjmbre_tile_info); - virtual void machine_reset() override; - virtual void video_start() override; - DECLARE_PALETTE_INIT(carjmbre); - UINT32 screen_update_carjmbre(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(vblank_irq); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; -}; diff --git a/src/mame/includes/flower.h b/src/mame/includes/flower.h deleted file mode 100644 index cc2ff96ced2..00000000000 --- a/src/mame/includes/flower.h +++ /dev/null @@ -1,126 +0,0 @@ -// license:??? -// copyright-holders:insideoutboy, David Haywood, Stephh -class flower_state : public driver_device -{ -public: - flower_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_sn_nmi_enable(*this, "sn_nmi_enable"), - m_spriteram(*this, "spriteram"), - m_textram(*this, "textram"), - m_bg0ram(*this, "bg0ram"), - m_bg1ram(*this, "bg1ram"), - m_bg0_scroll(*this, "bg0_scroll"), - m_bg1_scroll(*this, "bg1_scroll"), - m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), - m_subcpu(*this, "subcpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - required_shared_ptr m_sn_nmi_enable; - required_shared_ptr m_spriteram; - required_shared_ptr m_textram; - required_shared_ptr m_bg0ram; - required_shared_ptr m_bg1ram; - required_shared_ptr m_bg0_scroll; - required_shared_ptr m_bg1_scroll; - tilemap_t *m_bg0_tilemap; - tilemap_t *m_bg1_tilemap; - tilemap_t *m_text_tilemap; - tilemap_t *m_text_right_tilemap; - DECLARE_WRITE8_MEMBER(flower_maincpu_irq_ack); - DECLARE_WRITE8_MEMBER(flower_subcpu_irq_ack); - DECLARE_WRITE8_MEMBER(flower_soundcpu_irq_ack); - DECLARE_WRITE8_MEMBER(flower_coin_counter_w); - DECLARE_WRITE8_MEMBER(flower_coin_lockout_w); - DECLARE_WRITE8_MEMBER(sound_command_w); - DECLARE_WRITE8_MEMBER(flower_textram_w); - DECLARE_WRITE8_MEMBER(flower_bg0ram_w); - DECLARE_WRITE8_MEMBER(flower_bg1ram_w); - DECLARE_WRITE8_MEMBER(flower_flipscreen_w); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - TILE_GET_INFO_MEMBER(get_bg0_tile_info); - TILE_GET_INFO_MEMBER(get_bg1_tile_info); - TILE_GET_INFO_MEMBER(get_text_tile_info); - virtual void video_start() override; - UINT32 screen_update_flower(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); - required_device m_maincpu; - required_device m_audiocpu; - required_device m_subcpu; - required_device m_gfxdecode; - required_device m_palette; -}; - - -// ======================> flower_sound_device - - -/* this structure defines the parameters for a channel */ -struct flower_sound_channel -{ - UINT32 start; - UINT32 pos; - UINT16 freq; - UINT8 volume; - UINT8 voltab; - UINT8 oneshot; - UINT8 active; - UINT8 effect; - UINT32 ecount; - -}; - -class flower_sound_device : public device_t, - public device_sound_interface -{ -public: - flower_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - ~flower_sound_device() {} - - enum - { - TIMER_CLOCK_EFFECT - }; - - DECLARE_WRITE8_MEMBER( sound1_w ); - DECLARE_WRITE8_MEMBER( sound2_w ); - -protected: - // device-level overrides - virtual void device_config_complete() override; - virtual void device_start() override; - virtual void device_reset() override; - - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - - // sound stream update overrides - virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override; - -private: - void make_mixer_table(int voices, int gain); - - // internal state - emu_timer *m_effect_timer; - - /* data about the sound system */ - flower_sound_channel m_channel_list[8]; - flower_sound_channel *m_last_channel; - - /* global sound parameters */ - const UINT8 *m_sample_rom; - const UINT8 *m_volume_rom; - sound_stream * m_stream; - - /* mixer tables and internal buffers */ - std::unique_ptr m_mixer_table; - INT16 *m_mixer_lookup; - std::unique_ptr m_mixer_buffer; - - UINT8 m_soundregs1[0x40]; - UINT8 m_soundregs2[0x40]; - -}; - -extern const device_type FLOWER; diff --git a/src/mame/includes/popper.h b/src/mame/includes/popper.h deleted file mode 100644 index 9ef9f287e95..00000000000 --- a/src/mame/includes/popper.h +++ /dev/null @@ -1,71 +0,0 @@ -// license:??? -// copyright-holders:David Haywood,insideoutboy, Pierpaolo Prazzoli -/*************************************************************************** - - Popper - -***************************************************************************/ - -class popper_state : public driver_device -{ -public: - popper_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_ol_videoram(*this, "ol_videoram"), - m_videoram(*this, "videoram"), - m_ol_attribram(*this, "ol_attribram"), - m_attribram(*this, "attribram"), - m_spriteram(*this, "spriteram"), - m_audiocpu(*this, "audiocpu"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_screen(*this, "screen"), - m_palette(*this, "palette") { } - - /* memory pointers */ - required_shared_ptr m_ol_videoram; - required_shared_ptr m_videoram; - required_shared_ptr m_ol_attribram; - required_shared_ptr m_attribram; - required_shared_ptr m_spriteram; - - /* video-related */ - tilemap_t *m_p123_tilemap; - tilemap_t *m_p0_tilemap; - tilemap_t *m_ol_p123_tilemap; - tilemap_t *m_ol_p0_tilemap; - INT32 m_flipscreen; - INT32 m_e002; - INT32 m_gfx_bank; - rectangle m_tilemap_clip; - - /* devices */ - required_device m_audiocpu; - - UINT8 m_nmi_mask; - DECLARE_READ8_MEMBER(popper_input_ports_r); - DECLARE_READ8_MEMBER(popper_soundcpu_nmi_r); - DECLARE_WRITE8_MEMBER(nmi_mask_w); - DECLARE_WRITE8_MEMBER(popper_ol_videoram_w); - DECLARE_WRITE8_MEMBER(popper_videoram_w); - DECLARE_WRITE8_MEMBER(popper_ol_attribram_w); - DECLARE_WRITE8_MEMBER(popper_attribram_w); - DECLARE_WRITE8_MEMBER(popper_flipscreen_w); - DECLARE_WRITE8_MEMBER(popper_e002_w); - DECLARE_WRITE8_MEMBER(popper_gfx_bank_w); - TILE_GET_INFO_MEMBER(get_popper_p123_tile_info); - TILE_GET_INFO_MEMBER(get_popper_p0_tile_info); - TILE_GET_INFO_MEMBER(get_popper_ol_p123_tile_info); - TILE_GET_INFO_MEMBER(get_popper_ol_p0_tile_info); - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; - DECLARE_PALETTE_INIT(popper); - UINT32 screen_update_popper(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(vblank_irq); - void draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect ); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_screen; - required_device m_palette; -}; diff --git a/src/mame/video/carjmbre.cpp b/src/mame/video/carjmbre.cpp deleted file mode 100644 index 374dcc0f9b9..00000000000 --- a/src/mame/video/carjmbre.cpp +++ /dev/null @@ -1,156 +0,0 @@ -// license:??? -// copyright-holders:insideoutboy, Nicola Salmoria -/*************************************************************************** - - Car Jamboree - Omori Electric CAD (OEC) 1983 - -***************************************************************************/ - -#include "emu.h" -#include "video/resnet.h" -#include "includes/carjmbre.h" - -// palette info from Popper (OEC 1983, very similar video hw) -static const res_net_decode_info carjmbre_decode_info = -{ - 1, // there may be two proms needed to construct color - 0, 63, // start/end - // R, G, B, - { 0, 0, 0, }, // offsets - { 0, 3, 6, }, // shifts - {0x07,0x07,0x03, } // masks -}; - -static const res_net_info carjmbre_net_info = -{ - RES_NET_VCC_5V | RES_NET_VBIAS_5V | RES_NET_VIN_TTL_OUT, - { - { RES_NET_AMP_NONE, 0, 0, 3, { 1000, 470, 220 } }, - { RES_NET_AMP_NONE, 0, 0, 3, { 1000, 470, 220 } }, - { RES_NET_AMP_NONE, 0, 0, 2, { 470, 220, 0 } } - } -}; - -PALETTE_INIT_MEMBER(carjmbre_state, carjmbre) -{ - const UINT8 *color_prom = memregion("proms")->base(); - std::vector rgb; - - compute_res_net_all(rgb, color_prom, carjmbre_decode_info, carjmbre_net_info); - palette.set_pen_colors(0, rgb); - palette.palette()->normalize_range(0, 63); -} - - - -WRITE8_MEMBER(carjmbre_state::carjmbre_flipscreen_w) -{ - m_flipscreen = (data & 1) ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0; - machine().tilemap().set_flip_all(m_flipscreen); -} - -WRITE8_MEMBER(carjmbre_state::carjmbre_bgcolor_w) -{ - data = ~data & 0x3f; - - if (data != m_bgcolor) - { - int i; - - m_bgcolor = data; - if (data & 3) - for (i = 0; i < 64; i += 4) - m_palette->set_pen_color(i, data); - else - // restore to initial state (black) - for (i = 0; i < 64; i += 4) - m_palette->set_pen_color(i, rgb_t::black); - } -} - -WRITE8_MEMBER(carjmbre_state::carjmbre_8806_w) -{ - // unknown, gets updated at same time as carjmbre_bgcolor_w -} - -WRITE8_MEMBER(carjmbre_state::carjmbre_videoram_w) -{ - m_videoram[offset] = data; - m_cj_tilemap->mark_tile_dirty(offset & 0x3ff); -} - - - -TILE_GET_INFO_MEMBER(carjmbre_state::get_carjmbre_tile_info) -{ - UINT32 tile_number = m_videoram[tile_index] & 0xff; - UINT8 attr = m_videoram[tile_index + 0x400]; - tile_number += (attr & 0x80) << 1; /* bank */ - - SET_TILE_INFO_MEMBER(0, - tile_number, - attr & 0xf, - 0); -} - -void carjmbre_state::video_start() -{ - m_cj_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(carjmbre_state::get_carjmbre_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); - save_item(NAME(m_flipscreen)); - save_item(NAME(m_bgcolor)); -} - -UINT32 carjmbre_state::screen_update_carjmbre(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - int offs, troffs, sx, sy, flipx, flipy; - - //colorram - //76543210 - //x------- graphic bank - //-xxx---- unused - //----xxxx colour - - m_cj_tilemap->draw(screen, bitmap, cliprect, 0, 0); - - //spriteram[offs] - //+0 y pos - //+1 sprite number - //+2 - //76543210 - //x------- flipy - //-x------ flipx - //--xx---- unused - //----xxxx colour - //+3 x pos - for (offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4) - { - //before copying the sprites to spriteram the game reorders the first - //sprite to last, sprite ordering is incorrect if this isn't undone - troffs = (offs - 4 + m_spriteram.bytes()) % m_spriteram.bytes(); - - //unused sprites are marked with ypos <= 0x02 (or >= 0xfd if screen flipped) - if (m_spriteram[troffs] > 0x02 && m_spriteram[troffs] < 0xfd) - { - sx = m_spriteram[troffs + 3] - 7; - sy = 241 - m_spriteram[troffs]; - flipx = (m_spriteram[troffs + 2] & 0x40) >> 6; - flipy = (m_spriteram[troffs + 2] & 0x80) >> 7; - - if (m_flipscreen) - { - sx = (256 + (226 - sx)) % 256; - sy = 242 - sy; - flipx = !flipx; - flipy = !flipy; - } - - m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, - m_spriteram[troffs + 1], - m_spriteram[troffs + 2] & 0xf, - flipx,flipy, - sx,sy,0); - } - } - return 0; -} diff --git a/src/mame/video/flower.cpp b/src/mame/video/flower.cpp deleted file mode 100644 index b7fee29475b..00000000000 --- a/src/mame/video/flower.cpp +++ /dev/null @@ -1,192 +0,0 @@ -// license:??? -// copyright-holders:insideoutboy, David Haywood, Stephh -/* Flower Video Hardware */ - -#include "emu.h" -#include "includes/flower.h" - - -void flower_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ) -{ - gfx_element *gfx = m_gfxdecode->gfx(1); - UINT8 *source = m_spriteram + 0x200; - UINT8 *finish = source - 0x200; - - source -= 8; - - while( source>=finish ) - { - int xblock,yblock; - int sy = 256-32-source[0]+1; - int sx = (source[4]|(source[5]<<8))-55; - int code = source[1] & 0x3f; - int color = (source[6]>>4); - - /* - Byte 0: Y - Byte 1: - 0x80 - FlipY - 0x40 - FlipX - 0x3f - Tile - Byte 2: - 0x08 - Tile MSB - 0x01 - Tile MSB - Byte 3: - 0x07 - X Zoom - 0x08 - X Size - 0x70 - Y Zoom - 0x80 - Y Size - Byte 4: X LSB - Byte 5: X MSB - Byte 6: - 0xf0 - Colour - */ - - int flipy = source[1] & 0x80; - int flipx = source[1] & 0x40; - - int size = source[3]; - - int xsize = ((size & 0x08)>>3); - int ysize = ((size & 0x80)>>7); - - xsize++; - ysize++; - - if (ysize==2) sy -= 16; - - code |= ((source[2] & 0x01) << 6); - code |= ((source[2] & 0x08) << 4); - - if(flip_screen()) - { - flipx = !flipx; - flipy = !flipy; - sx = sx+16; - sy = 250-sy; - - if (ysize==2) sy += 16; - } - - for (xblock = 0; xblock>16; - int yblocksizeinpixels=(zoomy*16)>>16; - - for (yblock = 0; yblockzoom_transpen(bitmap,cliprect, - code+yoffs+xoffs, - color, - flipx,flipy, - sx+sxoffs,sy+syoffs, - zoomx,zoomy,15); - } - } - source -= 8; - } - -} - -TILE_GET_INFO_MEMBER(flower_state::get_bg0_tile_info) -{ - int code = m_bg0ram[tile_index]; - int color = m_bg0ram[tile_index+0x100]; - /* Todo - may be tile flip bits? */ - - SET_TILE_INFO_MEMBER(2, code, color>>4, 0); -} - -TILE_GET_INFO_MEMBER(flower_state::get_bg1_tile_info) -{ - int code = m_bg1ram[tile_index]; - int color = m_bg1ram[tile_index+0x100]; - /* Todo - may be tile flip bits? */ - - SET_TILE_INFO_MEMBER(2, code, color>>4, 0); -} - -TILE_GET_INFO_MEMBER(flower_state::get_text_tile_info) -{ - int code = m_textram[tile_index]; - int color = m_textram[tile_index+0x400]; - /* Todo - may be tile flip bits? */ - - SET_TILE_INFO_MEMBER(0, code, color>>2, 0); -} - -void flower_state::video_start() -{ - m_bg0_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(flower_state::get_bg0_tile_info),this), TILEMAP_SCAN_ROWS,16,16,16,16); - m_bg1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(flower_state::get_bg1_tile_info),this), TILEMAP_SCAN_ROWS,16,16,16,16); - m_text_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(flower_state::get_text_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,32,32); - m_text_right_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(flower_state::get_text_tile_info),this),TILEMAP_SCAN_COLS, 8, 8, 2,32); - - m_bg1_tilemap->set_transparent_pen(15); - m_text_tilemap->set_transparent_pen(3); - m_text_right_tilemap->set_transparent_pen(3); - - m_text_tilemap->set_scrolly(0, 16); - m_text_right_tilemap->set_scrolly(0, 16); -} - -UINT32 flower_state::screen_update_flower(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - rectangle myclip = cliprect; - - m_bg0_tilemap->set_scrolly(0, m_bg0_scroll[0]+16); - m_bg1_tilemap->set_scrolly(0, m_bg1_scroll[0]+16); - - m_bg0_tilemap->draw(screen, bitmap, cliprect, 0,0); - m_bg1_tilemap->draw(screen, bitmap, cliprect, 0,0); - - draw_sprites(bitmap,cliprect); - - if(flip_screen()) - { - myclip.min_x = cliprect.min_x; - myclip.max_x = cliprect.min_x + 15; - } - else - { - myclip.min_x = cliprect.max_x - 15; - myclip.max_x = cliprect.max_x; - } - - m_text_tilemap->draw(screen, bitmap, cliprect, 0,0); - m_text_right_tilemap->draw(screen, bitmap, myclip, 0,0); - return 0; -} - -WRITE8_MEMBER(flower_state::flower_textram_w) -{ - m_textram[offset] = data; - m_text_tilemap->mark_tile_dirty(offset); - m_text_right_tilemap->mark_all_dirty(); -} - -WRITE8_MEMBER(flower_state::flower_bg0ram_w) -{ - m_bg0ram[offset] = data; - m_bg0_tilemap->mark_tile_dirty(offset & 0x1ff); -} - -WRITE8_MEMBER(flower_state::flower_bg1ram_w) -{ - m_bg1ram[offset] = data; - m_bg1_tilemap->mark_tile_dirty(offset & 0x1ff); -} - -WRITE8_MEMBER(flower_state::flower_flipscreen_w) -{ - flip_screen_set(data); -} diff --git a/src/mame/video/popper.cpp b/src/mame/video/popper.cpp deleted file mode 100644 index ccabc1263f5..00000000000 --- a/src/mame/video/popper.cpp +++ /dev/null @@ -1,245 +0,0 @@ -// license:??? -// copyright-holders:David Haywood,insideoutboy, Pierpaolo Prazzoli -/*************************************************************************** - - Popper - - Omori Electric CAD (OEC) 1983 - -***************************************************************************/ - -#include "emu.h" -#include "video/resnet.h" -#include "includes/popper.h" - - -/*************************************************************************** - * - * Color guns - from schematics - * - ***************************************************************************/ - -static const res_net_decode_info popper_decode_info = -{ - 1, // there may be two proms needed to construct color - 0, // start at 0 - 63, // end at 255 - // R, G, B, - { 0, 0, 0, }, // offsets - { 0, 3, 6, }, // shifts - {0x07,0x07,0x03, } // masks -}; - -static const res_net_info popper_net_info = -{ - RES_NET_VCC_5V | RES_NET_VBIAS_5V | RES_NET_VIN_TTL_OUT, - { - { RES_NET_AMP_NONE, 0, 0, 3, { 1000, 470, 220 } }, - { RES_NET_AMP_NONE, 0, 0, 3, { 1000, 470, 220 } }, - { RES_NET_AMP_NONE, 0, 0, 2, { 470, 220, 0 } } - } -}; - -PALETTE_INIT_MEMBER(popper_state, popper) -{ - const UINT8 *color_prom = memregion("proms")->base(); - std::vector rgb; - - compute_res_net_all(rgb, color_prom, popper_decode_info, popper_net_info); - palette.set_pen_colors(0, rgb); - palette.palette()->normalize_range(0, 63); -} - -WRITE8_MEMBER(popper_state::popper_ol_videoram_w) -{ - m_ol_videoram[offset] = data; - m_ol_p123_tilemap->mark_tile_dirty(offset); - m_ol_p0_tilemap->mark_tile_dirty(offset); -} - -WRITE8_MEMBER(popper_state::popper_videoram_w) -{ - m_videoram[offset] = data; - m_p123_tilemap->mark_tile_dirty(offset); - m_p0_tilemap->mark_tile_dirty(offset); -} - -WRITE8_MEMBER(popper_state::popper_ol_attribram_w) -{ - m_ol_attribram[offset] = data; - m_ol_p123_tilemap->mark_tile_dirty(offset); - m_ol_p0_tilemap->mark_tile_dirty(offset); -} - -WRITE8_MEMBER(popper_state::popper_attribram_w) -{ - m_attribram[offset] = data; - m_p123_tilemap->mark_tile_dirty(offset); - m_p0_tilemap->mark_tile_dirty(offset); -} - -WRITE8_MEMBER(popper_state::popper_flipscreen_w) -{ - m_flipscreen = data; - machine().tilemap().set_flip_all(m_flipscreen ? (TILEMAP_FLIPX | TILEMAP_FLIPY) : 0); - - if (m_flipscreen) - m_tilemap_clip.min_x = m_tilemap_clip.max_x - 15; - else - m_tilemap_clip.max_x = 15; -} - -WRITE8_MEMBER(popper_state::popper_e002_w) -{ - m_e002 = data; -} - -WRITE8_MEMBER(popper_state::popper_gfx_bank_w) -{ - if (m_gfx_bank != data) - { - m_gfx_bank = data; - machine().tilemap().mark_all_dirty(); - } -} - -TILE_GET_INFO_MEMBER(popper_state::get_popper_p123_tile_info) -{ - UINT32 tile_number = m_videoram[tile_index]; - UINT8 attr = m_attribram[tile_index]; - tile_number += m_gfx_bank << 8; - - SET_TILE_INFO_MEMBER(0, - tile_number, - (attr & 0xf), - 0); - tileinfo.group = (attr & 0x80) >> 7; -} - -TILE_GET_INFO_MEMBER(popper_state::get_popper_p0_tile_info) -{ - UINT32 tile_number = m_videoram[tile_index]; - UINT8 attr = m_attribram[tile_index]; - tile_number += m_gfx_bank << 8; - - //pen 0 only in front if colour set as well - tileinfo.group = (attr & 0x70) ? ((attr & 0x80) >> 7) : 0; - - SET_TILE_INFO_MEMBER(0, - tile_number, - ((attr & 0x70) >> 4) + 8, - 0); -} - -TILE_GET_INFO_MEMBER(popper_state::get_popper_ol_p123_tile_info) -{ - UINT32 tile_number = m_ol_videoram[tile_index]; - UINT8 attr = m_ol_attribram[tile_index]; - tile_number += m_gfx_bank << 8; - - SET_TILE_INFO_MEMBER(0, - tile_number, - (attr & 0xf), - 0); - tileinfo.group = (attr & 0x80) >> 7; -} - -TILE_GET_INFO_MEMBER(popper_state::get_popper_ol_p0_tile_info) -{ - UINT32 tile_number = m_ol_videoram[tile_index]; - UINT8 attr = m_ol_attribram[tile_index]; - tile_number += m_gfx_bank << 8; - - //pen 0 only in front if colour set as well - tileinfo.group = (attr & 0x70) ? ((attr & 0x80) >> 7) : 0; - - SET_TILE_INFO_MEMBER(0, - tile_number, - ((attr & 0x70) >> 4) + 8, - 0); -} - -void popper_state::video_start() -{ - m_p123_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popper_state::get_popper_p123_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 33, 32 ); - m_p0_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popper_state::get_popper_p0_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 33, 32); - m_ol_p123_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popper_state::get_popper_ol_p123_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 2, 32); - m_ol_p0_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popper_state::get_popper_ol_p0_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 2, 32); - - m_p123_tilemap->set_transmask(0, 0x0f, 0x01); - m_p123_tilemap->set_transmask(1, 0x01, 0x0f); - m_p0_tilemap->set_transmask(0, 0x0f, 0x0e); - m_p0_tilemap->set_transmask(1, 0x0e, 0x0f); - m_ol_p123_tilemap->set_transmask(0, 0x0f, 0x01); - m_ol_p123_tilemap->set_transmask(1, 0x01, 0x0f); - m_ol_p0_tilemap->set_transmask(0, 0x0f, 0x0e); - m_ol_p0_tilemap->set_transmask(1, 0x0e, 0x0f); - - m_tilemap_clip = m_screen->visible_area(); -} - -void popper_state::draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect ) -{ - int offs, sx, sy, flipx, flipy; - - for (offs = 0; offs < m_spriteram.bytes() - 4; offs += 4) - { - //if y position is in the current strip - if (m_spriteram[offs + 1] && (((m_spriteram[offs] + (m_flipscreen ? 2 : 0)) & 0xf0) == (0x0f - offs / 0x80) << 4)) - { - //offs y pos - //offs+1 sprite number - //offs+2 - //76543210 - //x------- flipy - //-x------ flipx - //--xx---- unused - //----xxxx colour - //offs+3 x pos - - sx = m_spriteram[offs + 3]; - sy = 240 - m_spriteram[offs]; - flipx = (m_spriteram[offs + 2] & 0x40) >> 6; - flipy = (m_spriteram[offs + 2] & 0x80) >> 7; - - if (m_flipscreen) - { - sx = 248 - sx; - sy = 242 - sy; - flipx = !flipx; - flipy = !flipy; - } - - m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, - m_spriteram[offs + 1], - (m_spriteram[offs + 2] & 0x0f), - flipx,flipy, - sx,sy,0); - } - } -} - -UINT32 popper_state::screen_update_popper(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - rectangle finalclip = m_tilemap_clip; - finalclip &= cliprect; - - //attribram - //76543210 - //x------- draw over sprites - //-xxx---- colour for pen 0 (from second prom?) - //----xxxx colour for pens 1,2,3 - - m_p123_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); - m_p0_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); - m_ol_p123_tilemap->draw(screen, bitmap, finalclip, TILEMAP_DRAW_LAYER1, 0); - m_ol_p0_tilemap->draw(screen, bitmap, finalclip, TILEMAP_DRAW_LAYER1, 0); - - draw_sprites(bitmap, cliprect); - - m_p123_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); - m_p0_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); - m_ol_p123_tilemap->draw(screen, bitmap, finalclip, TILEMAP_DRAW_LAYER0, 0); - m_ol_p0_tilemap->draw(screen, bitmap, finalclip, TILEMAP_DRAW_LAYER0, 0); - return 0; -} -- cgit v1.2.3-70-g09d2 From d51aa530be5075458c4c19c294f9affce9dba433 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Thu, 3 Mar 2016 18:45:14 +0000 Subject: remove drivers by 'Edgardo E. Contini Salvan' due to unresolved licensing (replaced with skeleton containing ROM loading only) --- scripts/target/mame/arcade.lua | 2 - src/mame/drivers/toypop.cpp | 606 +++-------------------------------------- src/mame/includes/toypop.h | 92 ------- src/mame/video/toypop.cpp | 275 ------------------- 4 files changed, 34 insertions(+), 941 deletions(-) delete mode 100644 src/mame/includes/toypop.h delete mode 100644 src/mame/video/toypop.cpp (limited to 'src') diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 550b3a7c77f..4ae27d37cc3 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -2590,8 +2590,6 @@ files { MAME_DIR .. "src/mame/includes/tceptor.h", MAME_DIR .. "src/mame/video/tceptor.cpp", MAME_DIR .. "src/mame/drivers/toypop.cpp", - MAME_DIR .. "src/mame/includes/toypop.h", - MAME_DIR .. "src/mame/video/toypop.cpp", MAME_DIR .. "src/mame/drivers/turrett.cpp", MAME_DIR .. "src/mame/includes/turrett.h", MAME_DIR .. "src/mame/audio/turrett.cpp", diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp index 1b5d309a7ac..4ad1c35182e 100644 --- a/src/mame/drivers/toypop.cpp +++ b/src/mame/drivers/toypop.cpp @@ -1,19 +1,10 @@ -// license:??? -// copyright-holders:Edgardo E. Contini Salvan +// license:BSD-3-Clause +// copyright-holders:David Haywood /**************************************** Libble Rabble (c) 1983 Namco Toypop (c) 1986 Namco -driver by Edgardo E. Contini Salvan (pag2806@iperbole.bologna.it) - -6809 main CPU, -6809 sound and -68000 to create the background image. - -Libble Rabble and Toypop run on the same board, but the memory map is subtly -different. - Notes: ------ - Libble Rabble Easter egg: @@ -24,621 +15,92 @@ Notes: 9xU 2xR 9xD 2xL (c) 1983 NAMCO LTD. will appear on the screen. - -TODO: -- I haven't found any Easter egg in Toy Pop. Maybe they had stopped inserting - them by that time. - ****************************************/ #include "emu.h" -#include "cpu/m6809/m6809.h" -#include "cpu/m68000/m68000.h" -#include "includes/toypop.h" - - -READ16_MEMBER(toypop_state::toypop_m68000_sharedram_r) -{ - return m_m68000_sharedram[offset]; -} - -WRITE16_MEMBER(toypop_state::toypop_m68000_sharedram_w) -{ - if (ACCESSING_BITS_0_7) - { - m_m68000_sharedram[offset] = data & 0xff; - } -} - -READ8_MEMBER(toypop_state::toypop_main_interrupt_enable_r) -{ - m_main_irq_mask = 1; - return 0; -} - -WRITE8_MEMBER(toypop_state::toypop_main_interrupt_enable_w) -{ - m_main_irq_mask = 1; -} - -WRITE8_MEMBER(toypop_state::toypop_main_interrupt_disable_w) -{ - m_main_irq_mask = 0; -// m_maincpu->set_input_line(0, CLEAR_LINE); -} - -WRITE8_MEMBER(toypop_state::toypop_sound_interrupt_enable_acknowledge_w) -{ - m_sound_irq_mask = 1; -// m_audiocpu->set_input_line(0, CLEAR_LINE); -} - -WRITE8_MEMBER(toypop_state::toypop_sound_interrupt_disable_w) -{ - m_sound_irq_mask = 0; -} - -void toypop_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) -{ - switch (id) - { - case TIMER_NAMCOIO_RUN: - namcoio_run(ptr, param); - break; - default: - assert_always(FALSE, "Unknown id in toypop_state::device_timer"); - } -} - -TIMER_CALLBACK_MEMBER(toypop_state::namcoio_run) -{ - switch (param) - { - case 0: - m_namco58xx->customio_run(); - break; - case 1: - m_namco56xx_1->customio_run(); - break; - case 2: - m_namco56xx_2->customio_run(); - break; - } -} - -INTERRUPT_GEN_MEMBER(toypop_state::toypop_main_vblank_irq) -{ - if(m_main_irq_mask) - device.execute().set_input_line(0, HOLD_LINE); - - if (!m_namco58xx->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */ - timer_set(attotime::from_usec(50), TIMER_NAMCOIO_RUN); - if (!m_namco56xx_1->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */ - timer_set(attotime::from_usec(50), TIMER_NAMCOIO_RUN, 1); - if (!m_namco56xx_2->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */ - timer_set(attotime::from_usec(50), TIMER_NAMCOIO_RUN, 2); -} - -INTERRUPT_GEN_MEMBER(toypop_state::toypop_sound_timer_irq) -{ - if(m_sound_irq_mask) - device.execute().set_input_line(0, HOLD_LINE); -} - -WRITE8_MEMBER(toypop_state::toypop_sound_clear_w) -{ - m_audiocpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); -} - -WRITE8_MEMBER(toypop_state::toypop_sound_assert_w) -{ - m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); -} - -WRITE8_MEMBER(toypop_state::toypop_m68000_clear_w) +class toypop_state : public driver_device { - m_subcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); -} - -WRITE8_MEMBER(toypop_state::toypop_m68000_assert_w) -{ - m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); -} - -void toypop_state::machine_reset() -{ - m_main_irq_mask = 0; - m_maincpu->set_input_line(0, CLEAR_LINE); - - m_sound_irq_mask = 0; - m_audiocpu->set_input_line(0, CLEAR_LINE); - - m_interrupt_enable_68k = 0; -} - -INTERRUPT_GEN_MEMBER(toypop_state::toypop_m68000_interrupt) -{ - if (m_interrupt_enable_68k) - device.execute().set_input_line(6, HOLD_LINE); -} - -WRITE16_MEMBER(toypop_state::toypop_m68000_interrupt_enable_w) -{ - m_interrupt_enable_68k = 1; -} - -WRITE16_MEMBER(toypop_state::toypop_m68000_interrupt_disable_w) -{ - m_interrupt_enable_68k = 0; -} - - - -/************************************* - * - * Main CPU memory handlers - * - *************************************/ - -static ADDRESS_MAP_START( liblrabl_map, AS_PROGRAM, 8, toypop_state ) - AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(toypop_videoram_w) AM_SHARE("videoram") /* video RAM */ - AM_RANGE(0x0800, 0x1fff) AM_RAM AM_SHARE("spriteram") /* general RAM, area 1 */ - AM_RANGE(0x2800, 0x2fff) AM_RAM AM_SHARE("m68k_shared") /* shared RAM with the 68000 CPU */ - AM_RANGE(0x6000, 0x63ff) AM_DEVREADWRITE("namco", namco_15xx_device, sharedram_r, sharedram_w) /* shared RAM with sound CPU */ - AM_RANGE(0x6800, 0x680f) AM_DEVREADWRITE("58xx", namco58xx_device, read, write) /* custom I/O */ - AM_RANGE(0x6810, 0x681f) AM_DEVREADWRITE("56xx_1", namco56xx_device, read, write) /* custom I/O */ - AM_RANGE(0x6820, 0x682f) AM_DEVREADWRITE("56xx_2", namco56xx_device, read, write) /* custom I/O */ - AM_RANGE(0x7000, 0x7000) AM_WRITE(toypop_main_interrupt_enable_w) /* enable interrupt */ - AM_RANGE(0x7800, 0x7800) AM_READ(watchdog_reset_r) AM_WRITE(toypop_main_interrupt_disable_w) /* disable interrupt */ - AM_RANGE(0x8000, 0x8000) AM_WRITE(toypop_m68000_clear_w) /* reset 68000 */ - AM_RANGE(0x8800, 0x8800) AM_WRITE(toypop_m68000_assert_w) /* reset 68000 */ - AM_RANGE(0x9000, 0x9000) AM_WRITE(toypop_sound_clear_w) /* sound CPU reset */ - AM_RANGE(0x9800, 0x9800) AM_WRITE(toypop_sound_assert_w) /* sound CPU reset */ - AM_RANGE(0xa000, 0xa001) AM_WRITE(toypop_palettebank_w) /* background image palette */ - AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM code */ -ADDRESS_MAP_END - -static ADDRESS_MAP_START( toypop_map, AS_PROGRAM, 8, toypop_state ) - AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(toypop_videoram_w) AM_SHARE("videoram") /* video RAM */ - AM_RANGE(0x0800, 0x1fff) AM_RAM AM_SHARE("spriteram") /* general RAM, area 1 */ - AM_RANGE(0x2800, 0x2fff) AM_RAM AM_SHARE("m68k_shared") /* shared RAM with the 68000 CPU */ - AM_RANGE(0x6000, 0x600f) AM_DEVREADWRITE("58xx", namco58xx_device, read, write) /* custom I/O */ - AM_RANGE(0x6010, 0x601f) AM_DEVREADWRITE("56xx_1", namco56xx_device, read, write) /* custom I/O */ - AM_RANGE(0x6020, 0x602f) AM_DEVREADWRITE("56xx_2", namco56xx_device, read, write) /* custom I/O */ - AM_RANGE(0x6800, 0x6bff) AM_DEVREADWRITE("namco", namco_15xx_device, sharedram_r, sharedram_w) /* shared RAM with sound CPU */ - AM_RANGE(0x7000, 0x7000) AM_READWRITE(toypop_main_interrupt_enable_r, toypop_main_interrupt_disable_w) /* disable interrupt */ - AM_RANGE(0x8000, 0x8000) AM_WRITE(toypop_m68000_clear_w) /* reset 68000 */ - AM_RANGE(0x8800, 0x8800) AM_WRITE(toypop_m68000_assert_w) /* reset 68000 */ - AM_RANGE(0x9000, 0x9000) AM_WRITE(toypop_sound_clear_w) /* sound CPU reset */ - AM_RANGE(0x9800, 0x9800) AM_WRITE(toypop_sound_assert_w) /* sound CPU reset */ - AM_RANGE(0xa000, 0xa001) AM_WRITE(toypop_palettebank_w) /* background image palette */ - AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM code */ -ADDRESS_MAP_END - - -/************************************* - * - * Sound CPU memory handlers - * - *************************************/ - -static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, toypop_state ) - AM_RANGE(0x0000, 0x03ff) AM_DEVREADWRITE("namco", namco_15xx_device, sharedram_r, sharedram_w) /* shared RAM with the main CPU + sound registers */ - AM_RANGE(0x2000, 0x2000) AM_WRITE(toypop_sound_interrupt_disable_w) /* ??? toypop doesn't write here */ - AM_RANGE(0x4000, 0x4000) AM_WRITE(toypop_sound_interrupt_enable_acknowledge_w) - AM_RANGE(0x6000, 0x6000) AM_WRITE(watchdog_reset_w) - AM_RANGE(0xe000, 0xffff) AM_ROM -ADDRESS_MAP_END - - - -/************************************* - * - * 68k CPU memory handlers - * - *************************************/ - -static ADDRESS_MAP_START( m68k_map, AS_PROGRAM, 16, toypop_state ) - AM_RANGE(0x000000, 0x007fff) AM_ROM /* ROM code */ - AM_RANGE(0x080000, 0x0bffff) AM_RAM /* RAM */ - AM_RANGE(0x100000, 0x100fff) AM_READWRITE(toypop_m68000_sharedram_r, toypop_m68000_sharedram_w) /* shared RAM with the main CPU */ - AM_RANGE(0x180000, 0x187fff) AM_READWRITE(toypop_merged_background_r, toypop_merged_background_w) /* RAM that has to be merged with the background image */ - AM_RANGE(0x18fffc, 0x18ffff) AM_WRITE(toypop_flipscreen_w) /* flip mode */ - AM_RANGE(0x190000, 0x1dffff) AM_RAM AM_SHARE("bg_image") /* RAM containing the background image */ - AM_RANGE(0x300000, 0x300001) AM_WRITE(toypop_m68000_interrupt_enable_w) /* interrupt enable */ - AM_RANGE(0x380000, 0x380001) AM_WRITE(toypop_m68000_interrupt_disable_w)/* interrupt disable */ -ADDRESS_MAP_END +public: + toypop_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + { } +}; static INPUT_PORTS_START( liblrabl ) - /* The inputs are not memory mapped, they are handled by three I/O chips. */ - PORT_START("P1_RIGHT") /* 58XX #0 pins 22-29 */ - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY - - PORT_START("P2_RIGHT") /* 58XX #0 pins 22-29 */ - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("P1_LEFT") /* 56XX #2 pins 22-29 */ - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY - - PORT_START("P2_LEFT") /* 56XX #2 pins 22-29 */ - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY PORT_COCKTAIL - - PORT_START("BUTTONS") /* 58XX #0 pins 30-33 and 38-41 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_START("COINS") /* 58XX #0 pins 30-33 and 38-41 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) - - PORT_START("DSW1") /* 56XX #1 pins 22-29 */ - /* default setting: all OFF */ - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:8,7") - PORT_DIPSETTING( 0x02, "1" ) - PORT_DIPSETTING( 0x00, "2" ) - PORT_DIPSETTING( 0x03, "3" ) - PORT_DIPSETTING( 0x01, "5" ) - PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWA:6,5,4") - // bonus scores for common - PORT_DIPSETTING( 0x1c, "40k 120k 200k 400k 600k 1m" ) - PORT_DIPSETTING( 0x0c, "40k 140k 250k 400k 700k 1m" ) - // bonus scores for 1, 2 or 3 lives - PORT_DIPSETTING( 0x14, "50k 150k 300k 500k 700k 1m" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) - PORT_DIPSETTING( 0x04, "40k 120k and every 120k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) - PORT_DIPSETTING( 0x18, "40k 150k and every 150k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) - PORT_DIPSETTING( 0x08, "50k 150k 300k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) - PORT_DIPSETTING( 0x10, "40k 120k 200k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) - // bonus scores for 5 lives - PORT_DIPSETTING( 0x14, "40k 120k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) - PORT_DIPSETTING( 0x04, "50k 150k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) - PORT_DIPSETTING( 0x18, "50k 150k and every 150k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) - PORT_DIPSETTING( 0x08, "60k 200k and every 200k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) - PORT_DIPSETTING( 0x10, "50k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) - // bonus scores for common - PORT_DIPSETTING( 0x00, DEF_STR( None ) ) - PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:3,2,1") - PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 3C_2C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 2C_3C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 1C_6C ) ) - - PORT_START("DSW2") /* 56XX #1 pins 30-33 and 38-41 */ - PORT_DIPNAME( 0x01, 0x01, "Freeze" ) PORT_DIPLOCATION("SWB:8") - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, "Rack Test" ) PORT_DIPLOCATION("SWB:7") - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:6") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWB:5,4") - PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 1C_7C ) ) - PORT_DIPNAME( 0x20, 0x20, "Practice" ) PORT_DIPLOCATION("SWB:3") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:2,1") - PORT_DIPSETTING( 0xc0, "A" ) - PORT_DIPSETTING( 0x40, "B" ) - PORT_DIPSETTING( 0x80, "C" ) - PORT_DIPSETTING( 0x00, "D" ) - - PORT_START("SERVICE") /* 56XX #2 pins 30-33 */ - PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) INPUT_PORTS_END static INPUT_PORTS_START( toypop ) - /* The inputs are not memory mapped, they are handled by three I/O chips. */ - PORT_START("P1_RIGHT") /* 58XX #0 pins 22-29 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY - - PORT_START("P2_RIGHT") /* 58XX #0 pins 22-29 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) - - PORT_START("BUTTONS") /* 58XX #0 pins 30-33 and 38-41 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_START("COINS") /* 58XX #0 pins 30-33 and 38-41 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) - - PORT_START("DSW1") /* 56XX #1 pins 22-29 */ - /* default setting: all OFF */ - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:8,7") - PORT_DIPSETTING( 0x02, "1" ) - PORT_DIPSETTING( 0x01, "2" ) - PORT_DIPSETTING( 0x03, "3" ) - PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:6,5") - PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) - PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:4,3") - PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWA:2") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_SERVICE_DIPLOC( 0x80, 0x80, "SWA:1" ) - - PORT_START("DSW2") /* 56XX #1 pins 30-33 and 38-41 */ - PORT_DIPNAME( 0x01, 0x01, "Freeze" ) PORT_DIPLOCATION("SWB:8") - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Level_Select ) ) PORT_DIPLOCATION("SWB:7") - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, "2 Players Game" ) PORT_DIPLOCATION("SWB:6") - PORT_DIPSETTING( 0x00, "1 Credit" ) - PORT_DIPSETTING( 0x04, "2 Credits" ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:5") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, "Entering" ) PORT_DIPLOCATION("SWB:4") // buy in - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) - PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:3,2") - PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x60, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:1") - PORT_DIPSETTING( 0x80, "Every 15000 points" ) - PORT_DIPSETTING( 0x00, "Every 20000 points" ) - - PORT_START("P1_LEFT") /* 56XX #2 pins 22-29 */ - PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("P2_LEFT") /* 56XX #2 pins 22-29 */ - PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("SERVICE") /* 56XX #2 pins 30-33 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) // would be Cabinet, but this game has no cocktail mode - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) // service mode again INPUT_PORTS_END - -static const gfx_layout charlayout = -{ - 8,8, - RGN_FRAC(1,1), - 2, - { 0, 4 }, - { 8*8+0, 8*8+1, 8*8+2, 8*8+3, 0, 1, 2, 3 }, - { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - 16*8 -}; - -static const gfx_layout spritelayout = -{ - 16,16, - RGN_FRAC(1,1), - 2, - { 0, 4 }, - { 0, 1, 2, 3, 8*8, 8*8+1, 8*8+2, 8*8+3, 16*8+0, 16*8+1, 16*8+2, 16*8+3, - 24*8+0, 24*8+1, 24*8+2, 24*8+3 }, - { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, - 32 * 8, 33 * 8, 34 * 8, 35 * 8, 36 * 8, 37 * 8, 38 * 8, 39 * 8 }, - 64*8 -}; - -static GFXDECODE_START( toypop ) - GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 128 ) - GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 128*4, 64 ) -GFXDECODE_END - -/*************************************************************************** - - Custom I/O initialization - -***************************************************************************/ - -READ8_MEMBER(toypop_state::dipA_l){ return ioport("DSW1")->read(); } // dips A -READ8_MEMBER(toypop_state::dipA_h){ return ioport("DSW1")->read() >> 4; } // dips A -READ8_MEMBER(toypop_state::dipB_l){ return ioport("DSW2")->read(); } // dips B -READ8_MEMBER(toypop_state::dipB_h){ return ioport("DSW2")->read() >> 4; } // dips B - -WRITE8_MEMBER(toypop_state::out_coin0) -{ - machine().bookkeeping().coin_lockout_global_w(data & 4); - machine().bookkeeping().coin_counter_w(0, ~data & 8); -} - -WRITE8_MEMBER(toypop_state::out_coin1) -{ - machine().bookkeeping().coin_counter_w(1, ~data & 1); -} - -WRITE8_MEMBER(toypop_state::flip) -{ - flip_screen_set(data & 1); -} - static MACHINE_CONFIG_START( liblrabl, toypop_state ) - - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M6809, 1536000) /* 1.536 MHz (measured on Libble Rabble board) */ - MCFG_CPU_PROGRAM_MAP(liblrabl_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, toypop_main_vblank_irq) - - MCFG_CPU_ADD("audiocpu", M6809, 1536000) - MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, toypop_sound_timer_irq) - - MCFG_CPU_ADD("sub", M68000, 6144000) /* 6.144 MHz (measured on Libble Rabble board) */ - MCFG_CPU_PROGRAM_MAP(m68k_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, toypop_m68000_interrupt) - - MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */ - /* synchronization of the CPUs */ - - MCFG_DEVICE_ADD("58xx", NAMCO58XX, 0) - MCFG_NAMCO58XX_IN_0_CB(IOPORT("COINS")) - MCFG_NAMCO58XX_IN_1_CB(IOPORT("P1_RIGHT")) - MCFG_NAMCO58XX_IN_2_CB(IOPORT("P2_RIGHT")) - MCFG_NAMCO58XX_IN_3_CB(IOPORT("BUTTONS")) - - MCFG_DEVICE_ADD("56xx_1", NAMCO56XX, 0) - MCFG_NAMCO56XX_IN_0_CB(READ8(toypop_state, dipA_h)) - MCFG_NAMCO56XX_IN_1_CB(READ8(toypop_state, dipB_l)) - MCFG_NAMCO56XX_IN_2_CB(READ8(toypop_state, dipB_h)) - MCFG_NAMCO56XX_IN_3_CB(READ8(toypop_state, dipA_l)) - MCFG_NAMCO56XX_OUT_0_CB(WRITE8(toypop_state, flip)) - - MCFG_DEVICE_ADD("56xx_2", NAMCO56XX, 0) - MCFG_NAMCO56XX_IN_1_CB(IOPORT("P1_LEFT")) - MCFG_NAMCO56XX_IN_2_CB(IOPORT("P2_LEFT")) - MCFG_NAMCO56XX_IN_3_CB(IOPORT("SERVICE")) - - /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60.606060) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(36*8, 28*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) - MCFG_SCREEN_UPDATE_DRIVER(toypop_state, screen_update_toypop) - MCFG_SCREEN_PALETTE("palette") - - MCFG_GFXDECODE_ADD("gfxdecode", "palette", toypop) - MCFG_PALETTE_ADD("palette", 128*4+64*4+16*2) - MCFG_PALETTE_INDIRECT_ENTRIES(256) - MCFG_PALETTE_INIT_OWNER(toypop_state, toypop) - - /* sound hardware */ - MCFG_SPEAKER_STANDARD_MONO("mono") - - MCFG_SOUND_ADD("namco", NAMCO_15XX, 24000) - MCFG_NAMCO_AUDIO_VOICES(8) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( toypop, liblrabl ) - - /* basic machine hardware */ - MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_PROGRAM_MAP(toypop_map) - - MCFG_DEVICE_MODIFY("58xx") - MCFG_NAMCO58XX_OUT_0_CB(WRITE8(toypop_state, out_coin0)) - MCFG_NAMCO58XX_OUT_1_CB(WRITE8(toypop_state, out_coin1)) MACHINE_CONFIG_END - -/************************************* - * - * ROM definitions - * - *************************************/ - ROM_START( liblrabl ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* 64k for the first CPU */ + ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "5b.rom", 0x8000, 0x4000, CRC(da7a93c2) SHA1(fe4a02cdab66722eb7b8cf58825f899b1949a6a2) ) ROM_LOAD( "5c.rom", 0xc000, 0x4000, CRC(6cae25dc) SHA1(de74317a7d5de1865d096c377923a764be5e6879) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the second CPU */ + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "2c.rom", 0xe000, 0x2000, CRC(7c09e50a) SHA1(5f004d60bbb7355e008a9cda137b28bc2192b8ef) ) - ROM_REGION( 0x8000, "sub", 0 ) /* 32k for the third CPU */ + ROM_REGION( 0x8000, "sub", 0 ) ROM_LOAD16_BYTE( "8c.rom", 0x0000, 0x4000, CRC(a00cd959) SHA1(cc5621103c31cfbc65941615cab391db0f74e6ce) ) ROM_LOAD16_BYTE("10c.rom", 0x0001, 0x4000, CRC(09ce209b) SHA1(2ed46d6592f8227bac8ab54963d9a300706ade47) ) - /* temporary space for graphics (disposed after conversion) */ ROM_REGION( 0x2000, "gfx1", 0 ) - ROM_LOAD( "5p.rom", 0x0000, 0x2000, CRC(3b4937f0) SHA1(06d9de576f1c2262c34aeb91054e68c9298af688) ) /* characters */ + ROM_LOAD( "5p.rom", 0x0000, 0x2000, CRC(3b4937f0) SHA1(06d9de576f1c2262c34aeb91054e68c9298af688) ) ROM_REGION( 0x4000, "gfx2", 0 ) - ROM_LOAD( "9t.rom", 0x0000, 0x4000, CRC(a88e24ca) SHA1(eada133579f19de09255084dcdc386311606a335) ) /* sprites */ + ROM_LOAD( "9t.rom", 0x0000, 0x4000, CRC(a88e24ca) SHA1(eada133579f19de09255084dcdc386311606a335) ) - ROM_REGION( 0x0600, "proms", 0 ) /* color proms */ - ROM_LOAD( "lr1-3.1r", 0x0000, 0x0100, CRC(f3ec0d07) SHA1(b0aad1fb6df79f202889600f486853995352f9c2) ) // palette: red component - ROM_LOAD( "lr1-2.1s", 0x0100, 0x0100, CRC(2ae4f702) SHA1(838fdca9e91fea4f64a59880ac47c48973bb8fbf) ) // palette: green component - ROM_LOAD( "lr1-1.1t", 0x0200, 0x0100, CRC(7601f208) SHA1(572d070ca387b780030ed5de38a8970b7cc14349) ) // palette: blue component - ROM_LOAD( "lr1-5.5l", 0x0300, 0x0100, CRC(940f5397) SHA1(825a7bd78a8a08d30bad2e4890ae6e9ad88b36b8) ) /* characters */ - ROM_LOAD( "lr1-6.2p", 0x0400, 0x0200, CRC(a6b7f850) SHA1(7cfde16dfd5c4d5b876b4fbe4f924f1385932a93) ) /* sprites */ + ROM_REGION( 0x0600, "proms", 0 ) + ROM_LOAD( "lr1-3.1r", 0x0000, 0x0100, CRC(f3ec0d07) SHA1(b0aad1fb6df79f202889600f486853995352f9c2) ) + ROM_LOAD( "lr1-2.1s", 0x0100, 0x0100, CRC(2ae4f702) SHA1(838fdca9e91fea4f64a59880ac47c48973bb8fbf) ) + ROM_LOAD( "lr1-1.1t", 0x0200, 0x0100, CRC(7601f208) SHA1(572d070ca387b780030ed5de38a8970b7cc14349) ) + ROM_LOAD( "lr1-5.5l", 0x0300, 0x0100, CRC(940f5397) SHA1(825a7bd78a8a08d30bad2e4890ae6e9ad88b36b8) ) + ROM_LOAD( "lr1-6.2p", 0x0400, 0x0200, CRC(a6b7f850) SHA1(7cfde16dfd5c4d5b876b4fbe4f924f1385932a93) ) - ROM_REGION( 0x0100, "namco", 0 ) /* sound prom */ + ROM_REGION( 0x0100, "namco", 0 ) ROM_LOAD( "lr1-4.3d", 0x0000, 0x0100, CRC(16a9166a) SHA1(847cbaf7c88616576c410177e066ae1d792ac0ba) ) ROM_END ROM_START( toypop ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* 64k for the first CPU */ + ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "tp1-2.5b", 0x8000, 0x4000, CRC(87469620) SHA1(2ee257486c9c044386ac7d0cd4a90583eaeb3e97) ) ROM_LOAD( "tp1-1.5c", 0xc000, 0x4000, CRC(dee2fd6e) SHA1(b2c12008d6d3e7544ba3c12a52a6abf9181842c8) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the second CPU */ + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "tp1-3.2c", 0xe000, 0x2000, CRC(5f3bf6e2) SHA1(d1b3335661b9b23cb10001416c515b77b5e783e9) ) - ROM_REGION( 0x8000, "sub", 0 ) /* 32k for the third CPU */ + ROM_REGION( 0x8000, "sub", 0 ) ROM_LOAD16_BYTE( "tp1-4.8c", 0x0000, 0x4000, CRC(76997db3) SHA1(5023a2f20a5f2c9baff130f6832583493c71f883) ) ROM_LOAD16_BYTE("tp1-5.10c", 0x0001, 0x4000, CRC(37de8786) SHA1(710365e34c05d01815844c414518f93234b6160b) ) - /* temporary space for graphics (disposed after conversion) */ ROM_REGION( 0x2000, "gfx1", 0 ) - ROM_LOAD( "tp1-7.5p", 0x0000, 0x2000, CRC(95076f9e) SHA1(1e3d32b21f6d46591ec3921aba51f672d64a9023) ) /* characters */ + ROM_LOAD( "tp1-7.5p", 0x0000, 0x2000, CRC(95076f9e) SHA1(1e3d32b21f6d46591ec3921aba51f672d64a9023) ) ROM_REGION( 0x4000, "gfx2", 0 ) - ROM_LOAD( "tp1-6.9t", 0x0000, 0x4000, CRC(481ffeaf) SHA1(c51735ad3a1dbb46ad414408b54554e9223b2219) ) /* sprites */ + ROM_LOAD( "tp1-6.9t", 0x0000, 0x4000, CRC(481ffeaf) SHA1(c51735ad3a1dbb46ad414408b54554e9223b2219) ) - ROM_REGION( 0x0600, "proms", 0 ) /* color proms */ - ROM_LOAD( "tp1-3.1r", 0x0000, 0x0100, CRC(cfce2fa5) SHA1(b42aa0f34d885389d2650bf7a0531b95703b8a28) ) // palette: red component - ROM_LOAD( "tp1-2.1s", 0x0100, 0x0100, CRC(aeaf039d) SHA1(574560526100d38635aecd71eb73499c4f57d586) ) // palette: green component - ROM_LOAD( "tp1-1.1t", 0x0200, 0x0100, CRC(08e7cde3) SHA1(5261aca6834d635d17f8afaa8e35848930030ba4) ) // palette: blue component - ROM_LOAD( "tp1-4.5l", 0x0300, 0x0100, CRC(74138973) SHA1(2e21dbb1b19dd089da52e70fcb0ca91336e004e6) ) /* characters */ - ROM_LOAD( "tp1-5.2p", 0x0400, 0x0200, CRC(4d77fa5a) SHA1(2438910314b23ecafb553230244f3931861ad2da) ) /* sprites */ + ROM_REGION( 0x0600, "proms", 0 ) + ROM_LOAD( "tp1-3.1r", 0x0000, 0x0100, CRC(cfce2fa5) SHA1(b42aa0f34d885389d2650bf7a0531b95703b8a28) ) + ROM_LOAD( "tp1-2.1s", 0x0100, 0x0100, CRC(aeaf039d) SHA1(574560526100d38635aecd71eb73499c4f57d586) ) + ROM_LOAD( "tp1-1.1t", 0x0200, 0x0100, CRC(08e7cde3) SHA1(5261aca6834d635d17f8afaa8e35848930030ba4) ) + ROM_LOAD( "tp1-4.5l", 0x0300, 0x0100, CRC(74138973) SHA1(2e21dbb1b19dd089da52e70fcb0ca91336e004e6) ) + ROM_LOAD( "tp1-5.2p", 0x0400, 0x0200, CRC(4d77fa5a) SHA1(2438910314b23ecafb553230244f3931861ad2da) ) - ROM_REGION( 0x0100, "namco", 0 ) /* sound prom */ + ROM_REGION( 0x0100, "namco", 0 ) ROM_LOAD( "tp1-6.3d", 0x0000, 0x0100, CRC(16a9166a) SHA1(847cbaf7c88616576c410177e066ae1d792ac0ba) ) ROM_END -// YEAR, NAME, PARENT,MACHINE, INPUT, INIT,MONITOR,COMPANY,FULLNAME,FLAGS -GAME( 1983, liblrabl, 0, liblrabl, liblrabl, driver_device, 0, ROT0, "Namco", "Libble Rabble", 0 ) -GAME( 1986, toypop, 0, toypop, toypop, driver_device, 0, ROT0, "Namco", "Toypop", 0 ) +GAME( 1983, liblrabl, 0, liblrabl, liblrabl, driver_device, 0, ROT0, "Namco", "Libble Rabble", MACHINE_IS_SKELETON ) +GAME( 1986, toypop, 0, toypop, toypop, driver_device, 0, ROT0, "Namco", "Toypop", MACHINE_IS_SKELETON ) diff --git a/src/mame/includes/toypop.h b/src/mame/includes/toypop.h deleted file mode 100644 index 7669fecd778..00000000000 --- a/src/mame/includes/toypop.h +++ /dev/null @@ -1,92 +0,0 @@ -// license:??? -// copyright-holders:Edgardo E. Contini Salvan -#include "machine/namcoio.h" -#include "sound/namco.h" - -class toypop_state : public driver_device -{ -public: - enum - { - TIMER_NAMCOIO_RUN - }; - - toypop_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_videoram(*this, "videoram"), - m_spriteram(*this, "spriteram"), - m_m68000_sharedram(*this, "m68k_shared"), - m_bg_image(*this, "bg_image"), - m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), - m_subcpu(*this, "sub"), - m_namco15xx(*this, "namco"), - m_namco58xx(*this, "58xx"), - m_namco56xx_1(*this, "56xx_1"), - m_namco56xx_2(*this, "56xx_2"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - required_shared_ptr m_videoram; - required_shared_ptr m_spriteram; - required_shared_ptr m_m68000_sharedram; - required_shared_ptr m_bg_image; - - required_device m_maincpu; - required_device m_audiocpu; - required_device m_subcpu; - required_device m_namco15xx; - required_device m_namco58xx; - required_device m_namco56xx_1; - required_device m_namco56xx_2; - required_device m_gfxdecode; - required_device m_palette; - - tilemap_t *m_bg_tilemap; - - int m_bitmapflip; - int m_palettebank; - int m_interrupt_enable_68k; - UINT8 m_main_irq_mask; - UINT8 m_sound_irq_mask; - DECLARE_READ16_MEMBER(toypop_m68000_sharedram_r); - DECLARE_WRITE16_MEMBER(toypop_m68000_sharedram_w); - DECLARE_READ8_MEMBER(toypop_main_interrupt_enable_r); - DECLARE_WRITE8_MEMBER(toypop_main_interrupt_enable_w); - DECLARE_WRITE8_MEMBER(toypop_main_interrupt_disable_w); - DECLARE_WRITE8_MEMBER(toypop_sound_interrupt_enable_acknowledge_w); - DECLARE_WRITE8_MEMBER(toypop_sound_interrupt_disable_w); - DECLARE_WRITE8_MEMBER(toypop_sound_clear_w); - DECLARE_WRITE8_MEMBER(toypop_sound_assert_w); - DECLARE_WRITE8_MEMBER(toypop_m68000_clear_w); - DECLARE_WRITE8_MEMBER(toypop_m68000_assert_w); - DECLARE_WRITE16_MEMBER(toypop_m68000_interrupt_enable_w); - DECLARE_WRITE16_MEMBER(toypop_m68000_interrupt_disable_w); - DECLARE_WRITE8_MEMBER(toypop_videoram_w); - DECLARE_WRITE8_MEMBER(toypop_palettebank_w); - DECLARE_WRITE16_MEMBER(toypop_flipscreen_w); - DECLARE_READ16_MEMBER(toypop_merged_background_r); - DECLARE_WRITE16_MEMBER(toypop_merged_background_w); - DECLARE_READ8_MEMBER(dipA_l); - DECLARE_READ8_MEMBER(dipA_h); - DECLARE_READ8_MEMBER(dipB_l); - DECLARE_READ8_MEMBER(dipB_h); - DECLARE_WRITE8_MEMBER(out_coin0); - DECLARE_WRITE8_MEMBER(out_coin1); - DECLARE_WRITE8_MEMBER(flip); - TILEMAP_MAPPER_MEMBER(tilemap_scan); - TILE_GET_INFO_MEMBER(get_tile_info); - virtual void machine_reset() override; - virtual void video_start() override; - DECLARE_PALETTE_INIT(toypop); - UINT32 screen_update_toypop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(toypop_main_vblank_irq); - INTERRUPT_GEN_MEMBER(toypop_sound_timer_irq); - INTERRUPT_GEN_MEMBER(toypop_m68000_interrupt); - TIMER_CALLBACK_MEMBER(namcoio_run); - void draw_background(bitmap_ind16 &bitmap); - void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 *spriteram_base); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; -}; diff --git a/src/mame/video/toypop.cpp b/src/mame/video/toypop.cpp deleted file mode 100644 index 296da8daaf8..00000000000 --- a/src/mame/video/toypop.cpp +++ /dev/null @@ -1,275 +0,0 @@ -// license:??? -// copyright-holders:Edgardo E. Contini Salvan -/*************************************************************************** - - video.c - - Functions to emulate the video hardware of the machine. - -***************************************************************************/ - -#include "emu.h" -#include "includes/toypop.h" - -/*************************************************************************** - - Convert the color PROMs into a more useable format. - - toypop has three 256x4 palette PROM and two 256x8 color lookup table PROMs - (one for characters, one for sprites). - -***************************************************************************/ - -PALETTE_INIT_MEMBER(toypop_state, toypop) -{ - const UINT8 *color_prom = memregion("proms")->base(); - - for (int i = 0;i < 256;i++) - { - int bit0,bit1,bit2,bit3,r,g,b; - - // red component - bit0 = (color_prom[i] >> 0) & 0x01; - bit1 = (color_prom[i] >> 1) & 0x01; - bit2 = (color_prom[i] >> 2) & 0x01; - bit3 = (color_prom[i] >> 3) & 0x01; - r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; - // green component - bit0 = (color_prom[i+0x100] >> 0) & 0x01; - bit1 = (color_prom[i+0x100] >> 1) & 0x01; - bit2 = (color_prom[i+0x100] >> 2) & 0x01; - bit3 = (color_prom[i+0x100] >> 3) & 0x01; - g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; - // blue component - bit0 = (color_prom[i+0x200] >> 0) & 0x01; - bit1 = (color_prom[i+0x200] >> 1) & 0x01; - bit2 = (color_prom[i+0x200] >> 2) & 0x01; - bit3 = (color_prom[i+0x200] >> 3) & 0x01; - b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; - - palette.set_indirect_color(i, rgb_t(r,g,b)); - } - - for (int i = 0;i < 256;i++) - { - UINT8 entry; - - // characters - palette.set_pen_indirect(i + 0*256, (color_prom[i + 0x300] & 0x0f) | 0x70); - palette.set_pen_indirect(i + 1*256, (color_prom[i + 0x300] & 0x0f) | 0xf0); - // sprites - entry = color_prom[i + 0x500]; - palette.set_pen_indirect(i + 2*256, entry); - } - for (int i = 0;i < 16;i++) - { - // background - palette.set_pen_indirect(i + 3*256 + 0*16, 0x60 + i); - palette.set_pen_indirect(i + 3*256 + 1*16, 0xe0 + i); - } -} - - - -/*************************************************************************** - - Callbacks for the TileMap code - -***************************************************************************/ - -/* convert from 32x32 to 36x28 */ -TILEMAP_MAPPER_MEMBER(toypop_state::tilemap_scan) -{ - int offs; - - row += 2; - col -= 2; - if (col & 0x20) - offs = row + ((col & 0x1f) << 5); - else - offs = col + (row << 5); - - return offs; -} - -TILE_GET_INFO_MEMBER(toypop_state::get_tile_info) -{ - UINT8 attr = m_videoram[tile_index + 0x400]; - SET_TILE_INFO_MEMBER(0, - m_videoram[tile_index], - (attr & 0x3f) + 0x40 * m_palettebank, - 0); -} - - - -/*************************************************************************** - - Start the video hardware emulation. - -***************************************************************************/ - -void toypop_state::video_start() -{ - m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(toypop_state::get_tile_info),this), tilemap_mapper_delegate(FUNC(toypop_state::tilemap_scan),this),8,8,36,28); - - m_bg_tilemap->set_transparent_pen(0); -} - - - -/*************************************************************************** - - Memory handlers - -***************************************************************************/ - -WRITE8_MEMBER(toypop_state::toypop_videoram_w) -{ - m_videoram[offset] = data; - m_bg_tilemap->mark_tile_dirty(offset & 0x3ff); -} - -WRITE8_MEMBER(toypop_state::toypop_palettebank_w) -{ - if (m_palettebank != (offset & 1)) - { - m_palettebank = offset & 1; - machine().tilemap().mark_all_dirty(); - } -} - -WRITE16_MEMBER(toypop_state::toypop_flipscreen_w) -{ - m_bitmapflip = offset & 1; -} - -READ16_MEMBER(toypop_state::toypop_merged_background_r) -{ - int data1, data2; - - // 0x0a0b0c0d is read as 0xabcd - data1 = m_bg_image[2*offset]; - data2 = m_bg_image[2*offset + 1]; - return ((data1 & 0xf00) << 4) | ((data1 & 0xf) << 8) | ((data2 & 0xf00) >> 4) | (data2 & 0xf); -} - -WRITE16_MEMBER(toypop_state::toypop_merged_background_w) -{ - // 0xabcd is written as 0x0a0b0c0d in the background image - if (ACCESSING_BITS_8_15) - m_bg_image[2*offset] = ((data & 0xf00) >> 8) | ((data & 0xf000) >> 4); - - if (ACCESSING_BITS_0_7) - m_bg_image[2*offset+1] = (data & 0xf) | ((data & 0xf0) << 4); -} - -void toypop_state::draw_background(bitmap_ind16 &bitmap) -{ - pen_t pen_base = 0x300 + 0x10*m_palettebank; - - // copy the background image from RAM (0x190200-0x19FDFF) to bitmap - if (m_bitmapflip) - { - int offs = 0xFDFE/2; - for (int y = 0; y < 224; y++) - { - UINT16 *scanline = &bitmap.pix16(y); - for (int x = 0; x < 288; x+=2) - { - UINT16 data = m_bg_image[offs]; - scanline[x] = pen_base | (data & 0x0f); - scanline[x+1] = pen_base | (data >> 8); - offs--; - } - } - } - else - { - int offs = 0x200/2; - for (int y = 0; y < 224; y++) - { - UINT16 *scanline = &bitmap.pix16(y); - for (int x = 0; x < 288; x+=2) - { - UINT16 data = m_bg_image[offs]; - scanline[x] = pen_base | (data >> 8); - scanline[x+1] = pen_base | (data & 0x0f); - offs++; - } - } - } -} - - - -/*************************************************************************** - - Display refresh - -***************************************************************************/ - - -void toypop_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 *spriteram_base) -{ - UINT8 *spriteram = spriteram_base + 0x780; - UINT8 *spriteram_2 = spriteram + 0x800; - UINT8 *spriteram_3 = spriteram_2 + 0x800; - enum { xoffs = -31, yoffs = -8 }; - int flip = flip_screen(); - - for (int offs = 0;offs < 0x80;offs += 2) - { - /* is it on? */ - if ((spriteram_3[offs+1] & 2) == 0) - { - static const UINT8 gfx_offs[2][2] = - { - { 0, 1 }, - { 2, 3 } - }; - int sprite = spriteram[offs]; - int color = spriteram[offs+1]; - int sx = spriteram_2[offs+1] + 0x100 * (spriteram_3[offs+1] & 1) - 40 + xoffs; - int sy = 256 - spriteram_2[offs] + yoffs + 1; // sprites are buffered and delayed by one scanline - int flipx = (spriteram_3[offs] & 0x01); - int flipy = (spriteram_3[offs] & 0x02) >> 1; - int sizex = (spriteram_3[offs] & 0x04) >> 2; - int sizey = (spriteram_3[offs] & 0x08) >> 3; - - sprite &= ~sizex; - sprite &= ~(sizey << 1); - - sy -= 16 * sizey; - sy = (sy & 0xff) - 32; // fix wraparound - - if (flip) - { - flipx ^= 1; - flipy ^= 1; - } - - for (int y = 0;y <= sizey;y++) - { - for (int x = 0;x <= sizex;x++) - { - m_gfxdecode->gfx(1)->transmask(bitmap,cliprect, - sprite + gfx_offs[y ^ (sizey & flipy)][x ^ (sizex & flipx)], - color, - flipx,flipy, - sx + 16*x,sy + 16*y, - m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, 0xff)); - } - } - } - } -} - - -UINT32 toypop_state::screen_update_toypop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - draw_background(bitmap); - m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0); - draw_sprites(bitmap, cliprect, m_spriteram); - return 0; -} -- cgit v1.2.3-70-g09d2 From e90049968708b3e44b94d6bcda51631339dac39e Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Thu, 3 Mar 2016 20:48:33 +0100 Subject: aerofgt.cpp: oki memory map for aerfboot (nw) --- src/mame/drivers/aerofgt.cpp | 21 ++++++++++++++++----- src/mame/includes/aerofgt.h | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/aerofgt.cpp b/src/mame/drivers/aerofgt.cpp index af333697ce9..2ad00982f1a 100644 --- a/src/mame/drivers/aerofgt.cpp +++ b/src/mame/drivers/aerofgt.cpp @@ -129,10 +129,9 @@ WRITE16_MEMBER(aerofgt_state::aerfboo2_okim6295_banking_w) WRITE8_MEMBER(aerofgt_state::aerfboot_okim6295_banking_w) { - UINT8 *oki = memregion("oki")->base(); /*bit 2 (0x4) setted too?*/ if (data & 0x4) - memcpy(&oki[0x20000], &oki[((data & 0x3) * 0x20000) + 0x40000], 0x20000); + membank("okibank")->set_entry(data & 0x3); } static ADDRESS_MAP_START( pspikes_map, AS_PROGRAM, 16, aerofgt_state ) @@ -418,6 +417,11 @@ static ADDRESS_MAP_START( karatblzbl_sound_map, AS_PROGRAM, 8, aerofgt_state ) AM_RANGE(0x7800, 0x7fff) AM_RAM ADDRESS_MAP_END +static ADDRESS_MAP_START( oki_map, AS_0, 8, aerofgt_state ) //only for aerfboot for now + AM_RANGE(0x00000, 0x1ffff) AM_ROM + AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("okibank") +ADDRESS_MAP_END + static INPUT_PORTS_START( pspikes ) PORT_START("IN0") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) @@ -1799,6 +1803,7 @@ static MACHINE_CONFIG_START( aerfboot, aerofgt_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_OKIM6295_ADD("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified + MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END @@ -2696,9 +2701,9 @@ ROM_START( aerfboot ) ROM_LOAD( "afb_ep13.td", 0x000000, 0x40000, CRC(1830f70c) SHA1(1759de9b56e4999defc08b2423eff38ec98c4f17) ) ROM_LOAD( "afb_ep11.tb", 0x040000, 0x40000, CRC(6298c0eb) SHA1(ede63849973742c67637eac0ec9cda95ea2ecebc) ) - ROM_REGION( 0xc0000, "oki", ROMREGION_ERASEFF ) /* sound samples */ + ROM_REGION( 0xa0000, "oki", ROMREGION_ERASEFF ) /* sound samples */ ROM_LOAD( "afb_ep5.u29", 0x000000, 0x20000, CRC(3559609a) SHA1(6f0b633bf74f41487fc98dcdc43a83eb67f3d14c) ) - ROM_LOAD( "afb_ep4.u30", 0x040000, 0x80000, CRC(f9652163) SHA1(d8c1fcf44b350cc65378869e4eb188ea232b4948) ) + ROM_LOAD( "afb_ep4.u30", 0x020000, 0x80000, CRC(f9652163) SHA1(d8c1fcf44b350cc65378869e4eb188ea232b4948) ) ROM_END ROM_START( aerfboo2 ) @@ -2756,6 +2761,12 @@ ROM_START( wbbc97 ) ROM_END +DRIVER_INIT_MEMBER(aerofgt_state, banked_oki) +{ + membank("okibank")->configure_entries(0, 4, memregion("oki")->base() + 0x20000, 0x20000); +} + + GAME( 1990, spinlbrk, 0, spinlbrk, spinlbrk, driver_device, 0, ROT0, "V-System Co.", "Spinal Breakers (World)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL ) GAME( 1990, spinlbrku,spinlbrk, spinlbrk, spinlbrku, driver_device,0, ROT0, "V-System Co.", "Spinal Breakers (US)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL ) GAME( 1990, spinlbrkj,spinlbrk, spinlbrk, spinlbrk, driver_device, 0, ROT0, "V-System Co.", "Spinal Breakers (Japan)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL ) @@ -2785,5 +2796,5 @@ GAME( 1992, aerofgt, 0, aerofgt, aerofgt, driver_device, 0, ROT270, "V GAME( 1992, aerofgtb, aerofgt, aerofgtb, aerofgtb, driver_device, 0, ROT270, "Video System Co.", "Aero Fighters (Taiwan / Japan, set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL ) // probably intended for Taiwan because the Japanese name is Sonic Wings (below) GAME( 1992, aerofgtc, aerofgt, aerofgtb, aerofgtb, driver_device, 0, ROT270, "Video System Co.", "Aero Fighters (Taiwan / Japan, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL ) GAME( 1992, sonicwi, aerofgt, aerofgtb, aerofgtb, driver_device, 0, ROT270, "Video System Co.", "Sonic Wings (Japan)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL ) -GAME( 1992, aerfboot, aerofgt, aerfboot, aerofgtb, driver_device, 0, ROT270, "bootleg", "Aero Fighters (bootleg set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND ) +GAME( 1992, aerfboot, aerofgt, aerfboot, aerofgtb, aerofgt_state, banked_oki, ROT270, "bootleg", "Aero Fighters (bootleg set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND ) GAME( 1992, aerfboo2, aerofgt, aerfboo2, aerofgtb, driver_device, 0, ROT270, "bootleg", "Aero Fighters (bootleg set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/includes/aerofgt.h b/src/mame/includes/aerofgt.h index 194640f805c..a5b8583791e 100644 --- a/src/mame/includes/aerofgt.h +++ b/src/mame/includes/aerofgt.h @@ -107,6 +107,7 @@ public: DECLARE_VIDEO_START(spinlbrk); DECLARE_VIDEO_START(turbofrc); DECLARE_VIDEO_START(wbbc97); + DECLARE_DRIVER_INIT(banked_oki); UINT32 screen_update_pspikes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_spikes91(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_pspikesb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); -- cgit v1.2.3-70-g09d2 From afb2d8e0ef8636f564f64361acdd3791ea073272 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Thu, 3 Mar 2016 20:52:24 +0100 Subject: badlands.cpp: configured banking for the audiocpu instead of memcpy (nw) --- src/mame/drivers/badlands.cpp | 17 ++++++++--------- src/mame/includes/badlands.h | 5 +---- 2 files changed, 9 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/badlands.cpp b/src/mame/drivers/badlands.cpp index e8157cedee2..f0443dac434 100644 --- a/src/mame/drivers/badlands.cpp +++ b/src/mame/drivers/badlands.cpp @@ -217,7 +217,7 @@ MACHINE_RESET_MEMBER(badlands_state,badlands) atarigen_state::machine_reset(); scanline_timer_reset(*m_screen, 32); - memcpy(m_bank_base, &m_bank_source_data[0x0000], 0x1000); + membank("soundbank")->set_entry(0); } @@ -359,7 +359,7 @@ WRITE8_MEMBER(badlands_state::audio_io_w) */ /* update the bank */ - memcpy(m_bank_base, &m_bank_source_data[0x1000 * ((data >> 6) & 3)], 0x1000); + membank("soundbank")->set_entry((data >> 6) & 3); break; } } @@ -405,7 +405,8 @@ static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, badlands_state ) AM_RANGE(0x0000, 0x1fff) AM_RAM AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write) AM_RANGE(0x2800, 0x2bff) AM_READWRITE(audio_io_r, audio_io_w) - AM_RANGE(0x3000, 0xffff) AM_ROM + AM_RANGE(0x3000, 0x3fff) AM_ROMBANK("soundbank") + AM_RANGE(0x4000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -552,9 +553,8 @@ ROM_START( badlands ) ROM_LOAD16_BYTE( "136074-1009.17f", 0x20000, 0x10000, CRC(0e2e807f) SHA1(5b61de066dca12c44335aa68a13c821845657866) ) ROM_LOAD16_BYTE( "136074-1007.24f", 0x20001, 0x10000, CRC(99a20c2c) SHA1(9b0a5a5dafb8816e72330d302c60339b600b49a8) ) - ROM_REGION( 0x14000, "audiocpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136074-1018.9c", 0x10000, 0x4000, CRC(a05fd146) SHA1(d97abbcf7897ca720cc18ff3a323f41cd3b23c34) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136074-1018.9c", 0x00000, 0x10000, CRC(a05fd146) SHA1(d97abbcf7897ca720cc18ff3a323f41cd3b23c34) ) ROM_REGION( 0x60000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136074-1012.4n", 0x000000, 0x10000, CRC(5d124c6c) SHA1(afebaaf90b3751f5e873fc4c45f1d5385ef86a6e) ) /* playfield */ @@ -589,8 +589,7 @@ ROM_END DRIVER_INIT_MEMBER(badlands_state,badlands) { /* initialize the audio system */ - m_bank_base = &memregion("audiocpu")->base()[0x03000]; - m_bank_source_data = &memregion("audiocpu")->base()[0x10000]; + membank("soundbank")->configure_entries(0, 4, memregion("audiocpu")->base(), 0x01000); } @@ -601,7 +600,7 @@ DRIVER_INIT_MEMBER(badlands_state,badlands) * *************************************/ -GAME( 1989, badlands, 0, badlands, badlands, badlands_state, badlands, ROT0, "Atari Games", "Bad Lands", 0 ) +GAME( 1989, badlands, 0, badlands, badlands, badlands_state, badlands, ROT0, "Atari Games", "Bad Lands", MACHINE_SUPPORTS_SAVE ) /* Badlands - Playmark Bootleg support - split this into its own file? diff --git a/src/mame/includes/badlands.h b/src/mame/includes/badlands.h index a23ec09a2c3..fe4e9a68e6d 100644 --- a/src/mame/includes/badlands.h +++ b/src/mame/includes/badlands.h @@ -26,11 +26,8 @@ public: required_device m_mob; UINT8 m_pedal_value[2]; - - UINT8 * m_bank_base; - UINT8 * m_bank_source_data; - UINT8 m_playfield_tile_bank; + virtual void update_interrupts() override; virtual void scanline_update(screen_device &screen, int scanline) override; DECLARE_READ16_MEMBER(sound_busy_r); -- cgit v1.2.3-70-g09d2 From 9a8c6899606f125afecb9b5d5b480e6c08f86ded Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 3 Mar 2016 21:15:37 +0100 Subject: Removed code from Ralf Schaefer and demoted drivers to skeleton and not working (nw) --- scripts/target/mame/mess.lua | 2 - src/mame/drivers/glasgow.cpp | 90 +---- src/mame/drivers/supercon.cpp | 745 +----------------------------------------- src/mame/includes/mboard.h | 122 ------- src/mame/machine/mboard.cpp | 568 -------------------------------- 5 files changed, 17 insertions(+), 1510 deletions(-) delete mode 100644 src/mame/includes/mboard.h delete mode 100644 src/mame/machine/mboard.cpp (limited to 'src') diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 6c0dd4b0894..205302a8671 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -1777,8 +1777,6 @@ files { MAME_DIR .. "src/mame/drivers/mephisto.cpp", MAME_DIR .. "src/mame/drivers/mmodular.cpp", MAME_DIR .. "src/mame/drivers/stratos.cpp", - MAME_DIR .. "src/mame/machine/mboard.cpp", - MAME_DIR .. "src/mame/includes/mboard.h", } createMESSProjects(_target, _subtarget, "hitachi") diff --git a/src/mame/drivers/glasgow.cpp b/src/mame/drivers/glasgow.cpp index d34fb059961..e8922472d5b 100644 --- a/src/mame/drivers/glasgow.cpp +++ b/src/mame/drivers/glasgow.cpp @@ -1,5 +1,5 @@ -// license:??? -// copyright-holders:Dirk Verwiebe, Robbbert, Cowering, Ralf Schaefer +// license:BSD-3-Clause +// copyright-holders:Dirk Verwiebe, Robbbert, Cowering /*************************************************************************** Mephisto Glasgow 3 S chess computer Dirk V. @@ -39,27 +39,19 @@ How to play (quick guide) Note about clickable artwork: You need to be running in windowed mode; and you need to use newui. -R.Schaefer Oct 2010 - -1. everything concerning chessboard moved to machine mboard -2. Border pieces added. This allow setting up and repair chess positons -3. chessboard added for Amsterdam, Dallas 16 Bit, Dallas 32 Bit, Roma 32 Bit -4. Save states added. - ***************************************************************************/ #include "emu.h" #include "cpu/m68000/m68000.h" #include "glasgow.lh" #include "sound/beep.h" -#include "includes/mboard.h" -class glasgow_state : public mboard_state +class glasgow_state : public driver_device { public: glasgow_state(const machine_config &mconfig, device_type type, const char *tag) - : mboard_state(mconfig, type, tag), + : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_beep(*this, "beeper"), m_line0(*this, "LINE0"), @@ -121,7 +113,6 @@ WRITE16_MEMBER( glasgow_state::glasgow_lcd_flag_w ) else { m_led7 = 0; - mboard_key_selector = 1; } } @@ -129,28 +120,17 @@ READ16_MEMBER( glasgow_state::glasgow_keys_r ) { UINT8 data = 0xff; - /* See if any keys pressed */ - data = 3; - - if (mboard_key_select == m_line0->read()) - data &= 1; - - if (mboard_key_select == m_line1->read()) - data &= 2; - return data << 8; } WRITE16_MEMBER( glasgow_state::glasgow_keys_w ) { - mboard_key_select = data >> 8; } WRITE16_MEMBER( glasgow_state::write_lcd ) { UINT8 lcd_data = data >> 8; - output().set_digit_value(m_lcd_shift_counter, mboard_lcd_invert & 1 ? lcd_data^0xff : lcd_data); m_lcd_shift_counter--; m_lcd_shift_counter &= 3; logerror("LCD Offset = %d Data low = %x \n", offset, lcd_data); @@ -159,12 +139,10 @@ WRITE16_MEMBER( glasgow_state::write_lcd ) WRITE16_MEMBER( glasgow_state::write_lcd_flag ) { // UINT8 lcd_flag; - mboard_lcd_invert = 0; // lcd_flag=data >> 8; //m_beep->set_state((data >> 8) & 1 ? 1 : 0); if ((data >> 8) == 0) { - mboard_key_selector = 1; m_led7 = 0; } else @@ -191,16 +169,7 @@ WRITE16_MEMBER( glasgow_state::write_irq_flag ) READ16_MEMBER( glasgow_state::read_newkeys16 ) //Amsterdam, Roma { - UINT16 data; - - if (mboard_key_selector == 0) - data = m_line0->read(); - else - data = m_line1->read(); - - logerror("read Keyboard Offset = %x Data = %x Select = %x \n", offset, data, mboard_key_selector); - data <<= 8; - return data ; + return 0; } @@ -220,9 +189,6 @@ READ16_MEMBER(glasgow_state::read_test) WRITE32_MEMBER( glasgow_state::write_lcd32 ) { - UINT8 lcd_data = data >> 8; - - output().set_digit_value(m_lcd_shift_counter, mboard_lcd_invert & 1 ? lcd_data^0xff : lcd_data); m_lcd_shift_counter--; m_lcd_shift_counter &= 3; //logerror("LCD Offset = %d Data = %x \n ", offset, lcd_data); @@ -232,11 +198,8 @@ WRITE32_MEMBER( glasgow_state::write_lcd_flag32 ) { // UINT8 lcd_flag = data >> 24; - mboard_lcd_invert = 0; - if ((data >> 24) == 0) { - mboard_key_selector = 1; m_led7 = 0; } else @@ -254,17 +217,7 @@ WRITE32_MEMBER( glasgow_state::write_lcd_flag32 ) READ32_MEMBER( glasgow_state::read_newkeys32 ) // Dallas 32, Roma 32 { - UINT32 data; - - if (mboard_key_selector == 0) - data = m_line0->read(); - else - data = m_line1->read(); - //if (mboard_key_selector == 1) data = m_line0->read(); else data = 0; - if(data) - logerror("read Keyboard Offset = %x Data = %x\n", offset, data); - data <<= 24; - return data ; + return 0; } #ifdef UNUSED_FUNCTION @@ -295,28 +248,20 @@ TIMER_DEVICE_CALLBACK_MEMBER(glasgow_state::update_nmi32) void glasgow_state::machine_start() { - mboard_key_selector = 0; m_irq_flag = 0; m_lcd_shift_counter = 3; - - mboard_savestate_register(); } MACHINE_START_MEMBER(glasgow_state,dallas32) { m_lcd_shift_counter = 3; - - mboard_savestate_register(); } void glasgow_state::machine_reset() { m_lcd_shift_counter = 3; - - mboard_set_border_pieces(); - mboard_set_board(); } static ADDRESS_MAP_START(glasgow_mem, AS_PROGRAM, 16, glasgow_state) @@ -325,8 +270,6 @@ static ADDRESS_MAP_START(glasgow_mem, AS_PROGRAM, 16, glasgow_state) AM_RANGE(0x00010000, 0x00010001) AM_WRITE(glasgow_lcd_w) AM_RANGE(0x00010002, 0x00010003) AM_READWRITE(glasgow_keys_r,glasgow_keys_w) AM_RANGE(0x00010004, 0x00010005) AM_WRITE(glasgow_lcd_flag_w) - AM_RANGE(0x00010006, 0x00010007) AM_READWRITE(mboard_read_board_16,mboard_write_LED_16) - AM_RANGE(0x00010008, 0x00010009) AM_WRITE(mboard_write_board_16) AM_RANGE(0x0001c000, 0x0001ffff) AM_RAM // 16KB ADDRESS_MAP_END @@ -337,10 +280,7 @@ static ADDRESS_MAP_START(amsterd_mem, AS_PROGRAM, 16, glasgow_state) AM_RANGE(0x00800002, 0x00800003) AM_WRITE(write_lcd) AM_RANGE(0x00800008, 0x00800009) AM_WRITE(write_lcd_flag) AM_RANGE(0x00800004, 0x00800005) AM_WRITE(write_irq_flag) - AM_RANGE(0x00800010, 0x00800011) AM_WRITE(mboard_write_board_16) - AM_RANGE(0x00800020, 0x00800021) AM_READ(mboard_read_board_16) AM_RANGE(0x00800040, 0x00800041) AM_READ(read_newkeys16) - AM_RANGE(0x00800088, 0x00800089) AM_WRITE(mboard_write_LED_16) AM_RANGE(0x00ffc000, 0x00ffffff) AM_RAM // 16KB ADDRESS_MAP_END @@ -352,10 +292,7 @@ static ADDRESS_MAP_START(dallas32_mem, AS_PROGRAM, 32, glasgow_state) AM_RANGE(0x00800000, 0x00800003) AM_WRITE(write_lcd32) AM_RANGE(0x00800004, 0x00800007) AM_WRITE(write_beeper32) AM_RANGE(0x00800008, 0x0080000B) AM_WRITE(write_lcd_flag32) - AM_RANGE(0x00800010, 0x00800013) AM_WRITE(mboard_write_board_32) - AM_RANGE(0x00800020, 0x00800023) AM_READ(mboard_read_board_32) AM_RANGE(0x00800040, 0x00800043) AM_READ(read_newkeys32) - AM_RANGE(0x00800088, 0x0080008b) AM_WRITE(mboard_write_LED_32) ADDRESS_MAP_END static INPUT_PORTS_START( new_keyboard ) //Amsterdam, Dallas 32, Roma, Roma 32 @@ -407,12 +344,10 @@ INPUT_PORTS_EXTERN( chessboard); static INPUT_PORTS_START( oldkeys ) PORT_INCLUDE( old_keyboard ) - PORT_INCLUDE( chessboard ) INPUT_PORTS_END static INPUT_PORTS_START( newkeys ) PORT_INCLUDE( new_keyboard ) - PORT_INCLUDE( chessboard ) INPUT_PORTS_END static MACHINE_CONFIG_START( glasgow, glasgow_state ) @@ -424,7 +359,6 @@ static MACHINE_CONFIG_START( glasgow, glasgow_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", glasgow_state, update_nmi, attotime::from_hz(50)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", glasgow_state, mboard_update_artwork, attotime::from_hz(100)) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( amsterd, glasgow ) @@ -500,10 +434,10 @@ ROM_END ***************************************************************************/ /* YEAR, NAME, PARENT, COMPAT, MACHINE, INPUT, INIT, COMPANY, FULLNAME, FLAGS */ -CONS( 1984, glasgow, 0, 0, glasgow, oldkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto III S Glasgow", MACHINE_SUPPORTS_SAVE) -CONS( 1984, amsterd, 0, 0, amsterd, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Amsterdam", MACHINE_SUPPORTS_SAVE) -CONS( 1984, dallas, glasgow, 0, glasgow, oldkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas", MACHINE_SUPPORTS_SAVE) +CONS( 1984, glasgow, 0, 0, glasgow, oldkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto III S Glasgow", MACHINE_NOT_WORKING) +CONS( 1984, amsterd, 0, 0, amsterd, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Amsterdam", MACHINE_NOT_WORKING) +CONS( 1984, dallas, glasgow, 0, glasgow, oldkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas", MACHINE_NOT_WORKING) CONS( 1984, roma, amsterd, 0, glasgow, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Roma", MACHINE_NOT_WORKING) -CONS( 1984, dallas32, amsterd, 0, dallas32, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas 32 Bit", MACHINE_SUPPORTS_SAVE) -CONS( 1984, roma32, amsterd, 0, dallas32, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Roma 32 Bit", MACHINE_SUPPORTS_SAVE) -CONS( 1984, dallas16, amsterd, 0, amsterd, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas 16 Bit", MACHINE_SUPPORTS_SAVE) +CONS( 1984, dallas32, amsterd, 0, dallas32, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas 32 Bit", MACHINE_NOT_WORKING) +CONS( 1984, roma32, amsterd, 0, dallas32, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Roma 32 Bit", MACHINE_NOT_WORKING) +CONS( 1984, dallas16, amsterd, 0, amsterd, newkeys, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Dallas 16 Bit", MACHINE_NOT_WORKING) diff --git a/src/mame/drivers/supercon.cpp b/src/mame/drivers/supercon.cpp index f40be537c43..cfdabc21650 100644 --- a/src/mame/drivers/supercon.cpp +++ b/src/mame/drivers/supercon.cpp @@ -1,9 +1,7 @@ -// license:??? -// copyright-holders:Ralf Schaefer, Robbbert +// license:BSD-3-Clause +// copyright-holders:Robbbert /****************************************************************************** Novag SuperConstellation Chess Computer - 2010 R. Schaefer - CPU 6502 Clock 4 MHz @@ -30,756 +28,25 @@ public: supercon_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_beep(*this, "beeper"), - m_b_white(*this, "B_WHITE"), - m_b_black(*this, "B_BLACK"), - m_b_clr(*this, "B_CLR"), - m_status_1(*this, "STATUS_1"), - m_status_2(*this, "STATUS_2"), - m_status_3(*this, "STATUS_3"), - m_status_4(*this, "STATUS_4"), - m_status_5(*this, "STATUS_5"), - m_status_6(*this, "STATUS_6"), - m_status_7(*this, "STATUS_7"), - m_status_8(*this, "STATUS_8"), - m_board_1(*this, "BOARD_1"), - m_board_2(*this, "BOARD_2"), - m_board_3(*this, "BOARD_3"), - m_board_4(*this, "BOARD_4"), - m_board_5(*this, "BOARD_5"), - m_board_6(*this, "BOARD_6"), - m_board_7(*this, "BOARD_7"), - m_board_8(*this, "BOARD_8") { } + m_beep(*this, "beeper") + { } required_device m_maincpu; required_device m_beep; - DECLARE_READ8_MEMBER(supercon_port1_r); - DECLARE_READ8_MEMBER(supercon_port2_r); - DECLARE_READ8_MEMBER(supercon_port3_r); - DECLARE_READ8_MEMBER(supercon_port4_r); - DECLARE_WRITE8_MEMBER(supercon_port1_w); - DECLARE_WRITE8_MEMBER(supercon_port2_w); - DECLARE_WRITE8_MEMBER(supercon_port3_w); - DECLARE_WRITE8_MEMBER(supercon_port4_w); - static const UINT8 m_border_pieces[12]; - emu_timer* m_timer_update_irq; - emu_timer* m_timer_mouse_click; - int m_emu_started; - int m_moving_piece; - UINT8 m_data_1E00; - UINT8 m_data_1F00; - UINT8 m_LED_18; - UINT8 m_LED_AH; - UINT8 m_LED_ST; - UINT8 *m_last_LED; - UINT8 m_last_LED_value; - int m_led_update; - int m_remove_led_flag; - int m_selecting; - int m_save_key_data; - attotime m_wait_time; - int *m_current_field; - int m_confirm_board_click; - int m_board[64]; - int m_save_board[64]; - void set_board(); - void set_pieces(); - void set_border_pieces(); - void clear_pieces(); - void update_leds(); - virtual void machine_reset() override; - DECLARE_DRIVER_INIT(supercon); - virtual void machine_start() override; - TIMER_CALLBACK_MEMBER(mouse_click); - TIMER_CALLBACK_MEMBER(update_irq); - TIMER_DEVICE_CALLBACK_MEMBER(update_artwork); - void board_presave(); - void board_postload(); - -protected: - required_ioport m_b_white; - required_ioport m_b_black; - required_ioport m_b_clr; - required_ioport m_status_1; - required_ioport m_status_2; - required_ioport m_status_3; - required_ioport m_status_4; - required_ioport m_status_5; - required_ioport m_status_6; - required_ioport m_status_7; - required_ioport m_status_8; - required_ioport m_board_1; - required_ioport m_board_2; - required_ioport m_board_3; - required_ioport m_board_4; - required_ioport m_board_5; - required_ioport m_board_6; - required_ioport m_board_7; - required_ioport m_board_8; - void mouse_update(); - int get_first_cleared_bit(UINT8 data); - int get_first_bit(UINT8 data); }; - -#define VERBOSE 0 -#define LOG(x) do { if (VERBOSE) logerror x; } while (0) - -enum -{ - EM, /*No piece*/ - BP, - BN, - BB, - BR, - BQ, - BK, - WP, - WN, - WB, - WR, - WQ, - WK -}; - - -#define LED_LINE_AH 0x10 -#define LED_LINE_ST 0x20 -#define LED_LINE_18 0x40 - - #define MAIN_CLOCK 4000000 /* 4 MHz */ - -#define NOT_VALID 99 - -#define NO_ACTION 0 -#define TAKE 1 -#define SET 2 - -/* artwork board */ - -const UINT8 supercon_state::m_border_pieces[12] = {WK,WQ,WR,WB,WN,WP,BK,BQ,BR,BB,BN,BP}; - -void supercon_state::set_board() -{ - static const int start_board[64] = { - BR, BN, BB, BQ, BK, BB, BN, BR, - BP, BP, BP, BP, BP, BP, BP, BP, - EM, EM, EM, EM, EM, EM, EM, EM, - EM, EM, EM, EM, EM, EM, EM, EM, - EM, EM, EM, EM, EM, EM, EM, EM, - EM, EM, EM, EM, EM, EM, EM, EM, - WP, WP, WP, WP, WP, WP, WP, WP, - WR, WN, WB, WQ, WK, WB, WN, WR }; - - for (UINT8 i=0; i<64; i++) - m_board[i]=start_board[i]; -} - -void supercon_state::set_pieces() -{ - int i; - for (i=0;i<64;i++) - output().set_indexed_value("P", i, m_board[i]); -} - -void supercon_state::set_border_pieces() -{ - UINT8 i; - - for (i=0;i<12;i++) - output().set_indexed_value("Q", i, m_border_pieces[i]); -} - -void supercon_state::clear_pieces() -{ - int i; - for (i=0;i<64;i++) - { - output().set_indexed_value("P", i, EM); - m_board[i]=EM; - } -} - -int supercon_state::get_first_cleared_bit(UINT8 data) -{ - int i; - - for (i = 0; i < 8; i++) - if (!BIT(data, i)) - return i; - - return NOT_VALID; -} - -int supercon_state::get_first_bit(UINT8 data) -{ - int i; - - for (i = 0; i < 8; i++) - if (BIT(data, i)) - return i; - - return NOT_VALID; -} - - -void supercon_state::update_leds() -{ - int i; - - for (i = 0; i < 8; i++) - { - if (BIT(m_LED_18, i)) - output().set_led_value(i + 1, 1); - else - output().set_led_value(i + 1, 0); - - if (BIT(m_LED_AH, i)) - output().set_led_value(i + 9, 1); - else - output().set_led_value(i + 9, 0); - - if (BIT(m_LED_ST, i)) - output().set_led_value(i + 17, 1); - else - output().set_led_value(i + 17, 0); - } -} - -void supercon_state::mouse_update() -{ - UINT8 port_input; // m_left; - int i; - -/* border pieces and moving piece */ - - port_input = m_b_white->read(); - if (port_input) - { - i = get_first_bit(port_input); - m_moving_piece = m_border_pieces[i]; - output().set_value("MOVING", m_moving_piece); - return; - } - - - port_input = m_b_black->read(); - if (port_input) - { - i = get_first_bit(port_input); - m_moving_piece = m_border_pieces[6+i]; - output().set_value("MOVING", m_moving_piece); - return; - } - - - port_input = m_b_clr->read(); - if (port_input) - { - if (m_moving_piece) - { - m_moving_piece=0; - output().set_value("MOVING", m_moving_piece); - return; - } - } -} - -/* Driver initialization */ - -DRIVER_INIT_MEMBER(supercon_state,supercon) -{ - m_LED_18=0; - m_LED_AH=0; - m_LED_ST=0; - - m_wait_time = attotime::from_hz(4); - m_save_key_data = 0xff; - - m_moving_piece=0; -} - -/* Read 1C000 */ - -READ8_MEMBER( supercon_state::supercon_port1_r ) -{ - LOG(("Read from %04x \n",0x1C00)); - return 0xff; -} - -/* Read 1D000 */ - -READ8_MEMBER( supercon_state::supercon_port2_r ) -{ - LOG(("Read from %04x \n",0x1D00)); - return 0xff; -} - -/* Read 1E00 */ - -READ8_MEMBER( supercon_state::supercon_port3_r ) -{ - int i; - UINT8 key_data=0; - - static const char *const status_lines[8] = - { "STATUS_1", "STATUS_2", "STATUS_3", "STATUS_4", "STATUS_5", "STATUS_6", "STATUS_7", "STATUS_8" }; - - LOG(("Read from %04x \n",0x1E00)); - -/* remove last bit (only if it was not already set) */ - - if ( m_data_1F00 & LED_LINE_AH ) - { - if (m_last_LED_value != m_LED_AH) - m_LED_AH=m_LED_AH & ~m_data_1E00; - } - else if ( m_data_1F00 & LED_LINE_ST) - { - if (m_last_LED_value != m_LED_ST) - m_LED_ST=m_LED_ST & ~m_data_1E00; - } - else if ( m_data_1F00 & LED_LINE_18 ) - { - if (m_last_LED_value != m_LED_18) - m_LED_18=m_LED_18 & ~m_data_1E00; - } - - - LOG(("LED_18 from %02x \n",m_LED_18)); - LOG(("LED_AH from %02x \n",m_LED_AH)); - LOG(("LED_ST from %02x \n",m_LED_ST)); - - if (m_led_update) /*No LED Update if Port 1C00,1D00 was read */ - update_leds(); - - m_remove_led_flag=TRUE; - m_led_update=TRUE; - - m_LED_18=0; - m_LED_AH=0; - m_LED_ST=0; - - -/* Start */ - - if (!m_emu_started) - return 0xbf; - else - m_timer_update_irq->adjust( attotime::zero, 0, attotime::from_hz(598) ); //HACK adjust timer after start ??? - - -/* Buttons */ - - i=get_first_bit(m_data_1E00); - if (i==NOT_VALID) - return 0xff; - - switch ( i ) - { - case 0: key_data=m_status_1->read(); break; - case 1: key_data=m_status_2->read(); break; - case 2: key_data=m_status_3->read(); break; - case 3: key_data=m_status_4->read(); break; - case 4: key_data=m_status_5->read(); break; - case 5: key_data=m_status_6->read(); break; - case 6: key_data=m_status_7->read(); break; - case 7: key_data=m_status_8->read(); break; - } - - if (key_data != 0xc0) - { - LOG(("%s, key_data: %02x \n",status_lines[i],key_data)); - -/* Button: New Game -> initialize board */ - - if (i==0 && key_data==0x80) - { - set_board(); - set_pieces(); - - m_emu_started=FALSE; - } - -/* Button: Clear Board -> remove all pieces */ - - if (i==3 && key_data==0x80) - clear_pieces(); - - if (key_data != 0xff ) - return key_data; - } - - return 0xc0; -} - -/* Read Port $1F00 */ - -READ8_MEMBER( supercon_state::supercon_port4_r ) -{ - int i_18, i_AH; - UINT8 key_data = 0x00; - - static const char *const board_lines[8] = - { "BOARD_1", "BOARD_2", "BOARD_3", "BOARD_4", "BOARD_5", "BOARD_6", "BOARD_7", "BOARD_8" }; - - LOG(("Read from %04x \n",0x1F00)); - -/* Board buttons */ - - i_18=get_first_bit(m_data_1E00); - if (i_18==NOT_VALID) - return 0xff; - -/* if a button was pressed wait til timer -timer_mouse_click- is fired */ - - if (m_selecting) - return m_save_key_data; - else - { - set_pieces(); - output().set_value("MOVING",m_moving_piece); - } - - switch ( i_18 ) - { - case 0: key_data=m_board_1->read(); break; - case 1: key_data=m_board_2->read(); break; - case 2: key_data=m_board_3->read(); break; - case 3: key_data=m_board_4->read(); break; - case 4: key_data=m_board_5->read(); break; - case 5: key_data=m_board_6->read(); break; - case 6: key_data=m_board_7->read(); break; - case 7: key_data=m_board_8->read(); break; - } - - if (key_data != 0xff) - { - LOG(("%s key_data: %02x \n",board_lines[i_18],key_data)); - -/* Only if valid data */ - - if (key_data) - { -/* Set or remove pieces */ - - i_AH=7-get_first_cleared_bit(key_data); - LOG(("Press -> AH: %d 18: %d Piece: %d\n",i_AH,i_18,m_board[i_18*8 + i_AH]);); - - m_current_field=&m_board[i_18*8 + i_AH]; - - if (m_moving_piece) - { - *m_current_field = m_moving_piece; - m_moving_piece = EM; - } - else - { - m_moving_piece = *m_current_field; - *m_current_field = EM; - } - m_selecting=TRUE; /* Flag is removed in timer -timer_mouse_click- */ - m_save_key_data=key_data; /* return same key_data til flag selecting is removed */ - - m_timer_mouse_click->adjust(m_wait_time, 0); - - return key_data; - } - } - - return 0xff; -} - -/* Write Port $1C00 */ - -WRITE8_MEMBER( supercon_state::supercon_port1_w ) -{ - LOG(("Write from %04x data: %02x\n",0x1C00,data)); - m_led_update=FALSE; -} - -/* Write Port $1D00 */ - -WRITE8_MEMBER( supercon_state::supercon_port2_w ) -{ - LOG(("Write from %04x data: %02x\n",0x1D00,data)); - m_led_update=FALSE; -} - -/* Write Port $1E00 */ - -WRITE8_MEMBER( supercon_state::supercon_port3_w ) -{ - if (data) - LOG(("Write from %04x data: %02x\n",0x1E00,data)); - - if (data) - { - m_data_1E00=data; - -/* Set bits for LED's */ - - if ( m_data_1F00) - { - if (m_data_1F00 & LED_LINE_AH ) - { - m_last_LED = &m_LED_AH; /* save last value */ - m_last_LED_value = *m_last_LED; - - m_LED_AH=m_LED_AH | m_data_1E00; - } - else if (m_data_1F00 & LED_LINE_ST ) - { - m_last_LED = &m_LED_ST; - m_last_LED_value = *m_last_LED; - - m_LED_ST=m_LED_ST | m_data_1E00; - } - else if (m_data_1F00 & LED_LINE_18) - { - m_last_LED = &m_LED_18; - m_last_LED_value = *m_last_LED; - - m_LED_18=m_LED_18 | m_data_1E00; - } - } - } - - // The IRQ handler writes to both 0x1E00 (1x) and 0x1F00 (2x) ports. - // Not 100% sure if this is the correct place for clearing the IRQ - // line. - m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); -} - -/* Write Port $1F00 */ - -WRITE8_MEMBER( supercon_state::supercon_port4_w ) -{ - if (data) - LOG(("Write from %04x data: %02x\n",0x1F00,data)); - - if (data) - m_data_1F00=data; - -/* Bit 7 is set -> Buzzer on */ - - if ( m_data_1F00 & 0x80 ) - { - m_beep->set_state(1); - m_emu_started=TRUE; - } - else - m_beep->set_state(0); -} - -TIMER_CALLBACK_MEMBER(supercon_state::mouse_click) -{ - m_selecting=FALSE; -} - -TIMER_DEVICE_CALLBACK_MEMBER(supercon_state::update_artwork) -{ - mouse_update(); -} - -TIMER_CALLBACK_MEMBER(supercon_state::update_irq) -{ - m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); -} - -/* Save state call backs */ - -void supercon_state::board_presave() -{ - for (int i=0;i<64;i++) - { - m_save_board[i] = m_board[i]; - } -} - -void supercon_state::board_postload() -{ - for (int i=0;i<64;i++) - { - m_board[i] = m_save_board[i]; - } - - set_pieces(); -} - -void supercon_state::machine_start() -{ - m_timer_update_irq = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(supercon_state::update_irq),this)); - m_timer_update_irq->adjust( attotime::zero, 0, attotime::from_hz(1000) ); - m_timer_mouse_click = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(supercon_state::mouse_click),this),nullptr); - save_item(NAME(m_save_board)); - machine().save().register_postload(save_prepost_delegate(FUNC(supercon_state::board_postload),this)); - machine().save().register_presave(save_prepost_delegate(FUNC(supercon_state::board_presave),this)); -} - -void supercon_state::machine_reset() -{ - set_board(); - set_pieces(); - set_border_pieces(); - - m_emu_started=FALSE; -} - /* Address maps */ static ADDRESS_MAP_START(supercon_mem, AS_PROGRAM, 8, supercon_state) AM_RANGE( 0x0000, 0x0fff) AM_RAM AM_RANGE( 0x2000, 0x7fff) AM_ROM AM_RANGE( 0x8000, 0xffff) AM_ROM - - AM_RANGE( 0x1C00, 0x1C00) AM_WRITE ( supercon_port1_w ) - AM_RANGE( 0x1D00, 0x1D00) AM_WRITE ( supercon_port2_w ) - AM_RANGE( 0x1E00, 0x1E00) AM_WRITE ( supercon_port3_w ) - AM_RANGE( 0x1F00, 0x1F00) AM_WRITE ( supercon_port4_w ) - - AM_RANGE( 0x1C00, 0x1C00) AM_READ ( supercon_port1_r ) - AM_RANGE( 0x1D00, 0x1D00) AM_READ ( supercon_port2_r ) - AM_RANGE( 0x1E00, 0x1E00) AM_READ ( supercon_port3_r ) - AM_RANGE( 0x1F00, 0x1F00) AM_READ ( supercon_port4_r ) ADDRESS_MAP_END /* Input ports */ static INPUT_PORTS_START( supercon ) - - PORT_START("BOARD_1") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("BOARD_2") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("BOARD_3") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("BOARD_4") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("BOARD_5") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("BOARD_6") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("BOARD_7") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("BOARD_8") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("STATUS_1") - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("STATUS_2") - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("STATUS_3") - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("STATUS_4") - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("STATUS_5") - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("STATUS_6") - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("STATUS_7") - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("STATUS_8") - PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("B_WHITE") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) - - PORT_START("B_BLACK") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) - - PORT_START("B_CLR") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) - INPUT_PORTS_END /* Machine driver */ @@ -793,8 +60,6 @@ static MACHINE_CONFIG_START( supercon, supercon_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("beeper", BEEP, 3250) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", supercon_state, update_artwork, attotime::from_hz(20)) MACHINE_CONFIG_END /* ROM definition */ @@ -808,4 +73,4 @@ ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -CONS( 1983, supercon, 0, 0, supercon, supercon, supercon_state, supercon, "Novag", "SuperConstellation", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1983, supercon, 0, 0, supercon, supercon, driver_device, 0, "Novag", "SuperConstellation", MACHINE_IS_SKELETON ) diff --git a/src/mame/includes/mboard.h b/src/mame/includes/mboard.h deleted file mode 100644 index b6e8c5028f4..00000000000 --- a/src/mame/includes/mboard.h +++ /dev/null @@ -1,122 +0,0 @@ -// license:??? -// copyright-holders:Ralf Schaefer, Cowering -/********************************************************************** - - Mephisto Chess Computers - -**********************************************************************/ - -#ifndef __MBOARD_H__ -#define __MBOARD_H__ - -/*************************************************************************** - MACROS -***************************************************************************/ - -enum -{ - EM, /*No piece*/ - BP, - BN, - BB, - BR, - BQ, - BK, - WP, - WN, - WB, - WR, - WQ, - WK -}; - -#define NOT_VALID 99 -#define BORDER_PIECE 64 - - -/*************************************************************************** - FUNCTION PROTOTYPES -***************************************************************************/ - -class mboard_state : public driver_device -{ -public: - mboard_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_line(*this, "LINE"), - m_line10(*this, "LINE10"), - m_b_white(*this, "B_WHITE"), - m_b_black(*this, "B_BLACK"), - m_b_buttons(*this, "B_BUTTONS"), - m_mouse_x(*this, "MOUSE_X"), - m_mouse_y(*this, "MOUSE_Y"), - m_button_l(*this, "BUTTON_L"), - m_button_r(*this, "BUTTON_R") - { } - - DECLARE_READ8_MEMBER(mboard_read_board_8); - DECLARE_WRITE8_MEMBER(mboard_write_board_8); - DECLARE_WRITE8_MEMBER(mboard_write_LED_8); - - DECLARE_READ16_MEMBER(mboard_read_board_16); - DECLARE_WRITE16_MEMBER(mboard_write_board_16); - DECLARE_WRITE16_MEMBER(mboard_write_LED_16); - - DECLARE_READ32_MEMBER(mboard_read_board_32); - DECLARE_WRITE32_MEMBER(mboard_write_board_32); - DECLARE_WRITE32_MEMBER(mboard_write_LED_32); - - TIMER_DEVICE_CALLBACK_MEMBER( mboard_update_artwork); - - void mboard_savestate_register(); - - void mboard_set_board(); - void mboard_set_border_pieces(); - - inline UINT8 pos_to_num(UINT8 val); - - UINT8 mboard_lcd_invert; - UINT8 mboard_key_select; - UINT8 mboard_key_selector; - - int get_first_cleared_bit(UINT8 data); -private: - static const int start_board[64]; - static UINT8 border_pieces[12]; - - int m_board[64]; - int save_board[64]; - UINT16 Line18_LED; - UINT16 Line18_REED; - - int mouse_hold_border_piece; - UINT8 mouse_hold_from; - UINT8 mouse_hold_piece; - - int read_board_flag; - int get_first_bit(UINT8 data); - UINT8 read_board(); - void write_board(UINT8 data); - void write_LED(UINT8 data); - void board_presave(); - void board_postload(); - void clear_board(); - void set_artwork(); - void check_board_buttons(); -public: - required_device m_maincpu; - required_ioport_array<8> m_line; - required_ioport m_line10; - required_ioport m_b_white; - required_ioport m_b_black; - required_ioport m_b_buttons; - required_ioport m_mouse_x; - required_ioport m_mouse_y; - required_ioport m_button_l; - required_ioport m_button_r; -}; - - - -#endif /* __MBOARD_H__ */ diff --git a/src/mame/machine/mboard.cpp b/src/mame/machine/mboard.cpp deleted file mode 100644 index 255391d5bb8..00000000000 --- a/src/mame/machine/mboard.cpp +++ /dev/null @@ -1,568 +0,0 @@ -// license:??? -// copyright-holders:Ralf Schaefer, Cowering -/********************************************************************** - - Mephisto Chess Computers - -**********************************************************************/ -#include "emu.h" -#include "includes/mboard.h" -/*************************************************************************** - TYPE DEFINITIONS -***************************************************************************/ - -#define IsPiece(x) ((m_board[x] >=1) && (m_board[x] <=12)) - -const int mboard_state::start_board[64] = -{ - BR, BN, BB, BQ, BK, BB, BN, BR, - BP, BP, BP, BP, BP, BP, BP, BP, - EM, EM, EM, EM, EM, EM, EM, EM, - EM, EM, EM, EM, EM, EM, EM, EM, - EM, EM, EM, EM, EM, EM, EM, EM, - EM, EM, EM, EM, EM, EM, EM, EM, - WP, WP, WP, WP, WP, WP, WP, WP, - WR, WN, WB, WQ, WK, WB, WN, WR -}; - -UINT8 mboard_state::border_pieces[12] = {WK,WQ,WR,WB,WN,WP,BK,BQ,BR,BB,BN,BP,}; - - -int mboard_state::get_first_bit(UINT8 data) -{ - int i; - - for (i = 0; i < 8; i++) - if (BIT(data, i)) - return i; - - return NOT_VALID; -} - - -inline UINT8 mboard_state::pos_to_num(UINT8 val) -{ - switch (val) - { - case 0xfe: return 7; - case 0xfd: return 6; - case 0xfb: return 5; - case 0xf7: return 4; - case 0xef: return 3; - case 0xdf: return 2; - case 0xbf: return 1; - case 0x7f: return 0; - default: return 0xff; - } -} - -int mboard_state::get_first_cleared_bit(UINT8 data) -{ - int i; - - for (i=0;i<8;i++) - if (!BIT(data, i)) - return i; - - return NOT_VALID; -} - -UINT8 mboard_state::read_board() -{ - UINT8 i_18, i_AH; - UINT8 data; - - data = 0xff; - -/* - -Example board scan: -Starting postion and pawn on E2 is lifted - - -mask: 7f 0111 1111 Line 8 -data: 0 0000 0000 all fields occupied -mask: bf 1011 1111 Line 7 -data: 0 0000 0000 all fields occupied -mask: df 1101 1111 Line 6 -data: ff 1111 1111 all fields empty -mask: ef 1110 1111 Line 5 -data: ff 1111 1111 all fields empty -mask: f7 1111 0111 Line 4 -data: ff 1111 1111 all fields empty -mask: fb 1111 1011 Line 3 -data: ff 1111 1111 all fields empty -mask: fd 1111 1101 Line 2 -data: 10 0001 0000 E2 is empty rest is occupied -mask: fe 1111 1110 Line 1 -data: 0 0000 0000 all fields occupied - - -*/ - -/* looking for cleared bit in mask Line18_REED => current line */ - - if (data && Line18_REED) - { - i_18 = get_first_cleared_bit(Line18_REED); - - if (i_18 == NOT_VALID) - printf("No cleared bit in mask Line18_REED!\n"); - else - { - /* looking for a piece in this line and clear bit in data if found */ - - for (i_AH = 0; i_AH < 8; i_AH = i_AH + 1) - if (IsPiece(64 - (i_18 * 8 + 8 - i_AH))) - data &= ~(1 << i_AH); // clear bit - - read_board_flag = TRUE; - } - } - - return data; -} - - -void mboard_state::write_board(UINT8 data) -{ - Line18_REED=data; - - if (read_board_flag && !strcmp(machine().system().name,"glasgow") ) //HACK - Line18_LED = 0; - else - Line18_LED = data; - - read_board_flag = FALSE; - - if (data == 0xff) - mboard_key_selector = 0; -} - - - -void mboard_state::write_LED(UINT8 data) -{ - int i; - UINT8 i_AH, i_18; - UINT8 LED; - - mboard_lcd_invert = 1; -/* - -Example: turn led E2 on - -mask: fd 1111 1101 Line 2 -data: 10 0001 0000 Line E - -*/ - - for (i=0; i < 64; i++) /* all LED's off */ - output().set_led_value(i, 0); - - if (Line18_LED) - { - for (i_AH = 0; i_AH < 8; i_AH++) /* turn LED on depending on bit masks */ - { - if (BIT(data,i_AH)) - { - for (i_18 = 0; i_18 < 8; i_18++) - { - LED = (i_18*8 + 8-i_AH-1); - if (!(Line18_LED & (1 << i_18))) /* cleared bit */ - output().set_led_value(LED, 1); - //else - // output().set_led_value(LED, 0); - } - } - } - } - -} - - - -READ8_MEMBER(mboard_state::mboard_read_board_8) -{ - UINT8 data; - - data=read_board(); - logerror("Read Board Port Data = %d\n ",data); - return data; -} - -READ16_MEMBER(mboard_state::mboard_read_board_16) -{ - UINT8 data; - - data=read_board(); - return data << 8; -} - -READ32_MEMBER(mboard_state::mboard_read_board_32) -{ - UINT8 data; - - data=read_board(); - return data<<24; -} - -WRITE8_MEMBER(mboard_state::mboard_write_board_8) -{ - write_board(data); - logerror("Write Board Port Data = %02x\n",data); -} - -WRITE16_MEMBER(mboard_state::mboard_write_board_16) -{ - if (data & 0xff) write_board(data); - logerror("write board 16 %08x\n",data); - write_board(data>>8); -} - -WRITE32_MEMBER(mboard_state::mboard_write_board_32) -{ -// data |= data << 24; -//printf("write board %08x %08x\n",offset,data); - logerror("write board 32 o: %08x d: %08x\n",offset,data); - if (offset) write_board(data); - else write_board(data>>24); -} - -WRITE8_MEMBER(mboard_state::mboard_write_LED_8) -{ - write_LED(data); - space.device().execute().spin_until_time(attotime::from_usec(7)); -} - -WRITE16_MEMBER(mboard_state::mboard_write_LED_16) -{ - write_LED(data >> 8); - space.device().execute().spin_until_time(attotime::from_usec(9)); -} - -WRITE32_MEMBER(mboard_state::mboard_write_LED_32) -{ -// data = data | data << 24; -//printf("write LED %08x %08x\n",offset,data); - if (offset) write_LED(data); - else write_LED(data >> 24); - logerror("write LED 32 o: %08x d: %08x\n",offset,data); -// space.device().execute().spin_until_time(ATTOTIME_IN_USEC(20)); -} - - -/* save states callback */ - -void mboard_state::board_presave() -{ - int i; - for (i=0;i<64;i++) - save_board[i]=m_board[i]; -} - -void mboard_state::board_postload() -{ - int i; - for (i=0;i<64;i++) - m_board[i]=save_board[i]; - -} - -void mboard_state::mboard_savestate_register() -{ - save_item(NAME(save_board)); - machine().save().register_postload(save_prepost_delegate(FUNC(mboard_state::board_postload),this)); - machine().save().register_presave(save_prepost_delegate(FUNC(mboard_state::board_presave),this)); -} - -void mboard_state::mboard_set_board() -{ - read_board_flag = TRUE; - int i; - for (i=0;i<64;i++) - m_board[i]=start_board[i]; -} - -void mboard_state::clear_board() -{ - int i; - for (i=0;i<64;i++) - m_board[i]=EM; -} - -void mboard_state::set_artwork() -{ - int i; - for (i=0;i<64;i++) - output().set_indexed_value("P", i, m_board[i]); -} - -void mboard_state::mboard_set_border_pieces() -{ - int i; - for (i=0;i<12;i++) - output().set_indexed_value("Q", i, border_pieces[i]); -} - -TIMER_DEVICE_CALLBACK_MEMBER(mboard_state::mboard_update_artwork ) -{ - check_board_buttons(); - set_artwork(); - mboard_set_border_pieces(); -} - -void mboard_state::check_board_buttons() -{ - int field; - int i; - UINT8 port_input=0; - UINT8 data = 0xff; - static UINT8 board_row = 0; - static UINT16 mouse_down = 0; - UINT8 pos2num_res = 0; - board_row++; - board_row &= 7; - int click_on_border_piece=FALSE; - - -/* check click on border pieces */ - i=0; - port_input = m_b_black->read(); - if (port_input) - { - i=get_first_bit(port_input)+6; - click_on_border_piece=TRUE; - } - - port_input = m_b_white->read(); - if (port_input) - { - i=get_first_bit(port_input); - click_on_border_piece=TRUE; - } - - if (click_on_border_piece) - { - if (!mouse_down) - { - if (border_pieces[i] > 12 ) /* second click on selected border piece */ - { - mouse_hold_border_piece=FALSE; - border_pieces[i]=border_pieces[i]-12; - mouse_hold_from=0; - mouse_hold_piece=0; - } - else if (!mouse_hold_piece) /*select border piece */ - { - if (mouse_hold_border_piece) - border_pieces[mouse_hold_from]=border_pieces[mouse_hold_from]-12; - - mouse_hold_from=i; - mouse_hold_piece=border_pieces[i]; - border_pieces[i]=border_pieces[i]+12; - mouse_hold_border_piece=TRUE; - } - - mouse_down = board_row + 1; - - } - return; - } - - -/* check click on board */ - data = m_line[board_row]->read(); - - if ((data != 0xff) && (!mouse_down) ) - { - pos2num_res = pos_to_num(data); - field=64-(board_row*8+8-pos2num_res); - - - if (!(pos2num_res < 8)) - logerror("Position out of bound!"); - - else if ((mouse_hold_piece) && (!IsPiece(field))) - { - /* Moving a piece onto a blank */ - m_board[field] = mouse_hold_piece; - - if (mouse_hold_border_piece) - { - border_pieces[mouse_hold_from]=border_pieces[mouse_hold_from]-12; - }else if ( field != mouse_hold_from ) /* Put a selected piece back to the source field */ - m_board[mouse_hold_from] = 0; - - - mouse_hold_from = 0; - mouse_hold_piece = 0; - mouse_hold_border_piece=FALSE; - } - else if ((!mouse_hold_piece) ) - { - /* Picking up a piece */ - - if (IsPiece(field)) - { - mouse_hold_from = field; - mouse_hold_piece = m_board[field]; - m_board[field] = m_board[field]+12; - } - - } - - mouse_down = board_row + 1; - } - else if ((data == 0xff) && (mouse_down == (board_row + 1))) /* Wait for mouse to be released */ - mouse_down = 0; - -/* check click on border - remove selected piece*/ - if (m_line10->read()) - { - if (mouse_hold_piece) - { - if (mouse_hold_border_piece) - border_pieces[mouse_hold_from]=border_pieces[mouse_hold_from]-12; - else - m_board[mouse_hold_from] = 0; - - mouse_hold_from = 0; - mouse_hold_piece = 0; - mouse_hold_border_piece = FALSE; - } - - return; - } - -/* check additional buttons */ - if (data == 0xff) - { - port_input = m_b_buttons->read(); - if (port_input==0x01) - { - clear_board(); - return; - }else if (port_input==0x02) - { - mboard_set_board(); - return; - } - - - } - -} - -extern INPUT_PORTS_START( chessboard ) - - PORT_START("LINE.0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_START("LINE.1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_START("LINE.2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_START("LINE.3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_START("LINE.4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_START("LINE.5") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_START("LINE.6") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_START("LINE.7") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) - - PORT_START("LINE10") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) - - PORT_START("B_WHITE") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) - - PORT_START("B_BLACK") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) - - PORT_START("B_BUTTONS") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) - - PORT_START("MOUSE_X") - PORT_BIT( 0xffff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) - - PORT_START("MOUSE_Y") - PORT_BIT( 0xffff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(100) - - PORT_START("BUTTON_L") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CODE(MOUSECODE_BUTTON1) PORT_NAME("left button") - - PORT_START("BUTTON_R") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CODE(MOUSECODE_BUTTON2) PORT_NAME("right button") - - -INPUT_PORTS_END -- cgit v1.2.3-70-g09d2 From 86c6573d3b826cab8a123e63f410505cb0c85973 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 3 Mar 2016 22:28:32 +0100 Subject: tispeak: added notes --- src/devices/cpu/tms0980/tms0980.cpp | 3 +- src/devices/cpu/tms0980/tms0980d.cpp | 72 +++++++++++++++++++++++------------- src/mame/drivers/tispeak.cpp | 23 ++++++++---- 3 files changed, 63 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/devices/cpu/tms0980/tms0980.cpp b/src/devices/cpu/tms0980/tms0980.cpp index e067946bb7a..3ea3ca918b1 100644 --- a/src/devices/cpu/tms0980/tms0980.cpp +++ b/src/devices/cpu/tms0980/tms0980.cpp @@ -203,7 +203,8 @@ const device_type TMS0270 = &device_creator; // 40-pin DIP, // TMS0260 is same or similar? // TP0320 is TI's first CMOS MCU with integrated LCD controller, the die is still very similar to TMS0980 -// - x +// - ROM and main RAM is same as on TMS0980 with different row-select +// - const device_type TP0320 = &device_creator; // 28-pin SDIP, .. diff --git a/src/devices/cpu/tms0980/tms0980d.cpp b/src/devices/cpu/tms0980/tms0980d.cpp index ea72ba9be2e..371047b0a79 100644 --- a/src/devices/cpu/tms0980/tms0980d.cpp +++ b/src/devices/cpu/tms0980/tms0980d.cpp @@ -11,7 +11,8 @@ #include "tms0980.h" -enum e_mnemonics { +enum e_mnemonics +{ zA10AAC=0, zA6AAC, zA8AAC, zAC1AC, zACACC, zACNAA, zALEC, zALEM, zAMAAC, zBRANCH, zCALL, zCCLA, zCLA, zCLO, zCOMC, zCOMX, zCOMX8, zCPAIZ, zCTMDYN, zDAN, zDMAN, zDMEA, zDNAA, zDYN, zIA, zIMAC, zIYC, zKNEZ, zLDP, zLDX, zLDX3, zLDX4, zMNEA, zMNEZ, @@ -22,7 +23,8 @@ enum e_mnemonics { zILL }; -static const char *const s_mnemonic[] = { +static const char *const s_mnemonic[] = +{ "A10AAC", "A6AAC", "A8AAC", "AC1AC", "ACACC", "ACNAA", "ALEC", "ALEM", "AMAAC", "BRANCH", "CALL", "CCLA", "CLA", "CLO", "COMC", "COMX", "COMX8", "CPAIZ", "CTMDYN", "DAN", "DMAN", "DMEA", "DNAA", "DYN", "IA", "IMAC", "IYC", "KNEZ", "LDP", "LDX", "LDX", "LDX", "MNEA", "MNEZ", @@ -37,7 +39,8 @@ static const char *const s_mnemonic[] = { #define _OVER DASMFLAG_STEP_OVER #define _OUT DASMFLAG_STEP_OUT -static const UINT32 s_flags[] = { +static const UINT32 s_flags[] = +{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _OVER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -49,11 +52,13 @@ static const UINT32 s_flags[] = { }; -enum e_addressing { +enum e_addressing +{ zB0=0, zI2, zI3, zI4, zB7 }; -static const UINT8 s_addressing[] = { +static const UINT8 s_addressing[] = +{ zB0, zB0, zB0, zI4, zI4, zI4, zI4, zB0, zB0, zB7, zB7, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zI4, zI2, zI3, zI4, zB0, zB0, @@ -65,7 +70,25 @@ static const UINT8 s_addressing[] = { }; -static const UINT8 tms0980_mnemonic[512] = { +static const UINT8 tms0980_i2_value[4] = +{ + 0, 2, 1, 3 +}; +static const UINT8 tms0980_i3_value[8] = +{ + 0, 4, 2, 6, 1, 5, 3, 7 +}; +static const UINT8 tms0980_i4_value[16] = +{ + 0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe, 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf +}; + + + +// opcode luts + +static const UINT8 tms0980_mnemonic[512] = +{ /* 0x000 */ zCOMX, zALEM, zYNEA, zXMA, zDYN, zIYC, zCLA, zDMAN, zTKA, zMNEA, zTKM, zILL, zILL, zSETR, zKNEZ, zILL, @@ -151,7 +174,8 @@ static const UINT8 tms0980_mnemonic[512] = { }; -static const UINT8 tms1000_mnemonic[256] = { +static const UINT8 tms1000_mnemonic[256] = +{ /* 0x00 */ zCOMX, zA8AAC, zYNEA, zTAM, zTAMZA, zA10AAC, zA6AAC, zDAN, zTKA, zKNEZ, zTDO, zCLO, zRSTR, zSETR, zIA, zRETN, @@ -191,7 +215,8 @@ static const UINT8 tms1000_mnemonic[256] = { }; -static const UINT8 tms1100_mnemonic[256] = { +static const UINT8 tms1100_mnemonic[256] = +{ /* 0x00 */ zMNEA, zALEM, zYNEA, zXMA, zDYN, zIYC, zAMAAC, zDMAN, zTKA, zCOMX, zTDO, zCOMC, zRSTR, zSETR, zKNEZ, zRETN, @@ -233,21 +258,11 @@ static const UINT8 tms1100_mnemonic[256] = { }; -static const UINT8 tms0980_i2_value[4] = -{ - 0x00, 0x02, 0x01, 0x03 -}; -static const UINT8 tms0980_i3_value[8] = -{ - 0x00, 0x04, 0x02, 0x06, 0x01, 0x05, 0x03, 0x07 -}; -static const UINT8 tms0980_i4_value[16] = -{ - 0x00, 0x08, 0x04, 0x0C, 0x02, 0x0A, 0x06, 0x0E, 0x01, 0x09, 0x05, 0x0D, 0x03, 0x0B, 0x07, 0x0F -}; +// disasm -CPU_DISASSEMBLE( tms0980 ) { +CPU_DISASSEMBLE( tms0980 ) +{ char *dst = buffer; UINT16 op, instr; int pos = 0; @@ -259,7 +274,8 @@ CPU_DISASSEMBLE( tms0980 ) { dst += sprintf( dst, "%-8s ", s_mnemonic[instr] ); - switch( s_addressing[instr] ) { + switch( s_addressing[instr] ) + { default: case zB0: break; @@ -278,7 +294,8 @@ CPU_DISASSEMBLE( tms0980 ) { } -CPU_DISASSEMBLE( tms1000 ) { +CPU_DISASSEMBLE( tms1000 ) +{ char *dst = buffer; UINT8 op, instr; int pos = 0; @@ -290,7 +307,8 @@ CPU_DISASSEMBLE( tms1000 ) { dst += sprintf( dst, "%-8s ", s_mnemonic[instr] ); - switch( s_addressing[instr] ) { + switch( s_addressing[instr] ) + { default: case zB0: break; @@ -309,7 +327,8 @@ CPU_DISASSEMBLE( tms1000 ) { } -CPU_DISASSEMBLE( tms1100 ) { +CPU_DISASSEMBLE( tms1100 ) +{ char *dst = buffer; UINT8 op, instr; int pos = 0; @@ -321,7 +340,8 @@ CPU_DISASSEMBLE( tms1100 ) { dst += sprintf( dst, "%-8s ", s_mnemonic[instr] ); - switch( s_addressing[instr] ) { + switch( s_addressing[instr] ) + { default: case zB0: break; diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp index 68cae4eb3ce..a1bc40e9569 100644 --- a/src/mame/drivers/tispeak.cpp +++ b/src/mame/drivers/tispeak.cpp @@ -34,7 +34,7 @@ Wiz-A-Tron or Little Professor. But the popularity of this product was much above expectations. TI continued to manufacture many products for this line. Speak & Spell (US), 1978 - - MCU: TMC0271*, labeled TMC0271NL (die label unknown) + - MCU: TMC0271*, label TMC0271NL (die label unknown) - TMS51xx: TMC0281 - VSM(1/2): 16KB TMC0351NL - VSM(2/2): 16KB TMC0352NL @@ -42,7 +42,7 @@ above expectations. TI continued to manufacture many products for this line. - notes: keyboard has buttons instead of cheap membrane Speak & Spell (US), 1979 - - MCU: TMC0271, labeled TMC0271H-N2L (die labeled 0271H T0270D) + - MCU: TMC0271, label TMC0271H-N2L (die label 0271H T0270D) - TMS51xx: TMC0281 - VSM(1/2): 16KB TMC0351N2L - VSM(2/2): 16KB TMC0352N2L @@ -79,8 +79,15 @@ above expectations. TI continued to manufacture many products for this line. - VFD: some seen with the one from Speak & Math(!) - notes: this one has a dedicated voice actor + Speak & Spell (Spain), 1981 + - MCU: CD2701N2L* + - TMS51xx: TMC0281 + - VSM(1/2): 16KB? CD2319* + - VSM(2/2): 16KB? CD2320* + - VFD: 8 digits with 14 segments, DP and accent mark + Speak & Spell (France) "La Dictee Magique", 1980 - - MCU: CD2702, labeled CD2702AN2L (die labeled TMC0270F 2702A) + - MCU: CD2702, label CD2702AN2L (die label TMC0270F 2702A) - TMS51xx: CD2801 - VSM: 16KB CD2352 @@ -96,7 +103,7 @@ above expectations. TI continued to manufacture many products for this line. - notes: it appears that TI ran out of original snspell VFDs in the early 80s? Speak & Spell Compact (US), 1981 - - MCU: CD8011, labeled CD8011A-NL (die labeled 1100B) + - MCU: CD8011, label CD8011A-NL (die label 1100B) - TMS51xx: TMC0281D - VSM: 16KB CD2354, CD2354(rev.A) - notes: no display, MCU is TMS1100 instead of TMS0270, overall similar to Touch & Tell @@ -143,7 +150,7 @@ Note that they are interchangeable, eg. you can use a French module on a US Spea Speak & Math: Speak & Math (US), 1980 (renamed to "Speak & Maths" in UK, but is the same product) - - MCU: CD2704, labeled CD2704B-N2L (die labeled TMC0270F 2704B) - 2nd revision?(mid-1982) + - MCU: CD2704, label CD2704B-N2L (die label TMC0270F 2704B) - 2nd revision?(mid-1982) - TMS51xx: CD2801 - VSM(1/2): 16KB CD2392 - VSM(2/2): 16KB CD2393 @@ -154,7 +161,7 @@ Speak & Math: Apparently QA never found out and it ended up in the final product. Speak & Math (US), 1986 - - MCU: CD2708, labeled CD2708N2L (die labeled TMC0270F 2708A) + - MCU: CD2708, label CD2708N2L (die label TMC0270F 2708A) - TMS51xx: CD2801 - VSM(1/2): 16KB CD2381 - VSM(2/2): 4KB CD2614 @@ -170,7 +177,7 @@ Speak & Math: Speak & Read: Speak & Read (US), 1980 - - MCU: CD2705, labeled CD2705B-N2L (die labeled TMC0270E 2705B) - 2nd revision?(late-1981) + - MCU: CD2705, label CD2705B-N2L (die label TMC0270E 2705B) - 2nd revision?(late-1981) - TMS51xx: CD2801 - VSM(1/2): 16KB CD2394(rev.A) - VSM(2/2): 16KB CD2395(rev.A) @@ -192,7 +199,7 @@ Speak & Read modules: Touch & Tell: Touch & Tell (US), 1981 - - MCU: CD8012, labeled CD8012NL (die labeled 1100G CD8012) + - MCU: CD8012, label CD8012NL (die label 1100G CD8012) - TMS51xx: CD2802 - VSM: 4KB CD2610 - notes: MCU is TMS1100 instead of TMS0270. CD8010 is seen in some devices -- cgit v1.2.3-70-g09d2 From 92ba01534a061444c194820a2f9c18d246e9ebd3 Mon Sep 17 00:00:00 2001 From: angelosa Date: Thu, 3 Mar 2016 23:37:19 +0100 Subject: Assume protected, nw --- src/mame/drivers/tsamurai.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mame/drivers/tsamurai.cpp b/src/mame/drivers/tsamurai.cpp index cf80d064683..7cd2d5de543 100644 --- a/src/mame/drivers/tsamurai.cpp +++ b/src/mame/drivers/tsamurai.cpp @@ -6,6 +6,8 @@ TODO: - colors for this HW are a complete mystery and probably needs HW tests. + - vsgongf sets 0 as player color in work RAM 0xc502 and it's never ever + set up properly. Assume protection related issue. driver by Phil Stroffolino @@ -1264,7 +1266,7 @@ ROM_START( ringfgt2 ) ROM_LOAD( "clr.6p", 0x200, 0x0100, CRC(0e4fd17a) SHA1(d4e32bd9dd903177af61f77976a25c5db1467bba) ) ROM_END -GAME( 1984, vsgongf, 0, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko", "VS Gong Fight", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, vsgongf, 0, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko", "VS Gong Fight", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION ) GAME( 1984, ringfgt, vsgongf, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 1)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) GAME( 1984, ringfgt2, vsgongf, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 2)", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) -- cgit v1.2.3-70-g09d2 From d2ca8a0a6e4404704a7b232c82dc2b457068bea3 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 4 Mar 2016 00:42:26 +0100 Subject: OCD --- src/mame/drivers/hh_cop400.cpp | 14 ++++----- src/mame/drivers/hh_hmcs40.cpp | 16 +++++----- src/mame/drivers/hh_tms1k.cpp | 68 +++++++++++++++++++++--------------------- src/mame/drivers/hh_ucom4.cpp | 52 ++++++++++++++++---------------- src/mame/drivers/mbdtower.cpp | 2 +- src/mame/drivers/ticalc1x.cpp | 28 ++++++++--------- src/mame/drivers/tispeak.cpp | 2 +- src/mame/drivers/tispellb.cpp | 4 +-- 8 files changed, 93 insertions(+), 93 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index 78ef6c2271c..a946ceffc08 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -234,7 +234,7 @@ UINT8 hh_cop400_state::read_inputs(int columns) /*************************************************************************** Castle Toy Einstein - * COP421 MCU labeled ~/927 COP421-NEZ/N + * COP421 MCU label ~/927 COP421-NEZ/N * 4 lamps, 1-bit sound ***************************************************************************/ @@ -279,7 +279,7 @@ MACHINE_CONFIG_END /*************************************************************************** Coleco Head to Head Basketball - * COP420 MCU labeled COP420L-NEZ/N + * COP420 MCU label COP420L-NEZ/N * 2-digit 7seg display, 41 other leds, 1-bit sound ***************************************************************************/ @@ -324,7 +324,7 @@ MACHINE_CONFIG_END /*************************************************************************** Entex Space Invader - * COP444L MCU labeled /B138 COPL444-HRZ/N INV II (die labeled HRZ COP 444L/A) + * COP444L MCU label /B138 COPL444-HRZ/N INV II (die label HRZ COP 444L/A) * 3 7seg LEDs, LED matrix and overlay mask, 1-bit sound The first version was on TMS1100 (see hh_tms1k.c), this is the reprogrammed @@ -440,7 +440,7 @@ MACHINE_CONFIG_END /*************************************************************************** Mattel Funtronics Jacks - * COP410L MCU bonded directly to PCB (die labeled COP410L/B NGS) + * COP410L MCU bonded directly to PCB (die label COP410L/B NGS) * 8 LEDs, 1-bit sound ***************************************************************************/ @@ -547,7 +547,7 @@ MACHINE_CONFIG_END /*************************************************************************** Mattel Funtronics Red Light Green Light - * COP410L MCU bonded directly to PCB (die labeled COP410L/B NHZ) + * COP410L MCU bonded directly to PCB (die label COP410L/B NHZ) * 14 LEDs, 1-bit sound known releases: @@ -642,7 +642,7 @@ MACHINE_CONFIG_END /*************************************************************************** Milton Bradley Plus One - * COP410L MCU in 8-pin DIP, labeled ~/029 MM 57405 (die labeled COP410L/B NNE) + * COP410L MCU in 8-pin DIP, label ~/029 MM 57405 (die label COP410L/B NNE) * 4 sensors(1 on each die side), 1-bit sound ***************************************************************************/ @@ -686,7 +686,7 @@ MACHINE_CONFIG_END /*************************************************************************** Milton Bradley (Electronic) Lightfight - * COP421L MCU labeled /B119 COP421L-HLA/N + * COP421L MCU label /B119 COP421L-HLA/N * LED matrix, 1-bit sound Xbox-shaped electronic game for 2 or more players, with long diagonal buttons diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp index 0ed890fc5d5..02434fd6f48 100644 --- a/src/mame/drivers/hh_hmcs40.cpp +++ b/src/mame/drivers/hh_hmcs40.cpp @@ -333,7 +333,7 @@ INPUT_CHANGED_MEMBER(hh_hmcs40_state::single_interrupt_line) /*************************************************************************** Bambino Dribble Away Basketball (manufactured in Japan) - * PCBs are labeled Emix Corp. ET-05 + * PCB label Emix Corp. ET-05 * Hitachi HD38750A08 MCU * green VFD display Emix-106, with bezel overlay @@ -443,7 +443,7 @@ MACHINE_CONFIG_END /*************************************************************************** Bambino Knock-Em Out Boxing - * PCBs are labeled Emix Corp. ET-06B + * PCB label Emix Corp. ET-06B * Hitachi HD38750A07 MCU * cyan VFD display Emix-103, with blue or green color overlay @@ -577,7 +577,7 @@ MACHINE_CONFIG_END /*************************************************************************** Bandai Frisky Tom (manufactured in Japan) - * PCBs are labeled Kaken Corp., PT-327A + * PCB label Kaken Corp., PT-327A * Hitachi HD38800A77 MCU * cyan/red/green VFD display Futaba DM-43ZK 2E @@ -807,7 +807,7 @@ MACHINE_CONFIG_END /*************************************************************************** Bandai/Mattel Star Hawk (manufactured in Japan) - * PCBs are labeled Kaken, PT-317B + * PCB label Kaken, PT-317B * Hitachi HD38800A73 MCU * cyan/red VFD display Futaba DM-41ZK, with partial color overlay + bezel @@ -2623,7 +2623,7 @@ INPUT_PORTS_END Entex Turtles (manufactured in Japan) * PCB label 560359 * Hitachi QFP HD38820A43 MCU - * COP411L sub MCU, labeled COP411L-KED/N + * COP411L sub MCU, label COP411L-KED/N * cyan/red/green VFD display NEC FIP15BM32T NOTE!: MAME external artwork is required @@ -2814,7 +2814,7 @@ MACHINE_CONFIG_END Entex Stargate (manufactured in Japan) * PCB label 5603521/31 * Hitachi QFP HD38820A42 MCU - * COP411L sub MCU, labeled ~/B8236 COP411L-KEC/N + * COP411L sub MCU, label ~/B8236 COP411L-KEC/N * cyan/red/green VFD display NEC FIP15AM32T (EL628-003) no. 2-421, with partial color overlay NOTE!: MAME external artwork is required @@ -3521,7 +3521,7 @@ MACHINE_CONFIG_END /*************************************************************************** Tomy Kingman (manufactured in Japan) - * PCBs are labeled THF-01II 2E138E01/2E128E02 + * PCB label THF-01II 2E138E01/2E128E02 * Hitachi HD38800B23 MCU * cyan/red/blue VFD display Futaba DM-65ZK 3A @@ -3640,7 +3640,7 @@ MACHINE_CONFIG_END /*************************************************************************** Tomy(tronic) Tron (manufactured in Japan) - * PCBs are labeled THN-02 2E114E07 + * PCB label THN-02 2E114E07 * Hitachi HD38800A88 MCU * cyan/red/green VFD display NEC FIP10AM24T no. 2-8 1 diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index 0dea42a26fa..afc5cafe475 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -364,7 +364,7 @@ INPUT_CHANGED_MEMBER(hh_tms1k_state::power_button) /*************************************************************************** APF Mathemagician - * TMS1100 MCU, labeled MP1030 (no decap) + * TMS1100 MCU, label MP1030 (no decap) * 2 x DS8870N - Hex LED Digit Driver * 2 x DS8861N - MOS-to-LED 5-Segment Driver * 10-digit 7seg LED display(2 custom ones) + 4 LEDs, no sound @@ -542,7 +542,7 @@ MACHINE_CONFIG_END /*************************************************************************** Coleco Amaze-A-Tron, by Ralph Baer - * TMS1100 MCU, labeled MP3405(die label too) + * TMS1100 MCU, label MP3405(die label too) * 2-digit 7seg LED display + 2 LEDs(one red, one green), 1-bit sound * 5*5 pressure-sensitive playing board(buttons), 4 game pieces @@ -834,7 +834,7 @@ MACHINE_CONFIG_END /*************************************************************************** Coleco Electronic Quarterback - * TMS1100NLL MP3415 (die labeled MP3415) + * TMS1100NLL MP3415 (die label MP3415) * 9-digit LED grid, 1-bit sound known releases: @@ -945,7 +945,7 @@ MACHINE_CONFIG_END /*************************************************************************** Coleco Head to Head Football - * TMS1100NLLE (rev. E!) MP3460 (die labeled MP3460) + * TMS1100NLLE (rev. E!) MP3460 (die label MP3460) * 2*SN75492N LED display drivers, 9-digit LED grid, 1-bit sound known releases: @@ -1060,7 +1060,7 @@ MACHINE_CONFIG_END Coleco Head to Head Baseball * PCB labels Coleco rev C 73891/2 - * TMS1170NLN MP1525-N2 (die labeled MP1525) + * TMS1170NLN MP1525-N2 (die label MP1525) * 9-digit cyan VFD display, and other LEDs behind bezel, 1-bit sound known releases: @@ -1199,7 +1199,7 @@ MACHINE_CONFIG_END /*************************************************************************** Coleco Total Control 4 - * TMS1400NLL MP7334-N2 (die labeled MP7334) + * TMS1400NLL MP7334-N2 (die label MP7334) * 2x2-digit 7seg LED display + 4 LEDs, LED grid display, 1-bit sound This is a head to head electronic tabletop LED-display sports console. @@ -1479,7 +1479,7 @@ MACHINE_CONFIG_END /*************************************************************************** Entex (Electronic) Baseball (1) - * TMS1000NLP MP0914 (die labeled MP0914A) + * TMS1000NLP MP0914 (die label MP0914A) * 1 7seg LED, and other LEDs behind bezel, 1-bit sound This is a handheld LED baseball game. One player controls the batter, the CPU @@ -1614,8 +1614,8 @@ MACHINE_CONFIG_END /*************************************************************************** Entex (Electronic) Baseball 2 - * PCBs are labeled: ZENY - * TMS1000 MCU, MP0923 (die labeled MP0923) + * PCB label: ZENY + * TMS1000 MCU, MP0923 (die label MP0923) * 3 7seg LEDs, and other LEDs behind bezel, 1-bit sound The Japanese version was published by Gakken, black casing instead of white. @@ -1739,8 +1739,8 @@ MACHINE_CONFIG_END /*************************************************************************** Entex (Electronic) Baseball 3 - * PCBs are labeled: ZENY - * TMS1100NLL 6007 MP1204 (rev. E!) (die labeled MP1204) + * PCB label: ZENY + * TMS1100NLL 6007 MP1204 (rev. E!) (die label MP1204) * 2*SN75492N LED display driver * 4 7seg LEDs, and other LEDs behind bezel, 1-bit sound @@ -1920,7 +1920,7 @@ MACHINE_CONFIG_END /*************************************************************************** Entex Space Invader - * TMS1100 MP1211 (die labeled MP1211) + * TMS1100 MP1211 (die label MP1211) * 3 7seg LEDs, LED matrix and overlay mask, 1-bit sound There are two versions of this game: the first release(this one) is on @@ -2034,7 +2034,7 @@ MACHINE_CONFIG_END /*************************************************************************** Entex Color Football 4 - * TMS1670 6009 MP7551 (die also labeled MP7551) + * TMS1670 6009 MP7551 (die also label MP7551) * 9-digit cyan VFD display, 60 red and green LEDs behind bezel, 1-bit sound ***************************************************************************/ @@ -2151,7 +2151,7 @@ MACHINE_CONFIG_END /*************************************************************************** Entex (Electronic) Basketball 2 - * TMS1100 6010 MP1218 (die also labeled MP1218) + * TMS1100 6010 MP1218 (die also label MP1218) * 4 7seg LEDs, and other LEDs behind bezel, 1-bit sound lamp translation table: led zz from game PCB = MAME lampyx: @@ -2274,7 +2274,7 @@ MACHINE_CONFIG_END /*************************************************************************** Entex Raise The Devil - * TMS1100 MP1221 (die labeled MP1221) + * TMS1100 MP1221 (die label MP1221) * 4 7seg LEDs(rightmost one unused), and other LEDs behind bezel, 1-bit sound lamp translation table: led zz from game PCB = MAME lampyx: @@ -2417,7 +2417,7 @@ MACHINE_CONFIG_END Gakken Poker * PCB label POKER. gakken - * TMS1370 MP2105 (die labeled MP2105) + * TMS1370 MP2105 (die label MP2105) * 11-digit cyan VFD display Itron FG1114B, oscillator sound known releases: @@ -2562,7 +2562,7 @@ MACHINE_CONFIG_END Gakken Jackpot: Gin Rummy & Black Jack * PCB label gakken - * TMS1670 MPF553 (die labeled MPF553) + * TMS1670 MPF553 (die label MPF553) * 11-digit cyan VFD display Itron FG1114B, oscillator sound known releases: @@ -2674,7 +2674,7 @@ MACHINE_CONFIG_END /*************************************************************************** Ideal Electronic Detective - * TMS0980NLL MP6100A (die labeled 0980B-00) + * TMS0980NLL MP6100A (die label 0980B-00) * 10-digit 7seg LED display, 2-level sound hardware (and concept) is very similar to Parker Brothers Stop Thief @@ -2805,7 +2805,7 @@ MACHINE_CONFIG_END /*************************************************************************** Kenner Star Wars - Electronic Battle Command - * TMS1100 MCU, labeled MP3438A + * TMS1100 MCU, label MP3438A * 4x4 LED grid display + 2 separate LEDs and 2-digit 7segs, 1-bit sound This is a small tabletop space-dogfighting game. To start the game, @@ -2931,7 +2931,7 @@ MACHINE_CONFIG_END /*************************************************************************** Kosmos Astro - * TMS1470NLHL MP1133 (die labeled TMS1400 MP1133) + * TMS1470NLHL MP1133 (die label TMS1400 MP1133) * 9digit 7seg VFD display + 8 LEDs(4 green, 4 yellow), no sound This is an astrological calculator, and also supports 4-function @@ -3055,7 +3055,7 @@ MACHINE_CONFIG_END /*************************************************************************** Mattel Dungeons & Dragons - Computer Labyrinth Game - * TMS1100 M34012-N2LL (die labeled M34012) + * TMS1100 M34012-N2LL (die label M34012) * 72 buttons, no LEDs, 1-bit sound This is an electronic board game. It requires markers and wall pieces to play. @@ -3236,7 +3236,7 @@ MACHINE_CONFIG_END /*************************************************************************** Milton Bradley Comp IV - * TMC0904NL CP0904A (die labeled 4A0970D-04A) + * TMC0904NL CP0904A (die label 4A0970D-04A) * 10 LEDs behind bezel, no sound known releases: @@ -3340,7 +3340,7 @@ MACHINE_CONFIG_END Milton Bradley Simon, created by Ralph Baer Revision A hardware: - * TMS1000 (die labeled MP3226) + * TMS1000 (die label MP3226) * DS75494 Hex digit LED driver, 4 big lamps, 1-bit sound Newer revisions (also Pocket Simon) have a smaller 16-pin MB4850 chip @@ -3441,7 +3441,7 @@ MACHINE_CONFIG_END /*************************************************************************** Milton Bradley Super Simon - * TMS1100 MP3476NLL (die labeled MP3476) + * TMS1100 MP3476NLL (die label MP3476) * 8 big lamps(2 turn on at same time), 1-bit sound The semi-squel to Simon, not as popular. It includes more game variations @@ -3583,7 +3583,7 @@ MACHINE_CONFIG_END /*************************************************************************** Milton Bradley Big Trak - * TMS1000NLL MP3301A or MP3301ANLL E (rev. E!) (die labeled 1000E MP3301) + * TMS1000NLL MP3301A or MP3301ANLL E (rev. E!) (die label 1000E MP3301) * SN75494N Hex digit LED driver, 1 lamp, 3-level sound * gearbox with magnetic clutch, 1 IR led+sensor, 2 motors(middle wheels) * 24-button keypad, ext in/out ports @@ -3767,7 +3767,7 @@ MACHINE_CONFIG_END /*************************************************************************** Parker Brothers Code Name: Sector, by Bob Doyle - * TMS0970 MCU, MP0905BNL ZA0379 (die labeled 0970F-05B) + * TMS0970 MCU, MP0905BNL ZA0379 (die label 0970F-05B) * 6-digit 7seg LED display + 4 LEDs for compass, no sound This is a tabletop submarine pursuit game. A grid board and small toy @@ -4001,7 +4001,7 @@ MACHINE_CONFIG_END /*************************************************************************** Parker Brothers Master Merlin - * TMS1400 MP7351-N2LL (die labeled 1400CR MP7351) + * TMS1400 MP7351-N2LL (die label 1400CR MP7351) * 11 LEDs behind buttons, 3-level sound The TMS1400CR MCU has the same pinout as a standard TMS1100. The hardware @@ -4065,7 +4065,7 @@ MACHINE_CONFIG_END /*************************************************************************** Parker Brothers Stop Thief, by Bob Doyle - * TMS0980NLL MP6101B (die labeled 0980B-01A) + * TMS0980NLL MP6101B (die label 0980B-01A) * 3-digit 7seg LED display, 6-level sound Stop Thief is actually a board game, the electronic device emulated here @@ -4182,7 +4182,7 @@ MACHINE_CONFIG_END /*************************************************************************** Parker Brothers Bank Shot (known as Cue Ball in the UK), by Garry Kitchen - * TMS1400NLL MP7313-N2 (die labeled MP7313) + * TMS1400NLL MP7313-N2 (die label MP7313) * LED grid display, 1-bit sound Bank Shot is an electronic pool game. To select a game, repeatedly press @@ -4289,7 +4289,7 @@ MACHINE_CONFIG_END /*************************************************************************** Parker Brothers Split Second - * TMS1400NLL MP7314-N2 (die labeled MP7314) + * TMS1400NLL MP7314-N2 (die label MP7314) * LED grid display(default round LEDs, and rectangular shape ones), 1-bit sound This is an electronic handheld reflex gaming device, it's straightforward @@ -4401,7 +4401,7 @@ MACHINE_CONFIG_END Parker Brothers Lost Treasure - The Electronic Deep-Sea Diving Game, Featuring The Electronic Dive-Control Center - * TMS1100 M34038-NLL (die labeled 1100E, M34038) + * TMS1100 M34038-NLL (die label 1100E, M34038) * 11 LEDs, 4-bit sound This is a board game. The electronic accessory is the emulated part here. @@ -4516,7 +4516,7 @@ MACHINE_CONFIG_END /*************************************************************************** Tandy Radio Shack Computerized Arcade (1981, 1982, 1995) - * TMS1100 MCU, labeled CD7282SL + * TMS1100 MCU, label CD7282SL * 12 lamps behind buttons, 1-bit sound This handheld contains 12 minigames. It looks and plays like "Fabulous Fred" @@ -4677,7 +4677,7 @@ MACHINE_CONFIG_END Tomy(tronics) Break Up (manufactured in Japan) * PCB label TOMY B.O. - * TMS1040 MP2726 TOMY WIPE (die labeled MP2726A) + * TMS1040 MP2726 TOMY WIPE (die label MP2726A) * TMS1025N2LL I/O expander * 2-digit 7seg display, 46 other leds, 1-bit sound @@ -4879,7 +4879,7 @@ MACHINE_CONFIG_END Tomy Power House Pinball * PCB label TOMY P-B - * TMS1100 MP1180 TOMY PINB (die labeled MP1180) + * TMS1100 MP1180 TOMY PINB (die label MP1180) * 3 7seg LEDs, and other LEDs behind bezel, 1-bit sound known releases: diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp index 6d1368f63bc..e607444ad64 100644 --- a/src/mame/drivers/hh_ucom4.cpp +++ b/src/mame/drivers/hh_ucom4.cpp @@ -231,7 +231,7 @@ UINT8 hh_ucom4_state::read_inputs(int columns) Bambino UFO Master-Blaster Station (manufactured in Japan) * PCB label Emix Corp. ET-02 - * NEC uCOM-44 MCU, labeled EMIX D552C 017 + * NEC uCOM-44 MCU, label EMIX D552C 017 * cyan VFD display Emix-101, with blue color overlay This is Bambino's first game, it is not known if ET-01 exists. Emix Corp. @@ -345,7 +345,7 @@ MACHINE_CONFIG_END Bambino Superstar Football (manufactured in Japan) * PCB label Emix Corp. ET-03 - * NEC uCOM-43 MCU, labeled D553C 031 + * NEC uCOM-43 MCU, label D553C 031 * cyan VFD display Emix-102, with bezel The game was rereleased in 1982 as Classic Football, with an improved VFD. @@ -485,7 +485,7 @@ MACHINE_CONFIG_END Bambino Kick The Goal Soccer * PCB label Emix Corp. ET-10/08 (PCB is for 2 possible games) - * NEC uCOM-44 MCU, labeled D552C 043 + * NEC uCOM-44 MCU, label D552C 043 * cyan VFD display Emix-105, with bezel overlay Press the Display button twice to start the game. Action won't start until @@ -609,7 +609,7 @@ MACHINE_CONFIG_END Bambino Safari (manufactured in Japan) * PCB label Emix Corp. ET-11 - * NEC uCOM-44 MCU, labeled EMIX D552C 049 + * NEC uCOM-44 MCU, label EMIX D552C 049 * cyan VFD display Emix-108 NOTE!: MAME external artwork is required @@ -713,7 +713,7 @@ MACHINE_CONFIG_END Bambino Space Laser Fight (manufactured in Japan) * PCB label Emix Corp. ET-12 - * NEC uCOM-43 MCU, labeled D553C 055 + * NEC uCOM-43 MCU, label D553C 055 * cyan VFD display Emix-104, with blue or green color overlay This is basically a revamp of their earlier Boxing game (ET-06), case and @@ -863,7 +863,7 @@ MACHINE_CONFIG_END Bandai Crazy Climber (manufactured in Japan) * PCB labels SM-020/SM-021 - * NEC uCOM-43 MCU, labeled D553C 170 + * NEC uCOM-43 MCU, label D553C 170 * cyan/red/green VFD display NEC FIP6AM2-T no. 1-8 2, with partial color overlay and bezel known releases: @@ -962,7 +962,7 @@ MACHINE_CONFIG_END /*************************************************************************** Castle Toy Tactix - * NEC uCOM-43 MCU, labeled D557LC 512 + * NEC uCOM-43 MCU, label D557LC 512 * 16 LEDs behind buttons Tactix is similar to Merlin, for 1 or 2 players. In 2-player mode, simply @@ -1080,7 +1080,7 @@ MACHINE_CONFIG_END Epoch Invader From Space (manufactured in Japan) * PCB labels 36010(A/B) - * NEC uCOM-44 MCU, labeled D552C 054 + * NEC uCOM-44 MCU, label D552C 054 * cyan VFD display NEC FIP9AM18T tube no. 0D, with color overlay known releases: @@ -1179,7 +1179,7 @@ MACHINE_CONFIG_END Epoch Electronic Football (manufactured in Japan) * PCB labels 36020(A/B/C) - * NEC uCOM-43 MCU, labeled D553C 080 + * NEC uCOM-43 MCU, label D553C 080 * cyan VFD display NEC FIP10AM15T tube no. 0F, with bezel overlay known releases: @@ -1288,7 +1288,7 @@ MACHINE_CONFIG_END Epoch Galaxy II (manufactured in Japan) * PCB labels 19096/96062 - * NEC uCOM-43 MCU, labeled D553C 153 + * NEC uCOM-43 MCU, label D553C 153 * cyan/red VFD display NEC FIP10xM20T, with color overlay. x = multiple VFD revisions exist, with different graphics: rev B no. 1-8, rev. D no. 2-21. @@ -1389,7 +1389,7 @@ MACHINE_CONFIG_END Epoch Astro Command (manufactured in Japan) * PCB labels 96111/96112 - * NEC uCOM-43 MCU, labeled D553C 202 + * NEC uCOM-43 MCU, label D553C 202 * cyan/red VFD display NEC FIP9AM20T no. 42-42, with color overlay + bezel known releases: @@ -1496,7 +1496,7 @@ MACHINE_CONFIG_END Epoch Dracula (manufactured in Japan) * PCB label 96121 - * NEC uCOM-43 MCU, labeled D553C 206 + * NEC uCOM-43 MCU, label D553C 206 * cyan/red/green VFD display NEC FIP8BM20T no. 2-42 known releases: @@ -1588,7 +1588,7 @@ MACHINE_CONFIG_END /*************************************************************************** Mattel Computer Gin - * NEC uCOM-43 MCU, labeled D650C 060 + * NEC uCOM-43 MCU, label D650C 060 ***************************************************************************/ @@ -1662,7 +1662,7 @@ MACHINE_CONFIG_END Mego Mini-Vid Break Free (manufactured in Japan) * PCB label Mego 79 rev F - * NEC uCOM-43 MCU, labeled D553C 049 + * NEC uCOM-43 MCU, label D553C 049 * cyan VFD display Futaba DM-4.5 91 note: MAME external artwork is not needed for this game @@ -1766,8 +1766,8 @@ MACHINE_CONFIG_END /*************************************************************************** Tomy(tronic) Cosmic Combat (manufactured in Japan) - * PCBs are labeled 2E1019-E01 - * NEC uCOM-44 MCU, labeled D552C 042 + * PCB label 2E1019-E01 + * NEC uCOM-44 MCU, label D552C 042 * cyan VFD display NEC FIP32AM18Y tube no. 0E, with color overlay known releases: @@ -1861,8 +1861,8 @@ MACHINE_CONFIG_END /*************************************************************************** Tomy(tronic) Tennis (manufactured in Japan) - * PCB labeled TOMY TN-04 TENNIS - * NEC uCOM-44 MCU, labeled D552C 048 + * PCB label TOMY TN-04 TENNIS + * NEC uCOM-44 MCU, label D552C 048 * VFD display NEC FIP11AM15T tube no. 0F, with overlay The initial release of this game was in 1979, known as Pro-Tennis, @@ -2017,8 +2017,8 @@ MACHINE_CONFIG_END /*************************************************************************** Tomy(tronic) Pac-Man (manufactured in Japan) - * PCBs are labeled TN-08 2E108E01 - * NEC uCOM-43 MCU, labeled D553C 160 + * PCB label TN-08 2E108E01 + * NEC uCOM-43 MCU, label D553C 160 * cyan/red/green VFD display NEC FIP8AM18T no. 2-21 * bright yellow round casing @@ -2123,8 +2123,8 @@ MACHINE_CONFIG_END /*************************************************************************** Tomy(tronic) Scramble (manufactured in Japan) - * PCBs are labeled TN-10 2E114E01 - * NEC uCOM-43 MCU, labeled D553C 192 + * PCB label TN-10 2E114E01 + * NEC uCOM-43 MCU, label D553C 192 * cyan/red/green VFD display NEC FIP10CM20T no. 2-41 known releases: @@ -2223,8 +2223,8 @@ MACHINE_CONFIG_END /*************************************************************************** Tomy(tronic) Caveman (manufactured in Japan) - * PCBs are labeled TN-12 2E114E03 - * NEC uCOM-43 MCU, labeled D553C 209 + * PCB label TN-12 2E114E03 + * NEC uCOM-43 MCU, label D553C 209 * cyan/red/green VFD display NEC FIP8AM20T no. 2-42 known releases: @@ -2319,8 +2319,8 @@ MACHINE_CONFIG_END /*************************************************************************** Tomy Alien Chase (manufactured in Japan) - * PCBs are labeled TN-16 2E121B01 - * NEC uCOM-43 MCU, labeled D553C 258 + * PCB label TN-16 2E121B01 + * NEC uCOM-43 MCU, label D553C 258 * red/green VFD display NEC FIP9AM24T, with color overlay, 2-sided* *Player one views the VFD from the front (grid+filament side) while the diff --git a/src/mame/drivers/mbdtower.cpp b/src/mame/drivers/mbdtower.cpp index bd2144742d0..7a1b5ec3dee 100644 --- a/src/mame/drivers/mbdtower.cpp +++ b/src/mame/drivers/mbdtower.cpp @@ -5,7 +5,7 @@ ** subclass of hh_tms1k_state (includes/hh_tms1k.h, drivers/hh_tms1k.cpp) ** Milton Bradley Dark Tower - * TMS1400NLL MP7332-N1.U1(Rev. B) or MP7332-N2LL(Rev. C), die labeled MP7332 + * TMS1400NLL MP7332-N1.U1(Rev. B) or MP7332-N2LL(Rev. C), die label MP7332 (assume same ROM contents between revisions) * SN75494N MOS-to-LED digit driver * motorized rotating reel + lightsensor, 1bit-sound diff --git a/src/mame/drivers/ticalc1x.cpp b/src/mame/drivers/ticalc1x.cpp index c8bbdfd0171..3d0a0cceeae 100644 --- a/src/mame/drivers/ticalc1x.cpp +++ b/src/mame/drivers/ticalc1x.cpp @@ -48,11 +48,11 @@ public: /*************************************************************************** TI SR-16 (1974, first consumer product with TMS1000 series MCU) - * TMS1000 MCU labeled TMS1001NL (die labeled 1000, 1001A) + * TMS1000 MCU label TMS1001NL (die label 1000, 1001A) * 12-digit 7seg LED display TI SR-16 II (1975 version) - * TMS1000 MCU labeled TMS1016NL (die labeled 1000B, 1016A) + * TMS1000 MCU label TMS1016NL (die label 1000B, 1016A) * notes: cost-reduced 'sequel', [10^x] was removed, and [pi] was added. ***************************************************************************/ @@ -264,11 +264,11 @@ MACHINE_CONFIG_END /*************************************************************************** TI-1250/TI-1200 (1975 version), Spirit of '76 - * TMS0950 MCU labeled TMC0952NL, K0952 (die labeled 0950A 0952) + * TMS0950 MCU label TMC0952NL, K0952 (die label 0950A 0952) * 9-digit 7seg LED display TI-1250/TI-1200 (1976 version), TI-1400, TI-1450, TI-1205, TI-1255, LADY 1200, ABLE - * TMS0970 MCU labeled TMS0972NL ZA0348, JP0972A (die labeled 0970D-72A) + * TMS0970 MCU label TMS0972NL ZA0348, JP0972A (die label 0970D-72A) * 8-digit 7seg LED display, or 9 digits with leftmost unused As seen listed above, the basic 4-function TMS0972 calculator MCU was used @@ -280,7 +280,7 @@ MACHINE_CONFIG_END available buttons. TI-1270 - * TMS0970 MCU labeled TMC0974NL ZA0355, DP0974A (die labeled 0970D-74A) + * TMS0970 MCU label TMC0974NL ZA0355, DP0974A (die label 0970D-74A) * 8-digit 7seg LED display * notes: almost same hardware as TMS0972 TI-1250, minor scientific functions @@ -413,11 +413,11 @@ MACHINE_CONFIG_END /*************************************************************************** TI-1000 (1977 version) - * TMS1990 MCU labeled TMC1991NL (die labeled 1991-91A) + * TMS1990 MCU label TMC1991NL (die label 1991-91A) * 8-digit 7seg LED display TI-1000 (1978 version) - * TMS1990 MCU labeled TMC1992-4NL **not dumped yet + * TMS1990 MCU label TMC1992-4NL **not dumped yet ***************************************************************************/ @@ -513,7 +513,7 @@ MACHINE_CONFIG_END /*************************************************************************** TI WIZ-A-TRON - * TMS0970 MCU labeled TMC0907NL ZA0379, DP0907BS (die labeled 0970F-07B) + * TMS0970 MCU label TMC0907NL ZA0379, DP0907BS (die label 0970F-07B) * 9-digit 7seg LED display(one custom digit) ***************************************************************************/ @@ -613,7 +613,7 @@ MACHINE_CONFIG_END /*************************************************************************** TI Little Professor (1976 version) - * TMS0970 MCU labeled TMS0975NL ZA0356, GP0975CS (die labeled 0970D-75C) + * TMS0970 MCU label TMS0975NL ZA0356, GP0975CS (die label 0970D-75C) * 9-digit 7seg LED display(one custom digit) The hardware is nearly identical to Wiz-A-Tron (or vice versa, since this @@ -687,7 +687,7 @@ MACHINE_CONFIG_END /*************************************************************************** TI Little Professor (1978 version) - * TMS1990 MCU labeled TMC1993NL (die labeled 1990C-c3C) + * TMS1990 MCU label TMC1993NL (die label 1990C-c3C) * 9-digit 7seg LED display(one custom digit) 1978 re-release, with on/off and level select on buttons instead of @@ -797,7 +797,7 @@ MACHINE_CONFIG_END /*************************************************************************** TI DataMan - * TMS1980 MCU labeled TMC1982NL (die labeled 1980A 82B) + * TMS1980 MCU label TMC1982NL (die label 1980A 82B) * 10-digit cyan VFD display(3 digits are custom) ***************************************************************************/ @@ -912,7 +912,7 @@ MACHINE_CONFIG_END TMC098x series Majestic-line calculators TI-30, SR-40, TI-15(less buttons) and several by Koh-I-Noor - * TMS0980 MCU labeled TMC0981NL (die labeled 0980B-81F) + * TMS0980 MCU label TMC0981NL (die label 0980B-81F) * 9-digit 7seg LED display Of note is a peripheral by Schoenherr, called the Braillotron. It acts as @@ -921,10 +921,10 @@ MACHINE_CONFIG_END the original LED display to a 25-pin D-Sub connector. TI Business Analyst, TI Business Analyst-I, TI Money Manager, TI-31, TI-41 - * TMS0980 MCU labeled TMC0982NL (die labeled 0980B-82F) + * TMS0980 MCU label TMC0982NL (die label 0980B-82F) TI Programmer - * TMS0980 MCU labeled ZA0675NL, JP0983AT (die labeled 0980B-83) + * TMS0980 MCU label ZA0675NL, JP0983AT (die label 0980B-83) ***************************************************************************/ diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp index a1bc40e9569..f6bd51bca24 100644 --- a/src/mame/drivers/tispeak.cpp +++ b/src/mame/drivers/tispeak.cpp @@ -79,7 +79,7 @@ above expectations. TI continued to manufacture many products for this line. - VFD: some seen with the one from Speak & Math(!) - notes: this one has a dedicated voice actor - Speak & Spell (Spain), 1981 + Speak & Spell (Spanish), 1981 - MCU: CD2701N2L* - TMS51xx: TMC0281 - VSM(1/2): 16KB? CD2319* diff --git a/src/mame/drivers/tispellb.cpp b/src/mame/drivers/tispellb.cpp index 00f581759ef..9966dc2a534 100644 --- a/src/mame/drivers/tispellb.cpp +++ b/src/mame/drivers/tispellb.cpp @@ -13,8 +13,8 @@ 1st revision: Spelling B (US), 1978 - - TMS0270 MCU TMC0272 (die labeled 0272A T0270B) - - TMS1980 MCU TMC1984 (die labeled 1980A 84A) + - TMS0270 MCU TMC0272 (die label 0272A T0270B) + - TMS1980 MCU TMC1984 (die label 1980A 84A) - 8-digit cyan VFD display (seen with and without apostrophe) Spelling ABC (UK), 1979: exact same hardware as US version -- cgit v1.2.3-70-g09d2 From be042777045b6e11a3106044e14b06adace7b265 Mon Sep 17 00:00:00 2001 From: briantro Date: Thu, 3 Mar 2016 21:01:56 -0600 Subject: peplus.cpp: Add dump of cap1144.u50 [Badbaud] --- src/mame/drivers/peplus.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/peplus.cpp b/src/mame/drivers/peplus.cpp index fa19b702e7b..08ee154c2c4 100644 --- a/src/mame/drivers/peplus.cpp +++ b/src/mame/drivers/peplus.cpp @@ -6945,9 +6945,8 @@ Currently stalls with "PRINTER ERROR" ROM_LOAD( "mxo-cg1209.u75", 0x18000, 0x8000, CRC(da344256) SHA1(1320c4a8b48a9e61a4607e0a9d08083fde2bd334) ) ROM_REGION( 0x100, "proms", 0 ) - ROM_LOAD( "cap1144.u50", 0x0000, 0x0100, NO_DUMP ) - ROM_LOAD( "cap1426.u50", 0x0000, 0x0100, CRC(6c7c3462) SHA1(b5481b548f4db460d27a4bfebb08188f36ca0c11) ) - + ROM_LOAD( "cap1144.u50", 0x0000, 0x0100, CRC(c80e88ef) SHA1(51c62a07f660a2f3be46a8fbb5af01cff2660e8d) ) + ROM_REGION( 0x1000, "printer", 0 ) /* ROM from the printer driver PCB */ ROM_LOAD( "lp_86.u9", 0x0000, 0x1000, CRC(cdd93c06) SHA1(96f0a6e231f355a0b82bb0e1e698edbd66ff3020) ) /* 2732 EPROM */ ROM_END -- cgit v1.2.3-70-g09d2 From df1ad60a93146448f78c340090902dc84b378689 Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Fri, 4 Mar 2016 00:12:02 -0300 Subject: New machines marked as NOT_WORKING ---------------------------------- Butterfly Dream 97 / Hudie Meng 97 [Roberto Fresca, Ioannis Bampoulas] --- src/mame/drivers/skylncr.cpp | 21 +++++++++++++++++++++ src/mame/mame.lst | 1 + 2 files changed, 22 insertions(+) (limited to 'src') diff --git a/src/mame/drivers/skylncr.cpp b/src/mame/drivers/skylncr.cpp index 514df8d8100..0b56e4e0f4d 100644 --- a/src/mame/drivers/skylncr.cpp +++ b/src/mame/drivers/skylncr.cpp @@ -1650,6 +1650,26 @@ ROM_START( sstar97 ) ROM_LOAD16_BYTE( "bor_dun_5.u22", 0x40001, 0x20000, CRC(ca17a632) SHA1(d491310ccdbe9b59a1e607f9254646f20700d79d) ) ROM_END +/* Butterfly Dream 97 / Hudie Meng 97 + Game is encrypted and needs better decoded graphics. +*/ +ROM_START( bdream97 ) + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD( "27c512_subboard.bin", 0x0000, 0x10000, CRC(b0056324) SHA1(8299198d5e7ed50967f380ba0fddff5a39eee857) ) + + ROM_REGION( 0x80000, "gfx1", 0 ) // All ROMs are 27010. + ROM_LOAD16_BYTE( "27c010.u20", 0x00000, 0x20000, CRC(df1fd438) SHA1(8da4d116e768a3c269a2031db6bf38a5b7707029) ) + ROM_LOAD16_BYTE( "27c010.u22", 0x00001, 0x20000, CRC(e66910eb) SHA1(454dc47caf4ae9408c3d0b759f4a32d346f86ffe) ) + ROM_LOAD16_BYTE( "27c010.u21", 0x40000, 0x20000, CRC(b984f5bd) SHA1(9a21b46d6d497271cd589e01af3f3143946980b1) ) + ROM_LOAD16_BYTE( "27c010.u23", 0x40001, 0x20000, CRC(2b6e6fd7) SHA1(cf0c66c90c6ab3ebc69ebe1e4f29b69b72edfdc2) ) + + ROM_REGION( 0x80000, "gfx2", 0 ) // All ROMs are 27010. + ROM_LOAD16_BYTE( "27c010.u24", 0x00000, 0x20000, CRC(b77f3fc5) SHA1(63f7b46ed19f256a6d84624e191dc1719a57cbed) ) + ROM_LOAD16_BYTE( "27c010.u26", 0x00001, 0x20000, CRC(27cd64ef) SHA1(6b39b2919aca967f72fa16cd61b1641d0fb98d88) ) + ROM_LOAD16_BYTE( "27c010.u25", 0x40000, 0x20000, CRC(bdebdf35) SHA1(245247b23ddeded32519608f4696205bb5541ccc) ) + ROM_LOAD16_BYTE( "27c010.u27", 0x40001, 0x20000, CRC(0a266de4) SHA1(0ff9ad793e77d5419bd446cb73d4968e42305353) ) +ROM_END + /********************************** * Driver Init * @@ -1675,3 +1695,4 @@ GAME( 1995, leader, 0, skylncr, leader, skylncr_state, skylncr, ROT0 GAME( 199?, gallag50, 0, skylncr, gallag50, skylncr_state, skylncr, ROT0, "bootleg", "Gallag Video Game / Petalouda (Butterfly, x50)", 0 ) GAME( 199?, neraidou, 0, neraidou, neraidou, skylncr_state, skylncr, ROT0, "bootleg", "Neraidoula (Fairy Butterfly)", 0 ) GAME( 199?, sstar97, 0, sstar97, sstar97, skylncr_state, skylncr, ROT0, "Bordun International", "Super Star 97 / Ming Xing 97 (version V153B)", 0 ) +GAME( 199?, bdream97, 0, sstar97, sstar97, skylncr_state, skylncr, ROT0, "bootleg", "Butterfly Dream 97 / Hudie Meng 97", MACHINE_NOT_WORKING ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 541f9f28b86..bd1d3bed189 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -32745,6 +32745,7 @@ mbutrfly // (c) 1999 (Bordun International?) neraidou // Bootleg? skylncr // (c) 1995 Bordun International sstar97 // (c) 199? Bordun International +bdream97 // Bootleg? @source:skyraid.cpp skyraid // 009709 1978/03 [6502] -- cgit v1.2.3-70-g09d2 From 5a5b7870817936cf0ae731c18745ba4483255d07 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 4 Mar 2016 16:46:34 +1100 Subject: Further reduce template instantiations --- src/emu/validity.cpp | 24 ++---------------------- src/lib/util/strformat.h | 32 ++++++++++++++++---------------- 2 files changed, 18 insertions(+), 38 deletions(-) (limited to 'src') diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp index e4f1ef738e0..7feb39a1a71 100644 --- a/src/emu/validity.cpp +++ b/src/emu/validity.cpp @@ -14,19 +14,6 @@ #include -//************************************************************************** -// COMPILE-TIME VALIDATION -//************************************************************************** - -// if the following lines error during compile, your PTR64 switch is set incorrectly in the makefile -#ifdef PTR64 -UINT8 your_ptr64_flag_is_wrong[(int)(sizeof(void *) - 7)]; -#else -UINT8 your_ptr64_flag_is_wrong[(int)(5 - sizeof(void *))]; -#endif - - - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -350,9 +337,9 @@ void validity_checker::validate_core() // check pointer size #ifdef PTR64 - if (sizeof(void *) != 8) osd_printf_error("PTR64 flag enabled, but was compiled for 32-bit target\n"); + static_assert(sizeof(void *) == 8, "PTR64 flag enabled, but was compiled for 32-bit target\n"); #else - if (sizeof(void *) != 4) osd_printf_error("PTR64 flag not enabled, but was compiled for 64-bit target\n"); + static_assert(sizeof(void *) == 4, "PTR64 flag not enabled, but was compiled for 64-bit target\n"); #endif // TODO: check if this is actually working @@ -377,9 +364,6 @@ void validity_checker::validate_inlines() #undef rand volatile UINT64 testu64a = rand() ^ (rand() << 15) ^ ((UINT64)rand() << 30) ^ ((UINT64)rand() << 45); volatile INT64 testi64a = rand() ^ (rand() << 15) ^ ((INT64)rand() << 30) ^ ((INT64)rand() << 45); -#ifdef PTR64 - volatile INT64 testi64b = rand() ^ (rand() << 15) ^ ((INT64)rand() << 30) ^ ((INT64)rand() << 45); -#endif volatile UINT32 testu32a = rand() ^ (rand() << 15); volatile UINT32 testu32b = rand() ^ (rand() << 15); volatile INT32 testi32a = rand() ^ (rand() << 15); @@ -395,10 +379,6 @@ void validity_checker::validate_inlines() if (testu64a == 0) testu64a++; if (testi64a == 0) testi64a++; else if (testi64a < 0) testi64a = -testi64a; -#ifdef PTR64 - if (testi64b == 0) testi64b++; - else if (testi64b < 0) testi64b = -testi64b; -#endif if (testu32a == 0) testu32a++; if (testu32b == 0) testu32b++; if (testi32a == 0) testi32a++; diff --git a/src/lib/util/strformat.h b/src/lib/util/strformat.h index f0f481bb3f3..51d521fd25b 100644 --- a/src/lib/util/strformat.h +++ b/src/lib/util/strformat.h @@ -1497,11 +1497,11 @@ private: // CORE FORMATTING FUNCTION //************************************************************************** -template -typename Stream::off_type stream_format(Stream &str, Format const &args) +template +typename Stream::off_type stream_format(Stream &str, format_argument_pack const &args) { - typedef format_helper > format_helper; - typedef typename Format::iterator iterator; + typedef format_helper > format_helper; + typedef typename format_argument_pack::iterator iterator; class stream_preserver { public: @@ -1681,41 +1681,41 @@ inline String string_format(std::locale const &locale, Format &&fmt, Params &&.. return str.str(); }; -template -inline String string_format(Format &&fmt, detail::format_argument_pack const &args) +template +inline String string_format(detail::format_argument_pack const &args) { typedef std::basic_ostringstream ostream; ostream str; - stream_format(str, std::forward(fmt), args); + detail::stream_format(str, args); return str.str(); }; -template -inline String string_format(Format &&fmt, detail::format_argument_pack &&args) +template +inline String string_format(detail::format_argument_pack &&args) { typedef std::basic_ostringstream ostream; ostream str; - stream_format(str, std::forward(fmt), std::move(args)); + detail::stream_format(str, std::move(args)); return str.str(); }; -template -inline String string_format(std::locale const &locale, Format &&fmt, detail::format_argument_pack const &args) +template +inline String string_format(std::locale const &locale, detail::format_argument_pack const &args) { typedef std::basic_ostringstream ostream; ostream str; str.imbue(locale); - stream_format(str, std::forward(fmt), args); + detail::stream_format(str, args); return str.str(); }; -template -inline String string_format(std::locale const &locale, Format &&fmt, detail::format_argument_pack &&args) +template +inline String string_format(std::locale const &locale, detail::format_argument_pack &&args) { typedef std::basic_ostringstream ostream; ostream str; str.imbue(locale); - stream_format(str, std::forward(fmt), std::move(args)); + detail::stream_format(str, std::move(args)); return str.str(); }; -- cgit v1.2.3-70-g09d2 From cc2330d739ab68afed3b6725b7d2f80bb582ef50 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 4 Mar 2016 08:33:22 +0100 Subject: Fix compile are demote drivers (nw) --- scripts/target/mame/mess.lua | 4 +- src/mame/drivers/mephisto.cpp | 50 +++++++------- src/mame/drivers/mmodular.cpp | 157 ++++++++++++++++++------------------------ 3 files changed, 92 insertions(+), 119 deletions(-) (limited to 'src') diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 3beae94cb60..205302a8671 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -1774,8 +1774,8 @@ files { createMESSProjects(_target, _subtarget, "hegener") files { MAME_DIR .. "src/mame/drivers/glasgow.cpp", --- MAME_DIR .. "src/mame/drivers/mephisto.cpp", --- MAME_DIR .. "src/mame/drivers/mmodular.cpp", + MAME_DIR .. "src/mame/drivers/mephisto.cpp", + MAME_DIR .. "src/mame/drivers/mmodular.cpp", MAME_DIR .. "src/mame/drivers/stratos.cpp", } diff --git a/src/mame/drivers/mephisto.cpp b/src/mame/drivers/mephisto.cpp index 822cbc584a3..987e8442a92 100644 --- a/src/mame/drivers/mephisto.cpp +++ b/src/mame/drivers/mephisto.cpp @@ -67,14 +67,11 @@ Mephisto 4 Turbo Kit 18mhz - (mm4tk) #include "sound/beep.h" //#include "mephisto.lh" -#include "includes/mboard.h" - - -class mephisto_state : public mboard_state +class mephisto_state : public driver_device { public: mephisto_state(const machine_config &mconfig, device_type type, const char *tag) - : mboard_state(mconfig, type, tag) + : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_beep(*this, "beeper") , m_key1_0(*this, "KEY1_0") @@ -218,10 +215,10 @@ static ADDRESS_MAP_START( rebel5_mem, AS_PROGRAM, 8, mephisto_state ) AM_RANGE( 0x0000, 0x1fff) AM_RAM // AM_BASE(m_p_ram) AM_RANGE( 0x2000, 0x2007) AM_WRITE(write_led) // Status LEDs+ buzzer AM_RANGE( 0x3000, 0x3007) AM_READ(read_keys) // Rebel 5.0 - AM_RANGE( 0x3000, 0x4000) AM_READ(mboard_read_board_8) // Chessboard + //AM_RANGE( 0x3000, 0x4000) AM_READ(mboard_read_board_8) // Chessboard AM_RANGE( 0x5000, 0x5000) AM_WRITE(write_lcd) - AM_RANGE( 0x6000, 0x6000) AM_WRITE(mboard_write_LED_8) // Chessboard - AM_RANGE( 0x7000, 0x7000) AM_WRITE(mboard_write_board_8) // Chessboard + //AM_RANGE( 0x6000, 0x6000) AM_WRITE(mboard_write_LED_8) // Chessboard + //AM_RANGE( 0x7000, 0x7000) AM_WRITE(mboard_write_board_8) // Chessboard AM_RANGE( 0x8000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -229,10 +226,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( mephisto_mem, AS_PROGRAM, 8, mephisto_state ) AM_RANGE( 0x0000, 0x1fff) AM_RAM //AM_BASE(m_p_ram) AM_RANGE( 0x2000, 0x2000) AM_WRITE(write_lcd) - AM_RANGE( 0x2400, 0x2407) AM_WRITE(mboard_write_LED_8) // Chessboard - AM_RANGE( 0x2800, 0x2800) AM_WRITE(mboard_write_board_8) // Chessboard + //AM_RANGE( 0x2400, 0x2407) AM_WRITE(mboard_write_LED_8) // Chessboard + //AM_RANGE( 0x2800, 0x2800) AM_WRITE(mboard_write_board_8) // Chessboard AM_RANGE( 0x2c00, 0x2c07) AM_READ(read_keys) - AM_RANGE( 0x3000, 0x3000) AM_READ(mboard_read_board_8) // Chessboard + //AM_RANGE( 0x3000, 0x3000) AM_READ(mboard_read_board_8) // Chessboard AM_RANGE( 0x3400, 0x3407) AM_WRITE(write_led) // Status LEDs+ buzzer AM_RANGE( 0x3800, 0x3800) AM_WRITE(mephisto_NMI) // NMI enable AM_RANGE( 0x4000, 0x7fff) AM_ROM // Opening Library @@ -243,10 +240,10 @@ static ADDRESS_MAP_START( mm2_mem, AS_PROGRAM, 8, mephisto_state ) AM_RANGE( 0x0000, 0x0fff) AM_RAM //AM_BASE(m_p_ram) AM_RANGE( 0x1000, 0x1007) AM_WRITE(write_led_mm2) //Status LEDs AM_RANGE( 0x1800, 0x1807) AM_READ(read_keys) - AM_RANGE( 0x2000, 0x2000) AM_READ(mboard_read_board_8) //Chessboard + //AM_RANGE( 0x2000, 0x2000) AM_READ(mboard_read_board_8) //Chessboard AM_RANGE( 0x2800, 0x2800) AM_WRITE(write_lcd) - AM_RANGE( 0x3000, 0x3000) AM_WRITE(mboard_write_LED_8) //Chessboard - AM_RANGE( 0x3800, 0x3800) AM_WRITE(mboard_write_board_8) //Chessboard + //AM_RANGE( 0x3000, 0x3000) AM_WRITE(mboard_write_LED_8) //Chessboard + //AM_RANGE( 0x3800, 0x3800) AM_WRITE(mboard_write_board_8) //Chessboard AM_RANGE( 0x4000, 0x7fff) AM_ROM // Opening Library ? AM_RANGE( 0x8000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -288,7 +285,6 @@ static INPUT_PORTS_START( mephisto ) PORT_START("KEY2_7") //Port $2c0f PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D 4") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) - PORT_INCLUDE( chessboard ) INPUT_PORTS_END @@ -319,7 +315,7 @@ void mephisto_state::machine_start() { m_lcd_shift_counter = 3; m_allowNMI = 1; - mboard_savestate_register(); + //mboard_savestate_register(); } MACHINE_START_MEMBER(mephisto_state,mm2) @@ -327,7 +323,7 @@ MACHINE_START_MEMBER(mephisto_state,mm2) m_lcd_shift_counter = 3; m_led7=0xff; - mboard_savestate_register(); + //mboard_savestate_register(); } @@ -335,8 +331,8 @@ void mephisto_state::machine_reset() { m_lcd_shift_counter = 3; m_allowNMI = 1; - mboard_set_border_pieces(); - mboard_set_board(); + //mboard_set_border_pieces(); + //mboard_set_board(); /* adjust artwork depending on current emulation*/ @@ -369,7 +365,7 @@ static MACHINE_CONFIG_START( mephisto, mephisto_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", mephisto_state, update_nmi, attotime::from_hz(600)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", mephisto_state, mboard_update_artwork, attotime::from_hz(100)) + //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", mephisto_state, mboard_update_artwork, attotime::from_hz(100)) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( rebel5, mephisto ) @@ -461,10 +457,10 @@ DRIVER_INIT_MEMBER(mephisto_state,mephisto) /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -CONS( 1984, mm2, mm4, 0, mm2, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto MM2 Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1986, rebel5, mm4, 0, rebel5, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto Rebell 5,0 Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1987, mm4, 0, 0, mephisto, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 4 Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1987, mm4tk, mm4, 0, mm4tk, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 4 Schachcomputer Turbo Kit + HG440", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1990, mm5, mm4, 0, mephisto, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1990, mm50, mm4, 0, mephisto, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 5.0 Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1990, mm5tk, mm4, 0, mm4tk, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schachcomputer Turbo Kit + HG550", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1984, mm2, mm4, 0, mm2, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto MM2 Schachcomputer", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1986, rebel5, mm4, 0, rebel5, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto Rebell 5,0 Schachcomputer", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1987, mm4, 0, 0, mephisto, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 4 Schachcomputer", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1987, mm4tk, mm4, 0, mm4tk, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 4 Schachcomputer Turbo Kit + HG440", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, mm5, mm4, 0, mephisto, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schachcomputer", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, mm50, mm4, 0, mephisto, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 5.0 Schachcomputer", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, mm5tk, mm4, 0, mm4tk, mephisto, mephisto_state, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schachcomputer Turbo Kit + HG550", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/drivers/mmodular.cpp b/src/mame/drivers/mmodular.cpp index 09e83e6dcf6..49b873382cc 100644 --- a/src/mame/drivers/mmodular.cpp +++ b/src/mame/drivers/mmodular.cpp @@ -3,8 +3,6 @@ /****************************************************************************** Mephisto Chess Computers using plugin modules - Vancouver Chess Computer 68000 (driver recalled) by R. Schaefer (2010) - (most of the magnetic sensor versions with 680x0 family modules) Almeria 68000 12Mhz @@ -57,12 +55,6 @@ holding CLEAR clears Battery Backed RAM on the Berlin (Pro) 68020 ******************************************************************************/ -/****************************************************************************** - Mephisto Polgar & Milano - 2010 Dirk V., Ralf Schafer, Cowering - -******************************************************************************/ - /* CPU 65C02 P4 4.9152 MHz @@ -96,7 +88,6 @@ Bit 5+6 LED 1-8 enable #include "rendlay.h" -#include "includes/mboard.h" #include "machine/nvram.h" //static UINT16 unknown2_data = 0; @@ -125,15 +116,17 @@ INPUT_PORTS_EXTERN( chessboard ); UINT8 lcd32_char; -class polgar_state : public mboard_state +class polgar_state : public driver_device { public: polgar_state(const machine_config &mconfig, device_type type, const char *tag) - : mboard_state(mconfig, type, tag), + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), m_lcdc(*this, "hd44780"), m_beeper(*this, "beeper") { } + required_device m_maincpu; optional_device m_lcdc; optional_device m_beeper; @@ -637,9 +630,9 @@ WRITE8_MEMBER(polgar_state::monteciv_3006) WRITE8_MEMBER(polgar_state::academy_write_board) { - latch_data = data; + //latch_data = data; // logerror("acad_write_latch %02x\n",data); - if (data != 0xff) mboard_write_board_8(space,0, data); + //if (data != 0xff) mboard_write_board_8(space,0, data); } WRITE8_MEMBER(polgar_state::milano_write_board) @@ -658,7 +651,7 @@ READ8_MEMBER(polgar_state::milano_read_board) if (latch_data) { - line = get_first_cleared_bit(latch_data); + line = 0;//get_first_cleared_bit(latch_data); tmp = ioport(board_lines[line])->read(); if (tmp != 0xff) @@ -712,7 +705,7 @@ READ32_MEMBER(polgar_state::read_keys_BPL32) } else { if (BPL32latch_data & 0x7f) { logerror("ReadingBoard %02x\n",BPL32latch_data); - line = get_first_cleared_bit(BPL32latch_data); + line = 0;//get_first_cleared_bit(BPL32latch_data); tmp = ioport(board_lines[line])->read(); if (tmp != 0xff) @@ -751,7 +744,7 @@ READ8_MEMBER(polgar_state::read_keys_board_monteciv) UINT8 data = 0; if (monteciv_select[0] == 0xff && monteciv_select[1] == 0xff) { - data = mboard_read_board_8(space,0); + //data = mboard_read_board_8(space,0); } else { if (monteciv_select[0] == 0x0) { data = ioport("BUTTONS_MONTE2")->read(); @@ -789,7 +782,7 @@ READ8_MEMBER(polgar_state::read_keys_board_academy) data = ioport("BUTTONS_ACAD")->read(); } else { // if (latch_data & 0x7f) { - data = mboard_read_board_8(space,0); + //data = mboard_read_board_8(space,0); // data = milano_read_board(space,0); // logerror("ReadingBoard %02x\n",latch_data); @@ -1014,20 +1007,16 @@ MACHINE_START_MEMBER(polgar_state,risc) void polgar_state::common_chess_start() { - mboard_set_border_pieces(); - mboard_set_board(); } MACHINE_START_MEMBER(polgar_state,polgar) { common_chess_start(); - mboard_savestate_register(); } MACHINE_START_MEMBER(polgar_state,sfortea) { common_chess_start(); - mboard_savestate_register(); } MACHINE_START_MEMBER(polgar_state,diablo68) @@ -1037,7 +1026,6 @@ MACHINE_START_MEMBER(polgar_state,diablo68) MACHINE_START_MEMBER(polgar_state,van16) { - mboard_savestate_register(); } MACHINE_RESET_MEMBER(polgar_state,van16) @@ -1096,9 +1084,9 @@ GFXDECODE_END static ADDRESS_MAP_START(polgar_mem , AS_PROGRAM, 8, polgar_state ) AM_RANGE( 0x0000, 0x1fff ) AM_RAM - AM_RANGE( 0x2400, 0x2400 ) AM_WRITE(mboard_write_LED_8 ) // Chessboard - AM_RANGE( 0x2800, 0x2800 ) AM_WRITE(mboard_write_board_8) // Chessboard - AM_RANGE( 0x3000, 0x3000 ) AM_READ(mboard_read_board_8 ) // Chessboard + //AM_RANGE( 0x2400, 0x2400 ) AM_WRITE(mboard_write_LED_8 ) // Chessboard +// AM_RANGE( 0x2800, 0x2800 ) AM_WRITE(mboard_write_board_8) // Chessboard +// AM_RANGE( 0x3000, 0x3000 ) AM_READ(mboard_read_board_8 ) // Chessboard AM_RANGE( 0x3400, 0x3405 ) AM_WRITE(polgar_write_LED) // Function LEDs AM_RANGE( 0x2c00, 0x2c07 ) AM_READ(read_keys) AM_RANGE( 0x2004, 0x2004 ) AM_WRITE(write_polgar_IO ) // LCD Instr. Reg + Beeper @@ -1121,11 +1109,11 @@ static ADDRESS_MAP_START(gen32_mem, AS_PROGRAM, 32, polgar_state ) AM_RANGE( 0x00000000, 0x0003ffff ) AM_ROM - AM_RANGE( 0xc0000000 , 0xc0000003 ) AM_READ(mboard_read_board_32 ) - AM_RANGE( 0xc8000000 , 0xc8000003 ) AM_WRITE(mboard_write_board_32 ) - AM_RANGE( 0xc8000004 , 0xc8000007 ) AM_WRITE(mboard_write_board_32 ) - AM_RANGE( 0xd0000000 , 0xd0000003 ) AM_WRITE(mboard_write_LED_32 ) - AM_RANGE( 0xd0000004 , 0xd0000007 ) AM_WRITE(mboard_write_LED_32 ) + //AM_RANGE( 0xc0000000 , 0xc0000003 ) AM_READ(mboard_read_board_32 ) + //AM_RANGE( 0xc8000000 , 0xc8000003 ) AM_WRITE(mboard_write_board_32 ) + //AM_RANGE( 0xc8000004 , 0xc8000007 ) AM_WRITE(mboard_write_board_32 ) + //AM_RANGE( 0xd0000000 , 0xd0000003 ) AM_WRITE(mboard_write_LED_32 ) + //AM_RANGE( 0xd0000004 , 0xd0000007 ) AM_WRITE(mboard_write_LED_32 ) AM_RANGE( 0xf0000004 , 0xf0000013 ) AM_READ(read_buttons_gen32 ) AM_RANGE( 0xe0000000 , 0xe0000003 ) AM_WRITE(write_LCD_data_32 ) AM_RANGE( 0xe0000010 , 0xe0000013 ) AM_WRITE(write_IOenables_32 ) @@ -1156,9 +1144,9 @@ static ADDRESS_MAP_START(van32_mem, AS_PROGRAM, 32, polgar_state ) AM_RANGE( 0x00000000, 0x0003ffff ) AM_ROM - AM_RANGE( 0x800000fc , 0x800000ff ) AM_READ(mboard_read_board_32 ) - AM_RANGE( 0x88000000 , 0x88000007 ) AM_WRITE(mboard_write_board_32 ) - AM_RANGE( 0x90000000 , 0x90000007 ) AM_WRITE(mboard_write_LED_32 ) + //AM_RANGE( 0x800000fc , 0x800000ff ) AM_READ(mboard_read_board_32 ) +// AM_RANGE( 0x88000000 , 0x88000007 ) AM_WRITE(mboard_write_board_32 ) +// AM_RANGE( 0x90000000 , 0x90000007 ) AM_WRITE(mboard_write_LED_32 ) AM_RANGE( 0x800000ec , 0x800000ff ) AM_READ(read_buttons_van32 ) AM_RANGE( 0xa0000000 , 0xa0000003 ) AM_WRITE(write_LCD_data_32 ) AM_RANGE( 0xa0000010 , 0xa0000013 ) AM_WRITE(write_IOenables_32 ) @@ -1176,9 +1164,9 @@ static ADDRESS_MAP_START(alm32_mem, AS_PROGRAM, 32, polgar_state ) AM_RANGE( 0x00000000, 0x0001ffff ) AM_ROM - AM_RANGE( 0x800000fc , 0x800000ff ) AM_READ(mboard_read_board_32 ) - AM_RANGE( 0x88000000 , 0x88000007 ) AM_WRITE(mboard_write_board_32 ) - AM_RANGE( 0x90000000 , 0x90000007 ) AM_WRITE(mboard_write_LED_32 ) + //AM_RANGE( 0x800000fc , 0x800000ff ) AM_READ(mboard_read_board_32 ) + //AM_RANGE( 0x88000000 , 0x88000007 ) AM_WRITE(mboard_write_board_32 ) + //AM_RANGE( 0x90000000 , 0x90000007 ) AM_WRITE(mboard_write_LED_32 ) AM_RANGE( 0x800000ec , 0x800000ff ) AM_READ(read_buttons_van32 ) AM_RANGE( 0xa0000000 , 0xa0000003 ) AM_WRITE(write_LCD_data_32 ) AM_RANGE( 0xa0000010 , 0xa0000013 ) AM_WRITE(write_IOenables_32 ) @@ -1204,9 +1192,9 @@ static ADDRESS_MAP_START(van16_mem, AS_PROGRAM, 16, polgar_state ) AM_RANGE( 0x000000, 0x03ffff ) AM_ROM - AM_RANGE( 0xc00000 , 0xc00001 ) AM_READ(mboard_read_board_16 ) - AM_RANGE( 0xc80000 , 0xc80001 ) AM_WRITE(mboard_write_board_16 ) - AM_RANGE( 0xd00000 , 0xd00001 ) AM_WRITE(mboard_write_LED_16 ) + //AM_RANGE( 0xc00000 , 0xc00001 ) AM_READ(mboard_read_board_16 ) + //AM_RANGE( 0xc80000 , 0xc80001 ) AM_WRITE(mboard_write_board_16 ) + //AM_RANGE( 0xd00000 , 0xd00001 ) AM_WRITE(mboard_write_LED_16 ) AM_RANGE( 0xf00000 , 0xf00009 ) AM_READ(read_buttons_van16 ) AM_RANGE( 0xd80000 , 0xd80001 ) AM_WRITE(write_LCD_data ) AM_RANGE( 0xd80008 , 0xd80009 ) AM_WRITE(write_IOenables ) @@ -1223,9 +1211,9 @@ static ADDRESS_MAP_START(alm16_mem, AS_PROGRAM, 16, polgar_state ) AM_RANGE( 0x000000, 0x01ffff ) AM_ROM - AM_RANGE( 0xc00000 , 0xc00001 ) AM_READ(mboard_read_board_16 ) - AM_RANGE( 0xc80000 , 0xc80001 ) AM_WRITE(mboard_write_board_16 ) - AM_RANGE( 0xd00000 , 0xd00001 ) AM_WRITE(mboard_write_LED_16 ) + //AM_RANGE( 0xc00000 , 0xc00001 ) AM_READ(mboard_read_board_16 ) + //AM_RANGE( 0xc80000 , 0xc80001 ) AM_WRITE(mboard_write_board_16 ) + //AM_RANGE( 0xd00000 , 0xd00001 ) AM_WRITE(mboard_write_LED_16 ) AM_RANGE( 0xf00000 , 0xf00009 ) AM_READ(read_buttons_van16 ) AM_RANGE( 0xd80000 , 0xd80001 ) AM_WRITE(write_LCD_data ) AM_RANGE( 0xd80008 , 0xd80009 ) AM_WRITE(write_IOenables ) @@ -1255,7 +1243,7 @@ static ADDRESS_MAP_START(academy_mem , AS_PROGRAM, 8, polgar_state ) AM_RANGE( 0x0000, 0x1fff ) AM_RAM AM_RANGE( 0x2400, 0x2400 ) AM_READ(read_keys_board_academy ) AM_RANGE( 0x2800, 0x2800 ) AM_WRITE(academy_write_board ) // Chessboard - AM_RANGE( 0x2c00, 0x2c00 ) AM_WRITE(mboard_write_LED_8 ) // Chessboard + //AM_RANGE( 0x2c00, 0x2c00 ) AM_WRITE(mboard_write_LED_8 ) // Chessboard AM_RANGE( 0x3002, 0x3002 ) AM_WRITE(beep_academy ) AM_RANGE( 0x3001, 0x3001 ) AM_WRITE(academy_inhibitNMI ) AM_RANGE( 0x3400, 0x3400 ) AM_WRITE(academy_write_LED ) @@ -1267,7 +1255,7 @@ static ADDRESS_MAP_START(monteciv_mem , AS_PROGRAM, 8, polgar_state ) AM_RANGE( 0x0000, 0x1fff ) AM_RAM AM_RANGE( 0x2400, 0x2400 ) AM_READ(read_keys_board_monteciv ) AM_RANGE( 0x2800, 0x2800 ) AM_WRITE(academy_write_board ) // Chessboard - AM_RANGE( 0x2c00, 0x2c00 ) AM_WRITE(mboard_write_LED_8 ) // Chessboard + //AM_RANGE( 0x2c00, 0x2c00 ) AM_WRITE(mboard_write_LED_8 ) // Chessboard AM_RANGE( 0x3400, 0x3400 ) AM_WRITE(academy_write_LED ) // Status LEDs AM_RANGE( 0x3000, 0x3001 ) AM_WRITE(monteciv_select_line ) // Select Keyline AM_RANGE( 0x3002, 0x3002 ) AM_WRITE(beep_academy ) @@ -1334,8 +1322,6 @@ static INPUT_PORTS_START( polgar ) // PORT_START("KEY1_8") // PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(" A") PORT_CODE(KEYCODE_1) - PORT_INCLUDE( chessboard ) - INPUT_PORTS_END static INPUT_PORTS_START( sfortea ) @@ -1369,8 +1355,6 @@ static INPUT_PORTS_START( sfortea ) PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RST1") PORT_CODE(KEYCODE_7) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RST2") PORT_CODE(KEYCODE_8) */ - - PORT_INCLUDE( chessboard ) INPUT_PORTS_END static INPUT_PORTS_START( academy ) @@ -1384,7 +1368,6 @@ static INPUT_PORTS_START( academy ) PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(" ENT") PORT_CODE(KEYCODE_F7) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(" CL") PORT_CODE(KEYCODE_F8) - PORT_INCLUDE( chessboard ) INPUT_PORTS_END static INPUT_PORTS_START( megaiv ) @@ -1408,7 +1391,6 @@ static INPUT_PORTS_START( megaiv ) // PORT_START("KEY1_8") // PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(" A") PORT_CODE(KEYCODE_1) - PORT_INCLUDE( chessboard ) INPUT_PORTS_END @@ -1435,7 +1417,6 @@ static INPUT_PORTS_START( monteciv ) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_8) - PORT_INCLUDE( chessboard ) INPUT_PORTS_END @@ -1453,7 +1434,6 @@ static INPUT_PORTS_START( gen32 ) PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSLASH) - PORT_INCLUDE( chessboard ) INPUT_PORTS_END @@ -1468,7 +1448,6 @@ static INPUT_PORTS_START( bpl32 ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSLASH) - PORT_INCLUDE( chessboard ) INPUT_PORTS_END @@ -1487,9 +1466,8 @@ static INPUT_PORTS_START( van32 ) PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSLASH) - PORT_INCLUDE( chessboard ) - INPUT_PORTS_END +INPUT_PORTS_END static INPUT_PORTS_START( van16 ) @@ -1505,7 +1483,6 @@ static INPUT_PORTS_START( van16 ) PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSLASH) - PORT_INCLUDE( chessboard ) INPUT_PORTS_END @@ -1546,7 +1523,7 @@ static MACHINE_CONFIG_START( polgar, polgar_state ) MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", polgar_state, cause_nmi, attotime::from_hz(600)) MCFG_TIMER_START_DELAY(attotime::from_hz(60)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100)) + //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100)) MACHINE_CONFIG_END @@ -1563,7 +1540,7 @@ static MACHINE_CONFIG_START( sfortea, polgar_state ) MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", polgar_state, cause_M6502_irq, attotime::from_hz(600)) MCFG_TIMER_START_DELAY(attotime::from_hz(60)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100)) + //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100)) MACHINE_CONFIG_END static MACHINE_CONFIG_START( alm32, polgar_state ) @@ -1572,7 +1549,7 @@ static MACHINE_CONFIG_START( alm32, polgar_state ) MCFG_MACHINE_START_OVERRIDE(polgar_state,van32) MCFG_MACHINE_RESET_OVERRIDE(polgar_state,van16) MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(750)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120)) + //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120)) MCFG_FRAGMENT_ADD( chess_common ) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1605,7 +1582,7 @@ static MACHINE_CONFIG_START( monteciv, polgar_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", polgar_state, cause_nmi, attotime::from_hz(600)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100)) + //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100)) MACHINE_CONFIG_END @@ -1626,7 +1603,7 @@ static MACHINE_CONFIG_START( diablo68, polgar_state ) MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq2, attotime::from_hz(60)) MCFG_TIMER_START_DELAY(attotime::from_hz(30)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120)) + //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120)) MACHINE_CONFIG_END @@ -1638,7 +1615,7 @@ static MACHINE_CONFIG_START( van16, polgar_state ) MCFG_MACHINE_RESET_OVERRIDE(polgar_state,van16) MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(600)) //MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(587)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120)) + //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120)) MCFG_FRAGMENT_ADD( chess_common ) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1655,7 +1632,7 @@ static MACHINE_CONFIG_START( van32, polgar_state ) MCFG_MACHINE_START_OVERRIDE(polgar_state,van32) MCFG_MACHINE_RESET_OVERRIDE(polgar_state,van16) MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(750)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120)) + //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120)) MCFG_FRAGMENT_ADD( chess_common ) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1667,7 +1644,7 @@ static MACHINE_CONFIG_START( risc, polgar_state ) MCFG_CPU_PROGRAM_MAP(risc_mem) MCFG_MACHINE_START_OVERRIDE(polgar_state,risc) MCFG_MACHINE_RESET_OVERRIDE(polgar_state,van16) - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120)) + //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120)) MCFG_FRAGMENT_ADD( chess_common ) // MCFG_NVRAM_ADD_0FILL("nvram") @@ -1681,7 +1658,7 @@ static MACHINE_CONFIG_START( gen32, polgar_state ) MCFG_MACHINE_RESET_OVERRIDE(polgar_state,van16) MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(375)) //MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(368.64)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120)) + //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(120)) MCFG_FRAGMENT_ADD( chess_common ) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1695,7 +1672,7 @@ static MACHINE_CONFIG_START( bpl32, polgar_state ) MCFG_MACHINE_START_OVERRIDE(polgar_state,van32) MCFG_MACHINE_RESET_OVERRIDE(polgar_state,van16) MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(750)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100)) + //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", polgar_state, mboard_update_artwork, attotime::from_hz(100)) MCFG_FRAGMENT_ADD( chess_common ) MCFG_NVRAM_ADD_0FILL("nvram") @@ -1863,29 +1840,29 @@ DRIVER_INIT_MEMBER(polgar_state,polgar) } /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ - CONS( 1986, polgar, 0, 0, polgar, polgar, polgar_state, polgar, "Hegener & Glaser", "Mephisto Polgar Schachcomputer", MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK) - CONS( 1987, sfortea, 0, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version A)", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1988, alm16, van16, 0, alm16, van16, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Almeria 68000", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1988, alm32, van16, 0, alm32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Alimera 68020", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1988, sforteb, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version B)", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1988, sforteba, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version B, alt)", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1988, sexpertb, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Expert B Chess Computer", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1986, polgar, 0, 0, polgar, polgar, polgar_state, polgar, "Hegener & Glaser", "Mephisto Polgar Schachcomputer", MACHINE_NOT_WORKING | MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK) + CONS( 1987, sfortea, 0, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version A)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1988, alm16, van16, 0, alm16, van16, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Almeria 68000", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1988, alm32, van16, 0, alm32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Alimera 68020", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1988, sforteb, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version B)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1988, sforteba, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version B, alt)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1988, sexpertb, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Expert B Chess Computer", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) CONS( 1989, academy, 0, 0, academy, academy, driver_device, 0, "Hegener & Glaser", "Mephisto Academy Schachcomputer", MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1989, megaiv, 0, 0, megaiv, megaiv, driver_device, 0, "Hegener & Glaser", "Mephisto Mega IV Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1989, megaiv, 0, 0, megaiv, megaiv, driver_device, 0, "Hegener & Glaser", "Mephisto Mega IV Schachcomputer", MACHINE_NOT_WORKING|MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) CONS( 1989, milano, polgar, 0, milano, polgar, polgar_state, polgar, "Hegener & Glaser", "Mephisto Milano Schachcomputer", MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -//CONS( 1989, montec4, 0, 0, monteciv, monteciv, driver_device, 0, "Hegener & Glaser", "Mephisto Monte Carlo IV", MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1989, sfortec, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version C)", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1989, sexpertc, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Expert C Chess Computer", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1990, lyon16, van16, 0, alm16, van16, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Lyon 68000", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1990, lyon32, van16, 0, alm32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Lyon 68020", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1990, monteciv, 0, 0, monteciv, monteciv, driver_device, 0, "Hegener & Glaser", "Mephisto Monte Carlo IV LE Schachcomputer", MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1991, diablo68, 0, 0, diablo68, sfortea, driver_device, 0, "Novag", "Novag Diablo 68000 Chess Computer", MACHINE_NO_SOUND|MACHINE_SUPPORTS_SAVE|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1991, van16, 0, 0, van16, van16, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Vancouver 68000", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1991, van32, van16, 0, van32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Vancouver 68020", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1992, risc, 0, 0, risc, van16, driver_device, 0, "Saitek", "RISC2500", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1993, gen32, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 V4.00", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1993, gen32_41, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 V4.01", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1994, berlinp, van16, 0, bpl32, bpl32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Berlin Pro 68020", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1996, bpl32, van16, 0, bpl32, bpl32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Berlin Pro London Upgrade V5.00", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1996, lond020, van16, 0, van32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto London 68020 32 Bit", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1996, lond030, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 London Upgrade V5.00", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) +//CONS( 1989, montec4, 0, 0, monteciv, monteciv, driver_device, 0, "Hegener & Glaser", "Mephisto Monte Carlo IV", MACHINE_NOT_WORKING|MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1989, sfortec, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Forte Chess Computer (version C)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1989, sexpertc, sfortea, 0, sfortea, sfortea, driver_device, 0, "Novag", "Novag Super Expert C Chess Computer", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1990, lyon16, van16, 0, alm16, van16, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Lyon 68000", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1990, lyon32, van16, 0, alm32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Lyon 68020", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1990, monteciv, 0, 0, monteciv, monteciv, driver_device, 0, "Hegener & Glaser", "Mephisto Monte Carlo IV LE Schachcomputer", MACHINE_NOT_WORKING|MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1991, diablo68, 0, 0, diablo68, sfortea, driver_device, 0, "Novag", "Novag Diablo 68000 Chess Computer", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1991, van16, 0, 0, van16, van16, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Vancouver 68000", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1991, van32, van16, 0, van32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Vancouver 68020", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1992, risc, 0, 0, risc, van16, driver_device, 0, "Saitek", "RISC2500", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1993, gen32, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 V4.00", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1993, gen32_41, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 V4.01", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1994, berlinp, van16, 0, bpl32, bpl32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Berlin Pro 68020", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1996, bpl32, van16, 0, bpl32, bpl32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Berlin Pro London Upgrade V5.00", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1996, lond020, van16, 0, van32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto London 68020 32 Bit", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) + CONS( 1996, lond030, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 London Upgrade V5.00", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -- cgit v1.2.3-70-g09d2 From 09421117947895bb859d8c719d48b39fa797d454 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 4 Mar 2016 19:09:30 +1100 Subject: Change %d to %u to correct ARGB settings display --- src/emu/ui/custui.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/emu/ui/custui.cpp b/src/emu/ui/custui.cpp index 6aaed9105df..1acecd1ba20 100644 --- a/src/emu/ui/custui.cpp +++ b/src/emu/ui/custui.cpp @@ -857,7 +857,7 @@ void ui_menu_rgb_ui::populate() if (m_lock_ref != RGB_ALPHA) { arrow_flags = get_arrow_flags(0, 255, m_color->a()); - item_append(_("Alpha"), string_format("%3d", m_color->a()).c_str(), arrow_flags, (void *)(FPTR)RGB_ALPHA); + item_append(_("Alpha"), string_format("%3u", m_color->a()).c_str(), arrow_flags, (void *)(FPTR)RGB_ALPHA); } else item_append(_("Alpha"), s_text.c_str(), 0, (void *)(FPTR)RGB_ALPHA); @@ -865,7 +865,7 @@ void ui_menu_rgb_ui::populate() if (m_lock_ref != RGB_RED) { arrow_flags = get_arrow_flags(0, 255, m_color->r()); - item_append(_("Red"), string_format("%3d", m_color->r()).c_str(), arrow_flags, (void *)(FPTR)RGB_RED); + item_append(_("Red"), string_format("%3u", m_color->r()).c_str(), arrow_flags, (void *)(FPTR)RGB_RED); } else item_append(_("Red"), s_text.c_str(), 0, (void *)(FPTR)RGB_RED); @@ -873,7 +873,7 @@ void ui_menu_rgb_ui::populate() if (m_lock_ref != RGB_GREEN) { arrow_flags = get_arrow_flags(0, 255, m_color->g()); - item_append(_("Green"), string_format("%3d", m_color->g()).c_str(), arrow_flags, (void *)(FPTR)RGB_GREEN); + item_append(_("Green"), string_format("%3u", m_color->g()).c_str(), arrow_flags, (void *)(FPTR)RGB_GREEN); } else item_append(_("Green"), s_text.c_str(), 0, (void *)(FPTR)RGB_GREEN); @@ -881,7 +881,7 @@ void ui_menu_rgb_ui::populate() if (m_lock_ref != RGB_BLUE) { arrow_flags = get_arrow_flags(0, 255, m_color->b()); - item_append(_("Blue"), string_format("%3d", m_color->b()).c_str(), arrow_flags, (void *)(FPTR)RGB_BLUE); + item_append(_("Blue"), string_format("%3u", m_color->b()).c_str(), arrow_flags, (void *)(FPTR)RGB_BLUE); } else item_append(_("Blue"), s_text.c_str(), 0, (void *)(FPTR)RGB_BLUE); -- cgit v1.2.3-70-g09d2 From c5836d89d765cf4894c0728d677ec5be666940d4 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 4 Mar 2016 09:23:22 +0100 Subject: Demoted svi318 to skeleton (nw) --- scripts/target/mame/mess.lua | 2 - src/mame/drivers/svi318.cpp | 184 ++++++++--- src/mame/machine/svi318.cpp | 767 ------------------------------------------- 3 files changed, 133 insertions(+), 820 deletions(-) delete mode 100644 src/mame/machine/svi318.cpp (limited to 'src') diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 205302a8671..9a5a4489352 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -2603,8 +2603,6 @@ files { createMESSProjects(_target, _subtarget, "svi") files { MAME_DIR .. "src/mame/drivers/svi318.cpp", - MAME_DIR .. "src/mame/includes/svi318.h", - MAME_DIR .. "src/mame/machine/svi318.cpp", } createMESSProjects(_target, _subtarget, "svision") diff --git a/src/mame/drivers/svi318.cpp b/src/mame/drivers/svi318.cpp index a5761935c45..f60420c7c82 100644 --- a/src/mame/drivers/svi318.cpp +++ b/src/mame/drivers/svi318.cpp @@ -1,10 +1,8 @@ -// license:??? -// copyright-holders:Sean Young,Tomas Karlsson +// license:BSD-3-Clause +// copyright-holders:Sean Young /* ** svi318.c : driver for Spectravideo SVI-318 and SVI-328 ** -** Sean Young, Tomas Karlsson -** ** Information taken from: http://www.samdal.com/sv318.htm ** ** SV-318 : 16KB Video RAM, 16KB RAM @@ -12,30 +10,114 @@ */ #include "emu.h" -#include "includes/svi318.h" +#include "cpu/z80/z80.h" +#include "machine/i8255.h" +#include "machine/ins8250.h" +#include "machine/wd_fdc.h" +#include "machine/ram.h" +#include "machine/buffer.h" +#include "imagedev/cassette.h" +#include "sound/dac.h" +#include "sound/ay8910.h" +#include "sound/wave.h" +#include "video/mc6845.h" +#include "video/tms9928a.h" +#include "bus/centronics/ctronics.h" +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" #include "imagedev/flopdrv.h" #include "formats/svi_dsk.h" #include "formats/svi_cas.h" #include "softlist.h" #include "rendlay.h" + +class svi318_state : public driver_device +{ +public: + svi318_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_cassette(*this, "cassette"), + m_dac(*this, "dac"), + m_ppi(*this, "ppi8255"), + m_ram(*this, RAM_TAG), + m_centronics(*this, "centronics"), + m_cent_data_out(*this, "cent_data_out"), + m_ins8250_0(*this, "ins8250_0"), + m_ins8250_1(*this, "ins8250_1"), + m_cart(*this, "cartslot"), + m_fd1793(*this, "wd179x"), + m_floppy0(*this, "wd179x:0"), + m_floppy1(*this, "wd179x:1"), + m_crtc(*this, "crtc"), + m_line(*this, "LINE"), + m_joysticks(*this, "JOYSTICKS"), + m_buttons(*this, "BUTTONS"), + m_palette(*this, "palette"), + m_bank1(*this, "bank1"), + m_bank2(*this, "bank2"), + m_bank3(*this, "bank3"), + m_bank4(*this, "bank4") + { } + + DECLARE_FLOPPY_FORMATS(floppy_formats); + + DECLARE_WRITE_LINE_MEMBER(vdp_interrupt); + // FDC + int m_drq; + int m_irq; + + virtual void machine_start() override; + virtual void machine_reset() override; + + memory_region *m_cart_rom; + memory_region *m_bios_rom; + +protected: + required_device m_maincpu; + required_device m_cassette; + required_device m_dac; + required_device m_ppi; + required_device m_ram; + required_device m_centronics; + required_device m_cent_data_out; + required_device m_ins8250_0; + required_device m_ins8250_1; + required_device m_cart; + required_device m_fd1793; + required_device m_floppy0; + required_device m_floppy1; + optional_device m_crtc; + required_ioport_array<11> m_line; + required_ioport m_joysticks; + required_ioport m_buttons; + optional_device m_palette; + +private: + required_memory_bank m_bank1; + required_memory_bank m_bank2; + required_memory_bank m_bank3; + optional_memory_bank m_bank4; +}; + static ADDRESS_MAP_START( svi318_mem, AS_PROGRAM, 8, svi318_state ) - AM_RANGE(0x0000, 0x7fff) AM_READ_BANK("bank1") AM_WRITE(writemem1) - AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank2") AM_WRITE(writemem2) - AM_RANGE(0xc000, 0xffff) AM_READ_BANK("bank3") AM_WRITE(writemem3) + //AM_RANGE(0x0000, 0x7fff) AM_READ_BANK("bank1") AM_WRITE(writemem1) + //AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank2") AM_WRITE(writemem2) + //AM_RANGE(0xc000, 0xffff) AM_READ_BANK("bank3") AM_WRITE(writemem3) ADDRESS_MAP_END static ADDRESS_MAP_START( svi328_806_mem, AS_PROGRAM, 8, svi318_state ) - AM_RANGE(0x0000, 0x7fff) AM_READ_BANK("bank1") AM_WRITE(writemem1) - AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank2") AM_WRITE(writemem2) - AM_RANGE(0xc000, 0xefff) AM_READ_BANK("bank3") AM_WRITE(writemem3) - AM_RANGE(0xf000, 0xffff) AM_READ_BANK("bank4") AM_WRITE(writemem4) + //AM_RANGE(0x0000, 0x7fff) AM_READ_BANK("bank1") AM_WRITE(writemem1) + //AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank2") AM_WRITE(writemem2) + //AM_RANGE(0xc000, 0xefff) AM_READ_BANK("bank3") AM_WRITE(writemem3) + //AM_RANGE(0xf000, 0xffff) AM_READ_BANK("bank4") AM_WRITE(writemem4) ADDRESS_MAP_END static ADDRESS_MAP_START( svi318_io, AS_IO, 8, svi318_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x38) AM_READWRITE(io_ext_r, io_ext_w ) + //AM_RANGE(0x00, 0x38) AM_READWRITE(io_ext_r, io_ext_w ) AM_RANGE(0x80, 0x80) AM_DEVWRITE("tms9928a", tms9928a_device, vram_write) AM_RANGE(0x81, 0x81) AM_DEVWRITE("tms9928a", tms9928a_device, register_write) AM_RANGE(0x84, 0x84) AM_DEVREAD("tms9928a", tms9928a_device, vram_read) @@ -43,14 +125,14 @@ static ADDRESS_MAP_START( svi318_io, AS_IO, 8, svi318_state ) AM_RANGE(0x88, 0x88) AM_DEVWRITE("ay8910", ay8910_device, address_w) AM_RANGE(0x8c, 0x8c) AM_DEVWRITE("ay8910", ay8910_device, data_w) AM_RANGE(0x90, 0x90) AM_DEVREAD("ay8910", ay8910_device, data_r) - AM_RANGE(0x96, 0x97) AM_WRITE(ppi_w) + //AM_RANGE(0x96, 0x97) AM_WRITE(ppi_w) AM_RANGE(0x98, 0x9a) AM_DEVREAD("ppi8255", i8255_device, read) ADDRESS_MAP_END static ADDRESS_MAP_START( svi328_806_io, AS_IO, 8, svi318_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x58) AM_READWRITE(io_ext_r, io_ext_w ) + //AM_RANGE(0x00, 0x58) AM_READWRITE(io_ext_r, io_ext_w ) AM_RANGE(0x80, 0x80) AM_DEVWRITE("tms9928a", tms9928a_device, vram_write) AM_RANGE(0x81, 0x81) AM_DEVWRITE("tms9928a", tms9928a_device, register_write) AM_RANGE(0x84, 0x84) AM_DEVREAD("tms9928a", tms9928a_device, vram_read) @@ -58,7 +140,7 @@ static ADDRESS_MAP_START( svi328_806_io, AS_IO, 8, svi318_state ) AM_RANGE(0x88, 0x88) AM_DEVWRITE("ay8910", ay8910_device, address_w) AM_RANGE(0x8c, 0x8c) AM_DEVWRITE("ay8910", ay8910_device, data_w) AM_RANGE(0x90, 0x90) AM_DEVREAD("ay8910", ay8910_device, data_r) - AM_RANGE(0x96, 0x97) AM_WRITE(ppi_w) + //AM_RANGE(0x96, 0x97) AM_WRITE(ppi_w) AM_RANGE(0x98, 0x9a) AM_DEVREAD("ppi8255", i8255_device, read) ADDRESS_MAP_END @@ -257,7 +339,7 @@ SLOT_INTERFACE_END static MACHINE_CONFIG_FRAGMENT( svi318_cartslot ) MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "svi318_cart") MCFG_GENERIC_EXTENSIONS("bin,rom") - MCFG_GENERIC_LOAD(svi318_state, svi318_cart) + //MCFG_GENERIC_LOAD(svi318_state, svi318_cart) /* Software lists */ MCFG_SOFTWARE_LIST_ADD("cart_list","svi318_cart") @@ -271,21 +353,21 @@ static MACHINE_CONFIG_START( svi318, svi318_state ) MCFG_QUANTUM_TIME(attotime::from_hz(60)) MCFG_DEVICE_ADD("ppi8255", I8255, 0) - MCFG_I8255_IN_PORTA_CB(READ8(svi318_state, ppi_port_a_r)) - MCFG_I8255_IN_PORTB_CB(READ8(svi318_state, ppi_port_b_r)) - MCFG_I8255_OUT_PORTC_CB(WRITE8(svi318_state, ppi_port_c_w)) + //MCFG_I8255_IN_PORTA_CB(READ8(svi318_state, ppi_port_a_r)) + //MCFG_I8255_IN_PORTB_CB(READ8(svi318_state, ppi_port_b_r)) + //MCFG_I8255_OUT_PORTC_CB(WRITE8(svi318_state, ppi_port_c_w)) MCFG_DEVICE_ADD("ins8250_0", INS8250, 1000000) - MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) + //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) MCFG_DEVICE_ADD("ins8250_1", INS8250, 3072000) - MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) + //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) /* Video hardware */ MCFG_DEVICE_ADD("tms9928a", TMS9929A, XTAL_10_738635MHz / 2) MCFG_TMS9928A_VRAM_SIZE(0x4000) - MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt)) + //MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt)) MCFG_TMS9928A_SCREEN_ADD_PAL("screen") - MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9929a_device, screen_update) + //MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9929a_device, screen_update) /* Sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -294,13 +376,13 @@ static MACHINE_CONFIG_START( svi318, svi318_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MCFG_SOUND_ADD("ay8910", AY8910, 1789773) - MCFG_AY8910_PORT_A_READ_CB(READ8(svi318_state, psg_port_a_r)) - MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi318_state, psg_port_b_w)) + //MCFG_AY8910_PORT_A_READ_CB(READ8(svi318_state, psg_port_a_r)) + //MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi318_state, psg_port_b_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) /* printer */ MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") - MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(svi318_state, write_centronics_busy)) + //MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(svi318_state, write_centronics_busy)) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") @@ -312,8 +394,8 @@ static MACHINE_CONFIG_START( svi318, svi318_state ) MCFG_SOFTWARE_LIST_ADD("cass_list", "svi318_cass") MCFG_FD1793_ADD("wd179x", XTAL_1MHz) - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(svi318_state, fdc_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(svi318_state, fdc_drq_w)) + //MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(svi318_state, fdc_intrq_w)) + //MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(svi318_state, fdc_drq_w)) MCFG_FLOPPY_DRIVE_ADD("wd179x:0", svi_floppies, "dd", svi318_state::floppy_formats) MCFG_FLOPPY_DRIVE_ADD("wd179x:1", svi_floppies, "dd", svi318_state::floppy_formats) @@ -334,9 +416,9 @@ static MACHINE_CONFIG_DERIVED( svi318n, svi318 ) MCFG_DEVICE_REMOVE("screen") MCFG_DEVICE_ADD("tms9928a", TMS9928A, XTAL_10_738635MHz / 2) MCFG_TMS9928A_VRAM_SIZE(0x4000) - MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt)) + //MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt)) MCFG_TMS9928A_SCREEN_ADD_NTSC("screen") - MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9928a_device, screen_update) + //MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9928a_device, screen_update) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( svi328, svi318 ) @@ -382,24 +464,24 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state ) MCFG_QUANTUM_TIME(attotime::from_hz(60)) MCFG_DEVICE_ADD("ppi8255", I8255, 0) - MCFG_I8255_IN_PORTA_CB(READ8(svi318_state, ppi_port_a_r)) - MCFG_I8255_IN_PORTB_CB(READ8(svi318_state, ppi_port_b_r)) - MCFG_I8255_OUT_PORTC_CB(WRITE8(svi318_state, ppi_port_c_w)) + //MCFG_I8255_IN_PORTA_CB(READ8(svi318_state, ppi_port_a_r)) + //MCFG_I8255_IN_PORTB_CB(READ8(svi318_state, ppi_port_b_r)) + //MCFG_I8255_OUT_PORTC_CB(WRITE8(svi318_state, ppi_port_c_w)) MCFG_DEVICE_ADD("ins8250_0", INS8250, 1000000) - MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) + //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) MCFG_DEVICE_ADD("ins8250_1", INS8250, 3072000) - MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) + //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) /* Video hardware */ MCFG_DEFAULT_LAYOUT(layout_dualhsxs) MCFG_DEVICE_ADD("tms9928a", TMS9929A, XTAL_10_738635MHz / 2) MCFG_TMS9928A_VRAM_SIZE(0x4000) - MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt)) + //MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt)) MCFG_TMS9928A_SET_SCREEN("screen") MCFG_TMS9928A_SCREEN_ADD_PAL("screen") - MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9929a_device, screen_update) + //MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9929a_device, screen_update) MCFG_PALETTE_ADD("palette", TMS9928A_PALETTE_SIZE + 2) /* 2 additional entries for monochrome svi806 output */ MCFG_SCREEN_ADD("svi806", RASTER) @@ -407,14 +489,14 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) MCFG_SCREEN_SIZE(640, 400) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1) - MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) + //MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_GFXDECODE_ADD("gfxdecode", "palette", svi328) MCFG_MC6845_ADD("crtc", MC6845, "svi806", XTAL_12MHz / 8) MCFG_MC6845_SHOW_BORDER_AREA(false) MCFG_MC6845_CHAR_WIDTH(8) /* ? */ - MCFG_MC6845_UPDATE_ROW_CB(svi318_state, crtc_update_row) + //MCFG_MC6845_UPDATE_ROW_CB(svi318_state, crtc_update_row) /* Sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -423,13 +505,13 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MCFG_SOUND_ADD("ay8910", AY8910, 1789773) - MCFG_AY8910_PORT_A_READ_CB(READ8(svi318_state, psg_port_a_r)) - MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi318_state, psg_port_b_w)) + //MCFG_AY8910_PORT_A_READ_CB(READ8(svi318_state, psg_port_a_r)) + //MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi318_state, psg_port_b_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) /* printer */ MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") - MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(svi318_state, write_centronics_busy)) + //MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(svi318_state, write_centronics_busy)) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") @@ -441,8 +523,8 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state ) MCFG_SOFTWARE_LIST_ADD("cass_list", "svi318_cass") MCFG_FD1793_ADD("wd179x", XTAL_1MHz) - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(svi318_state, fdc_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(svi318_state, fdc_drq_w)) + //MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(svi318_state, fdc_intrq_w)) + //MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(svi318_state, fdc_drq_w)) MCFG_FLOPPY_DRIVE_ADD("wd179x:0", svi_floppies, "dd", svi318_state::floppy_formats) MCFG_FLOPPY_DRIVE_ADD("wd179x:1", svi_floppies, "dd", svi318_state::floppy_formats) @@ -533,9 +615,9 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1983, svi318, 0, 0, svi318, svi318, svi318_state, svi318, "Spectravideo", "SVI-318 (PAL)", MACHINE_SUPPORTS_SAVE ) -COMP( 1983, svi318n, svi318, 0, svi318n, svi318, svi318_state, svi318, "Spectravideo", "SVI-318 (NTSC)", MACHINE_SUPPORTS_SAVE ) -COMP( 1983, svi328, svi318, 0, svi328, svi328, svi318_state, svi318, "Spectravideo", "SVI-328 (PAL)", MACHINE_SUPPORTS_SAVE ) -COMP( 1983, svi328n, svi318, 0, svi328n, svi328, svi318_state, svi318, "Spectravideo", "SVI-328 (NTSC)", MACHINE_SUPPORTS_SAVE ) -COMP( 1983, sv328p80, svi318, 0, svi328_806, svi328, svi318_state, svi328_806, "Spectravideo", "SVI-328 (PAL) + SVI-806 80 column card", MACHINE_SUPPORTS_SAVE ) -COMP( 1983, sv328n80, svi318, 0, svi328n_806, svi328, svi318_state, svi328_806, "Spectravideo", "SVI-328 (NTSC) + SVI-806 80 column card", MACHINE_SUPPORTS_SAVE ) +COMP( 1983, svi318, 0, 0, svi318, svi318, driver_device, 0, "Spectravideo", "SVI-318 (PAL)", MACHINE_NOT_WORKING ) +COMP( 1983, svi318n, svi318, 0, svi318n, svi318, driver_device, 0, "Spectravideo", "SVI-318 (NTSC)", MACHINE_NOT_WORKING ) +COMP( 1983, svi328, svi318, 0, svi328, svi328, driver_device, 0, "Spectravideo", "SVI-328 (PAL)", MACHINE_NOT_WORKING ) +COMP( 1983, svi328n, svi318, 0, svi328n, svi328, driver_device, 0, "Spectravideo", "SVI-328 (NTSC)", MACHINE_NOT_WORKING ) +COMP( 1983, sv328p80, svi318, 0, svi328_806, svi328, driver_device, 0, "Spectravideo", "SVI-328 (PAL) + SVI-806 80 column card", MACHINE_NOT_WORKING ) +COMP( 1983, sv328n80, svi318, 0, svi328n_806, svi328, driver_device, 0, "Spectravideo", "SVI-328 (NTSC) + SVI-806 80 column card", MACHINE_NOT_WORKING ) diff --git a/src/mame/machine/svi318.cpp b/src/mame/machine/svi318.cpp deleted file mode 100644 index 098e5576b4d..00000000000 --- a/src/mame/machine/svi318.cpp +++ /dev/null @@ -1,767 +0,0 @@ -// license:??? -// copyright-holders:Sean Young,Tomas Karlsson -/* -** Spectravideo SVI-318 and SVI-328 -** -** Sean Young, Tomas Karlsson -** -*/ - -#include "emu.h" -#include "video/mc6845.h" -#include "includes/svi318.h" -#include "cpu/z80/z80.h" -#include "video/tms9928a.h" -#include "imagedev/flopdrv.h" -#include "formats/svi_cas.h" -#include "sound/ay8910.h" - -enum { - SVI_INTERNAL = 0, - SVI_CART = 1, - SVI_EXPRAM2 = 2, - SVI_EXPRAM3 = 3 -}; - - -/* Serial ports */ - -WRITE_LINE_MEMBER(svi318_state::ins8250_interrupt) -{ - if (m_bank_low != SVI_CART) - m_maincpu->set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE)); -} - -#if 0 -static INS8250_REFRESH_CONNECT( svi318_com_refresh_connected ) -{ - /* Motorola MC14412 modem */ - ins8250_handshake_in(device, UART8250_HANDSHAKE_IN_CTS|UART8250_HANDSHAKE_IN_DSR|UART8250_INPUTS_RING_INDICATOR|UART8250_INPUTS_DATA_CARRIER_DETECT); -} -#endif - -/* Cartridge */ - -bool svi318_state::cart_verify(UINT8 *ROM) -{ - if (ROM[0] != 0xf3 || ROM[1] != 0x31) - return false; - - return true; -} - -DEVICE_IMAGE_LOAD_MEMBER( svi318_state, svi318_cart ) -{ - UINT32 size = m_cart->common_get_size("rom"); - - if (size > 0x8000) - { - logerror("Cart image %s larger than expected. Please report the issue.\n", image.filename()); - return IMAGE_INIT_FAIL; - } - - m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); - m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); - - if (image.software_entry() == nullptr && !cart_verify(m_cart->get_rom_base())) - return IMAGE_INIT_FAIL; - - return IMAGE_INIT_PASS; -} - - - -/* PPI */ - -/* - PPI Port A Input (address 98H) - Bit Name Description - 1 TA Joystick 1, /SENSE - 2 TB Joystick 1, EOC - 3 TC Joystick 2, /SENSE - 4 TD Joystick 2, EOC - 5 TRIGGER1 Joystick 1, Trigger - 6 TRIGGER2 Joystick 2, Trigger - 7 /READY Cassette, Ready - 8 CASR Cassette, Read data -*/ - -READ8_MEMBER(svi318_state::ppi_port_a_r) -{ - int data = 0x0f; - - if (m_cassette->input() > 0.0038) - data |= 0x80; - if (!m_cassette->exists()) - data |= 0x40; - - data |= m_buttons->read() & 0x30; - - return data; -} - -/* - PPI Port B Input (address 99H) - Bit Name Description - 1 IN0 Keyboard, Column status of selected line - 2 IN1 Keyboard, Column status of selected line - 3 IN2 Keyboard, Column status of selected line - 4 IN3 Keyboard, Column status of selected line - 5 IN4 Keyboard, Column status of selected line - 6 IN5 Keyboard, Column status of selected line - 7 IN6 Keyboard, Column status of selected line - 8 IN7 Keyboard, Column status of selected line -*/ - -READ8_MEMBER(svi318_state::ppi_port_b_r) -{ - if (m_keyboard_row <= 10) - return m_line[m_keyboard_row]->read(); - else - return 0xff; -} - -/* - PPI Port C Output (address 97H) - Bit Name Description - 1 KB0 Keyboard, Line select 0 - 2 KB1 Keyboard, Line select 1 - 3 KB2 Keyboard, Line select 2 - 4 KB3 Keyboard, Line select 3 - 5 CASON Cassette, Motor relay control (0=on, 1=off) - 6 CASW Cassette, Write data - 7 CASAUD Cassette, Audio out (pulse) - 8 SOUND Keyboard, Click sound bit (pulse) -*/ - -WRITE8_MEMBER(svi318_state::ppi_port_c_w) -{ - int val; - - /* key click */ - val = (data & 0x80) ? 0x3e : 0; - val += (data & 0x40) ? 0x3e : 0; - m_dac->write_signed8(val); - - /* cassette motor on/off */ - if (m_cassette->exists()) - { - m_cassette->change_state( - (data & 0x10) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, - CASSETTE_MOTOR_DISABLED); - } - - /* cassette signal write */ - m_cassette->output((data & 0x20) ? -1.0 : +1.0); - - m_keyboard_row = data & 0x0f; -} - -WRITE8_MEMBER(svi318_state::ppi_w) -{ - m_ppi->write(space, offset + 2, data); -} - - -/* PSG */ - -/* - PSG Port A Input - Bit Name Description - 1 FWD1 Joystick 1, Forward - 2 BACK1 Joystick 1, Back - 3 LEFT1 Joystick 1, Left - 4 RIGHT1 Joystick 1, Right - 5 FWD2 Joystick 2, Forward - 6 BACK2 Joystick 2, Back - 7 LEFT2 Joystick 2, Left - 8 RIGHT2 Joystick 2, Right -*/ - -READ8_MEMBER(svi318_state::psg_port_a_r) -{ - return m_joysticks->read(); -} - -/* - PSG Port B Output - Bit Name Description - 1 /CART Memory bank 11, ROM 0000-7FFF (Cartridge /CCS1, /CCS2) - 2 /BK21 Memory bank 21, RAM 0000-7FFF - 3 /BK22 Memory bank 22, RAM 8000-FFFF - 4 /BK31 Memory bank 31, RAM 0000-7FFF - 5 /BK32 Memory bank 32, RAM 8000-7FFF - 6 CAPS Caps-Lock diod - 7 /ROMEN0 Memory bank 12, ROM 8000-BFFF* (Cartridge /CCS3) - 8 /ROMEN1 Memory bank 12, ROM C000-FFFF* (Cartridge /CCS4) - - * The /CART signal must be active for any effect and all banks - with RAM are disabled. -*/ - -WRITE8_MEMBER(svi318_state::psg_port_b_w) -{ - if ((m_bank_switch ^ data) & 0x20) - output().set_led_value(0, !(data & 0x20)); - - m_bank_switch = data; - set_banks(); -} - -/* Disk drives */ - -WRITE_LINE_MEMBER(svi318_state::fdc_intrq_w) -{ - m_irq = state; -} - -WRITE_LINE_MEMBER(svi318_state::fdc_drq_w) -{ - m_drq = state; -} - -WRITE8_MEMBER(svi318_state::fdc_drive_motor_w) -{ - m_floppy = nullptr; - - if (BIT(data, 0)) m_floppy = m_floppy0->get_device(); - if (BIT(data, 1)) m_floppy = m_floppy1->get_device(); - - m_fd1793->set_floppy(m_floppy); - - if (m_floppy0->get_device()) - m_floppy0->get_device()->mon_w(!BIT(data, 2)); - - if (m_floppy1->get_device()) - m_floppy1->get_device()->mon_w(!BIT(data, 3)); -} - -WRITE8_MEMBER(svi318_state::fdc_density_side_w) -{ - m_fd1793->dden_w(BIT(data, 0)); - - if (m_floppy) - m_floppy->ss_w(BIT(data, 1)); -} - -READ8_MEMBER(svi318_state::fdc_irqdrq_r) -{ - UINT8 result = 0; - - result |= m_drq << 6; - result |= m_irq << 7; - - return result; -} - -MC6845_UPDATE_ROW( svi318_state::crtc_update_row ) -{ - const rgb_t *palette = m_palette->palette()->entry_list_raw(); - - for (int i = 0; i < x_count; i++) - { - UINT8 data = m_svi806_gfx[m_svi806_ram[(ma + i) & 0x7ff] * 16 + ra]; - - if (i == cursor_x) - { - data = 0xff; - } - - for (int j = 0; j < 8; j++) - { - bitmap.pix32(y, i * 8 + j) = palette[TMS9928A_PALETTE_SIZE + BIT(data, 7)]; - data = data << 1; - } - } -} - - -WRITE8_MEMBER(svi318_state::svi806_ram_enable_w) -{ - m_svi806_ram_enabled = (data & 0x01); - set_banks(); -} - - -/* Init functions */ - -static const UINT8 cc_op[0x100] = { - 4+1,10+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1, 4+1,11+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1, - 8+1,10+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1,12+1,11+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1, - 7+1,10+1,16+1, 6+1, 4+1, 4+1, 7+1, 4+1, 7+1,11+1,16+1, 6+1, 4+1, 4+1, 7+1, 4+1, - 7+1,10+1,13+1, 6+1,11+1,11+1,10+1, 4+1, 7+1,11+1,13+1, 6+1, 4+1, 4+1, 7+1, 4+1, - 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, - 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, - 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, - 7+1, 7+1, 7+1, 7+1, 7+1, 7+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, - 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, - 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, - 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, - 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 7+1, 4+1, - 5+1,10+1,10+1,10+1,10+1,11+1, 7+1,11+1, 5+1,10+1,10+1, 0+1,10+1,17+1, 7+1,11+1, - 5+1,10+1,10+1,11+1,10+1,11+1, 7+1,11+1, 5+1, 4+1,10+1,11+1,10+1, 0+1, 7+1,11+1, - 5+1,10+1,10+1,19+1,10+1,11+1, 7+1,11+1, 5+1, 4+1,10+1, 4+1,10+1, 0+1, 7+1,11+1, - 5+1,10+1,10+1, 4+1,10+1,11+1, 7+1,11+1, 5+1, 6+1,10+1, 4+1,10+1, 0+1, 7+1,11+1 -}; - -static const UINT8 cc_cb[0x100] = { - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,12+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2,15+2, 8+2 -}; - -static const UINT8 cc_ed[0x100] = { - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, -12+2,12+2,15+2,20+2, 8+2,14+2, 8+2, 9+2,12+2,12+2,15+2,20+2, 8+2,14+2, 8+2, 9+2, -12+2,12+2,15+2,20+2, 8+2,14+2, 8+2, 9+2,12+2,12+2,15+2,20+2, 8+2,14+2, 8+2, 9+2, -12+2,12+2,15+2,20+2, 8+2,14+2, 8+2,18+2,12+2,12+2,15+2,20+2, 8+2,14+2, 8+2,18+2, -12+2,12+2,15+2,20+2, 8+2,14+2, 8+2, 8+2,12+2,12+2,15+2,20+2, 8+2,14+2, 8+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, -16+2,16+2,16+2,16+2, 8+2, 8+2, 8+2, 8+2,16+2,16+2,16+2,16+2, 8+2, 8+2, 8+2, 8+2, -16+2,16+2,16+2,16+2, 8+2, 8+2, 8+2, 8+2,16+2,16+2,16+2,16+2, 8+2, 8+2, 8+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, - 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2, 8+2 -}; - -static const UINT8 cc_xy[0x100] = { - 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2,15+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, - 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2,15+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, - 4+2,14+2,20+2,10+2, 9+2, 9+2, 9+2, 4+2, 4+2,15+2,20+2,10+2, 9+2, 9+2, 9+2, 4+2, - 4+2, 4+2, 4+2, 4+2,23+2,23+2,19+2, 4+2, 4+2,15+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, - 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, - 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, - 9+2, 9+2, 9+2, 9+2, 9+2, 9+2,19+2, 9+2, 9+2, 9+2, 9+2, 9+2, 9+2, 9+2,19+2, 9+2, -19+2,19+2,19+2,19+2,19+2,19+2, 4+2,19+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, - 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, - 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, - 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, - 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, 4+2, 4+2, 4+2, 4+2, 9+2, 9+2,19+2, 4+2, - 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 0+2, 4+2, 4+2, 4+2, 4+2, - 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, - 4+2,14+2, 4+2,23+2, 4+2,15+2, 4+2, 4+2, 4+2, 8+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, - 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2,10+2, 4+2, 4+2, 4+2, 4+2, 4+2, 4+2 -}; - -static const UINT8 cc_xycb[0x100] = { -23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2, -23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2, -23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2, -23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2, -20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2, -20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2, -20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2, -20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2,20+2, -23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2, -23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2, -23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2, -23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2, -23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2, -23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2, -23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2, -23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2,23+2 -}; - -/* extra cycles if jr/jp/call taken and 'interrupt latency' on rst 0-7 */ -static const UINT8 cc_ex[0x100] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* DJNZ */ - 5, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, /* JR NZ/JR Z */ - 5, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, /* JR NC/JR C */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0+1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, /* LDIR/CPIR/INIR/OTIR LDDR/CPDR/INDR/OTDR */ - 6, 0, 0, 0, 7, 0, 0, 2, 6, 0, 0, 0, 7, 0, 0, 2, - 6, 0, 0, 0, 7, 0, 0, 2, 6, 0, 0, 0, 7, 0, 0, 2, - 6, 0, 0, 0, 7, 0, 0, 2, 6, 0, 0, 0, 7, 0, 0, 2, - 6, 0, 0, 0, 7, 0, 0, 2, 6, 0, 0, 0, 7, 0, 0, 2+1 -}; - - -DRIVER_INIT_MEMBER(svi318_state, svi318) -{ - /* z80 stuff */ - m_maincpu->z80_set_cycle_tables(cc_op, cc_cb, cc_ed, cc_xy, cc_xycb, cc_ex); - - m_maincpu->set_input_line_vector(0, 0xff); - - /* memory */ - m_empty_bank = std::make_unique(0x8000); - memset(m_empty_bank.get(), 0xff, 0x8000); - - m_bank_low_ptr = m_empty_bank.get(); - m_bank_high1_ptr = m_empty_bank.get(); - m_bank_high2_ptr = m_empty_bank.get(); -} - -DRIVER_INIT_MEMBER(svi318_state, svi328_806) -{ - DRIVER_INIT_CALL(svi318); - m_svi806_present = 1; -} - -void svi318_state::machine_start() -{ - std::string region_tag; - m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); - m_bios_rom = memregion("maincpu"); - - // 80 column card start - if (m_svi806_present) - { - // 2K RAM, but allocating 4KB to make banking easier - // The upper 2KB will be set to FFs and will never be written to - m_svi806_ram.resize(0x1000); - save_item(NAME(m_svi806_ram)); - memset(&m_svi806_ram[0], 0x00, 0x800); - memset(&m_svi806_ram[0x800], 0xff, 0x800); - - m_svi806_gfx = memregion("gfx1")->base(); - - // Set SVI-806 80 column card palette - m_palette->set_pen_color(TMS9928A_PALETTE_SIZE, 0, 0, 0); /* Monochrome black */ - m_palette->set_pen_color(TMS9928A_PALETTE_SIZE+1, 0, 224, 0); /* Monochrome green */ - } - - // register for savestates - save_item(NAME(m_drq)); - save_item(NAME(m_irq)); - - save_item(NAME(m_bank_switch)); - save_item(NAME(m_bank_low)); - save_item(NAME(m_bank_high)); - save_item(NAME(m_bank_low_read_only)); - save_item(NAME(m_bank_high1_read_only)); - save_item(NAME(m_bank_high2_read_only)); - save_item(NAME(m_keyboard_row)); - save_item(NAME(m_centronics_busy)); - - save_item(NAME(m_svi806_present)); - save_item(NAME(m_svi806_ram_enabled)); - - machine().save().register_postload(save_prepost_delegate(FUNC(svi318_state::postload), this)); -} - -void svi318_state::machine_reset() -{ - m_keyboard_row = 0; - m_centronics_busy = 0; - m_svi806_present = 0; - m_svi806_ram_enabled = 0; - m_drq = 0; - m_irq = 0; - - m_bank_low = 0; - m_bank_high = 0; - m_bank_low_read_only = 0; - m_bank_high1_read_only = 0; - m_bank_high2_read_only = 0; - - m_bank_switch = 0xff; - set_banks(); -} - -/* Memory */ - -WRITE8_MEMBER(svi318_state::writemem1) -{ - if (m_bank_low_read_only) - return; - - m_bank_low_ptr[offset] = data; -} - -WRITE8_MEMBER(svi318_state::writemem2) -{ - if (m_bank_high1_read_only) - return; - - m_bank_high1_ptr[offset] = data; -} - -WRITE8_MEMBER(svi318_state::writemem3) -{ - if (m_bank_high2_read_only) - return; - - m_bank_high2_ptr[offset] = data; -} - -WRITE8_MEMBER(svi318_state::writemem4) -{ - if (m_svi806_ram_enabled) - { - if (offset < 0x800) - m_svi806_ram[offset] = data; - } - else - { - if (m_bank_high2_read_only) - return; - - m_bank_high2_ptr[0x3000 + offset] = data; - } -} - -void svi318_state::set_banks() -{ - const UINT8 v = m_bank_switch; - UINT8 *ram = m_ram->pointer(); - UINT32 ram_size = m_ram->size(); - - m_bank_low = (v & 1) ? ((v & 2) ? ((v & 8) ? SVI_INTERNAL : SVI_EXPRAM3) : SVI_EXPRAM2) : SVI_CART; - m_bank_high = (v & 4) ? ((v & 16) ? SVI_INTERNAL : SVI_EXPRAM3) : SVI_EXPRAM2; - - m_bank_low_ptr = m_empty_bank.get(); - m_bank_low_read_only = 1; - - switch (m_bank_low) - { - case SVI_INTERNAL: - m_bank_low_ptr = m_bios_rom->base(); - break; - case SVI_CART: - if (m_cart_rom) - m_bank_low_ptr = m_cart_rom->base(); - break; - case SVI_EXPRAM2: - if (ram_size >= 64 * 1024) - { - m_bank_low_ptr = ram + ram_size - 64 * 1024; - m_bank_low_read_only = 0; - } - break; - case SVI_EXPRAM3: - if (ram_size > 128 * 1024) - { - m_bank_low_ptr = ram + ram_size - 128 * 1024; - m_bank_low_read_only = 0; - } - break; - } - - m_bank_high1_ptr = m_empty_bank.get(); - m_bank_high1_read_only = 1; - m_bank_high2_ptr = m_empty_bank.get(); - m_bank_high2_read_only = 1; - - switch (m_bank_high) - { - case SVI_INTERNAL: - if (ram_size == 16 * 1024) - { - m_bank_high2_ptr = ram; - m_bank_high2_read_only = 0; - } - else - { - m_bank_high1_ptr = ram; - m_bank_high1_read_only = 0; - m_bank_high2_ptr = ram + 0x4000; - m_bank_high2_read_only = 0; - } - break; - case SVI_EXPRAM2: - if (ram_size > 64 * 1024) - { - m_bank_high1_ptr = ram + ram_size - 64 * 1024 + 32 * 1024; - m_bank_high1_read_only = 0; - m_bank_high2_ptr = ram + ram_size - 64 * 1024 + 48 * 1024; - m_bank_high2_read_only = 0; - } - break; - case SVI_EXPRAM3: - if (ram_size > 128 * 1024) - { - m_bank_high1_ptr = ram + ram_size - 128 * 1024 + 32 * 1024; - m_bank_high1_read_only = 0; - m_bank_high2_ptr = ram + ram_size - 128 * 1024 + 48 * 1024; - m_bank_high2_read_only = 0; - } - break; - } - - /* Check for special CART based banking */ - if (m_bank_low == SVI_CART && (v & 0xc0 ) != 0xc0) - { - m_bank_high1_ptr = m_empty_bank.get(); - m_bank_high1_read_only = 1; - m_bank_high2_ptr = m_empty_bank.get(); - m_bank_high2_read_only = 1; - - if (m_cart_rom && !(v & 0x80)) - m_bank_high2_ptr = m_cart_rom->base() + 0x4000; - if (m_cart_rom && !(v & 0x40)) - m_bank_high1_ptr = m_cart_rom->base(); - } - - m_bank1->set_base(m_bank_low_ptr); - m_bank2->set_base(m_bank_high1_ptr); - m_bank3->set_base(m_bank_high2_ptr); - - /* SVI-806 80 column card specific banking */ - if (m_svi806_present) - { - if (m_svi806_ram_enabled) - m_bank4->set_base(&m_svi806_ram[0]); - else - m_bank4->set_base(m_bank_high2_ptr + 0x3000); - } -} - -void svi318_state::postload() -{ - set_banks(); -} - - -/* External I/O */ - -WRITE_LINE_MEMBER(svi318_state::write_centronics_busy) -{ - m_centronics_busy = state; -} - -READ8_MEMBER(svi318_state::io_ext_r) -{ - if (m_bank_low == SVI_CART) - return 0xff; - - switch (offset) - { - case 0x12: - return 0xfe | m_centronics_busy; - - case 0x20: - case 0x21: - case 0x22: - case 0x23: - case 0x24: - case 0x25: - case 0x26: - case 0x27: - return m_ins8250_0->ins8250_r(space, offset & 7); - - case 0x28: - case 0x29: - case 0x2a: - case 0x2b: - case 0x2c: - case 0x2d: - case 0x2e: - case 0x2f: - return m_ins8250_1->ins8250_r(space, offset & 7); - - case 0x30: - return m_fd1793->status_r(space, 0); - - case 0x31: - return m_fd1793->track_r(space, 0); - - case 0x32: - return m_fd1793->sector_r(space, 0); - - case 0x33: - return m_fd1793->data_r(space, 0); - - case 0x34: - return fdc_irqdrq_r(space, 0); - - case 0x51: - return m_crtc->register_r(space, offset); - } - - return 0xff; -} - -WRITE8_MEMBER(svi318_state::io_ext_w) -{ - if (m_bank_low == SVI_CART) - return; - - switch (offset) - { - case 0x10: - m_cent_data_out->write(space, 0, data); - break; - - case 0x11: - m_centronics->write_strobe(BIT(data, 0)); - break; - - case 0x20: - case 0x21: - case 0x22: - case 0x23: - case 0x24: - case 0x25: - case 0x26: - case 0x27: - m_ins8250_0->ins8250_w(space, offset & 7, data); - break; - - case 0x28: - case 0x29: - case 0x2A: - case 0x2B: - case 0x2C: - case 0x2D: - case 0x2E: - case 0x2F: - m_ins8250_1->ins8250_w(space, offset & 7, data); - break; - - case 0x30: - m_fd1793->cmd_w(space, 0, data); - break; - case 0x31: - m_fd1793->track_w(space, 0, data); - break; - case 0x32: - m_fd1793->sector_w(space, 0, data); - break; - case 0x33: - m_fd1793->data_w(space, 0, data); - break; - case 0x34: - fdc_drive_motor_w(space, 0, data); - break; - case 0x38: - fdc_density_side_w(space, 0, data); - break; - - case 0x50: - m_crtc->address_w(space, offset, data); - break; - case 0x51: - m_crtc->register_w(space, offset, data); - break; - - case 0x58: - svi806_ram_enable_w(space, 0, data); - break; - } -} -- cgit v1.2.3-70-g09d2 From 8d4f4d62aaac3edef42d4544387ca45b5f0d9cd6 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 4 Mar 2016 09:26:46 +0100 Subject: remove remaining files (nw) --- scripts/target/mame/arcade.lua | 2 - src/mame/includes/sprcros2.h | 49 ----------- src/mame/includes/svi318.h | 159 ----------------------------------- src/mame/video/sprcros2.cpp | 187 ----------------------------------------- 4 files changed, 397 deletions(-) delete mode 100644 src/mame/includes/sprcros2.h delete mode 100644 src/mame/includes/svi318.h delete mode 100644 src/mame/video/sprcros2.cpp (limited to 'src') diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 4ae27d37cc3..9f17507c618 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -4472,8 +4472,6 @@ files { MAME_DIR .. "src/mame/drivers/splus.cpp", MAME_DIR .. "src/mame/drivers/spool99.cpp", MAME_DIR .. "src/mame/drivers/sprcros2.cpp", - MAME_DIR .. "src/mame/includes/sprcros2.h", - MAME_DIR .. "src/mame/video/sprcros2.cpp", MAME_DIR .. "src/mame/drivers/sshot.cpp", MAME_DIR .. "src/mame/drivers/ssingles.cpp", MAME_DIR .. "src/mame/drivers/sstrangr.cpp", diff --git a/src/mame/includes/sprcros2.h b/src/mame/includes/sprcros2.h deleted file mode 100644 index bc3a468306c..00000000000 --- a/src/mame/includes/sprcros2.h +++ /dev/null @@ -1,49 +0,0 @@ -// license:??? -// copyright-holders:insideoutboy -class sprcros2_state : public driver_device -{ -public: - sprcros2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_master(*this,"master"), - m_slave(*this,"slave"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_fgvideoram(*this, "fgvideoram"), - m_bgvideoram(*this, "bgvideoram"), - m_spriteram(*this, "spriteram") { } - - required_device m_master; - required_device m_slave; - required_device m_gfxdecode; - required_device m_palette; - - required_shared_ptr m_fgvideoram; - required_shared_ptr m_bgvideoram; - required_shared_ptr m_spriteram; - - UINT8 m_s_port3; - UINT8 m_port7; - tilemap_t *m_bgtilemap; - tilemap_t *m_fgtilemap; - - DECLARE_WRITE8_MEMBER(m_port7_w); - DECLARE_WRITE8_MEMBER(s_port3_w); - DECLARE_WRITE8_MEMBER(fgvideoram_w); - DECLARE_WRITE8_MEMBER(bgvideoram_w); - DECLARE_WRITE8_MEMBER(bgscrollx_w); - DECLARE_WRITE8_MEMBER(bgscrolly_w); - - TILE_GET_INFO_MEMBER(get_bgtile_info); - TILE_GET_INFO_MEMBER(get_fgtile_info); - - virtual void machine_start() override; - virtual void video_start() override; - DECLARE_PALETTE_INIT(sprcros2); - - INTERRUPT_GEN_MEMBER(s_interrupt); - TIMER_DEVICE_CALLBACK_MEMBER(m_interrupt); - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); -}; diff --git a/src/mame/includes/svi318.h b/src/mame/includes/svi318.h deleted file mode 100644 index 1e0fc0d0d30..00000000000 --- a/src/mame/includes/svi318.h +++ /dev/null @@ -1,159 +0,0 @@ -// license:??? -// copyright-holders:Sean Young,Tomas Karlsson -/***************************************************************************** - * - * includes/svi318.h - * - * Spectravideo SVI-318 and SVI-328 - * - ****************************************************************************/ - -#ifndef SVI318_H_ -#define SVI318_H_ - -#include "cpu/z80/z80.h" -#include "machine/i8255.h" -#include "machine/ins8250.h" -#include "machine/wd_fdc.h" -#include "machine/ram.h" -#include "machine/buffer.h" -#include "imagedev/cassette.h" -#include "sound/dac.h" -#include "sound/ay8910.h" -#include "sound/wave.h" -#include "video/mc6845.h" -#include "video/tms9928a.h" -#include "bus/centronics/ctronics.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - - -class svi318_state : public driver_device -{ -public: - svi318_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_dac(*this, "dac"), - m_ppi(*this, "ppi8255"), - m_ram(*this, RAM_TAG), - m_centronics(*this, "centronics"), - m_cent_data_out(*this, "cent_data_out"), - m_ins8250_0(*this, "ins8250_0"), - m_ins8250_1(*this, "ins8250_1"), - m_cart(*this, "cartslot"), - m_fd1793(*this, "wd179x"), - m_floppy0(*this, "wd179x:0"), - m_floppy1(*this, "wd179x:1"), - m_crtc(*this, "crtc"), - m_line(*this, "LINE"), - m_joysticks(*this, "JOYSTICKS"), - m_buttons(*this, "BUTTONS"), - m_palette(*this, "palette"), - m_floppy(nullptr), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4") - { } - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - // FDC - int m_drq; - int m_irq; - - DECLARE_WRITE8_MEMBER(ppi_w); - DECLARE_READ8_MEMBER(psg_port_a_r); - DECLARE_WRITE8_MEMBER(psg_port_b_w); - DECLARE_WRITE8_MEMBER(fdc_drive_motor_w); - DECLARE_WRITE8_MEMBER(fdc_density_side_w); - DECLARE_READ8_MEMBER(fdc_irqdrq_r); - DECLARE_WRITE8_MEMBER(svi806_ram_enable_w); - DECLARE_WRITE8_MEMBER(writemem1); - DECLARE_WRITE8_MEMBER(writemem2); - DECLARE_WRITE8_MEMBER(writemem3); - DECLARE_WRITE8_MEMBER(writemem4); - DECLARE_READ8_MEMBER(io_ext_r); - DECLARE_WRITE8_MEMBER(io_ext_w); - DECLARE_DRIVER_INIT(svi318); - DECLARE_DRIVER_INIT(svi328_806); - DECLARE_WRITE_LINE_MEMBER(vdp_interrupt); - DECLARE_WRITE_LINE_MEMBER(ins8250_interrupt); - DECLARE_READ8_MEMBER(ppi_port_a_r); - DECLARE_READ8_MEMBER(ppi_port_b_r); - DECLARE_WRITE8_MEMBER(ppi_port_c_w); - DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w); - DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); - bool cart_verify(UINT8 *ROM); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(svi318_cart); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - - virtual void machine_start() override; - virtual void machine_reset() override; - - MC6845_UPDATE_ROW(crtc_update_row); - memory_region *m_cart_rom; - memory_region *m_bios_rom; - -protected: - required_device m_maincpu; - required_device m_cassette; - required_device m_dac; - required_device m_ppi; - required_device m_ram; - required_device m_centronics; - required_device m_cent_data_out; - required_device m_ins8250_0; - required_device m_ins8250_1; - required_device m_cart; - required_device m_fd1793; - required_device m_floppy0; - required_device m_floppy1; - optional_device m_crtc; - required_ioport_array<11> m_line; - required_ioport m_joysticks; - required_ioport m_buttons; - optional_device m_palette; - -private: - - void set_banks(); - void postload(); - - // memory banking - UINT8 m_bank_switch; - UINT8 m_bank_low; - UINT8 m_bank_high; - - UINT8 m_bank_low_read_only; - UINT8 m_bank_high1_read_only; - UINT8 m_bank_high2_read_only; - - std::unique_ptr m_empty_bank; - UINT8 *m_bank_low_ptr; - UINT8 *m_bank_high1_ptr; - UINT8 *m_bank_high2_ptr; - - // keyboard - UINT8 m_keyboard_row; - - floppy_image_device *m_floppy; - - // centronics - int m_centronics_busy; - - // SVI-806 80 column card - UINT8 m_svi806_present; - UINT8 m_svi806_ram_enabled; - dynamic_buffer m_svi806_ram; - UINT8 *m_svi806_gfx; - - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - optional_memory_bank m_bank4; -}; - -#endif /* SVI318_H_ */ diff --git a/src/mame/video/sprcros2.cpp b/src/mame/video/sprcros2.cpp deleted file mode 100644 index a64da9bfafc..00000000000 --- a/src/mame/video/sprcros2.cpp +++ /dev/null @@ -1,187 +0,0 @@ -// license:??? -// copyright-holders:insideoutboy -/* -Super Cross II (JPN Ver.) -(c)1986 GM Shoji -*/ - -#include "emu.h" -#include "includes/sprcros2.h" - - -PALETTE_INIT_MEMBER(sprcros2_state, sprcros2) -{ - const UINT8 *color_prom = memregion("proms")->base(); - int i; - - /* create a lookup table for the palette */ - for (i = 0; i < 0x20; i++) - { - int bit0, bit1, bit2; - int r, g, b; - - /* red component */ - bit0 = (color_prom[i] >> 0) & 0x01; - bit1 = (color_prom[i] >> 1) & 0x01; - bit2 = (color_prom[i] >> 2) & 0x01; - r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; - - /* green component */ - bit0 = (color_prom[i] >> 3) & 0x01; - bit1 = (color_prom[i] >> 4) & 0x01; - bit2 = (color_prom[i] >> 5) & 0x01; - g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; - - /* blue component */ - bit0 = (color_prom[i] >> 6) & 0x01; - bit1 = (color_prom[i] >> 7) & 0x01; - b = 0x47 * bit0 + 0xb8 * bit1; - palette.set_pen_color(i,rgb_t(r,g,b)); - - palette.set_indirect_color(i, rgb_t(r, g, b)); - } - - /* color_prom now points to the beginning of the lookup table */ - color_prom += 0x20; - - /* bg */ - for (i = 0; i < 0x100; i++) - { - UINT8 ctabentry = (color_prom[i] & 0x0f) | ((color_prom[i + 0x100] & 0x0f) << 4); - palette.set_pen_indirect(i, ctabentry); - } - - /* sprites & fg */ - for (i = 0x100; i < 0x300; i++) - { - UINT8 ctabentry = color_prom[i + 0x100]; - palette.set_pen_indirect(i, ctabentry); - } -} - -WRITE8_MEMBER(sprcros2_state::fgvideoram_w) -{ - m_fgvideoram[offset] = data; - m_fgtilemap->mark_tile_dirty(offset&0x3ff); -} - -WRITE8_MEMBER(sprcros2_state::bgvideoram_w) -{ - m_bgvideoram[offset] = data; - m_bgtilemap->mark_tile_dirty(offset&0x3ff); -} - -WRITE8_MEMBER(sprcros2_state::bgscrollx_w) -{ - if(m_port7&0x02) - m_bgtilemap->set_scrollx(0, 0x100-data); - else - m_bgtilemap->set_scrollx(0, data); -} - -WRITE8_MEMBER(sprcros2_state::bgscrolly_w) -{ - m_bgtilemap->set_scrolly(0, data); -} - -TILE_GET_INFO_MEMBER(sprcros2_state::get_bgtile_info) -{ - UINT32 tile_number = m_bgvideoram[tile_index]; - UINT8 attr = m_bgvideoram[tile_index + 0x400]; - - //attr - //76543210 - //xxxx---- colour - //----x--- flipx - //-----xxx tile bank - - tile_number += (attr&0x07)<<8; - - SET_TILE_INFO_MEMBER(0, - tile_number, - (attr&0xf0)>>4, - (attr&0x08)?TILE_FLIPX:0); -} - -TILE_GET_INFO_MEMBER(sprcros2_state::get_fgtile_info) -{ - UINT32 tile_number = m_fgvideoram[tile_index]; - UINT8 attr = m_fgvideoram[tile_index + 0x400]; - int color = (attr&0xfc)>>2; - - tileinfo.group = color; - - //attr - //76543210 - //xxxxxx-- colour - //------xx tile bank - - tile_number += (attr&0x03)<<8; - - SET_TILE_INFO_MEMBER(2, - tile_number, - color, - 0); -} - -void sprcros2_state::video_start() -{ - m_bgtilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(sprcros2_state::get_bgtile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); - m_fgtilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(sprcros2_state::get_fgtile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); - - m_fgtilemap->configure_groups(*m_gfxdecode->gfx(2), 0); -} - -void sprcros2_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect) -{ - int offs,sx,sy,color,flipx,flipy; - - for (offs = m_spriteram.bytes()-4; offs >= 0; offs -= 4) - { - if (m_spriteram[offs]) - { - //offs - //76543210 - //x------- unused - //-xxxxxxx sprite number - //offs+1 - //76543210 - //xx------ unused - //--xxx--- colour (6/7 unused and blank in prom) - //-----x-- unused - //------x- flipx - //-------x unused - //offs+2 y pos - //offs+3 x pos - - sx = ((m_spriteram[offs+3]+0x10)%0x100)-0x10; - sy = 225-(((m_spriteram[offs+2]+0x10)%0x100)-0x10); - color = (m_spriteram[offs+1]&0x38)>>3; - flipx = m_spriteram[offs+1]&0x02; - flipy = 0; - - if (m_port7&0x02) - { - sx = 224-sx; - sy = 224-sy; - flipx = !flipx; - flipy = !flipy; - } - - m_gfxdecode->gfx(1)->transmask(bitmap,cliprect, - m_spriteram[offs], - color, - flipx,flipy, - sx,sy, - m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, 0)); - } - } -} - -UINT32 sprcros2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - m_bgtilemap->draw(screen, bitmap, cliprect, 0, 0); - draw_sprites(bitmap, cliprect); - m_fgtilemap->draw(screen, bitmap, cliprect, 0, 0); - return 0; -} -- cgit v1.2.3-70-g09d2 From cf958c99dcd710b903a963165394dfcc91b96eec Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 4 Mar 2016 12:27:24 +0100 Subject: fix compile (nw) --- src/mame/drivers/svi318.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/svi318.cpp b/src/mame/drivers/svi318.cpp index f60420c7c82..a4ef4afe235 100644 --- a/src/mame/drivers/svi318.cpp +++ b/src/mame/drivers/svi318.cpp @@ -68,9 +68,6 @@ public: int m_drq; int m_irq; - virtual void machine_start() override; - virtual void machine_reset() override; - memory_region *m_cart_rom; memory_region *m_bios_rom; -- cgit v1.2.3-70-g09d2 From ed1b88a90845b8480bf53afed7c70d821d41cfdf Mon Sep 17 00:00:00 2001 From: arbee Date: Fri, 4 Mar 2016 07:11:13 -0500 Subject: segam1audio: fixed ROM mapping (MT6147) and corrected authorship. [R. Belmont] --- src/mame/audio/segam1audio.cpp | 5 +++-- src/mame/audio/segam1audio.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mame/audio/segam1audio.cpp b/src/mame/audio/segam1audio.cpp index 3e5a37120a3..0eb84eed88a 100644 --- a/src/mame/audio/segam1audio.cpp +++ b/src/mame/audio/segam1audio.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Olivier Galibert +// copyright-holders:R. Belmont /*************************************************************************** Sega Model 1 sound board (68000 + 2x 315-5560 "MultiPCM") @@ -16,7 +16,8 @@ #define YM3438_TAG "m1ym" static ADDRESS_MAP_START( segam1audio_map, AS_PROGRAM, 16, segam1audio_device ) - AM_RANGE(0x000000, 0x0bffff) AM_ROM AM_REGION(":m1sndcpu", 0) + AM_RANGE(0x000000, 0x03ffff) AM_ROM AM_REGION(":m1sndcpu", 0) + AM_RANGE(0x080000, 0x09ffff) AM_ROM AM_REGION(":m1sndcpu", 0x20000) // mirror of upper ROM socket AM_RANGE(0xc20000, 0xc20001) AM_READWRITE(m1_snd_68k_latch_r, m1_snd_68k_latch1_w ) AM_RANGE(0xc20002, 0xc20003) AM_READWRITE(m1_snd_v60_ready_r, m1_snd_68k_latch2_w ) AM_RANGE(0xc40000, 0xc40007) AM_DEVREADWRITE8(MULTIPCM_1_TAG, multipcm_device, read, write, 0x00ff ) diff --git a/src/mame/audio/segam1audio.h b/src/mame/audio/segam1audio.h index e188a5502a4..9cba756c5e2 100644 --- a/src/mame/audio/segam1audio.h +++ b/src/mame/audio/segam1audio.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Olivier Galibert +// copyright-holders:R. Belmont #pragma once #ifndef __SEGAM1AUDIO_H__ -- cgit v1.2.3-70-g09d2 From 9f3cd785b2a69b000cb635c175b50acf13692676 Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Fri, 4 Mar 2016 13:56:15 +0100 Subject: optsmenu: fixed recently introduced bug. (nw) --- src/emu/ui/optsmenu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/emu/ui/optsmenu.cpp b/src/emu/ui/optsmenu.cpp index b643fcef883..8f421073144 100644 --- a/src/emu/ui/optsmenu.cpp +++ b/src/emu/ui/optsmenu.cpp @@ -217,7 +217,7 @@ void ui_menu_game_options::populate() item_append(_("Filter"), main_filters::text[m_main], arrow_flags, (void *)(FPTR)FILTER_MENU); // add category subitem - if (main_filters::actual == FILTER_CATEGORY && !machine().inifile().ini_index.empty()) + if (m_main == FILTER_CATEGORY && !machine().inifile().ini_index.empty()) { inifile_manager &inif = machine().inifile(); int afile = inif.current_file; @@ -233,7 +233,7 @@ void ui_menu_game_options::populate() item_append(fbuff.c_str(), inif.actual_category().c_str(), arrow_flags, (void *)(FPTR)CATEGORY_FILTER); } // add manufacturer subitem - else if (main_filters::actual == FILTER_MANUFACTURER && c_mnfct::ui.size() > 0) + else if (m_main == FILTER_MANUFACTURER && c_mnfct::ui.size() > 0) { arrow_flags = get_arrow_flags(0, c_mnfct::ui.size() - 1, c_mnfct::actual); fbuff = _("^!Manufacturer"); @@ -241,7 +241,7 @@ void ui_menu_game_options::populate() item_append(fbuff.c_str(), c_mnfct::ui[c_mnfct::actual].c_str(), arrow_flags, (void *)(FPTR)MANUFACT_CAT_FILTER); } // add year subitem - else if (main_filters::actual == FILTER_YEAR && c_year::ui.size() > 0) + else if (m_main == FILTER_YEAR && c_year::ui.size() > 0) { arrow_flags = get_arrow_flags(0, c_year::ui.size() - 1, c_year::actual); fbuff.assign(_("^!Year")); @@ -249,7 +249,7 @@ void ui_menu_game_options::populate() item_append(fbuff.c_str(), c_year::ui[c_year::actual].c_str(), arrow_flags, (void *)(FPTR)YEAR_CAT_FILTER); } // add custom subitem - else if (main_filters::actual == FILTER_CUSTOM) + else if (m_main == FILTER_CUSTOM) { fbuff = _("^!Setup custom filter"); convert_command_glyph(fbuff); -- cgit v1.2.3-70-g09d2 From 39f3243a201e77c11917a71a0f426bfe09a78a6a Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 4 Mar 2016 15:32:29 +0100 Subject: consistency fixes and add missed files (nw) --- src/devices/cpu/m6800/6800ops.inc | 3 ++- src/devices/cpu/m6800/6800tbl.inc | 3 ++- src/devices/cpu/m6805/6805ops.inc | 3 ++- src/devices/cpu/mcs51/mcs51ops.inc | 2 ++ src/devices/machine/ram.cpp | 2 +- src/devices/machine/ram.h | 2 +- src/devices/machine/s3c24xx.inc | 2 ++ src/devices/sound/315-5641.cpp | 2 ++ src/devices/sound/315-5641.h | 2 ++ src/devices/video/epic12in.inc | 2 ++ src/devices/video/epic12pixel.inc | 2 ++ src/devices/video/voodoo_rast.inc | 3 ++- src/lib/formats/atom_dsk.cpp | 2 ++ src/lib/formats/atom_dsk.h | 2 ++ src/lib/netlist/macro/nlm_cd4xxx.cpp | 3 ++- src/lib/netlist/macro/nlm_cd4xxx.h | 2 ++ src/lib/netlist/macro/nlm_opamp.cpp | 3 ++- src/lib/netlist/macro/nlm_opamp.h | 2 ++ src/lib/netlist/macro/nlm_other.cpp | 3 ++- src/lib/netlist/macro/nlm_other.h | 2 ++ src/lib/netlist/macro/nlm_ttl74xx.cpp | 3 ++- src/lib/netlist/macro/nlm_ttl74xx.h | 2 ++ src/lib/netlist/prg/nlwav.cpp | 2 ++ src/mame/audio/nl_kidniki.inc | 3 ++- src/mame/drivers/argox.cpp | 2 +- src/mame/drivers/canon_s80.cpp | 2 +- src/mame/drivers/dvk_kcgd.cpp | 2 ++ src/mame/drivers/lg-dvd.cpp | 2 ++ src/mame/drivers/marywu.cpp | 2 +- src/mame/drivers/mt735.cpp | 2 ++ src/mame/drivers/sansa_fuze.cpp | 3 +++ src/mame/drivers/segapm.cpp | 2 ++ src/mame/drivers/wacky_gator.cpp | 2 +- src/mame/drivers/zapcomputer.cpp | 2 +- src/mame/machine/ns10crypt.cpp | 2 +- src/mame/machine/ns10crypt.h | 2 +- src/mame/video/snk68_spr.h | 2 ++ src/osd/modules/render/bgfx/statereader.cpp | 2 ++ src/osd/modules/render/bgfx/statereader.h | 2 ++ src/osd/modules/render/bgfx/writereader.cpp | 2 ++ src/osd/modules/render/bgfx/writereader.h | 2 ++ src/osd/modules/render/binpacker.h | 2 ++ src/osd/modules/render/drawbgfx.h | 2 ++ 43 files changed, 78 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/devices/cpu/m6800/6800ops.inc b/src/devices/cpu/m6800/6800ops.inc index d6c3d7634a5..45a78d1d71f 100644 --- a/src/devices/cpu/m6800/6800ops.inc +++ b/src/devices/cpu/m6800/6800ops.inc @@ -1,4 +1,5 @@ - +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /* HNZVC diff --git a/src/devices/cpu/m6800/6800tbl.inc b/src/devices/cpu/m6800/6800tbl.inc index 10515e54bdc..09c86bd8093 100644 --- a/src/devices/cpu/m6800/6800tbl.inc +++ b/src/devices/cpu/m6800/6800tbl.inc @@ -1,4 +1,5 @@ - +// license:BSD-3-Clause +// copyright-holders:Aaron Giles const m6800_cpu_device::op_func m6800_cpu_device::m6800_insn[0x100] = { &m6800_cpu_device::illegal,&m6800_cpu_device::nop, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::tap, &m6800_cpu_device::tpa, &m6800_cpu_device::inx, &m6800_cpu_device::dex, &m6800_cpu_device::clv, &m6800_cpu_device::sev, &m6800_cpu_device::clc, &m6800_cpu_device::sec, &m6800_cpu_device::cli, &m6800_cpu_device::sei, diff --git a/src/devices/cpu/m6805/6805ops.inc b/src/devices/cpu/m6805/6805ops.inc index 713be5e0d7b..c6761982c96 100644 --- a/src/devices/cpu/m6805/6805ops.inc +++ b/src/devices/cpu/m6805/6805ops.inc @@ -1,4 +1,5 @@ - +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /* HNZC diff --git a/src/devices/cpu/mcs51/mcs51ops.inc b/src/devices/cpu/mcs51/mcs51ops.inc index e60cc3505eb..0c1dec682ef 100644 --- a/src/devices/cpu/mcs51/mcs51ops.inc +++ b/src/devices/cpu/mcs51/mcs51ops.inc @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Steve Ellenoff /******************************************************************************************* NOTE: All registers are accessed directly, instead of using the SFR_R() function for speed Direct register access is availabe from the R_(register name) macros.. ex: ACC for the ACC diff --git a/src/devices/machine/ram.cpp b/src/devices/machine/ram.cpp index c190ea64f16..66e8b31cf4f 100644 --- a/src/devices/machine/ram.cpp +++ b/src/devices/machine/ram.cpp @@ -1,4 +1,4 @@ -// license: BSD-3-Clause +// license:BSD-3-Clause // copyright-holders: Dirk Best /************************************************************************* diff --git a/src/devices/machine/ram.h b/src/devices/machine/ram.h index 5140309f825..8fbe85cd865 100644 --- a/src/devices/machine/ram.h +++ b/src/devices/machine/ram.h @@ -1,4 +1,4 @@ -// license: BSD-3-Clause +// license:BSD-3-Clause // copyright-holders: Dirk Best /************************************************************************* diff --git a/src/devices/machine/s3c24xx.inc b/src/devices/machine/s3c24xx.inc index e2c4800f077..ca7bc05a90d 100644 --- a/src/devices/machine/s3c24xx.inc +++ b/src/devices/machine/s3c24xx.inc @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Tim Schuerewegen /******************************************************************************* Samsung S3C2400 / S3C2410 / S3C2440 diff --git a/src/devices/sound/315-5641.cpp b/src/devices/sound/315-5641.cpp index df5341c7382..dbec291779f 100644 --- a/src/devices/sound/315-5641.cpp +++ b/src/devices/sound/315-5641.cpp @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /* Sega 315-5641 / D77591 / 9442CA010 */ #include "emu.h" diff --git a/src/devices/sound/315-5641.h b/src/devices/sound/315-5641.h index 49e068fb4ac..e8349236421 100644 --- a/src/devices/sound/315-5641.h +++ b/src/devices/sound/315-5641.h @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese /* Sega 315-5641 / D77591 / 9442CA010 */ // this is the PICO sound chip, we are not sure if it's the same as a 7759 or not, it requires FIFO logic diff --git a/src/devices/video/epic12in.inc b/src/devices/video/epic12in.inc index cf0c81dd80f..4297c5a2d55 100644 --- a/src/devices/video/epic12in.inc +++ b/src/devices/video/epic12in.inc @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood /* blitter function */ void epic12_device::FUNCNAME(BLIT_PARAMS) diff --git a/src/devices/video/epic12pixel.inc b/src/devices/video/epic12pixel.inc index 3cb01cebbf4..65666470e40 100644 --- a/src/devices/video/epic12pixel.inc +++ b/src/devices/video/epic12pixel.inc @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood /* This is the inner-most loop code (per-pixel) and thus the most performance sensitive part */ #if FLIPX == 1 diff --git a/src/devices/video/voodoo_rast.inc b/src/devices/video/voodoo_rast.inc index e7251bf9a01..4c858bc1e69 100644 --- a/src/devices/video/voodoo_rast.inc +++ b/src/devices/video/voodoo_rast.inc @@ -1,4 +1,5 @@ - +// license:BSD-3-Clause +// copyright-holders:Aaron Giles /*************************************************************************** GAME-SPECIFIC RASTERIZERS ***************************************************************************/ diff --git a/src/lib/formats/atom_dsk.cpp b/src/lib/formats/atom_dsk.cpp index 6a5294a8fb8..36e4eeab69a 100644 --- a/src/lib/formats/atom_dsk.cpp +++ b/src/lib/formats/atom_dsk.cpp @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Carl #include "atom_dsk.h" atom_format::atom_format() : wd177x_format(formats) diff --git a/src/lib/formats/atom_dsk.h b/src/lib/formats/atom_dsk.h index 7f64810e87c..03a4a0688f3 100644 --- a/src/lib/formats/atom_dsk.h +++ b/src/lib/formats/atom_dsk.h @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Carl #ifndef __ATOM_DSK_H__ #define __ATOM_DSK_H__ diff --git a/src/lib/netlist/macro/nlm_cd4xxx.cpp b/src/lib/netlist/macro/nlm_cd4xxx.cpp index e8ffede2aa8..f7eda575bab 100644 --- a/src/lib/netlist/macro/nlm_cd4xxx.cpp +++ b/src/lib/netlist/macro/nlm_cd4xxx.cpp @@ -1,4 +1,5 @@ - +// license:GPL-2.0+ +// copyright-holders:Couriersud #include "nlm_cd4xxx.h" #include "devices/nld_truthtable.h" diff --git a/src/lib/netlist/macro/nlm_cd4xxx.h b/src/lib/netlist/macro/nlm_cd4xxx.h index 94c5d04aef8..ebfb58740b2 100644 --- a/src/lib/netlist/macro/nlm_cd4xxx.h +++ b/src/lib/netlist/macro/nlm_cd4xxx.h @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud #ifndef NLD_CD4XXX_H_ #define NLD_CD4XXX_H_ diff --git a/src/lib/netlist/macro/nlm_opamp.cpp b/src/lib/netlist/macro/nlm_opamp.cpp index 9d246ebb04f..c3a932c0a35 100644 --- a/src/lib/netlist/macro/nlm_opamp.cpp +++ b/src/lib/netlist/macro/nlm_opamp.cpp @@ -1,4 +1,5 @@ - +// license:GPL-2.0+ +// copyright-holders:Couriersud #include "nlm_opamp.h" #include "analog/nld_opamps.h" diff --git a/src/lib/netlist/macro/nlm_opamp.h b/src/lib/netlist/macro/nlm_opamp.h index 8612f72e453..c0d6a0b158f 100644 --- a/src/lib/netlist/macro/nlm_opamp.h +++ b/src/lib/netlist/macro/nlm_opamp.h @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud #ifndef NLM_OPAMP_H_ #define NLM_OPAMP_H_ diff --git a/src/lib/netlist/macro/nlm_other.cpp b/src/lib/netlist/macro/nlm_other.cpp index e3d53def922..9a5e54af737 100644 --- a/src/lib/netlist/macro/nlm_other.cpp +++ b/src/lib/netlist/macro/nlm_other.cpp @@ -1,4 +1,5 @@ - +// license:GPL-2.0+ +// copyright-holders:Couriersud #include "nlm_other.h" #include "devices/nld_truthtable.h" diff --git a/src/lib/netlist/macro/nlm_other.h b/src/lib/netlist/macro/nlm_other.h index cc104968ed3..76f8dd781d5 100644 --- a/src/lib/netlist/macro/nlm_other.h +++ b/src/lib/netlist/macro/nlm_other.h @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud #ifndef NLM_OTHER_H_ #define NLM_OTHER_H_ diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp index c9c33aceaeb..c06aa2e45d4 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.cpp +++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp @@ -1,4 +1,5 @@ - +// license:GPL-2.0+ +// copyright-holders:Couriersud #include "nlm_ttl74xx.h" #include "devices/nld_truthtable.h" diff --git a/src/lib/netlist/macro/nlm_ttl74xx.h b/src/lib/netlist/macro/nlm_ttl74xx.h index 0fed60235c1..8ae8819480f 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.h +++ b/src/lib/netlist/macro/nlm_ttl74xx.h @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud #ifndef NLD_TTL74XX_H_ #define NLD_TTL74XX_H_ diff --git a/src/lib/netlist/prg/nlwav.cpp b/src/lib/netlist/prg/nlwav.cpp index bba12ca1152..408cc65589e 100644 --- a/src/lib/netlist/prg/nlwav.cpp +++ b/src/lib/netlist/prg/nlwav.cpp @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud #include #include #include "plib/poptions.h" diff --git a/src/mame/audio/nl_kidniki.inc b/src/mame/audio/nl_kidniki.inc index bdb178f82c4..d9040214583 100644 --- a/src/mame/audio/nl_kidniki.inc +++ b/src/mame/audio/nl_kidniki.inc @@ -1,4 +1,5 @@ - +// license:BSD-3-Clause +// copyright-holders:Andrew Gardner, Couriersud #include "netlist/devices/net_lib.h" #ifndef USE_FRONTIERS diff --git a/src/mame/drivers/argox.cpp b/src/mame/drivers/argox.cpp index 3ee71615d5c..aa52674a1f3 100644 --- a/src/mame/drivers/argox.cpp +++ b/src/mame/drivers/argox.cpp @@ -1,4 +1,4 @@ -// license:GPL2+ +// license:GPL-2.0+ // copyright-holders:Felipe Sanches /*************************************************************************** diff --git a/src/mame/drivers/canon_s80.cpp b/src/mame/drivers/canon_s80.cpp index 2ee2325ce0e..307c8d69dd0 100644 --- a/src/mame/drivers/canon_s80.cpp +++ b/src/mame/drivers/canon_s80.cpp @@ -1,4 +1,4 @@ -// license:GPL2+ +// license:GPL-2.0+ // copyright-holders:FelipeSanches /* * canon_s80.c diff --git a/src/mame/drivers/dvk_kcgd.cpp b/src/mame/drivers/dvk_kcgd.cpp index 6ddebb26b09..c13774fd3ce 100644 --- a/src/mame/drivers/dvk_kcgd.cpp +++ b/src/mame/drivers/dvk_kcgd.cpp @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Sergey Svishchev /*************************************************************************** KCGD (Kontroller Cvetnogo Graficheskogo Displeya = Colour Graphics diff --git a/src/mame/drivers/lg-dvd.cpp b/src/mame/drivers/lg-dvd.cpp index 0ea3c2ad14a..013d856febb 100644 --- a/src/mame/drivers/lg-dvd.cpp +++ b/src/mame/drivers/lg-dvd.cpp @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert /* Rather skeleton driver for a LG GP40NW10 usb dvd writer. diff --git a/src/mame/drivers/marywu.cpp b/src/mame/drivers/marywu.cpp index ce48608de52..288b244e670 100644 --- a/src/mame/drivers/marywu.cpp +++ b/src/mame/drivers/marywu.cpp @@ -1,4 +1,4 @@ -// license:GPL2+ +// license:GPL-2.0+ // copyright-holders:Felipe Sanches /************************************************************************* diff --git a/src/mame/drivers/mt735.cpp b/src/mame/drivers/mt735.cpp index 4e642a4fa31..b6bbfffa5e6 100644 --- a/src/mame/drivers/mt735.cpp +++ b/src/mame/drivers/mt735.cpp @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Cowering, Olivier Galibert /* Brother MT735 thermal printer */ diff --git a/src/mame/drivers/sansa_fuze.cpp b/src/mame/drivers/sansa_fuze.cpp index 2ee426af50c..ab8e8e22c07 100644 --- a/src/mame/drivers/sansa_fuze.cpp +++ b/src/mame/drivers/sansa_fuze.cpp @@ -1,3 +1,6 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood + /* Sansa Fuze */ // info can be found at diff --git a/src/mame/drivers/segapm.cpp b/src/mame/drivers/segapm.cpp index 9ebc711ca4e..a35fe359acc 100644 --- a/src/mame/drivers/segapm.cpp +++ b/src/mame/drivers/segapm.cpp @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood /* Sega Picture Magic (codename JANUS) */ // http://segaretro.org/Sega_Picture_Magic diff --git a/src/mame/drivers/wacky_gator.cpp b/src/mame/drivers/wacky_gator.cpp index 77f67d7165e..bd86cd9cd4f 100644 --- a/src/mame/drivers/wacky_gator.cpp +++ b/src/mame/drivers/wacky_gator.cpp @@ -1,4 +1,4 @@ -// license:GPL2+ +// license:GPL-2.0+ // copyright-holders:FelipeSanches, Sandro Ronco // // Wacky Gator diff --git a/src/mame/drivers/zapcomputer.cpp b/src/mame/drivers/zapcomputer.cpp index f6dab84cc73..b876fcaf555 100644 --- a/src/mame/drivers/zapcomputer.cpp +++ b/src/mame/drivers/zapcomputer.cpp @@ -1,4 +1,4 @@ -// license:GPL2+ +// license:GPL-2.0+ // copyright-holders:FelipeSanches /* ZAP - Z80 Applications Processor diff --git a/src/mame/machine/ns10crypt.cpp b/src/mame/machine/ns10crypt.cpp index e639108166c..5683b35bc82 100644 --- a/src/mame/machine/ns10crypt.cpp +++ b/src/mame/machine/ns10crypt.cpp @@ -1,4 +1,4 @@ -// license:BSD-3 +// license:BSD-3-Clause // copyright-holders:Andreas Naive /**************************************************************************** Namco System 10 decryption emulation diff --git a/src/mame/machine/ns10crypt.h b/src/mame/machine/ns10crypt.h index 163a4ac21c7..d6d40174c81 100644 --- a/src/mame/machine/ns10crypt.h +++ b/src/mame/machine/ns10crypt.h @@ -1,4 +1,4 @@ -// license:BSD-3 +// license:BSD-3-Clause // copyright-holders:Andreas Naive #ifndef _NS10CRYPT_H_ diff --git a/src/mame/video/snk68_spr.h b/src/mame/video/snk68_spr.h index 8a0494e0a7b..088b6a97a45 100644 --- a/src/mame/video/snk68_spr.h +++ b/src/mame/video/snk68_spr.h @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail, Acho A. Tang, Nicola Salmoria typedef device_delegate snk68_tile_indirection_delegate; #define MCFG_SNK68_SPR_GFXDECODE(_gfxtag) \ diff --git a/src/osd/modules/render/bgfx/statereader.cpp b/src/osd/modules/render/bgfx/statereader.cpp index 93fb021be5c..0a459c60102 100644 --- a/src/osd/modules/render/bgfx/statereader.cpp +++ b/src/osd/modules/render/bgfx/statereader.cpp @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz #include "statereader.h" uint64_t state_reader::get_enum_from_value(const Value& value, std::string name, const uint64_t default_value, const string_to_enum* enums, const int count) diff --git a/src/osd/modules/render/bgfx/statereader.h b/src/osd/modules/render/bgfx/statereader.h index d32cf52c817..ce52536ca0a 100644 --- a/src/osd/modules/render/bgfx/statereader.h +++ b/src/osd/modules/render/bgfx/statereader.h @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz #pragma once #ifndef __DRAWBGFX_STATE_READER__ diff --git a/src/osd/modules/render/bgfx/writereader.cpp b/src/osd/modules/render/bgfx/writereader.cpp index 5d6ca0fcf93..7fd36a03fda 100644 --- a/src/osd/modules/render/bgfx/writereader.cpp +++ b/src/osd/modules/render/bgfx/writereader.cpp @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz #include #include "writereader.h" diff --git a/src/osd/modules/render/bgfx/writereader.h b/src/osd/modules/render/bgfx/writereader.h index 5210a8df286..bd43b5899f5 100644 --- a/src/osd/modules/render/bgfx/writereader.h +++ b/src/osd/modules/render/bgfx/writereader.h @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz #pragma once #ifndef __DRAWBGFX_WRITE_READER__ diff --git a/src/osd/modules/render/binpacker.h b/src/osd/modules/render/binpacker.h index 696bd18eb7d..33f02dc2642 100644 --- a/src/osd/modules/render/binpacker.h +++ b/src/osd/modules/render/binpacker.h @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz #pragma once #ifndef __RECTPACKER_H__ diff --git a/src/osd/modules/render/drawbgfx.h b/src/osd/modules/render/drawbgfx.h index 62e00dd7d1d..806bc651344 100644 --- a/src/osd/modules/render/drawbgfx.h +++ b/src/osd/modules/render/drawbgfx.h @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz #pragma once #ifndef __RENDER_BGFX__ -- cgit v1.2.3-70-g09d2 From b0e36fd73ce30eb1b5e3096aeeb3a701bb1ea296 Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Fri, 4 Mar 2016 13:38:08 -0300 Subject: Butterfly Dream 97: Created its own machine driver. Perfect decoded graphics for gfx bank 1. [Roberto Fresca] --- src/mame/drivers/skylncr.cpp | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mame/drivers/skylncr.cpp b/src/mame/drivers/skylncr.cpp index 0b56e4e0f4d..e9b3c48f5b6 100644 --- a/src/mame/drivers/skylncr.cpp +++ b/src/mame/drivers/skylncr.cpp @@ -543,6 +543,22 @@ static const gfx_layout layout8x8x8_alt = /* for sstar97 */ 8*8*4 }; +static const gfx_layout layout8x8x8_bdream97 = /* for bdream97 */ +{ + 8,8, + RGN_FRAC(1,2), + 8, + { STEP8(0,1) }, + { + 8*0,RGN_FRAC(1,2)+8*0, + RGN_FRAC(1,2)+8*1,8*1, + 8*2,RGN_FRAC(1,2)+8*2, + RGN_FRAC(1,2)+8*3,8*3 + }, + { STEP8(0,8*4) }, + 8*8*4 +}; + static const gfx_layout layout8x32x8 = { 8,32, @@ -644,6 +660,12 @@ static GFXDECODE_START( sstar97 ) GFXDECODE_ENTRY( "gfx2", 0, layout8x32x8_alt, 0x100, 1 ) GFXDECODE_END +static GFXDECODE_START( bdream97 ) + GFXDECODE_ENTRY( "gfx1", 0, layout8x8x8_bdream97, 0, 2 ) + GFXDECODE_ENTRY( "gfx2", 0, layout8x32x8_alt, 0, 2 ) + GFXDECODE_ENTRY( "gfx2", 0, layout8x32x8_alt, 0x100, 1 ) +GFXDECODE_END + /*********************************** * Input Ports * @@ -1431,6 +1453,14 @@ static MACHINE_CONFIG_DERIVED( sstar97, skylncr ) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( bdream97, skylncr ) + + /* basic machine hardware */ + MCFG_CPU_MODIFY("maincpu") + MCFG_GFXDECODE_MODIFY("gfxdecode", bdream97) +MACHINE_CONFIG_END + + /********************************** * ROM Load * **********************************/ @@ -1695,4 +1725,4 @@ GAME( 1995, leader, 0, skylncr, leader, skylncr_state, skylncr, ROT0 GAME( 199?, gallag50, 0, skylncr, gallag50, skylncr_state, skylncr, ROT0, "bootleg", "Gallag Video Game / Petalouda (Butterfly, x50)", 0 ) GAME( 199?, neraidou, 0, neraidou, neraidou, skylncr_state, skylncr, ROT0, "bootleg", "Neraidoula (Fairy Butterfly)", 0 ) GAME( 199?, sstar97, 0, sstar97, sstar97, skylncr_state, skylncr, ROT0, "Bordun International", "Super Star 97 / Ming Xing 97 (version V153B)", 0 ) -GAME( 199?, bdream97, 0, sstar97, sstar97, skylncr_state, skylncr, ROT0, "bootleg", "Butterfly Dream 97 / Hudie Meng 97", MACHINE_NOT_WORKING ) +GAME( 199?, bdream97, 0, bdream97, skylncr, skylncr_state, skylncr, ROT0, "bootleg", "Butterfly Dream 97 / Hudie Meng 97", MACHINE_NOT_WORKING ) -- cgit v1.2.3-70-g09d2 From dfb6527d61f2516d0de098b067888019e2e31328 Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Fri, 4 Mar 2016 14:02:21 -0300 Subject: Butterfly Dream 97: Decoded graphics for gfx bank 2. [Roberto Fresca] --- src/mame/drivers/skylncr.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/skylncr.cpp b/src/mame/drivers/skylncr.cpp index e9b3c48f5b6..cfaba6c0a36 100644 --- a/src/mame/drivers/skylncr.cpp +++ b/src/mame/drivers/skylncr.cpp @@ -637,6 +637,25 @@ static const gfx_layout layout8x32x8_alt2 = /* for neraidov */ 8*32*8/2 }; +static const gfx_layout layout8x32x8_bdream97 = /* for bdream97 */ +{ + 8,32, + RGN_FRAC(1,2), + 8, + { STEP8(0,1) }, + { + 8*1, RGN_FRAC(1,2)+8*1, + 8*0, RGN_FRAC(1,2)+8*0, + 8*3, RGN_FRAC(1,2)+8*3, + 8*2, RGN_FRAC(1,2)+8*2 + }, + { + STEP16(0,8*4), + STEP16(16*8*4,8*4) + }, + 8*32*8/2 +}; + /************************************** * Graphics Decode * @@ -662,8 +681,8 @@ GFXDECODE_END static GFXDECODE_START( bdream97 ) GFXDECODE_ENTRY( "gfx1", 0, layout8x8x8_bdream97, 0, 2 ) - GFXDECODE_ENTRY( "gfx2", 0, layout8x32x8_alt, 0, 2 ) - GFXDECODE_ENTRY( "gfx2", 0, layout8x32x8_alt, 0x100, 1 ) + GFXDECODE_ENTRY( "gfx2", 0, layout8x32x8_bdream97, 0, 2 ) + GFXDECODE_ENTRY( "gfx2", 0, layout8x32x8_bdream97, 0x100, 1 ) GFXDECODE_END -- cgit v1.2.3-70-g09d2 From 9015ef7dc222965f6b0879b2754aed26f4988db2 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 4 Mar 2016 18:44:53 +0100 Subject: suprnova.cpp: some work towards save state support (nw) --- src/mame/drivers/suprnova.cpp | 126 +++++++++++++++++++++++++++--------------- src/mame/includes/suprnova.h | 45 ++++++++------- src/mame/video/suprnova.cpp | 53 ++++++++++++------ 3 files changed, 142 insertions(+), 82 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/suprnova.cpp b/src/mame/drivers/suprnova.cpp index 95d08b082c5..d8919e56aa4 100644 --- a/src/mame/drivers/suprnova.cpp +++ b/src/mame/drivers/suprnova.cpp @@ -226,7 +226,7 @@ void skns_state::hit_recalc() */ } -WRITE32_MEMBER(skns_state::skns_hit_w) +WRITE32_MEMBER(skns_state::hit_w) //void hit_w(UINT32 adr, UINT32 data, int type) { hit_t &hit = m_hit; @@ -291,7 +291,7 @@ WRITE32_MEMBER(skns_state::skns_hit_w) hit_recalc(); } -WRITE32_MEMBER(skns_state::skns_hit2_w) +WRITE32_MEMBER(skns_state::hit2_w) { hit_t &hit = m_hit; @@ -324,7 +324,7 @@ WRITE32_MEMBER(skns_state::skns_hit2_w) } -READ32_MEMBER(skns_state::skns_hit_r) +READ32_MEMBER(skns_state::hit_r) //UINT32 hit_r(UINT32 adr, int type) { hit_t &hit = m_hit; @@ -422,6 +422,46 @@ TIMER_DEVICE_CALLBACK_MEMBER(skns_state::interrupt_callback) m_maincpu->set_input_line(param, HOLD_LINE); } +void skns_state::machine_start() +{ + m_btiles = memregion("gfx3")->base(); + + save_pointer(NAME(m_btiles), memregion("gfx3")->bytes()); + save_item(NAME(m_hit.x1p)); + save_item(NAME(m_hit.y1p)); + save_item(NAME(m_hit.z1p)); + save_item(NAME(m_hit.x1s)); + save_item(NAME(m_hit.y1s)); + save_item(NAME(m_hit.z1s)); + save_item(NAME(m_hit.x2p)); + save_item(NAME(m_hit.y2p)); + save_item(NAME(m_hit.z2p)); + save_item(NAME(m_hit.x2s)); + save_item(NAME(m_hit.y2s)); + save_item(NAME(m_hit.z2s)); + save_item(NAME(m_hit.org)); + save_item(NAME(m_hit.x1_p1)); + save_item(NAME(m_hit.x1_p2)); + save_item(NAME(m_hit.y1_p1)); + save_item(NAME(m_hit.y1_p2)); + save_item(NAME(m_hit.z1_p1)); + save_item(NAME(m_hit.z1_p2)); + save_item(NAME(m_hit.x2_p1)); + save_item(NAME(m_hit.x2_p2)); + save_item(NAME(m_hit.y2_p1)); + save_item(NAME(m_hit.y2_p2)); + save_item(NAME(m_hit.z2_p1)); + save_item(NAME(m_hit.z2_p2)); + save_item(NAME(m_hit.x1tox2)); + save_item(NAME(m_hit.y1toy2)); + save_item(NAME(m_hit.z1toz2)); + save_item(NAME(m_hit.x_in)); + save_item(NAME(m_hit.y_in)); + save_item(NAME(m_hit.z_in)); + save_item(NAME(m_hit.flag)); + save_item(NAME(m_hit.disconnect)); +} + void skns_state::machine_reset() { hit_t &hit = m_hit; @@ -435,7 +475,7 @@ void skns_state::machine_reset() } -TIMER_DEVICE_CALLBACK_MEMBER(skns_state::skns_irq) +TIMER_DEVICE_CALLBACK_MEMBER(skns_state::irq) { int scanline = param; @@ -599,7 +639,7 @@ INPUT_PORTS_END -WRITE32_MEMBER(skns_state::skns_io_w) +WRITE32_MEMBER(skns_state::io_w) { switch(offset) { case 2: @@ -662,10 +702,8 @@ WRITE32_MEMBER(skns_state::skns_io_w) /* end old driver code */ -WRITE32_MEMBER(skns_state::skns_v3t_w) +WRITE32_MEMBER(skns_state::v3t_w) { - UINT8 *btiles = memregion("gfx3")->base(); - COMBINE_DATA(&m_v3t_ram[offset]); m_gfxdecode->gfx(1)->mark_dirty(offset/0x40); @@ -673,15 +711,16 @@ WRITE32_MEMBER(skns_state::skns_v3t_w) data = m_v3t_ram[offset]; // i think we need to swap around to decode .. endian issues? - btiles[offset*4+0] = (data & 0xff000000) >> 24; - btiles[offset*4+1] = (data & 0x00ff0000) >> 16; - btiles[offset*4+2] = (data & 0x0000ff00) >> 8; - btiles[offset*4+3] = (data & 0x000000ff) >> 0; + + m_btiles[offset*4+0] = (data & 0xff000000) >> 24; + m_btiles[offset*4+1] = (data & 0x00ff0000) >> 16; + m_btiles[offset*4+2] = (data & 0x0000ff00) >> 8; + m_btiles[offset*4+3] = (data & 0x000000ff) >> 0; } static ADDRESS_MAP_START( skns_map, AS_PROGRAM, 32, skns_state ) AM_RANGE(0x00000000, 0x0007ffff) AM_ROM /* BIOS ROM */ - AM_RANGE(0x00400000, 0x0040000f) AM_WRITE(skns_io_w) /* I/O Write */ + AM_RANGE(0x00400000, 0x0040000f) AM_WRITE(io_w) /* I/O Write */ AM_RANGE(0x00400000, 0x00400003) AM_READ_PORT("400000") AM_RANGE(0x00400004, 0x00400007) AM_READ_PORT("400004") /* In between is write only */ @@ -689,18 +728,18 @@ static ADDRESS_MAP_START( skns_map, AS_PROGRAM, 32, skns_state ) AM_RANGE(0x00800000, 0x00801fff) AM_RAM AM_SHARE("nvram") /* 'backup' RAM */ AM_RANGE(0x00c00000, 0x00c00003) AM_DEVREADWRITE8("ymz", ymz280b_device, read, write, 0xffff0000) /* ymz280_w (sound) */ AM_RANGE(0x01000000, 0x0100000f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write, 0xffffffff) - AM_RANGE(0x01800000, 0x01800003) AM_WRITE(skns_hit2_w) + AM_RANGE(0x01800000, 0x01800003) AM_WRITE(hit2_w) AM_RANGE(0x02000000, 0x02003fff) AM_RAM AM_SHARE("spriteram") /* sprite ram */ AM_RANGE(0x02100000, 0x0210003f) AM_RAM AM_SHARE("spc_regs") /* sprite registers */ - AM_RANGE(0x02400000, 0x0240007f) AM_RAM_WRITE(skns_v3_regs_w) AM_SHARE("v3_regs") /* tilemap registers */ - AM_RANGE(0x02500000, 0x02503fff) AM_RAM_WRITE(skns_tilemapA_w) AM_SHARE("tilemapa_ram") /* tilemap A */ - AM_RANGE(0x02504000, 0x02507fff) AM_RAM_WRITE(skns_tilemapB_w) AM_SHARE("tilemapb_ram") /* tilemap B */ + AM_RANGE(0x02400000, 0x0240007f) AM_RAM_WRITE(v3_regs_w) AM_SHARE("v3_regs") /* tilemap registers */ + AM_RANGE(0x02500000, 0x02503fff) AM_RAM_WRITE(tilemapA_w) AM_SHARE("tilemapa_ram") /* tilemap A */ + AM_RANGE(0x02504000, 0x02507fff) AM_RAM_WRITE(tilemapB_w) AM_SHARE("tilemapb_ram") /* tilemap B */ AM_RANGE(0x02600000, 0x02607fff) AM_RAM AM_SHARE("v3slc_ram") /* tilemap linescroll */ - AM_RANGE(0x02a00000, 0x02a0001f) AM_RAM_WRITE(skns_pal_regs_w) AM_SHARE("pal_regs") - AM_RANGE(0x02a40000, 0x02a5ffff) AM_RAM_WRITE(skns_palette_ram_w) AM_SHARE("palette_ram") - AM_RANGE(0x02f00000, 0x02f000ff) AM_READWRITE(skns_hit_r, skns_hit_w) + AM_RANGE(0x02a00000, 0x02a0001f) AM_RAM_WRITE(pal_regs_w) AM_SHARE("pal_regs") + AM_RANGE(0x02a40000, 0x02a5ffff) AM_RAM_WRITE(palette_ram_w) AM_SHARE("palette_ram") + AM_RANGE(0x02f00000, 0x02f000ff) AM_READWRITE(hit_r, hit_w) AM_RANGE(0x04000000, 0x041fffff) AM_ROMBANK("bank1") /* GAME ROM */ - AM_RANGE(0x04800000, 0x0483ffff) AM_RAM_WRITE(skns_v3t_w) AM_SHARE("v3t_ram") /* tilemap b ram based tiles */ + AM_RANGE(0x04800000, 0x0483ffff) AM_RAM_WRITE(v3t_w) AM_SHARE("v3t_ram") /* tilemap b ram based tiles */ AM_RANGE(0x06000000, 0x060fffff) AM_RAM AM_SHARE("main_ram") AM_RANGE(0xc0000000, 0xc0000fff) AM_RAM AM_SHARE("cache_ram") /* 'cache' RAM */ ADDRESS_MAP_END @@ -746,7 +785,7 @@ GFXDECODE_END static MACHINE_CONFIG_START( skns, skns_state ) MCFG_CPU_ADD("maincpu", SH2,28638000) MCFG_CPU_PROGRAM_MAP(skns_map) - MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", skns_state, skns_irq, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", skns_state, irq, "screen", 0, 1) MCFG_DEVICE_ADD("rtc", MSM6242, XTAL_32_768kHz) @@ -765,8 +804,7 @@ static MACHINE_CONFIG_START( skns, skns_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(340,262) MCFG_SCREEN_VISIBLE_AREA(0,319,0,239) - MCFG_SCREEN_UPDATE_DRIVER(skns_state, screen_update_skns) - MCFG_SCREEN_VBLANK_DRIVER(skns_state, screen_eof_skns) + MCFG_SCREEN_UPDATE_DRIVER(skns_state, screen_update) MCFG_PALETTE_ADD("palette", 32768) MCFG_GFXDECODE_ADD("gfxdecode", "palette", skns_bg) @@ -944,7 +982,7 @@ READ32_MEMBER(skns_state::sengekij_speedup_r)// 60006ee 600308e return m_main_ram[0xb7380/4]; } -void skns_state::init_skns() +void skns_state::init_drc() { // init DRC to fastest options m_maincpu->sh2drc_set_options(SH2DRC_FASTEST_OPTIONS); @@ -958,25 +996,25 @@ void skns_state::set_drc_pcflush(UINT32 addr) m_maincpu->sh2drc_add_pcflush(addr); } -DRIVER_INIT_MEMBER(skns_state,galpani4) { machine().device("spritegen")->skns_sprite_kludge(-5,-1); init_skns(); } -DRIVER_INIT_MEMBER(skns_state,galpanis) { machine().device("spritegen")->skns_sprite_kludge(-5,-1); init_skns(); } -DRIVER_INIT_MEMBER(skns_state,cyvern) { machine().device("spritegen")->skns_sprite_kludge(+0,+2); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x604d3c8, 0x604d3cb, read32_delegate(FUNC(skns_state::cyvern_speedup_r),this) ); set_drc_pcflush(0x402ebd2); } -DRIVER_INIT_MEMBER(skns_state,galpans2) { machine().device("spritegen")->skns_sprite_kludge(-1,-1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60fb6bc, 0x60fb6bf, read32_delegate(FUNC(skns_state::galpans2_speedup_r),this) ); set_drc_pcflush(0x4049ae2); } -DRIVER_INIT_MEMBER(skns_state,gutsn) { machine().device("spritegen")->skns_sprite_kludge(+0,+0); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x600c780, 0x600c783, read32_delegate(FUNC(skns_state::gutsn_speedup_r),this) ); set_drc_pcflush(0x402206e); } -DRIVER_INIT_MEMBER(skns_state,panicstr) { machine().device("spritegen")->skns_sprite_kludge(-1,-1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60f19e4, 0x60f19e7, read32_delegate(FUNC(skns_state::panicstr_speedup_r),this) ); set_drc_pcflush(0x404e68a); } -DRIVER_INIT_MEMBER(skns_state,senknow) { machine().device("spritegen")->skns_sprite_kludge(+1,+1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60000dc, 0x60000df, read32_delegate(FUNC(skns_state::senknow_speedup_r),this) ); set_drc_pcflush(0x4017dce); } -DRIVER_INIT_MEMBER(skns_state,puzzloope) { machine().device("spritegen")->skns_sprite_kludge(-9,-1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6081d38, 0x6081d3b, read32_delegate(FUNC(skns_state::puzzloope_speedup_r),this) ); set_drc_pcflush(0x401da14); } -DRIVER_INIT_MEMBER(skns_state,puzzloopj) { machine().device("spritegen")->skns_sprite_kludge(-9,-1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6086714, 0x6086717, read32_delegate(FUNC(skns_state::puzzloopj_speedup_r),this) ); set_drc_pcflush(0x401dca0); } -DRIVER_INIT_MEMBER(skns_state,puzzloopa) { machine().device("spritegen")->skns_sprite_kludge(-9,-1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6085bcc, 0x6085bcf, read32_delegate(FUNC(skns_state::puzzloopa_speedup_r),this) ); set_drc_pcflush(0x401d9d4); } -DRIVER_INIT_MEMBER(skns_state,puzzloopu) { machine().device("spritegen")->skns_sprite_kludge(-9,-1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6085cec, 0x6085cef, read32_delegate(FUNC(skns_state::puzzloopu_speedup_r),this) ); set_drc_pcflush(0x401dab0); } -DRIVER_INIT_MEMBER(skns_state,jjparads) { machine().device("spritegen")->skns_sprite_kludge(+5,+1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000994, 0x6000997, read32_delegate(FUNC(skns_state::jjparads_speedup_r),this) ); set_drc_pcflush(0x4015e84); } -DRIVER_INIT_MEMBER(skns_state,jjparad2) { machine().device("spritegen")->skns_sprite_kludge(+5,+1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000984, 0x6000987, read32_delegate(FUNC(skns_state::jjparad2_speedup_r),this) ); set_drc_pcflush(0x401620a); } -DRIVER_INIT_MEMBER(skns_state,ryouran) { machine().device("spritegen")->skns_sprite_kludge(+5,+1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000a14, 0x6000a17, read32_delegate(FUNC(skns_state::ryouran_speedup_r),this) ); set_drc_pcflush(0x40182ce); } -DRIVER_INIT_MEMBER(skns_state,teljan) { machine().device("spritegen")->skns_sprite_kludge(+5,+1); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6002fb4, 0x6002fb7, read32_delegate(FUNC(skns_state::teljan_speedup_r),this) ); set_drc_pcflush(0x401ba32); } -DRIVER_INIT_MEMBER(skns_state,sengekis) { machine().device("spritegen")->skns_sprite_kludge(-192,-272); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60b74bc, 0x60b74bf, read32_delegate(FUNC(skns_state::sengekis_speedup_r),this) ); set_drc_pcflush(0x60006ec); } -DRIVER_INIT_MEMBER(skns_state,sengekij) { machine().device("spritegen")->skns_sprite_kludge(-192,-272); init_skns();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60b7380, 0x60b7383, read32_delegate(FUNC(skns_state::sengekij_speedup_r),this) ); set_drc_pcflush(0x60006ec); } -DRIVER_INIT_MEMBER(skns_state,sarukani) { machine().device("spritegen")->skns_sprite_kludge(-1,-1); init_skns(); set_drc_pcflush(0x4013b42); } // Speedup is in skns_io_w() -DRIVER_INIT_MEMBER(skns_state,galpans3) { machine().device("spritegen")->skns_sprite_kludge(-1,-1); init_skns(); } +DRIVER_INIT_MEMBER(skns_state,galpani4) { machine().device("spritegen")->skns_sprite_kludge(-5,-1); init_drc(); } +DRIVER_INIT_MEMBER(skns_state,galpanis) { machine().device("spritegen")->skns_sprite_kludge(-5,-1); init_drc(); } +DRIVER_INIT_MEMBER(skns_state,cyvern) { machine().device("spritegen")->skns_sprite_kludge(+0,+2); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x604d3c8, 0x604d3cb, read32_delegate(FUNC(skns_state::cyvern_speedup_r),this) ); set_drc_pcflush(0x402ebd2); } +DRIVER_INIT_MEMBER(skns_state,galpans2) { machine().device("spritegen")->skns_sprite_kludge(-1,-1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60fb6bc, 0x60fb6bf, read32_delegate(FUNC(skns_state::galpans2_speedup_r),this) ); set_drc_pcflush(0x4049ae2); } +DRIVER_INIT_MEMBER(skns_state,gutsn) { machine().device("spritegen")->skns_sprite_kludge(+0,+0); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x600c780, 0x600c783, read32_delegate(FUNC(skns_state::gutsn_speedup_r),this) ); set_drc_pcflush(0x402206e); } +DRIVER_INIT_MEMBER(skns_state,panicstr) { machine().device("spritegen")->skns_sprite_kludge(-1,-1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60f19e4, 0x60f19e7, read32_delegate(FUNC(skns_state::panicstr_speedup_r),this) ); set_drc_pcflush(0x404e68a); } +DRIVER_INIT_MEMBER(skns_state,senknow) { machine().device("spritegen")->skns_sprite_kludge(+1,+1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60000dc, 0x60000df, read32_delegate(FUNC(skns_state::senknow_speedup_r),this) ); set_drc_pcflush(0x4017dce); } +DRIVER_INIT_MEMBER(skns_state,puzzloope) { machine().device("spritegen")->skns_sprite_kludge(-9,-1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6081d38, 0x6081d3b, read32_delegate(FUNC(skns_state::puzzloope_speedup_r),this) ); set_drc_pcflush(0x401da14); } +DRIVER_INIT_MEMBER(skns_state,puzzloopj) { machine().device("spritegen")->skns_sprite_kludge(-9,-1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6086714, 0x6086717, read32_delegate(FUNC(skns_state::puzzloopj_speedup_r),this) ); set_drc_pcflush(0x401dca0); } +DRIVER_INIT_MEMBER(skns_state,puzzloopa) { machine().device("spritegen")->skns_sprite_kludge(-9,-1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6085bcc, 0x6085bcf, read32_delegate(FUNC(skns_state::puzzloopa_speedup_r),this) ); set_drc_pcflush(0x401d9d4); } +DRIVER_INIT_MEMBER(skns_state,puzzloopu) { machine().device("spritegen")->skns_sprite_kludge(-9,-1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6085cec, 0x6085cef, read32_delegate(FUNC(skns_state::puzzloopu_speedup_r),this) ); set_drc_pcflush(0x401dab0); } +DRIVER_INIT_MEMBER(skns_state,jjparads) { machine().device("spritegen")->skns_sprite_kludge(+5,+1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000994, 0x6000997, read32_delegate(FUNC(skns_state::jjparads_speedup_r),this) ); set_drc_pcflush(0x4015e84); } +DRIVER_INIT_MEMBER(skns_state,jjparad2) { machine().device("spritegen")->skns_sprite_kludge(+5,+1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000984, 0x6000987, read32_delegate(FUNC(skns_state::jjparad2_speedup_r),this) ); set_drc_pcflush(0x401620a); } +DRIVER_INIT_MEMBER(skns_state,ryouran) { machine().device("spritegen")->skns_sprite_kludge(+5,+1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000a14, 0x6000a17, read32_delegate(FUNC(skns_state::ryouran_speedup_r),this) ); set_drc_pcflush(0x40182ce); } +DRIVER_INIT_MEMBER(skns_state,teljan) { machine().device("spritegen")->skns_sprite_kludge(+5,+1); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x6002fb4, 0x6002fb7, read32_delegate(FUNC(skns_state::teljan_speedup_r),this) ); set_drc_pcflush(0x401ba32); } +DRIVER_INIT_MEMBER(skns_state,sengekis) { machine().device("spritegen")->skns_sprite_kludge(-192,-272); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60b74bc, 0x60b74bf, read32_delegate(FUNC(skns_state::sengekis_speedup_r),this) ); set_drc_pcflush(0x60006ec); } +DRIVER_INIT_MEMBER(skns_state,sengekij) { machine().device("spritegen")->skns_sprite_kludge(-192,-272); init_drc();m_maincpu->space(AS_PROGRAM).install_read_handler(0x60b7380, 0x60b7383, read32_delegate(FUNC(skns_state::sengekij_speedup_r),this) ); set_drc_pcflush(0x60006ec); } +DRIVER_INIT_MEMBER(skns_state,sarukani) { machine().device("spritegen")->skns_sprite_kludge(-1,-1); init_drc(); set_drc_pcflush(0x4013b42); } // Speedup is in io_w() +DRIVER_INIT_MEMBER(skns_state,galpans3) { machine().device("spritegen")->skns_sprite_kludge(-1,-1); init_drc(); } diff --git a/src/mame/includes/suprnova.h b/src/mame/includes/suprnova.h index 672ceb3efd5..a9eddacfe30 100644 --- a/src/mame/includes/suprnova.h +++ b/src/mame/includes/suprnova.h @@ -59,7 +59,6 @@ public: required_shared_ptr m_cache_ram; hit_t m_hit; - UINT32 m_timer_0_temp[4]; bitmap_ind16 m_sprite_bitmap; bitmap_ind16 m_tilemap_bitmap_lower; bitmap_ind8 m_tilemap_bitmapflags_lower; @@ -88,14 +87,20 @@ public: int m_alt_enable_sprites; tilemap_t *m_tilemap_A; tilemap_t *m_tilemap_B; - + UINT8 *m_btiles; UINT8 m_region; - DECLARE_WRITE32_MEMBER(skns_hit_w); - DECLARE_WRITE32_MEMBER(skns_hit2_w); - DECLARE_READ32_MEMBER(skns_hit_r); - DECLARE_WRITE32_MEMBER(skns_io_w); - DECLARE_WRITE32_MEMBER(skns_v3t_w); + DECLARE_WRITE32_MEMBER(hit_w); + DECLARE_WRITE32_MEMBER(hit2_w); + DECLARE_READ32_MEMBER(hit_r); + DECLARE_WRITE32_MEMBER(io_w); + DECLARE_WRITE32_MEMBER(v3t_w); + DECLARE_WRITE32_MEMBER(pal_regs_w); + DECLARE_WRITE32_MEMBER(palette_ram_w); + DECLARE_WRITE32_MEMBER(tilemapA_w); + DECLARE_WRITE32_MEMBER(tilemapB_w); + DECLARE_WRITE32_MEMBER(v3_regs_w); + DECLARE_READ32_MEMBER(gutsn_speedup_r); DECLARE_READ32_MEMBER(cyvern_speedup_r); DECLARE_READ32_MEMBER(puzzloopj_speedup_r); @@ -111,12 +116,9 @@ public: DECLARE_READ32_MEMBER(panicstr_speedup_r); DECLARE_READ32_MEMBER(sengekis_speedup_r); DECLARE_READ32_MEMBER(sengekij_speedup_r); - DECLARE_WRITE32_MEMBER(skns_pal_regs_w); - DECLARE_WRITE32_MEMBER(skns_palette_ram_w); - DECLARE_WRITE32_MEMBER(skns_tilemapA_w); - DECLARE_WRITE32_MEMBER(skns_tilemapB_w); - DECLARE_WRITE32_MEMBER(skns_v3_regs_w); + DECLARE_CUSTOM_INPUT_MEMBER(paddle_r); + DECLARE_DRIVER_INIT(sengekis); DECLARE_DRIVER_INIT(cyvern); DECLARE_DRIVER_INIT(puzzloopa); @@ -136,8 +138,7 @@ public: DECLARE_DRIVER_INIT(senknow); DECLARE_DRIVER_INIT(galpani4); DECLARE_DRIVER_INIT(ryouran); - TILE_GET_INFO_MEMBER(get_tilemap_A_tile_info); - TILE_GET_INFO_MEMBER(get_tilemap_B_tile_info); + virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; virtual void video_reset() override; @@ -146,16 +147,18 @@ public: DECLARE_MACHINE_RESET(sknsu); DECLARE_MACHINE_RESET(sknse); DECLARE_MACHINE_RESET(sknsk); - UINT32 screen_update_skns(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void screen_eof_skns(screen_device &screen, bool state); + + TILE_GET_INFO_MEMBER(get_tilemap_A_tile_info); + TILE_GET_INFO_MEMBER(get_tilemap_B_tile_info); + UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(interrupt_callback); - TIMER_DEVICE_CALLBACK_MEMBER(skns_irq); - void suprnova_draw_roz(bitmap_ind16 &bitmap, bitmap_ind8& bitmapflags, const rectangle &cliprect, tilemap_t *tmap, UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound, int columnscroll, UINT32* scrollram); + TIMER_DEVICE_CALLBACK_MEMBER(irq); + void draw_roz(bitmap_ind16 &bitmap, bitmap_ind8& bitmapflags, const rectangle &cliprect, tilemap_t *tmap, UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound, int columnscroll, UINT32* scrollram); void palette_set_rgb_brightness (int offset, UINT8 brightness_r, UINT8 brightness_g, UINT8 brightness_b); void palette_update(); - void supernova_draw_a( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran ); - void supernova_draw_b( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran ); + void draw_a( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran ); + void draw_b( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran ); void hit_recalc(); - void init_skns(); + void init_drc(); void set_drc_pcflush(UINT32 addr); }; diff --git a/src/mame/video/suprnova.cpp b/src/mame/video/suprnova.cpp index ecacd5b26be..5e4249470fa 100644 --- a/src/mame/video/suprnova.cpp +++ b/src/mame/video/suprnova.cpp @@ -8,7 +8,7 @@ /* draws ROZ with linescroll OR columnscroll to 16-bit indexed bitmap */ -void skns_state::suprnova_draw_roz(bitmap_ind16 &bitmap, bitmap_ind8& bitmapflags, const rectangle &cliprect, tilemap_t *tmap, UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound, int columnscroll, UINT32* scrollram) +void skns_state::draw_roz(bitmap_ind16 &bitmap, bitmap_ind8& bitmapflags, const rectangle &cliprect, tilemap_t *tmap, UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound, int columnscroll, UINT32* scrollram) { //bitmap_ind16 *destbitmap = bitmap; bitmap_ind16 &srcbitmap = tmap->pixmap(); @@ -89,7 +89,7 @@ void skns_state::suprnova_draw_roz(bitmap_ind16 &bitmap, bitmap_ind8& bitmapflag } -WRITE32_MEMBER(skns_state::skns_pal_regs_w) +WRITE32_MEMBER(skns_state::pal_regs_w) { COMBINE_DATA(&m_pal_regs[offset]); m_palette_updated =1; @@ -176,7 +176,7 @@ WRITE32_MEMBER(skns_state::skns_pal_regs_w) } -WRITE32_MEMBER(skns_state::skns_palette_ram_w) +WRITE32_MEMBER(skns_state::palette_ram_w) { int r,g,b; int brightness_r, brightness_g, brightness_b/*, alpha*/; @@ -291,7 +291,7 @@ TILE_GET_INFO_MEMBER(skns_state::get_tilemap_A_tile_info) //if (pri) popmessage("pri A!! %02x\n", pri); } -WRITE32_MEMBER(skns_state::skns_tilemapA_w) +WRITE32_MEMBER(skns_state::tilemapA_w) { COMBINE_DATA(&m_tilemapA_ram[offset]); m_tilemap_A->mark_tile_dirty(offset); @@ -317,13 +317,13 @@ TILE_GET_INFO_MEMBER(skns_state::get_tilemap_B_tile_info) //if (pri) popmessage("pri B!! %02x\n", pri); // 02 on cyvern } -WRITE32_MEMBER(skns_state::skns_tilemapB_w) +WRITE32_MEMBER(skns_state::tilemapB_w) { COMBINE_DATA(&m_tilemapB_ram[offset]); m_tilemap_B->mark_tile_dirty(offset); } -WRITE32_MEMBER(skns_state::skns_v3_regs_w) +WRITE32_MEMBER(skns_state::v3_regs_w) { COMBINE_DATA(&m_v3_regs[offset]); @@ -361,6 +361,29 @@ void skns_state::video_start() m_gfxdecode->gfx(2)->set_granularity(256); m_gfxdecode->gfx(3)->set_granularity(256); + + + save_item(NAME(m_depthA)); + save_item(NAME(m_depthB)); + save_item(NAME(m_use_spc_bright)); + save_item(NAME(m_use_v3_bright)); + save_item(NAME(m_bright_spc_b)); + save_item(NAME(m_bright_spc_g)); + save_item(NAME(m_bright_spc_r)); + save_item(NAME(m_bright_spc_b_trans)); + save_item(NAME(m_bright_spc_g_trans)); + save_item(NAME(m_bright_spc_r_trans)); + save_item(NAME(m_bright_v3_b)); + save_item(NAME(m_bright_v3_g)); + save_item(NAME(m_bright_v3_r)); + save_item(NAME(m_bright_v3_b_trans)); + save_item(NAME(m_bright_v3_g_trans)); + save_item(NAME(m_bright_v3_r_trans)); + save_item(NAME(m_spc_changed)); + save_item(NAME(m_v3_changed)); + save_item(NAME(m_palette_updated)); + save_item(NAME(m_alt_enable_background)); + save_item(NAME(m_alt_enable_sprites)); } void skns_state::video_reset() @@ -376,7 +399,7 @@ void skns_state::video_reset() m_alt_enable_background = m_alt_enable_sprites = 1; } -void skns_state::supernova_draw_a( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran ) +void skns_state::draw_a( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran ) { int enable_a = (m_v3_regs[0x10/4] >> 0) & 0x0001; int nowrap_a = (m_v3_regs[0x10/4] >> 0) & 0x0004; @@ -401,12 +424,12 @@ void skns_state::supernova_draw_a( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_fla columnscroll = (m_v3_regs[0x0c/4] >> 1) & 0x0001; - suprnova_draw_roz(bitmap,bitmap_flags,cliprect, m_tilemap_A, startx << 8,starty << 8, incxx << 8,incxy << 8,incyx << 8,incyy << 8, !nowrap_a, columnscroll, &m_v3slc_ram[0]); + draw_roz(bitmap,bitmap_flags,cliprect, m_tilemap_A, startx << 8,starty << 8, incxx << 8,incxy << 8,incyx << 8,incyy << 8, !nowrap_a, columnscroll, &m_v3slc_ram[0]); //tilemap_copy_bitmap(bitmap, m_tilemap_bitmap_lower, m_tilemap_bitmapflags_lower); } } -void skns_state::supernova_draw_b( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran ) +void skns_state::draw_b( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_flags, const rectangle &cliprect, int tran ) { int enable_b = (m_v3_regs[0x34/4] >> 0) & 0x0001; int nowrap_b = (m_v3_regs[0x34/4] >> 0) & 0x0004; @@ -429,14 +452,14 @@ void skns_state::supernova_draw_b( bitmap_ind16 &bitmap, bitmap_ind8 &bitmap_fla incxx = m_v3_regs[0x48/4]&0x7ffff; if (incxx&0x40000) incxx = incxx-0x80000; columnscroll = (m_v3_regs[0x0c/4] >> 9) & 0x0001; // selects column scroll or rowscroll - suprnova_draw_roz(bitmap,bitmap_flags, cliprect, m_tilemap_B, startx << 8,starty << 8, incxx << 8,incxy << 8,incyx << 8,incyy << 8, !nowrap_b, columnscroll, &m_v3slc_ram[0x1000/4]); + draw_roz(bitmap,bitmap_flags, cliprect, m_tilemap_B, startx << 8,starty << 8, incxx << 8,incxy << 8,incyx << 8,incyy << 8, !nowrap_b, columnscroll, &m_v3slc_ram[0x1000/4]); //popmessage("%08x %08x %08x %08x %08x %08x", startx, starty, incxx, incyy, incxy, incyx); } } -UINT32 skns_state::screen_update_skns(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +UINT32 skns_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { palette_update(); @@ -457,8 +480,8 @@ UINT32 skns_state::screen_update_skns(screen_device &screen, bitmap_rgb32 &bitma //popmessage("pri %d %d\n", supernova_pri_a, supernova_pri_b); /*if (!supernova_pri_b) { */ - supernova_draw_b(m_tilemap_bitmap_lower, m_tilemap_bitmapflags_lower, cliprect,tran);// tran = 1; - supernova_draw_a(m_tilemap_bitmap_higher,m_tilemap_bitmapflags_higher,cliprect,tran);// tran = 1; + draw_b(m_tilemap_bitmap_lower, m_tilemap_bitmapflags_lower, cliprect,tran);// tran = 1; + draw_a(m_tilemap_bitmap_higher,m_tilemap_bitmapflags_higher,cliprect,tran);// tran = 1; { int x,y; @@ -615,7 +638,3 @@ UINT32 skns_state::screen_update_skns(screen_device &screen, bitmap_rgb32 &bitma return 0; } - -void skns_state::screen_eof_skns(screen_device &screen, bool state) -{ -} -- cgit v1.2.3-70-g09d2 From 7dd36aaf2f6611ff9b0fcab787d7ea68d30ea7f6 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 4 Mar 2016 20:02:46 +0100 Subject: fix validation (nw) --- src/mame/drivers/mmodular.cpp | 2 +- src/mame/drivers/svi318.cpp | 64 +++++++++++++++++++++---------------------- 2 files changed, 33 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/mmodular.cpp b/src/mame/drivers/mmodular.cpp index 49b873382cc..16d469baa25 100644 --- a/src/mame/drivers/mmodular.cpp +++ b/src/mame/drivers/mmodular.cpp @@ -126,7 +126,7 @@ public: m_beeper(*this, "beeper") { } - required_device m_maincpu; + required_device m_maincpu; optional_device m_lcdc; optional_device m_beeper; diff --git a/src/mame/drivers/svi318.cpp b/src/mame/drivers/svi318.cpp index a4ef4afe235..4a6396cb80a 100644 --- a/src/mame/drivers/svi318.cpp +++ b/src/mame/drivers/svi318.cpp @@ -50,7 +50,7 @@ public: m_fd1793(*this, "wd179x"), m_floppy0(*this, "wd179x:0"), m_floppy1(*this, "wd179x:1"), - m_crtc(*this, "crtc"), +// m_crtc(*this, "crtc"), m_line(*this, "LINE"), m_joysticks(*this, "JOYSTICKS"), m_buttons(*this, "BUTTONS"), @@ -85,7 +85,7 @@ protected: required_device m_fd1793; required_device m_floppy0; required_device m_floppy1; - optional_device m_crtc; + //optional_device m_crtc; required_ioport_array<11> m_line; required_ioport m_joysticks; required_ioport m_buttons; @@ -115,10 +115,10 @@ static ADDRESS_MAP_START( svi318_io, AS_IO, 8, svi318_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) //AM_RANGE(0x00, 0x38) AM_READWRITE(io_ext_r, io_ext_w ) - AM_RANGE(0x80, 0x80) AM_DEVWRITE("tms9928a", tms9928a_device, vram_write) - AM_RANGE(0x81, 0x81) AM_DEVWRITE("tms9928a", tms9928a_device, register_write) - AM_RANGE(0x84, 0x84) AM_DEVREAD("tms9928a", tms9928a_device, vram_read) - AM_RANGE(0x85, 0x85) AM_DEVREAD("tms9928a", tms9928a_device, register_read) + //AM_RANGE(0x80, 0x80) AM_DEVWRITE("tms9928a", tms9928a_device, vram_write) + //AM_RANGE(0x81, 0x81) AM_DEVWRITE("tms9928a", tms9928a_device, register_write) + //AM_RANGE(0x84, 0x84) AM_DEVREAD("tms9928a", tms9928a_device, vram_read) + //AM_RANGE(0x85, 0x85) AM_DEVREAD("tms9928a", tms9928a_device, register_read) AM_RANGE(0x88, 0x88) AM_DEVWRITE("ay8910", ay8910_device, address_w) AM_RANGE(0x8c, 0x8c) AM_DEVWRITE("ay8910", ay8910_device, data_w) AM_RANGE(0x90, 0x90) AM_DEVREAD("ay8910", ay8910_device, data_r) @@ -130,10 +130,10 @@ static ADDRESS_MAP_START( svi328_806_io, AS_IO, 8, svi318_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) //AM_RANGE(0x00, 0x58) AM_READWRITE(io_ext_r, io_ext_w ) - AM_RANGE(0x80, 0x80) AM_DEVWRITE("tms9928a", tms9928a_device, vram_write) - AM_RANGE(0x81, 0x81) AM_DEVWRITE("tms9928a", tms9928a_device, register_write) - AM_RANGE(0x84, 0x84) AM_DEVREAD("tms9928a", tms9928a_device, vram_read) - AM_RANGE(0x85, 0x85) AM_DEVREAD("tms9928a", tms9928a_device, register_read) + //AM_RANGE(0x80, 0x80) AM_DEVWRITE("tms9928a", tms9928a_device, vram_write) + //AM_RANGE(0x81, 0x81) AM_DEVWRITE("tms9928a", tms9928a_device, register_write) + //AM_RANGE(0x84, 0x84) AM_DEVREAD("tms9928a", tms9928a_device, vram_read) + //AM_RANGE(0x85, 0x85) AM_DEVREAD("tms9928a", tms9928a_device, register_read) AM_RANGE(0x88, 0x88) AM_DEVWRITE("ay8910", ay8910_device, address_w) AM_RANGE(0x8c, 0x8c) AM_DEVWRITE("ay8910", ay8910_device, data_w) AM_RANGE(0x90, 0x90) AM_DEVREAD("ay8910", ay8910_device, data_r) @@ -360,10 +360,10 @@ static MACHINE_CONFIG_START( svi318, svi318_state ) //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) /* Video hardware */ - MCFG_DEVICE_ADD("tms9928a", TMS9929A, XTAL_10_738635MHz / 2) - MCFG_TMS9928A_VRAM_SIZE(0x4000) + //MCFG_DEVICE_ADD("tms9928a", TMS9929A, XTAL_10_738635MHz / 2) + //MCFG_TMS9928A_VRAM_SIZE(0x4000) //MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt)) - MCFG_TMS9928A_SCREEN_ADD_PAL("screen") + //MCFG_TMS9928A_SCREEN_ADD_PAL("screen") //MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9929a_device, screen_update) /* Sound hardware */ @@ -409,12 +409,12 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( svi318n, svi318 ) - MCFG_DEVICE_REMOVE("tms9928a") - MCFG_DEVICE_REMOVE("screen") - MCFG_DEVICE_ADD("tms9928a", TMS9928A, XTAL_10_738635MHz / 2) - MCFG_TMS9928A_VRAM_SIZE(0x4000) + //MCFG_DEVICE_REMOVE("tms9928a") + //MCFG_DEVICE_REMOVE("screen") + //MCFG_DEVICE_ADD("tms9928a", TMS9928A, XTAL_10_738635MHz / 2) + //MCFG_TMS9928A_VRAM_SIZE(0x4000) //MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt)) - MCFG_TMS9928A_SCREEN_ADD_NTSC("screen") + //MCFG_TMS9928A_SCREEN_ADD_NTSC("screen") //MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9928a_device, screen_update) MACHINE_CONFIG_END @@ -473,26 +473,26 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state ) /* Video hardware */ MCFG_DEFAULT_LAYOUT(layout_dualhsxs) - MCFG_DEVICE_ADD("tms9928a", TMS9929A, XTAL_10_738635MHz / 2) - MCFG_TMS9928A_VRAM_SIZE(0x4000) + //MCFG_DEVICE_ADD("tms9928a", TMS9929A, XTAL_10_738635MHz / 2) + //MCFG_TMS9928A_VRAM_SIZE(0x4000) //MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt)) - MCFG_TMS9928A_SET_SCREEN("screen") - MCFG_TMS9928A_SCREEN_ADD_PAL("screen") + //MCFG_TMS9928A_SET_SCREEN("screen") + //MCFG_TMS9928A_SCREEN_ADD_PAL("screen") //MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9929a_device, screen_update) MCFG_PALETTE_ADD("palette", TMS9928A_PALETTE_SIZE + 2) /* 2 additional entries for monochrome svi806 output */ - MCFG_SCREEN_ADD("svi806", RASTER) - MCFG_SCREEN_REFRESH_RATE(50) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) - MCFG_SCREEN_SIZE(640, 400) - MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1) + //MCFG_SCREEN_ADD("svi806", RASTER) + //MCFG_SCREEN_REFRESH_RATE(50) + //MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) + //MCFG_SCREEN_SIZE(640, 400) + //MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1) //MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_GFXDECODE_ADD("gfxdecode", "palette", svi328) - MCFG_MC6845_ADD("crtc", MC6845, "svi806", XTAL_12MHz / 8) - MCFG_MC6845_SHOW_BORDER_AREA(false) - MCFG_MC6845_CHAR_WIDTH(8) /* ? */ + //MCFG_MC6845_ADD("crtc", MC6845, "svi806", XTAL_12MHz / 8) + //MCFG_MC6845_SHOW_BORDER_AREA(false) + //MCFG_MC6845_CHAR_WIDTH(8) /* ? */ //MCFG_MC6845_UPDATE_ROW_CB(svi318_state, crtc_update_row) /* Sound hardware */ @@ -538,8 +538,8 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( svi328n_806, svi328_806 ) - MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_REFRESH_RATE(60) + //MCFG_SCREEN_MODIFY("screen") + //MCFG_SCREEN_REFRESH_RATE(60) MACHINE_CONFIG_END /*************************************************************************** -- cgit v1.2.3-70-g09d2 From 24276fc7dbf8090f1952cf9ac97cb109a32e3b33 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 4 Mar 2016 20:18:47 +0100 Subject: removed Apache 2 licensed library since it is not possible to mix with GPL2 (nw) --- 3rdparty/README.md | 4 +- 3rdparty/luv/.ci/install.bat | 270 ---- 3rdparty/luv/.ci/platform.sh | 15 - 3rdparty/luv/.ci/set_compiler_env.bat | 40 - 3rdparty/luv/.ci/setenv_lua.sh | 3 - 3rdparty/luv/.ci/setup_lua.sh | 122 -- 3rdparty/luv/.ci/winmake.bat | 457 ------- 3rdparty/luv/.gitignore | 10 - 3rdparty/luv/.travis.yml | 36 - 3rdparty/luv/CMakeLists.txt | 191 --- 3rdparty/luv/LICENSE.txt | 202 --- 3rdparty/luv/Makefile | 61 - 3rdparty/luv/README.md | 213 ---- 3rdparty/luv/appveyor.yml | 42 - 3rdparty/luv/cmake/Modules/FindLibuv.cmake | 11 - 3rdparty/luv/cmake/Modules/FindLuaJIT.cmake | 55 - 3rdparty/luv/deps/lua.cmake | 128 -- 3rdparty/luv/deps/lua_one.c | 97 -- 3rdparty/luv/deps/luajit.cmake | 407 ------ 3rdparty/luv/deps/uv.cmake | 224 ---- 3rdparty/luv/docs.md | 1309 -------------------- 3rdparty/luv/examples/cqueues-main.lua | 31 - 3rdparty/luv/examples/cqueues-slave.lua | 55 - 3rdparty/luv/examples/echo-server-client.lua | 68 - 3rdparty/luv/examples/killing-children.lua | 24 - 3rdparty/luv/examples/lots-o-dns.lua | 49 - 3rdparty/luv/examples/repl.lua | 89 -- 3rdparty/luv/examples/talking-to-children.lua | 47 - 3rdparty/luv/examples/tcp-cluster.lua | 84 -- 3rdparty/luv/examples/timers.lua | 68 - 3rdparty/luv/examples/uvbook/helloworld.lua | 5 - 3rdparty/luv/examples/uvbook/idle-basic.lua | 14 - 3rdparty/luv/examples/uvbook/onchange.lua | 30 - 3rdparty/luv/examples/uvbook/queue-work.lua | 19 - 3rdparty/luv/examples/uvbook/tcp-echo-client.lua | 21 - 3rdparty/luv/examples/uvbook/tcp-echo-server.lua | 22 - 3rdparty/luv/examples/uvbook/thread-create.lua | 38 - 3rdparty/luv/examples/uvbook/uvcat.lua | 37 - 3rdparty/luv/examples/uvbook/uvtee.lua | 35 - 3rdparty/luv/lib/tap.lua | 165 --- 3rdparty/luv/lib/utils.lua | 165 --- 3rdparty/luv/luv-1.8.0-4.rockspec | 34 - 3rdparty/luv/msvcbuild.bat | 13 - 3rdparty/luv/src/async.c | 63 - 3rdparty/luv/src/check.c | 59 - 3rdparty/luv/src/constants.c | 649 ---------- 3rdparty/luv/src/dns.c | 296 ----- 3rdparty/luv/src/fs.c | 614 --------- 3rdparty/luv/src/fs_event.c | 97 -- 3rdparty/luv/src/fs_poll.c | 90 -- 3rdparty/luv/src/handle.c | 173 --- 3rdparty/luv/src/idle.c | 59 - 3rdparty/luv/src/lhandle.c | 116 -- 3rdparty/luv/src/lhandle.h | 67 - 3rdparty/luv/src/loop.c | 92 -- 3rdparty/luv/src/lreq.c | 71 -- 3rdparty/luv/src/lreq.h | 43 - 3rdparty/luv/src/lthreadpool.h | 48 - 3rdparty/luv/src/luv.c | 519 -------- 3rdparty/luv/src/luv.h | 109 -- 3rdparty/luv/src/misc.c | 316 ----- 3rdparty/luv/src/pipe.c | 114 -- 3rdparty/luv/src/poll.c | 100 -- 3rdparty/luv/src/prepare.c | 59 - 3rdparty/luv/src/process.c | 266 ---- 3rdparty/luv/src/req.c | 52 - 3rdparty/luv/src/schema.c | 16 - 3rdparty/luv/src/signal.c | 72 -- 3rdparty/luv/src/stream.c | 263 ---- 3rdparty/luv/src/tcp.c | 182 --- 3rdparty/luv/src/thread.c | 353 ------ 3rdparty/luv/src/timer.c | 84 -- 3rdparty/luv/src/tty.c | 65 - 3rdparty/luv/src/udp.c | 260 ---- 3rdparty/luv/src/util.c | 56 - 3rdparty/luv/src/util.h | 26 - 3rdparty/luv/src/work.c | 224 ---- 3rdparty/luv/tests/manual-test-cluster.lua | 213 ---- 3rdparty/luv/tests/run.lua | 33 - 3rdparty/luv/tests/test-async.lua | 32 - 3rdparty/luv/tests/test-conversions.lua | 6 - 3rdparty/luv/tests/test-dns.lua | 125 -- 3rdparty/luv/tests/test-fs.lua | 90 -- 3rdparty/luv/tests/test-leaks.lua | 186 --- 3rdparty/luv/tests/test-misc.lua | 85 -- .../luv/tests/test-prepare-check-idle-async.lua | 49 - 3rdparty/luv/tests/test-process.lua | 101 -- 3rdparty/luv/tests/test-sigchld-after-lua_close.sh | 45 - 3rdparty/luv/tests/test-signal.lua | 40 - 3rdparty/luv/tests/test-tcp.lua | 114 -- 3rdparty/luv/tests/test-thread.lua | 47 - 3rdparty/luv/tests/test-timer.lua | 87 -- 3rdparty/luv/tests/test-work.lua | 48 - plugins/coro-channel/LICENSE | 22 - plugins/coro-channel/README.md | 2 - plugins/coro-channel/init.lua | 128 -- plugins/coro-channel/plugin.json | 8 - plugins/coro-fs/LICENSE | 22 - plugins/coro-fs/README.md | 2 - plugins/coro-fs/init.lua | 222 ---- plugins/coro-fs/plugin.json | 8 - plugins/coro-http/LICENSE | 22 - plugins/coro-http/README.md | 2 - plugins/coro-http/init.lua | 187 --- plugins/coro-http/plugin.json | 8 - plugins/coro-net/LICENSE | 22 - plugins/coro-net/README.md | 2 - plugins/coro-net/init.lua | 113 -- plugins/coro-net/plugin.json | 8 - plugins/coro-tls/LICENSE | 22 - plugins/coro-tls/README.md | 2 - plugins/coro-tls/init.lua | 122 -- plugins/coro-tls/plugin.json | 8 - plugins/coro-wrapper/LICENSE | 22 - plugins/coro-wrapper/README.md | 2 - plugins/coro-wrapper/init.lua | 41 - plugins/coro-wrapper/plugin.json | 8 - plugins/http-codec/LICENSE | 202 --- plugins/http-codec/README.md | 2 - plugins/http-codec/init.lua | 291 ----- plugins/http-codec/plugin.json | 8 - plugins/mime/LICENSE | 22 - plugins/mime/README.md | 2 - plugins/mime/init.lua | 194 --- plugins/mime/plugin.json | 8 - plugins/path/LICENSE | 202 --- plugins/path/README.md | 2 - plugins/path/init.lua | 139 --- plugins/path/plugin.json | 8 - plugins/pretty-print/LICENSE | 202 --- plugins/pretty-print/README.md | 2 - plugins/pretty-print/init.lua | 362 ------ plugins/pretty-print/plugin.json | 8 - plugins/querystring/LICENSE | 202 --- plugins/querystring/README.md | 2 - plugins/querystring/init.lua | 105 -- plugins/querystring/plugin.json | 8 - plugins/weblit/LICENSE | 22 - plugins/weblit/README.md | 239 ---- plugins/weblit/app.lua | 261 ---- plugins/weblit/auto-headers.lua | 92 -- plugins/weblit/etag-cache.lua | 39 - plugins/weblit/init.lua | 8 - plugins/weblit/logger.lua | 10 - plugins/weblit/plugin.json | 8 - plugins/weblit/static.lua | 62 - plugins/weblit/websocket.lua | 82 -- plugins/webserver/init.lua | 34 - plugins/webserver/plugin.json | 9 - plugins/websocket-codec/LICENSE | 22 - plugins/websocket-codec/README.md | 2 - plugins/websocket-codec/init.lua | 261 ---- plugins/websocket-codec/plugin.json | 8 - scripts/src/3rdparty.lua | 58 - scripts/src/main.lua | 1 - src/emu/luaengine.cpp | 18 - 156 files changed, 1 insertion(+), 16195 deletions(-) delete mode 100644 3rdparty/luv/.ci/install.bat delete mode 100644 3rdparty/luv/.ci/platform.sh delete mode 100644 3rdparty/luv/.ci/set_compiler_env.bat delete mode 100644 3rdparty/luv/.ci/setenv_lua.sh delete mode 100644 3rdparty/luv/.ci/setup_lua.sh delete mode 100644 3rdparty/luv/.ci/winmake.bat delete mode 100644 3rdparty/luv/.gitignore delete mode 100644 3rdparty/luv/.travis.yml delete mode 100644 3rdparty/luv/CMakeLists.txt delete mode 100644 3rdparty/luv/LICENSE.txt delete mode 100644 3rdparty/luv/Makefile delete mode 100644 3rdparty/luv/README.md delete mode 100644 3rdparty/luv/appveyor.yml delete mode 100644 3rdparty/luv/cmake/Modules/FindLibuv.cmake delete mode 100644 3rdparty/luv/cmake/Modules/FindLuaJIT.cmake delete mode 100644 3rdparty/luv/deps/lua.cmake delete mode 100644 3rdparty/luv/deps/lua_one.c delete mode 100644 3rdparty/luv/deps/luajit.cmake delete mode 100644 3rdparty/luv/deps/uv.cmake delete mode 100644 3rdparty/luv/docs.md delete mode 100644 3rdparty/luv/examples/cqueues-main.lua delete mode 100644 3rdparty/luv/examples/cqueues-slave.lua delete mode 100644 3rdparty/luv/examples/echo-server-client.lua delete mode 100644 3rdparty/luv/examples/killing-children.lua delete mode 100644 3rdparty/luv/examples/lots-o-dns.lua delete mode 100644 3rdparty/luv/examples/repl.lua delete mode 100644 3rdparty/luv/examples/talking-to-children.lua delete mode 100644 3rdparty/luv/examples/tcp-cluster.lua delete mode 100644 3rdparty/luv/examples/timers.lua delete mode 100644 3rdparty/luv/examples/uvbook/helloworld.lua delete mode 100644 3rdparty/luv/examples/uvbook/idle-basic.lua delete mode 100644 3rdparty/luv/examples/uvbook/onchange.lua delete mode 100644 3rdparty/luv/examples/uvbook/queue-work.lua delete mode 100644 3rdparty/luv/examples/uvbook/tcp-echo-client.lua delete mode 100644 3rdparty/luv/examples/uvbook/tcp-echo-server.lua delete mode 100644 3rdparty/luv/examples/uvbook/thread-create.lua delete mode 100644 3rdparty/luv/examples/uvbook/uvcat.lua delete mode 100644 3rdparty/luv/examples/uvbook/uvtee.lua delete mode 100644 3rdparty/luv/lib/tap.lua delete mode 100644 3rdparty/luv/lib/utils.lua delete mode 100644 3rdparty/luv/luv-1.8.0-4.rockspec delete mode 100644 3rdparty/luv/msvcbuild.bat delete mode 100644 3rdparty/luv/src/async.c delete mode 100644 3rdparty/luv/src/check.c delete mode 100644 3rdparty/luv/src/constants.c delete mode 100644 3rdparty/luv/src/dns.c delete mode 100644 3rdparty/luv/src/fs.c delete mode 100644 3rdparty/luv/src/fs_event.c delete mode 100644 3rdparty/luv/src/fs_poll.c delete mode 100644 3rdparty/luv/src/handle.c delete mode 100644 3rdparty/luv/src/idle.c delete mode 100644 3rdparty/luv/src/lhandle.c delete mode 100644 3rdparty/luv/src/lhandle.h delete mode 100644 3rdparty/luv/src/loop.c delete mode 100644 3rdparty/luv/src/lreq.c delete mode 100644 3rdparty/luv/src/lreq.h delete mode 100644 3rdparty/luv/src/lthreadpool.h delete mode 100644 3rdparty/luv/src/luv.c delete mode 100644 3rdparty/luv/src/luv.h delete mode 100644 3rdparty/luv/src/misc.c delete mode 100644 3rdparty/luv/src/pipe.c delete mode 100644 3rdparty/luv/src/poll.c delete mode 100644 3rdparty/luv/src/prepare.c delete mode 100644 3rdparty/luv/src/process.c delete mode 100644 3rdparty/luv/src/req.c delete mode 100644 3rdparty/luv/src/schema.c delete mode 100644 3rdparty/luv/src/signal.c delete mode 100644 3rdparty/luv/src/stream.c delete mode 100644 3rdparty/luv/src/tcp.c delete mode 100644 3rdparty/luv/src/thread.c delete mode 100644 3rdparty/luv/src/timer.c delete mode 100644 3rdparty/luv/src/tty.c delete mode 100644 3rdparty/luv/src/udp.c delete mode 100644 3rdparty/luv/src/util.c delete mode 100644 3rdparty/luv/src/util.h delete mode 100644 3rdparty/luv/src/work.c delete mode 100644 3rdparty/luv/tests/manual-test-cluster.lua delete mode 100644 3rdparty/luv/tests/run.lua delete mode 100644 3rdparty/luv/tests/test-async.lua delete mode 100644 3rdparty/luv/tests/test-conversions.lua delete mode 100644 3rdparty/luv/tests/test-dns.lua delete mode 100644 3rdparty/luv/tests/test-fs.lua delete mode 100644 3rdparty/luv/tests/test-leaks.lua delete mode 100644 3rdparty/luv/tests/test-misc.lua delete mode 100644 3rdparty/luv/tests/test-prepare-check-idle-async.lua delete mode 100644 3rdparty/luv/tests/test-process.lua delete mode 100644 3rdparty/luv/tests/test-sigchld-after-lua_close.sh delete mode 100644 3rdparty/luv/tests/test-signal.lua delete mode 100644 3rdparty/luv/tests/test-tcp.lua delete mode 100644 3rdparty/luv/tests/test-thread.lua delete mode 100644 3rdparty/luv/tests/test-timer.lua delete mode 100644 3rdparty/luv/tests/test-work.lua delete mode 100644 plugins/coro-channel/LICENSE delete mode 100644 plugins/coro-channel/README.md delete mode 100644 plugins/coro-channel/init.lua delete mode 100644 plugins/coro-channel/plugin.json delete mode 100644 plugins/coro-fs/LICENSE delete mode 100644 plugins/coro-fs/README.md delete mode 100644 plugins/coro-fs/init.lua delete mode 100644 plugins/coro-fs/plugin.json delete mode 100644 plugins/coro-http/LICENSE delete mode 100644 plugins/coro-http/README.md delete mode 100644 plugins/coro-http/init.lua delete mode 100644 plugins/coro-http/plugin.json delete mode 100644 plugins/coro-net/LICENSE delete mode 100644 plugins/coro-net/README.md delete mode 100644 plugins/coro-net/init.lua delete mode 100644 plugins/coro-net/plugin.json delete mode 100644 plugins/coro-tls/LICENSE delete mode 100644 plugins/coro-tls/README.md delete mode 100644 plugins/coro-tls/init.lua delete mode 100644 plugins/coro-tls/plugin.json delete mode 100644 plugins/coro-wrapper/LICENSE delete mode 100644 plugins/coro-wrapper/README.md delete mode 100644 plugins/coro-wrapper/init.lua delete mode 100644 plugins/coro-wrapper/plugin.json delete mode 100644 plugins/http-codec/LICENSE delete mode 100644 plugins/http-codec/README.md delete mode 100644 plugins/http-codec/init.lua delete mode 100644 plugins/http-codec/plugin.json delete mode 100644 plugins/mime/LICENSE delete mode 100644 plugins/mime/README.md delete mode 100644 plugins/mime/init.lua delete mode 100644 plugins/mime/plugin.json delete mode 100644 plugins/path/LICENSE delete mode 100644 plugins/path/README.md delete mode 100644 plugins/path/init.lua delete mode 100644 plugins/path/plugin.json delete mode 100644 plugins/pretty-print/LICENSE delete mode 100644 plugins/pretty-print/README.md delete mode 100644 plugins/pretty-print/init.lua delete mode 100644 plugins/pretty-print/plugin.json delete mode 100644 plugins/querystring/LICENSE delete mode 100644 plugins/querystring/README.md delete mode 100644 plugins/querystring/init.lua delete mode 100644 plugins/querystring/plugin.json delete mode 100644 plugins/weblit/LICENSE delete mode 100644 plugins/weblit/README.md delete mode 100644 plugins/weblit/app.lua delete mode 100644 plugins/weblit/auto-headers.lua delete mode 100644 plugins/weblit/etag-cache.lua delete mode 100644 plugins/weblit/init.lua delete mode 100644 plugins/weblit/logger.lua delete mode 100644 plugins/weblit/plugin.json delete mode 100644 plugins/weblit/static.lua delete mode 100644 plugins/weblit/websocket.lua delete mode 100644 plugins/webserver/init.lua delete mode 100644 plugins/webserver/plugin.json delete mode 100644 plugins/websocket-codec/LICENSE delete mode 100644 plugins/websocket-codec/README.md delete mode 100644 plugins/websocket-codec/init.lua delete mode 100644 plugins/websocket-codec/plugin.json (limited to 'src') diff --git a/3rdparty/README.md b/3rdparty/README.md index 0d8c4a47706..70cdf28de92 100644 --- a/3rdparty/README.md +++ b/3rdparty/README.md @@ -1,6 +1,6 @@ # **3rdparty** # -benchmark - [Apache License, Version 2.0](http://opensource.org/licenses/Apache-2.0) +benchmark - [Apache License, Version 2.0](http://opensource.org/licenses/Apache-2.0) (used only for testing, not part of distribution) bgfx - [The BSD 2-Clause License](http://opensource.org/licenses/BSD-2-Clause) @@ -32,8 +32,6 @@ luabridge - [The MIT License (MIT)](http://opensource.org/licenses/MIT) luafilesystem - [The MIT License (MIT)](http://opensource.org/licenses/MIT) -luv - [Apache License, Version 2.0](http://opensource.org/licenses/Apache-2.0) - lzma - [The GNU Lesser General Public License](http://opensource.org/licenses/LGPL-2.1) portaudio - [Custom license](http://www.portaudio.com/license.html) diff --git a/3rdparty/luv/.ci/install.bat b/3rdparty/luv/.ci/install.bat deleted file mode 100644 index 1ee346dccc9..00000000000 --- a/3rdparty/luv/.ci/install.bat +++ /dev/null @@ -1,270 +0,0 @@ -@echo off - -cd %APPVEYOR_BUILD_FOLDER% - -:: ========================================================= -:: Set some defaults. Infer some variables. -:: -:: These are set globally -if "%LUA_VER%" NEQ "" ( - set LUA=lua - set LUA_SHORTV=%LUA_VER:~0,3% -) else ( - set LUA=luajit - set LJ_SHORTV=%LJ_VER:~0,3% - set LUA_SHORTV=5.1 -) - -:: defines LUA_DIR so Cmake can find this Lua install -if "%LUA%"=="luajit" ( - set LUA_DIR=c:\lua\%platform%\lj%LJ_SHORTV% -) else ( - set LUA_DIR=c:\lua\%platform%\%LUA_VER% -) - -:: Now we declare a scope -Setlocal EnableDelayedExpansion EnableExtensions - -if not defined LUAROCKS_URL set LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases -if not defined LUAROCKS_REPO set LUAROCKS_REPO=https://luarocks.org -if not defined LUA_URL set LUA_URL=http://www.lua.org/ftp -if defined NOCOMPAT ( - set COMPATFLAG=--nocompat -) else ( - set COMPATFLAG= -) -if not defined LUAJIT_GIT_REPO set LUAJIT_GIT_REPO=https://github.com/LuaJIT/LuaJIT.git -if not defined LUAJIT_URL set LUAJIT_URL=https://github.com/LuaJIT/LuaJIT/archive - -if not defined LR_EXTERNAL set LR_EXTERNAL=c:\external -if not defined LUAROCKS_INSTALL set LUAROCKS_INSTALL=%LUA_DIR%\LuaRocks - - -:: LuaRocks <= 2.2.2 used a versioned directory -:: HEAD and newer versions do not, so act accordingly. -if defined LR_ROOT goto :skiplrver - -if "%LUAROCKS_VER%" EQU "HEAD" ( - set LR_ROOT=%LUAROCKS_INSTALL% - goto :skiplrver -) -set LR_ROOT=%LUAROCKS_INSTALL% -if %LUAROCKS_VER:~0,1% LEQ 2 ( - if %LUAROCKS_VER:~2,1% LEQ 2 ( - if %LUAROCKS_VER:~4,1% LEQ 3 ( - set LR_ROOT=%LUAROCKS_INSTALL%\!LUAROCKS_VER:~0,3! - ) - ) -) -:skiplrver - -if not defined LR_SYSTREE set LR_SYSTREE=%LUAROCKS_INSTALL%\systree - -if not defined SEVENZIP set SEVENZIP=7z -:: -:: ========================================================= - -:: first create some necessary directories: -mkdir downloads 2>NUL - -:: Download and compile Lua (or LuaJIT) -if "%LUA%"=="luajit" ( - if not exist %LUA_DIR% ( - if "%LJ_SHORTV%"=="2.1" ( - :: Clone repository and checkout 2.1 branch - set lj_source_folder=%APPVEYOR_BUILD_FOLDER%\downloads\luajit-%LJ_VER% - if not exist !lj_source_folder! ( - echo Cloning git repo %LUAJIT_GIT_REPO% !lj_source_folder! - git clone %LUAJIT_GIT_REPO% !lj_source_folder! || call :die "Failed to clone repository" - ) else ( - cd !lj_source_folder! - git pull || call :die "Failed to update repository" - ) - cd !lj_source_folder!\src - git checkout v2.1 || call :die - ) else ( - set lj_source_folder=%APPVEYOR_BUILD_FOLDER%\downloads\luajit-%LJ_VER% - if not exist !lj_source_folder! ( - echo Downloading... %LUAJIT_URL%/v%LJ_VER%.tar.gz - curl --location --silent --fail --max-time 120 --connect-timeout 30 %LUAJIT_URL%/v%LJ_VER%.tar.gz | %SEVENZIP% x -si -so -tgzip | %SEVENZIP% x -si -ttar -aoa -odownloads - ) - cd !lj_source_folder!\src - ) - :: Compiles LuaJIT - if "%Configuration%"=="MinGW" ( - call mingw32-make - ) else ( - call msvcbuild.bat - ) - - mkdir %LUA_DIR% 2> NUL - for %%a in (bin bin\lua bin\lua\jit include lib) do ( mkdir "%LUA_DIR%\%%a" ) - - for %%a in (luajit.exe lua51.dll) do ( move "!lj_source_folder!\src\%%a" "%LUA_DIR%\bin" ) - copy "%LUA_DIR%\bin\luajit.exe" "%LUA_DIR%\bin\lua.exe" - - move "!lj_source_folder!\src\lua51.lib" "%LUA_DIR%\lib" - for %%a in (lauxlib.h lua.h lua.hpp luaconf.h lualib.h luajit.h) do ( - copy "!lj_source_folder!\src\%%a" "%LUA_DIR%\include" - ) - - copy "!lj_source_folder!\src\jit\*.lua" "%LUA_DIR%\bin\lua\jit" - - ) else ( - echo LuaJIT %LJ_VER% already installed at %LUA_DIR% - ) -) else ( - if not exist %LUA_DIR% ( - :: Download and compile Lua - if not exist downloads\lua-%LUA_VER% ( - curl --silent --fail --max-time 120 --connect-timeout 30 %LUA_URL%/lua-%LUA_VER%.tar.gz | %SEVENZIP% x -si -so -tgzip | %SEVENZIP% x -si -ttar -aoa -odownloads - ) - - mkdir downloads\lua-%LUA_VER%\etc 2> NUL - copy %~dp0\winmake.bat downloads\lua-%LUA_VER%\etc\winmake.bat - - cd downloads\lua-%LUA_VER% - call etc\winmake %COMPATFLAG% - call etc\winmake install %LUA_DIR% - ) else ( - echo Lua %LUA_VER% already installed at %LUA_DIR% - ) -) - -if not exist %LUA_DIR%\bin\%LUA%.exe call :die "Missing Lua interpreter at %LUA_DIR%\bin\%LUA%.exe" - -set PATH=%LUA_DIR%\bin;%PATH% -call !LUA! -v - - - -:: ========================================================== -:: LuaRocks -:: ========================================================== - -if not exist "%LR_ROOT%" ( - :: Downloads and installs LuaRocks - cd %APPVEYOR_BUILD_FOLDER% - - if %LUAROCKS_VER%==HEAD ( - set lr_source_folder=%APPVEYOR_BUILD_FOLDER%\downloads\luarocks-%LUAROCKS_VER%-win32 - if not exist !lr_source_folder! ( - git clone https://github.com/keplerproject/luarocks.git --single-branch --depth 1 !lr_source_folder! || call :die "Failed to clone LuaRocks repository" - ) else ( - cd !lr_source_folder! - git pull || call :die "Failed to update LuaRocks repository" - ) - ) else ( - if not exist downloads\luarocks-%LUAROCKS_VER%-win32.zip ( - echo Downloading LuaRocks... - curl --silent --fail --max-time 120 --connect-timeout 30 --output downloads\luarocks-%LUAROCKS_VER%-win32.zip %LUAROCKS_URL%/luarocks-%LUAROCKS_VER%-win32.zip - %SEVENZIP% x -aoa -odownloads downloads\luarocks-%LUAROCKS_VER%-win32.zip - ) - ) - - cd downloads\luarocks-%LUAROCKS_VER%-win32 - if "%Configuration%"=="MinGW" ( - call install.bat /LUA %LUA_DIR% /Q /LV %LUA_SHORTV% /P "%LUAROCKS_INSTALL%" /TREE "%LR_SYSTREE%" /MW - ) else ( - call install.bat /LUA %LUA_DIR% /Q /LV %LUA_SHORTV% /P "%LUAROCKS_INSTALL%" /TREE "%LR_SYSTREE%" - ) - - :: Configures LuaRocks to instruct CMake the correct generator to use. Else, CMake will pick the highest - :: Visual Studio version installed - if "%Configuration%"=="MinGW" ( - echo cmake_generator = "MinGW Makefiles" >> %LUAROCKS_INSTALL%\config-%LUA_SHORTV%.lua - ) else ( - set MSVS_GENERATORS[2008]=Visual Studio 9 2008 - set MSVS_GENERATORS[2010]=Visual Studio 10 2010 - set MSVS_GENERATORS[2012]=Visual Studio 11 2012 - set MSVS_GENERATORS[2013]=Visual Studio 12 2013 - set MSVS_GENERATORS[2015]=Visual Studio 14 2015 - - set CMAKE_GENERATOR=!MSVS_GENERATORS[%Configuration%]! - if "%platform%" EQU "x64" (set CMAKE_GENERATOR=!CMAKE_GENERATOR! Win64) - - echo cmake_generator = "!CMAKE_GENERATOR!" >> %LUAROCKS_INSTALL%\config-%LUA_SHORTV%.lua - ) -) - -if not exist "%LR_ROOT%" call :die "LuaRocks not found at %LR_ROOT%" - -set PATH=%LR_ROOT%;%LR_SYSTREE%\bin;%PATH% - -:: Lua will use just the system rocks -set LUA_PATH=%LR_ROOT%\lua\?.lua;%LR_ROOT%\lua\?\init.lua -set LUA_PATH=%LUA_PATH%;%LR_SYSTREE%\share\lua\%LUA_SHORTV%\?.lua -set LUA_PATH=%LUA_PATH%;%LR_SYSTREE%\share\lua\%LUA_SHORTV%\?\init.lua -set LUA_PATH=%LUA_PATH%;.\?.lua;.\?\init.lua -set LUA_CPATH=%LR_SYSTREE%\lib\lua\%LUA_SHORTV%\?.dll;.\?.dll - -call luarocks --version || call :die "Error with LuaRocks installation" -call luarocks list - - -if not exist "%LR_EXTERNAL%" ( - mkdir "%LR_EXTERNAL%" - mkdir "%LR_EXTERNAL%\lib" - mkdir "%LR_EXTERNAL%\include" -) - -set PATH=%LR_EXTERNAL%;%PATH% - -:: Exports the following variables: -:: (beware of whitespace between & and ^ below) -endlocal & set PATH=%PATH%&^ -set LR_SYSTREE=%LR_SYSTREE%&^ -set LUA_PATH=%LUA_PATH%&^ -set LUA_CPATH=%LUA_CPATH%&^ -set LR_EXTERNAL=%LR_EXTERNAL% - -echo. -echo ====================================================== -if "%LUA%"=="luajit" ( - echo Installation of LuaJIT %LJ_VER% and LuaRocks %LUAROCKS_VER% done. -) else ( - echo Installation of Lua %LUA_VER% and LuaRocks %LUAROCKS_VER% done. - if defined NOCOMPAT echo Lua was built with compatibility flags disabled. -) -echo Platform - %platform% -echo LUA - %LUA% -echo LUA_SHORTV - %LUA_SHORTV% -echo LJ_SHORTV - %LJ_SHORTV% -echo LUA_PATH - %LUA_PATH% -echo LUA_CPATH - %LUA_CPATH% -echo. -echo LR_EXTERNAL - %LR_EXTERNAL% -echo ====================================================== -echo. - -goto :eof - - - - - - - - - - - - - - - - - - -:: This blank space is intentional. If you see errors like "The system cannot find the batch label specified 'foo'" -:: then try adding or removing blank lines lines above. -:: Yes, really. -:: http://stackoverflow.com/questions/232651/why-the-system-cannot-find-the-batch-label-specified-is-thrown-even-if-label-e - -:: helper functions: - -:: for bailing out when an error occurred -:die %1 -echo %1 -exit /B 1 -goto :eof diff --git a/3rdparty/luv/.ci/platform.sh b/3rdparty/luv/.ci/platform.sh deleted file mode 100644 index 7259a7d6369..00000000000 --- a/3rdparty/luv/.ci/platform.sh +++ /dev/null @@ -1,15 +0,0 @@ -if [ -z "${PLATFORM:-}" ]; then - PLATFORM=$TRAVIS_OS_NAME; -fi - -if [ "$PLATFORM" == "osx" ]; then - PLATFORM="macosx"; -fi - -if [ -z "$PLATFORM" ]; then - if [ "$(uname)" == "Linux" ]; then - PLATFORM="linux"; - else - PLATFORM="macosx"; - fi; -fi diff --git a/3rdparty/luv/.ci/set_compiler_env.bat b/3rdparty/luv/.ci/set_compiler_env.bat deleted file mode 100644 index 7e8462ec57e..00000000000 --- a/3rdparty/luv/.ci/set_compiler_env.bat +++ /dev/null @@ -1,40 +0,0 @@ -@echo off - -:: Now we declare a scope -Setlocal EnableDelayedExpansion EnableExtensions - -if not defined Configuration set Configuration=2015 - -if "%Configuration%"=="MinGW" ( goto :mingw ) - -set arch=x86 - -if "%platform%" EQU "x64" ( set arch=x86_amd64 ) - -if "%Configuration%"=="2015" ( - set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" -) - -if "%Configuration%"=="2013" ( - set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" -) - -if "%Configuration%"=="2012" ( - set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" -) - -if "%Configuration%"=="2010" ( - set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" -) - -if "%Configuration%"=="2008" ( - set SET_VS_ENV="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" -) - -:: Visual Studio detected -endlocal & call %SET_VS_ENV% %arch% -goto :eof - -:: MinGW detected -:mingw -endlocal & set PATH=c:\mingw\bin;%PATH% diff --git a/3rdparty/luv/.ci/setenv_lua.sh b/3rdparty/luv/.ci/setenv_lua.sh deleted file mode 100644 index 55454389398..00000000000 --- a/3rdparty/luv/.ci/setenv_lua.sh +++ /dev/null @@ -1,3 +0,0 @@ -export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin -bash .ci/setup_lua.sh -eval `$HOME/.lua/luarocks path` diff --git a/3rdparty/luv/.ci/setup_lua.sh b/3rdparty/luv/.ci/setup_lua.sh deleted file mode 100644 index f8963331767..00000000000 --- a/3rdparty/luv/.ci/setup_lua.sh +++ /dev/null @@ -1,122 +0,0 @@ -#! /bin/bash - -# A script for setting up environment for travis-ci testing. -# Sets up Lua and Luarocks. -# LUA must be "lua5.1", "lua5.2" or "luajit". -# luajit2.0 - master v2.0 -# luajit2.1 - master v2.1 - -set -eufo pipefail - -LUAJIT_VERSION="2.0.4" -LUAJIT_BASE="LuaJIT-$LUAJIT_VERSION" - -source .ci/platform.sh - -LUA_HOME_DIR=$TRAVIS_BUILD_DIR/install/lua - -LR_HOME_DIR=$TRAVIS_BUILD_DIR/install/luarocks - -mkdir $HOME/.lua - -LUAJIT="no" - -if [ "$PLATFORM" == "macosx" ]; then - if [ "$LUA" == "luajit" ]; then - LUAJIT="yes"; - fi - if [ "$LUA" == "luajit2.0" ]; then - LUAJIT="yes"; - fi - if [ "$LUA" == "luajit2.1" ]; then - LUAJIT="yes"; - fi; -elif [ "$(expr substr $LUA 1 6)" == "luajit" ]; then - LUAJIT="yes"; -fi - -mkdir -p "$LUA_HOME_DIR" - -if [ "$LUAJIT" == "yes" ]; then - - if [ "$LUA" == "luajit" ]; then - curl --location https://github.com/LuaJIT/LuaJIT/archive/v$LUAJIT_VERSION.tar.gz | tar xz; - else - git clone https://github.com/LuaJIT/LuaJIT.git $LUAJIT_BASE; - fi - - cd $LUAJIT_BASE - - if [ "$LUA" == "luajit2.1" ]; then - git checkout v2.1; - # force the INSTALL_TNAME to be luajit - perl -i -pe 's/INSTALL_TNAME=.+/INSTALL_TNAME= luajit/' Makefile - fi - - make && make install PREFIX="$LUA_HOME_DIR" - - ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/luajit - ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/lua; - -else - - if [ "$LUA" == "lua5.1" ]; then - curl http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz - cd lua-5.1.5; - elif [ "$LUA" == "lua5.2" ]; then - curl http://www.lua.org/ftp/lua-5.2.4.tar.gz | tar xz - cd lua-5.2.4; - elif [ "$LUA" == "lua5.3" ]; then - curl http://www.lua.org/ftp/lua-5.3.2.tar.gz | tar xz - cd lua-5.3.2; - fi - - # Build Lua without backwards compatibility for testing - perl -i -pe 's/-DLUA_COMPAT_(ALL|5_2)//' src/Makefile - make $PLATFORM - make INSTALL_TOP="$LUA_HOME_DIR" install; - - ln -s $LUA_HOME_DIR/bin/lua $HOME/.lua/lua - ln -s $LUA_HOME_DIR/bin/luac $HOME/.lua/luac; - -fi - -cd $TRAVIS_BUILD_DIR - -lua -v - -LUAROCKS_BASE=luarocks-$LUAROCKS - -curl --location http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | tar xz - -cd $LUAROCKS_BASE - -if [ "$LUA" == "luajit" ]; then - ./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR"; -elif [ "$LUA" == "luajit2.0" ]; then - ./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR"; -elif [ "$LUA" == "luajit2.1" ]; then - ./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.1" --prefix="$LR_HOME_DIR"; -else - ./configure --with-lua="$LUA_HOME_DIR" --prefix="$LR_HOME_DIR" -fi - -make build && make install - -ln -s $LR_HOME_DIR/bin/luarocks $HOME/.lua/luarocks - -cd $TRAVIS_BUILD_DIR - -luarocks --version - -rm -rf $LUAROCKS_BASE - -if [ "$LUAJIT" == "yes" ]; then - rm -rf $LUAJIT_BASE; -elif [ "$LUA" == "lua5.1" ]; then - rm -rf lua-5.1.5; -elif [ "$LUA" == "lua5.2" ]; then - rm -rf lua-5.2.4; -elif [ "$LUA" == "lua5.3" ]; then - rm -rf lua-5.3.2; -fi diff --git a/3rdparty/luv/.ci/winmake.bat b/3rdparty/luv/.ci/winmake.bat deleted file mode 100644 index dcad55d36f7..00000000000 --- a/3rdparty/luv/.ci/winmake.bat +++ /dev/null @@ -1,457 +0,0 @@ -@ECHO OFF -SETLOCAL ENABLEDELAYEDEXPANSION - -REM ***************************** -REM * Customization section * -REM ***************************** - -REM use the /help option for generic usage information - -REM Where is the source code located (the unpacked Lua source archive, toplevel dir) -SET SOURCETREE=.\ - -REM set the toolchain to either MS or GCC (allcaps), leave blank to autodetect -SET TOOLCHAIN= - -REM set the compatibility flags, defaults to empty for 5.1, -DLUA_COMPAT_ALL for 5.2, -REM and -DLUA_COMPAT_5_2 for 5.3, which are the same as the unix make files -REM This setting can be overridden with the --nocompat flag -SET COMPATFLAG= - - - - - - - - - -REM ********************************** -REM * Nothing to customize below * -REM ********************************** - -SET BATCHNAME=%~n0 -SET SOURCE=%SOURCETREE%src\ -SET LUA_H=%SOURCE%lua.h -SET CURDIR=%CD% - -REM the following line ends with a TAB. DO NOT REMOVE IT! -SET TABCHAR= -REM Define LF to contain a linefeed character -set ^"LFCHAR=^ - -^" The above empty line is critical. DO NOT REMOVE - - -REM Supported toolchains (allcaps) -SET TOOLCHAINS=MS GCC -REM Commands which, if exiting without error, indicate presence of the toolchain -SET CHECK_GCC=gcc --version -SET CHECK_MS=cl - -REM ********************************** -REM * Check for help request * -REM ********************************** - -SET HELPCMDS=help -help --help /help ? -? /? -for %%L in ("!LFCHAR!") do for /f %%a in ("!HELPCMDS: =%%~L!") do ( - if "%%a"=="%~1" ( - echo. - echo Builds a standalone Lua installation. Supports Lua version 5.1, 5.2 and 5.3. - echo Your compiler must be in the system path, and this "%BATCHNAME%.bat" file must be located - echo in ".\etc\" in the unpacked Lua source archive. - echo. - echo USAGE etc\%BATCHNAME% [FLAG] [COMMAND] [...] - echo ^(execute from the root of the unpacked archive^) - echo. - echo Commands; - echo clean : cleans the source tree of build ^(intermediate^) files - echo install [path] : installs the build results into "path" - echo local : installs into ".\local\" in the unpacked Lua source structure - echo [toolchain] : uses a specific toolchain to build. If not provided then supported - echo toolchains will be tested and the first available will be picked. - echo Supported toolchains are: "%TOOLCHAINS%" ^(must use ALLCAPS^) - echo. - echo Flags; - echo --nocompat : Specifies that no compatibility flags should be set when building. - echo If not specified, the default compatibility flags will be used. - echo. - echo Example use; - echo set PATH=C:\path\to\your\compiler\;%%PATH%% - echo etc\%BATCHNAME% clean - echo etc\%BATCHNAME% - echo etc\%BATCHNAME% --nocompat GCC - echo etc\%BATCHNAME% install "C:\Program Files\Lua" - echo. - goto :EXITOK - ) -) - -REM ********************************** -REM * Check commandline * -REM ********************************** - -SET CMDOK=FALSE -if "%~1"=="" ( - SET CMDOK=TRUE -) -for %%a in (local install clean) do ( - if "%%a"=="%~1" ( - SET CMDOK=TRUE - ) -) -for %%a in (--nocompat) do ( - if "%%a"=="%~1" ( - SET NOCOMPAT=TRUE - if "%~2"=="" ( - SET CMDOK=TRUE - ) - SHIFT - ) -) -for %%a in (%TOOLCHAINS%) do ( - if "%%a"=="%~1" ( - SET CMDOK=TRUE - SET TOOLCHAIN=%~1 - ) -) -if NOT %CMDOK%==TRUE ( - echo. - echo Unknown command or toolchain specified. - goto :EXITERROR -) - -REM ************************************** -REM * Check for cleaning * -REM ************************************** - -if "%1"=="clean" ( - if NOT [%2]==[] ( - echo. - echo ERROR: The clean command does not take extra parameters. - ) else ( - echo Cleaning... - if exist "%SOURCE%*.exe" del "%SOURCE%*.exe" - if exist "%SOURCE%*.dll" del "%SOURCE%*.dll" - if exist "%SOURCE%*.o" del "%SOURCE%*.o" - if exist "%SOURCE%*.a" del "%SOURCE%*.a" - if exist "%SOURCE%*.obj" del "%SOURCE%*.obj" - if exist "%SOURCE%*.manifest" del "%SOURCE%*.manifest" - if exist "%SOURCE%*.lib" del "%SOURCE%*.lib" - echo Done. - ) - goto :EXITOK -) - -REM ************************************************** -REM * Fetch the Lua version from the source code * -REM ************************************************** - -Echo. -Echo Checking source code to extract Lua version... -IF NOT EXIST %LUA_H% ( - Echo Cannot locate Lua header file; %LUA_H% - goto :EXITERROR -) - -findstr /R /C:"#define[ %TABCHAR%][ %TABCHAR%]*LUA_VERSION_MAJOR" %LUA_H% > NUL -if NOT %ERRORLEVEL%==0 ( - rem ECHO We've got a Lua version 5.1 - rem findstr /R /C:"#define[ %TABCHAR%][ %TABCHAR%]*LUA_VERSION[ %TABCHAR%]" %LUA_H% - SET LUA_VER=5.1 -) else ( - rem ECHO We've got a Lua version 5.2+ - rem findstr /R /C:"#define[ %TABCHAR%][ %TABCHAR%]*LUA_VERSION_MAJOR[ %TABCHAR%]" %LUA_H% - rem findstr /R /C:"#define[ %TABCHAR%][ %TABCHAR%]*LUA_VERSION_MINOR[ %TABCHAR%]" %LUA_H% - - for /F "delims=" %%a in ('findstr /R /C:"#define[ %TABCHAR%][ %TABCHAR%]*LUA_VERSION_MAJOR[ %TABCHAR%]" %LUA_H%') do set LUA_MAJOR=%%a - SET LUA_MAJOR=!LUA_MAJOR:#define=! - SET LUA_MAJOR=!LUA_MAJOR:LUA_VERSION_MAJOR=! - SET LUA_MAJOR=!LUA_MAJOR: =! - SET LUA_MAJOR=!LUA_MAJOR:%TABCHAR%=! - SET LUA_MAJOR=!LUA_MAJOR:"=! - SET LUA_MAJOR=!LUA_MAJOR:~0,1! - - for /F "delims=" %%a in ('findstr /R /C:"#define[ %TABCHAR%][ %TABCHAR%]*LUA_VERSION_MINOR[ %TABCHAR%]" %LUA_H%') do set LUA_MINOR=%%a - SET LUA_MINOR=!LUA_MINOR:#define=! - SET LUA_MINOR=!LUA_MINOR:LUA_VERSION_MINOR=! - SET LUA_MINOR=!LUA_MINOR: =! - SET LUA_MINOR=!LUA_MINOR:%TABCHAR%=! - SET LUA_MINOR=!LUA_MINOR:"=! - SET LUA_MINOR=!LUA_MINOR:~0,1! - - SET LUA_VER=!LUA_MAJOR!.!LUA_MINOR! -) -SET LUA_SVER=!LUA_VER:.=! - -Echo Lua version found: %LUA_VER% -Echo. - -REM ************************************** -REM * Set some Lua version specifics * -REM ************************************** - -REM FILES_CORE; files for Lua core (+lauxlib, needed for Luac) -REM FILES_LIB; files for Lua standard libraries -REM FILES_DLL; vm files to be build with dll option -REM FILES_OTH; vm files to be build without dll, for static linking - -if %LUA_SVER%==51 ( - set FILES_CORE=lapi lcode ldebug ldo ldump lfunc lgc llex lmem lobject lopcodes lparser lstate lstring ltable ltm lundump lvm lzio lauxlib - set FILES_LIB=lbaselib ldblib liolib lmathlib loslib ltablib lstrlib loadlib linit - set FILES_DLL=lua - set FILES_OTH=luac print - set INSTALL_H=lauxlib.h lua.h luaconf.h lualib.h ..\etc\lua.hpp -) -if %LUA_SVER%==52 ( - set FILES_CORE=lapi lcode lctype ldebug ldo ldump lfunc lgc llex lmem lobject lopcodes lparser lstate lstring ltable ltm lundump lvm lzio lauxlib - set FILES_LIB=lbaselib lbitlib lcorolib ldblib liolib lmathlib loslib lstrlib ltablib loadlib linit - set FILES_DLL=lua - set FILES_OTH=luac - set INSTALL_H=lauxlib.h lua.h lua.hpp luaconf.h lualib.h - if "%COMPATFLAG%"=="" ( - set COMPATFLAG=-DLUA_COMPAT_ALL - ) -) -if %LUA_SVER%==53 ( - set FILES_CORE=lapi lcode lctype ldebug ldo ldump lfunc lgc llex lmem lobject lopcodes lparser lstate lstring ltable ltm lundump lvm lzio lauxlib - set FILES_LIB=lbaselib lbitlib lcorolib ldblib liolib lmathlib loslib lstrlib ltablib lutf8lib loadlib linit - set FILES_DLL=lua - set FILES_OTH=luac - set INSTALL_H=lauxlib.h lua.h lua.hpp luaconf.h lualib.h - if "%COMPATFLAG%"=="" ( - set COMPATFLAG=-DLUA_COMPAT_5_2 - ) -) - -if "%NOCOMPAT%"=="TRUE" ( - set COMPATFLAG= -) - -SET FILES_BASE=%FILES_DLL% %FILES_CORE% %FILES_LIB% - -if "%FILES_BASE%"=="" ( - Echo Unknown Lua version; %LUA_VER% - goto :EXITERROR -) - -REM ********************************* -REM * Check available toolchain * -REM ********************************* - -if [%TOOLCHAIN%]==[] ( - Echo Testing for MS... - %CHECK_MS% - IF !ERRORLEVEL!==0 SET TOOLCHAIN=MS -) -if [%TOOLCHAIN%]==[] ( - Echo Testing for GCC... - %CHECK_GCC% - IF !ERRORLEVEL!==0 SET TOOLCHAIN=GCC -) -if [%TOOLCHAIN%]==[] ( - Echo No supported toolchain found ^(please make sure it is in the system path^) - goto :EXITERROR -) - -REM *************************** -REM * Configure toolchain * -REM *************************** - -if %TOOLCHAIN%==GCC ( - echo Using GCC toolchain... - SET OBJEXT=o - SET LIBFILE=liblua%LUA_SVER%.a -) -if %TOOLCHAIN%==MS ( - echo Using Microsoft toolchain... - SET OBJEXT=obj - SET LIBFILE=lua%LUA_SVER%.lib -) -echo. - -REM ************************************** -REM * Check for installing * -REM ************************************** - -if "%1"=="install" ( - if "%~2"=="" ( - echo. - echo ERROR: The install command requires a path where to install to. - goto :EXITERROR - ) - SET TARGETPATH=%~2 -) -if "%1"=="local" ( - if NOT "%~2"=="" ( - echo. - echo ERROR: The local command does not take extra parameters. - goto :EXITERROR - ) - SET TARGETPATH=%SOURCETREE%local -) -if NOT "%TARGETPATH%"=="" ( - mkdir "%TARGETPATH%\bin" - mkdir "%TARGETPATH%\include" - mkdir "%TARGETPATH%\lib\lua\%LUA_VER%" - mkdir "%TARGETPATH%\man\man1" - mkdir "%TARGETPATH%\share\lua\%LUA_VER%" - copy "%SOURCE%lua.exe" "%TARGETPATH%\bin" - copy "%SOURCE%luac.exe" "%TARGETPATH%\bin" - copy "%SOURCE%lua%LUA_SVER%.dll" "%TARGETPATH%\bin" - for %%a in (%INSTALL_H%) do ( copy "%SOURCE%%%a" "%TARGETPATH%\include" ) - copy "%SOURCE%%LIBFILE%" "%TARGETPATH%\lib" - copy "%SOURCETREE%doc\lua.1" "%TARGETPATH%\man\man1" - copy "%SOURCETREE%doc\luac.1" "%TARGETPATH%\man\man1" - - echo Installation completed in "%TARGETPATH%". - goto :EXITOK -) - -REM *********************** -REM * Compile sources * -REM *********************** -goto :after_compile_function -:compile_function - REM Params: %1 is filelist (must be quoted) - REM Return: same list, with the object file extension included, will be stored in global OBJLIST - - for %%a in (%~1) do ( - SET FILENAME=%%a - if %TOOLCHAIN%==GCC ( - SET COMPCMD=gcc -O2 -Wall !EXTRAFLAG! !COMPATFLAG! -c -o !FILENAME!.%OBJEXT% !FILENAME!.c - ) - if %TOOLCHAIN%==MS ( - SET COMPCMD=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE !COMPATFLAG! !EXTRAFLAG! !FILENAME!.c - ) - echo !COMPCMD! - !COMPCMD! - SET OBJLIST=!OBJLIST! !FILENAME!.%OBJEXT% - ) - -goto :eof -:after_compile_function - -CD %SOURCE% -REM Traverse the 4 lists of source files - -for %%b in (CORE LIB DLL OTH) do ( - SET LTYPE=%%b - SET OBJLIST= - if !LTYPE!==OTH ( - REM OTH is the only list of files build without DLL option - SET EXTRAFLAG= - ) else ( - SET EXTRAFLAG=-DLUA_BUILD_AS_DLL - ) - if !LTYPE!==CORE SET FILELIST=%FILES_CORE% - if !LTYPE!==LIB SET FILELIST=%FILES_LIB% - if !LTYPE!==DLL SET FILELIST=%FILES_DLL% - if !LTYPE!==OTH SET FILELIST=%FILES_OTH% - - echo Now compiling !LTYPE! file set... - call:compile_function "!FILELIST!" - - if !LTYPE!==CORE SET FILES_CORE_O=!OBJLIST! - if !LTYPE!==LIB SET FILES_LIB_O=!OBJLIST! - if !LTYPE!==DLL SET FILES_DLL_O=!OBJLIST! - if !LTYPE!==OTH SET FILES_OTH_O=!OBJLIST! -) - - -REM **************************** -REM * Link GCC based files * -REM **************************** - -if %TOOLCHAIN%==GCC ( - REM Link the LuaXX.dll file - SET LINKCMD=gcc -shared -o lua%LUA_SVER%.dll %FILES_CORE_O% %FILES_LIB_O% - echo !LINKCMD! - !LINKCMD! - - REM strip from LuaXX.dll - SET RANCMD=strip --strip-unneeded lua%LUA_SVER%.dll - echo !RANCMD! - !RANCMD! - - REM Link the Lua.exe file - SET LINKCMD=gcc -o lua.exe -s lua.%OBJEXT% lua%LUA_SVER%.dll -lm - echo !LINKCMD! - !LINKCMD! - - REM create lib archive - SET LIBCMD=ar rcu liblua%LUA_SVER%.a %FILES_CORE_O% %FILES_LIB_O% - echo !LIBCMD! - !LIBCMD! - - REM Speedup index using ranlib - SET RANCMD=ranlib liblua%LUA_SVER%.a - echo !RANCMD! - !RANCMD! - - REM Link Luac.exe file - SET LINKCMD=gcc -o luac.exe %FILES_OTH_O% liblua%LUA_SVER%.a -lm - echo !LINKCMD! - !LINKCMD! - -) - - -REM **************************** -REM * Link MS based files * -REM **************************** - -if %TOOLCHAIN%==MS ( - REM Link the LuaXX.dll file, and LuaXX.obj - SET LINKCMD=link /nologo /DLL /out:lua%LUA_SVER%.dll %FILES_CORE_O% %FILES_LIB_O% - echo !LINKCMD! - !LINKCMD! - - REM handle dll manifest - if exist lua%LUA_SVER%.dll.manifest ( - SET MANICMD=mt /nologo -manifest lua%LUA_SVER%.dll.manifest -outputresource:lua%LUA_SVER%.dll;2 - echo !MANICMD! - !MANICMD! - ) - - REM Link Lua.exe - SET LINKCMD=link /nologo /out:lua.exe lua.%OBJEXT% lua%LUA_SVER%.lib - echo !LINKCMD! - !LINKCMD! - - REM handle manifest - if exist lua.exe.manifest ( - SET MANICMD=mt /nologo -manifest lua.exe.manifest -outputresource:lua.exe - echo !MANICMD! - !MANICMD! - ) - - REM Link Luac.exe - SET LINKCMD=link /nologo /out:luac.exe %FILES_OTH_O% %FILES_CORE_O% - echo !LINKCMD! - !LINKCMD! - - REM handle manifest - if exist luac.exe.manifest ( - SET MANICMD=mt /nologo -manifest luac.exe.manifest -outputresource:luac.exe - echo !MANICMD! - !MANICMD! - ) -) - -CD %CURDIR% - -REM **************************** -REM * Finished building * -REM **************************** - -echo. -echo Build completed. -goto :EXITOK - -:EXITOK -exit /B 0 - -:EXITERROR -echo For help try; etc\%BATCHNAME% /help -exit /B 1 diff --git a/3rdparty/luv/.gitignore b/3rdparty/luv/.gitignore deleted file mode 100644 index 8bcf497a42c..00000000000 --- a/3rdparty/luv/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -build -libluv.a -libluv.so -luv.so -luv.dll -luajit.exe -luv-*.tar.gz -luv-*.src.rock -luv-*/ -build.luarocks/ diff --git a/3rdparty/luv/.travis.yml b/3rdparty/luv/.travis.yml deleted file mode 100644 index b6909b894cc..00000000000 --- a/3rdparty/luv/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: c -sudo: false - -addons: - apt: - sources: - - kalakris-cmake - packages: - - cmake - -env: - global: - - LUAROCKS=2.3.0 - matrix: - - WITH_LUA_ENGINE=Lua LUA=lua5.3 - - WITH_LUA_ENGINE=LuaJIT LUA=luajit2.1 - - PROCESS_CLEANUP_TEST=1 LUA=lua5.2 - -os: - - linux - - osx - -before_install: - - git submodule update --init --recursive - - git submodule update --recursive - -script: - - if [ "x$PROCESS_CLEANUP_TEST" = "x" ]; then make && make test; else ./tests/test-sigchld-after-lua_close.sh; fi - # Test rock installation - - source .ci/setenv_lua.sh - - luarocks make - - test $PWD = `lua -e "print(require'luv'.cwd())"` - -notifications: - email: true - irc: "irc.freenode.org#luvit" diff --git a/3rdparty/luv/CMakeLists.txt b/3rdparty/luv/CMakeLists.txt deleted file mode 100644 index 9f079670de2..00000000000 --- a/3rdparty/luv/CMakeLists.txt +++ /dev/null @@ -1,191 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -if(POLICY CMP0053) - cmake_policy(SET CMP0053 NEW) # faster evaluation of variable references -endif() - -project (luv C ASM) - -set(LUV_VERSION_MAJOR 1) -set(LUV_VERSION_MINOR 8) -set(LUV_VERSION_PATCH 0) -set(LUV_VERSION ${LUV_VERSION_MAJOR}.${LUV_VERSION_MINOR}.${LUV_VERSION_PATCH}) - -option(BUILD_MODULE "Build as module" ON) -option(BUILD_SHARED_LIBS "Build shared library" OFF) -option(WITH_SHARED_LIBUV "Link to a shared libuv library instead of static linking" OFF) - -if (NOT WITH_LUA_ENGINE) - set(WITH_LUA_ENGINE "LuaJIT" - CACHE STRING "Link to LuaJIT or PUC Lua" FORCE) - set_property(CACHE WITH_LUA_ENGINE - PROPERTY STRINGS "Lua;LuaJIT") -endif (NOT WITH_LUA_ENGINE) - -if (NOT LUA_BUILD_TYPE) - set(LUA_BUILD_TYPE "Static" - CACHE STRING "Build Lua/LuaJIT as static, dynamic libary, or use system one" FORCE) - set_property(CACHE LUA_BUILD_TYPE - PROPERTY STRINGS "Static;Dynamic;System") -endif (NOT LUA_BUILD_TYPE) - -if (WITH_LUA_ENGINE STREQUAL Lua) - add_definitions(-DLUA_USE_DLOPEN) - set(USE_LUAJIT OFF) -else () - set(USE_LUAJIT ON) -endif () - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") - -if (WITH_SHARED_LIBUV) - find_package(Libuv) - if (LIBUV_FOUND) - include_directories(${LIBUV_INCLUDE_DIR}) - endif (LIBUV_FOUND) -else (WITH_SHARED_LIBUV) - include(deps/uv.cmake) - if (BUILD_MODULE) - add_definitions( -DBUILDING_UV_SHARED ) - endif (BUILD_MODULE) -endif (WITH_SHARED_LIBUV) - -if (LUA) - MESSAGE(STATUS "Lua: using information from luarocks") - - MESSAGE(STATUS "LUA_LIBDIR: " ${LUA_LIBDIR}) - MESSAGE(STATUS "LUA_INCDIR: " ${LUA_INCDIR}) - MESSAGE(STATUS "LUA: " ${LUA}) - - SET(LUA_EXECUTABLE "${LUA}") - SET(LUA_INCLUDE_DIR "${LUA_INCDIR}") - SET(LUA_PACKAGE_PATH "${LUADIR}") - SET(LUA_PACKAGE_CPATH "${LIBDIR}") - - SET(INSTALL_LIB_DIR ${LIBDIR}) - - GET_FILENAME_COMPONENT(LUA_EXEC_NAME ${LUA_EXECUTABLE} NAME_WE) - IF(LUA_EXEC_NAME STREQUAL "luajit") - FIND_LIBRARY(LUA_LIBRARIES - NAMES luajit libluajit - PATHS ${LUA_LIBDIR} - NO_DEFAULT_PATH) - ELSEIF(LUA_EXEC_NAME STREQUAL "lua") - FIND_LIBRARY(LUA_LIBRARIES - NAMES lua lua53 lua52 lua51 liblua liblua53 liblua52 liblua51 - PATHS ${LUA_LIBDIR} - NO_DEFAULT_PATH) - ENDIF() - MESSAGE(STATUS "Lua library: ${LUA_LIBRARIES}") - - include_directories(${LUA_INCLUDE_DIR}) -else (LUA) - if (LUA_BUILD_TYPE STREQUAL System) - if (USE_LUAJIT) - find_package(LuaJIT) - if (LUAJIT_FOUND) - include_directories(${LUAJIT_INCLUDE_DIR}) - link_directories(${LUAJIT_LIBRARIES}) - endif (LUAJIT_FOUND) - else (USE_LUAJIT) - find_package(Lua) - if (LUA_FOUND) - include_directories(${LUA_INCLUDE_DIR}) - endif (LUA_FOUND) - endif (USE_LUAJIT) - - else (LUA_BUILD_TYPE STREQUAL System) - if (LUA_BUILD_TYPE STREQUAL Static) - SET(WITH_SHARED_LUA OFF) - else (LUA_BUILD_TYPE STREQUAL Static) - SET(WITH_SHARED_LUA ON) - endif (LUA_BUILD_TYPE STREQUAL Static) - if (USE_LUAJIT) - include(deps/luajit.cmake) - include_directories(deps/luajit/src) - else(USE_LUAJIT) - include(deps/lua.cmake) - include_directories(deps/lua/src) - endif (USE_LUAJIT) - endif (LUA_BUILD_TYPE STREQUAL System) -endif (LUA) - -if (BUILD_MODULE) - add_library(luv MODULE src/luv.c) - set_target_properties(luv PROPERTIES PREFIX "") -else (BUILD_MODULE) - add_library(luv src/luv.c) - if (BUILD_SHARED_LIBS) - set_target_properties(luv - PROPERTIES VERSION ${LUV_VERSION} SOVERSION ${LUV_VERSION_MAJOR}) - endif (BUILD_SHARED_LIBS) -endif (BUILD_MODULE) - -if(APPLE) - set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS - "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -flat_namespace -undefined suppress" - ) - # execute_process(COMMAND which luajit OUTPUT_VARIABLE LUAJIT) - # set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS - # "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -bundle_loader ${LUAJIT}" - # ) -endif() - -if(WIN32) - add_definitions(-DLUA_BUILD_AS_DLL -DLUA_LIB) - if (LUA) - target_link_libraries(luv uv ${LUA_LIBRARIES}) - else (LUA) - if (USE_LUAJIT) - target_link_libraries(luv uv luajit-5.1) - else (USE_LUAJIT) - if (LUA_BUILD_TYPE STREQUAL System) - target_link_libraries(luv uv ${LUA_LIBRARIES}) - else (LUA_BUILD_TYPE STREQUAL System) - target_link_libraries(luv uv lualib) - endif (LUA_BUILD_TYPE STREQUAL System) - endif (USE_LUAJIT) - endif (LUA) - # replace /MD to /MT to avoid link msvcr*.dll - set(CompilerFlags - CMAKE_C_FLAGS - CMAKE_C_FLAGS_DEBUG - CMAKE_C_FLAGS_MINSIZEREL - CMAKE_C_FLAGS_RELWITHDEBINFO - CMAKE_C_FLAGS_RELEASE) - foreach(CompilerFlag ${CompilerFlags}) - string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") - endforeach() -elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") - target_link_libraries(luv uv rt) -else() - target_link_libraries(luv uv) -endif() - -if (NOT LUA) - if (BUILD_MODULE) - if (WIN32) - set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") - else (WIN32) - set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib/lua/${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}") - endif (WIN32) - else (BUILD_MODULE) - set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" - CACHE PATH "Installation directory for libraries") - set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include/luv" - CACHE PATH "Installation directory for headers") - endif (BUILD_MODULE) -endif () - -if (CMAKE_INSTALL_PREFIX) - install(TARGETS luv - ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" - LIBRARY DESTINATION "${INSTALL_LIB_DIR}" - ) - if (NOT BUILD_MODULE) - install( - FILES src/luv.h src/util.h src/lhandle.h src/lreq.h - DESTINATION "${INSTALL_INC_DIR}" - ) - endif (NOT BUILD_MODULE) -endif (CMAKE_INSTALL_PREFIX) diff --git a/3rdparty/luv/LICENSE.txt b/3rdparty/luv/LICENSE.txt deleted file mode 100644 index d6456956733..00000000000 --- a/3rdparty/luv/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/3rdparty/luv/Makefile b/3rdparty/luv/Makefile deleted file mode 100644 index 1e7038c47ab..00000000000 --- a/3rdparty/luv/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -LUV_TAG=$(shell git describe --tags) - -ifdef WITHOUT_AMALG - CMAKE_OPTIONS+= -DWITH_AMALG=OFF -endif - -BUILD_MODULE ?= ON -BUILD_SHARED_LIBS ?= OFF -WITH_SHARED_LIBUV ?= OFF -WITH_LUA_ENGINE ?= LuaJIT -LUA_BUILD_TYPE ?= Static - - -ifeq ($(WITH_LUA_ENGINE), LuaJIT) - LUABIN=build/luajit -else - LUABIN=build/lua -endif - -CMAKE_OPTIONS += \ - -DBUILD_MODULE=$(BUILD_MODULE) \ - -DBUILD_SHARED_LIBS=$(BUILD_SHARED_LIBS) \ - -DWITH_SHARED_LIBUV=$(WITH_SHARED_LIBUV) \ - -DWITH_LUA_ENGINE=$(WITH_LUA_ENGINE) \ - -DLUA_BUILD_TYPE=$(LUA_BUILD_TYPE) \ - -all: luv - -deps/libuv/include: - git submodule update --init deps/libuv - -deps/luajit/src: - git submodule update --init deps/luajit - -build/Makefile: deps/libuv/include deps/luajit/src - cmake -H. -Bbuild ${CMAKE_OPTIONS} -DWITH_AMALG=OFF - -luv: build/Makefile - cmake --build build --config Debug - ln -sf build/luv.so - -clean: - rm -rf build luv.so - -test: luv - ${LUABIN} tests/run.lua - -reset: - git submodule update --init --recursive && \ - git clean -f -d && \ - git checkout . - -publish-luarocks: - rm -rf luv-${LUV_TAG} - mkdir -p luv-${LUV_TAG}/deps - cp -r src cmake CMakeLists.txt LICENSE.txt README.md docs.md luv-${LUV_TAG}/ - cp -r deps/libuv deps/*.cmake deps/lua_one.c luv-${LUV_TAG}/deps/ - tar -czvf luv-${LUV_TAG}.tar.gz luv-${LUV_TAG} - github-release upload --user luvit --repo luv --tag ${LUV_TAG} \ - --file luv-${LUV_TAG}.tar.gz --name luv-${LUV_TAG}.tar.gz - luarocks upload luv-${LUV_TAG}.rockspec --api-key=${LUAROCKS_TOKEN} diff --git a/3rdparty/luv/README.md b/3rdparty/luv/README.md deleted file mode 100644 index 47059d01ee7..00000000000 --- a/3rdparty/luv/README.md +++ /dev/null @@ -1,213 +0,0 @@ -luv -=== - -[![Linux Build Status](https://travis-ci.org/luvit/luv.svg?branch=master)](https://travis-ci.org/luvit/luv) - -[![Windows Build status](https://ci.appveyor.com/api/projects/status/uo1qhdcc0vcqsiok/branch/master?svg=true)](https://ci.appveyor.com/project/racker-buildbot/luv/branch/master) - -[libuv](https://github.com/joyent/libuv) bindings for -[luajit](http://luajit.org/) and [lua](http://www.lua.org/) -[5.1](http://www.lua.org/manual/5.1/manual.html)/ -[5.2](http://www.lua.org/manual/5.2/manual.html)/ -[5.3](http://www.lua.org/manual/5.3/manual.html). - -This library makes libuv available to lua scripts. It was made for the [luvit](http://luvit.io/) project but should usable from nearly any lua project. - -The library can be used by multiple threads at once. Each thread is assumed to load the library from a different `lua_State`. Luv will create a unique `uv_loop_t` for each state. You can't share uv handles between states/loops. - -The best docs currently are the [libuv docs](http://docs.libuv.org/) themselves. Hopfully soon we'll have a copy locally tailored for lua. - -```lua -local uv = require('luv') - --- Create a handle to a uv_timer_t -local timer = uv.new_timer() - --- This will wait 1000ms and then continue inside the callback -timer:start(1000, 0, function () - -- timer here is the value we passed in before from new_timer. - - print ("Awake!") - - -- You must always close your uv handles or you'll leak memory - -- We can't depend on the GC since it doesn't know enough about libuv. - timer:close() -end) - -print("Sleeping"); - --- uv.run will block and wait for all events to run. --- When there are no longer any active handles, it will return -uv.run() -``` - - -Here is an example of an TCP echo server -```lua -local uv = require('luv') - -local function create_server(host, port, on_connection) - - local server = uv.new_tcp() - server:bind(host, port) - - server:listen(128, function(err) - -- Make sure there was no problem setting up listen - assert(not err, err) - - -- Accept the client - local client = uv.new_tcp() - server:accept(client) - - on_connection(client) - end) - - return server -end - -local server = create_server("0.0.0.0", 0, function (client) - - client:read_start(function (err, chunk) - - -- Crash on errors - assert(not err, err) - - if chunk then - -- Echo anything heard - client:write(chunk) - else - -- When the stream ends, close the socket - client:close() - end - end) -end) - -print("TCP Echo serverr listening on port " .. server:getsockname().port) - -uv.run() -``` - -More examples can be found in the [examples](examples) and [tests](tests) folders. - -## Building From Source - -To build, first install your compiler tools. - -### Get a Compiler - -On linux this probably means `gcc` and `make`. On Ubuntu, the `build-essential` -package is good for this. - -On OSX, you probably want XCode which comes with `clang` and `make` and friends. - -For windows the free Visual Studio Express works. If you get the 2013 edition, -make sure to get the `Windows Deskop` edition. The `Windows` version doesn't -include a working C compiler. Make sure to run all of setup including getting a -free license. - -### Install CMake - -Now install Cmake. The version in `brew` on OSX or most Linux package managers -is good. The version on Travis CI is too old and so I use a PPA there. On -windows use the installer and make sure to add cmake to your command prompt -path. - -### Install Git - -If you haven't already, install git and make sure it's in your path. This comes -with XCode on OSX. On Linux it's in your package manager. For windows, use the -installer at . Make sure it's available to your windows -command prompt. - -### Clone the Code - -Now open a terminal and clone the code. For windows I recommend the special -developer command prompt that came with Visual Studio. - -``` -git clone https://github.com/luvit/luv.git --recursive -cd luv -``` - -### Build the Code and Test - -On windows I wrote a small batch file that runs the correct cmake commands and -copies the output files for easy access. - -``` -C:\Code\luv> msvcbuild.bat -C:\Code\luv> luajit tests\run.lua -``` - -On unix systems, use the Makefile. - -``` -~/Code/luv> make test -``` - -This will build luv as a module library. Module libraries are plugins that are -not linked into other targets. - -#### Build with PUC Lua 5.3 -By default luv is linked with LuaJIT 2.0.4. If you rather like to link luv -with PUC Lua 5.3 you can run make with: - -``` -~/Code/luv> WITH_LUA_ENGINE=Lua make -``` - -#### Build as static library - -If you want to build luv as a static library run make with: - -``` -~/Code/luv> BUILD_MODULE=OFF make -``` - -This will create a static library `libluv.a`. - -#### Build as shared library - -If you want to build luv as a shared library run make with: - -``` -~/Code/luv> BUILD_MODULE=OFF BUILD_SHARED_LIBS=ON make -``` - -This will create a shared library `libluv.so`. - -#### Build with shared libraries - -By default the build system will build luv with the supplied dependencies. -These are: - * libuv - * LuaJIT or Lua - -However, if your target system has already one or more of these dependencies -installed you can link `luv` against them. - -##### Linking with shared libuv - -The default shared library name for libuv is `libuv`. To link against it use: - -``` -~/Code/luv> WITH_SHARED_LIBUV=ON make -``` - -##### Linking with shared LuaJIT - -The default shared library name for LuaJIT is `libluajit-5.1`. To link against -it use: - -``` -~/Code/luv> LUA_BUILD_TYPE=System make -``` - -##### Linking with shared Lua 5.x - -The default shared library name for Lua 5.x is `liblua5.x`. To link against -it use: - -``` -~/Code/luv> LUA_BUILD_TYPE=System WITH_LUA_ENGINE=Lua make -``` diff --git a/3rdparty/luv/appveyor.yml b/3rdparty/luv/appveyor.yml deleted file mode 100644 index b8d01898573..00000000000 --- a/3rdparty/luv/appveyor.yml +++ /dev/null @@ -1,42 +0,0 @@ -os: Visual Studio 2015 - -# Test with the latest two releases of MSVC -configuration: - - 2015 - - 2013 - -# Test with the latest Lua and LuaJIT versions -environment: - LUAROCKS_VER: 2.3.0 - matrix: - - LUA_VER: 5.3.2 - NOCOMPAT: true # with compatibility flags disabled. - - LJ_VER: 2.1 - -platform: - - x86 - - x64 - -matrix: - fast_finish: true - -cache: - - c:\lua -> appveyor.yml - - c:\external -> appveyor.yml - -install: - - git submodule update --init - -build_script: - - msvcbuild.bat - - luajit.exe tests\run.lua - # Test rock installation - - call .ci\set_compiler_env.bat - - call .ci\install.bat - - luarocks make - - ps: if("$(Get-Location)" -eq $(lua -e "print(require'luv'.cwd())")) { "LuaRocks test OK" } else { "LuaRocks test failed"; exit 1 } - - luarocks remove luv - -artifacts: - - path: luv.dll - - path: luajit.exe diff --git a/3rdparty/luv/cmake/Modules/FindLibuv.cmake b/3rdparty/luv/cmake/Modules/FindLibuv.cmake deleted file mode 100644 index 045362ae5db..00000000000 --- a/3rdparty/luv/cmake/Modules/FindLibuv.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# Locate libuv library -# This module defines -# LIBUV_FOUND, if false, do not try to link to libuv -# LIBUV_LIBRARIES -# LIBUV_INCLUDE_DIR, where to find uv.h - -FIND_PATH(LIBUV_INCLUDE_DIR NAMES uv.h) -FIND_LIBRARY(LIBUV_LIBRARIES NAMES uv libuv) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUV DEFAULT_MSG LIBUV_LIBRARIES LIBUV_INCLUDE_DIR) diff --git a/3rdparty/luv/cmake/Modules/FindLuaJIT.cmake b/3rdparty/luv/cmake/Modules/FindLuaJIT.cmake deleted file mode 100644 index b9c2c3ee41a..00000000000 --- a/3rdparty/luv/cmake/Modules/FindLuaJIT.cmake +++ /dev/null @@ -1,55 +0,0 @@ -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# Copyright 2013 Rolf Eike Beer -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# We use code from the CMake project to detect the Lua version. - -# Locate LuaJIT library -# This module defines -# LUAJIT_FOUND, if false, do not try to link to Lua JIT -# LUAJIT_LIBRARIES -# LUAJIT_INCLUDE_DIR, where to find lua.h -# -# Additionally it defines the Lua API/ABI version: -# LUA_VERSION_STRING - the version of Lua found -# LUA_VERSION_MAJOR - the major version of Lua -# LUA_VERSION_MINOR - the minor version of Lua -# LUA_VERSION_PATCH - the patch version of Lua - -FIND_PATH(LUAJIT_INCLUDE_DIR NAMES lua.h PATH_SUFFIXES luajit-2.0) -FIND_LIBRARY(LUAJIT_LIBRARIES NAMES luajit-5.1) - -if (LUAJIT_INCLUDE_DIR AND EXISTS "${LUAJIT_INCLUDE_DIR}/lua.h") - # At least 5.[012] have different ways to express the version - # so all of them need to be tested. Lua 5.2 defines LUA_VERSION - # and LUA_RELEASE as joined by the C preprocessor, so avoid those. - file(STRINGS "${LUAJIT_INCLUDE_DIR}/lua.h" lua_version_strings - REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*") - - string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MAJOR ";${lua_version_strings};") - if (LUA_VERSION_MAJOR MATCHES "^[0-9]+$") - string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MINOR ";${lua_version_strings};") - string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_PATCH ";${lua_version_strings};") - set(LUA_VERSION_STRING "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}") - else () - string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};") - if (NOT LUA_VERSION_STRING MATCHES "^[0-9.]+$") - string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};") - endif () - string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" LUA_VERSION_MAJOR "${LUA_VERSION_STRING}") - string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" LUA_VERSION_MINOR "${LUA_VERSION_STRING}") - string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" LUA_VERSION_PATCH "${LUA_VERSION_STRING}") - endif () - - unset(lua_version_strings) -endif() - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LUAJIT DEFAULT_MSG LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR) diff --git a/3rdparty/luv/deps/lua.cmake b/3rdparty/luv/deps/lua.cmake deleted file mode 100644 index 393e67a107a..00000000000 --- a/3rdparty/luv/deps/lua.cmake +++ /dev/null @@ -1,128 +0,0 @@ -# Modfied from luajit.cmake -# Added LUAJIT_ADD_EXECUTABLE Ryan Phillips -# This CMakeLists.txt has been first taken from LuaDist -# Copyright (C) 2007-2011 LuaDist. -# Created by Peter DrahoÅ¡ -# Redistribution and use of this file is allowed according to the terms of the MIT license. -# Debugged and (now seriously) modified by Ronan Collobert, for Torch7 - -#project(Lua53 C) - -SET(LUA_DIR ${CMAKE_CURRENT_LIST_DIR}/lua) - -SET(CMAKE_REQUIRED_INCLUDES - ${LUA_DIR} - ${LUA_DIR}/src - ${CMAKE_CURRENT_BINARY_DIR} -) - -OPTION(WITH_AMALG "Build eveything in one shot (needs memory)" ON) - -# Ugly warnings -IF(MSVC) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) -ENDIF() - -# Various includes -INCLUDE(CheckLibraryExists) -INCLUDE(CheckFunctionExists) -INCLUDE(CheckCSourceCompiles) -INCLUDE(CheckTypeSize) - -CHECK_TYPE_SIZE("void*" SIZEOF_VOID_P) -IF(SIZEOF_VOID_P EQUAL 8) - ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE) -ENDIF() - -IF(NOT WIN32) - FIND_LIBRARY(DL_LIBRARY "dl") - IF(DL_LIBRARY) - SET(CMAKE_REQUIRED_LIBRARIES ${DL_LIBRARY}) - LIST(APPEND LIBS ${DL_LIBRARY}) - ENDIF(DL_LIBRARY) - CHECK_FUNCTION_EXISTS(dlopen LUA_USE_DLOPEN) - IF(NOT LUA_USE_DLOPEN) - MESSAGE(FATAL_ERROR "Cannot compile a useful lua. -Function dlopen() seems not to be supported on your platform. -Apparently you are not on a Windows platform as well. -So lua has no way to deal with shared libraries!") - ENDIF(NOT LUA_USE_DLOPEN) -ENDIF(NOT WIN32) - -check_library_exists(m sin "" LUA_USE_LIBM) -if ( LUA_USE_LIBM ) - list ( APPEND LIBS m ) -endif () - -## SOURCES -SET(SRC_LUALIB - ${LUA_DIR}/src/lbaselib.c - ${LUA_DIR}/src/lcorolib.c - ${LUA_DIR}/src/ldblib.c - ${LUA_DIR}/src/liolib.c - ${LUA_DIR}/src/lmathlib.c - ${LUA_DIR}/src/loadlib.c - ${LUA_DIR}/src/loslib.c - ${LUA_DIR}/src/lstrlib.c - ${LUA_DIR}/src/ltablib.c - ${LUA_DIR}/src/lutf8lib.c) - -SET(SRC_LUACORE - ${LUA_DIR}/src/lauxlib.c - ${LUA_DIR}/src/lapi.c - ${LUA_DIR}/src/lcode.c - ${LUA_DIR}/src/lctype.c - ${LUA_DIR}/src/ldebug.c - ${LUA_DIR}/src/ldo.c - ${LUA_DIR}/src/ldump.c - ${LUA_DIR}/src/lfunc.c - ${LUA_DIR}/src/lgc.c - ${LUA_DIR}/src/linit.c - ${LUA_DIR}/src/llex.c - ${LUA_DIR}/src/lmem.c - ${LUA_DIR}/src/lobject.c - ${LUA_DIR}/src/lopcodes.c - ${LUA_DIR}/src/lparser.c - ${LUA_DIR}/src/lstate.c - ${LUA_DIR}/src/lstring.c - ${LUA_DIR}/src/ltable.c - ${LUA_DIR}/src/ltm.c - ${LUA_DIR}/src/lundump.c - ${LUA_DIR}/src/lvm.c - ${LUA_DIR}/src/lzio.c - ${SRC_LUALIB}) - -## GENERATE - -IF(WITH_SHARED_LUA) - IF(WITH_AMALG) - add_library(lualib SHARED ${LUA_DIR}/../lua_one.c ${DEPS}) - ELSE() - add_library(lualib SHARED ${SRC_LUACORE} ${DEPS} ) - ENDIF() -ELSE() - IF(WITH_AMALG) - add_library(lualib STATIC ${LUA_DIR}/../lua_one.c ${DEPS} ) - ELSE() - add_library(lualib STATIC ${SRC_LUACORE} ${DEPS} ) - ENDIF() - set_target_properties(lualib PROPERTIES - PREFIX "lib" IMPORT_PREFIX "lib") -ENDIF() - -target_link_libraries (lualib ${LIBS} ) -set_target_properties (lualib PROPERTIES OUTPUT_NAME "lua53") - -IF(WIN32) - add_executable(lua ${LUA_DIR}/src/lua.c) - target_link_libraries(lua lualib) -ELSE() - IF(WITH_AMALG) - add_executable(lua ${LUA_DIR}/src/lua.c ${LUA_DIR}/lua_one.c ${DEPS}) - ELSE() - add_executable(lua ${LUA_DIR}/src/lua.c ${SRC_LUACORE} ${DEPS}) - ENDIF() - target_link_libraries(lua ${LIBS}) - SET_TARGET_PROPERTIES(lua PROPERTIES ENABLE_EXPORTS ON) -ENDIF(WIN32) - diff --git a/3rdparty/luv/deps/lua_one.c b/3rdparty/luv/deps/lua_one.c deleted file mode 100644 index 2531883cc67..00000000000 --- a/3rdparty/luv/deps/lua_one.c +++ /dev/null @@ -1,97 +0,0 @@ -/* -* one.c -- Lua core, libraries, and interpreter in a single file -*/ - -/* default is to build the full interpreter */ -#ifndef MAKE_LIB -#ifndef MAKE_LUAC -#ifndef MAKE_LUA -#define MAKE_LIB -#endif -#endif -#endif - -/* choose suitable platform-specific features */ -/* some of these may need extra libraries such as -ldl -lreadline -lncurses */ -#if 0 -#define LUA_USE_LINUX -#define LUA_USE_MACOSX -#define LUA_USE_POSIX -#define LUA_ANSI -#endif - -/* no need to change anything below this line ----------------------------- */ - -/* setup for luaconf.h */ -#if HAVE_LPREFIX -# include "lprefix.h" -#endif - -#define LUA_CORE -#define LUA_LIB -#define ltable_c -#define lvm_c -#include "luaconf.h" - -/* do not export internal symbols */ -#undef LUAI_FUNC -#undef LUAI_DDEC -#undef LUAI_DDEF -#define LUAI_FUNC static -#define LUAI_DDEC static -#define LUAI_DDEF static - -/* core -- used by all */ -#include "lapi.c" -#include "lcode.c" -#include "lctype.c" -#include "ldebug.c" -#include "ldo.c" -#include "ldump.c" -#include "lfunc.c" -#include "lgc.c" -#include "llex.c" -#include "lmem.c" -#include "lobject.c" -#include "lopcodes.c" -#include "lparser.c" -#include "lstate.c" -#include "lstring.c" -#include "ltable.c" -#include "ltm.c" -#include "lundump.c" -#include "lvm.c" -#include "lzio.c" - -/* auxiliary library -- used by all */ -#include "lauxlib.c" - -/* standard library -- not used by luac */ -#ifndef MAKE_LUAC -#include "lbaselib.c" -#if LUA_VERSION_NUM == 502 -# include "lbitlib.c" -#endif -#include "lcorolib.c" -#include "ldblib.c" -#include "liolib.c" -#include "lmathlib.c" -#include "loadlib.c" -#include "loslib.c" -#include "lstrlib.c" -#include "ltablib.c" -#if LUA_VERSION_NUM >= 503 -# include "lutf8lib.c" -#endif -#include "linit.c" -#endif - -/* lua */ -#ifdef MAKE_LUA -#include "lua.c" -#endif - -/* luac */ -#ifdef MAKE_LUAC -#include "luac.c" -#endif diff --git a/3rdparty/luv/deps/luajit.cmake b/3rdparty/luv/deps/luajit.cmake deleted file mode 100644 index e9d5b3582e1..00000000000 --- a/3rdparty/luv/deps/luajit.cmake +++ /dev/null @@ -1,407 +0,0 @@ -# Added LUAJIT_ADD_EXECUTABLE Ryan Phillips -# This CMakeLists.txt has been first taken from LuaDist -# Copyright (C) 2007-2011 LuaDist. -# Created by Peter DrahoÅ¡ -# Redistribution and use of this file is allowed according to the terms of the MIT license. -# Debugged and (now seriously) modified by Ronan Collobert, for Torch7 - -#project(LuaJIT C ASM) - -SET(LUAJIT_DIR ${CMAKE_CURRENT_LIST_DIR}/luajit) - -SET(CMAKE_REQUIRED_INCLUDES - ${LUAJIT_DIR} - ${LUAJIT_DIR}/src - ${CMAKE_CURRENT_BINARY_DIR} -) - -OPTION(WITH_AMALG "Build eveything in one shot (needs memory)" ON) - -# Ugly warnings -IF(MSVC) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) -ENDIF() - -# Various includes -INCLUDE(CheckLibraryExists) -INCLUDE(CheckFunctionExists) -INCLUDE(CheckCSourceCompiles) -INCLUDE(CheckTypeSize) - -# LuaJIT specific -option(LUAJIT_DISABLE_FFI "Disable FFI." OFF) -option(LUAJIT_ENABLE_LUA52COMPAT "Enable Lua 5.2 compatibility." ON) -option(LUAJIT_DISABLE_JIT "Disable JIT." OFF) -option(LUAJIT_CPU_SSE2 "Use SSE2 instead of x87 instructions." ON) -option(LUAJIT_CPU_NOCMOV "Disable NOCMOV." OFF) -MARK_AS_ADVANCED(LUAJIT_DISABLE_FFI LUAJIT_ENABLE_LUA52COMPAT LUAJIT_DISABLE_JIT LUAJIT_CPU_SSE2 LUAJIT_CPU_NOCMOV) - -IF(LUAJIT_DISABLE_FFI) - ADD_DEFINITIONS(-DLUAJIT_DISABLE_FFI) -ENDIF() - -IF(LUAJIT_ENABLE_LUA52COMPAT) - ADD_DEFINITIONS(-DLUAJIT_ENABLE_LUA52COMPAT) -ENDIF() - -IF(LUAJIT_DISABLE_JIT) - ADD_DEFINITIONS(-DLUAJIT_DISABLE_JIT) -ENDIF() - -IF(LUAJIT_CPU_SSE2) - ADD_DEFINITIONS(-DLUAJIT_CPU_SSE2) -ENDIF() - -IF(LUAJIT_CPU_NOCMOV) - ADD_DEFINITIONS(-DLUAJIT_CPU_NOCMOV) -ENDIF() -###### - - -CHECK_TYPE_SIZE("void*" SIZEOF_VOID_P) -IF(SIZEOF_VOID_P EQUAL 8) - ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE) -ENDIF() - -if ( WIN32 AND NOT CYGWIN ) - add_definitions ( -DLUAJIT_OS=LUAJIT_OS_WINDOWS) - set ( LJVM_MODE coffasm ) -elseif ( APPLE ) - set ( CMAKE_EXE_LINKER_FLAGS "-pagezero_size 10000 -image_base 100000000 ${CMAKE_EXE_LINKER_FLAGS}" ) - set ( LJVM_MODE machasm ) -else () - set ( LJVM_MODE elfasm ) -endif () - -IF(NOT WIN32) - FIND_LIBRARY(DL_LIBRARY "dl") - IF(DL_LIBRARY) - SET(CMAKE_REQUIRED_LIBRARIES ${DL_LIBRARY}) - LIST(APPEND LIBS ${DL_LIBRARY}) - ENDIF(DL_LIBRARY) - CHECK_FUNCTION_EXISTS(dlopen LUA_USE_DLOPEN) - IF(NOT LUA_USE_DLOPEN) - MESSAGE(FATAL_ERROR "Cannot compile a useful lua. -Function dlopen() seems not to be supported on your platform. -Apparently you are not on a Windows platform as well. -So lua has no way to deal with shared libraries!") - ENDIF(NOT LUA_USE_DLOPEN) -ENDIF(NOT WIN32) - -check_library_exists(m sin "" LUA_USE_LIBM) -if ( LUA_USE_LIBM ) - list ( APPEND LIBS m ) -endif () - -## SOURCES -MACRO(LJ_TEST_ARCH stuff) - CHECK_C_SOURCE_COMPILES(" -#undef ${stuff} -#include \"lj_arch.h\" -#if ${stuff} -int main() { return 0; } -#else -#error \"not defined\" -#endif -" ${stuff}) -ENDMACRO() - -MACRO(LJ_TEST_ARCH_VALUE stuff value) - CHECK_C_SOURCE_COMPILES(" -#undef ${stuff} -#include \"lj_arch.h\" -#if ${stuff} == ${value} -int main() { return 0; } -#else -#error \"not defined\" -#endif -" ${stuff}_${value}) -ENDMACRO() - - -FOREACH(arch X64 X86 ARM PPC PPCSPE MIPS) - LJ_TEST_ARCH(LJ_TARGET_${arch}) - if(LJ_TARGET_${arch}) - STRING(TOLOWER ${arch} TARGET_LJARCH) - MESSAGE(STATUS "LuaJIT Target: ${TARGET_LJARCH}") - BREAK() - ENDIF() -ENDFOREACH() - -IF(NOT TARGET_LJARCH) - MESSAGE(FATAL_ERROR "architecture not supported") -ELSE() - MESSAGE(STATUS "LuaJIT target ${TARGET_LJARCH}") -ENDIF() - -FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/jit) -FILE(GLOB jit_files ${LUAJIT_DIR}/src/jit/*.lua) -FILE(COPY ${jit_files} DESTINATION ${CMAKE_BINARY_DIR}/jit) - -SET(DASM_ARCH ${TARGET_LJARCH}) -SET(DASM_FLAGS) -SET(TARGET_ARCH) -LIST(APPEND TARGET_ARCH "LUAJIT_TARGET=LUAJIT_ARCH_${TARGET_LJARCH}") -LJ_TEST_ARCH_VALUE(LJ_ARCH_BITS 64) -IF(LJ_ARCH_BITS_64) - SET(DASM_FLAGS ${DASM_FLAGS} -D P64) -ENDIF() -LJ_TEST_ARCH_VALUE(LJ_HASJIT 1) -IF(LJ_HASJIT_1) - SET(DASM_FLAGS ${DASM_FLAGS} -D JIT) -ENDIF() -LJ_TEST_ARCH_VALUE(LJ_HASFFI 1) -IF(LJ_HASFFI_1) - SET(DASM_FLAGS ${DASM_FLAGS} -D FFI) -ENDIF() -LJ_TEST_ARCH_VALUE(LJ_DUALNUM 1) -IF(LJ_DUALNUM_1) - SET(DASM_FLAGS ${DASM_FLAGS} -D DUALNUM) -ENDIF() -LJ_TEST_ARCH_VALUE(LJ_ARCH_HASFPU 1) -IF(LJ_ARCH_HASFPU_1) - SET(DASM_FLAGS ${DASM_FLAGS} -D FPU) - LIST(APPEND TARGET_ARCH "LJ_ARCH_HASFPU=1") -ELSE() - LIST(APPEND TARGET_ARCH "LJ_ARCH_HASFPU=0") -ENDIF() -LJ_TEST_ARCH_VALUE(LJ_ABI_SOFTFP 1) -IF(NOT LJ_ABI_SOFTFP_1) - SET(DASM_FLAGS ${DASM_FLAGS} -D HFABI) - LIST(APPEND TARGET_ARCH "LJ_ABI_SOFTFP=0") -ELSE() - LIST(APPEND TARGET_ARCH "LJ_ABI_SOFTFP=1") -ENDIF() -IF(WIN32) - SET(DASM_FLAGS ${DASM_FLAGS} -LN -D WIN) -ENDIF() -IF(TARGET_LJARCH STREQUAL "x86") - LJ_TEST_ARCH_VALUE(__SSE2__ 1) - IF(__SSE2__1) - SET(DASM_FLAGS ${DASM_FLAGS} -D SSE) - ENDIF() -ENDIF() -IF(TARGET_LJARCH STREQUAL "x64") - SET(DASM_ARCH "x86") -ENDIF() -IF(TARGET_LJARCH STREQUAL "ppc") - LJ_TEST_ARCH_VALUE(LJ_ARCH_SQRT 1) - IF(NOT LJ_ARCH_SQRT_1) - SET(DASM_FLAGS ${DASM_FLAGS} -D SQRT) - ENDIF() - LJ_TEST_ARCH_VALUE(LJ_ARCH_PPC64 1) - IF(NOT LJ_ARCH_PPC64_1) - SET(DASM_FLAGS ${DASM_FLAGS} -D GPR64) - ENDIF() -ENDIF() - -add_executable(minilua ${LUAJIT_DIR}/src/host/minilua.c) -SET_TARGET_PROPERTIES(minilua PROPERTIES COMPILE_DEFINITIONS "${TARGET_ARCH}") -CHECK_LIBRARY_EXISTS(m sin "" MINILUA_USE_LIBM) -if(MINILUA_USE_LIBM) - TARGET_LINK_LIBRARIES(minilua m) -endif() - -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/buildvm_arch.h - COMMAND minilua ${LUAJIT_DIR}/dynasm/dynasm.lua ${DASM_FLAGS} -o ${CMAKE_CURRENT_BINARY_DIR}/buildvm_arch.h ${LUAJIT_DIR}/src/vm_${DASM_ARCH}.dasc - DEPENDS ${LUAJIT_DIR}/dynasm/dynasm.lua minilua -) - -SET(SRC_LJLIB - ${LUAJIT_DIR}/src/lib_base.c - ${LUAJIT_DIR}/src/lib_math.c - ${LUAJIT_DIR}/src/lib_bit.c - ${LUAJIT_DIR}/src/lib_string.c - ${LUAJIT_DIR}/src/lib_table.c - ${LUAJIT_DIR}/src/lib_io.c - ${LUAJIT_DIR}/src/lib_os.c - ${LUAJIT_DIR}/src/lib_package.c - ${LUAJIT_DIR}/src/lib_debug.c - ${LUAJIT_DIR}/src/lib_jit.c - ${LUAJIT_DIR}/src/lib_ffi.c) - -SET(SRC_LJCORE - ${LUAJIT_DIR}/src/lj_gc.c - ${LUAJIT_DIR}/src/lj_err.c - ${LUAJIT_DIR}/src/lj_char.c - ${LUAJIT_DIR}/src/lj_buf.c - ${LUAJIT_DIR}/src/lj_profile.c - ${LUAJIT_DIR}/src/lj_strfmt.c - ${LUAJIT_DIR}/src/lj_bc.c - ${LUAJIT_DIR}/src/lj_obj.c - ${LUAJIT_DIR}/src/lj_str.c - ${LUAJIT_DIR}/src/lj_tab.c - ${LUAJIT_DIR}/src/lj_func.c - ${LUAJIT_DIR}/src/lj_udata.c - ${LUAJIT_DIR}/src/lj_meta.c - ${LUAJIT_DIR}/src/lj_debug.c - ${LUAJIT_DIR}/src/lj_state.c - ${LUAJIT_DIR}/src/lj_dispatch.c - ${LUAJIT_DIR}/src/lj_vmevent.c - ${LUAJIT_DIR}/src/lj_vmmath.c - ${LUAJIT_DIR}/src/lj_strscan.c - ${LUAJIT_DIR}/src/lj_api.c - ${LUAJIT_DIR}/src/lj_lex.c - ${LUAJIT_DIR}/src/lj_parse.c - ${LUAJIT_DIR}/src/lj_bcread.c - ${LUAJIT_DIR}/src/lj_bcwrite.c - ${LUAJIT_DIR}/src/lj_load.c - ${LUAJIT_DIR}/src/lj_ir.c - ${LUAJIT_DIR}/src/lj_opt_mem.c - ${LUAJIT_DIR}/src/lj_opt_fold.c - ${LUAJIT_DIR}/src/lj_opt_narrow.c - ${LUAJIT_DIR}/src/lj_opt_dce.c - ${LUAJIT_DIR}/src/lj_opt_loop.c - ${LUAJIT_DIR}/src/lj_opt_split.c - ${LUAJIT_DIR}/src/lj_opt_sink.c - ${LUAJIT_DIR}/src/lj_mcode.c - ${LUAJIT_DIR}/src/lj_snap.c - ${LUAJIT_DIR}/src/lj_record.c - ${LUAJIT_DIR}/src/lj_crecord.c - ${LUAJIT_DIR}/src/lj_ffrecord.c - ${LUAJIT_DIR}/src/lj_asm.c - ${LUAJIT_DIR}/src/lj_trace.c - ${LUAJIT_DIR}/src/lj_gdbjit.c - ${LUAJIT_DIR}/src/lj_ctype.c - ${LUAJIT_DIR}/src/lj_cdata.c - ${LUAJIT_DIR}/src/lj_cconv.c - ${LUAJIT_DIR}/src/lj_ccall.c - ${LUAJIT_DIR}/src/lj_ccallback.c - ${LUAJIT_DIR}/src/lj_carith.c - ${LUAJIT_DIR}/src/lj_clib.c - ${LUAJIT_DIR}/src/lj_cparse.c - ${LUAJIT_DIR}/src/lj_lib.c - ${LUAJIT_DIR}/src/lj_alloc.c - ${LUAJIT_DIR}/src/lj_vmmath.c - ${LUAJIT_DIR}/src/lib_aux.c - ${LUAJIT_DIR}/src/lib_init.c - ${SRC_LJLIB}) - -SET(SRC_BUILDVM - ${LUAJIT_DIR}/src/host/buildvm.c - ${LUAJIT_DIR}/src/host/buildvm_asm.c - ${LUAJIT_DIR}/src/host/buildvm_peobj.c - ${LUAJIT_DIR}/src/host/buildvm_lib.c - ${LUAJIT_DIR}/src/host/buildvm_fold.c - ${CMAKE_CURRENT_BINARY_DIR}/buildvm_arch.h) - -## GENERATE -ADD_EXECUTABLE(buildvm ${SRC_BUILDVM}) -SET_TARGET_PROPERTIES(buildvm PROPERTIES COMPILE_DEFINITIONS "${TARGET_ARCH}") - -macro(add_buildvm_target _target _mode) - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_target} - COMMAND buildvm ARGS -m ${_mode} -o ${CMAKE_CURRENT_BINARY_DIR}/${_target} ${ARGN} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS buildvm ${ARGN} - ) -endmacro(add_buildvm_target) - -if (MSVC) - add_buildvm_target ( lj_vm.obj peobj ) - set (LJ_VM_SRC ${CMAKE_CURRENT_BINARY_DIR}/lj_vm.obj) -else () - add_buildvm_target ( lj_vm.S ${LJVM_MODE} ) - set (LJ_VM_SRC ${CMAKE_CURRENT_BINARY_DIR}/lj_vm.S) -endif () -add_buildvm_target ( lj_ffdef.h ffdef ${SRC_LJLIB} ) -add_buildvm_target ( lj_bcdef.h bcdef ${SRC_LJLIB} ) -add_buildvm_target ( lj_folddef.h folddef ${LUAJIT_DIR}/src/lj_opt_fold.c ) -add_buildvm_target ( lj_recdef.h recdef ${SRC_LJLIB} ) -add_buildvm_target ( lj_libdef.h libdef ${SRC_LJLIB} ) -add_buildvm_target ( vmdef.lua vmdef ${SRC_LJLIB} ) - -SET(DEPS - ${LJ_VM_SRC} - ${CMAKE_CURRENT_BINARY_DIR}/lj_ffdef.h - ${CMAKE_CURRENT_BINARY_DIR}/lj_bcdef.h - ${CMAKE_CURRENT_BINARY_DIR}/lj_libdef.h - ${CMAKE_CURRENT_BINARY_DIR}/lj_recdef.h - ${CMAKE_CURRENT_BINARY_DIR}/lj_folddef.h - ${CMAKE_CURRENT_BINARY_DIR}/vmdef.lua - ) - -## COMPILE -include_directories( - ${LUAJIT_DIR}/dynasm - ${LUAJIT_DIR}/src - ${CMAKE_CURRENT_BINARY_DIR} -) - -IF(WITH_SHARED_LUA) - IF(WITH_AMALG) - add_library(luajit-5.1 SHARED ${LUAJIT_DIR}/src/ljamalg.c ${DEPS} ) - ELSE() - add_library(luajit-5.1 SHARED ${SRC_LJCORE} ${DEPS} ) - ENDIF() - SET_TARGET_PROPERTIES(luajit-5.1 PROPERTIES OUTPUT_NAME "lua51") -ELSE() - IF(WITH_AMALG) - add_library(luajit-5.1 STATIC ${LUAJIT_DIR}/src/ljamalg.c ${DEPS} ) - ELSE() - add_library(luajit-5.1 STATIC ${SRC_LJCORE} ${DEPS} ) - ENDIF() - SET_TARGET_PROPERTIES(luajit-5.1 PROPERTIES - PREFIX "lib" IMPORT_PREFIX "lib" OUTPUT_NAME "luajit") -ENDIF() - -target_link_libraries (luajit-5.1 ${LIBS} ) - -IF(WIN32) - add_executable(luajit ${LUAJIT_DIR}/src/luajit.c) - target_link_libraries(luajit luajit-5.1) -ELSE() - IF(WITH_AMALG) - add_executable(luajit ${LUAJIT_DIR}/src/luajit.c ${LUAJIT_DIR}/src/ljamalg.c ${DEPS}) - ELSE() - add_executable(luajit ${LUAJIT_DIR}/src/luajit.c ${SRC_LJCORE} ${DEPS}) - ENDIF() - target_link_libraries(luajit ${LIBS}) - SET_TARGET_PROPERTIES(luajit PROPERTIES ENABLE_EXPORTS ON) -ENDIF() - -MACRO(LUAJIT_add_custom_commands luajit_target) - SET(target_srcs "") - FOREACH(file ${ARGN}) - IF(${file} MATCHES ".*\\.lua$") - set(file "${CMAKE_CURRENT_SOURCE_DIR}/${file}") - set(source_file ${file}) - string(LENGTH ${CMAKE_SOURCE_DIR} _luajit_source_dir_length) - string(LENGTH ${file} _luajit_file_length) - math(EXPR _begin "${_luajit_source_dir_length} + 1") - math(EXPR _stripped_file_length "${_luajit_file_length} - ${_luajit_source_dir_length} - 1") - string(SUBSTRING ${file} ${_begin} ${_stripped_file_length} stripped_file) - - set(generated_file "${CMAKE_BINARY_DIR}/jitted_tmp/${stripped_file}_${luajit_target}_generated${CMAKE_C_OUTPUT_EXTENSION}") - - add_custom_command( - OUTPUT ${generated_file} - MAIN_DEPENDENCY ${source_file} - DEPENDS luajit - COMMAND luajit - ARGS -bg - ${source_file} - ${generated_file} - COMMENT "Building Luajitted ${source_file}: ${generated_file}" - ) - - get_filename_component(basedir ${generated_file} PATH) - file(MAKE_DIRECTORY ${basedir}) - - set(target_srcs ${target_srcs} ${generated_file}) - set_source_files_properties( - ${generated_file} - properties - external_object true # this is an object file - generated true # to say that "it is OK that the obj-files do not exist before build time" - ) - ELSE() - set(target_srcs ${target_srcs} ${file}) - ENDIF(${file} MATCHES ".*\\.lua$") - ENDFOREACH(file) -ENDMACRO() - -MACRO(LUAJIT_ADD_EXECUTABLE luajit_target) - LUAJIT_add_custom_commands(${luajit_target} ${ARGN}) - add_executable(${luajit_target} ${target_srcs}) -ENDMACRO(LUAJIT_ADD_EXECUTABLE luajit_target) diff --git a/3rdparty/luv/deps/uv.cmake b/3rdparty/luv/deps/uv.cmake deleted file mode 100644 index b6570b26b60..00000000000 --- a/3rdparty/luv/deps/uv.cmake +++ /dev/null @@ -1,224 +0,0 @@ -## Modifications -## Copyright 2014 The Luvit Authors. All Rights Reserved. - -## Original Copyright -# Copyright (c) 2014 David Capello -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -include(CheckTypeSize) - -cmake_minimum_required(VERSION 2.8.9) - -set(LIBUVDIR ${CMAKE_CURRENT_LIST_DIR}/libuv) - -include_directories( - ${LIBUVDIR}/src - ${LIBUVDIR}/include -) - -set(SOURCES - ${LIBUVDIR}/include/uv.h - ${LIBUVDIR}/include/tree.h - ${LIBUVDIR}/include/uv-errno.h - ${LIBUVDIR}/include/uv-threadpool.h - ${LIBUVDIR}/include/uv-version.h - ${LIBUVDIR}/src/fs-poll.c - ${LIBUVDIR}/src/heap-inl.h - ${LIBUVDIR}/src/inet.c - ${LIBUVDIR}/src/queue.h - ${LIBUVDIR}/src/threadpool.c - ${LIBUVDIR}/src/uv-common.c - ${LIBUVDIR}/src/uv-common.h - ${LIBUVDIR}/src/version.c -) - -if(WIN32) - add_definitions( - -D_WIN32_WINNT=0x0600 - -D_CRT_SECURE_NO_WARNINGS - -D_GNU_SOURCE - ) - set(SOURCES ${SOURCES} - ${LIBUVDIR}/include/uv-win.h - ${LIBUVDIR}/src/win/async.c - ${LIBUVDIR}/src/win/atomicops-inl.h - ${LIBUVDIR}/src/win/core.c - ${LIBUVDIR}/src/win/dl.c - ${LIBUVDIR}/src/win/error.c - ${LIBUVDIR}/src/win/fs.c - ${LIBUVDIR}/src/win/fs-event.c - ${LIBUVDIR}/src/win/getaddrinfo.c - ${LIBUVDIR}/src/win/getnameinfo.c - ${LIBUVDIR}/src/win/handle.c - ${LIBUVDIR}/src/win/handle-inl.h - ${LIBUVDIR}/src/win/internal.h - ${LIBUVDIR}/src/win/loop-watcher.c - ${LIBUVDIR}/src/win/pipe.c - ${LIBUVDIR}/src/win/thread.c - ${LIBUVDIR}/src/win/poll.c - ${LIBUVDIR}/src/win/process.c - ${LIBUVDIR}/src/win/process-stdio.c - ${LIBUVDIR}/src/win/req.c - ${LIBUVDIR}/src/win/req-inl.h - ${LIBUVDIR}/src/win/signal.c - ${LIBUVDIR}/src/win/snprintf.c - ${LIBUVDIR}/src/win/stream.c - ${LIBUVDIR}/src/win/stream-inl.h - ${LIBUVDIR}/src/win/tcp.c - ${LIBUVDIR}/src/win/tty.c - ${LIBUVDIR}/src/win/timer.c - ${LIBUVDIR}/src/win/udp.c - ${LIBUVDIR}/src/win/util.c - ${LIBUVDIR}/src/win/winapi.c - ${LIBUVDIR}/src/win/winapi.h - ${LIBUVDIR}/src/win/winsock.c - ${LIBUVDIR}/src/win/winsock.h - ) -else() - include_directories(${LIBUVDIR}/src/unix) - set(SOURCES ${SOURCES} - ${LIBUVDIR}/include/uv-unix.h - ${LIBUVDIR}/include/uv-linux.h - ${LIBUVDIR}/include/uv-sunos.h - ${LIBUVDIR}/include/uv-darwin.h - ${LIBUVDIR}/include/uv-bsd.h - ${LIBUVDIR}/include/uv-aix.h - ${LIBUVDIR}/src/unix/async.c - ${LIBUVDIR}/src/unix/atomic-ops.h - ${LIBUVDIR}/src/unix/core.c - ${LIBUVDIR}/src/unix/dl.c - ${LIBUVDIR}/src/unix/fs.c - ${LIBUVDIR}/src/unix/getaddrinfo.c - ${LIBUVDIR}/src/unix/getnameinfo.c - ${LIBUVDIR}/src/unix/internal.h - ${LIBUVDIR}/src/unix/loop.c - ${LIBUVDIR}/src/unix/loop-watcher.c - ${LIBUVDIR}/src/unix/pipe.c - ${LIBUVDIR}/src/unix/poll.c - ${LIBUVDIR}/src/unix/process.c - ${LIBUVDIR}/src/unix/signal.c - ${LIBUVDIR}/src/unix/spinlock.h - ${LIBUVDIR}/src/unix/stream.c - ${LIBUVDIR}/src/unix/tcp.c - ${LIBUVDIR}/src/unix/thread.c - ${LIBUVDIR}/src/unix/timer.c - ${LIBUVDIR}/src/unix/tty.c - ${LIBUVDIR}/src/unix/udp.c - ) -endif() - -check_type_size("void*" SIZEOF_VOID_P) -if(SIZEOF_VOID_P EQUAL 8) - add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE) -endif() - -## Freebsd -if("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD") - set(SOURCES ${SOURCES} - ${LIBUVDIR}/src/unix/kqueue.c - ${LIBUVDIR}/src/unix/freebsd.c - ) -endif() - -## Linux -if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") - add_definitions( - -D_GNU_SOURCE - ) - set(SOURCES ${SOURCES} - ${LIBUVDIR}/src/unix/proctitle.c - ${LIBUVDIR}/src/unix/linux-core.c - ${LIBUVDIR}/src/unix/linux-inotify.c - ${LIBUVDIR}/src/unix/linux-syscalls.c - ${LIBUVDIR}/src/unix/linux-syscalls.h - ) -endif() - -## SunOS -if("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS") - add_definitions( - -D__EXTENSIONS__ - -D_XOPEN_SOURCE=500 - ) - set(SOURCES ${SOURCES} - ${LIBUVDIR}/src/unix/sunos.c - ) -endif() - -## Darwin -if(APPLE) - add_definitions( - -D=_DARWIN_USE_64_BIT_INODE - ) - set(SOURCES ${SOURCES} - ${LIBUVDIR}/src/unix/proctitle.c - ${LIBUVDIR}/src/unix/darwin.c - ${LIBUVDIR}/src/unix/fsevents.c - ${LIBUVDIR}/src/unix/darwin-proctitle.c - ${LIBUVDIR}/src/unix/kqueue.c - ) -endif() - -add_library(uv STATIC ${SOURCES}) -set_property(TARGET uv PROPERTY POSITION_INDEPENDENT_CODE ON) - -if("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD") - target_link_libraries(uv - pthread - kvm - ) -endif() - -if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") - target_link_libraries(uv - pthread - ) -endif() - -if(WIN32) - target_link_libraries(uv - ws2_32.lib - shell32.lib - psapi.lib - iphlpapi.lib - advapi32.lib - Userenv.lib - ) -endif() - -if("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS") - target_link_libraries(uv - kstat - socket - sendfile - ) -endif() - -if(APPLE) - find_library(FOUNDATION_LIBRARY Foundation) - find_library(CORESERVICES_LIBRARY CoreServices) - find_library(APPLICATION_SERVICES_LIBRARY ApplicationServices) - target_link_libraries(uv - ${FOUNDATION_LIBRARY} - ${CORESERVICES_LIBRARY} - ${APPLICATION_SERVICES_LIBRARY} - ) -endif() diff --git a/3rdparty/luv/docs.md b/3rdparty/luv/docs.md deleted file mode 100644 index 187dec24ff1..00000000000 --- a/3rdparty/luv/docs.md +++ /dev/null @@ -1,1309 +0,0 @@ -# LibUV in Lua - -The [luv][] project provides access to the multi-platform support library -[libuv][] to lua code. It was primariliy developed for the [luvit][] project as -the `uv` builtin module, but can be used in other lua environments. - -### TCP Echo Server Example - -Here is a small example showing a TCP echo server: - -```lua -local uv = require('uv') - -local server = uv.new_tcp() -server:bind("127.0.0.1", 1337) -server:listen(128, function (err) - assert(not err, err) - local client = uv.new_tcp() - server:accept(client) - client:read_start(function (err, chunk) - assert(not err, err) - if chunk then - client:write(chunk) - else - client:shutdown() - client:close() - end - end) -end) -print("TCP server listening at 127.0.0.1 port 1337") -uv.run() -``` - -### Methods vs Functions - -As a quick note, [libuv][] is a C library and as such, there are no such things -as methods. The [luv][] bindings allow calling the libuv functions as either -functions or methods. For example, calling `server:bind(host, port)` is -equivalent to calling `uv.tcp_bind(server, host, port)`. All wrapped uv types -in lua have method shortcuts where is makes sense. Some are even renamed -shorter like the `tcp_` prefix that removed in method form. Under the hood it's -the exact same C function. - -## Table Of Contents - -The rest of the docs are organized by libuv type. There is some hierarchy as -most types are considered handles and some are considered streams. - - - [`uv_loop_t`][] — Event loop - - [`uv_handle_t`][] — Base handle - - [`uv_timer_t`][] — Timer handle - - [`uv_prepare_t`][] — Prepare handle - - [`uv_check_t`][] — Check handle - - [`uv_idle_t`][] — Idle handle - - [`uv_async_t`][] — Async handle - - [`uv_poll_t`][] — Poll handle - - [`uv_signal_t`][] — Signal handle - - [`uv_process_t`][] — Process handle - - [`uv_stream_t`][] — Stream handle - - [`uv_tcp_t`][] — TCP handle - - [`uv_pipe_t`][] — Pipe handle - - [`uv_tty_t`][] — TTY handle - - [`uv_udp_t`][] — UDP handle - - [`uv_fs_event_t`][] — FS Event handle - - [`uv_fs_poll_t`][] — FS Poll handle - - [Filesystem operations][] - - [DNS utility functions][] - - [Miscellaneous utilities][] - -## `uv_loop_t` — Event loop - -[`uv_loop_t`]: #uv_loop_t--event-loop - -The event loop is the central part of libuv’s functionality. It takes care of -polling for i/o and scheduling callbacks to be run based on different sources of -events. - -In [luv][], there is an implicit uv loop for every lua state that loads the -library. You can use this library in an multithreaded environment as long as -each thread has it's own lua state with corresponsding own uv loop. - -### `uv.loop_close()` - -Closes all internal loop resources. This function must only be called once the -loop has finished its execution or it will raise a UV_EBUSY error. - -### `uv.run([mode])` - -> optional `mode` defaults to `"default"` - -This function runs the event loop. It will act differently depending on the -specified mode: - - - `"default"`: Runs the event loop until there are no more active and - referenced handles or requests. Always returns `false`. - - - `"once"`: Poll for i/o once. Note that this function blocks if there are no - pending callbacks. Returns `false` when done (no active handles or requests - left), or `true` if more callbacks are expected (meaning you should run - the event loop again sometime in the future). - - - `"nowait"`: Poll for i/o once but don’t block if there are no - pending callbacks. Returns `false` if done (no active handles or requests - left), or `true` if more callbacks are expected (meaning you should run - the event loop again sometime in the future). - -Luvit will implicitly call `uv.run()` after loading user code, but if you use -the `luv` bindings directly, you need to call this after registering your -initial set of event callbacks to start the event loop. - -### `uv.loop_alive()` - -Returns true if there are active handles or request in the loop. - -### `uv.stop()` - -Stop the event loop, causing `uv_run()` to end as soon as possible. This -will happen not sooner than the next loop iteration. If this function was called -before blocking for i/o, the loop won’t block for i/o on this iteration. - -### `uv.backend_fd()` - -Get backend file descriptor. Only kqueue, epoll and event ports are supported. - -This can be used in conjunction with `uv_run("nowait")` to poll in one thread -and run the event loop’s callbacks in another. - -**Note**: Embedding a kqueue fd in another kqueue pollset doesn’t work on all -platforms. It’s not an error to add the fd but it never generates events. - -### `uv.backend_timeout()` - -Get the poll timeout. The return value is in milliseconds, or -1 for no timeout. - -### `uv.now()` - -Return the current timestamp in milliseconds. The timestamp is cached at the -start of the event loop tick, see `uv.update_time()` for details and rationale. - -The timestamp increases monotonically from some arbitrary point in time. Don’t -make assumptions about the starting point, you will only get disappointed. - -**Note**: Use `uv.hrtime()` if you need sub-millisecond granularity. - -### `uv.update_time()` - -Update the event loop’s concept of “nowâ€. Libuv caches the current time at the -start of the event loop tick in order to reduce the number of time-related -system calls. - -You won’t normally need to call this function unless you have callbacks that -block the event loop for longer periods of time, where “longer†is somewhat -subjective but probably on the order of a millisecond or more. - -### `uv.walk(callback)` - -Walk the list of handles: `callback` will be executed with the handle. - -```lua --- Example usage of uv.walk to close all handles that aren't already closing. -uv.walk(function (handle) - if not handle:is_closing() then - handle:close() - end -end) -``` - -## `uv_handle_t` — Base handle - -[`uv_handle_t`]: #uv_handle_t--base-handle - -`uv_handle_t` is the base type for all libuv handle types. - -Structures are aligned so that any libuv handle can be cast to `uv_handle_t`. -All API functions defined here work with any handle type. - -### `uv.is_active(handle)` - -> method form `handle:is_active()` - -Returns `true` if the handle is active, `false` if it’s inactive. What “active†-means depends on the type of handle: - - - A [`uv_async_t`][] handle is always active and cannot be deactivated, except - by closing it with uv_close(). - - - A [`uv_pipe_t`][], [`uv_tcp_t`][], [`uv_udp_t`][], etc. handlebasically any - handle that deals with i/ois active when it is doing something that - involves i/o, like reading, writing, connecting, accepting new connections, - etc. - - - A [`uv_check_t`][], [`uv_idle_t`][], [`uv_timer_t`][], etc. handle is active - when it has been started with a call to `uv.check_start()`, - `uv.idle_start()`, etc. - -Rule of thumb: if a handle of type `uv_foo_t` has a `uv.foo_start()` function, -then it’s active from the moment that function is called. Likewise, -`uv.foo_stop()` deactivates the handle again. - -### `uv.is_closing(handle)` - -> method form `handle:is_closing()` - -Returns `true` if the handle is closing or closed, `false` otherwise. - -**Note**: This function should only be used between the initialization of the -handle and the arrival of the close callback. - -### `uv.close(handle, callback)` - -> method form `handle:close(callback)` - -Request handle to be closed. `callback` will be called asynchronously after this -call. This MUST be called on each handle before memory is released. - -Handles that wrap file descriptors are closed immediately but `callback` will -still be deferred to the next iteration of the event loop. It gives you a chance -to free up any resources associated with the handle. - -In-progress requests, like `uv_connect_t` or `uv_write_t`, are cancelled and -have their callbacks called asynchronously with `status=UV_ECANCELED`. - -### `uv.ref(handle)` - -> method form `handle:ref()` - -Reference the given handle. References are idempotent, that is, if a handle is -already referenced calling this function again will have no effect. - -See [Reference counting][]. - -### `uv.unref(handle)` - -> method form `handle:unref()` - -Un-reference the given handle. References are idempotent, that is, if a handle -is not referenced calling this function again will have no effect. - -See [Reference counting][]. - -### `uv.has_ref(handle)` - -> method form `handle:has_ref()` - -Returns `true` if the handle referenced, `false` otherwise. - -See [Reference counting][]. - -### `uv.send_buffer_size(handle, [size]) -> size` - -> method form `handle:send_buffer_size(size)` - -Gets or sets the size of the send buffer that the operating system uses for the -socket. - -If `size` is omitted, it will return the current send buffer size, otherwise it -will use `size` to set the new send buffer size. - -This function works for TCP, pipe and UDP handles on Unix and for TCP and UDP -handles on Windows. - -**Note**: Linux will set double the size and return double the size of the -original set value. - -### `uv.recv_buffer_size(handle, [size])` - -> method form `handle:recv_buffer_size(size)` - -Gets or sets the size of the receive buffer that the operating system uses for -the socket. - -If `size` is omitted, it will return the current receive buffer size, otherwise -it will use `size` to set the new receive buffer size. - -This function works for TCP, pipe and UDP handles on Unix and for TCP and UDP -handles on Windows. - -**Note**: Linux will set double the size and return double the size of the -original set value. - -### `uv.fileno(handle)` - -> method form `handle:fileno()` - -Gets the platform dependent file descriptor equivalent. - -The following handles are supported: TCP, pipes, TTY, UDP and poll. Passing any -other handle type will fail with UV_EINVAL. - -If a handle doesn’t have an attached file descriptor yet or the handle itself -has been closed, this function will return UV_EBADF. - -**Warning**: Be very careful when using this function. libuv assumes it’s in -control of the file descriptor so any change to it may lead to malfunction. - -## Reference counting - -[reference counting]: #reference-counting - -The libuv event loop (if run in the default mode) will run until there are no -active and referenced handles left. The user can force the loop to exit early by -unreferencing handles which are active, for example by calling `uv.unref()` -after calling `uv.timer_start()`. - -A handle can be referenced or unreferenced, the refcounting scheme doesn’t use a -counter, so both operations are idempotent. - -All handles are referenced when active by default, see `uv.is_active()` for a -more detailed explanation on what being active involves. - -## `uv_timer_t` — Timer handle - -[`uv_timer_t`]: #uv_timer_t--timer-handle - -Timer handles are used to schedule callbacks to be called in the future. - -### `uv.new_timer() -> timer` - -Creates and initializes a new `uv_timer_t`. Returns the lua userdata wrapping -it. - -```lua --- Creating a simple setTimeout wrapper -local function setTimeout(timeout, callback) - local timer = uv.new_timer() - timer:start(timeout, 0, function () - timer:stop() - timer:close() - callback() - end) - return timer -end - --- Creating a simple setInterval wrapper -local function setInterval(interval, callback) - local timer = uv.new_timer() - timer:start(interval, interval, function () - timer:stop() - timer:close() - callback() - end) - return timer -end - --- And clearInterval -local function clearInterval(timer) - timer:stop() - timer:close() -end -``` - -### `uv.timer_start(timer, timeout, repeat, callback)` - -> method form `timer:start(timeout, repeat, callback)` - -Start the timer. `timeout` and `repeat` are in milliseconds. - -If `timeout` is zero, the callback fires on the next event loop iteration. If -`repeat` is non-zero, the callback fires first after timeout milliseconds and -then repeatedly after repeat milliseconds. - -### `uv.timer_stop(timer)` - -> method form `timer:stop()` - -Stop the timer, the callback will not be called anymore. - -### `uv.timer_again(timer)` - -> method form `timer:again()` - -Stop the timer, and if it is repeating restart it using the repeat value as the -timeout. If the timer has never been started before it raises `EINVAL`. - -### `uv.timer_set_repeat(timer, repeat)` - -> method form `timer:set_repeat(repeat)` - -Set the repeat value in milliseconds. - -**Note**: If the repeat value is set from a timer callback it does not -immediately take effect. If the timer was non-repeating before, it will have -been stopped. If it was repeating, then the old repeat value will have been -used to schedule the next timeout. - -### `uv.timer_get_repeat(timer) -> repeat` - -> method form `timer:get_repeat() -> repeat` - -Get the timer repeat value. - -## `uv_prepare_t` — Prepare handle - -[`uv_prepare_t`]: #uv_prepare_t--prepare-handle - -Prepare handles will run the given callback once per loop iteration, right before polling for i/o. - -```lua -local prepare = uv.new_prepare() -prepare:start(function() - print("Before I/O polling") -end) -``` - -### `uv.new_prepare() -> prepare` - -Creates and initializes a new `uv_prepare_t`. Returns the lua userdata wrapping -it. - -### `uv.prepare_start(prepare, callback)` - -> method form `prepare:start(callback)` - -Start the handle with the given callback. - -### `uv.prepare_stop(prepare)` - -> method form `prepare:stop()` - -Stop the handle, the callback will no longer be called. - -## `uv_check_t` — Check handle - -[`uv_check_t`]: #uv_check_t--check-handle - -Check handles will run the given callback once per loop iteration, right after -polling for i/o. - -```lua -local check = uv.new_check() -check:start(function() - print("After I/O polling") -end) -``` - -### `uv.new_check() -> check` - -Creates and initializes a new `uv_check_t`. Returns the lua userdata wrapping -it. - -### `uv.check_start(check, callback)` - -> method form `check:start(callback)` - -Start the handle with the given callback. - -### `uv.check_stop(check)` - -> method form `check:stop()` - -Stop the handle, the callback will no longer be called. - -## `uv_idle_t` — Idle handle - -[`uv_idle_t`]: #uv_idle_t--idle-handle - -Idle handles will run the given callback once per loop iteration, right before -the [`uv_prepare_t`][] handles. - -**Note**: The notable difference with prepare handles is that when there are -active idle handles, the loop will perform a zero timeout poll instead of -blocking for i/o. - -**Warning**: Despite the name, idle handles will get their callbacks called on -every loop iteration, not when the loop is actually “idleâ€. - -```lua -local idle = uv.new_idle() -idle:start(function() - print("Before I/O polling, no blocking") -end) -``` -### `uv.new_idle() -> idle` - -Creates and initializes a new `uv_idle_t`. Returns the lua userdata wrapping -it. - -### `uv.idle_start(idle, callback)` - -> method form `idle:start(callback)` - -Start the handle with the given callback. - -### `uv.idle_stop(check)` - -> method form `idle:stop()` - -Stop the handle, the callback will no longer be called. - -## `uv_async_t` — Async handle - -[`uv_async_t`]: #uv_async_t--async-handle - -Async handles allow the user to “wakeup†the event loop and get a callback -called from another thread. - -```lua -local async -async = uv.new_async(function() - print("async operation ran") - async:close() -end) - -async:send() -``` - -### `uv.new_async(callback) -> async` - -Creates and initializes a new `uv_async_t`. Returns the lua userdata wrapping -it. A NULL callback is allowed. - -**Note**: Unlike other handle initialization functions, it immediately starts -the handle. - -### `uv.async_send(async)` - -> method form `async:send()` - -Wakeup the event loop and call the async handle’s callback. - -**Note**: It’s safe to call this function from any thread. The callback will be -called on the loop thread. - -**Warning**: libuv will coalesce calls to `uv.async_send(async)`, that is, not -every call to it will yield an execution of the callback, the only guarantee is -that it will be called at least once. Thus, calling this function may not -wakeup the event loop if it was already called previously within a short period -of time. - -## `uv_poll_t` — Poll handle - -[`uv_poll_t`]: #uv_poll_t--poll-handle - -Poll handles are used to watch file descriptors for readability and writability, -similar to the purpose of [poll(2)](http://linux.die.net/man/2/poll). - -The purpose of poll handles is to enable integrating external libraries that -rely on the event loop to signal it about the socket status changes, like c-ares -or libssh2. Using `uv_poll_t` for any other purpose is not recommended; -`uv_tcp_t`, `uv_udp_t`, etc. provide an implementation that is faster and more -scalable than what can be achieved with `uv_poll_t`, especially on Windows. - -It is possible that poll handles occasionally signal that a file descriptor is -readable or writable even when it isn’t. The user should therefore always be -prepared to handle EAGAIN or equivalent when it attempts to read from or write -to the fd. - -It is not okay to have multiple active poll handles for the same socket, this -can cause libuv to busyloop or otherwise malfunction. - -The user should not close a file descriptor while it is being polled by an -active poll handle. This can cause the handle to report an error, but it might -also start polling another socket. However the fd can be safely closed -immediately after a call to `uv.poll_stop()` or `uv.close()`. - -**Note** On windows only sockets can be polled with poll handles. On Unix any -file descriptor that would be accepted by poll(2) can be used. - - -### `uv.new_poll(fd) -> poll` - -Initialize the handle using a file descriptor. - -The file descriptor is set to non-blocking mode. - -### `uv.new_socket_poll(fd) -> poll` - -Initialize the handle using a socket descriptor. On Unix this is identical to -`uv.poll_init()`. On windows it takes a SOCKET handle. - -The socket is set to non-blocking mode. - -### `uv.poll_start(poll, events, callback)` - -> method form `poll:start()` - -Starts polling the file descriptor. `events` is `"r"`, `"w"`, or `"rw"` and -translates to a bitmask made up of UV_READABLE and UV_WRITABLE. As soon as an -event is detected the callback will be called with status set to 0, and the -detected events set on the events field. - -The user should not close the socket while the handle is active. If the user -does that anyway, the callback may be called reporting an error status, but this -is not guaranteed. - -**Note** Calling `uv.poll_start()`` on a handle that is already active is fine. -Doing so will update the events mask that is being watched for. - -## `uv.poll_stop(poll)` - -> method form `poll:stop()` - -Stop polling the file descriptor, the callback will no longer be called. - -## `uv_signal_t` — Signal handle - -[`uv_signal_t`]: #uv_signal_t--signal-handle - -Signal handles implement Unix style signal handling on a per-event loop bases. - -Reception of some signals is emulated on Windows: -* SIGINT is normally delivered when the user presses CTRL+C. However, like on -Unix, it is not generated when terminal raw mode is enabled. -* SIGBREAK is delivered when the user pressed CTRL + BREAK. -* SIGHUP is generated when the user closes the console window. On SIGHUP the -program is given approximately 10 seconds to perform cleanup. After that -Windows will unconditionally terminate it. -* SIGWINCH is raised whenever libuv detects that the console has been resized. -SIGWINCH is emulated by libuv when the program uses a uv_tty_t handle to write -to the console. SIGWINCH may not always be delivered in a timely manner; libuv -will only detect size changes when the cursor is being moved. When a readable -[`uv_tty_t`][] handle is used in raw mode, resizing the console buffer will -also trigger a SIGWINCH signal. - -Watchers for other signals can be successfully created, but these signals are -never received. These signals are: SIGILL, SIGABRT, SIGFPE, SIGSEGV, SIGTERM -and SIGKILL. - -Calls to raise() or abort() to programmatically raise a signal are not detected -by libuv; these will not trigger a signal watcher. - -**Note**: On Linux SIGRT0 and SIGRT1 (signals 32 and 33) are used by the NPTL -pthreads library to manage threads. Installing watchers for those signals will -lead to unpredictable behavior and is strongly discouraged. Future versions of -libuv may simply reject them. - -```lua --- Create a new signal handler -local sigint = uv.new_signal() --- Define a handler function -uv.signal_start(sigint, "sigint", function(signal) -print("got " .. signal .. ", shutting down") -os.exit(1) -end) -``` - -### `uv.new_signal() -> signal` - -Creates and initializes a new `uv_signal_t`. Returns the lua userdata wrapping -it. - -### `uv.signal_start(signal, signum, callback)` - -> method form `signal:start(signum, callback)` - -Start the handle with the given callback, watching for the given signal. - -### `uv.signal_stop(signal)` - -> method form `signal:stop()` - -Stop the handle, the callback will no longer be called. - -## `uv_process_t` — Process handle - -[`uv_process_t`]: #uv_process_t--process-handle - -Process handles will spawn a new process and allow the user to control it and -establish communication channels with it using streams. - -### `uv.disable_stdio_inheritance()` - -Disables inheritance for file descriptors / handles that this process inherited -from its parent. The effect is that child processes spawned by this process -don’t accidentally inherit these handles. - -It is recommended to call this function as early in your program as possible, -before the inherited file descriptors can be closed or duplicated. - -**Note** This function works on a best-effort basis: there is no guarantee that -libuv can discover all file descriptors that were inherited. In general it does -a better job on Windows than it does on Unix. - -### `uv.spawn(file, options, onexit) -> process, pid` - -Initializes the process handle and starts the process. If the process is -successfully spawned, this function will return the handle and pid of the child -process. - -Possible reasons for failing to spawn would include (but not be limited to) the -file to execute not existing, not having permissions to use the setuid or setgid -specified, or not having enough memory to allocate for the new process. - - -```lua -local stdout = uv.new_pipe(false) -local stderr = uv.new_pipe(false) -local stdin = uv.new_pipe(false) - -local handle, pid - -local function onexit(code, signal) - p("exit", {code=code,signal=signal}) -end - -local function onclose() - p("close") -end - -local function onread(err, chunk) - assert(not err, err) - if (chunk) then - p("data", {data=chunk}) - else - p("end") - end -end - -local function onshutdown() - uv.close(handle, onclose) -end - -handle, pid = uv.spawn("cat", { - stdio = {stdin, stdout, stderr} -}, onexit) - -p{ - handle=handle, - pid=pid -} - -uv.read_start(stdout, onread) -uv.read_start(stderr, onread) -uv.write(stdin, "Hello World") -uv.shutdown(stdin, onshutdown) -``` - - - `options.args` - Command line arguments as a list of string. The first string - should be the path to the program. On Windows this uses CreateProcess which - concatenates the arguments into a string this can cause some strange errors. - (See `options.verbatim` below for Windows.) - - `options.stdio` - Set the file descriptors that will be made available to the - child process. The convention is that the first entries are stdin, stdout, - and stderr. (**Note** On Windows file descriptors after the third are - available to the child process only if the child processes uses the MSVCRT - runtime.) - - `options.env` - Set environment variables for the new process. - - `options.cwd` - Set current working directory for the subprocess. - - `options.uid` - Set the child process' user id. - - `options.gid` - Set the child process' group id. - - `options.verbatim` - If true, do not wrap any arguments in quotes, or perform - any other escaping, when converting the argument list into a command line - string. This option is only meaningful on Windows systems. On Unix it is - silently ignored. - - `options.detached` - If true, spawn the child process in a detached state - - this will make it a process group leader, and will effectively enable the - child to keep running after the parent exits. Note that the child process - will still keep the parent's event loop alive unless the parent process calls - `uv.unref()` on the child's process handle. - - `options.hide` - If true, hide the subprocess console window that would - normally be created. This option is only meaningful on Windows systems. On - Unix it is silently ignored. - -The `options.stdio` entries can take many shapes. - -- If they are numbers, then the child process inherits that same zero-indexed fd - from the parent process. -- If `uv_stream_h` handles are passed in, those are used as a read-write pipe or - inherited stream depending if the stream has a valid fd. -- Including `nil` placeholders means to ignore that fd in the child. - -When the child process exits, the `onexit` callback will be called with exit -code and signal. - -### `uv.process_kill(process, sigmun)` - -> method form `process:kill(sigmun)` - -Sends the specified signal to the given process handle. - -### `uv.kill(pid, sigmun)` - -Sends the specified signal to the given PID. - -## `uv_stream_t` — Stream handle - -[`uv_stream_t`]: #uv_stream_t--stream-handle - -Stream handles provide an abstraction of a duplex communication channel. -[`uv_stream_t`][] is an abstract type, libuv provides 3 stream implementations in -the form of [`uv_tcp_t`][], [`uv_pipe_t`][] and [`uv_tty_t`][]. - -### `uv.shutdown(stream, [callback]) -> req` - -> (method form `stream:shutdown([callback]) -> req`) - -Shutdown the outgoing (write) side of a duplex stream. It waits for pending -write requests to complete. The callback is called after -shutdown is complete. - -### `uv.listen(stream, backlog, callback)` - -> (method form `stream:listen(backlog, callback)`) - -Start listening for incoming connections. `backlog` indicates the number of -connections the kernel might queue, same as `listen(2)`. When a new incoming -connection is received the callback is called. - -### `uv.accept(stream, client_stream)` - -> (method form `stream:accept(client_stream)`) - -This call is used in conjunction with `uv.listen()` to accept incoming -connections. Call this function after receiving a callback to accept the -connection. - -When the connection callback is called it is guaranteed that this function -will complete successfully the first time. If you attempt to use it more than -once, it may fail. It is suggested to only call this function once per -connection call. - -```lua -server:listen(128, function (err) - local client = uv.new_tcp() - server:accept(client) -end) -``` - -### `uv.read_start(stream, callback)` - -> (method form `stream:read_start(callback)`) - -Callback is of the form `(err, data)`. - -Read data from an incoming stream. The callback will be made several times until -there is no more data to read or `uv.read_stop()` is called. When we’ve reached -EOF, `data` will be `nil`. - -```lua -stream:read_start(function (err, chunk) - if err then - -- handle read error - elseif chunk then - -- handle data - else - -- handle disconnect - end -end) -``` - -### `uv.read_stop(stream)` - -> (method form `stream:read_stop()`) - -Stop reading data from the stream. The read callback will no longer be called. - -### `uv.write(stream, data, [callback])` - -> (method form `stream:write(data, [callback])`) - -Write data to stream. - -`data` can either be a lua string or a table of strings. If a table is passed -in, the C backend will use writev to send all strings in a single system call. - -The optional `callback` is for knowing when the write is -complete. - -### `uv.write2(stream, data, send_handle, callback)` - -> (method form `stream:write2(data, send_handle, callback)`) - -Extended write function for sending handles over a pipe. The pipe must be -initialized with ip option to `true`. - -**Note: `send_handle` must be a TCP socket or pipe, which is a server or a -connection (listening or connected state). Bound sockets or pipes will be -assumed to be servers. - -### `uv.try_write(stream, data)` - -> (method form `stream:try_write(data)`) - -Same as `uv.write()`, but won’t queue a write request if it can’t be completed -immediately. - -Will return number of bytes written (can be less than the supplied buffer size). - -### `uv.is_readable(stream)` - -> (method form `stream:is_readable()`) - -Returns `true` if the stream is readable, `false` otherwise. - -### `uv.is_writable(stream)` - -> (method form `stream:is_writable()`) - -Returns `true` if the stream is writable, `false` otherwise. - -### `uv.stream_set_blocking(stream, blocking)` - -> (method form `stream:set_blocking(blocking)`) - -Enable or disable blocking mode for a stream. - -When blocking mode is enabled all writes complete synchronously. The interface -remains unchanged otherwise, e.g. completion or failure of the operation will -still be reported through a callback which is made asynchronously. - -**Warning**: Relying too much on this API is not recommended. It is likely to -change significantly in the future. Currently this only works on Windows and -only for uv_pipe_t handles. Also libuv currently makes no ordering guarantee -when the blocking mode is changed after write requests have already been -submitted. Therefore it is recommended to set the blocking mode immediately -after opening or creating the stream. - -## `uv_tcp_t` — TCP handle - -[`uv_tcp_t`]: #uv_tcp_t--tcp-handle - -TCP handles are used to represent both TCP streams and servers. - -`uv_tcp_t` is a ‘subclass’ of [`uv_stream_t`][](#uv_stream_t--stream-handle). - -### `uv.new_tcp() -> tcp` - -Creates and initializes a new `uv_tcp_t`. Returns the lua userdata wrapping it. - -### `uv.tcp_open(tcp, sock)` - -> (method form `tcp:open(sock)`) - -Open an existing file descriptor or SOCKET as a TCP handle. - -**Note: The user is responsible for setting the file descriptor in non-blocking -mode. - -### `uv.tcp_nodelay(tcp, enable)` - -> (method form `tcp:nodelay(enable)`) - -Enable / disable Nagle’s algorithm. - -### `uv.tcp_keepalive(tcp, enable, [delay])` - -> (method form `tcp:keepalive(enable, [delay])`) - -Enable / disable TCP keep-alive. `delay` is the initial delay in seconds, ignored -when enable is `false`. - -### `uv.tcp_simultaneous_accepts(tcp, enable)` - -> (method form `tcp:simultaneous_accepts(enable)`) - -Enable / disable simultaneous asynchronous accept requests that are queued by -the operating system when listening for new TCP connections. - -This setting is used to tune a TCP server for the desired performance. Having -simultaneous accepts can significantly improve the rate of accepting connections -(which is why it is enabled by default) but may lead to uneven load distribution -in multi-process setups. - -### `uv.tcp_bind(tcp, address, port)` - -> (method form `tcp:bind(address, port)`) - -Bind the handle to an address and port. `address` should be an IP address and -not a domain name. - -When the port is already taken, you can expect to see an UV_EADDRINUSE error -from either `uv.tcp_bind()`, `uv.listen()` or `uv.tcp_connect()`. That is, a -successful call to this function does not guarantee that the call to `uv.listen()` -or `uv.tcp_connect()` will succeed as well. - -Use a port of `0` to let the OS assign an ephemeral port. You can look it up -later using `uv.tcp_getsockname()`. - -### `uv.tcp_getsockname(tcp)` - -> (method form `tcp:getsockname()`) - -Get the current address to which the handle is bound. - -### `uv.tcp_getpeername(tcp)` - -> (method form `tcp:getpeername()`) - -Get the address of the peer connected to the handle. - -### `uv.tcp_connect(tcp, address, port, callback) -> req` - -> (method form `tcp:connect(host, port, callback) -> req`) - -### `uv.tcp_write_queue_size(tcp) -> size` - -> (method form `tcp:write_queue_size() -> size`) - -Establish an IPv4 or IPv6 TCP connection. - -The callback is made when the connection has been established or when a -connection error happened. - -```lua -local client = uv.new_tcp() -client:connect("127.0.0.1", 8080, function (err) - -- check error and carry on. -end) -``` - -## `uv_pipe_t` — Pipe handle - -[`uv_pipe_t`]: #uv_pipe_t--pipe-handle - -Pipe handles provide an abstraction over local domain sockets on Unix and named -pipes on Windows. - -```lua -local pipe = uv.new_pipe(false) - -pipe:bind('/tmp/sock.test') - -pipe:listen(128, function() - local client = uv.new_pipe(false) - pipe:accept(client) - client:write("hello!\n") - client:close() -end) -``` - -### `uv.new_pipe(ipc) -> pipe` - -Creates and initializes a new `uv_pipe_t`. Returns the lua userdata wrapping -it. The `ipc` argument is a boolean to indicate if this pipe will be used for -handle passing between processes. - -### `uv.pipe_open(file) -> pipe` - -Open an existing file descriptor or [`uv_handle_t`][] as a pipe. - -**Note**: The file descriptor is set to non-blocking mode. - -### `uv.pipe_bind(pipe, name)` - -> (method form `pipe:bind(name)`) - -Bind the pipe to a file path (Unix) or a name (Windows). - -**Note**: Paths on Unix get truncated to sizeof(sockaddr_un.sun_path) bytes, -typically between 92 and 108 bytes. - -### `uv.pipe_connect(pipe, name, callback)` - -> (method form `pipe:connect(name, callback)`) - -Connect to the Unix domain socket or the named pipe. - -**Note**: Paths on Unix get truncated to sizeof(sockaddr_un.sun_path) bytes, -typically between 92 and 108 bytes. - -### `uv.pipe_getsockname(pipe)` - -> (method form `pipe:getsockname()`) - -Returns the name of the Unix domain socket or the named pipe. - -### `uv.pipe_pending_instances(pipe, count)` - -> (method form `pipe:pending_instances(count)`) - -Set the number of pending pipe instance handles when the pipe server is waiting for connections. - -**Note**: This setting applies to Windows only. - -### `uv.pipe_pending_count(pipe)` - -> (method form `pipe:pending_count()`) - -Returns the pending pipe count for the named pipe. - -### `uv.pipe_pending_type(pipe)` - -> (method form `pipe:pending_type()`) - -Used to receive handles over IPC pipes. - -First - call [`uv.pipe_pending_count`][], if it’s > 0 then initialize a handle -of the given type, returned by [`uv.pipe_pending_type`][] and call -[`uv.accept(pipe, handle)`][]. - -## `uv_tty_t` — TTY handle - -[`uv_tty_t`]: #uv_tty_t--tty-handle - -TTY handles represent a stream for the console. - -```lua --- Simple echo program -local stdin = uv.new_tty(0, true) -local stdout = uv.new_tty(1, false) - -stdin:read_start(function (err, data) - assert(not err, err) - if data then - stdout:write(data) - else - stdin:close() - stdout:close() - end -end) -``` - -### uv.new_tty(fd, readable) -> tty - -Initialize a new TTY stream with the given file descriptor. Usually the file -descriptor will be: - - - 0 - stdin - - 1 - stdout - - 2 - stderr - -`readable, specifies if you plan on calling uv_read_start() with this stream. -`stdin is readable, stdout is not. - -On Unix this function will try to open /dev/tty and use it if the passed file -descriptor refers to a TTY. This lets libuv put the tty in non-blocking mode -without affecting other processes that share the tty. - -Note: If opening `/dev/tty` fails, libuv falls back to blocking writes for -non-readable TTY streams. - -### uv.tty_set_mode(mode) - -> (method form `tty:set_mode(mode)`) - -Set the TTY using the specified terminal mode. - -Parameter `mode` is a C enum with the following values: - -- 0 - UV_TTY_MODE_NORMAL: Initial/normal terminal mode - -- 1 - UV_TTY_MODE_RAW: Raw input mode (On Windows, ENABLE_WINDOW_INPUT is - also enabled) - -- 2 - UV_TTY_MODE_IO: Binary-safe I/O mode for IPC (Unix-only) - -## uv.tty_reset_mode() - -To be called when the program exits. Resets TTY settings to default values for -the next process to take over. - -This function is async signal-safe on Unix platforms but can fail with error -code UV_EBUSY if you call it when execution is inside uv_tty_set_mode(). - -## uv.tty_get_winsize() -> w, h - -> (method form `tty:get_winsize() -> w, h`) - -Gets the current Window size. - -## `uv_udp_t` — UDP handle - -[`uv_udp_t`]: #uv_udp_t--udp-handle - -UDP handles encapsulate UDP communication for both clients and servers. - -### uv.new_udp() -> udp - -Initialize a new UDP handle. The actual socket is created lazily. - -### uv.udp_open(udp, fd) - -> (method form `udp:open(fd)`) - -Opens an existing file descriptor or Windows SOCKET as a UDP handle. - -Unix only: The only requirement of the sock argument is that it follows the -datagram contract (works in unconnected mode, supports sendmsg()/recvmsg(), -etc). In other words, other datagram-type sockets like raw sockets or netlink -sockets can also be passed to this function. - -The file descriptor is set to non-blocking mode. - -Note: The passed file descriptor or SOCKET is not checked for its type, but -it’s required that it represents a valid datagram socket. - -### uv.udp_bind(udp, host, port) - -> (method form `udp:bind(host, port)`) - -Bind the UDP handle to an IP address and port. - -### uv.udp_getsockname(udp) - -> (method form `udp:getsockname()`) - -Get the local IP and port of the UDP handle. - -### uv.udp_set_membership(udp, multicast_addr, interface_addr, membership) - -> (method form `udp:set_membership(multicast_addr, interface_addr, membership)`) - -Set membership for a multicast address. - -`multicast_addr` is multicast address to set membership for. - -`interface_addr` is interface address. - -`membership` can be the string `"leave"` or `"join"`. - -### uv.udp_set_multicast_loop(udp, on) - -> (method form `udp:set_multicast_loop(on)`) - -Set IP multicast loop flag. Makes multicast packets loop back to local -sockets. - -`on` is a boolean. - -### uv.udp_set_multicast_ttl(udp, tty) - -> (method form `udp:set_multicast_ttl(tty)`) - -Set the multicast ttl. - -`ttl` is an integer 1 through 255. - -### uv.udp_set_multicast_interface(udp, interface_addr) - -> (method form `udp:set_multicast_interface(interface_addr)`) - -Set the multicast interface to send or receive data on. - -### uv.udp_set_broadcast(udp, on) - -Set broadcast on or off. - -> (method form `udp:set_broadcast(, on)`) - -### uv.udp_set_ttl(udp, ttl) - -> (method form `udp:set_ttl(ttl)`) - -Set the time to live. - -`ttl` is an integer 1 through 255. - -### uv.udp_send(udp, data, host, port, callback) - -> (method form `udp:send(data, host, port, callback)`) - -Send data over the UDP socket. If the socket has not previously been bound -with `uv_udp_bind()` it will be bound to `0.0.0.0` (the “all interfaces†IPv4 -address) and a random port number. - -### uv.udp_try_send(udp, data, host, port) - -> (method form `udp:try_send(data, host, port)`) - -Same as `uv_udp_send()`, but won’t queue a send request if it can’t be -completed immediately. - -### uv.udp_recv_start(udp, callback) - -> (method form `udp:recv_start(callback)`) - -Prepare for receiving data. If the socket has not previously been bound with -`uv_udp_bind()` it is bound to `0.0.0.0` (the “all interfaces†IPv4 address) -and a random port number. - -### uv.udp_recv_stop(udp) - -> (method form `udp:recv_stop()`) - -## `uv_fs_event_t` — FS Event handle - -[`uv_fs_event_t`]: #uv_fs_event_t--fs-event-handle - -**TODO**: port docs from [docs.libuv.org](http://docs.libuv.org/en/v1.x/fs_event.html) -using [functions](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L174-L177) -and [methods](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L265-L270) -from [fs_event.c](https://github.com/luvit/luv/blob/master/src/fs_event.c) - -## `uv_fs_poll_t` — FS Poll handle - -[`uv_fs_poll_t`]: #uv_fs_poll_t--fs-poll-handle - -**TODO**: port docs from [docs.libuv.org](http://docs.libuv.org/en/v1.x/fs_poll.html) -using [functions](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L180-L183) -and [methods](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L272-L277) -from [fs_poll.c](https://github.com/luvit/luv/blob/master/src/fs_poll.c) - -## Filesystem operations - -[Filesystem operations]:#filesystem-operations - -**TODO**: port docs from [docs.libuv.org](http://docs.libuv.org/en/v1.x/fs.html) -using [functions](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L186-L213) -from [fs.c](https://github.com/luvit/luv/blob/master/src/fs.c) - -## DNS utility functions - -[DNS utility functions]: #dns-utility-functions - -**TODO**: port docs from [docs.libuv.org](http://docs.libuv.org/en/v1.x/dns.html) -using [functions](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L216-L217) -from [dns.c](https://github.com/luvit/luv/blob/master/src/dns.c) - -## Miscellaneous utilities - -[Miscellaneous utilities]: #miscellaneous-utilities - -**TODO**: port docs from [docs.libuv.org](http://docs.libuv.org/en/v1.x/misc.html) -using [functions](https://github.com/luvit/luv/blob/25278a3871962cab29763692fdc3b270a7e96fe9/src/luv.c#L220-L235) -from [misc.c](https://github.com/luvit/luv/blob/master/src/misc.c) - -[luv]: https://github.com/luvit/luv -[luvit]: https://github.com/luvit/luvit -[libuv]: https://github.com/libuv/libuv diff --git a/3rdparty/luv/examples/cqueues-main.lua b/3rdparty/luv/examples/cqueues-main.lua deleted file mode 100644 index ff60ec2b1c9..00000000000 --- a/3rdparty/luv/examples/cqueues-main.lua +++ /dev/null @@ -1,31 +0,0 @@ ---[[ -Demonstrates using luv with a cqueues mainloop -]] - -local cqueues = require "cqueues" -local uv = require "luv" - -local cq = cqueues.new() - -cq:wrap(function() - while cqueues.poll({ - pollfd = uv.backend_fd(); - timeout = uv.backend_timeout() / 1000; - events = "r"; - }) do - uv.run("nowait") - end -end) - -cq:wrap(function() - while true do - cqueues.sleep(1) - print("HELLO FROM CQUEUES") - end -end) - -uv.new_timer():start(1000, 1000, function() - print("HELLO FROM LUV") -end) - -assert(cq:loop()) diff --git a/3rdparty/luv/examples/cqueues-slave.lua b/3rdparty/luv/examples/cqueues-slave.lua deleted file mode 100644 index 599e7c6ded7..00000000000 --- a/3rdparty/luv/examples/cqueues-slave.lua +++ /dev/null @@ -1,55 +0,0 @@ ---[[ -Demonstrates using cqueues with a luv mainloop - -Starts a simple sleep+print loop using each library's native form. -They should print intertwined. -]] - -local cqueues = require "cqueues" -local uv = require "luv" - -local cq = cqueues.new() - -do - local timer = uv.new_timer() - local function reset_timer() - local timeout = cq:timeout() - if timeout then - -- libuv takes milliseconds as an integer, - -- while cqueues gives timeouts as a floating point number - -- use `math.ceil` as we'd rather wake up late than early - timer:set_repeat(math.ceil(timeout * 1000)) - timer:again() - else - -- stop timer for now; it may be restarted later. - timer:stop() - end - end - local function onready() - -- Step the cqueues loop once (sleeping for max 0 seconds) - assert(cq:step(0)) - reset_timer() - end - -- Need to call `start` on libuv timer now - -- to provide callback and so that `again` works - timer:start(0, 0, onready) - -- Ask libuv to watch the cqueue pollfd - uv.new_poll(cq:pollfd()):start(cq:events(), onready) -end - --- Adds a new function to the scheduler `cq` --- The functions is an infinite loop that sleeps for 1 second and prints -cq:wrap(function() - while true do - cqueues.sleep(1) - print("HELLO FROM CQUEUES") - end -end) - --- Start a luv timer that fires every 1 second -uv.new_timer():start(1000, 1000, function() - print("HELLO FROM LUV") -end) - --- Run luv mainloop -uv.run() diff --git a/3rdparty/luv/examples/echo-server-client.lua b/3rdparty/luv/examples/echo-server-client.lua deleted file mode 100644 index ea4e6d2132d..00000000000 --- a/3rdparty/luv/examples/echo-server-client.lua +++ /dev/null @@ -1,68 +0,0 @@ -local p = require('lib/utils').prettyPrint -local uv = require('luv') - -local function create_server(host, port, on_connection) - - local server = uv.new_tcp() - p(1, server) - uv.tcp_bind(server, host, port) - - uv.listen(server, 128, function(err) - assert(not err, err) - local client = uv.new_tcp() - uv.accept(server, client) - on_connection(client) - end) - - return server -end - -local server = create_server("0.0.0.0", 0, function (client) - p("new client", client, uv.tcp_getsockname(client), uv.tcp_getpeername(client)) - uv.read_start(client, function (err, chunk) - p("onread", {err=err,chunk=chunk}) - - -- Crash on errors - assert(not err, err) - - if chunk then - -- Echo anything heard - uv.write(client, chunk) - else - -- When the stream ends, close the socket - uv.close(client) - end - end) -end) - -local address = uv.tcp_getsockname(server) -p("server", server, address) - -local client = uv.new_tcp() -uv.tcp_connect(client, "127.0.0.1", address.port, function (err) - assert(not err, err) - - uv.read_start(client, function (err, chunk) - p("received at client", {err=err,chunk=chunk}) - assert(not err, err) - if chunk then - uv.shutdown(client) - p("client done shutting down") - else - uv.close(client) - uv.close(server) - end - end) - - p("writing from client") - uv.write(client, "Hello") - uv.write(client, "World") - -end) - --- Start the main event loop -uv.run() --- Close any stray handles when done -uv.walk(uv.close) -uv.run() -uv.loop_close() diff --git a/3rdparty/luv/examples/killing-children.lua b/3rdparty/luv/examples/killing-children.lua deleted file mode 100644 index 6aab693d0c1..00000000000 --- a/3rdparty/luv/examples/killing-children.lua +++ /dev/null @@ -1,24 +0,0 @@ -local p = require('lib/utils').prettyPrint -local uv = require('luv') - - - -local child, pid -child, pid = uv.spawn("sleep", { - args = {"100"} -}, function (code, signal) - p("EXIT", {code=code,signal=signal}) - uv.close(child) -end) - -p{child=child, pid=pid} - --- uv.kill(pid, "SIGTERM") -uv.process_kill(child, "SIGTERM") - -repeat - print("\ntick.") -until uv.run('once') == 0 - -print("done") - diff --git a/3rdparty/luv/examples/lots-o-dns.lua b/3rdparty/luv/examples/lots-o-dns.lua deleted file mode 100644 index 59a1b0fe534..00000000000 --- a/3rdparty/luv/examples/lots-o-dns.lua +++ /dev/null @@ -1,49 +0,0 @@ -local p = require('lib/utils').prettyPrint -local uv = require('luv') - -uv.getaddrinfo(nil, 80, nil, p) - -local domains = { - "facebook.com", - "google.com", - "mail.google.com", - "maps.google.com", - "plus.google.com", - "play.google.com", - "apple.com", - "hp.com", - "yahoo.com", - "mozilla.com", - "developer.mozilla.com", - "luvit.io", - "creationix.com", - "howtonode.org", - "github.com", - "gist.github.com" -} - -local i = 1 -local function next() - uv.getaddrinfo(domains[i], nil, { - v4mapped = true, - all = true, - addrconfig = true, - canonname = true, - numericserv = true, - socktype = "STREAM" - }, function (err, data) - assert(not err, err) - p(data) - i = i + 1 - if i <= #domains then - next() - end - end) -end -next(); - -repeat - print("\nTick..") -until uv.run('once') == 0 - -print("done") diff --git a/3rdparty/luv/examples/repl.lua b/3rdparty/luv/examples/repl.lua deleted file mode 100644 index 92be0f17d87..00000000000 --- a/3rdparty/luv/examples/repl.lua +++ /dev/null @@ -1,89 +0,0 @@ -local uv = require('luv') -local utils = require('lib/utils') - -if uv.guess_handle(0) ~= "tty" or - uv.guess_handle(1) ~= "tty" then - error "stdio must be a tty" -end -local stdin = uv.new_tty(0, true) -local stdout = require('lib/utils').stdout - -local debug = require('debug') -local c = utils.color - -local function gatherResults(success, ...) - local n = select('#', ...) - return success, { n = n, ... } -end - -local function printResults(results) - for i = 1, results.n do - results[i] = utils.dump(results[i]) - end - print(table.concat(results, '\t')) -end - -local buffer = '' - -local function evaluateLine(line) - if line == "<3\n" then - print("I " .. c("Bred") .. "♥" .. c() .. " you too!") - return '>' - end - local chunk = buffer .. line - local f, err = loadstring('return ' .. chunk, 'REPL') -- first we prefix return - - if not f then - f, err = loadstring(chunk, 'REPL') -- try again without return - end - - if f then - buffer = '' - local success, results = gatherResults(xpcall(f, debug.traceback)) - - if success then - -- successful call - if results.n > 0 then - printResults(results) - end - else - -- error - print(results[1]) - end - else - - if err:match "''$" then - -- Lua expects some more input; stow it away for next time - buffer = chunk .. '\n' - return '>>' - else - print(err) - buffer = '' - end - end - - return '>' -end - -local function displayPrompt(prompt) - uv.write(stdout, prompt .. ' ') -end - -local function onread(err, line) - if err then error(err) end - if line then - local prompt = evaluateLine(line) - displayPrompt(prompt) - else - uv.close(stdin) - end -end - -coroutine.wrap(function() - displayPrompt '>' - uv.read_start(stdin, onread) -end)() - -uv.run() - -print("") diff --git a/3rdparty/luv/examples/talking-to-children.lua b/3rdparty/luv/examples/talking-to-children.lua deleted file mode 100644 index 10a53ef8c88..00000000000 --- a/3rdparty/luv/examples/talking-to-children.lua +++ /dev/null @@ -1,47 +0,0 @@ -local p = require('lib/utils').prettyPrint -local uv = require('luv') - -local stdout = uv.new_pipe(false) -local stderr = uv.new_pipe( false) -local stdin = uv.new_pipe(false) - -local handle, pid - -local function onexit(code, signal) - p("exit", {code=code,signal=signal}) -end - -local function onclose() - p("close") -end - -local function onread(err, chunk) - assert(not err, err) - if (chunk) then - p("data", {data=chunk}) - else - p("end") - end -end - -local function onshutdown() - uv.close(handle, onclose) -end - -handle, pid = uv.spawn("cat", { - stdio = {stdin, stdout, stderr} -}, onexit) - -p{ - handle=handle, - pid=pid -} - -uv.read_start(stdout, onread) -uv.read_start(stderr, onread) -uv.write(stdin, "Hello World") -uv.shutdown(stdin, onshutdown) - -uv.run() -uv.walk(uv.close) -uv.run() diff --git a/3rdparty/luv/examples/tcp-cluster.lua b/3rdparty/luv/examples/tcp-cluster.lua deleted file mode 100644 index e69ceffc62d..00000000000 --- a/3rdparty/luv/examples/tcp-cluster.lua +++ /dev/null @@ -1,84 +0,0 @@ - --- This function will be run in a child process -local child_code = string.dump(function () - local p = require('lib/utils').prettyPrint - local uv = require('luv') - - -- The parent is going to pass us the server handle over a pipe - -- This will be our local file descriptor at PIPE_FD - local pipe = uv.new_pipe(true) - local pipe_fd = tonumber(os.getenv("PIPE_FD")) - assert(uv.pipe_open(pipe, pipe_fd)) - - -- Configure the server handle - local server = uv.new_tcp() - local function onconnection() - local client = uv.new_tcp() - uv.accept(server, client) - p("New TCP", client, "on", server) - p{client=client} - uv.write(client, "BYE!\n"); - uv.shutdown(client, function () - uv.close(client) - uv.close(server) - end) - end - - -- Read the server handle from the parent - local function onread(err, data) - p("onread", {err=err,data=data}) - assert(not err, err) - if uv.pipe_pending_count(pipe) > 0 then - local pending_type = uv.pipe_pending_type(pipe) - p("pending_type", pending_type) - assert(pending_type == "tcp") - assert(uv.accept(pipe, server)) - assert(uv.listen(server, 128, onconnection)) - p("Received server handle from parent process", server) - elseif data then - p("ondata", data) - else - p("onend", data) - end - end - uv.read_start(pipe, onread) - - -- Start the event loop! - uv.run() -end) - -local p = require('lib/utils').prettyPrint -local uv = require('luv') - -local exepath = assert(uv.exepath()) -local cpu_count = # assert(uv.cpu_info()) - -local server = uv.new_tcp() -assert(uv.tcp_bind(server, "::1", 1337)) -print("Master process bound to TCP port 1337 on ::1") - - -local function onexit(status, signal) - p("Child exited", {status=status,signal=signal}) -end - -local function spawnChild() - local pipe = uv.new_pipe(true) - local input = uv.new_pipe(false) - local _, pid = assert(uv.spawn(exepath, { - stdio = {input,1,2,pipe}, - env= {"PIPE_FD=3"} - }, onexit)) - uv.write(input, child_code) - uv.shutdown(input) - p("Spawned child", pid, "and sending handle", server) - assert(uv.write2(pipe, "123", server)) - assert(uv.shutdown(pipe)) -end - --- Spawn a child process for each CPU core -for _ = 1, cpu_count do - spawnChild() -end - -uv.run() diff --git a/3rdparty/luv/examples/timers.lua b/3rdparty/luv/examples/timers.lua deleted file mode 100644 index 049235e6fb1..00000000000 --- a/3rdparty/luv/examples/timers.lua +++ /dev/null @@ -1,68 +0,0 @@ -local p = require('lib/utils').prettyPrint -local uv = require('luv') - -local function set_timeout(timeout, callback) - local timer = uv.new_timer() - local function ontimeout() - p("ontimeout", timer) - uv.timer_stop(timer) - uv.close(timer) - callback(timer) - end - uv.timer_start(timer, timeout, 0, ontimeout) - return timer -end - -local function clear_timeout(timer) - uv.timer_stop(timer) - uv.close(timer) -end - -local function set_interval(interval, callback) - local timer = uv.new_timer() - local function ontimeout() - p("interval", timer) - callback(timer) - end - uv.timer_start(timer, interval, interval, ontimeout) - return timer -end - -local clear_interval = clear_timeout - -local i = set_interval(300, function() - print("interval...") -end) - -set_timeout(1000, function() - clear_interval(i) -end) - - -local handle = uv.new_timer() -local delay = 1024 -local function ontimeout() - p("tick", delay) - delay = delay / 2 - if delay >= 1 then - uv.timer_set_repeat(handle, delay) - uv.timer_again(handle) - else - uv.timer_stop(handle) - uv.close(handle) - p("done") - end -end -uv.timer_start(handle, delay, 0, ontimeout) - - -repeat - print("\ntick.") -until uv.run('once') == 0 - -print("done") - -uv.walk(uv.close) -uv.run() -uv.loop_close() - diff --git a/3rdparty/luv/examples/uvbook/helloworld.lua b/3rdparty/luv/examples/uvbook/helloworld.lua deleted file mode 100644 index 2c77d0c51bc..00000000000 --- a/3rdparty/luv/examples/uvbook/helloworld.lua +++ /dev/null @@ -1,5 +0,0 @@ -local uv = require('luv') - -print('Now quitting.') -uv.run('default') -uv.loop_close() diff --git a/3rdparty/luv/examples/uvbook/idle-basic.lua b/3rdparty/luv/examples/uvbook/idle-basic.lua deleted file mode 100644 index dc2a47b3c30..00000000000 --- a/3rdparty/luv/examples/uvbook/idle-basic.lua +++ /dev/null @@ -1,14 +0,0 @@ -local uv = require('luv') - -local counter = 0 -local idle = uv.new_idle() -idle:start(function() - counter = counter + 1 - if counter >= 10e6 then - idle:stop() - end -end) - -print("Idling...") -uv.run('default') -uv.loop_close() \ No newline at end of file diff --git a/3rdparty/luv/examples/uvbook/onchange.lua b/3rdparty/luv/examples/uvbook/onchange.lua deleted file mode 100644 index 07b3f9b1d78..00000000000 --- a/3rdparty/luv/examples/uvbook/onchange.lua +++ /dev/null @@ -1,30 +0,0 @@ -local uv = require('luv') - -if #arg==0 then - print(string.format("Usage: %s [file2 ...]",arg[0])); - return -end - -for i=1,#arg do - local fse = uv.new_fs_event() - assert(uv.fs_event_start(fse,arg[i],{ - --"watch_entry"=true,"stat"=true, - recursive=true - },function (err,fname,status) - if(err) then - print("Error "..err) - else - print(string.format('Change detected in %s', - uv.fs_event_getpath(fse))) - for k,v in pairs(status) do - print(k,v) - end - print('file changed:'..(fname and fname or '')) - end - end)) - -end - -uv.run('default') -uv.loop_close() - diff --git a/3rdparty/luv/examples/uvbook/queue-work.lua b/3rdparty/luv/examples/uvbook/queue-work.lua deleted file mode 100644 index cf52abfb216..00000000000 --- a/3rdparty/luv/examples/uvbook/queue-work.lua +++ /dev/null @@ -1,19 +0,0 @@ -local uv = require('luv') - -local ctx = uv.new_work( - function(n) --work,in threadpool - local uv = require('luv') - local t = uv.thread_self() - uv.sleep(100) - return n*n,n - end, - function(r,n) print(string.format('%d => %d',n,r)) end --after work, in loop thread -) -uv.queue_work(ctx,2) -uv.queue_work(ctx,4) -uv.queue_work(ctx,6) -uv.queue_work(ctx,8) -uv.queue_work(ctx,10) - -uv.run('default') -uv.loop_close() diff --git a/3rdparty/luv/examples/uvbook/tcp-echo-client.lua b/3rdparty/luv/examples/uvbook/tcp-echo-client.lua deleted file mode 100644 index 40dd22a311f..00000000000 --- a/3rdparty/luv/examples/uvbook/tcp-echo-client.lua +++ /dev/null @@ -1,21 +0,0 @@ -local uv = require('luv') - - -local client = uv.new_tcp() -uv.tcp_connect(client, "127.0.0.1", 1337, function (err) - assert(not err, err) - uv.read_start(client, function (err, chunk) - assert(not err, err) - if chunk then - print(chunk) - else - uv.close(client) - end - end) - - uv.write(client, "Hello") - uv.write(client, "World") -end) -print('CTRL-C to break') -uv.run('default') -uv.loop_close() diff --git a/3rdparty/luv/examples/uvbook/tcp-echo-server.lua b/3rdparty/luv/examples/uvbook/tcp-echo-server.lua deleted file mode 100644 index 269c49114cf..00000000000 --- a/3rdparty/luv/examples/uvbook/tcp-echo-server.lua +++ /dev/null @@ -1,22 +0,0 @@ -local uv = require('luv') - - -local server = uv.new_tcp() -server:bind("127.0.0.1", 1337) -server:listen(128, function (err) - assert(not err, err) - local client = uv.new_tcp() - server:accept(client) - client:read_start(function (err, chunk) - assert(not err, err) - if chunk then - client:write(chunk) - else - client:shutdown() - client:close() - end - end) -end) - -uv.run('default') -uv.loop_close() diff --git a/3rdparty/luv/examples/uvbook/thread-create.lua b/3rdparty/luv/examples/uvbook/thread-create.lua deleted file mode 100644 index 4b42587adbf..00000000000 --- a/3rdparty/luv/examples/uvbook/thread-create.lua +++ /dev/null @@ -1,38 +0,0 @@ -local uv = require('luv') - -local step = 10 - -local hare_id = uv.new_thread(function(step,...) - local ffi = require'ffi' - local uv = require('luv') - local sleep - if ffi.os=='Windows' then - ffi.cdef "void Sleep(int ms);" - sleep = ffi.C.Sleep - else - ffi.cdef "unsigned int usleep(unsigned int seconds);" - sleep = ffi.C.usleep - end - while (step>0) do - step = step - 1 - uv.sleep(math.random(1000)) - print("Hare ran another step") - end - print("Hare done running!") -end, step,true,'abcd','false') - -local tortoise_id = uv.new_thread(function(step,...) - local uv = require('luv') - while (step>0) do - step = step - 1 - uv.sleep(math.random(100)) - print("Tortoise ran another step") - end - print("Tortoise done running!") -end,step,'abcd','false') - -print(hare_id==hare_id,uv.thread_equal(hare_id,hare_id)) -print(tortoise_id==hare_id,uv.thread_equal(tortoise_id,hare_id)) - -uv.thread_join(hare_id) -uv.thread_join(tortoise_id) diff --git a/3rdparty/luv/examples/uvbook/uvcat.lua b/3rdparty/luv/examples/uvbook/uvcat.lua deleted file mode 100644 index 99fdd68000b..00000000000 --- a/3rdparty/luv/examples/uvbook/uvcat.lua +++ /dev/null @@ -1,37 +0,0 @@ -local uv = require('luv') - - -local fname = arg[1] and arg[1] or arg[0] - -uv.fs_open(fname, 'r', tonumber('644', 8), function(err,fd) - if err then - print("error opening file:"..err) - else - local stat = uv.fs_fstat(fd) - local off = 0 - local block = 10 - - local function on_read(err,chunk) - if(err) then - print("Read error: "..err); - elseif #chunk==0 then - uv.fs_close(fd) - else - off = block + off - uv.fs_write(1,chunk,-1,function(err,chunk) - if err then - print("Write error: "..err) - else - uv.fs_read(fd, block, off, on_read) - end - end) - end - end - uv.fs_read(fd, block, off, on_read) - end -end) - - - -uv.run('default') -uv.loop_close() diff --git a/3rdparty/luv/examples/uvbook/uvtee.lua b/3rdparty/luv/examples/uvbook/uvtee.lua deleted file mode 100644 index c91b066ae21..00000000000 --- a/3rdparty/luv/examples/uvbook/uvtee.lua +++ /dev/null @@ -1,35 +0,0 @@ -local uv = require('luv') - -if not arg[1] then - print(string.format("please run %s filename",arg[0])) - return -end - - -local stdin = uv.new_tty(0, true) -local stdout = uv.new_tty(1, true) ---local stdin_pipe = uv.new_pipe(false) ---uv.pipe_open(stdin_pipe,0) - -local fname = arg[1] - -uv.fs_open(fname, 'w+', tonumber('644', 8), function(err,fd) - if err then - print("error opening file:"..err) - else - local fpipe = uv.new_pipe(false) - uv.pipe_open(fpipe, fd) - - uv.read_start(stdin, function(err,chunk) - if err then - print('Read error: '..err) - else - uv.write(stdout,chunk) - uv.write(fpipe,chunk) - end - end); - end -end) - -uv.run('default') -uv.loop_close() diff --git a/3rdparty/luv/lib/tap.lua b/3rdparty/luv/lib/tap.lua deleted file mode 100644 index d1cfb59c249..00000000000 --- a/3rdparty/luv/lib/tap.lua +++ /dev/null @@ -1,165 +0,0 @@ -local uv = require('luv') -local dump = require('lib/utils').dump -local stdout = require('lib/utils').stdout - -local function protect(...) - local n = select('#', ...) - local arguments = {...} - for i = 1, n do - arguments[i] = tostring(arguments[i]) - end - - local text = table.concat(arguments, "\t") - text = " " .. string.gsub(text, "\n", "\n ") - print(text) -end - -local function pprotect(...) - local n = select('#', ...) - local arguments = { ... } - - for i = 1, n do - arguments[i] = dump(arguments[i]) - end - - protect(table.concat(arguments, "\t")) -end - - -local tests = {}; - -local function run() - local passed = 0 - - if #tests < 1 then - error("No tests specified!") - end - - print("1.." .. #tests) - for i = 1, #tests do - local test = tests[i] - local cwd = uv.cwd() - local pass, err = xpcall(function () - local expected = 0 - local function expect(fn, count) - expected = expected + (count or 1) - return function (...) - expected = expected - 1 - local ret = fn(...) - collectgarbage() - return ret - end - end - test.fn(protect, pprotect, expect, uv) - collectgarbage() - uv.run() - collectgarbage() - if expected > 0 then - error("Missing " .. expected .. " expected call" .. (expected == 1 and "" or "s")) - elseif expected < 0 then - error("Found " .. -expected .. " unexpected call" .. (expected == -1 and "" or "s")) - end - collectgarbage() - local unclosed = 0 - uv.walk(function (handle) - if handle == stdout then return end - unclosed = unclosed + 1 - print("UNCLOSED", handle) - end) - if unclosed > 0 then - error(unclosed .. " unclosed handle" .. (unclosed == 1 and "" or "s")) - end - if uv.cwd() ~= cwd then - error("Test moved cwd from " .. cwd .. " to " .. uv.cwd()) - end - collectgarbage() - end, debug.traceback) - - -- Flush out any more opened handles - uv.stop() - uv.walk(function (handle) - if handle == stdout then return end - if not uv.is_closing(handle) then uv.close(handle) end - end) - uv.run() - uv.chdir(cwd) - - if pass then - print("ok " .. i .. " " .. test.name) - passed = passed + 1 - else - protect(err) - print("not ok " .. i .. " " .. test.name) - end - end - - local failed = #tests - passed - if failed == 0 then - print("# All tests passed") - else - print("#" .. failed .. " failed test" .. (failed == 1 and "" or "s")) - end - - -- Close all then handles, including stdout - uv.walk(uv.close) - uv.run() - - os.exit(-failed) -end - -local single = true -local prefix - -local function tap(suite) - - if type(suite) == "function" then - -- Pass in suite directly for single mode - suite(function (name, fn) - if prefix then - name = prefix .. ' - ' .. name - end - tests[#tests + 1] = { - name = name, - fn = fn - } - end) - prefix = nil - elseif type(suite) == "string" then - prefix = suite - single = false - else - -- Or pass in false to collect several runs of tests - -- And then pass in true in a later call to flush tests queue. - single = suite - end - - if single then run() end - -end - - ---[[ --- Sample Usage - -local passed, failed, total = tap(function (test) - - test("add 1 to 2", function(print) - print("Adding 1 to 2") - assert(1 + 2 == 3) - end) - - test("close handle", function (print, p, expect, uv) - local handle = uv.new_timer() - uv.close(handle, expect(function (self) - assert(self == handle) - end)) - end) - - test("simulate failure", function () - error("Oopsie!") - end) - -end) -]] - -return tap diff --git a/3rdparty/luv/lib/utils.lua b/3rdparty/luv/lib/utils.lua deleted file mode 100644 index 777879ec28c..00000000000 --- a/3rdparty/luv/lib/utils.lua +++ /dev/null @@ -1,165 +0,0 @@ - -local uv = require('luv') -local utils = {} -local usecolors - -if uv.guess_handle(1) == "tty" then - utils.stdout = uv.new_tty(1, false) - usecolors = true -else - utils.stdout = uv.new_pipe(false) - uv.pipe_open(utils.stdout, 1) - usecolors = false -end - -local colors = { - black = "0;30", - red = "0;31", - green = "0;32", - yellow = "0;33", - blue = "0;34", - magenta = "0;35", - cyan = "0;36", - white = "0;37", - B = "1;", - Bblack = "1;30", - Bred = "1;31", - Bgreen = "1;32", - Byellow = "1;33", - Bblue = "1;34", - Bmagenta = "1;35", - Bcyan = "1;36", - Bwhite = "1;37" -} - -function utils.color(color_name) - if usecolors then - return "\27[" .. (colors[color_name] or "0") .. "m" - else - return "" - end -end - -function utils.colorize(color_name, string, reset_name) - return utils.color(color_name) .. tostring(string) .. utils.color(reset_name) -end - -local backslash, null, newline, carriage, tab, quote, quote2, obracket, cbracket - -function utils.loadColors(n) - if n ~= nil then usecolors = n end - backslash = utils.colorize("Bgreen", "\\\\", "green") - null = utils.colorize("Bgreen", "\\0", "green") - newline = utils.colorize("Bgreen", "\\n", "green") - carriage = utils.colorize("Bgreen", "\\r", "green") - tab = utils.colorize("Bgreen", "\\t", "green") - quote = utils.colorize("Bgreen", '"', "green") - quote2 = utils.colorize("Bgreen", '"') - obracket = utils.colorize("B", '[') - cbracket = utils.colorize("B", ']') -end - -utils.loadColors() - -function utils.dump(o, depth) - local t = type(o) - if t == 'string' then - return quote .. o:gsub("\\", backslash):gsub("%z", null):gsub("\n", newline):gsub("\r", carriage):gsub("\t", tab) .. quote2 - end - if t == 'nil' then - return utils.colorize("Bblack", "nil") - end - if t == 'boolean' then - return utils.colorize("yellow", tostring(o)) - end - if t == 'number' then - return utils.colorize("blue", tostring(o)) - end - if t == 'userdata' then - return utils.colorize("magenta", tostring(o)) - end - if t == 'thread' then - return utils.colorize("Bred", tostring(o)) - end - if t == 'function' then - return utils.colorize("cyan", tostring(o)) - end - if t == 'cdata' then - return utils.colorize("Bmagenta", tostring(o)) - end - if t == 'table' then - if type(depth) == 'nil' then - depth = 0 - end - if depth > 1 then - return utils.colorize("yellow", tostring(o)) - end - local indent = (" "):rep(depth) - - -- Check to see if this is an array - local is_array = true - local i = 1 - for k,v in pairs(o) do - if not (k == i) then - is_array = false - end - i = i + 1 - end - - local first = true - local lines = {} - i = 1 - local estimated = 0 - for k,v in (is_array and ipairs or pairs)(o) do - local s - if is_array then - s = "" - else - if type(k) == "string" and k:find("^[%a_][%a%d_]*$") then - s = k .. ' = ' - else - s = '[' .. utils.dump(k, 100) .. '] = ' - end - end - s = s .. utils.dump(v, depth + 1) - lines[i] = s - estimated = estimated + #s - i = i + 1 - end - if estimated > 200 then - return "{\n " .. indent .. table.concat(lines, ",\n " .. indent) .. "\n" .. indent .. "}" - else - return "{ " .. table.concat(lines, ", ") .. " }" - end - end - -- This doesn't happen right? - return tostring(o) -end - - - --- Print replacement that goes through libuv. This is useful on windows --- to use libuv's code to translate ansi escape codes to windows API calls. -function print(...) - local n = select('#', ...) - local arguments = {...} - for i = 1, n do - arguments[i] = tostring(arguments[i]) - end - uv.write(utils.stdout, table.concat(arguments, "\t") .. "\n") -end - --- A nice global data dumper -function utils.prettyPrint(...) - local n = select('#', ...) - local arguments = { ... } - - for i = 1, n do - arguments[i] = utils.dump(arguments[i]) - end - - print(table.concat(arguments, "\t")) -end - -return utils - diff --git a/3rdparty/luv/luv-1.8.0-4.rockspec b/3rdparty/luv/luv-1.8.0-4.rockspec deleted file mode 100644 index 23855203e0d..00000000000 --- a/3rdparty/luv/luv-1.8.0-4.rockspec +++ /dev/null @@ -1,34 +0,0 @@ -package = "luv" -version = "1.8.0-4" -source = { - url = 'https://github.com/luvit/luv/releases/download/1.8.0-4/luv-1.8.0-4.tar.gz', -} - -description = { - summary = "Bare libuv bindings for lua", - detailed = [[ -libuv bindings for luajit and lua 5.1/5.2/5.3. - -This library makes libuv available to lua scripts. It was made for the luvit -project but should usable from nearly any lua project. - ]], - homepage = "https://github.com/luvit/luv", - license = "Apache 2.0" -} - -dependencies = { - "lua >= 5.1" -} - -build = { - type = 'cmake', - variables = { - CMAKE_C_FLAGS="$(CFLAGS)", - CMAKE_MODULE_LINKER_FLAGS="$(LIBFLAG)", - LUA_LIBDIR="$(LUA_LIBDIR)", - LUA_INCDIR="$(LUA_INCDIR)", - LUA="$(LUA)", - LIBDIR="$(LIBDIR)", - LUADIR="$(LUADIR)", - }, -} diff --git a/3rdparty/luv/msvcbuild.bat b/3rdparty/luv/msvcbuild.bat deleted file mode 100644 index 7a5c7bd4c31..00000000000 --- a/3rdparty/luv/msvcbuild.bat +++ /dev/null @@ -1,13 +0,0 @@ -@echo off - -set VS=12 -if "%configuration%"=="2015" (set VS=14) -if "%configuration%"=="2013" (set VS=12) - -if not defined platform set platform=x64 -if "%platform%" EQU "x64" (set VS=%VS% Win64) - -cmake -H. -Bbuild -G"Visual Studio %VS%" -cmake --build build --config Release -copy build\Release\luv.dll . -copy build\Release\luajit.exe . diff --git a/3rdparty/luv/src/async.c b/3rdparty/luv/src/async.c deleted file mode 100644 index 87ae0cc0460..00000000000 --- a/3rdparty/luv/src/async.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" -#include "lthreadpool.h" - -static uv_async_t* luv_check_async(lua_State* L, int index) { - uv_async_t* handle = luv_checkudata(L, index, "uv_async"); - luaL_argcheck(L, handle->type == UV_ASYNC && handle->data, index, "Expected uv_async_t"); - return handle; -} - -static void luv_async_cb(uv_async_t* handle) { - lua_State* L = luv_state(handle->loop); - luv_handle_t* data = handle->data; - int n = luv_thread_arg_push(L, data->extra); - luv_call_callback(L, data, LUV_ASYNC, n); - luv_thread_arg_clear(data->extra); -} - -static int luv_new_async(lua_State* L) { - uv_async_t* handle; - luv_handle_t* data; - int ret; - luaL_checktype(L, 1, LUA_TFUNCTION); - handle = luv_newuserdata(L, sizeof(*handle)); - ret = uv_async_init(luv_loop(L), handle, luv_async_cb); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - data = luv_setup_handle(L); - data->extra = malloc(sizeof(luv_thread_arg_t)); - memset(data->extra, 0, sizeof(luv_thread_arg_t)); - handle->data = data; - luv_check_callback(L, handle->data, LUV_ASYNC, 1); - return 1; -} - -static int luv_async_send(lua_State* L) { - int ret; - uv_async_t* handle = luv_check_async(L, 1); - luv_thread_arg_t* arg = ((luv_handle_t*) handle->data)->extra; - - luv_thread_arg_set(L, arg, 2, lua_gettop(L), 0); - ret = uv_async_send(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} diff --git a/3rdparty/luv/src/check.c b/3rdparty/luv/src/check.c deleted file mode 100644 index dbd330ae255..00000000000 --- a/3rdparty/luv/src/check.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static uv_check_t* luv_check_check(lua_State* L, int index) { - uv_check_t* handle = luv_checkudata(L, index, "uv_check"); - luaL_argcheck(L, handle->type == UV_CHECK && handle->data, index, "Expected uv_check_t"); - return handle; -} - -static int luv_new_check(lua_State* L) { - uv_check_t* handle = luv_newuserdata(L, sizeof(*handle)); - int ret = uv_check_init(luv_loop(L), handle); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -static void luv_check_cb(uv_check_t* handle) { - lua_State* L = luv_state(handle->loop); - luv_handle_t* data = handle->data; - luv_call_callback(L, data, LUV_CHECK, 0); -} - -static int luv_check_start(lua_State* L) { - uv_check_t* handle = luv_check_check(L, 1); - int ret; - luv_check_callback(L, handle->data, LUV_CHECK, 2); - ret = uv_check_start(handle, luv_check_cb); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_check_stop(lua_State* L) { - uv_check_t* handle = luv_check_check(L, 1); - int ret = uv_check_stop(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - diff --git a/3rdparty/luv/src/constants.c b/3rdparty/luv/src/constants.c deleted file mode 100644 index 3417028c438..00000000000 --- a/3rdparty/luv/src/constants.c +++ /dev/null @@ -1,649 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "luv.h" - -static int luv_constants(lua_State* L) { - lua_newtable(L); - - // File open bitwise flags O_* -#ifdef O_RDONLY - lua_pushinteger(L, O_RDONLY); - lua_setfield(L, -2, "O_RDONLY"); -#endif -#ifdef O_WRONLY - lua_pushinteger(L, O_WRONLY); - lua_setfield(L, -2, "O_WRONLY"); -#endif -#ifdef O_RDWR - lua_pushinteger(L, O_RDWR); - lua_setfield(L, -2, "O_RDWR"); -#endif -#ifdef O_APPEND - lua_pushinteger(L, O_APPEND); - lua_setfield(L, -2, "O_APPEND"); -#endif -#ifdef O_CREAT - lua_pushinteger(L, O_CREAT); - lua_setfield(L, -2, "O_CREAT"); -#endif -#ifdef O_DSYNC - lua_pushinteger(L, O_DSYNC); - lua_setfield(L, -2, "O_DSYNC"); -#endif -#ifdef O_EXCL - lua_pushinteger(L, O_EXCL); - lua_setfield(L, -2, "O_EXCL"); -#endif -#ifdef O_EXLOCK - lua_pushinteger(L, O_EXLOCK); - lua_setfield(L, -2, "O_EXLOCK"); -#endif -#ifdef O_NOCTTY - lua_pushinteger(L, O_NOCTTY); - lua_setfield(L, -2, "O_NOCTTY"); -#endif -#ifdef O_NONBLOCK - lua_pushinteger(L, O_NONBLOCK); - lua_setfield(L, -2, "O_NONBLOCK"); -#endif -#ifdef O_RSYNC - lua_pushinteger(L, O_RSYNC); - lua_setfield(L, -2, "O_RSYNC"); -#endif -#ifdef O_SYNC - lua_pushinteger(L, O_SYNC); - lua_setfield(L, -2, "O_SYNC"); -#endif -#ifdef O_TRUNC - lua_pushinteger(L, O_TRUNC); - lua_setfield(L, -2, "O_TRUNC"); -#endif - - // Socket types SOCK_* -#ifdef SOCK_STREAM - lua_pushinteger(L, SOCK_STREAM); - lua_setfield(L, -2, "SOCK_STREAM"); -#endif -#ifdef SOCK_DGRAM - lua_pushinteger(L, SOCK_DGRAM); - lua_setfield(L, -2, "SOCK_DGRAM"); -#endif -#ifdef SOCK_SEQPACKET - lua_pushinteger(L, SOCK_SEQPACKET); - lua_setfield(L, -2, "SOCK_SEQPACKET"); -#endif -#ifdef SOCK_RAW - lua_pushinteger(L, SOCK_RAW); - lua_setfield(L, -2, "SOCK_RAW"); -#endif -#ifdef SOCK_RDM - lua_pushinteger(L, SOCK_RDM); - lua_setfield(L, -2, "SOCK_RDM"); -#endif - - // AF_* -#ifdef AF_UNIX - lua_pushinteger(L, AF_UNIX); - lua_setfield(L, -2, "AF_UNIX"); -#endif -#ifdef AF_INET - lua_pushinteger(L, AF_INET); - lua_setfield(L, -2, "AF_INET"); -#endif -#ifdef AF_INET6 - lua_pushinteger(L, AF_INET6); - lua_setfield(L, -2, "AF_INET6"); -#endif -#ifdef AF_IPX - lua_pushinteger(L, AF_IPX); - lua_setfield(L, -2, "AF_IPX"); -#endif -#ifdef AF_NETLINK - lua_pushinteger(L, AF_NETLINK); - lua_setfield(L, -2, "AF_NETLINK"); -#endif -#ifdef AF_X25 - lua_pushinteger(L, AF_X25); - lua_setfield(L, -2, "AF_X25"); -#endif -#ifdef AF_AX25 - lua_pushinteger(L, AF_AX25); - lua_setfield(L, -2, "AF_AX25"); -#endif -#ifdef AF_ATMPVC - lua_pushinteger(L, AF_ATMPVC); - lua_setfield(L, -2, "AF_ATMPVC"); -#endif -#ifdef AF_APPLETALK - lua_pushinteger(L, AF_APPLETALK); - lua_setfield(L, -2, "AF_APPLETALK"); -#endif -#ifdef AF_PACKET - lua_pushinteger(L, AF_PACKET); - lua_setfield(L, -2, "AF_PACKET"); -#endif - - // AI_* -#ifdef AI_ADDRCONFIG - lua_pushinteger(L, AI_ADDRCONFIG); - lua_setfield(L, -2, "AI_ADDRCONFIG"); -#endif -#ifdef AI_V4MAPPED - lua_pushinteger(L, AI_V4MAPPED); - lua_setfield(L, -2, "AI_V4MAPPED"); -#endif -#ifdef AI_ALL - lua_pushinteger(L, AI_ALL); - lua_setfield(L, -2, "AI_ALL"); -#endif -#ifdef AI_NUMERICHOST - lua_pushinteger(L, AI_NUMERICHOST); - lua_setfield(L, -2, "AI_NUMERICHOST"); -#endif -#ifdef AI_PASSIVE - lua_pushinteger(L, AI_PASSIVE); - lua_setfield(L, -2, "AI_PASSIVE"); -#endif -#ifdef AI_NUMERICSERV - lua_pushinteger(L, AI_NUMERICSERV); - lua_setfield(L, -2, "AI_NUMERICSERV"); -#endif - - // Signals -#ifdef SIGHUP - lua_pushinteger(L, SIGHUP); - lua_setfield(L, -2, "SIGHUP"); -#endif -#ifdef SIGINT - lua_pushinteger(L, SIGINT); - lua_setfield(L, -2, "SIGINT"); -#endif -#ifdef SIGQUIT - lua_pushinteger(L, SIGQUIT); - lua_setfield(L, -2, "SIGQUIT"); -#endif -#ifdef SIGILL - lua_pushinteger(L, SIGILL); - lua_setfield(L, -2, "SIGILL"); -#endif -#ifdef SIGTRAP - lua_pushinteger(L, SIGTRAP); - lua_setfield(L, -2, "SIGTRAP"); -#endif -#ifdef SIGABRT - lua_pushinteger(L, SIGABRT); - lua_setfield(L, -2, "SIGABRT"); -#endif -#ifdef SIGIOT - lua_pushinteger(L, SIGIOT); - lua_setfield(L, -2, "SIGIOT"); -#endif -#ifdef SIGBUS - lua_pushinteger(L, SIGBUS); - lua_setfield(L, -2, "SIGBUS"); -#endif -#ifdef SIGFPE - lua_pushinteger(L, SIGFPE); - lua_setfield(L, -2, "SIGFPE"); -#endif -#ifdef SIGKILL - lua_pushinteger(L, SIGKILL); - lua_setfield(L, -2, "SIGKILL"); -#endif -#ifdef SIGUSR1 - lua_pushinteger(L, SIGUSR1); - lua_setfield(L, -2, "SIGUSR1"); -#endif -#ifdef SIGSEGV - lua_pushinteger(L, SIGSEGV); - lua_setfield(L, -2, "SIGSEGV"); -#endif -#ifdef SIGUSR2 - lua_pushinteger(L, SIGUSR2); - lua_setfield(L, -2, "SIGUSR2"); -#endif -#ifdef SIGPIPE - lua_pushinteger(L, SIGPIPE); - lua_setfield(L, -2, "SIGPIPE"); -#endif -#ifdef SIGALRM - lua_pushinteger(L, SIGALRM); - lua_setfield(L, -2, "SIGALRM"); -#endif -#ifdef SIGTERM - lua_pushinteger(L, SIGTERM); - lua_setfield(L, -2, "SIGTERM"); -#endif -#ifdef SIGCHLD - lua_pushinteger(L, SIGCHLD); - lua_setfield(L, -2, "SIGCHLD"); -#endif -#ifdef SIGSTKFLT - lua_pushinteger(L, SIGSTKFLT); - lua_setfield(L, -2, "SIGSTKFLT"); -#endif -#ifdef SIGCONT - lua_pushinteger(L, SIGCONT); - lua_setfield(L, -2, "SIGCONT"); -#endif -#ifdef SIGSTOP - lua_pushinteger(L, SIGSTOP); - lua_setfield(L, -2, "SIGSTOP"); -#endif -#ifdef SIGTSTP - lua_pushinteger(L, SIGTSTP); - lua_setfield(L, -2, "SIGTSTP"); -#endif -#ifdef SIGBREAK - lua_pushinteger(L, SIGBREAK); - lua_setfield(L, -2, "SIGBREAK"); -#endif -#ifdef SIGTTIN - lua_pushinteger(L, SIGTTIN); - lua_setfield(L, -2, "SIGTTIN"); -#endif -#ifdef SIGTTOU - lua_pushinteger(L, SIGTTOU); - lua_setfield(L, -2, "SIGTTOU"); -#endif -#ifdef SIGURG - lua_pushinteger(L, SIGURG); - lua_setfield(L, -2, "SIGURG"); -#endif -#ifdef SIGXCPU - lua_pushinteger(L, SIGXCPU); - lua_setfield(L, -2, "SIGXCPU"); -#endif -#ifdef SIGXFSZ - lua_pushinteger(L, SIGXFSZ); - lua_setfield(L, -2, "SIGXFSZ"); -#endif -#ifdef SIGVTALRM - lua_pushinteger(L, SIGVTALRM); - lua_setfield(L, -2, "SIGVTALRM"); -#endif -#ifdef SIGPROF - lua_pushinteger(L, SIGPROF); - lua_setfield(L, -2, "SIGPROF"); -#endif -#ifdef SIGWINCH - lua_pushinteger(L, SIGWINCH); - lua_setfield(L, -2, "SIGWINCH"); -#endif -#ifdef SIGIO - lua_pushinteger(L, SIGIO); - lua_setfield(L, -2, "SIGIO"); -#endif -#ifdef SIGPOLL - lua_pushinteger(L, SIGPOLL); - lua_setfield(L, -2, "SIGPOLL"); -#endif -#ifdef SIGLOST - lua_pushinteger(L, SIGLOST); - lua_setfield(L, -2, "SIGLOST"); -#endif -#ifdef SIGPWR - lua_pushinteger(L, SIGPWR); - lua_setfield(L, -2, "SIGPWR"); -#endif -#ifdef SIGSYS - lua_pushinteger(L, SIGSYS); - lua_setfield(L, -2, "SIGSYS"); -#endif - return 1; -} - -static int luv_af_string_to_num(const char* string) { - if (!string) return AF_UNSPEC; -#ifdef AF_UNIX - if (strcmp(string, "unix") == 0) return AF_UNIX; -#endif -#ifdef AF_INET - if (strcmp(string, "inet") == 0) return AF_INET; -#endif -#ifdef AF_INET6 - if (strcmp(string, "inet6") == 0) return AF_INET6; -#endif -#ifdef AF_IPX - if (strcmp(string, "ipx") == 0) return AF_IPX; -#endif -#ifdef AF_NETLINK - if (strcmp(string, "netlink") == 0) return AF_NETLINK; -#endif -#ifdef AF_X25 - if (strcmp(string, "x25") == 0) return AF_X25; -#endif -#ifdef AF_AX25 - if (strcmp(string, "ax25") == 0) return AF_AX25; -#endif -#ifdef AF_ATMPVC - if (strcmp(string, "atmpvc") == 0) return AF_ATMPVC; -#endif -#ifdef AF_APPLETALK - if (strcmp(string, "appletalk") == 0) return AF_APPLETALK; -#endif -#ifdef AF_PACKET - if (strcmp(string, "packet") == 0) return AF_PACKET; -#endif - return 0; -} - -static const char* luv_af_num_to_string(const int num) { - switch (num) { -#ifdef AF_UNIX - case AF_UNIX: return "unix"; -#endif -#ifdef AF_INET - case AF_INET: return "inet"; -#endif -#ifdef AF_INET6 - case AF_INET6: return "inet6"; -#endif -#ifdef AF_IPX - case AF_IPX: return "ipx"; -#endif -#ifdef AF_NETLINK - case AF_NETLINK: return "netlink"; -#endif -#ifdef AF_X25 - case AF_X25: return "x25"; -#endif -#ifdef AF_AX25 - case AF_AX25: return "ax25"; -#endif -#ifdef AF_ATMPVC - case AF_ATMPVC: return "atmpvc"; -#endif -#ifdef AF_APPLETALK - case AF_APPLETALK: return "appletalk"; -#endif -#ifdef AF_PACKET - case AF_PACKET: return "packet"; -#endif - } - return NULL; -} - - -static int luv_sock_string_to_num(const char* string) { - if (!string) return 0; -#ifdef SOCK_STREAM - if (strcmp(string, "stream") == 0) return SOCK_STREAM; -#endif -#ifdef SOCK_DGRAM - if (strcmp(string, "dgram") == 0) return SOCK_DGRAM; -#endif -#ifdef SOCK_SEQPACKET - if (strcmp(string, "seqpacket") == 0) return SOCK_SEQPACKET; -#endif -#ifdef SOCK_RAW - if (strcmp(string, "raw") == 0) return SOCK_RAW; -#endif -#ifdef SOCK_RDM - if (strcmp(string, "rdm") == 0) return SOCK_RDM; -#endif - return 0; -} - -static const char* luv_sock_num_to_string(const int num) { - switch (num) { -#ifdef SOCK_STREAM - case SOCK_STREAM: return "stream"; -#endif -#ifdef SOCK_DGRAM - case SOCK_DGRAM: return "dgram"; -#endif -#ifdef SOCK_SEQPACKET - case SOCK_SEQPACKET: return "seqpacket"; -#endif -#ifdef SOCK_RAW - case SOCK_RAW: return "raw"; -#endif -#ifdef SOCK_RDM - case SOCK_RDM: return "rdm"; -#endif - } - return NULL; -} - -static int luv_sig_string_to_num(const char* string) { - if (!string) return 0; -#ifdef SIGHUP - if (strcmp(string, "sighup") == 0) return SIGHUP; -#endif -#ifdef SIGINT - if (strcmp(string, "sigint") == 0) return SIGINT; -#endif -#ifdef SIGQUIT - if (strcmp(string, "sigquit") == 0) return SIGQUIT; -#endif -#ifdef SIGILL - if (strcmp(string, "sigill") == 0) return SIGILL; -#endif -#ifdef SIGTRAP - if (strcmp(string, "sigtrap") == 0) return SIGTRAP; -#endif -#ifdef SIGABRT - if (strcmp(string, "sigabrt") == 0) return SIGABRT; -#endif -#ifdef SIGIOT - if (strcmp(string, "sigiot") == 0) return SIGIOT; -#endif -#ifdef SIGBUS - if (strcmp(string, "sigbus") == 0) return SIGBUS; -#endif -#ifdef SIGFPE - if (strcmp(string, "sigfpe") == 0) return SIGFPE; -#endif -#ifdef SIGKILL - if (strcmp(string, "sigkill") == 0) return SIGKILL; -#endif -#ifdef SIGUSR1 - if (strcmp(string, "sigusr1") == 0) return SIGUSR1; -#endif -#ifdef SIGSEGV - if (strcmp(string, "sigsegv") == 0) return SIGSEGV; -#endif -#ifdef SIGUSR2 - if (strcmp(string, "sigusr2") == 0) return SIGUSR2; -#endif -#ifdef SIGPIPE - if (strcmp(string, "sigpipe") == 0) return SIGPIPE; -#endif -#ifdef SIGALRM - if (strcmp(string, "sigalrm") == 0) return SIGALRM; -#endif -#ifdef SIGTERM - if (strcmp(string, "sigterm") == 0) return SIGTERM; -#endif -#ifdef SIGCHLD - if (strcmp(string, "sigchld") == 0) return SIGCHLD; -#endif -#ifdef SIGSTKFLT - if (strcmp(string, "sigstkflt") == 0) return SIGSTKFLT; -#endif -#ifdef SIGCONT - if (strcmp(string, "sigcont") == 0) return SIGCONT; -#endif -#ifdef SIGSTOP - if (strcmp(string, "sigstop") == 0) return SIGSTOP; -#endif -#ifdef SIGTSTP - if (strcmp(string, "sigtstp") == 0) return SIGTSTP; -#endif -#ifdef SIGBREAK - if (strcmp(string, "sigbreak") == 0) return SIGBREAK; -#endif -#ifdef SIGTTIN - if (strcmp(string, "sigttin") == 0) return SIGTTIN; -#endif -#ifdef SIGTTOU - if (strcmp(string, "sigttou") == 0) return SIGTTOU; -#endif -#ifdef SIGURG - if (strcmp(string, "sigurg") == 0) return SIGURG; -#endif -#ifdef SIGXCPU - if (strcmp(string, "sigxcpu") == 0) return SIGXCPU; -#endif -#ifdef SIGXFSZ - if (strcmp(string, "sigxfsz") == 0) return SIGXFSZ; -#endif -#ifdef SIGVTALRM - if (strcmp(string, "sigvtalrm") == 0) return SIGVTALRM; -#endif -#ifdef SIGPROF - if (strcmp(string, "sigprof") == 0) return SIGPROF; -#endif -#ifdef SIGWINCH - if (strcmp(string, "sigwinch") == 0) return SIGWINCH; -#endif -#ifdef SIGIO - if (strcmp(string, "sigio") == 0) return SIGIO; -#endif -#ifdef SIGPOLL - if (strcmp(string, "sigpoll") == 0) return SIGPOLL; -#endif -#ifdef SIGLOST - if (strcmp(string, "siglost") == 0) return SIGLOST; -#endif -#ifdef SIGPWR - if (strcmp(string, "sigpwr") == 0) return SIGPWR; -#endif -#ifdef SIGSYS - if (strcmp(string, "sigsys") == 0) return SIGSYS; -#endif - return 0; -} - -static const char* luv_sig_num_to_string(const int num) { - switch (num) { -#ifdef SIGHUP - case SIGHUP: return "sighup"; -#endif -#ifdef SIGINT - case SIGINT: return "sigint"; -#endif -#ifdef SIGQUIT - case SIGQUIT: return "sigquit"; -#endif -#ifdef SIGILL - case SIGILL: return "sigill"; -#endif -#ifdef SIGTRAP - case SIGTRAP: return "sigtrap"; -#endif -#ifdef SIGABRT - case SIGABRT: return "sigabrt"; -#endif -#ifdef SIGIOT -# if SIGIOT != SIGABRT - case SIGIOT: return "sigiot"; -# endif -#endif -#ifdef SIGBUS - case SIGBUS: return "sigbus"; -#endif -#ifdef SIGFPE - case SIGFPE: return "sigfpe"; -#endif -#ifdef SIGKILL - case SIGKILL: return "sigkill"; -#endif -#ifdef SIGUSR1 - case SIGUSR1: return "sigusr1"; -#endif -#ifdef SIGSEGV - case SIGSEGV: return "sigsegv"; -#endif -#ifdef SIGUSR2 - case SIGUSR2: return "sigusr2"; -#endif -#ifdef SIGPIPE - case SIGPIPE: return "sigpipe"; -#endif -#ifdef SIGALRM - case SIGALRM: return "sigalrm"; -#endif -#ifdef SIGTERM - case SIGTERM: return "sigterm"; -#endif -#ifdef SIGCHLD - case SIGCHLD: return "sigchld"; -#endif -#ifdef SIGSTKFLT - case SIGSTKFLT: return "sigstkflt"; -#endif -#ifdef SIGCONT - case SIGCONT: return "sigcont"; -#endif -#ifdef SIGSTOP - case SIGSTOP: return "sigstop"; -#endif -#ifdef SIGTSTP - case SIGTSTP: return "sigtstp"; -#endif -#ifdef SIGBREAK - case SIGBREAK: return "sigbreak"; -#endif -#ifdef SIGTTIN - case SIGTTIN: return "sigttin"; -#endif -#ifdef SIGTTOU - case SIGTTOU: return "sigttou"; -#endif -#ifdef SIGURG - case SIGURG: return "sigurg"; -#endif -#ifdef SIGXCPU - case SIGXCPU: return "sigxcpu"; -#endif -#ifdef SIGXFSZ - case SIGXFSZ: return "sigxfsz"; -#endif -#ifdef SIGVTALRM - case SIGVTALRM: return "sigvtalrm"; -#endif -#ifdef SIGPROF - case SIGPROF: return "sigprof"; -#endif -#ifdef SIGWINCH - case SIGWINCH: return "sigwinch"; -#endif -#ifdef SIGIO - case SIGIO: return "sigio"; -#endif -#ifdef SIGPOLL -# if SIGPOLL != SIGIO - case SIGPOLL: return "sigpoll"; -# endif -#endif -#ifdef SIGLOST - case SIGLOST: return "siglost"; -#endif -#ifdef SIGPWR -# if SIGPWR != SIGLOST - case SIGPWR: return "sigpwr"; -# endif -#endif -#ifdef SIGSYS - case SIGSYS: return "sigsys"; -#endif - } - return NULL; -} diff --git a/3rdparty/luv/src/dns.c b/3rdparty/luv/src/dns.c deleted file mode 100644 index f3446f30985..00000000000 --- a/3rdparty/luv/src/dns.c +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "luv.h" -#ifndef WIN32 -#include -#include -#include -#endif - -static void luv_pushaddrinfo(lua_State* L, struct addrinfo* res) { - char ip[INET6_ADDRSTRLEN]; - int port, i = 0; - const char *addr; - struct addrinfo* curr = res; - lua_newtable(L); - for (curr = res; curr; curr = curr->ai_next) { - if (curr->ai_family == AF_INET || curr->ai_family == AF_INET6) { - lua_newtable(L); - if (curr->ai_family == AF_INET) { - addr = (char*) &((struct sockaddr_in*) curr->ai_addr)->sin_addr; - port = ((struct sockaddr_in*) curr->ai_addr)->sin_port; - } else { - addr = (char*) &((struct sockaddr_in6*) curr->ai_addr)->sin6_addr; - port = ((struct sockaddr_in6*) curr->ai_addr)->sin6_port; - } - lua_pushstring(L, luv_af_num_to_string(curr->ai_family)); - lua_setfield(L, -2, "family"); - uv_inet_ntop(curr->ai_family, addr, ip, INET6_ADDRSTRLEN); - lua_pushstring(L, ip); - lua_setfield(L, -2, "addr"); - if (ntohs(port)) { - lua_pushinteger(L, ntohs(port)); - lua_setfield(L, -2, "port"); - } - lua_pushstring(L, luv_sock_num_to_string(curr->ai_socktype)); - lua_setfield(L, -2, "socktype"); - lua_pushstring(L, luv_af_num_to_string(curr->ai_protocol)); - lua_setfield(L, -2, "protocol"); - if (curr->ai_canonname) { - lua_pushstring(L, curr->ai_canonname); - lua_setfield(L, -2, "canonname"); - } - lua_rawseti(L, -2, ++i); - } - } -} - -static void luv_getaddrinfo_cb(uv_getaddrinfo_t* req, int status, struct addrinfo* res) { - lua_State* L = luv_state(req->loop); - int nargs; - - if (status < 0) { - luv_status(L, status); - nargs = 1; - } - else { - lua_pushnil(L); - luv_pushaddrinfo(L, res); - nargs = 2; - } - luv_fulfill_req(L, req->data, nargs); - luv_cleanup_req(L, req->data); - req->data = NULL; - if (res) uv_freeaddrinfo(res); -} - - -static int luv_getaddrinfo(lua_State* L) { - uv_getaddrinfo_t* req; - const char* node; - const char* service; - struct addrinfo hints_s; - struct addrinfo* hints = &hints_s; - int ret, ref; - if (lua_isnoneornil(L, 1)) node = NULL; - else node = luaL_checkstring(L, 1); - if (lua_isnoneornil(L, 2)) service = NULL; - else service = luaL_checkstring(L, 2); - if (!lua_isnoneornil(L, 3)) luaL_checktype(L, 3, LUA_TTABLE); - else hints = NULL; - ref = lua_isnoneornil(L, 4) ? LUA_NOREF : luv_check_continuation(L, 4); - if (hints) { - // Initialize the hints - memset(hints, 0, sizeof(*hints)); - - // Process the `family` hint. - lua_getfield(L, 3, "family"); - if (lua_isnumber(L, -1)) { - hints->ai_family = lua_tointeger(L, -1); - } - else if (lua_isstring(L, -1)) { - hints->ai_family = luv_af_string_to_num(lua_tostring(L, -1)); - } - else if (lua_isnil(L, -1)) { - hints->ai_family = AF_UNSPEC; - } - else { - luaL_argerror(L, 3, "family hint must be string if set"); - } - lua_pop(L, 1); - - // Process `socktype` hint - lua_getfield(L, 3, "socktype"); - if (lua_isnumber(L, -1)) { - hints->ai_socktype = lua_tointeger(L, -1); - } - else if (lua_isstring(L, -1)) { - hints->ai_socktype = luv_sock_string_to_num(lua_tostring(L, -1)); - } - else if (!lua_isnil(L, -1)) { - return luaL_argerror(L, 3, "socktype hint must be string if set"); - } - lua_pop(L, 1); - - // Process the `protocol` hint - lua_getfield(L, 3, "protocol"); - if (lua_isnumber(L, -1)) { - hints->ai_protocol = lua_tointeger(L, -1); - } - else if (lua_isstring(L, -1)) { - int protocol = luv_af_string_to_num(lua_tostring(L, -1)); - if (protocol) { - hints->ai_protocol = protocol; - } - else { - return luaL_argerror(L, 3, "Invalid protocol hint"); - } - } - else if (!lua_isnil(L, -1)) { - return luaL_argerror(L, 3, "protocol hint must be string if set"); - } - lua_pop(L, 1); - - lua_getfield(L, 3, "addrconfig"); - if (lua_toboolean(L, -1)) hints->ai_flags |= AI_ADDRCONFIG; - lua_pop(L, 1); - - lua_getfield(L, 3, "v4mapped"); - if (lua_toboolean(L, -1)) hints->ai_flags |= AI_V4MAPPED; - lua_pop(L, 1); - - lua_getfield(L, 3, "all"); - if (lua_toboolean(L, -1)) hints->ai_flags |= AI_ALL; - lua_pop(L, 1); - - lua_getfield(L, 3, "numerichost"); - if (lua_toboolean(L, -1)) hints->ai_flags |= AI_NUMERICHOST; - lua_pop(L, 1); - - lua_getfield(L, 3, "passive"); - if (lua_toboolean(L, -1)) hints->ai_flags |= AI_PASSIVE; - lua_pop(L, 1); - - lua_getfield(L, 3, "numericserv"); - if (lua_toboolean(L, -1)) { - hints->ai_flags |= AI_NUMERICSERV; - /* On OS X upto at least OSX 10.9, getaddrinfo crashes - * if AI_NUMERICSERV is set and the servname is NULL or "0". - * This workaround avoids a segfault in libsystem. - */ - if (NULL == service) service = "00"; - } - lua_pop(L, 1); - - lua_getfield(L, 3, "canonname"); - if (lua_toboolean(L, -1)) hints->ai_flags |= AI_CANONNAME; - lua_pop(L, 1); - } - - req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - - ret = uv_getaddrinfo(luv_loop(L), req, ref == LUA_NOREF ? NULL : luv_getaddrinfo_cb, node, service, hints); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - if (ref == LUA_NOREF) { - - lua_pop(L, 1); - luv_pushaddrinfo(L, req->addrinfo); - uv_freeaddrinfo(req->addrinfo); - luv_cleanup_req(L, req->data); - } - return 1; -} - -static void luv_getnameinfo_cb(uv_getnameinfo_t* req, int status, const char* hostname, const char* service) { - lua_State* L = luv_state(req->loop); - - int nargs; - - if (status < 0) { - luv_status(L, status); - nargs = 1; - } - else { - lua_pushnil(L); - lua_pushstring(L, hostname); - lua_pushstring(L, service); - nargs = 3; - } - - luv_fulfill_req(L, req->data, nargs); - luv_cleanup_req(L, req->data); - req->data = NULL; -} - -static int luv_getnameinfo(lua_State* L) { - uv_getnameinfo_t* req; - struct sockaddr_storage addr; - const char* ip = NULL; - int flags = 0; - int ret, ref, port = 0; - - luaL_checktype(L, 1, LUA_TTABLE); - memset(&addr, 0, sizeof(addr)); - - lua_getfield(L, 1, "ip"); - if (lua_isstring(L, -1)) { - ip = lua_tostring(L, -1); - } - else if (!lua_isnil(L, -1)) { - luaL_argerror(L, 1, "ip property must be string if set"); - } - lua_pop(L, 1); - - lua_getfield(L, 1, "port"); - if (lua_isnumber(L, -1)) { - port = lua_tointeger(L, -1); - } - else if (!lua_isnil(L, -1)) { - luaL_argerror(L, 1, "port property must be integer if set"); - } - lua_pop(L, 1); - - if (ip || port) { - if (!ip) ip = "0.0.0.0"; - if (!uv_ip4_addr(ip, port, (struct sockaddr_in*)&addr)) { - addr.ss_family = AF_INET; - } - else if (!uv_ip6_addr(ip, port, (struct sockaddr_in6*)&addr)) { - addr.ss_family = AF_INET6; - } - else { - return luaL_argerror(L, 1, "Invalid ip address or port"); - } - } - - lua_getfield(L, 1, "family"); - if (lua_isnumber(L, -1)) { - addr.ss_family = lua_tointeger(L, -1); - } - else if (lua_isstring(L, -1)) { - addr.ss_family = luv_af_string_to_num(lua_tostring(L, -1)); - } - else if (!lua_isnil(L, -1)) { - luaL_argerror(L, 1, "family must be string if set"); - } - lua_pop(L, 1); - - ref = lua_isnoneornil(L, 2) ? LUA_NOREF : luv_check_continuation(L, 2); - - req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - - ret = uv_getnameinfo(luv_loop(L), req, ref == LUA_NOREF ? NULL : luv_getnameinfo_cb, (struct sockaddr*)&addr, flags); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - if (ref == LUA_NOREF) { - lua_pop(L, 1); - lua_pushstring(L, req->host); - lua_pushstring(L, req->service); - luv_cleanup_req(L, req->data); - return 2; - } - return 1; -} - diff --git a/3rdparty/luv/src/fs.c b/3rdparty/luv/src/fs.c deleted file mode 100644 index bacf11ea647..00000000000 --- a/3rdparty/luv/src/fs.c +++ /dev/null @@ -1,614 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "luv.h" - -static uv_fs_t* luv_check_fs(lua_State* L, int index) { - uv_fs_t* req = luaL_checkudata(L, index, "uv_req"); - luaL_argcheck(L, req->type = UV_FS && req->data, index, "Expected uv_fs_t"); - return req; -} - -static void luv_push_timespec_table(lua_State* L, const uv_timespec_t* t) { - lua_createtable(L, 0, 2); - lua_pushinteger(L, t->tv_sec); - lua_setfield(L, -2, "sec"); - lua_pushinteger(L, t->tv_nsec); - lua_setfield(L, -2, "nsec"); -} - -static void luv_push_stats_table(lua_State* L, const uv_stat_t* s) { - const char* type = NULL; - lua_createtable(L, 0, 23); - lua_pushinteger(L, s->st_dev); - lua_setfield(L, -2, "dev"); - lua_pushinteger(L, s->st_mode); - lua_setfield(L, -2, "mode"); - lua_pushinteger(L, s->st_nlink); - lua_setfield(L, -2, "nlink"); - lua_pushinteger(L, s->st_uid); - lua_setfield(L, -2, "uid"); - lua_pushinteger(L, s->st_gid); - lua_setfield(L, -2, "gid"); - lua_pushinteger(L, s->st_rdev); - lua_setfield(L, -2, "rdev"); - lua_pushinteger(L, s->st_ino); - lua_setfield(L, -2, "ino"); - lua_pushinteger(L, s->st_size); - lua_setfield(L, -2, "size"); - lua_pushinteger(L, s->st_blksize); - lua_setfield(L, -2, "blksize"); - lua_pushinteger(L, s->st_blocks); - lua_setfield(L, -2, "blocks"); - lua_pushinteger(L, s->st_flags); - lua_setfield(L, -2, "flags"); - lua_pushinteger(L, s->st_gen); - lua_setfield(L, -2, "gen"); - luv_push_timespec_table(L, &s->st_atim); - lua_setfield(L, -2, "atime"); - luv_push_timespec_table(L, &s->st_mtim); - lua_setfield(L, -2, "mtime"); - luv_push_timespec_table(L, &s->st_ctim); - lua_setfield(L, -2, "ctime"); - luv_push_timespec_table(L, &s->st_birthtim); - lua_setfield(L, -2, "birthtime"); - if (S_ISREG(s->st_mode)) { - type = "file"; - } - else if (S_ISDIR(s->st_mode)) { - type = "directory"; - } - else if (S_ISLNK(s->st_mode)) { - type = "link"; - } - else if (S_ISFIFO(s->st_mode)) { - type = "fifo"; - } -#ifdef S_ISSOCK - else if (S_ISSOCK(s->st_mode)) { - type = "socket"; - } -#endif - else if (S_ISCHR(s->st_mode)) { - type = "char"; - } - else if (S_ISBLK(s->st_mode)) { - type = "block"; - } - if (type) { - lua_pushstring(L, type); - lua_setfield(L, -2, "type"); - } -} - -static int luv_check_flags(lua_State* L, int index) { - const char* string; - if (lua_isnumber(L, index)) { - return lua_tointeger(L, index); - } - else if (!lua_isstring(L, index)) { - return luaL_argerror(L, index, "Expected string or integer for file open mode"); - } - string = lua_tostring(L, index); - - if (strcmp(string, "r") == 0) return O_RDONLY; -#ifdef O_SYNC - if (strcmp(string, "rs") == 0 || - strcmp(string, "sr") == 0) return O_RDONLY | O_SYNC; -#endif - if (strcmp(string, "r+") == 0) return O_RDWR; -#ifdef O_SYNC - if (strcmp(string, "rs+") == 0 || - strcmp(string, "sr+") == 0) return O_RDWR | O_SYNC; -#endif - if (strcmp(string, "w") == 0) return O_TRUNC | O_CREAT | O_WRONLY; - if (strcmp(string, "wx") == 0 || - strcmp(string, "xw") == 0) return O_TRUNC | O_CREAT | O_WRONLY | O_EXCL; - if (strcmp(string, "w+") == 0) return O_TRUNC | O_CREAT | O_RDWR; - if (strcmp(string, "wx+") == 0 || - strcmp(string, "xw+") == 0) return O_TRUNC | O_CREAT | O_RDWR | O_EXCL; - if (strcmp(string, "a") == 0) return O_APPEND | O_CREAT | O_WRONLY; - if (strcmp(string, "ax") == 0 || - strcmp(string, "xa") == 0) return O_APPEND | O_CREAT | O_WRONLY | O_EXCL; - if (strcmp(string, "a+") == 0) return O_APPEND | O_CREAT | O_RDWR; - if (strcmp(string, "ax+") == 0 || - strcmp(string, "xa+") == 0) return O_APPEND | O_CREAT | O_RDWR | O_EXCL; - - return luaL_error(L, "Unknown file open flag '%s'", string); -} - -static int luv_check_amode(lua_State* L, int index) { - size_t i; - int mode; - const char* string; - if (lua_isnumber(L, index)) { - return lua_tointeger(L, index); - } - else if (!lua_isstring(L, index)) { - return luaL_argerror(L, index, "Expected string or integer for file access mode check"); - } - string = lua_tostring(L, index); - mode = 0; - for (i = 0; i < strlen(string); ++i) { - switch (string[i]) { - case 'r': case 'R': - mode |= R_OK; - break; - case 'w': case 'W': - mode |= W_OK; - break; - case 'x': case 'X': - mode |= X_OK; - break; - default: - return luaL_argerror(L, index, "Unknown character in access mode string"); - } - } - return mode; -} - -/* Processes a result and pushes the data onto the stack - returns the number of items pushed */ -static int push_fs_result(lua_State* L, uv_fs_t* req) { - luv_req_t* data = req->data; - - if (req->fs_type == UV_FS_ACCESS) { - lua_pushboolean(L, req->result >= 0); - return 1; - } - - if (req->result < 0) { - lua_pushnil(L); - if (req->path) { - lua_pushfstring(L, "%s: %s: %s", uv_err_name(req->result), uv_strerror(req->result), req->path); - } - else { - lua_pushfstring(L, "%s: %s", uv_err_name(req->result), uv_strerror(req->result)); - } - return 2; - } - - switch (req->fs_type) { - case UV_FS_CLOSE: - case UV_FS_RENAME: - case UV_FS_UNLINK: - case UV_FS_RMDIR: - case UV_FS_MKDIR: - case UV_FS_FTRUNCATE: - case UV_FS_FSYNC: - case UV_FS_FDATASYNC: - case UV_FS_LINK: - case UV_FS_SYMLINK: - case UV_FS_CHMOD: - case UV_FS_FCHMOD: - case UV_FS_CHOWN: - case UV_FS_FCHOWN: - case UV_FS_UTIME: - case UV_FS_FUTIME: - lua_pushboolean(L, 1); - return 1; - - case UV_FS_OPEN: - case UV_FS_SENDFILE: - case UV_FS_WRITE: - lua_pushinteger(L, req->result); - return 1; - - case UV_FS_STAT: - case UV_FS_LSTAT: - case UV_FS_FSTAT: - luv_push_stats_table(L, &req->statbuf); - return 1; - - case UV_FS_MKDTEMP: - lua_pushstring(L, req->path); - return 1; - - case UV_FS_READLINK: - case UV_FS_REALPATH: - lua_pushstring(L, (char*)req->ptr); - return 1; - - case UV_FS_READ: - lua_pushlstring(L, data->data, req->result); - return 1; - - case UV_FS_SCANDIR: - // Expose the userdata for the request. - lua_rawgeti(L, LUA_REGISTRYINDEX, data->req_ref); - return 1; - - default: - lua_pushnil(L); - lua_pushfstring(L, "UNKNOWN FS TYPE %d\n", req->fs_type); - return 2; - } - -} - -static void luv_fs_cb(uv_fs_t* req) { - lua_State* L = luv_state(req->loop); - - int nargs = push_fs_result(L, req); - if (nargs == 2 && lua_isnil(L, -nargs)) { - // If it was an error, convert to (err, value) format. - lua_remove(L, -nargs); - nargs--; - } - else { - // Otherwise insert a nil in front to convert to (err, value) format. - lua_pushnil(L); - lua_insert(L, -nargs - 1); - nargs++; - } - luv_fulfill_req(L, req->data, nargs); - if (req->fs_type != UV_FS_SCANDIR) { - luv_cleanup_req(L, req->data); - req->data = NULL; - uv_fs_req_cleanup(req); - } -} - -#define FS_CALL(func, req, ...) { \ - int ret, sync; \ - luv_req_t* data = req->data; \ - sync = data->callback_ref == LUA_NOREF; \ - ret = uv_fs_##func(luv_loop(L), req, __VA_ARGS__, \ - sync ? NULL : luv_fs_cb); \ - if (req->fs_type != UV_FS_ACCESS && ret < 0) { \ - lua_pushnil(L); \ - if (req->path) { \ - lua_pushfstring(L, "%s: %s: %s", uv_err_name(req->result), uv_strerror(req->result), req->path); \ - } \ - else { \ - lua_pushfstring(L, "%s: %s", uv_err_name(req->result), uv_strerror(req->result)); \ - } \ - lua_pushstring(L, uv_err_name(req->result)); \ - luv_cleanup_req(L, req->data); \ - req->data = NULL; \ - uv_fs_req_cleanup(req); \ - return 3; \ - } \ - if (sync) { \ - int nargs = push_fs_result(L, req); \ - if (req->fs_type != UV_FS_SCANDIR) { \ - luv_cleanup_req(L, req->data); \ - req->data = NULL; \ - uv_fs_req_cleanup(req); \ - } \ - return nargs; \ - } \ - lua_rawgeti(L, LUA_REGISTRYINDEX, data->req_ref); \ - return 1; \ -} - -static int luv_fs_close(lua_State* L) { - uv_file file = luaL_checkinteger(L, 1); - int ref = luv_check_continuation(L, 2); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(close, req, file); -} - -static int luv_fs_open(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - int flags = luv_check_flags(L, 2); - int mode = luaL_checkinteger(L, 3); - int ref = luv_check_continuation(L, 4); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(open, req, path, flags, mode); -} - -static int luv_fs_read(lua_State* L) { - uv_file file = luaL_checkinteger(L, 1); - int64_t len = luaL_checkinteger(L, 2); - int64_t offset = luaL_checkinteger(L, 3); - uv_buf_t buf; - int ref; - uv_fs_t* req; - char* data = malloc(len); - if (!data) return luaL_error(L, "Failure to allocate buffer"); - buf = uv_buf_init(data, len); - ref = luv_check_continuation(L, 4); - req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - // TODO: find out why we can't just use req->ptr for the base - ((luv_req_t*)req->data)->data = buf.base; - FS_CALL(read, req, file, &buf, 1, offset); -} - -static int luv_fs_unlink(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - int ref = luv_check_continuation(L, 2); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(unlink, req, path); -} - -static int luv_fs_write(lua_State* L) { - uv_file file = luaL_checkinteger(L, 1); - uv_buf_t buf; - int64_t offset; - int ref; - uv_fs_t* req; - size_t count; - uv_buf_t *bufs = NULL; - - if (lua_istable(L, 2)) { - bufs = luv_prep_bufs(L, 2, &count); - buf.base = NULL; - } - else if (lua_isstring(L, 2)) { - luv_check_buf(L, 2, &buf); - count = 1; - } - else { - return luaL_argerror(L, 2, "data must be string or table of strings"); - } - - offset = luaL_checkinteger(L, 3); - ref = luv_check_continuation(L, 4); - req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - req->ptr = buf.base; - ((luv_req_t*)req->data)->data = bufs; - FS_CALL(write, req, file, bufs ? bufs : &buf, count, offset); -} - -static int luv_fs_mkdir(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - int mode = luaL_checkinteger(L, 2); - int ref = luv_check_continuation(L, 3); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(mkdir, req, path, mode); -} - -static int luv_fs_mkdtemp(lua_State* L) { - const char* tpl = luaL_checkstring(L, 1); - int ref = luv_check_continuation(L, 2); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(mkdtemp, req, tpl); -} - -static int luv_fs_rmdir(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - int ref = luv_check_continuation(L, 2); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(rmdir, req, path); -} - -static int luv_fs_scandir(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - int flags = 0; // TODO: find out what these flags are. - int ref = luv_check_continuation(L, 2); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(scandir, req, path, flags); -} - -static int luv_fs_scandir_next(lua_State* L) { - uv_fs_t* req = luv_check_fs(L, 1); - uv_dirent_t ent; - int ret = uv_fs_scandir_next(req, &ent); - const char* type; - if (ret == UV_EOF) { - luv_cleanup_req(L, req->data); - req->data = NULL; - uv_fs_req_cleanup(req); - return 0; - } - if (ret < 0) return luv_error(L, ret); - lua_pushstring(L, ent.name); - switch (ent.type) { - case UV_DIRENT_UNKNOWN: return 1; - case UV_DIRENT_FILE: type = "file"; break; - case UV_DIRENT_DIR: type = "directory"; break; - case UV_DIRENT_LINK: type = "link"; break; - case UV_DIRENT_FIFO: type = "fifo"; break; - case UV_DIRENT_SOCKET: type = "socket"; break; - case UV_DIRENT_CHAR: type = "char"; break; - case UV_DIRENT_BLOCK: type = "block"; break; - default: assert(0); - } - lua_pushstring(L, type); - return 2; -} - -static int luv_fs_stat(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - int ref = luv_check_continuation(L, 2); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(stat, req, path); -} - -static int luv_fs_fstat(lua_State* L) { - uv_file file = luaL_checkinteger(L, 1); - int ref = luv_check_continuation(L, 2); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(fstat, req, file); -} - -static int luv_fs_lstat(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - int ref = luv_check_continuation(L, 2); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(lstat, req, path); -} - -static int luv_fs_rename(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - const char* new_path = luaL_checkstring(L, 2); - int ref = luv_check_continuation(L, 3); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(rename, req, path, new_path); -} - -static int luv_fs_fsync(lua_State* L) { - uv_file file = luaL_checkinteger(L, 1); - int ref = luv_check_continuation(L, 2); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(fsync, req, file); -} - -static int luv_fs_fdatasync(lua_State* L) { - uv_file file = luaL_checkinteger(L, 1); - int ref = luv_check_continuation(L, 2); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(fdatasync, req, file); -} - -static int luv_fs_ftruncate(lua_State* L) { - uv_file file = luaL_checkinteger(L, 1); - int64_t offset = luaL_checkinteger(L, 2); - int ref = luv_check_continuation(L, 3); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(ftruncate, req, file, offset); -} - -static int luv_fs_sendfile(lua_State* L) { - uv_file out_fd = luaL_checkinteger(L, 1); - uv_file in_fd = luaL_checkinteger(L, 2); - int64_t in_offset = luaL_checkinteger(L, 3); - size_t length = luaL_checkinteger(L, 4); - int ref = luv_check_continuation(L, 5); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(sendfile, req, out_fd, in_fd, in_offset, length); -} - -static int luv_fs_access(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - int amode = luv_check_amode(L, 2); - int ref = luv_check_continuation(L, 3); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(access, req, path, amode); -} - -static int luv_fs_chmod(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - int mode = luaL_checkinteger(L, 2); - int ref = luv_check_continuation(L, 3); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(chmod, req, path, mode); -} - -static int luv_fs_fchmod(lua_State* L) { - uv_file file = luaL_checkinteger(L, 1); - int mode = luaL_checkinteger(L, 2); - int ref = luv_check_continuation(L, 3); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(fchmod, req, file, mode); -} - -static int luv_fs_utime(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - double atime = luaL_checknumber(L, 2); - double mtime = luaL_checknumber(L, 3); - int ref = luv_check_continuation(L, 4); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(utime, req, path, atime, mtime); -} - -static int luv_fs_futime(lua_State* L) { - uv_file file = luaL_checkinteger(L, 1); - double atime = luaL_checknumber(L, 2); - double mtime = luaL_checknumber(L, 3); - int ref = luv_check_continuation(L, 4); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(futime, req, file, atime, mtime); -} - -static int luv_fs_link(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - const char* new_path = luaL_checkstring(L, 2); - int ref = luv_check_continuation(L, 3); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(link, req, path, new_path); -} - -static int luv_fs_symlink(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - const char* new_path = luaL_checkstring(L, 2); - int flags = 0, ref; - uv_fs_t* req; - if (lua_type(L, 3) == LUA_TTABLE) { - lua_getfield(L, 3, "dir"); - if (lua_toboolean(L, -1)) flags |= UV_FS_SYMLINK_DIR; - lua_pop(L, 1); - lua_getfield(L, 3, "junction"); - if (lua_toboolean(L, -1)) flags |= UV_FS_SYMLINK_JUNCTION; - lua_pop(L, 1); - } - ref = luv_check_continuation(L, 4); - req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - - FS_CALL(symlink, req, path, new_path, flags); -} - -static int luv_fs_readlink(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - int ref = luv_check_continuation(L, 2); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(readlink, req, path); -} - -static int luv_fs_realpath(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - int ref = luv_check_continuation(L, 2); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(realpath, req, path); -} - -static int luv_fs_chown(lua_State* L) { - const char* path = luaL_checkstring(L, 1); - uv_uid_t uid = luaL_checkinteger(L, 2); - uv_uid_t gid = luaL_checkinteger(L, 3); - int ref = luv_check_continuation(L, 4); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(chown, req, path, uid, gid); -} - -static int luv_fs_fchown(lua_State* L) { - uv_file file = luaL_checkinteger(L, 1); - uv_uid_t uid = luaL_checkinteger(L, 2); - uv_uid_t gid = luaL_checkinteger(L, 3); - int ref = luv_check_continuation(L, 4); - uv_fs_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - FS_CALL(fchown, req, file, uid, gid); -} diff --git a/3rdparty/luv/src/fs_event.c b/3rdparty/luv/src/fs_event.c deleted file mode 100644 index 52bda788421..00000000000 --- a/3rdparty/luv/src/fs_event.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "luv.h" - -static uv_fs_event_t* luv_check_fs_event(lua_State* L, int index) { - uv_fs_event_t* handle = luv_checkudata(L, index, "uv_fs_event"); - luaL_argcheck(L, handle->type == UV_FS_EVENT && handle->data, index, "Expected uv_fs_event_t"); - return handle; -} - -static int luv_new_fs_event(lua_State* L) { - uv_fs_event_t* handle = luv_newuserdata(L, sizeof(*handle)); - int ret = uv_fs_event_init(luv_loop(L), handle); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -static void luv_fs_event_cb(uv_fs_event_t* handle, const char* filename, int events, int status) { - lua_State* L = luv_state(handle->loop); - - // err - luv_status(L, status); - - // filename - lua_pushstring(L, filename); - - // events - lua_newtable(L); - if (events & UV_RENAME) { - lua_pushboolean(L, 1); - lua_setfield(L, -2, "rename"); - } - if (events & UV_CHANGE) { - lua_pushboolean(L, 1); - lua_setfield(L, -2, "change"); - } - - luv_call_callback(L, handle->data, LUV_FS_EVENT, 3); -} - -static int luv_fs_event_start(lua_State* L) { - uv_fs_event_t* handle = luv_check_fs_event(L, 1); - const char* path = luaL_checkstring(L, 2); - int flags = 0, ret; - luaL_checktype(L, 3, LUA_TTABLE); - lua_getfield(L, 3, "watch_entry"); - if (lua_toboolean(L, -1)) flags |= UV_FS_EVENT_WATCH_ENTRY; - lua_pop(L, 1); - lua_getfield(L, 3, "stat"); - if (lua_toboolean(L, -1)) flags |= UV_FS_EVENT_STAT; - lua_pop(L, 1); - lua_getfield(L, 3, "recursive"); - if (lua_toboolean(L, -1)) flags |= UV_FS_EVENT_RECURSIVE; - lua_pop(L, 1); - luv_check_callback(L, handle->data, LUV_FS_EVENT, 4); - ret = uv_fs_event_start(handle, luv_fs_event_cb, path, flags); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_fs_event_stop(lua_State* L) { - uv_fs_event_t* handle = luv_check_fs_event(L, 1); - int ret = uv_fs_event_stop(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_fs_event_getpath(lua_State* L) { - uv_fs_event_t* handle = luv_check_fs_event(L, 1); - size_t len = 2*PATH_MAX; - char buf[2*PATH_MAX]; - int ret = uv_fs_event_getpath(handle, buf, &len); - if (ret < 0) return luv_error(L, ret); - lua_pushlstring(L, buf, len); - return 1; -} diff --git a/3rdparty/luv/src/fs_poll.c b/3rdparty/luv/src/fs_poll.c deleted file mode 100644 index 7ead32f322c..00000000000 --- a/3rdparty/luv/src/fs_poll.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "luv.h" - -static uv_fs_poll_t* luv_check_fs_poll(lua_State* L, int index) { - uv_fs_poll_t* handle = luv_checkudata(L, index, "uv_fs_poll"); - luaL_argcheck(L, handle->type == UV_FS_POLL && handle->data, index, "Expected uv_fs_poll_t"); - return handle; -} - -static int luv_new_fs_poll(lua_State* L) { - uv_fs_poll_t* handle = luv_newuserdata(L, sizeof(*handle)); - int ret = uv_fs_poll_init(luv_loop(L), handle); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -static void luv_fs_poll_cb(uv_fs_poll_t* handle, int status, const uv_stat_t* prev, const uv_stat_t* curr) { - lua_State* L = luv_state(handle->loop); - - // err - luv_status(L, status); - - // prev - if (prev) { - luv_push_stats_table(L, prev); - } - else { - lua_pushnil(L); - } - - // curr - if (curr) { - luv_push_stats_table(L, curr); - } - else { - lua_pushnil(L); - } - - luv_call_callback(L, handle->data, LUV_FS_POLL, 3); -} - -static int luv_fs_poll_start(lua_State* L) { - uv_fs_poll_t* handle = luv_check_fs_poll(L, 1); - const char* path = luaL_checkstring(L, 2); - unsigned int interval = luaL_checkinteger(L, 3); - int ret; - luv_check_callback(L, handle->data, LUV_FS_POLL, 4); - ret = uv_fs_poll_start(handle, luv_fs_poll_cb, path, interval); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_fs_poll_stop(lua_State* L) { - uv_fs_poll_t* handle = luv_check_fs_poll(L, 1); - int ret = uv_fs_poll_stop(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_fs_poll_getpath(lua_State* L) { - uv_fs_poll_t* handle = luv_check_fs_poll(L, 1); - size_t len = 2*PATH_MAX; - char buf[2*PATH_MAX]; - int ret = uv_fs_poll_getpath(handle, buf, &len); - if (ret < 0) return luv_error(L, ret); - lua_pushlstring(L, buf, len); - return 1; -} diff --git a/3rdparty/luv/src/handle.c b/3rdparty/luv/src/handle.c deleted file mode 100644 index 3efd2982641..00000000000 --- a/3rdparty/luv/src/handle.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static void* luv_newuserdata(lua_State* L, size_t sz) { - void* handle = malloc(sz); - if (handle) { - *(void**)lua_newuserdata(L, sizeof(void*)) = handle; - } - return handle; -} - -static void* luv_checkudata(lua_State* L, int ud, const char* tname) { - return *(void**) luaL_checkudata(L, ud, tname); -} - -static uv_handle_t* luv_check_handle(lua_State* L, int index) { - int isHandle; - uv_handle_t* handle; - if (!(handle = *(void**)lua_touserdata(L, index))) { goto fail; } - lua_getfield(L, LUA_REGISTRYINDEX, "uv_handle"); - lua_getmetatable(L, index < 0 ? index - 1 : index); - lua_rawget(L, -2); - isHandle = lua_toboolean(L, -1); - lua_pop(L, 2); - if (isHandle) { return handle; } - fail: luaL_argerror(L, index, "Expected uv_handle userdata"); - return NULL; -} - -// Show the libuv type instead of generic "userdata" -static int luv_handle_tostring(lua_State* L) { - uv_handle_t* handle = luv_check_handle(L, 1); - switch (handle->type) { -#define XX(uc, lc) case UV_##uc: lua_pushfstring(L, "uv_"#lc"_t: %p", handle); break; - UV_HANDLE_TYPE_MAP(XX) -#undef XX - default: lua_pushfstring(L, "uv_handle_t: %p", handle); break; - } - return 1; -} - -static int luv_is_active(lua_State* L) { - uv_handle_t* handle = luv_check_handle(L, 1); - int ret = uv_is_active(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushboolean(L, ret); - return 1; -} - -static int luv_is_closing(lua_State* L) { - uv_handle_t* handle = luv_check_handle(L, 1); - int ret = uv_is_closing(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushboolean(L, ret); - return 1; -} - -static void luv_close_cb(uv_handle_t* handle) { - lua_State* L = luv_state(handle->loop); - luv_handle_t* data = handle->data; - if (!data) return; - luv_call_callback(L, data, LUV_CLOSED, 0); - luv_cleanup_handle(L, data); - handle->data = NULL; -} - -static int luv_close(lua_State* L) { - uv_handle_t* handle = luv_check_handle(L, 1); - if (uv_is_closing(handle)) { - luaL_error(L, "handle %p is already closing", handle); - } - if (!lua_isnoneornil(L, 2)) { - luv_check_callback(L, handle->data, LUV_CLOSED, 2); - } - uv_close(handle, luv_close_cb); - return 0; -} - -static void luv_gc_cb(uv_handle_t* handle) { - luv_close_cb(handle); - free(handle); -} - -static int luv_handle_gc(lua_State* L) { - void** udata = lua_touserdata(L, 1); - uv_handle_t* handle = *udata; - if (handle != NULL) { - if (!uv_is_closing(handle)) - uv_close(handle, luv_gc_cb); - else - free(*udata); - - *udata = NULL; - } - - return 0; -} - -static int luv_ref(lua_State* L) { - uv_handle_t* handle = luv_check_handle(L, 1); - uv_ref(handle); - return 0; -} - -static int luv_unref(lua_State* L) { - uv_handle_t* handle = luv_check_handle(L, 1); - uv_unref(handle); - return 0; -} - -static int luv_has_ref(lua_State* L) { - uv_handle_t* handle = luv_check_handle(L, 1); - int ret = uv_has_ref(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushboolean(L, ret); - return 1; -} - -static int luv_send_buffer_size(lua_State* L) { - uv_handle_t* handle = luv_check_handle(L, 1); - int value; - int ret; - if (lua_isnoneornil(L, 2)) { - value = 0; - } - else { - value = luaL_checkinteger(L, 2); - } - ret = uv_send_buffer_size(handle, &value); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_recv_buffer_size(lua_State* L) { - uv_handle_t* handle = luv_check_handle(L, 1); - int value; - int ret; - if (lua_isnoneornil(L, 2)) { - value = 0; - } - else { - value = luaL_checkinteger(L, 2); - } - ret = uv_recv_buffer_size(handle, &value); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_fileno(lua_State* L) { - uv_handle_t* handle = luv_check_handle(L, 1); - uv_os_fd_t fd; - int ret = uv_fileno(handle, &fd); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, (LUA_INTEGER)(ptrdiff_t)fd); - return 1; -} diff --git a/3rdparty/luv/src/idle.c b/3rdparty/luv/src/idle.c deleted file mode 100644 index 132cbe43c33..00000000000 --- a/3rdparty/luv/src/idle.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static uv_idle_t* luv_check_idle(lua_State* L, int index) { - uv_idle_t* handle = luv_checkudata(L, index, "uv_idle"); - luaL_argcheck(L, handle->type == UV_IDLE && handle->data, index, "Expected uv_idle_t"); - return handle; -} - -static int luv_new_idle(lua_State* L) { - uv_idle_t* handle = luv_newuserdata(L, sizeof(*handle)); - int ret = uv_idle_init(luv_loop(L), handle); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -static void luv_idle_cb(uv_idle_t* handle) { - lua_State* L = luv_state(handle->loop); - luv_handle_t* data = handle->data; - luv_call_callback(L, data, LUV_IDLE, 0); -} - -static int luv_idle_start(lua_State* L) { - uv_idle_t* handle = luv_check_idle(L, 1); - int ret; - luv_check_callback(L, handle->data, LUV_IDLE, 2); - ret = uv_idle_start(handle, luv_idle_cb); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_idle_stop(lua_State* L) { - uv_idle_t* handle = luv_check_idle(L, 1); - int ret = uv_idle_stop(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - diff --git a/3rdparty/luv/src/lhandle.c b/3rdparty/luv/src/lhandle.c deleted file mode 100644 index c8cf294504e..00000000000 --- a/3rdparty/luv/src/lhandle.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "lhandle.h" - -static luv_handle_t* luv_setup_handle(lua_State* L) { - luv_handle_t* data; - const uv_handle_t* handle = *(void**)lua_touserdata(L, -1); - luaL_checktype(L, -1, LUA_TUSERDATA); - - data = malloc(sizeof(*data)); - if (!data) luaL_error(L, "Can't allocate luv handle"); - - #define XX(uc, lc) case UV_##uc: \ - luaL_getmetatable(L, "uv_"#lc); \ - break; - switch (handle->type) { - UV_HANDLE_TYPE_MAP(XX) - default: - luaL_error(L, "Unknown handle type"); - return NULL; - } - #undef XX - - lua_setmetatable(L, -2); - - lua_pushvalue(L, -1); - - data->ref = luaL_ref(L, LUA_REGISTRYINDEX); - data->callbacks[0] = LUA_NOREF; - data->callbacks[1] = LUA_NOREF; - data->extra = NULL; - return data; -} - -static void luv_check_callback(lua_State* L, luv_handle_t* data, luv_callback_id id, int index) { - luaL_checktype(L, index, LUA_TFUNCTION); - luaL_unref(L, LUA_REGISTRYINDEX, data->callbacks[id]); - lua_pushvalue(L, index); - data->callbacks[id] = luaL_ref(L, LUA_REGISTRYINDEX); -} - -static int traceback (lua_State *L) { - if (!lua_isstring(L, 1)) /* 'message' not a string? */ - return 1; /* keep it intact */ - lua_pushglobaltable(L); - lua_getfield(L, -1, "debug"); - lua_remove(L, -2); - if (!lua_istable(L, -1)) { - lua_pop(L, 1); - return 1; - } - lua_getfield(L, -1, "traceback"); - if (!lua_isfunction(L, -1)) { - lua_pop(L, 2); - return 1; - } - lua_pushvalue(L, 1); /* pass error message */ - lua_pushinteger(L, 2); /* skip this function and traceback */ - lua_call(L, 2, 1); /* call debug.traceback */ - return 1; -} - -static void luv_call_callback(lua_State* L, luv_handle_t* data, luv_callback_id id, int nargs) { - int ref = data->callbacks[id]; - if (ref == LUA_NOREF) { - lua_pop(L, nargs); - } - else { - // Get the traceback function in case of error - lua_pushcfunction(L, traceback); - // And insert it before the args if there are any. - if (nargs) { - lua_insert(L, -1 - nargs); - } - // Get the callback - lua_rawgeti(L, LUA_REGISTRYINDEX, ref); - // And insert it before the args if there are any. - if (nargs) { - lua_insert(L, -1 - nargs); - } - - if (lua_pcall(L, nargs, 0, -2 - nargs)) { - fprintf(stderr, "Uncaught Error: %s\n", lua_tostring(L, -1)); - exit(-1); - } - // Remove the traceback function - lua_pop(L, 1); - } -} - -static void luv_cleanup_handle(lua_State* L, luv_handle_t* data) { - luaL_unref(L, LUA_REGISTRYINDEX, data->ref); - luaL_unref(L, LUA_REGISTRYINDEX, data->callbacks[0]); - luaL_unref(L, LUA_REGISTRYINDEX, data->callbacks[1]); - if (data->extra) - free(data->extra); - free(data); -} - -static void luv_find_handle(lua_State* L, luv_handle_t* data) { - lua_rawgeti(L, LUA_REGISTRYINDEX, data->ref); -} diff --git a/3rdparty/luv/src/lhandle.h b/3rdparty/luv/src/lhandle.h deleted file mode 100644 index f6c0733719b..00000000000 --- a/3rdparty/luv/src/lhandle.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#ifndef LUV_LHANDLE_H -#define LUV_LHANDLE_H - -#include "luv.h" - -/* There are two slots for holding callbacks. One is for the CLOSED event. - The other slot is for all others since they never conflict in practice. -*/ -#define luv_callback_id int -#define LUV_CLOSED 0 -#define LUV_TIMEOUT 1 -#define LUV_PREPARE 1 -#define LUV_IDLE 1 -#define LUV_CHECK 1 -#define LUV_ASYNC 1 -#define LUV_POLL 1 -#define LUV_SIGNAL 1 -#define LUV_EXIT 1 -#define LUV_CONNECTION 1 -#define LUV_READ 1 -#define LUV_RECV 1 -#define LUV_FS_EVENT 1 -#define LUV_FS_POLL 1 - -/* Ref for userdata and event callbacks */ -typedef struct { - int ref; - int callbacks[2]; - void* extra; -} luv_handle_t; - -/* Setup the handle at the top of the stack */ -static luv_handle_t* luv_setup_handle(lua_State* L); - -/* Store a lua callback in a luv_handle for future callbacks. - Either replace an existing callback by id or append a new one at the end. -*/ -static void luv_check_callback(lua_State* L, luv_handle_t* data, luv_callback_id id, int index); - -/* Lookup a function and call it with nargs - If there is no such function, pop the args. -*/ -static void luv_call_callback(lua_State* L, luv_handle_t* data, luv_callback_id id, int nargs); - -/* Push a userdata on the stack from a handle */ -static void luv_find_handle(lua_State* L, luv_handle_t* data); - -/* Recursivly free the luv_handle and all event handlers */ -static void luv_cleanup_handle(lua_State* L, luv_handle_t* data); - -#endif diff --git a/3rdparty/luv/src/loop.c b/3rdparty/luv/src/loop.c deleted file mode 100644 index 33c49d3f64c..00000000000 --- a/3rdparty/luv/src/loop.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static int luv_loop_close(lua_State* L) { - int ret = uv_loop_close(luv_loop(L)); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -// These are the same order as uv_run_mode which also starts at 0 -static const char *const luv_runmodes[] = { - "default", "once", "nowait", NULL -}; - -static int luv_run(lua_State* L) { - int mode = luaL_checkoption(L, 1, "default", luv_runmodes); - int ret = uv_run(luv_loop(L), mode); - if (ret < 0) return luv_error(L, ret); - lua_pushboolean(L, ret); - return 1; -} - -static int luv_loop_alive(lua_State* L) { - int ret = uv_loop_alive(luv_loop(L)); - if (ret < 0) return luv_error(L, ret); - lua_pushboolean(L, ret); - return 1; -} - -static int luv_stop(lua_State* L) { - uv_stop(luv_loop(L)); - return 0; -} - -static int luv_backend_fd(lua_State* L) { - int ret = uv_backend_fd(luv_loop(L)); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_backend_timeout(lua_State* L) { - int ret = uv_backend_timeout(luv_loop(L)); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_now(lua_State* L) { - uint64_t now = uv_now(luv_loop(L)); - lua_pushinteger(L, now); - return 1; -} - -static int luv_update_time(lua_State* L) { - uv_update_time(luv_loop(L)); - return 0; -} - -static void luv_walk_cb(uv_handle_t* handle, void* arg) { - lua_State* L = arg; - luv_handle_t* data = handle->data; - - // Sanity check - // Most invalid values are large and refs are small, 0x1000000 is arbitrary. - assert(data && data->ref < 0x1000000); - - lua_pushvalue(L, 1); // Copy the function - luv_find_handle(L, data); // Get the userdata - lua_call(L, 1, 0); // Call the function -} - -static int luv_walk(lua_State* L) { - luaL_checktype(L, 1, LUA_TFUNCTION); - uv_walk(luv_loop(L), luv_walk_cb, L); - return 0; -} diff --git a/3rdparty/luv/src/lreq.c b/3rdparty/luv/src/lreq.c deleted file mode 100644 index 38ed6a77eb0..00000000000 --- a/3rdparty/luv/src/lreq.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "lreq.h" - - -static int luv_check_continuation(lua_State* L, int index) { - if (lua_isnoneornil(L, index)) return LUA_NOREF; - luaL_checktype(L, index, LUA_TFUNCTION); - lua_pushvalue(L, index); - return luaL_ref(L, LUA_REGISTRYINDEX); -} - -// Store a lua callback in a luv_req for the continuation. -// The uv_req_t is assumed to be at the top of the stack -static luv_req_t* luv_setup_req(lua_State* L, int callback_ref) { - luv_req_t* data; - - luaL_checktype(L, -1, LUA_TUSERDATA); - - data = malloc(sizeof(*data)); - if (!data) luaL_error(L, "Problem allocating luv request"); - - luaL_getmetatable(L, "uv_req"); - lua_setmetatable(L, -2); - - lua_pushvalue(L, -1); - data->req_ref = luaL_ref(L, LUA_REGISTRYINDEX); - data->callback_ref = callback_ref; - data->data_ref = LUA_NOREF; - data->data = NULL; - - return data; -} - - -static void luv_fulfill_req(lua_State* L, luv_req_t* data, int nargs) { - if (data->callback_ref == LUA_NOREF) { - lua_pop(L, nargs); - } - else { - // Get the callback - lua_rawgeti(L, LUA_REGISTRYINDEX, data->callback_ref); - // And insert it before the args if there are any. - if (nargs) { - lua_insert(L, -1 - nargs); - } - lua_call(L, nargs, 0); - } -} - -static void luv_cleanup_req(lua_State* L, luv_req_t* data) { - luaL_unref(L, LUA_REGISTRYINDEX, data->req_ref); - luaL_unref(L, LUA_REGISTRYINDEX, data->callback_ref); - luaL_unref(L, LUA_REGISTRYINDEX, data->data_ref); - free(data->data); - free(data); -} diff --git a/3rdparty/luv/src/lreq.h b/3rdparty/luv/src/lreq.h deleted file mode 100644 index a8b147e057b..00000000000 --- a/3rdparty/luv/src/lreq.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#ifndef LUV_LREQ_H -#define LUV_LREQ_H - -#include "luv.h" - -typedef struct { - int req_ref; /* ref for uv_req_t's userdata */ - int callback_ref; /* ref for callback */ - int data_ref; /* ref for write data */ - void* data; /* extra data */ -} luv_req_t; - -/* Used in the top of a setup function to check the arg - and ref the callback to an integer. -*/ -static int luv_check_continuation(lua_State* L, int index); - -/* setup a luv_req_t. The userdata is assumed to be at the - top of the stack. -*/ -static luv_req_t* luv_setup_req(lua_State* L, int ref); - -static void luv_fulfill_req(lua_State* L, luv_req_t* data, int nargs); - -static void luv_cleanup_req(lua_State* L, luv_req_t* data); - -#endif diff --git a/3rdparty/luv/src/lthreadpool.h b/3rdparty/luv/src/lthreadpool.h deleted file mode 100644 index 0994746bc52..00000000000 --- a/3rdparty/luv/src/lthreadpool.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -* Copyright 2014 The Luvit Authors. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ -#ifndef LUV_LTHREADPOOL_H -#define LUV_LTHREADPOOL_H - -#include "luv.h" - -#define LUV_THREAD_MAXNUM_ARG 9 - -typedef struct { - /* only support LUA_TNIL, LUA_TBOOLEAN, LUA_TLIGHTUSERDATA, LUA_TNUMBER, LUA_TSTRING*/ - int type; - union - { - lua_Number num; - int boolean; - void* userdata; - struct { - const char* base; - size_t len; - } str; - } val; -} luv_val_t; - -typedef struct { - int argc; - luv_val_t argv[LUV_THREAD_MAXNUM_ARG]; -} luv_thread_arg_t; - -static int luv_thread_arg_set(lua_State* L, luv_thread_arg_t* args, int idx, int top, int flag); -static int luv_thread_arg_push(lua_State* L, const luv_thread_arg_t* args); -static void luv_thread_arg_clear(luv_thread_arg_t* args); - -#endif //LUV_LTHREADPOOL_H diff --git a/3rdparty/luv/src/luv.c b/3rdparty/luv/src/luv.c deleted file mode 100644 index 7b552d68d53..00000000000 --- a/3rdparty/luv/src/luv.c +++ /dev/null @@ -1,519 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "luv.h" -#include "util.c" -#include "lhandle.c" -#include "lreq.c" -#include "loop.c" -#include "req.c" -#include "handle.c" -#include "timer.c" -#include "prepare.c" -#include "check.c" -#include "idle.c" -#include "async.c" -#include "poll.c" -#include "signal.c" -#include "process.c" -#include "stream.c" -#include "tcp.c" -#include "pipe.c" -#include "tty.c" -#include "udp.c" -#include "fs_event.c" -#include "fs_poll.c" -#include "fs.c" -#include "dns.c" -#include "thread.c" -#include "work.c" -#include "misc.c" -#include "constants.c" - -static const luaL_Reg luv_functions[] = { - // loop.c - {"loop_close", luv_loop_close}, - {"run", luv_run}, - {"loop_alive", luv_loop_alive}, - {"stop", luv_stop}, - {"backend_fd", luv_backend_fd}, - {"backend_timeout", luv_backend_timeout}, - {"now", luv_now}, - {"update_time", luv_update_time}, - {"walk", luv_walk}, - - // req.c - {"cancel", luv_cancel}, - - // handle.c - {"is_active", luv_is_active}, - {"is_closing", luv_is_closing}, - {"close", luv_close}, - {"ref", luv_ref}, - {"unref", luv_unref}, - {"has_ref", luv_has_ref}, - {"send_buffer_size", luv_send_buffer_size}, - {"recv_buffer_size", luv_recv_buffer_size}, - {"fileno", luv_fileno}, - - // timer.c - {"new_timer", luv_new_timer}, - {"timer_start", luv_timer_start}, - {"timer_stop", luv_timer_stop}, - {"timer_again", luv_timer_again}, - {"timer_set_repeat", luv_timer_set_repeat}, - {"timer_get_repeat", luv_timer_get_repeat}, - - // prepare.c - {"new_prepare", luv_new_prepare}, - {"prepare_start", luv_prepare_start}, - {"prepare_stop", luv_prepare_stop}, - - // check.c - {"new_check", luv_new_check}, - {"check_start", luv_check_start}, - {"check_stop", luv_check_stop}, - - // idle.c - {"new_idle", luv_new_idle}, - {"idle_start", luv_idle_start}, - {"idle_stop", luv_idle_stop}, - - // async.c - {"new_async", luv_new_async}, - {"async_send", luv_async_send}, - - // poll.c - {"new_poll", luv_new_poll}, - {"new_socket_poll", luv_new_socket_poll}, - {"poll_start", luv_poll_start}, - {"poll_stop", luv_poll_stop}, - - // signal.c - {"new_signal", luv_new_signal}, - {"signal_start", luv_signal_start}, - {"signal_stop", luv_signal_stop}, - - // process.c - {"disable_stdio_inheritance", luv_disable_stdio_inheritance}, - {"spawn", luv_spawn}, - {"process_kill", luv_process_kill}, - {"kill", luv_kill}, - - // stream.c - {"shutdown", luv_shutdown}, - {"listen", luv_listen}, - {"accept", luv_accept}, - {"read_start", luv_read_start}, - {"read_stop", luv_read_stop}, - {"write", luv_write}, - {"write2", luv_write2}, - {"try_write", luv_try_write}, - {"is_readable", luv_is_readable}, - {"is_writable", luv_is_writable}, - {"stream_set_blocking", luv_stream_set_blocking}, - - // tcp.c - {"new_tcp", luv_new_tcp}, - {"tcp_open", luv_tcp_open}, - {"tcp_nodelay", luv_tcp_nodelay}, - {"tcp_keepalive", luv_tcp_keepalive}, - {"tcp_simultaneous_accepts", luv_tcp_simultaneous_accepts}, - {"tcp_bind", luv_tcp_bind}, - {"tcp_getpeername", luv_tcp_getpeername}, - {"tcp_getsockname", luv_tcp_getsockname}, - {"tcp_connect", luv_tcp_connect}, - {"tcp_write_queue_size", luv_write_queue_size}, - - // pipe.c - {"new_pipe", luv_new_pipe}, - {"pipe_open", luv_pipe_open}, - {"pipe_bind", luv_pipe_bind}, - {"pipe_connect", luv_pipe_connect}, - {"pipe_getsockname", luv_pipe_getsockname}, - {"pipe_getpeername", luv_pipe_getpeername}, - {"pipe_pending_instances", luv_pipe_pending_instances}, - {"pipe_pending_count", luv_pipe_pending_count}, - {"pipe_pending_type", luv_pipe_pending_type}, - - // tty.c - {"new_tty", luv_new_tty}, - {"tty_set_mode", luv_tty_set_mode}, - {"tty_reset_mode", luv_tty_reset_mode}, - {"tty_get_winsize", luv_tty_get_winsize}, - - // udp.c - {"new_udp", luv_new_udp}, - {"udp_open", luv_udp_open}, - {"udp_bind", luv_udp_bind}, - {"udp_getsockname", luv_udp_getsockname}, - {"udp_set_membership", luv_udp_set_membership}, - {"udp_set_multicast_loop", luv_udp_set_multicast_loop}, - {"udp_set_multicast_ttl", luv_udp_set_multicast_ttl}, - {"udp_set_multicast_interface", luv_udp_set_multicast_interface}, - {"udp_set_broadcast", luv_udp_set_broadcast}, - {"udp_set_ttl", luv_udp_set_ttl}, - {"udp_send", luv_udp_send}, - {"udp_try_send", luv_udp_try_send}, - {"udp_recv_start", luv_udp_recv_start}, - {"udp_recv_stop", luv_udp_recv_stop}, - - // fs_event.c - {"new_fs_event", luv_new_fs_event}, - {"fs_event_start", luv_fs_event_start}, - {"fs_event_stop", luv_fs_event_stop}, - {"fs_event_getpath", luv_fs_event_getpath}, - - // fs_poll.c - {"new_fs_poll", luv_new_fs_poll}, - {"fs_poll_start", luv_fs_poll_start}, - {"fs_poll_stop", luv_fs_poll_stop}, - {"fs_poll_getpath", luv_fs_poll_getpath}, - - // fs.c - {"fs_close", luv_fs_close}, - {"fs_open", luv_fs_open}, - {"fs_read", luv_fs_read}, - {"fs_unlink", luv_fs_unlink}, - {"fs_write", luv_fs_write}, - {"fs_mkdir", luv_fs_mkdir}, - {"fs_mkdtemp", luv_fs_mkdtemp}, - {"fs_rmdir", luv_fs_rmdir}, - {"fs_scandir", luv_fs_scandir}, - {"fs_scandir_next", luv_fs_scandir_next}, - {"fs_stat", luv_fs_stat}, - {"fs_fstat", luv_fs_fstat}, - {"fs_lstat", luv_fs_lstat}, - {"fs_rename", luv_fs_rename}, - {"fs_fsync", luv_fs_fsync}, - {"fs_fdatasync", luv_fs_fdatasync}, - {"fs_ftruncate", luv_fs_ftruncate}, - {"fs_sendfile", luv_fs_sendfile}, - {"fs_access", luv_fs_access}, - {"fs_chmod", luv_fs_chmod}, - {"fs_fchmod", luv_fs_fchmod}, - {"fs_utime", luv_fs_utime}, - {"fs_futime", luv_fs_futime}, - {"fs_link", luv_fs_link}, - {"fs_symlink", luv_fs_symlink}, - {"fs_readlink", luv_fs_readlink}, - {"fs_realpath", luv_fs_realpath}, - {"fs_chown", luv_fs_chown}, - {"fs_fchown", luv_fs_fchown}, - - // dns.c - {"getaddrinfo", luv_getaddrinfo}, - {"getnameinfo", luv_getnameinfo}, - - // misc.c - {"chdir", luv_chdir}, - {"os_homedir", luv_os_homedir}, - {"cpu_info", luv_cpu_info}, - {"cwd", luv_cwd}, - {"exepath", luv_exepath}, - {"get_process_title", luv_get_process_title}, - {"get_total_memory", luv_get_total_memory}, - {"get_free_memory", luv_get_free_memory}, - {"getpid", luv_getpid}, -#ifndef _WIN32 - {"getuid", luv_getuid}, - {"setuid", luv_setuid}, - {"getgid", luv_getgid}, - {"setgid", luv_setgid}, -#endif - {"getrusage", luv_getrusage}, - {"guess_handle", luv_guess_handle}, - {"hrtime", luv_hrtime}, - {"interface_addresses", luv_interface_addresses}, - {"loadavg", luv_loadavg}, - {"resident_set_memory", luv_resident_set_memory}, - {"set_process_title", luv_set_process_title}, - {"uptime", luv_uptime}, - {"version", luv_version}, - {"version_string", luv_version_string}, - - // thread.c - {"new_thread", luv_new_thread}, - {"thread_equal", luv_thread_equal}, - {"thread_self", luv_thread_self}, - {"thread_join", luv_thread_join}, - {"sleep", luv_thread_sleep}, - - // work.c - {"new_work", luv_new_work}, - {"queue_work", luv_queue_work}, - - {NULL, NULL} -}; - -static const luaL_Reg luv_handle_methods[] = { - // handle.c - {"is_active", luv_is_active}, - {"is_closing", luv_is_closing}, - {"close", luv_close}, - {"ref", luv_ref}, - {"unref", luv_unref}, - {"has_ref", luv_has_ref}, - {"send_buffer_size", luv_send_buffer_size}, - {"recv_buffer_size", luv_recv_buffer_size}, - {"fileno", luv_fileno}, - {NULL, NULL} -}; - -static const luaL_Reg luv_async_methods[] = { - {"send", luv_async_send}, - {NULL, NULL} -}; - -static const luaL_Reg luv_check_methods[] = { - {"start", luv_check_start}, - {"stop", luv_check_stop}, - {NULL, NULL} -}; - -static const luaL_Reg luv_fs_event_methods[] = { - {"start", luv_fs_event_start}, - {"stop", luv_fs_event_stop}, - {"getpath", luv_fs_event_getpath}, - {NULL, NULL} -}; - -static const luaL_Reg luv_fs_poll_methods[] = { - {"start", luv_fs_poll_start}, - {"stop", luv_fs_poll_stop}, - {"getpath", luv_fs_poll_getpath}, - {NULL, NULL} -}; - -static const luaL_Reg luv_idle_methods[] = { - {"start", luv_idle_start}, - {"stop", luv_idle_stop}, - {NULL, NULL} -}; - -static const luaL_Reg luv_stream_methods[] = { - {"shutdown", luv_shutdown}, - {"listen", luv_listen}, - {"accept", luv_accept}, - {"read_start", luv_read_start}, - {"read_stop", luv_read_stop}, - {"write", luv_write}, - {"write2", luv_write2}, - {"try_write", luv_try_write}, - {"is_readable", luv_is_readable}, - {"is_writable", luv_is_writable}, - {"set_blocking", luv_stream_set_blocking}, - {NULL, NULL} -}; - -static const luaL_Reg luv_pipe_methods[] = { - {"open", luv_pipe_open}, - {"bind", luv_pipe_bind}, - {"connect", luv_pipe_connect}, - {"getsockname", luv_pipe_getsockname}, - {"getpeername", luv_pipe_getpeername}, - {"pending_instances", luv_pipe_pending_instances}, - {"pending_count", luv_pipe_pending_count}, - {"pending_type", luv_pipe_pending_type}, - {NULL, NULL} -}; - -static const luaL_Reg luv_poll_methods[] = { - {"start", luv_poll_start}, - {"stop", luv_poll_stop}, - {NULL, NULL} -}; - -static const luaL_Reg luv_prepare_methods[] = { - {"start", luv_prepare_start}, - {"stop", luv_prepare_stop}, - {NULL, NULL} -}; - -static const luaL_Reg luv_process_methods[] = { - {"kill", luv_process_kill}, - {NULL, NULL} -}; - -static const luaL_Reg luv_tcp_methods[] = { - {"open", luv_tcp_open}, - {"nodelay", luv_tcp_nodelay}, - {"keepalive", luv_tcp_keepalive}, - {"simultaneous_accepts", luv_tcp_simultaneous_accepts}, - {"bind", luv_tcp_bind}, - {"getpeername", luv_tcp_getpeername}, - {"getsockname", luv_tcp_getsockname}, - {"connect", luv_tcp_connect}, - {"write_queue_size", luv_write_queue_size}, - {NULL, NULL} -}; - -static const luaL_Reg luv_timer_methods[] = { - {"start", luv_timer_start}, - {"stop", luv_timer_stop}, - {"again", luv_timer_again}, - {"set_repeat", luv_timer_set_repeat}, - {"get_repeat", luv_timer_get_repeat}, - {NULL, NULL} -}; - -static const luaL_Reg luv_tty_methods[] = { - {"set_mode", luv_tty_set_mode}, - {"get_winsize", luv_tty_get_winsize}, - {NULL, NULL} -}; - -static const luaL_Reg luv_udp_methods[] = { - {"open", luv_udp_open}, - {"bind", luv_udp_bind}, - {"bindgetsockname", luv_udp_getsockname}, - {"set_membership", luv_udp_set_membership}, - {"set_multicast_loop", luv_udp_set_multicast_loop}, - {"set_multicast_ttl", luv_udp_set_multicast_ttl}, - {"set_multicast_interface", luv_udp_set_multicast_interface}, - {"set_broadcast", luv_udp_set_broadcast}, - {"set_ttl", luv_udp_set_ttl}, - {"send", luv_udp_send}, - {"try_send", luv_udp_try_send}, - {"recv_start", luv_udp_recv_start}, - {"recv_stop", luv_udp_recv_stop}, - {NULL, NULL} -}; - -static const luaL_Reg luv_signal_methods[] = { - {"start", luv_signal_start}, - {"stop", luv_signal_stop}, - {NULL, NULL} -}; - -static void luv_handle_init(lua_State* L) { - - lua_newtable(L); -#define XX(uc, lc) \ - luaL_newmetatable (L, "uv_"#lc); \ - lua_pushcfunction(L, luv_handle_tostring); \ - lua_setfield(L, -2, "__tostring"); \ - lua_pushcfunction(L, luv_handle_gc); \ - lua_setfield(L, -2, "__gc"); \ - luaL_newlib(L, luv_##lc##_methods); \ - luaL_setfuncs(L, luv_handle_methods, 0); \ - lua_setfield(L, -2, "__index"); \ - lua_pushboolean(L, 1); \ - lua_rawset(L, -3); - - UV_HANDLE_TYPE_MAP(XX) -#undef XX - lua_setfield(L, LUA_REGISTRYINDEX, "uv_handle"); - - lua_newtable(L); - - luaL_getmetatable(L, "uv_pipe"); - lua_getfield(L, -1, "__index"); - luaL_setfuncs(L, luv_stream_methods, 0); - lua_pop(L, 1); - lua_pushboolean(L, 1); - lua_rawset(L, -3); - - luaL_getmetatable(L, "uv_tcp"); - lua_getfield(L, -1, "__index"); - luaL_setfuncs(L, luv_stream_methods, 0); - lua_pop(L, 1); - lua_pushboolean(L, 1); - lua_rawset(L, -3); - - luaL_getmetatable(L, "uv_tty"); - lua_getfield(L, -1, "__index"); - luaL_setfuncs(L, luv_stream_methods, 0); - lua_pop(L, 1); - lua_pushboolean(L, 1); - lua_rawset(L, -3); - - lua_setfield(L, LUA_REGISTRYINDEX, "uv_stream"); -} - -LUALIB_API lua_State* luv_state(uv_loop_t* loop) { - return loop->data; -} - -// TODO: find out if storing this somehow in an upvalue is faster -LUALIB_API uv_loop_t* luv_loop(lua_State* L) { - uv_loop_t* loop; - lua_pushstring(L, "uv_loop"); - lua_rawget(L, LUA_REGISTRYINDEX); - loop = lua_touserdata(L, -1); - lua_pop(L, 1); - return loop; -} - -static void walk_cb(uv_handle_t *handle, void *arg) -{ - (void)arg; - if (!uv_is_closing(handle)) { - uv_close(handle, luv_close_cb); - } -} - -static int loop_gc(lua_State *L) { - uv_loop_t* loop = luv_loop(L); - // Call uv_close on every active handle - uv_walk(loop, walk_cb, NULL); - // Run the event loop until all handles are successfully closed - while (uv_loop_close(loop)) { - uv_run(loop, UV_RUN_DEFAULT); - } - return 0; -} - -LUALIB_API int luaopen_luv (lua_State *L) { - - uv_loop_t* loop; - int ret; - - // Setup the uv_loop meta table for a proper __gc - luaL_newmetatable(L, "uv_loop.meta"); - lua_pushstring(L, "__gc"); - lua_pushcfunction(L, loop_gc); - lua_settable(L, -3); - - loop = lua_newuserdata(L, sizeof(*loop)); - ret = uv_loop_init(loop); - if (ret < 0) { - return luaL_error(L, "%s: %s\n", uv_err_name(ret), uv_strerror(ret)); - } - // setup the metatable for __gc - luaL_getmetatable(L, "uv_loop.meta"); - lua_setmetatable(L, -2); - // Tell the state how to find the loop. - lua_pushstring(L, "uv_loop"); - lua_insert(L, -2); - lua_rawset(L, LUA_REGISTRYINDEX); - lua_pop(L, 1); - - // Tell the loop how to find the state. - loop->data = L; - - luv_req_init(L); - luv_handle_init(L); - luv_thread_init(L); - luv_work_init(L); - - luaL_newlib(L, luv_functions); - luv_constants(L); - lua_setfield(L, -2, "constants"); - - return 1; -} diff --git a/3rdparty/luv/src/luv.h b/3rdparty/luv/src/luv.h deleted file mode 100644 index 681384da363..00000000000 --- a/3rdparty/luv/src/luv.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#ifndef LUV_H -#define LUV_H -#include -#include -#include -#include "uv.h" - -#include -#include -#include - -#if defined(_WIN32) -# include -# include -# include -# ifndef __MINGW32__ -# define S_ISREG(x) (((x) & _S_IFMT) == _S_IFREG) -# define S_ISDIR(x) (((x) & _S_IFMT) == _S_IFDIR) -# define S_ISFIFO(x) (((x) & _S_IFMT) == _S_IFIFO) -# define S_ISCHR(x) (((x) & _S_IFMT) == _S_IFCHR) -# define S_ISBLK(x) 0 -# endif -# define S_ISLNK(x) (((x) & S_IFLNK) == S_IFLNK) -# define S_ISSOCK(x) 0 -#else -# include -#endif - -#ifndef PATH_MAX -#define PATH_MAX (8096) -#endif - -#ifndef MAX_TITLE_LENGTH -#define MAX_TITLE_LENGTH (8192) -#endif - -#if LUA_VERSION_NUM < 502 -# define lua_rawlen lua_objlen -/* lua_...uservalue: Something very different, but it should get the job done */ -# define lua_getuservalue lua_getfenv -# define lua_setuservalue lua_setfenv -# define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l)) -# define luaL_setfuncs(L,l,n) (assert(n==0), luaL_register(L,NULL,l)) -# define lua_resume(L,F,n) lua_resume(L,n) -# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX) -#endif - -/* There is a 1-1 relation between a lua_State and a uv_loop_t - These helpers will give you one if you have the other - These are exposed for extensions built with luv - This allows luv to be used in multithreaded applications. -*/ -LUALIB_API lua_State* luv_state(uv_loop_t* loop); -/* All libuv callbacks will lua_call directly from this root-per-thread state -*/ -LUALIB_API uv_loop_t* luv_loop(lua_State* L); - -/* This is the main hook to load the library. - This can be called multiple times in a process as long - as you use a different lua_State and thread for each. -*/ -LUALIB_API int luaopen_luv (lua_State *L); - -#include "util.h" -#include "lhandle.h" -#include "lreq.h" - -/* From stream.c */ -static uv_stream_t* luv_check_stream(lua_State* L, int index); -static void luv_alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf); -static void luv_check_buf(lua_State *L, int idx, uv_buf_t *pbuf); -static uv_buf_t* luv_prep_bufs(lua_State* L, int index, size_t *count); - -/* from tcp.c */ -static void parse_sockaddr(lua_State* L, struct sockaddr_storage* address, int addrlen); -static void luv_connect_cb(uv_connect_t* req, int status); - -/* From fs.c */ -static void luv_push_stats_table(lua_State* L, const uv_stat_t* s); - -/* from constants.c */ -static int luv_af_string_to_num(const char* string); -static const char* luv_af_num_to_string(const int num); -static int luv_sock_string_to_num(const char* string); -static const char* luv_sock_num_to_string(const int num); -static int luv_sig_string_to_num(const char* string); -static const char* luv_sig_num_to_string(const int num); - -typedef lua_State* (*luv_acquire_vm)(); -typedef void (*luv_release_vm)(lua_State* L); -LUALIB_API void luv_set_thread_cb(luv_acquire_vm acquire, luv_release_vm release); - -#endif diff --git a/3rdparty/luv/src/misc.c b/3rdparty/luv/src/misc.c deleted file mode 100644 index 64c9e3d5822..00000000000 --- a/3rdparty/luv/src/misc.c +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "luv.h" -#ifdef _WIN32 -#include -#endif - -static int luv_guess_handle(lua_State* L) { - uv_file file = luaL_checkinteger(L, 1); - switch (uv_guess_handle(file)) { -#define XX(uc, lc) case UV_##uc: lua_pushstring(L, #lc); break; - UV_HANDLE_TYPE_MAP(XX) -#undef XX - case UV_FILE: lua_pushstring(L, "file"); break; - default: return 0; - } - return 1; -} - -static int luv_version(lua_State* L) { - lua_pushinteger(L, uv_version()); - return 1; -} - -static int luv_version_string(lua_State* L) { - lua_pushstring(L, uv_version_string()); - return 1; -} - -static int luv_get_process_title(lua_State* L) { - char title[MAX_TITLE_LENGTH]; - int ret = uv_get_process_title(title, MAX_TITLE_LENGTH); - if (ret < 0) return luv_error(L, ret); - lua_pushstring(L, title); - return 1; -} - -static int luv_set_process_title(lua_State* L) { - const char* title = luaL_checkstring(L, 1); - int ret = uv_set_process_title(title); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_resident_set_memory(lua_State* L) { - size_t rss; - int ret = uv_resident_set_memory(&rss); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, rss); - return 1; -} - -static int luv_uptime(lua_State* L) { - double uptime; - int ret = uv_uptime(&uptime); - if (ret < 0) return luv_error(L, ret); - lua_pushnumber(L, uptime); - return 1; -} - -static void luv_push_timeval_table(lua_State* L, const uv_timeval_t* t) { - lua_createtable(L, 0, 2); - lua_pushinteger(L, t->tv_sec); - lua_setfield(L, -2, "sec"); - lua_pushinteger(L, t->tv_usec); - lua_setfield(L, -2, "usec"); -} - -static int luv_getrusage(lua_State* L) { - uv_rusage_t rusage; - int ret = uv_getrusage(&rusage); - if (ret < 0) return luv_error(L, ret); - lua_createtable(L, 0, 16); - // user CPU time used - luv_push_timeval_table(L, &rusage.ru_utime); - lua_setfield(L, -2, "utime"); - // system CPU time used - luv_push_timeval_table(L, &rusage.ru_stime); - lua_setfield(L, -2, "stime"); - // maximum resident set size - lua_pushinteger(L, rusage.ru_maxrss); - lua_setfield(L, -2, "maxrss"); - // integral shared memory size - lua_pushinteger(L, rusage.ru_ixrss); - lua_setfield(L, -2, "ixrss"); - // integral unshared data size - lua_pushinteger(L, rusage.ru_idrss); - lua_setfield(L, -2, "idrss"); - // integral unshared stack size - lua_pushinteger(L, rusage.ru_isrss); - lua_setfield(L, -2, "isrss"); - // page reclaims (soft page faults) - lua_pushinteger(L, rusage.ru_minflt); - lua_setfield(L, -2, "minflt"); - // page faults (hard page faults) - lua_pushinteger(L, rusage.ru_majflt); - lua_setfield(L, -2, "majflt"); - // swaps - lua_pushinteger(L, rusage.ru_nswap); - lua_setfield(L, -2, "nswap"); - // block input operations - lua_pushinteger(L, rusage.ru_inblock); - lua_setfield(L, -2, "inblock"); - // block output operations - lua_pushinteger(L, rusage.ru_oublock); - lua_setfield(L, -2, "oublock"); - // IPC messages sent - lua_pushinteger(L, rusage.ru_msgsnd); - lua_setfield(L, -2, "msgsnd"); - // IPC messages received - lua_pushinteger(L, rusage.ru_msgrcv); - lua_setfield(L, -2, "msgrcv"); - // signals received - lua_pushinteger(L, rusage.ru_nsignals); - lua_setfield(L, -2, "nsignals"); - // voluntary context switches - lua_pushinteger(L, rusage.ru_nvcsw); - lua_setfield(L, -2, "nvcsw"); - // involuntary context switches - lua_pushinteger(L, rusage.ru_nivcsw); - lua_setfield(L, -2, "nivcsw"); - return 1; -} - -static int luv_cpu_info(lua_State* L) { - uv_cpu_info_t* cpu_infos; - int count, i; - int ret = uv_cpu_info(&cpu_infos, &count); - if (ret < 0) return luv_error(L, ret); - lua_newtable(L); - - for (i = 0; i < count; i++) { - lua_newtable(L); - lua_pushstring(L, cpu_infos[i].model); - lua_setfield(L, -2, "model"); - lua_pushnumber(L, cpu_infos[i].speed); - lua_setfield(L, -2, "speed"); - lua_newtable(L); - lua_pushnumber(L, cpu_infos[i].cpu_times.user); - lua_setfield(L, -2, "user"); - lua_pushnumber(L, cpu_infos[i].cpu_times.nice); - lua_setfield(L, -2, "nice"); - lua_pushnumber(L, cpu_infos[i].cpu_times.sys); - lua_setfield(L, -2, "sys"); - lua_pushnumber(L, cpu_infos[i].cpu_times.idle); - lua_setfield(L, -2, "idle"); - lua_pushnumber(L, cpu_infos[i].cpu_times.irq); - lua_setfield(L, -2, "irq"); - lua_setfield(L, -2, "times"); - lua_rawseti(L, -2, i + 1); - } - - uv_free_cpu_info(cpu_infos, count); - return 1; -} - -static int luv_interface_addresses(lua_State* L) { - uv_interface_address_t* interfaces; - int count, i; - char ip[INET6_ADDRSTRLEN]; - char netmask[INET6_ADDRSTRLEN]; - - uv_interface_addresses(&interfaces, &count); - - lua_newtable(L); - - for (i = 0; i < count; i++) { - lua_getfield(L, -1, interfaces[i].name); - if (!lua_istable(L, -1)) { - lua_pop(L, 1); - lua_newtable(L); - lua_pushvalue(L, -1); - lua_setfield(L, -3, interfaces[i].name); - } - lua_newtable(L); - lua_pushboolean(L, interfaces[i].is_internal); - lua_setfield(L, -2, "internal"); - - lua_pushlstring(L, interfaces[i].phys_addr, sizeof(interfaces[i].phys_addr)); - lua_setfield(L, -2, "mac"); - - if (interfaces[i].address.address4.sin_family == AF_INET) { - uv_ip4_name(&interfaces[i].address.address4, ip, sizeof(ip)); - uv_ip4_name(&interfaces[i].netmask.netmask4, netmask, sizeof(netmask)); - } else if (interfaces[i].address.address4.sin_family == AF_INET6) { - uv_ip6_name(&interfaces[i].address.address6, ip, sizeof(ip)); - uv_ip6_name(&interfaces[i].netmask.netmask6, netmask, sizeof(netmask)); - } else { - strncpy(ip, "", INET6_ADDRSTRLEN); - strncpy(netmask, "", INET6_ADDRSTRLEN); - } - lua_pushstring(L, ip); - lua_setfield(L, -2, "ip"); - lua_pushstring(L, netmask); - lua_setfield(L, -2, "netmask"); - - lua_pushstring(L, luv_af_num_to_string(interfaces[i].address.address4.sin_family)); - lua_setfield(L, -2, "family"); - lua_rawseti(L, -2, lua_rawlen (L, -2) + 1); - lua_pop(L, 1); - } - uv_free_interface_addresses(interfaces, count); - return 1; -} - -static int luv_loadavg(lua_State* L) { - double avg[3]; - uv_loadavg(avg); - lua_pushnumber(L, avg[0]); - lua_pushnumber(L, avg[1]); - lua_pushnumber(L, avg[2]); - return 3; -} - -static int luv_exepath(lua_State* L) { - size_t size = 2*PATH_MAX; - char exe_path[2*PATH_MAX]; - int ret = uv_exepath(exe_path, &size); - if (ret < 0) return luv_error(L, ret); - lua_pushlstring(L, exe_path, size); - return 1; -} - -static int luv_cwd(lua_State* L) { - size_t size = 2*PATH_MAX; - char path[2*PATH_MAX]; - int ret = uv_cwd(path, &size); - if (ret < 0) return luv_error(L, ret); - lua_pushlstring(L, path, size); - return 1; -} - -static int luv_chdir(lua_State* L) { - int ret = uv_chdir(luaL_checkstring(L, 1)); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_os_homedir(lua_State* L) { - size_t size = 2*PATH_MAX; - char homedir[2*PATH_MAX]; - int ret = uv_os_homedir(homedir, &size); - if (ret < 0) return luv_error(L, ret); - lua_pushlstring(L, homedir, size); - return 1; -} - -static int luv_get_total_memory(lua_State* L) { - lua_pushnumber(L, uv_get_total_memory()); - return 1; -} - -static int luv_get_free_memory(lua_State* L) { - lua_pushnumber(L, uv_get_free_memory()); - return 1; -} - -static int luv_hrtime(lua_State* L) { - lua_pushnumber(L, uv_hrtime()); - return 1; -} - -static int luv_getpid(lua_State* L){ - int pid = getpid(); - lua_pushinteger(L, pid); - return 1; -} - -#ifndef _WIN32 -static int luv_getuid(lua_State* L){ - int uid = getuid(); - lua_pushinteger(L, uid); - return 1; -} - -static int luv_getgid(lua_State* L){ - int gid = getgid(); - lua_pushinteger(L, gid); - return 1; -} - -static int luv_setuid(lua_State* L){ - int uid = luaL_checkinteger(L, 1); - int r = setuid(uid); - if (-1 == r) { - luaL_error(L, "Error setting UID"); - } - return 0; -} - -static int luv_setgid(lua_State* L){ - int gid = luaL_checkinteger(L, 1); - int r = setgid(gid); - if (-1 == r) { - luaL_error(L, "Error setting GID"); - } - return 0; -} -#endif diff --git a/3rdparty/luv/src/pipe.c b/3rdparty/luv/src/pipe.c deleted file mode 100644 index b490c1597b3..00000000000 --- a/3rdparty/luv/src/pipe.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static uv_pipe_t* luv_check_pipe(lua_State* L, int index) { - uv_pipe_t* handle = luv_checkudata(L, index, "uv_pipe"); - luaL_argcheck(L, handle->type == UV_NAMED_PIPE && handle->data, index, "Expected uv_pipe_t"); - return handle; -} - -static int luv_new_pipe(lua_State* L) { - uv_pipe_t* handle; - int ipc, ret; - luaL_checktype(L, 1, LUA_TBOOLEAN); - ipc = lua_toboolean(L, 1); - handle = luv_newuserdata(L, sizeof(*handle)); - ret = uv_pipe_init(luv_loop(L), handle, ipc); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -static int luv_pipe_open(lua_State* L) { - uv_pipe_t* handle = luv_check_pipe(L, 1); - uv_file file = luaL_checkinteger(L, 2); - int ret = uv_pipe_open(handle, file); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_pipe_bind(lua_State* L) { - uv_pipe_t* handle = luv_check_pipe(L, 1); - const char* name = luaL_checkstring(L, 2); - int ret = uv_pipe_bind(handle, name); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_pipe_connect(lua_State* L) { - uv_pipe_t* handle = luv_check_pipe(L, 1); - const char* name = luaL_checkstring(L, 2); - int ref = luv_check_continuation(L, 3); - uv_connect_t* req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - uv_pipe_connect(req, handle, name, luv_connect_cb); - return 1; -} - -static int luv_pipe_getsockname(lua_State* L) { - uv_pipe_t* handle = luv_check_pipe(L, 1); - size_t len = 2*PATH_MAX; - char buf[2*PATH_MAX]; - int ret = uv_pipe_getsockname(handle, buf, &len); - if (ret < 0) return luv_error(L, ret); - lua_pushlstring(L, buf, len); - return 1; -} - -static int luv_pipe_getpeername(lua_State* L) { - uv_pipe_t* handle = luv_check_pipe(L, 1); - size_t len = 2*PATH_MAX; - char buf[2*PATH_MAX]; - int ret = uv_pipe_getpeername(handle, buf, &len); - if (ret < 0) return luv_error(L, ret); - lua_pushlstring(L, buf, len); - return 1; -} - -static int luv_pipe_pending_instances(lua_State* L) { - uv_pipe_t* handle = luv_check_pipe(L, 1); - int count = luaL_checkinteger(L, 2); - uv_pipe_pending_instances(handle, count); - return 0; -} - -static int luv_pipe_pending_count(lua_State* L) { - uv_pipe_t* handle = luv_check_pipe(L, 1); - lua_pushinteger(L, uv_pipe_pending_count(handle)); - return 1; -} - -static int luv_pipe_pending_type(lua_State* L) { - uv_pipe_t* handle = luv_check_pipe(L, 1); - uv_handle_type type = uv_pipe_pending_type(handle); - const char* type_name; - switch (type) { -#define XX(uc, lc) \ - case UV_##uc: type_name = #lc; break; - UV_HANDLE_TYPE_MAP(XX) -#undef XX - default: return 0; - } - lua_pushstring(L, type_name); - return 1; -} diff --git a/3rdparty/luv/src/poll.c b/3rdparty/luv/src/poll.c deleted file mode 100644 index e007c9f9634..00000000000 --- a/3rdparty/luv/src/poll.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static uv_poll_t* luv_check_poll(lua_State* L, int index) { - uv_poll_t* handle = luv_checkudata(L, index, "uv_poll"); - luaL_argcheck(L, handle->type == UV_POLL && handle->data, index, "Expected uv_poll_t"); - return handle; -} - -static int luv_new_poll(lua_State* L) { - int fd = luaL_checkinteger(L, 1); - uv_poll_t* handle = luv_newuserdata(L, sizeof(*handle)); - int ret = uv_poll_init(luv_loop(L), handle, fd); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -static int luv_new_socket_poll(lua_State* L) { - int fd = luaL_checkinteger(L, 1); - uv_poll_t* handle = luv_newuserdata(L, sizeof(*handle)); - int ret = uv_poll_init_socket(luv_loop(L), handle, fd); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -// These are the same order as uv_run_mode which also starts at 0 -static const char *const luv_pollevents[] = { - "r", "w", "rw", NULL -}; - -static void luv_poll_cb(uv_poll_t* handle, int status, int events) { - lua_State* L = luv_state(handle->loop); - luv_handle_t* data = handle->data; - const char* evtstr; - - if (status < 0) { - fprintf(stderr, "%s: %s\n", uv_err_name(status), uv_strerror(status)); - lua_pushstring(L, uv_err_name(status)); - } - else { - lua_pushnil(L); - } - - switch (events) { - case UV_READABLE: evtstr = "r"; break; - case UV_WRITABLE: evtstr = "w"; break; - case UV_READABLE|UV_WRITABLE: evtstr = "rw"; break; - default: evtstr = ""; break; - } - lua_pushstring(L, evtstr); - - luv_call_callback(L, data, LUV_POLL, 2); -} - -static int luv_poll_start(lua_State* L) { - uv_poll_t* handle = luv_check_poll(L, 1); - int events, ret; - switch (luaL_checkoption(L, 2, "rw", luv_pollevents)) { - case 0: events = UV_READABLE; break; - case 1: events = UV_WRITABLE; break; - case 2: events = UV_READABLE | UV_WRITABLE; break; - default: events = 0; /* unreachable */ - } - luv_check_callback(L, handle->data, LUV_POLL, 3); - ret = uv_poll_start(handle, events, luv_poll_cb); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_poll_stop(lua_State* L) { - uv_poll_t* handle = luv_check_poll(L, 1); - int ret = uv_poll_stop(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} diff --git a/3rdparty/luv/src/prepare.c b/3rdparty/luv/src/prepare.c deleted file mode 100644 index 6577439a466..00000000000 --- a/3rdparty/luv/src/prepare.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static uv_prepare_t* luv_check_prepare(lua_State* L, int index) { - uv_prepare_t* handle = luv_checkudata(L, index, "uv_prepare"); - luaL_argcheck(L, handle->type == UV_PREPARE && handle->data, index, "Expected uv_prepare_t"); - return handle; -} - -static int luv_new_prepare(lua_State* L) { - uv_prepare_t* handle = luv_newuserdata(L, sizeof(*handle)); - int ret = uv_prepare_init(luv_loop(L), handle); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -static void luv_prepare_cb(uv_prepare_t* handle) { - lua_State* L = luv_state(handle->loop); - luv_handle_t* data = handle->data; - luv_call_callback(L, data, LUV_PREPARE, 0); -} - -static int luv_prepare_start(lua_State* L) { - uv_prepare_t* handle = luv_check_prepare(L, 1); - int ret; - luv_check_callback(L, handle->data, LUV_PREPARE, 2); - ret = uv_prepare_start(handle, luv_prepare_cb); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_prepare_stop(lua_State* L) { - uv_prepare_t* handle = luv_check_prepare(L, 1); - int ret = uv_prepare_stop(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - diff --git a/3rdparty/luv/src/process.c b/3rdparty/luv/src/process.c deleted file mode 100644 index d939503868b..00000000000 --- a/3rdparty/luv/src/process.c +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static int luv_disable_stdio_inheritance(lua_State* L) { - (void)L; - uv_disable_stdio_inheritance(); - return 0; -} - -static uv_process_t* luv_check_process(lua_State* L, int index) { - uv_process_t* handle = luv_checkudata(L, index, "uv_process"); - luaL_argcheck(L, handle->type == UV_PROCESS && handle->data, index, "Expected uv_process_t"); - return handle; -} - -static void exit_cb(uv_process_t* handle, int64_t exit_status, int term_signal) { - lua_State* L = luv_state(handle->loop); - luv_handle_t* data = handle->data; - lua_pushinteger(L, exit_status); - lua_pushinteger(L, term_signal); - luv_call_callback(L, data, LUV_EXIT, 2); -} - -static void luv_spawn_close_cb(uv_handle_t* handle) { - lua_State *L = luv_state(handle->loop); - luv_cleanup_handle(L, handle->data); -} - -static void luv_clean_options(uv_process_options_t* options) { - free(options->args); - free(options->stdio); - free(options->env); -} - -static int luv_spawn(lua_State* L) { - uv_process_t* handle; - uv_process_options_t options; - size_t i, len = 0; - int ret; - - memset(&options, 0, sizeof(options)); - options.exit_cb = exit_cb; - options.file = luaL_checkstring(L, 1); - options.flags = 0; - - // Make sure the 2nd argument is a table - luaL_checktype(L, 2, LUA_TTABLE); - - // get the args list - lua_getfield(L, 2, "args"); - // +1 for inserted command at front - if (lua_type(L, -1) == LUA_TTABLE) { - len = 1 + lua_rawlen(L, -1); - } - else if (lua_type(L, -1) != LUA_TNIL) { - luv_clean_options(&options); - return luaL_argerror(L, 3, "args option must be table"); - } - else { - len = 1; - } - // +1 for null terminator at end - options.args = malloc((len + 1) * sizeof(*options.args)); - if (!options.args) { - luv_clean_options(&options); - return luaL_error(L, "Problem allocating args"); - } - options.args[0] = (char*)options.file; - for (i = 1; i < len; ++i) { - lua_rawgeti(L, -1, i); - options.args[i] = (char*)lua_tostring(L, -1); - lua_pop(L, 1); - } - options.args[len] = NULL; - lua_pop(L, 1); - - // get the stdio list - lua_getfield(L, 2, "stdio"); - if (lua_type(L, -1) == LUA_TTABLE) { - options.stdio_count = len = lua_rawlen(L, -1); - options.stdio = malloc(len * sizeof(*options.stdio)); - if (!options.stdio) { - luv_clean_options(&options); - return luaL_error(L, "Problem allocating stdio"); - } - for (i = 0; i < len; ++i) { - lua_rawgeti(L, -1, i + 1); - // integers are assumed to be file descripters - if (lua_type(L, -1) == LUA_TNUMBER) { - options.stdio[i].flags = UV_INHERIT_FD; - options.stdio[i].data.fd = lua_tointeger(L, -1); - } - // userdata is assumed to be a uv_stream_t instance - else if (lua_type(L, -1) == LUA_TUSERDATA) { - uv_os_fd_t fd; - uv_stream_t* stream = luv_check_stream(L, -1); - int err = uv_fileno((uv_handle_t*)stream, &fd); - if (err == UV_EINVAL || err == UV_EBADF) { - // stdin (fd 0) is read-only, stdout and stderr (fds 1 & 2) are - // write-only, and all fds > 2 are read-write - int flags = UV_CREATE_PIPE; - if (i == 0 || i > 2) - flags |= UV_READABLE_PIPE; - if (i != 0) - flags |= UV_WRITABLE_PIPE; - options.stdio[i].flags = flags; - } - else { - options.stdio[i].flags = UV_INHERIT_STREAM; - } - options.stdio[i].data.stream = stream; - } - else if (lua_type(L, -1) == LUA_TNIL) { - options.stdio[i].flags = UV_IGNORE; - } - else { - luv_clean_options(&options); - return luaL_argerror(L, 2, "stdio table entries must be nil, uv_stream_t, or integer"); - } - lua_pop(L, 1); - } - } - else if (lua_type(L, -1) != LUA_TNIL) { - luv_clean_options(&options); - return luaL_argerror(L, 2, "stdio option must be table"); - } - lua_pop(L, 1); - - // Get the env - lua_getfield(L, 2, "env"); - if (lua_type(L, -1) == LUA_TTABLE) { - len = lua_rawlen(L, -1); - options.env = malloc((len + 1) * sizeof(*options.env)); - if (!options.env) { - luv_clean_options(&options); - return luaL_error(L, "Problem allocating env"); - } - for (i = 0; i < len; ++i) { - lua_rawgeti(L, -1, i + 1); - options.env[i] = (char*)lua_tostring(L, -1); - lua_pop(L, 1); - } - options.env[len] = NULL; - } - else if (lua_type(L, -1) != LUA_TNIL) { - luv_clean_options(&options); - return luaL_argerror(L, 2, "env option must be table"); - } - lua_pop(L, 1); - - // Get the cwd - lua_getfield(L, 2, "cwd"); - if (lua_type(L, -1) == LUA_TSTRING) { - options.cwd = (char*)lua_tostring(L, -1); - } - else if (lua_type(L, -1) != LUA_TNIL) { - luv_clean_options(&options); - return luaL_argerror(L, 2, "cwd option must be string"); - } - lua_pop(L, 1); - - // Check for uid - lua_getfield(L, 2, "uid"); - if (lua_type(L, -1) == LUA_TNUMBER) { - options.uid = lua_tointeger(L, -1); - options.flags |= UV_PROCESS_SETUID; - } - else if (lua_type(L, -1) != LUA_TNIL) { - luv_clean_options(&options); - return luaL_argerror(L, 2, "uid option must be number"); - } - lua_pop(L, 1); - - // Check for gid - lua_getfield(L, 2, "gid"); - if (lua_type(L, -1) == LUA_TNUMBER) { - options.gid = lua_tointeger(L, -1); - options.flags |= UV_PROCESS_SETGID; - } - else if (lua_type(L, -1) != LUA_TNIL) { - luv_clean_options(&options); - return luaL_argerror(L, 2, "gid option must be number"); - } - lua_pop(L, 1); - - // Check for the boolean flags - lua_getfield(L, 2, "verbatim"); - if (lua_toboolean(L, -1)) { - options.flags |= UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS; - } - lua_pop(L, 1); - lua_getfield(L, 2, "detached"); - if (lua_toboolean(L, -1)) { - options.flags |= UV_PROCESS_DETACHED; - } - lua_pop(L, 1); - lua_getfield(L, 2, "hide"); - if (lua_toboolean(L, -1)) { - options.flags |= UV_PROCESS_WINDOWS_HIDE; - } - lua_pop(L, 1); - - handle = luv_newuserdata(L, sizeof(*handle)); - handle->type = UV_PROCESS; - handle->data = luv_setup_handle(L); - - if (!lua_isnoneornil(L, 3)) { - luv_check_callback(L, handle->data, LUV_EXIT, 3); - } - - ret = uv_spawn(luv_loop(L), handle, &options); - - luv_clean_options(&options); - if (ret < 0) { - /* The async callback is required here because luajit GC may reclaim the - * luv handle before libuv is done closing it down. - */ - uv_close((uv_handle_t*)handle, luv_spawn_close_cb); - return luv_error(L, ret); - } - lua_pushinteger(L, handle->pid); - return 2; -} - -static int luv_parse_signal(lua_State* L, int slot) { - if (lua_isnumber(L, slot)) { - return lua_tonumber(L, slot); - } - if (lua_isstring(L, slot)) { - return luv_sig_string_to_num(lua_tostring(L, slot)); - } - return SIGTERM; -} - -static int luv_process_kill(lua_State* L) { - uv_process_t* handle = luv_check_process(L, 1); - int signum = luv_parse_signal(L, 2); - int ret = uv_process_kill(handle, signum); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_kill(lua_State* L) { - int pid = luaL_checkinteger(L, 1); - int signum = luv_parse_signal(L, 2); - int ret = uv_kill(pid, signum); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} diff --git a/3rdparty/luv/src/req.c b/3rdparty/luv/src/req.c deleted file mode 100644 index 6d7b7e4a30b..00000000000 --- a/3rdparty/luv/src/req.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static uv_req_t* luv_check_req(lua_State* L, int index) { - uv_req_t* req = luaL_checkudata(L, index, "uv_req"); - luaL_argcheck(L, req->data, index, "Expected uv_req_t"); - return req; -} - -static int luv_req_tostring(lua_State* L) { - uv_req_t* req = luaL_checkudata(L, 1, "uv_req"); - switch (req->type) { -#define XX(uc, lc) case UV_##uc: lua_pushfstring(L, "uv_"#lc"_t: %p", req); break; - UV_REQ_TYPE_MAP(XX) -#undef XX - default: lua_pushfstring(L, "uv_req_t: %p", req); break; - } - return 1; -} - -static void luv_req_init(lua_State* L) { - luaL_newmetatable (L, "uv_req"); - lua_pushcfunction(L, luv_req_tostring); - lua_setfield(L, -2, "__tostring"); - lua_pop(L, 1); -} - -// Metamethod to allow storing anything in the userdata's environment -static int luv_cancel(lua_State* L) { - uv_req_t* req = luv_check_req(L, 1); - int ret = uv_cancel(req); - if (ret < 0) return luv_error(L, ret); - luv_cleanup_req(L, req->data); - req->data = NULL; - lua_pushinteger(L, ret); - return 1; -} diff --git a/3rdparty/luv/src/schema.c b/3rdparty/luv/src/schema.c deleted file mode 100644 index e7b82e11d66..00000000000 --- a/3rdparty/luv/src/schema.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ diff --git a/3rdparty/luv/src/signal.c b/3rdparty/luv/src/signal.c deleted file mode 100644 index 48ace2bf601..00000000000 --- a/3rdparty/luv/src/signal.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static uv_signal_t* luv_check_signal(lua_State* L, int index) { - uv_signal_t* handle = luv_checkudata(L, index, "uv_signal"); - luaL_argcheck(L, handle->type == UV_SIGNAL && handle->data, index, "Expected uv_signal_t"); - return handle; -} - -static int luv_new_signal(lua_State* L) { - uv_signal_t* handle = luv_newuserdata(L, sizeof(*handle)); - int ret = uv_signal_init(luv_loop(L), handle); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -static void luv_signal_cb(uv_signal_t* handle, int signum) { - lua_State* L = luv_state(handle->loop); - luv_handle_t* data = handle->data; - lua_pushstring(L, luv_sig_num_to_string(signum)); - luv_call_callback(L, data, LUV_SIGNAL, 1); -} - -static int luv_signal_start(lua_State* L) { - uv_signal_t* handle = luv_check_signal(L, 1); - int signum, ret; - if (lua_isnumber(L, 2)) { - signum = lua_tointeger(L, 2); - } - else if (lua_isstring(L, 2)) { - signum = luv_sig_string_to_num(luaL_checkstring(L, 2)); - luaL_argcheck(L, signum, 2, "Invalid Signal name"); - } - else { - return luaL_argerror(L, 2, "Missing Signal name"); - } - - if (!lua_isnoneornil(L, 3)) { - luv_check_callback(L, handle->data, LUV_SIGNAL, 3); - } - ret = uv_signal_start(handle, luv_signal_cb, signum); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_signal_stop(lua_State* L) { - uv_signal_t* handle = luv_check_signal(L, 1); - int ret = uv_signal_stop(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} diff --git a/3rdparty/luv/src/stream.c b/3rdparty/luv/src/stream.c deleted file mode 100644 index 5009e04f097..00000000000 --- a/3rdparty/luv/src/stream.c +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static void luv_check_buf(lua_State *L, int idx, uv_buf_t *pbuf) { - size_t len; - pbuf->base = (char*)luaL_checklstring(L, idx, &len); - pbuf->len = len; -} - -static uv_stream_t* luv_check_stream(lua_State* L, int index) { - int isStream; - uv_stream_t* handle; - if (!(handle = *(void**) lua_touserdata(L, index))) { goto fail; } - lua_getfield(L, LUA_REGISTRYINDEX, "uv_stream"); - lua_getmetatable(L, index < 0 ? index - 1 : index); - lua_rawget(L, -2); - isStream = lua_toboolean(L, -1); - lua_pop(L, 2); - if (isStream) { return handle; } - fail: luaL_argerror(L, index, "Expected uv_stream userdata"); - return NULL; -} - -static void luv_shutdown_cb(uv_shutdown_t* req, int status) { - lua_State* L = luv_state(req->handle->loop); - luv_status(L, status); - luv_fulfill_req(L, req->data, 1); - luv_cleanup_req(L, req->data); - req->data = NULL; -} - -static int luv_shutdown(lua_State* L) { - uv_stream_t* handle = luv_check_stream(L, 1); - int ref = luv_check_continuation(L, 2); - uv_shutdown_t* req = lua_newuserdata(L, sizeof(*req)); - int ret; - req->data = luv_setup_req(L, ref); - ret = uv_shutdown(req, handle, luv_shutdown_cb); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - return 1; -} - -static void luv_connection_cb(uv_stream_t* handle, int status) { - lua_State* L = luv_state(handle->loop); - luv_status(L, status); - luv_call_callback(L, handle->data, LUV_CONNECTION, 1); -} - -static int luv_listen(lua_State* L) { - uv_stream_t* handle = luv_check_stream(L, 1); - int backlog = luaL_checkinteger(L, 2); - int ret; - luv_check_callback(L, handle->data, LUV_CONNECTION, 3); - ret = uv_listen(handle, backlog, luv_connection_cb); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_accept(lua_State* L) { - uv_stream_t* server = luv_check_stream(L, 1); - uv_stream_t* client = luv_check_stream(L, 2); - int ret = uv_accept(server, client); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static void luv_alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { - (void)handle; - buf->base = malloc(suggested_size); - assert(buf->base); - buf->len = suggested_size; -} - -static void luv_read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { - lua_State* L = luv_state(handle->loop); - int nargs; - - if (nread > 0) { - lua_pushnil(L); - lua_pushlstring(L, buf->base, nread); - nargs = 2; - } - - free(buf->base); - if (nread == 0) return; - - if (nread == UV_EOF) { - nargs = 0; - } - else if (nread < 0) { - luv_status(L, nread); - nargs = 1; - } - - luv_call_callback(L, handle->data, LUV_READ, nargs); -} - -static int luv_read_start(lua_State* L) { - uv_stream_t* handle = luv_check_stream(L, 1); - int ret; - luv_check_callback(L, handle->data, LUV_READ, 2); - ret = uv_read_start(handle, luv_alloc_cb, luv_read_cb); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_read_stop(lua_State* L) { - uv_stream_t* handle = luv_check_stream(L, 1); - int ret = uv_read_stop(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static void luv_write_cb(uv_write_t* req, int status) { - lua_State* L = luv_state(req->handle->loop); - luv_status(L, status); - luv_fulfill_req(L, req->data, 1); - luv_cleanup_req(L, req->data); - req->data = NULL; -} - -static uv_buf_t* luv_prep_bufs(lua_State* L, int index, size_t *count) { - uv_buf_t *bufs; - size_t i; - *count = lua_rawlen(L, index); - bufs = malloc(sizeof(uv_buf_t) * *count); - for (i = 0; i < *count; ++i) { - lua_rawgeti(L, index, i + 1); - luv_check_buf(L, -1, &bufs[i]); - lua_pop(L, 1); - } - return bufs; -} - -static int luv_write(lua_State* L) { - uv_stream_t* handle = luv_check_stream(L, 1); - uv_write_t* req; - int ret, ref; - ref = luv_check_continuation(L, 3); - req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - if (lua_istable(L, 2)) { - size_t count; - uv_buf_t *bufs = luv_prep_bufs(L, 2, &count); - ret = uv_write(req, handle, bufs, count, luv_write_cb); - free(bufs); - } - else if (lua_isstring(L, 2)) { - uv_buf_t buf; - luv_check_buf(L, 2, &buf); - ret = uv_write(req, handle, &buf, 1, luv_write_cb); - } - else { - return luaL_argerror(L, 2, "data must be string or table of strings"); - } - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - lua_pushvalue(L, 2); - ((luv_req_t*)req->data)->data_ref = luaL_ref(L, LUA_REGISTRYINDEX); - return 1; -} - -static int luv_write2(lua_State* L) { - uv_stream_t* handle = luv_check_stream(L, 1); - uv_write_t* req; - int ret, ref; - uv_stream_t* send_handle; - send_handle = luv_check_stream(L, 3); - ref = luv_check_continuation(L, 4); - req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - if (lua_istable(L, 2)) { - size_t count; - uv_buf_t *bufs = luv_prep_bufs(L, 2, &count); - ret = uv_write2(req, handle, bufs, count, send_handle, luv_write_cb); - free(bufs); - } - else if (lua_isstring(L, 2)) { - uv_buf_t buf; - luv_check_buf(L, 2, &buf); - ret = uv_write2(req, handle, &buf, 1, send_handle, luv_write_cb); - } - else { - return luaL_argerror(L, 2, "data must be string or table of strings"); - } - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - lua_pushvalue(L, 2); - ((luv_req_t*)req->data)->data_ref = luaL_ref(L, LUA_REGISTRYINDEX); - return 1; -} - -static int luv_try_write(lua_State* L) { - uv_stream_t* handle = luv_check_stream(L, 1); - int ret; - if (lua_istable(L, 2)) { - size_t count; - uv_buf_t *bufs = luv_prep_bufs(L, 2, &count); - ret = uv_try_write(handle, bufs, count); - free(bufs); - } - else if (lua_isstring(L, 2)) { - uv_buf_t buf; - luv_check_buf(L, 2, &buf); - ret = uv_try_write(handle, &buf, 1); - } - else { - return luaL_argerror(L, 2, "data must be string or table of strings"); - } - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_is_readable(lua_State* L) { - uv_stream_t* handle = luv_check_stream(L, 1); - lua_pushboolean(L, uv_is_readable(handle)); - return 1; -} - -static int luv_is_writable(lua_State* L) { - uv_stream_t* handle = luv_check_stream(L, 1); - lua_pushboolean(L, uv_is_writable(handle)); - return 1; -} - -static int luv_stream_set_blocking(lua_State* L) { - uv_stream_t* handle = luv_check_stream(L, 1); - int blocking, ret; - luaL_checktype(L, 2, LUA_TBOOLEAN); - blocking = lua_toboolean(L, 2); - ret = uv_stream_set_blocking(handle, blocking); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - diff --git a/3rdparty/luv/src/tcp.c b/3rdparty/luv/src/tcp.c deleted file mode 100644 index 7ffef5ae763..00000000000 --- a/3rdparty/luv/src/tcp.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static uv_tcp_t* luv_check_tcp(lua_State* L, int index) { - uv_tcp_t* handle = luv_checkudata(L, index, "uv_tcp"); - luaL_argcheck(L, handle->type == UV_TCP && handle->data, index, "Expected uv_tcp_t"); - return handle; -} - -static int luv_new_tcp(lua_State* L) { - uv_tcp_t* handle = luv_newuserdata(L, sizeof(*handle)); - int ret = uv_tcp_init(luv_loop(L), handle); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -static int luv_tcp_open(lua_State* L) { - uv_tcp_t* handle = luv_check_tcp(L, 1); - uv_os_sock_t sock = luaL_checkinteger(L, 2); - int ret = uv_tcp_open(handle, sock); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_tcp_nodelay(lua_State* L) { - uv_tcp_t* handle = luv_check_tcp(L, 1); - int ret, enable; - luaL_checktype(L, 2, LUA_TBOOLEAN); - enable = lua_toboolean(L, 2); - ret = uv_tcp_nodelay(handle, enable); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_tcp_keepalive(lua_State* L) { - uv_tcp_t* handle = luv_check_tcp(L, 1); - int ret, enable; - unsigned int delay = 0; - luaL_checktype(L, 2, LUA_TBOOLEAN); - enable = lua_toboolean(L, 2); - if (enable) { - delay = luaL_checkinteger(L, 3); - } - ret = uv_tcp_keepalive(handle, enable, delay); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_tcp_simultaneous_accepts(lua_State* L) { - uv_tcp_t* handle = luv_check_tcp(L, 1); - int ret, enable; - luaL_checktype(L, 2, LUA_TBOOLEAN); - enable = lua_toboolean(L, 2); - ret = uv_tcp_simultaneous_accepts(handle, enable); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_tcp_bind(lua_State* L) { - uv_tcp_t* handle = luv_check_tcp(L, 1); - const char* host = luaL_checkstring(L, 2); - int port = luaL_checkinteger(L, 3); - unsigned int flags = 0; - struct sockaddr_storage addr; - int ret; - if (uv_ip4_addr(host, port, (struct sockaddr_in*)&addr) && - uv_ip6_addr(host, port, (struct sockaddr_in6*)&addr)) { - return luaL_error(L, "Invalid IP address or port [%s:%d]", host, port); - } - if (lua_type(L, 4) == LUA_TTABLE) { - lua_getfield(L, 4, "ipv6only"); - if (lua_toboolean(L, -1)) flags |= UV_TCP_IPV6ONLY; - lua_pop(L, 1); - } - ret = uv_tcp_bind(handle, (struct sockaddr*)&addr, flags); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static void parse_sockaddr(lua_State* L, struct sockaddr_storage* address, int addrlen) { - char ip[INET6_ADDRSTRLEN]; - int port = 0; - lua_newtable(L); - if (address->ss_family == AF_INET) { - struct sockaddr_in* addrin = (struct sockaddr_in*)address; - uv_inet_ntop(AF_INET, &(addrin->sin_addr), ip, addrlen); - port = ntohs(addrin->sin_port); - } else if (address->ss_family == AF_INET6) { - struct sockaddr_in6* addrin6 = (struct sockaddr_in6*)address; - uv_inet_ntop(AF_INET6, &(addrin6->sin6_addr), ip, addrlen); - port = ntohs(addrin6->sin6_port); - } - - lua_pushstring(L, luv_af_num_to_string(address->ss_family)); - lua_setfield(L, -2, "family"); - lua_pushinteger(L, port); - lua_setfield(L, -2, "port"); - lua_pushstring(L, ip); - lua_setfield(L, -2, "ip"); -} - -static int luv_tcp_getsockname(lua_State* L) { - uv_tcp_t* handle = luv_check_tcp(L, 1); - struct sockaddr_storage address; - int addrlen = sizeof(address); - int ret = uv_tcp_getsockname(handle, (struct sockaddr*)&address, &addrlen); - if (ret < 0) return luv_error(L, ret); - parse_sockaddr(L, &address, addrlen); - return 1; -} - -static int luv_tcp_getpeername(lua_State* L) { - uv_tcp_t* handle = luv_check_tcp(L, 1); - struct sockaddr_storage address; - int addrlen = sizeof(address); - int ret = uv_tcp_getpeername(handle, (struct sockaddr*)&address, &addrlen); - if (ret < 0) return luv_error(L, ret); - parse_sockaddr(L, &address, addrlen); - return 1; -} - - -static void luv_connect_cb(uv_connect_t* req, int status) { - lua_State* L = luv_state(req->handle->loop); - luv_status(L, status); - luv_fulfill_req(L, req->data, 1); - luv_cleanup_req(L, req->data); - req->data = NULL; -} - -static int luv_write_queue_size(lua_State* L) { - uv_tcp_t* handle = luv_check_tcp(L, 1); - lua_pushinteger(L, handle->write_queue_size); - return 1; -} - -static int luv_tcp_connect(lua_State* L) { - uv_tcp_t* handle = luv_check_tcp(L, 1); - const char* host = luaL_checkstring(L, 2); - int port = luaL_checkinteger(L, 3); - struct sockaddr_storage addr; - uv_connect_t* req; - int ret, ref; - if (uv_ip4_addr(host, port, (struct sockaddr_in*)&addr) && - uv_ip6_addr(host, port, (struct sockaddr_in6*)&addr)) { - return luaL_error(L, "Invalid IP address or port [%s:%d]", host, port); - } - ref = luv_check_continuation(L, 4); - - req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - ret = uv_tcp_connect(req, handle, (struct sockaddr*)&addr, luv_connect_cb); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - return 1; -} diff --git a/3rdparty/luv/src/thread.c b/3rdparty/luv/src/thread.c deleted file mode 100644 index cc53011e6ed..00000000000 --- a/3rdparty/luv/src/thread.c +++ /dev/null @@ -1,353 +0,0 @@ -/* -* Copyright 2014 The Luvit Authors. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ -#include "luv.h" -#include "lthreadpool.h" - -typedef struct { - uv_thread_t handle; - char* code; - int len; - int argc; - luv_thread_arg_t arg; -} luv_thread_t; - -static luv_acquire_vm acquire_vm_cb = NULL; -static luv_release_vm release_vm_cb = NULL; - -static lua_State* luv_thread_acquire_vm() { - lua_State* L = luaL_newstate(); - - // Add in the lua standard libraries - luaL_openlibs(L); - - // Get package.loaded, so we can store uv in it. - lua_getglobal(L, "package"); - lua_getfield(L, -1, "loaded"); - lua_remove(L, -2); // Remove package - - // Store uv module definition at loaded.uv - luaopen_luv(L); - lua_setfield(L, -2, "luv"); - lua_pop(L, 1); - - return L; -} - -static void luv_thread_release_vm(lua_State* L) { - lua_close(L); -} - -static int luv_thread_arg_set(lua_State* L, luv_thread_arg_t* args, int idx, int top, int flag) -{ - int i; - idx = idx > 0 ? idx : 1; - i = idx; - while (i <= top && i <= LUV_THREAD_MAXNUM_ARG + idx) - { - luv_val_t *arg = args->argv + i - idx; - arg->type = lua_type(L, i); - switch (arg->type) - { - case LUA_TNIL: - break; - case LUA_TBOOLEAN: - arg->val.boolean = lua_toboolean(L, i); - break; - case LUA_TNUMBER: - arg->val.num = lua_tonumber(L, i); - break; - case LUA_TLIGHTUSERDATA: - arg->val.userdata = lua_touserdata(L, i); - break; - case LUA_TSTRING: - { - const char* p = lua_tolstring(L, i, &arg->val.str.len); - arg->val.str.base = malloc(arg->val.str.len); - if (arg->val.str.base == NULL) - { - perror("out of memory"); - return 0; - } - memcpy((void*)arg->val.str.base, p, arg->val.str.len); - break; - } - case LUA_TUSERDATA: - if (flag == 1) { - arg->val.userdata = luv_check_handle(L, i); - break; - } - default: - fprintf(stderr, "Error: thread arg not support type '%s' at %d", - luaL_typename(L, arg->type), i); - exit(-1); - break; - } - i++; - } - args->argc = i - idx; - return args->argc; -} - -static void luv_thread_arg_clear(luv_thread_arg_t* args) { - int i; - for (i = 0; i < args->argc; i++) - { - if (args->argv[i].type == LUA_TSTRING) - { - free((void*)args->argv[i].val.str.base); - } - } - memset(args, 0, sizeof(*args)); - args->argc = 0; -} - -static void luv_thread_setup_handle(lua_State* L, uv_handle_t* handle) { - *(void**) lua_newuserdata(L, sizeof(void*)) = handle; - -#define XX(uc, lc) case UV_##uc: \ - luaL_getmetatable(L, "uv_"#lc); \ - break; - switch (handle->type) { - UV_HANDLE_TYPE_MAP(XX) - default: - luaL_error(L, "Unknown handle type"); - } -#undef XX - - lua_setmetatable(L, -2); -} - -static int luv_thread_arg_push(lua_State* L, const luv_thread_arg_t* args) { - int i = 0; - while (i < args->argc) - { - const luv_val_t* arg = args->argv + i; - switch (arg->type) - { - case LUA_TNIL: - lua_pushnil(L); - break; - case LUA_TBOOLEAN: - lua_pushboolean(L, arg->val.boolean); - break; - case LUA_TLIGHTUSERDATA: - lua_pushlightuserdata(L, arg->val.userdata); - break; - case LUA_TNUMBER: - lua_pushnumber(L, arg->val.num); - break; - case LUA_TSTRING: - lua_pushlstring(L, arg->val.str.base, arg->val.str.len); - break; - case LUA_TUSERDATA: - luv_thread_setup_handle(L, arg->val.userdata); - break; - default: - fprintf(stderr, "Error: thread arg not support type %s at %d", - luaL_typename(L, arg->type), i + 1); - } - i++; - }; - return i; -} - -int thread_dump(lua_State* L, const void* p, size_t sz, void* B) -{ - (void)L; - luaL_addlstring((luaL_Buffer*) B, (const char*) p, sz); - return 0; -} - -static const char* luv_thread_dumped(lua_State* L, int idx, size_t* l) { - if (lua_isstring(L, idx)) { - return lua_tolstring(L, idx, l); - } else { - const char* buff = NULL; - int top = lua_gettop(L); - luaL_Buffer b; - luaL_checktype(L, idx, LUA_TFUNCTION); - lua_pushvalue(L, idx); - luaL_buffinit(L, &b); -#if LUA_VERSION_NUM>=503 - int test_lua_dump = (lua_dump(L, thread_dump, &b, 1) == 0); -#else - int test_lua_dump = (lua_dump(L, thread_dump, &b) == 0); -#endif - if (test_lua_dump) { - luaL_pushresult(&b); - buff = lua_tolstring(L, -1, l); - } else - luaL_error(L, "Error: unable to dump given function"); - lua_settop(L, top); - - return buff; - } -} - -static luv_thread_t* luv_check_thread(lua_State* L, int index) -{ - luv_thread_t* thread = luaL_checkudata(L, index, "uv_thread"); - return thread; -} - -static int luv_thread_gc(lua_State* L) { - luv_thread_t* tid = luv_check_thread(L, 1); - free(tid->code); - tid->code = NULL; - tid->len = 0; - luv_thread_arg_clear(&tid->arg); - return 0; -} - -static int luv_thread_tostring(lua_State* L) -{ - luv_thread_t* thd = luv_check_thread(L, 1); - lua_pushfstring(L, "uv_thread_t: %p", thd->handle); - return 1; -} - -static void luv_thread_cb(void* varg) { - luv_thread_t* thd = (luv_thread_t*)varg; - lua_State* L = acquire_vm_cb(); - if (luaL_loadbuffer(L, thd->code, thd->len, "=thread") == 0) - { - int top = lua_gettop(L); - int i = luv_thread_arg_push(L, &thd->arg); - - for (i = 0; i < thd->arg.argc; i++) { - if (thd->arg.argv[i].type == LUA_TUSERDATA) { - lua_pushlightuserdata(L, thd->arg.argv[i].val.userdata); - lua_pushvalue(L, top + i + 1); - lua_rawset(L, LUA_REGISTRYINDEX); - } - } - - if (lua_pcall(L, i, 0, 0)) { - fprintf(stderr, "Uncaught Error in thread: %s\n", lua_tostring(L, -1)); - } - - for (i = 0; i < thd->arg.argc; i++) { - if (thd->arg.argv[i].type == LUA_TUSERDATA) { - lua_pushlightuserdata(L, thd->arg.argv[i].val.userdata); - lua_rawget(L, LUA_REGISTRYINDEX); - lua_pushnil(L); - lua_setmetatable(L, -2); - lua_pop(L, 1); - - lua_pushlightuserdata(L, thd->arg.argv[i].val.userdata); - lua_pushnil(L); - lua_rawset(L, LUA_REGISTRYINDEX); - } - } - - } else { - fprintf(stderr, "Uncaught Error: %s\n", lua_tostring(L, -1)); - } - release_vm_cb(L); -} - -static int luv_new_thread(lua_State* L) { - int ret; - size_t len; - const char* buff; - luv_thread_t* thread; - thread = lua_newuserdata(L, sizeof(*thread)); - memset(thread, 0, sizeof(*thread)); - luaL_getmetatable(L, "uv_thread"); - lua_setmetatable(L, -2); - - buff = luv_thread_dumped(L, 1, &len); - - thread->argc = luv_thread_arg_set(L, &thread->arg, 2, lua_gettop(L) - 1, 1); - thread->len = len; - thread->code = malloc(thread->len); - memcpy(thread->code, buff, len); - - ret = uv_thread_create(&thread->handle, luv_thread_cb, thread); - if (ret < 0) return luv_error(L, ret); - - return 1; -} - -static int luv_thread_join(lua_State* L) { - luv_thread_t* tid = luv_check_thread(L, 1); - int ret = uv_thread_join(&tid->handle); - if (ret < 0) return luv_error(L, ret); - lua_pushboolean(L, 1); - return 1; -} - -static int luv_thread_self(lua_State* L) -{ - luv_thread_t* thread; - uv_thread_t t = uv_thread_self(); - thread = lua_newuserdata(L, sizeof(*thread)); - memset(thread, 0, sizeof(*thread)); - memcpy(&thread->handle, &t, sizeof(t)); - luaL_getmetatable(L, "uv_thread"); - lua_setmetatable(L, -2); - return 1; -} - -static int luv_thread_equal(lua_State* L) { - luv_thread_t* t1 = luv_check_thread(L, 1); - luv_thread_t* t2 = luv_check_thread(L, 2); - int ret = uv_thread_equal(&t1->handle, &t2->handle); - lua_pushboolean(L, ret); - return 1; -} - -/* Pause the calling thread for a number of milliseconds. */ -static int luv_thread_sleep(lua_State* L) { -#ifdef _WIN32 - DWORD msec = luaL_checkinteger(L, 1); - Sleep(msec); -#else - lua_Integer msec = luaL_checkinteger(L, 1); - usleep(msec * 1000); -#endif - return 0; -} - -static const luaL_Reg luv_thread_methods[] = { - {"equal", luv_thread_equal}, - {"join", luv_thread_join}, - {NULL, NULL} -}; - -static void luv_thread_init(lua_State* L) { - luaL_newmetatable(L, "uv_thread"); - lua_pushcfunction(L, luv_thread_tostring); - lua_setfield(L, -2, "__tostring"); - lua_pushcfunction(L, luv_thread_equal); - lua_setfield(L, -2, "__eq"); - lua_pushcfunction(L, luv_thread_gc); - lua_setfield(L, -2, "__gc"); - lua_newtable(L); - luaL_setfuncs(L, luv_thread_methods, 0); - lua_setfield(L, -2, "__index"); - lua_pop(L, 1); - - if (acquire_vm_cb == NULL) acquire_vm_cb = luv_thread_acquire_vm; - if (release_vm_cb == NULL) release_vm_cb = luv_thread_release_vm; -} - -LUALIB_API void luv_set_thread_cb(luv_acquire_vm acquire, luv_release_vm release) -{ - acquire_vm_cb = acquire; - release_vm_cb = release; -} diff --git a/3rdparty/luv/src/timer.c b/3rdparty/luv/src/timer.c deleted file mode 100644 index b283f1fc8b2..00000000000 --- a/3rdparty/luv/src/timer.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static uv_timer_t* luv_check_timer(lua_State* L, int index) { - uv_timer_t* handle = luv_checkudata(L, index, "uv_timer"); - luaL_argcheck(L, handle->type == UV_TIMER && handle->data, index, "Expected uv_timer_t"); - return handle; -} - -static int luv_new_timer(lua_State* L) { - uv_timer_t* handle = luv_newuserdata(L, sizeof(*handle)); - int ret = uv_timer_init(luv_loop(L), handle); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -static void luv_timer_cb(uv_timer_t* handle) { - lua_State* L = luv_state(handle->loop); - luv_handle_t* data = handle->data; - luv_call_callback(L, data, LUV_TIMEOUT, 0); -} - -static int luv_timer_start(lua_State* L) { - uv_timer_t* handle = luv_check_timer(L, 1); - uint64_t timeout; - uint64_t repeat; - int ret; - timeout = luaL_checkinteger(L, 2); - repeat = luaL_checkinteger(L, 3); - luv_check_callback(L, handle->data, LUV_TIMEOUT, 4); - ret = uv_timer_start(handle, luv_timer_cb, timeout, repeat); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_timer_stop(lua_State* L) { - uv_timer_t* handle = luv_check_timer(L, 1); - int ret = uv_timer_stop(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_timer_again(lua_State* L) { - uv_timer_t* handle = luv_check_timer(L, 1); - int ret = uv_timer_again(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_timer_set_repeat(lua_State* L) { - uv_timer_t* handle = luv_check_timer(L, 1); - uint64_t repeat = luaL_checkinteger(L, 2); - uv_timer_set_repeat(handle, repeat); - return 0; -} - -static int luv_timer_get_repeat(lua_State* L) { - uv_timer_t* handle = luv_check_timer(L, 1); - uint64_t repeat = uv_timer_get_repeat(handle); - lua_pushinteger(L, repeat); - return 1; -} diff --git a/3rdparty/luv/src/tty.c b/3rdparty/luv/src/tty.c deleted file mode 100644 index 9232dc07603..00000000000 --- a/3rdparty/luv/src/tty.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static uv_tty_t* luv_check_tty(lua_State* L, int index) { - uv_tty_t* handle = luv_checkudata(L, index, "uv_tty"); - luaL_argcheck(L, handle->type == UV_TTY && handle->data, index, "Expected uv_tty_t"); - return handle; -} - -static int luv_new_tty(lua_State* L) { - int readable, ret; - uv_tty_t* handle; - uv_file fd = luaL_checkinteger(L, 1); - luaL_checktype(L, 2, LUA_TBOOLEAN); - readable = lua_toboolean(L, 2); - handle = luv_newuserdata(L, sizeof(*handle)); - ret = uv_tty_init(luv_loop(L), handle, fd, readable); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -static int luv_tty_set_mode(lua_State* L) { - uv_tty_t* handle = luv_check_tty(L, 1); - int mode = luaL_checkinteger(L, 2); - int ret = uv_tty_set_mode(handle, mode); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_tty_reset_mode(lua_State* L) { - int ret = uv_tty_reset_mode(); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_tty_get_winsize(lua_State* L) { - uv_tty_t* handle = luv_check_tty(L, 1); - int width, height; - int ret = uv_tty_get_winsize(handle, &width, &height); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, width); - lua_pushinteger(L, height); - return 2; -} diff --git a/3rdparty/luv/src/udp.c b/3rdparty/luv/src/udp.c deleted file mode 100644 index 9cc25555559..00000000000 --- a/3rdparty/luv/src/udp.c +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -static uv_udp_t* luv_check_udp(lua_State* L, int index) { - uv_udp_t* handle = luv_checkudata(L, index, "uv_udp"); - luaL_argcheck(L, handle->type == UV_UDP && handle->data, index, "Expected uv_udp_t"); - return handle; -} - -static int luv_new_udp(lua_State* L) { - uv_udp_t* handle = luv_newuserdata(L, sizeof(*handle)); - int ret = uv_udp_init(luv_loop(L), handle); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - handle->data = luv_setup_handle(L); - return 1; -} - -static int luv_udp_open(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - uv_os_sock_t sock = luaL_checkinteger(L, 2); - int ret = uv_udp_open(handle, sock); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_udp_bind(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - const char* host = luaL_checkstring(L, 2); - int port = luaL_checkinteger(L, 3); - unsigned int flags = 0; - struct sockaddr_storage addr; - int ret; - if (uv_ip4_addr(host, port, (struct sockaddr_in*)&addr) && - uv_ip6_addr(host, port, (struct sockaddr_in6*)&addr)) { - return luaL_error(L, "Invalid IP address or port [%s:%d]", host, port); - } - if (lua_type(L, 4) == LUA_TTABLE) { - luaL_checktype(L, 4, LUA_TTABLE); - lua_getfield(L, 4, "reuseaddr"); - if (lua_toboolean(L, -1)) flags |= UV_UDP_REUSEADDR; - lua_pop(L, 1); - lua_getfield(L, 4, "ipv6only"); - if (lua_toboolean(L, -1)) flags |= UV_UDP_IPV6ONLY; - lua_pop(L, 1); - } - ret = uv_udp_bind(handle, (struct sockaddr*)&addr, flags); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_udp_getsockname(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - struct sockaddr_storage address; - int addrlen = sizeof(address); - int ret = uv_udp_getsockname(handle, (struct sockaddr*)&address, &addrlen); - if (ret < 0) return luv_error(L, ret); - parse_sockaddr(L, &address, addrlen); - return 1; -} - -// These are the same order as uv_membership which also starts at 0 -static const char *const luv_membership_opts[] = { - "leave", "join", NULL -}; - -static int luv_udp_set_membership(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - const char* multicast_addr = luaL_checkstring(L, 2); - const char* interface_addr = luaL_checkstring(L, 3); - uv_membership membership = luaL_checkoption(L, 4, NULL, luv_membership_opts); - int ret = uv_udp_set_membership(handle, multicast_addr, interface_addr, membership); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_udp_set_multicast_loop(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - int on, ret; - luaL_checktype(L, 2, LUA_TBOOLEAN); - on = lua_toboolean(L, 2); - ret = uv_udp_set_multicast_loop(handle, on); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_udp_set_multicast_ttl(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - int ttl, ret; - ttl = luaL_checkinteger(L, 2); - ret = uv_udp_set_multicast_ttl(handle, ttl); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_udp_set_multicast_interface(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - const char* interface_addr = luaL_checkstring(L, 2); - int ret = uv_udp_set_multicast_interface(handle, interface_addr); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_udp_set_broadcast(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - int on, ret; - luaL_checktype(L, 2, LUA_TBOOLEAN); - on = lua_toboolean(L, 2); - ret =uv_udp_set_broadcast(handle, on); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_udp_set_ttl(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - int ttl, ret; - ttl = luaL_checknumber(L, 2); - ret = uv_udp_set_ttl(handle, ttl); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static void luv_udp_send_cb(uv_udp_send_t* req, int status) { - lua_State* L = luv_state(req->handle->loop); - luv_status(L, status); - luv_fulfill_req(L, req->data, 1); - luv_cleanup_req(L, req->data); - req->data = NULL; -} - -static int luv_udp_send(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - uv_udp_send_t* req; - uv_buf_t buf; - int ret, port, ref; - const char* host; - struct sockaddr_storage addr; - luv_check_buf(L, 2, &buf); - host = luaL_checkstring(L, 3); - port = luaL_checkinteger(L, 4); - if (uv_ip4_addr(host, port, (struct sockaddr_in*)&addr) && - uv_ip6_addr(host, port, (struct sockaddr_in6*)&addr)) { - return luaL_error(L, "Invalid IP address or port [%s:%d]", host, port); - } - ref = luv_check_continuation(L, 5); - req = lua_newuserdata(L, sizeof(*req)); - req->data = luv_setup_req(L, ref); - ret = uv_udp_send(req, handle, &buf, 1, (struct sockaddr*)&addr, luv_udp_send_cb); - if (ret < 0) { - lua_pop(L, 1); - return luv_error(L, ret); - } - return 1; - -} - -static int luv_udp_try_send(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - uv_buf_t buf; - int ret, port; - const char* host; - struct sockaddr_storage addr; - luv_check_buf(L, 2, &buf); - host = luaL_checkstring(L, 3); - port = luaL_checkinteger(L, 4); - if (uv_ip4_addr(host, port, (struct sockaddr_in*)&addr) && - uv_ip6_addr(host, port, (struct sockaddr_in6*)&addr)) { - return luaL_error(L, "Invalid IP address or port [%s:%d]", host, port); - } - ret = uv_udp_try_send(handle, &buf, 1, (struct sockaddr*)&addr); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static void luv_udp_recv_cb(uv_udp_t* handle, ssize_t nread, const uv_buf_t* buf, const struct sockaddr* addr, unsigned flags) { - lua_State* L = luv_state(handle->loop); - - // err - if (nread < 0) { - luv_status(L, nread); - } - else { - lua_pushnil(L); - } - - // data - if (nread == 0) { - if (addr) { - lua_pushstring(L, ""); - } - else { - lua_pushnil(L); - } - } - else if (nread > 0) { - lua_pushlstring(L, buf->base, nread); - } - if (buf) free(buf->base); - - // address - if (addr) { - parse_sockaddr(L, (struct sockaddr_storage*)addr, sizeof *addr); - } - else { - lua_pushnil(L); - } - - // flags - lua_newtable(L); - if (flags & UV_UDP_PARTIAL) { - lua_pushboolean(L, 1); - lua_setfield(L, -2, "partial"); - } - - luv_call_callback(L, handle->data, LUV_RECV, 4); -} - -static int luv_udp_recv_start(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - int ret; - luv_check_callback(L, handle->data, LUV_RECV, 2); - ret = uv_udp_recv_start(handle, luv_alloc_cb, luv_udp_recv_cb); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} - -static int luv_udp_recv_stop(lua_State* L) { - uv_udp_t* handle = luv_check_udp(L, 1); - int ret = uv_udp_recv_stop(handle); - if (ret < 0) return luv_error(L, ret); - lua_pushinteger(L, ret); - return 1; -} diff --git a/3rdparty/luv/src/util.c b/3rdparty/luv/src/util.c deleted file mode 100644 index c7b98c1759a..00000000000 --- a/3rdparty/luv/src/util.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include "luv.h" - -void luv_stack_dump(lua_State* L, const char* name) { - int i, l; - fprintf(stderr, "\nAPI STACK DUMP %p %d: %s\n", L, lua_status(L), name); - for (i = 1, l = lua_gettop(L); i <= l; i++) { - int type = lua_type(L, i); - switch (type) { - case LUA_TSTRING: - fprintf(stderr, " %d %s \"%s\"\n", i, lua_typename(L, type), lua_tostring(L, i)); - break; - case LUA_TNUMBER: - fprintf(stderr, " %d %s %ld\n", i, lua_typename(L, type), (long int) lua_tointeger(L, i)); - break; - case LUA_TUSERDATA: - fprintf(stderr, " %d %s %p\n", i, lua_typename(L, type), lua_touserdata(L, i)); - break; - default: - fprintf(stderr, " %d %s\n", i, lua_typename(L, type)); - break; - } - } - assert(l == lua_gettop(L)); -} - -static int luv_error(lua_State* L, int status) { - lua_pushnil(L); - lua_pushfstring(L, "%s: %s", uv_err_name(status), uv_strerror(status)); - lua_pushstring(L, uv_err_name(status)); - return 3; -} - -static void luv_status(lua_State* L, int status) { - if (status < 0) { - lua_pushstring(L, uv_err_name(status)); - } - else { - lua_pushnil(L); - } -} diff --git a/3rdparty/luv/src/util.h b/3rdparty/luv/src/util.h deleted file mode 100644 index c669c0430db..00000000000 --- a/3rdparty/luv/src/util.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2014 The Luvit Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#ifndef LUV_UTIL_H -#define LUV_UTIL_H - -#include "luv.h" - -void luv_stack_dump(lua_State* L, const char* name); -static int luv_error(lua_State* L, int ret); -static void luv_status(lua_State* L, int status); - -#endif diff --git a/3rdparty/luv/src/work.c b/3rdparty/luv/src/work.c deleted file mode 100644 index e40212f1e7c..00000000000 --- a/3rdparty/luv/src/work.c +++ /dev/null @@ -1,224 +0,0 @@ -/* -* Copyright 2014 The Luvit Authors. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ -#include "luv.h" - -#include "lthreadpool.h" - -typedef struct { - lua_State* L; /* vm in main */ - char* code; /* thread entry code */ - size_t len; - - uv_async_t async; - int async_cb; /* ref, run in main, call when async message received, NYI */ - int after_work_cb; /* ref, run in main ,call after work cb*/ -} luv_work_ctx_t; - -typedef struct { - uv_work_t work; - luv_work_ctx_t* ctx; - - luv_thread_arg_t arg; -} luv_work_t; - -static uv_key_t L_key; - -static luv_work_ctx_t* luv_check_work_ctx(lua_State* L, int index) -{ - luv_work_ctx_t* ctx = luaL_checkudata(L, index, "luv_work_ctx"); - return ctx; -} - -static int luv_work_ctx_gc(lua_State *L) -{ - luv_work_ctx_t* ctx = luv_check_work_ctx(L, 1); - free(ctx->code); - luaL_unref(L, LUA_REGISTRYINDEX, ctx->after_work_cb); - luaL_unref(L, LUA_REGISTRYINDEX, ctx->async_cb); - - return 0; -} - -static int luv_work_ctx_tostring(lua_State* L) -{ - luv_work_ctx_t* ctx = luv_check_work_ctx(L, 1); - lua_pushfstring(L, "luv_work_ctx_t: %p", ctx); - return 1; -} - -static void luv_work_cb(uv_work_t* req) -{ - luv_work_t* work = req->data; - luv_work_ctx_t* ctx = work->ctx; - lua_State *L = uv_key_get(&L_key); - int top; - if (L == NULL) { - /* vm reuse in threadpool */ - L = acquire_vm_cb(); - uv_key_set(&L_key, L); - } - - top = lua_gettop(L); - lua_pushlstring(L, ctx->code, ctx->len); - lua_rawget(L, LUA_REGISTRYINDEX); - if (lua_isnil(L, -1)) - { - lua_pop(L, 1); - - lua_pushlstring(L, ctx->code, ctx->len); - if (luaL_loadbuffer(L, ctx->code, ctx->len, "=pool") != 0) - { - fprintf(stderr, "Uncaught Error: %s\n", lua_tostring(L, -1)); - lua_pop(L, 2); - - lua_pushnil(L); - } else - { - lua_pushvalue(L, -1); - lua_insert(L, lua_gettop(L) - 2); - lua_rawset(L, LUA_REGISTRYINDEX); - } - } - - if (lua_isfunction(L, -1)) - { - int i = luv_thread_arg_push(L, &work->arg); - if (lua_pcall(L, i, LUA_MULTRET, 0)) { - fprintf(stderr, "Uncaught Error in thread: %s\n", lua_tostring(L, -1)); - } - luv_thread_arg_clear(&work->arg); - luv_thread_arg_set(L, &work->arg, top + 1, lua_gettop(L), 0); - lua_settop(L, top); - } else { - fprintf(stderr, "Uncaught Error: %s can't be work entry\n", - lua_typename(L, lua_type(L,-1))); - } -} - -static void luv_after_work_cb(uv_work_t* req, int status) { - luv_work_t* work = req->data; - luv_work_ctx_t* ctx = work->ctx; - lua_State*L = ctx->L; - int i; - (void)status; - lua_rawgeti(L, LUA_REGISTRYINDEX, ctx->after_work_cb); - i = luv_thread_arg_push(L, &work->arg); - if (lua_pcall(L, i, 0, 0)) - { - fprintf(stderr, "Uncaught Error in thread: %s\n", lua_tostring(L, -1)); - } - - //ref down to ctx - lua_pushlightuserdata(L, work); - lua_pushnil(L); - lua_rawset(L, LUA_REGISTRYINDEX); - - luv_thread_arg_clear(&work->arg); - free(work); -} - -static void async_cb(uv_async_t *handle) -{ - luv_work_t*work = handle->data; - luv_work_ctx_t* ctx = work->ctx; - lua_State*L = ctx->L; - int i; - lua_rawgeti(L, LUA_REGISTRYINDEX, ctx->async_cb); - i = luv_thread_arg_push(L, &work->arg); - if (lua_pcall(L, i, 0, 0)) - { - fprintf(stderr, "Uncaught Error in thread: %s\n", lua_tostring(L, -1)); - } -} - -static int luv_new_work(lua_State* L) { - size_t len; - const char* buff; - luv_work_ctx_t* ctx; - - buff = luv_thread_dumped(L, 1, &len); - luaL_checktype(L, 2, LUA_TFUNCTION); - if(!lua_isnoneornil(L, 3)) - luaL_checktype(L, 3, LUA_TFUNCTION); - - ctx = lua_newuserdata(L, sizeof(*ctx)); - memset(ctx, 0, sizeof(*ctx)); - - ctx->len = len; - ctx->code = malloc(ctx->len); - memcpy(ctx->code, buff, len); - - lua_pushvalue(L, 2); - ctx->after_work_cb = luaL_ref(L, LUA_REGISTRYINDEX); - if (lua_gettop(L) == 4) { - lua_pushvalue(L, 3); - ctx->async_cb = luaL_ref(L, LUA_REGISTRYINDEX); - uv_async_init(luv_loop(L), &ctx->async, async_cb); - } else - ctx->async_cb = LUA_REFNIL; - ctx->L = L; - luaL_getmetatable(L, "luv_work_ctx"); - lua_setmetatable(L, -2); - return 1; -} - -static int luv_queue_work(lua_State* L) { - int top = lua_gettop(L); - luv_work_ctx_t* ctx = luv_check_work_ctx(L, 1); - luv_work_t* work = malloc(sizeof(*work)); - int ret; - - luv_thread_arg_set(L, &work->arg, 2, top, 0); - work->ctx = ctx; - work->work.data = work; - ret = uv_queue_work(luv_loop(L), &work->work, luv_work_cb, luv_after_work_cb); - if (ret < 0) { - free(work); - return luv_error(L, ret); - } - - //ref up to ctx - lua_pushlightuserdata(L, work); - lua_pushvalue(L, 1); - lua_rawset(L, LUA_REGISTRYINDEX); - - lua_pushboolean(L, 1); - return 1; -} - -static const luaL_Reg luv_work_ctx_methods[] = { - {"queue", luv_queue_work}, - {NULL, NULL} -}; - -static int key_inited = 0; -static void luv_work_init(lua_State* L) { - luaL_newmetatable(L, "luv_work_ctx"); - lua_pushcfunction(L, luv_work_ctx_tostring); - lua_setfield(L, -2, "__tostring"); - lua_pushcfunction(L, luv_work_ctx_gc); - lua_setfield(L, -2, "__gc"); - lua_newtable(L); - luaL_setfuncs(L, luv_work_ctx_methods, 0); - lua_setfield(L, -2, "__index"); - lua_pop(L, 1); - - if (key_inited==0) { - key_inited = 1; - uv_key_create(&L_key); - } -} diff --git a/3rdparty/luv/tests/manual-test-cluster.lua b/3rdparty/luv/tests/manual-test-cluster.lua deleted file mode 100644 index 304e4be634d..00000000000 --- a/3rdparty/luv/tests/manual-test-cluster.lua +++ /dev/null @@ -1,213 +0,0 @@ --- This is quite the involved test. Basically it binds --- to a tcp port, spawns n children (one per CPU core) --- who all listen on the same shared port and act as a --- load balancing cluster. --- Then N clients are spawned that connect to the cluster --- The application itself kills the worker upon connection --- All N workers should accept exactly one request and all close. - -return require('lib/tap')(function (test) - - -- This function will be run in a child process - local worker_code = string.dump(function () - local dump = require('lib/utils').dump - - local function print(...) - local n = select('#', ...) - local arguments = {...} - for i = 1, n do - arguments[i] = tostring(arguments[i]) - end - - local text = table.concat(arguments, "\t") - text = " " .. string.gsub(text, "\n", "\n ") - _G.print(text) - end - - local function p(...) - local n = select('#', ...) - local arguments = { ... } - - for i = 1, n do - arguments[i] = dump(arguments[i]) - end - - print(table.concat(arguments, "\t")) - end - - local uv = require('luv') - local answer = -1 - - -- The parent is going to pass us the server handle over a pipe - -- This will be our local file descriptor at PIPE_FD - local pipe = uv.new_pipe(true) - local pipe_fd = tonumber(os.getenv("PIPE_FD")) - assert(uv.pipe_open(pipe, pipe_fd)) - - -- Configure the server handle - local server = uv.new_tcp() - local done = false - local function onconnection() - print("NOT ACCEPTING, already done") - if done then return end - local client = uv.new_tcp() - assert(uv.accept(server, client)) - p("New TCP", client, "on", server) - p{client=client} - assert(uv.write(client, "BYE!\n")); - assert(uv.shutdown(client, function () - uv.close(client) - uv.unref(server) - done = true - answer = 42 - end)) - end - - -- Read the server handle from the parent - local function onread(err, data) - p("onread", {err=err,data=data}) - assert(not err, err) - if uv.pipe_pending_count(pipe) > 0 then - local pending_type = uv.pipe_pending_type(pipe) - p("pending_type", pending_type) - assert(pending_type == "tcp") - assert(uv.accept(pipe, server)) - assert(uv.listen(server, 0, onconnection)) - p("Received server handle from parent process", server) - elseif data then - p("ondata", data) - else - p("onend", data) - end - end - uv.read_start(pipe, onread) - - -- Start the event loop! - uv.run() - - os.exit(answer) - end) - - local client_code = string.dump(function () - local dump = require('lib/utils').dump - - local function print(...) - local n = select('#', ...) - local arguments = {...} - for i = 1, n do - arguments[i] = tostring(arguments[i]) - end - - local text = table.concat(arguments, "\t") - text = " " .. string.gsub(text, "\n", "\n ") - _G.print(text) - end - - local function p(...) - local n = select('#', ...) - local arguments = { ... } - - for i = 1, n do - arguments[i] = dump(arguments[i]) - end - - print(table.concat(arguments, "\t")) - end - - local uv = require('luv') - - local host = os.getenv("HOST") - local port = tonumber(os.getenv("PORT")) - - local socket = uv.new_tcp() - - assert(uv.tcp_connect(socket, host, port, function (err) - p("client connected", {err=err}) - assert(not err, err) - end)) - - -- Start the event loop! - uv.run() - end) - - test("tcp cluster", function (print, p, expect, uv) - - local exepath = assert(uv.exepath()) - local cpu_count = # assert(uv.cpu_info()) - local left = cpu_count - - local server = uv.new_tcp() - assert(uv.tcp_bind(server, "::1", 0)) - - local address = uv.tcp_getsockname(server) - p{server=server,address=address} - - print("Master process bound to TCP port " .. address.port .. " on " .. address.ip) - - local function spawnWorker() - local pipe = uv.new_pipe(true) - local input = uv.new_pipe(false) - local child, pid - child, pid = assert(uv.spawn(exepath, { - cwd = uv.cwd(), - stdio = {input,1,2,pipe}, - env= {"PIPE_FD=3"} - }, expect(function (status, signal) - p("Worker exited", {status=status,signal=signal}) - assert(status == 42, "worker should return 42") - assert(signal == 0) - left = left - 1 - uv.close(child) - uv.close(input) - uv.close(pipe) - if left == 0 then - p("All workers are now dead") - uv.close(server) - end - end))) - p("Spawned worker", pid, "and sending handle", server) - assert(uv.write(input, worker_code)) - assert(uv.write2(pipe, "123", server)) - assert(uv.shutdown(input)) - assert(uv.shutdown(pipe)) - end - - local function spawnClient() - local input = uv.new_pipe(false) - local child, pid - child, pid = assert(uv.spawn(exepath, { - stdio = {input,1,2}, - cwd = uv.cwd(), - env= { - "HOST=" .. address.ip, - "PORT=" .. address.port, - } - }, expect(function (status, signal) - p("Client exited", {status=status,signal=signal}) - assert(status == 0) - assert(signal == 0) - uv.close(child) - end, left))) - p("Spawned client", pid) - assert(uv.write(input, client_code)) - assert(uv.shutdown(input)) - uv.close(input) - end - - -- Spawn a child process for each CPU core - for _ = 1, cpu_count do - spawnWorker() - end - - -- Spawn the clients after a short delay - local timer = uv.new_timer() - uv.timer_start(timer, 1000, 0, expect(function () - for _ = 1, cpu_count do - spawnClient() - end - uv.close(timer) - end)) - - end) -end) - diff --git a/3rdparty/luv/tests/run.lua b/3rdparty/luv/tests/run.lua deleted file mode 100644 index ea94e9bd58b..00000000000 --- a/3rdparty/luv/tests/run.lua +++ /dev/null @@ -1,33 +0,0 @@ --- Run this from the parent directory as --- --- luajit tests/run.lua --- - -local tap = require("lib/tap") -local uv = require("luv") - -local isWindows -if jit and jit.os then - -- Luajit provides explicit platform detection - isWindows = jit.os == "Windows" -else - -- Normal lua will only have \ for path separator on windows. - isWindows = package.config:find("\\") and true or false -end -_G.isWindows = isWindows - -local req = uv.fs_scandir("tests") - -while true do - local name = uv.fs_scandir_next(req) - if not name then break end - local match = string.match(name, "^test%-(.*).lua$") - if match then - local path = "tests/test-" .. match - tap(match) - require(path) - end -end - --- run the tests! -tap(true) diff --git a/3rdparty/luv/tests/test-async.lua b/3rdparty/luv/tests/test-async.lua deleted file mode 100644 index 88527cdb88d..00000000000 --- a/3rdparty/luv/tests/test-async.lua +++ /dev/null @@ -1,32 +0,0 @@ -return require('lib/tap')(function (test) - - test("test pass async between threads", function(p, p, expect, uv) - local before = os.time() - local async - async = uv.new_async(expect(function (a,b,c) - p('in async notify callback') - p(a,b,c) - assert(a=='a') - assert(b==true) - assert(c==250) - uv.close(async) - end)) - local args = {500, 'string', nil, false, 5, "helloworld",async} - local unpack = unpack or table.unpack - uv.new_thread(function(num,s,null,bool,five,hw,asy) - local uv = require'luv' - assert(type(num) == "number") - assert(type(s) == "string") - assert(null == nil) - assert(bool == false) - assert(five == 5) - assert(hw == 'helloworld') - assert(type(asy)=='userdata') - assert(uv.async_send(asy,'a',true,250)==0) - uv.sleep(1000) - end, unpack(args)):join() - local elapsed = (os.time() - before) * 1000 - assert(elapsed >= 1000, "elapsed should be at least delay ") - end) - -end) diff --git a/3rdparty/luv/tests/test-conversions.lua b/3rdparty/luv/tests/test-conversions.lua deleted file mode 100644 index f14056ddfb5..00000000000 --- a/3rdparty/luv/tests/test-conversions.lua +++ /dev/null @@ -1,6 +0,0 @@ -return require('lib/tap')(function (test) - test("basic 64bit conversions", function (print, p, expect, uv) - assert(string.format("%x", 29913653248) == "6f6fe2000") - assert(string.format("%x", 32207650816) == "77fb9c000") - end) -end) diff --git a/3rdparty/luv/tests/test-dns.lua b/3rdparty/luv/tests/test-dns.lua deleted file mode 100644 index c24adba7164..00000000000 --- a/3rdparty/luv/tests/test-dns.lua +++ /dev/null @@ -1,125 +0,0 @@ -return require('lib/tap')(function (test) - - test("Get all local http addresses", function (print, p, expect, uv) - assert(uv.getaddrinfo(nil, "http", nil, expect(function (err, res) - p(res, #res) - assert(not err, err) - assert(res[1].port == 80) - end))) - end) - - test("Get all local http addresses sync", function (print, p, expect, uv) - local res = assert(uv.getaddrinfo(nil, "http")) - p(res, #res) - assert(res[1].port == 80) - end) - - test("Get only ipv4 tcp adresses for luvit.io", function (print, p, expect, uv) - assert(uv.getaddrinfo("luvit.io", nil, { - socktype = "stream", - family = "inet", - }, expect(function (err, res) - assert(not err, err) - p(res, #res) - assert(#res == 1) - end))) - end) - - -- FIXME: this test always fails on AppVeyor for some reason - if _G.isWindows and not os.getenv'APPVEYOR' then - test("Get only ipv6 tcp adresses for luvit.io", function (print, p, expect, uv) - assert(uv.getaddrinfo("luvit.io", nil, { - socktype = "stream", - family = "inet6", - }, expect(function (err, res) - assert(not err, err) - p(res, #res) - assert(#res == 1) - end))) - end) - end - - test("Get ipv4 and ipv6 tcp adresses for luvit.io", function (print, p, expect, uv) - assert(uv.getaddrinfo("luvit.io", nil, { - socktype = "stream", - }, expect(function (err, res) - assert(not err, err) - p(res, #res) - assert(#res > 0) - end))) - end) - - test("Get all adresses for luvit.io", function (print, p, expect, uv) - assert(uv.getaddrinfo("luvit.io", nil, nil, expect(function (err, res) - assert(not err, err) - p(res, #res) - assert(#res > 0) - end))) - end) - - test("Lookup local ipv4 address", function (print, p, expect, uv) - assert(uv.getnameinfo({ - family = "inet", - }, expect(function (err, hostname, service) - p{err=err,hostname=hostname,service=service} - assert(not err, err) - assert(hostname) - assert(service) - end))) - end) - - test("Lookup local ipv4 address sync", function (print, p, expect, uv) - local hostname, service = assert(uv.getnameinfo({ - family = "inet", - })) - p{hostname=hostname,service=service} - assert(hostname) - assert(service) - end) - - test("Lookup local 127.0.0.1 ipv4 address", function (print, p, expect, uv) - assert(uv.getnameinfo({ - ip = "127.0.0.1", - }, expect(function (err, hostname, service) - p{err=err,hostname=hostname,service=service} - assert(not err, err) - assert(hostname) - assert(service) - end))) - end) - - test("Lookup local ipv6 address", function (print, p, expect, uv) - assert(uv.getnameinfo({ - family = "inet6", - }, expect(function (err, hostname, service) - p{err=err,hostname=hostname,service=service} - assert(not err, err) - assert(hostname) - assert(service) - end))) - end) - - test("Lookup local ::1 ipv6 address", function (print, p, expect, uv) - assert(uv.getnameinfo({ - ip = "::1", - }, expect(function (err, hostname, service) - p{err=err,hostname=hostname,service=service} - assert(not err, err) - assert(hostname) - assert(service) - end))) - end) - - test("Lookup local port 80 service", function (print, p, expect, uv) - assert(uv.getnameinfo({ - port = 80, - family = "inet6", - }, expect(function (err, hostname, service) - p{err=err,hostname=hostname,service=service} - assert(not err, err) - assert(hostname) - assert(service == "http") - end))) - end) - -end) diff --git a/3rdparty/luv/tests/test-fs.lua b/3rdparty/luv/tests/test-fs.lua deleted file mode 100644 index 4bfd67e6578..00000000000 --- a/3rdparty/luv/tests/test-fs.lua +++ /dev/null @@ -1,90 +0,0 @@ -return require('lib/tap')(function (test) - - test("read a file sync", function (print, p, expect, uv) - local fd = assert(uv.fs_open('README.md', 'r', tonumber('644', 8))) - p{fd=fd} - local stat = assert(uv.fs_fstat(fd)) - p{stat=stat} - local chunk = assert(uv.fs_read(fd, stat.size, 0)) - assert(#chunk == stat.size) - assert(uv.fs_close(fd)) - end) - - test("read a file async", function (print, p, expect, uv) - uv.fs_open('README.md', 'r', tonumber('644', 8), expect(function (err, fd) - assert(not err, err) - p{fd=fd} - uv.fs_fstat(fd, expect(function (err, stat) - assert(not err, err) - p{stat=stat} - uv.fs_read(fd, stat.size, 0, expect(function (err, chunk) - assert(not err, err) - p{chunk=#chunk} - assert(#chunk == stat.size) - uv.fs_close(fd, expect(function (err) - assert(not err, err) - end)) - end)) - end)) - end)) - end) - - test("fs.write", function (print, p, expect, uv) - local path = "_test_" - local fd = assert(uv.fs_open(path, "w", 438)) - uv.fs_write(fd, "Hello World\n", -1) - uv.fs_write(fd, {"with\n", "more\n", "lines\n"}, -1) - uv.fs_close(fd) - uv.fs_unlink(path) - end) - - test("fs.stat sync", function (print, p, expect, uv) - local stat = assert(uv.fs_stat("README.md")) - assert(stat.size) - end) - - test("fs.stat async", function (print, p, expect, uv) - assert(uv.fs_stat("README.md", expect(function (err, stat) - assert(not err, err) - assert(stat.size) - end))) - end) - - test("fs.stat sync error", function (print, p, expect, uv) - local stat, err, code = uv.fs_stat("BAD_FILE!") - p{err=err,code=code,stat=stat} - assert(not stat) - assert(err) - assert(code == "ENOENT") - end) - - test("fs.stat async error", function (print, p, expect, uv) - assert(uv.fs_stat("BAD_FILE@", expect(function (err, stat) - p{err=err,stat=stat} - assert(err) - assert(not stat) - end))) - end) - - test("fs.scandir", function (print, p, expect, uv) - local req = uv.fs_scandir('.') - local function iter() - return uv.fs_scandir_next(req) - end - for name, ftype in iter do - p{name=name, ftype=ftype} - assert(name) - -- ftype is not available in all filesystems; for example it's - -- provided for HFS+ (OSX), NTFS (Windows) but not for ext4 (Linux). - end - end) - - test("fs.realpath", function (print, p, expect, uv) - p(assert(uv.fs_realpath('.'))) - assert(uv.fs_realpath('.', expect(function (err, path) - assert(not err, err) - p(path) - end))) - end) - -end) diff --git a/3rdparty/luv/tests/test-leaks.lua b/3rdparty/luv/tests/test-leaks.lua deleted file mode 100644 index 06c6e49a0cf..00000000000 --- a/3rdparty/luv/tests/test-leaks.lua +++ /dev/null @@ -1,186 +0,0 @@ -return require('lib/tap')(function (test) - - local function bench(uv, p, count, fn) - collectgarbage() - local before - local notify = count / 8 - for i = 1, count do - fn() - if i % notify == 0 then - uv.run() - collectgarbage() - local now = uv.resident_set_memory() - if not before then before = now end - p(i, now) - end - end - uv.run() - collectgarbage() - local after = uv.resident_set_memory() - p{ - before = before, - after = after, - } - assert(after < before * 1.5) - end - - test("fs-write", function (print, p, expect, uv) - bench(uv, p, 0x7000, function () - local path = "_test_" - local fd = assert(uv.fs_open(path, "w", 438)) - uv.fs_write(fd, "Hello World\n", -1) - uv.fs_write(fd, {"with\n", "more\n", "lines\n"}, -1) - uv.fs_close(fd) - uv.fs_unlink(path) - end) - end) - - test("lots-o-timers", function (print, p, expect, uv) - bench(uv, p, 0x10000, function () - local timer = uv.new_timer() - uv.close(timer) - end) - end) - - test("lots-o-timers with canceled callbacks", function (print, p, expect, uv) - bench(uv, p, 0x10000, function () - local timer = uv.new_timer() - uv.timer_start(timer, 100, 100, function () - end) - uv.timer_stop(timer) - uv.close(timer, function () - end) - uv.run() - end) - end) - - test("lots-o-timers with real timeouts", function (print, p, expect, uv) - bench(uv, p, 0x500, function () - local timer = uv.new_timer() - uv.timer_start(timer, 10, 0, expect(function () - uv.timer_stop(timer) - uv.close(timer, function () - end) - end)) - end) - end) - - test("reading file async", function (print, p, expect, uv) - local mode = tonumber("644", 8) - bench(uv, p, 0x500, function () - local onOpen, onStat, onRead, onClose - local fd, stat - - onOpen = expect(function (err, result) - assert(not err, err) - fd = result - uv.fs_fstat(fd, onStat) - end) - - onStat = expect(function (err, result) - assert(not err, err) - stat = result - uv.fs_read(fd, stat.size, 0, onRead) - end) - - onRead = expect(function (err, data) - assert(not err, err) - assert(#data == stat.size) - uv.fs_close(fd, onClose) - end) - - onClose = expect(function (err) - assert(not err, err) - end) - - assert(uv.fs_open("README.md", "r", mode, onOpen)) - end) - end) - - test("reading file sync", function (print, p, expect, uv) - local mode = tonumber("644", 8) - bench(uv, p, 0x2000, function () - local fd = assert(uv.fs_open("README.md", "r", mode)) - local stat = assert(uv.fs_fstat(fd)) - local data = assert(uv.fs_read(fd, stat.size, 0)) - assert(#data == stat.size) - assert(uv.fs_close(fd)) - end) - end) - - test("invalid file", function (print, p, expect, uv) - local mode = tonumber("644", 8) - bench(uv, p, 0x1500, function () - local req = uv.fs_open("BAD_FILE", "r", mode, expect(function (err, fd) - assert(not fd) - assert(err) - end)) - end) - end) - - test("invalid file sync", function (print, p, expect, uv) - local mode = tonumber("644", 8) - bench(uv, p, 0x20000, function () - local fd, err = uv.fs_open("BAD_FILE", "r", mode) - assert(not fd) - assert(err) - end) - end) - - test("invalid spawn args", function (print, p, expect, uv) - -- Regression test for #73 - bench(uv, p, 0x10000, function () - local ret, err = pcall(function () - return uv.spawn("ls", { - args = {"-l", "-h"}, - stdio = {0, 1, 2}, - env = {"EXTRA=true"}, - gid = false, -- Should be integer - }) - end) - assert(not ret) - assert(err) - end) - end) - - test("stream writing with string and array", function (print, p, expect, uv) - local port = 0 - local server = uv.new_tcp() - local data - local count = 0x800 - server:unref() - server:bind("127.0.0.1", port) - server:listen(128, expect(function (err) - assert(not err, err) - local client = uv.new_tcp() - server:accept(client) - client:write(data) - client:read_start(expect(function (err, data) - assert(not err, err) - assert(data) - client:close() - end)) - end, count)) - local address = server:getsockname() - bench(uv, p, count, function () - data = string.rep("Hello", 500) - local socket = uv.new_tcp() - socket:connect(address.ip, address.port, expect(function (err) - assert(not err, err) - socket:read_start(expect(function (err, chunk) - assert(not err, err) - assert(chunk) - local data = {} - for i = 0, 100 do - data[i + 1] = string.rep(string.char(i), 100) - end - socket:write(data) - socket:close() - end)) - end)) - uv.run() - end) - server:close() - end) - -end) diff --git a/3rdparty/luv/tests/test-misc.lua b/3rdparty/luv/tests/test-misc.lua deleted file mode 100644 index 72a7b30785e..00000000000 --- a/3rdparty/luv/tests/test-misc.lua +++ /dev/null @@ -1,85 +0,0 @@ -return require('lib/tap')(function (test) - - test("uv.guess_handle", function (print, p, expect, uv) - local types = { - [0] = assert(uv.guess_handle(0)), - assert(uv.guess_handle(1)), - assert(uv.guess_handle(2)), - } - p("stdio fd types", types) - end) - - test("uv.version and uv.version_string", function (print, p, expect, uv) - local version = assert(uv.version()) - local version_string = assert(uv.version_string()) - p{version=version, version_string=version_string} - assert(type(version) == "number") - assert(type(version_string) == "string") - end) - - test("memory size", function (print, p, expect, uv) - local rss = uv.resident_set_memory() - local total = uv.get_total_memory() - local free = uv.get_free_memory() - p{rss=rss,total=total,free=free} - assert(rss < total) - end) - - test("uv.uptime", function (print, p, expect, uv) - local uptime = assert(uv.uptime()) - p{uptime=uptime} - end) - - test("uv.getrusage", function (print, p, expect, uv) - local rusage = assert(uv.getrusage()) - p(rusage) - end) - - test("uv.cpu_info", function (print, p, expect, uv) - local info = assert(uv.cpu_info()) - p(info) - end) - - test("uv.interface_addresses", function (print, p, expect, uv) - local addresses = assert(uv.interface_addresses()) - for name, info in pairs(addresses) do - p(name, addresses[name]) - end - end) - - test("uv.loadavg", function (print, p, expect, uv) - local avg = {assert(uv.loadavg())} - p(avg) - assert(#avg == 3) - end) - - test("uv.exepath", function (print, p, expect, uv) - local path = assert(uv.exepath()) - p(path) - end) - - test("uv.os_homedir", function (print, p, expect, uv) - local path = assert(uv.os_homedir()) - p(path) - end) - - test("uv.cwd and uv.chdir", function (print, p, expect, uv) - local old = assert(uv.cwd()) - p(old) - assert(uv.chdir("/")) - local cwd = assert(uv.cwd()) - p(cwd) - assert(cwd ~= old) - assert(uv.chdir(old)) - end) - - test("uv.hrtime", function (print, p, expect, uv) - local time = assert(uv.hrtime()) - p(time) - end) - - test("test_getpid", function (print, p, expect, uv) - assert(uv.getpid()) - end) - -end) diff --git a/3rdparty/luv/tests/test-prepare-check-idle-async.lua b/3rdparty/luv/tests/test-prepare-check-idle-async.lua deleted file mode 100644 index 389c2633efb..00000000000 --- a/3rdparty/luv/tests/test-prepare-check-idle-async.lua +++ /dev/null @@ -1,49 +0,0 @@ -return require('lib/tap')(function (test) - - test("simple prepare", function (print, p, expect, uv) - local prepare = uv.new_prepare() - uv.prepare_start(prepare, expect(function () - p("prepare", prepare) - uv.prepare_stop(prepare) - uv.close(prepare, expect(function () - end)) - end)) - end) - - test("simple check", function (print, p, expect, uv) - local check = uv.new_check() - uv.check_start(check, expect(function () - p("check", check) - uv.check_stop(check) - uv.close(check, expect(function () - end)) - end)) - - -- Trigger with a timer - local timer = uv.new_timer() - uv.timer_start(timer, 10, 0, expect(function() - p("timeout", timer) - uv.timer_stop(timer) - uv.close(timer) - end)) - end) - - test("simple idle", function (print, p, expect, uv) - local idle = uv.new_idle() - uv.idle_start(idle, expect(function () - p("idle", idle) - uv.idle_stop(idle) - uv.close(idle, expect(function () - end)) - end)) - end) - - test("simple async", function (print, p, expect, uv) - local async - async = uv.new_async(expect(function () - uv.close(async) - end)) - uv.async_send(async) - end) - -end) diff --git a/3rdparty/luv/tests/test-process.lua b/3rdparty/luv/tests/test-process.lua deleted file mode 100644 index 4d2b6fbfdab..00000000000 --- a/3rdparty/luv/tests/test-process.lua +++ /dev/null @@ -1,101 +0,0 @@ -return require('lib/tap')(function (test) - - test("test disable_stdio_inheritance", function (print, p, expect, uv) - uv.disable_stdio_inheritance() - end) - - test("process stdout", function (print, p, expect, uv) - local stdout = uv.new_pipe(false) - - local handle, pid - handle, pid = uv.spawn(uv.exepath(), { - args = {"-e", "print 'Hello World'"}, - stdio = {nil, stdout}, - }, expect(function (code, signal) - p("exit", {code=code, signal=signal}) - uv.close(handle) - end)) - - p{ - handle=handle, - pid=pid - } - - uv.read_start(stdout, expect(function (err, chunk) - p("stdout", {err=err,chunk=chunk}) - assert(not err, err) - uv.close(stdout) - end)) - - end) - - if _G.isWindows then return end - - test("spawn and kill by pid", function (print, p, expect, uv) - local handle, pid - handle, pid = uv.spawn("sleep", { - args = {1}, - }, expect(function (status, signal) - p("exit", handle, {status=status,signal=signal}) - assert(status == 0) - assert(signal == 2) - uv.close(handle) - end)) - p{handle=handle,pid=pid} - uv.kill(pid, "sigint") - end) - - test("spawn and kill by handle", function (print, p, expect, uv) - local handle, pid - handle, pid = uv.spawn("sleep", { - args = {1}, - }, expect(function (status, signal) - p("exit", handle, {status=status,signal=signal}) - assert(status == 0) - assert(signal == 15) - uv.close(handle) - end)) - p{handle=handle,pid=pid} - uv.process_kill(handle, "sigterm") - end) - - test("invalid command", function (print, p, expect, uv) - local handle, err - handle, err = uv.spawn("ksjdfksjdflkjsflksdf", {}, function(exit, code) - assert(false) - end) - assert(handle == nil) - assert(err) - end) - - test("process stdio", function (print, p, expect, uv) - local stdin = uv.new_pipe(false) - local stdout = uv.new_pipe(false) - - local handle, pid - handle, pid = uv.spawn("cat", { - stdio = {stdin, stdout}, - }, expect(function (code, signal) - p("exit", {code=code, signal=signal}) - uv.close(handle) - end)) - - p{ - handle=handle, - pid=pid - } - - uv.read_start(stdout, expect(function (err, chunk) - p("stdout", {err=err,chunk=chunk}) - assert(not err, err) - uv.close(stdout) - end)) - - uv.write(stdin, "Hello World") - uv.shutdown(stdin, expect(function () - uv.close(stdin) - end)) - - end) - -end) diff --git a/3rdparty/luv/tests/test-sigchld-after-lua_close.sh b/3rdparty/luv/tests/test-sigchld-after-lua_close.sh deleted file mode 100644 index e7d22d3df36..00000000000 --- a/3rdparty/luv/tests/test-sigchld-after-lua_close.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# Verifies that luv will cleanup libuv process handles correctly even if -# not done by "userspace". -# Details: https://github.com/luvit/luv/issues/193 - -# This test modifies one of the examples to skip libuv process cleanup, -# purposely making it leave SIGCHLD signal handler. -# -patch -p1 << "EOF" -diff --git a/examples/talking-to-children.lua b/examples/talking-to-children.lua -index 10a53ef..6c6c53f 100644 ---- a/examples/talking-to-children.lua -+++ b/examples/talking-to-children.lua -@@ -41,7 +41,3 @@ uv.read_start(stdout, onread) - uv.read_start(stderr, onread) - uv.write(stdin, "Hello World") - uv.shutdown(stdin, onshutdown) -- --uv.run() --uv.walk(uv.close) --uv.run() -EOF - -# It also requires a patched lua standalone interpreter that sends SIGCHLD to -# itself after calling lua_close, which would have freed all memory of the libuv -# event loop associated with the lua state. -( -cd deps/lua -patch -p1 << "EOF" -diff --git a/src/lua.c b/src/lua.c -index 7a47582..4dc19d5 100644 ---- a/src/lua.c -+++ b/src/lua.c -@@ -608,6 +608,7 @@ int main (int argc, char **argv) { - result = lua_toboolean(L, -1); /* get result */ - report(L, status); - lua_close(L); -+ kill(0, SIGCHLD); - return (result && status == LUA_OK) ? EXIT_SUCCESS : EXIT_FAILURE; - } -EOF -) - -WITH_LUA_ENGINE=Lua make -./build/lua examples/talking-to-children.lua diff --git a/3rdparty/luv/tests/test-signal.lua b/3rdparty/luv/tests/test-signal.lua deleted file mode 100644 index c05db77c888..00000000000 --- a/3rdparty/luv/tests/test-signal.lua +++ /dev/null @@ -1,40 +0,0 @@ -local child_code = string.dump(function () - local uv = require('luv') - local signal = uv.new_signal() - uv.ref(signal) - uv.signal_start(signal, "sigint", function () - uv.unref(signal) - end) - uv.run() - os.exit(7) -end) - -return require('lib/tap')(function (test) - - if _G.isWindows then return end - - test("Catch SIGINT", function (print, p, expect, uv) - local child, pid - local input = uv.new_pipe(false) - child, pid = assert(uv.spawn(uv.exepath(), { - args = {"-"}, - -- cwd = uv.cwd(), - stdio = {input,1,2} - }, expect(function (code, signal) - p("exit", {pid=pid,code=code,signal=signal}) - assert(code == 7) - assert(signal == 0) - uv.close(input) - uv.close(child) - end))) - uv.write(input, child_code) - uv.shutdown(input) - local timer = uv.new_timer() - uv.timer_start(timer, 200, 0, expect(function () - print("Sending child SIGINT") - uv.process_kill(child, "sigint") - uv.close(timer) - end)) - end) - -end) diff --git a/3rdparty/luv/tests/test-tcp.lua b/3rdparty/luv/tests/test-tcp.lua deleted file mode 100644 index 885d381ebce..00000000000 --- a/3rdparty/luv/tests/test-tcp.lua +++ /dev/null @@ -1,114 +0,0 @@ -return require('lib/tap')(function (test) - test("basic tcp server and client", function (print, p, expect, uv) - local server = uv.new_tcp() - uv.tcp_bind(server, "::", 0) - uv.listen(server, 128, expect(function (err) - p("server on connection", server) - assert(not err, err) - uv.close(server) - end)) - - local address = uv.tcp_getsockname(server) - p{server=server,address=address} - - local client = uv.new_tcp() - local req = uv.tcp_connect(client, "::1", address.port, expect(function (err) - p("client on connect", client, err) - assert(not err, err) - uv.shutdown(client, expect(function (err) - p("client on shutdown", client, err) - assert(not err, err) - uv.close(client, expect(function () - p("client on close", client) - end)) - end)) - end)) - p{client=client,req=req} - end) - - test("tcp echo server and client", function (print, p, expect, uv) - local server = uv.new_tcp() - assert(uv.tcp_bind(server, "127.0.0.1", 0)) - assert(uv.listen(server, 1, expect(function () - local client = uv.new_tcp() - assert(uv.accept(server, client)) - assert(uv.read_start(client, expect(function (err, data) - p("server read", {err=err,data=data}) - assert(not err, err) - if data then - assert(uv.write(client, data)) - else - assert(uv.read_stop(client)) - uv.close(client) - uv.close(server) - end - end, 2))) - end))) - - local address = uv.tcp_getsockname(server) - p{server=server,address=address} - - local socket = assert(uv.new_tcp()) - assert(uv.tcp_connect(socket, "127.0.0.1", address.port, expect(function () - assert(uv.read_start(socket, expect(function (err, data) - p("client read", {err=err,data=data}) - assert(not err, err) - assert(uv.read_stop(socket)) - uv.close(socket) - end))) - local req = assert(uv.write(socket, "Hello", function (err) - p("client onwrite", socket, err) - assert(not err, err) - end)) - p{socket=socket,req=req} - end))) - end) - - test("tcp echo server and client with methods", function (print, p, expect, uv) - local server = uv.new_tcp() - assert(server:bind("127.0.0.1", 0)) - assert(server:listen(1, expect(function () - local client = uv.new_tcp() - assert(server:accept(client)) - assert(client:read_start(expect(function (err, data) - p("server read", {err=err,data=data}) - assert(not err, err) - if data then - assert(client:write(data)) - else - assert(client:read_stop()) - client:close() - server:close() - end - end, 2))) - end))) - - local address = server:getsockname() - p{server=server,address=address} - - local socket = assert(uv.new_tcp()) - assert(socket:connect("127.0.0.1", address.port, expect(function () - assert(socket:read_start(expect(function (err, data) - p("client read", {err=err,data=data}) - assert(not err, err) - assert(socket:read_stop()) - socket:close() - end))) - local req = assert(socket:write("Hello", function (err) - p("client onwrite", socket, err) - assert(not err, err) - end)) - p{socket=socket,req=req} - end))) - end) - - test("tcp invalid ip address", function (print, p, expect, uv) - local ip = '127.0.0.100005' - local server = uv.new_tcp() - local status, err = pcall(function() uv.tcp_bind(server, ip, 1000) end) - assert(not status) - p(err) - assert(err:find(ip)) - uv.close(server) - end) -end) diff --git a/3rdparty/luv/tests/test-thread.lua b/3rdparty/luv/tests/test-thread.lua deleted file mode 100644 index 838b51e4fff..00000000000 --- a/3rdparty/luv/tests/test-thread.lua +++ /dev/null @@ -1,47 +0,0 @@ -return require('lib/tap')(function (test) - - test("test thread create", function(print, p, expect, uv) - local delay = 1000 - local before = os.time() - local thread = uv.new_thread(function(delay) - require('luv').sleep(delay) - end,delay) - uv.thread_join(thread) - local elapsed = (os.time() - before) * 1000 - p({ - delay = delay, - elapsed = elapsed - }) - assert(elapsed >= delay, "elapsed should be at least delay ") - end) - - test("test thread create with arguments", function(print, p, expect, uv) - local before = os.time() - local args = {500, 'string', nil, false, 5, "helloworld"} - local unpack = unpack or table.unpack - uv.new_thread(function(num,s,null,bool,five,hw) - assert(type(num) == "number") - assert(type(s) == "string") - assert(null == nil) - assert(bool == false) - assert(five == 5) - assert(hw == 'helloworld') - require('luv').sleep(1000) - end, unpack(args)):join() - local elapsed = (os.time() - before) * 1000 - assert(elapsed >= 1000, "elapsed should be at least delay ") - end) - - test("test thread sleep msecs in main thread", function(print, p, expect, uv) - local delay = 1000 - local before = os.time() - uv.sleep(delay) - local elapsed = (os.time() - before) * 1000 - p({ - delay = delay, - elapsed = elapsed - }) - assert(elapsed >= delay, "elapsed should be at least delay ") - end) - -end) diff --git a/3rdparty/luv/tests/test-timer.lua b/3rdparty/luv/tests/test-timer.lua deleted file mode 100644 index f9eb9d89c5f..00000000000 --- a/3rdparty/luv/tests/test-timer.lua +++ /dev/null @@ -1,87 +0,0 @@ -return require('lib/tap')(function (test) - - -- This tests using timers for a simple timeout. - -- It also tests the handle close callback and - test("simple timeout", function (print, p, expect, uv) - local timer = uv.new_timer() - local function onclose() - p("closed", timer) - end - local function ontimeout() - p("timeout", timer) - uv.close(timer, expect(onclose)) - end - uv.timer_start(timer, 10, 0, expect(ontimeout)) - end) - - -- This is like the previous test, but using repeat. - test("simple interval", function (print, p, expect, uv) - local timer = uv.new_timer() - local count = 3 - local onclose = expect(function () - p("closed", timer) - end) - local function oninterval() - p("interval", timer) - count = count - 1 - if count == 0 then - uv.close(timer, onclose) - end - end - uv.timer_start(timer, 10, 10, oninterval) - end) - - -- Test two concurrent timers - -- There is a small race condition, but there are 100ms of wiggle room. - -- 400ms is halfway between 100+200ms and 100+400ms - test("timeout with interval", function (print, p, expect, uv) - local a = uv.new_timer() - local b = uv.new_timer() - uv.timer_start(a, 400, 0, expect(function () - p("timeout", a) - uv.timer_stop(b) - uv.close(a) - uv.close(b) - end)) - uv.timer_start(b, 100, 200, expect(function () - p("interval", b) - end, 2)) - end) - - -- This advanced test uses the rest of the uv_timer_t functions - -- to create an interval that shrinks over time. - test("shrinking interval", function (print, p, expect, uv) - local timer = uv.new_timer() - uv.timer_start(timer, 10, 0, expect(function () - local r = uv.timer_get_repeat(timer) - p("interval", timer, r) - if r == 0 then - uv.timer_set_repeat(timer, 8) - uv.timer_again(timer) - elseif r == 2 then - uv.timer_stop(timer) - uv.close(timer) - else - uv.timer_set_repeat(timer, r / 2) - end - end, 4)) - end) - - test("shrinking interval using methods", function (print, p, expect, uv) - local timer = uv.new_timer() - timer:start(10, 0, expect(function () - local r = timer:get_repeat() - p("interval", timer, r) - if r == 0 then - timer:set_repeat(8) - timer:again() - elseif r == 2 then - timer:stop() - timer:close() - else - timer:set_repeat(r / 2) - end - end, 4)) - end) - -end) diff --git a/3rdparty/luv/tests/test-work.lua b/3rdparty/luv/tests/test-work.lua deleted file mode 100644 index 3a98b15e6bc..00000000000 --- a/3rdparty/luv/tests/test-work.lua +++ /dev/null @@ -1,48 +0,0 @@ -return require('lib/tap')(function (test) - test("test threadpool", function(print,p,expect,_uv) - p('Please be patient, the test cost a lots of time') - local count = 1000 --for memleaks dected - local step = 0 - local ctx - ctx = _uv.new_work( - function(n,s) --work,in threadpool - local uv = require('luv') - local t = uv.thread_self() - uv.sleep(100) - return n,n*n, tostring(uv.thread_self()),s - end, - function(n,r,id, s) - assert(n*n==r) - if step < count then - _uv.queue_work(ctx,n,s) - step = step + 1 - if (step % 100==0) then - p(string.format('run %d%%', math.floor(step*100/count))) - end - end - end --after work, in loop thread - ) - local ls = string.rep('-',4096) - - _uv.queue_work(ctx,2,ls) - _uv.queue_work(ctx,4,ls) - _uv.queue_work(ctx,6,ls) - _uv.queue_work(ctx,-2,ls) - _uv.queue_work(ctx,-11,ls) - _uv.queue_work(ctx,2,ls) - _uv.queue_work(ctx,4,ls) - _uv.queue_work(ctx,6,ls) - _uv.queue_work(ctx,-2,ls) - _uv.queue_work(ctx,-11,ls) - _uv.queue_work(ctx,2,ls) - _uv.queue_work(ctx,4,ls) - _uv.queue_work(ctx,6,ls) - _uv.queue_work(ctx,-2,ls) - _uv.queue_work(ctx,-11,ls) - _uv.queue_work(ctx,2,ls) - _uv.queue_work(ctx,4,ls) - _uv.queue_work(ctx,6,ls) - _uv.queue_work(ctx,-2,ls) - _uv.queue_work(ctx,-11,ls) - end) -end) diff --git a/plugins/coro-channel/LICENSE b/plugins/coro-channel/LICENSE deleted file mode 100644 index 5789b767285..00000000000 --- a/plugins/coro-channel/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Tim Caswell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/plugins/coro-channel/README.md b/plugins/coro-channel/README.md deleted file mode 100644 index 3f5bb397c69..00000000000 --- a/plugins/coro-channel/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luv-coro-channel -A luv port of creationix/coro-channel from lit.luvit.io diff --git a/plugins/coro-channel/init.lua b/plugins/coro-channel/init.lua deleted file mode 100644 index 0b715a0d470..00000000000 --- a/plugins/coro-channel/init.lua +++ /dev/null @@ -1,128 +0,0 @@ -local exports = {} -exports.name = "creationix/coro-channel" -exports.version = "1.2.0" -exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-channel.lua" -exports.description = "An adapter for wrapping uv streams as coro-streams and chaining filters." -exports.tags = {"coro", "adapter"} -exports.license = "MIT" -exports.author = { name = "Tim Caswell" } - -local function wrapRead(socket) - local paused = true - local queue = {} - local waiting - local onRead - - function onRead(err, chunk) - local data = err and {nil, err} or {chunk} - if waiting then - local thread = waiting - waiting = nil - assert(coroutine.resume(thread, unpack(data))) - else - queue[#queue + 1] = data - if not paused then - paused = true - assert(socket:read_stop()) - end - end - end - - return function () - if #queue > 0 then - return unpack(table.remove(queue, 1)) - end - if paused then - paused = false - assert(socket:read_start(onRead)) - end - waiting = coroutine.running() - return coroutine.yield() - end - -end - -local function wrapWrite(socket) - - local function wait() - local thread = coroutine.running() - return function (err) - assert(coroutine.resume(thread, err)) - end - end - - local function shutdown() - socket:shutdown(wait()) - coroutine.yield() - if not socket:is_closing() then - socket:close() - end - end - - return function (chunk) - if chunk == nil then - return shutdown() - end - assert(socket:write(chunk, wait())) - local err = coroutine.yield() - return not err, err - end - -end - -exports.wrapRead = wrapRead -exports.wrapWrite = wrapWrite - --- Given a raw uv_stream_t userdata, return coro-friendly read/write functions. -function exports.wrapStream(socket) - return wrapRead(socket), wrapWrite(socket) -end - - -function exports.chain(...) - local args = {...} - local nargs = select("#", ...) - return function (read, write) - local threads = {} -- coroutine thread for each item - local waiting = {} -- flag when waiting to pull from upstream - local boxes = {} -- storage when waiting to write to downstream - for i = 1, nargs do - threads[i] = coroutine.create(args[i]) - waiting[i] = false - local r, w - if i == 1 then - r = read - else - function r() - local j = i - 1 - if boxes[j] then - local data = boxes[j] - boxes[j] = nil - assert(coroutine.resume(threads[j])) - return unpack(data) - else - waiting[i] = true - return coroutine.yield() - end - end - end - if i == nargs then - w = write - else - function w(...) - local j = i + 1 - if waiting[j] then - waiting[j] = false - assert(coroutine.resume(threads[j], ...)) - else - boxes[i] = {...} - coroutine.yield() - end - end - end - assert(coroutine.resume(threads[i], r, w)) - end - end -end - -return exports diff --git a/plugins/coro-channel/plugin.json b/plugins/coro-channel/plugin.json deleted file mode 100644 index 5a3f5af8813..00000000000 --- a/plugins/coro-channel/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "coro-channel", - "version": "1.2.0", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/plugins/coro-fs/LICENSE b/plugins/coro-fs/LICENSE deleted file mode 100644 index 5789b767285..00000000000 --- a/plugins/coro-fs/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Tim Caswell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/plugins/coro-fs/README.md b/plugins/coro-fs/README.md deleted file mode 100644 index 79ef57330a0..00000000000 --- a/plugins/coro-fs/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luv-coro-fs -A luv port of lit's coro-fs module diff --git a/plugins/coro-fs/init.lua b/plugins/coro-fs/init.lua deleted file mode 100644 index f4be5bff832..00000000000 --- a/plugins/coro-fs/init.lua +++ /dev/null @@ -1,222 +0,0 @@ -local exports = {} -exports.name = "creationix/coro-fs" -exports.version = "1.3.0" -exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-fs.lua" -exports.description = "A coro style interface to the filesystem." -exports.tags = {"coro", "fs"} -exports.license = "MIT" -exports.author = { name = "Tim Caswell" } - -local uv = require('luv') -local fs = exports -local pathJoin = require('path').join - -local function noop() end - -local function makeCallback() - local thread = coroutine.running() - return function (err, value, ...) - if err then - assert(coroutine.resume(thread, nil, err)) - else - assert(coroutine.resume(thread, value == nil and true or value, ...)) - end - end -end - -function fs.mkdir(path, mode) - uv.fs_mkdir(path, mode or 511, makeCallback()) - return coroutine.yield() -end -function fs.open(path, flags, mode) - uv.fs_open(path, flags or "r", mode or 438, makeCallback()) - return coroutine.yield() -end -function fs.unlink(path) - uv.fs_unlink(path, makeCallback()) - return coroutine.yield() -end -function fs.stat(path) - uv.fs_stat(path, makeCallback()) - return coroutine.yield() -end -function fs.lstat(path) - uv.fs_lstat(path, makeCallback()) - return coroutine.yield() -end -function fs.symlink(target, path) - uv.fs_symlink(target, path, makeCallback()) - return coroutine.yield() -end -function fs.readlink(path) - uv.fs_readlink(path, makeCallback()) - return coroutine.yield() -end -function fs.fstat(fd) - uv.fs_fstat(fd, makeCallback()) - return coroutine.yield() -end -function fs.chmod(fd, path) - uv.fs_chmod(fd, path, makeCallback()) - return coroutine.yield() -end -function fs.fchmod(fd, mode) - uv.fs_fchmod(fd, mode, makeCallback()) - return coroutine.yield() -end -function fs.read(fd, length, offset) - uv.fs_read(fd, length or 1024*48, offset or -1, makeCallback()) - return coroutine.yield() -end -function fs.write(fd, data, offset) - uv.fs_write(fd, data, offset or -1, makeCallback()) - return coroutine.yield() -end -function fs.close(fd) - uv.fs_close(fd, makeCallback()) - return coroutine.yield() -end -function fs.access(path, flags) - uv.fs_access(path, flags or "", makeCallback()) - return coroutine.yield() -end -function fs.rename(path, newPath) - uv.fs_rename(path, newPath, makeCallback()) - return coroutine.yield() -end -function fs.rmdir(path) - uv.fs_rmdir(path, makeCallback()) - return coroutine.yield() -end -function fs.rmrf(path) - local success, err - success, err = fs.rmdir(path) - if success then return success end - if err:match("^ENOTDIR:") then return fs.unlink(path) end - if not err:match("^ENOTEMPTY:") then return success, err end - for entry in assert(fs.scandir(path)) do - local subPath = pathJoin(path, entry.name) - if entry.type == "directory" then - success, err = fs.rmrf(pathJoin(path, entry.name)) - else - success, err = fs.unlink(subPath) - end - if not success then return success, err end - end - return fs.rmdir(path) -end -function fs.scandir(path) - uv.fs_scandir(path, makeCallback()) - local req, err = coroutine.yield() - if not req then return nil, err end - return function () - return uv.fs_scandir_next(req) - end -end - -function fs.readFile(path) - local fd, stat, data, err - fd, err = fs.open(path) - if err then return nil, err end - stat, err = fs.fstat(fd) - if stat then - data, err = fs.read(fd, stat.size) - end - uv.fs_close(fd, noop) - return data, err -end - -function fs.writeFile(path, data, mkdir) - local fd, success, err - fd, err = fs.open(path, "w") - if err then - if mkdir and string.match(err, "^ENOENT:") then - success, err = fs.mkdirp(pathJoin(path, "..")) - if success then return fs.writeFile(path, data) end - end - return nil, err - end - success, err = fs.write(fd, data) - uv.fs_close(fd, noop) - return success, err -end - -function fs.mkdirp(path, mode) - local success, err = fs.mkdir(path, mode) - if success or string.match(err, "^EEXIST") then - return true - end - if string.match(err, "^ENOENT:") then - success, err = fs.mkdirp(pathJoin(path, ".."), mode) - if not success then return nil, err end - return fs.mkdir(path, mode) - end - return nil, err -end - -function fs.chroot(base) - local chroot = { - base = base, - fstat = fs.fstat, - fchmod = fs.fchmod, - read = fs.read, - write = fs.write, - close = fs.close, - } - local function resolve(path) - assert(path, "path missing") - return pathJoin(base, pathJoin(path)) - end - function chroot.mkdir(path, mode) - return fs.mkdir(resolve(path), mode) - end - function chroot.mkdirp(path, mode) - return fs.mkdirp(resolve(path), mode) - end - function chroot.open(path, flags, mode) - return fs.open(resolve(path), flags, mode) - end - function chroot.unlink(path) - return fs.unlink(resolve(path)) - end - function chroot.stat(path) - return fs.stat(resolve(path)) - end - function chroot.lstat(path) - return fs.lstat(resolve(path)) - end - function chroot.symlink(target, path) - -- TODO: should we resolve absolute target paths or treat it as opaque data? - return fs.symlink(target, resolve(path)) - end - function chroot.readlink(path) - return fs.readlink(resolve(path)) - end - function chroot.chmod(path, mode) - return fs.chmod(resolve(path), mode) - end - function chroot.access(path, flags) - return fs.access(resolve(path), flags) - end - function chroot.rename(path, newPath) - return fs.rename(resolve(path), resolve(newPath)) - end - function chroot.rmdir(path) - return fs.rmdir(resolve(path)) - end - function chroot.rmrf(path) - return fs.rmrf(resolve(path)) - end - function chroot.scandir(path, iter) - return fs.scandir(resolve(path), iter) - end - function chroot.readFile(path) - return fs.readFile(resolve(path)) - end - function chroot.writeFile(path, data, mkdir) - return fs.writeFile(resolve(path), data, mkdir) - end - return chroot -end - -return exports diff --git a/plugins/coro-fs/plugin.json b/plugins/coro-fs/plugin.json deleted file mode 100644 index c35d9e27315..00000000000 --- a/plugins/coro-fs/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "coro-fs", - "version": "1.3.0", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/plugins/coro-http/LICENSE b/plugins/coro-http/LICENSE deleted file mode 100644 index 5789b767285..00000000000 --- a/plugins/coro-http/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Tim Caswell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/plugins/coro-http/README.md b/plugins/coro-http/README.md deleted file mode 100644 index 271b6698f5d..00000000000 --- a/plugins/coro-http/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luv-coro-http -A luv port of lit's coro-http library. diff --git a/plugins/coro-http/init.lua b/plugins/coro-http/init.lua deleted file mode 100644 index 49613403eaf..00000000000 --- a/plugins/coro-http/init.lua +++ /dev/null @@ -1,187 +0,0 @@ -local exports = {} -exports.name = "creationix/coro-http" -exports.version = "1.2.1-1" -exports.dependencies = { - "creationix/coro-net@1.1.1", - "creationix/coro-tls@1.2.1", - "creationix/coro-wrapper@1.0.0", - "luvit/http-codec@1.0.0" -} -exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-http.lua" -exports.description = "An coro style http(s) client and server helper." -exports.tags = {"coro", "http"} -exports.license = "MIT" -exports.author = { name = "Tim Caswell" } - -local httpCodec = require('http-codec') -local net = require('coro-net') -local connect = net.connect -local createServer = net.createServer ---local tlsWrap = require('coro-tls').wrap -local wrapper = require('coro-wrapper') - -function exports.createServer(options, onConnect) - createServer(options, function (rawRead, rawWrite, socket) - local read = wrapper.reader(rawRead, httpCodec.decoder()) - local write = wrapper.writer(rawWrite, httpCodec.encoder()) - for head in read do - local parts = {} - for part in read do - if #part > 0 then - parts[#parts + 1] = part - else - break - end - end - local body = table.concat(parts) - head, body = onConnect(head, body, socket) - write(head) - if body then write(body) end - write("") - if not head.keepAlive then break end - end - end) -end - -local function parseUrl(url) - local protocol, host, hostname, port, path = url:match("^(https?:)//(([^/:]+):?([0-9]*))(/?.*)$") - if not protocol then error("Not a valid http url: " .. url) end - local tls = protocol == "https:" - port = port and tonumber(port) or (tls and 443 or 80) - if path == "" then path = "/" end - return { - tls = tls, - host = host, - hostname = hostname, - port = port, - path = path - } -end -exports.parseUrl = parseUrl - -local connections = {} - -local function getConnection(host, port, tls) - for i = #connections, 1, -1 do - local connection = connections[i] - if connection.host == host and connection.port == port and connection.tls == tls then - table.remove(connections, i) - -- Make sure the connection is still alive before reusing it. - if not connection.socket:is_closing() then - connection.reused = true - connection.socket:ref() - return connection - end - end - end - local read, write, socket = assert(connect({host=host,port=port})) - --if tls then - --read, write = tlsWrap(read, write) - --end - local httpRead, updateRead = wrapper.reader(read, httpCodec.decoder()) - return { - socket = socket, - host = host, - port = port, - tls = tls, - read = httpRead, - write = wrapper.writer(write, httpCodec.encoder()), - reset = function () - -- This is called after parsing the response head from a HEAD request. - -- If you forget, the codec might hang waiting for a body that doesn't exist. - updateRead(httpCodec.decoder()) - end - } -end -exports.getConnection = getConnection - -local function saveConnection(connection) - if connection.socket:is_closing() then return end - connections[#connections + 1] = connection - connection.socket:unref() -end -exports.saveConnection = saveConnection - -function exports.request(method, url, headers, body) - local uri = parseUrl(url) - local connection = getConnection(uri.hostname, uri.port, uri.tls) - local read = connection.read - local write = connection.write - - local req = { - method = method, - path = uri.path, - {"Host", uri.host} - } - local contentLength - local chunked - if headers then - for i = 1, #headers do - local key, value = unpack(headers[i]) - key = key:lower() - if key == "content-length" then - contentLength = value - elseif key == "content-encoding" and value:lower() == "chunked" then - chunked = true - end - req[#req + 1] = headers[i] - end - end - - if type(body) == "string" then - if not chunked and not contentLength then - req[#req + 1] = {"Content-Length", #body} - end - end - - write(req) - if body then write(body) end - local res = read() - if not res then - write() - -- If we get an immediate close on a reused socket, try again with a new socket. - -- TODO: think about if this could resend requests with side effects and cause - -- them to double execute in the remote server. - if connection.reused then - return exports.request(method, url, headers, body) - end - error("Connection closed") - end - - body = {} - if req.method == "HEAD" then - connection.reset() - else - while true do - local item = read() - if not item then - res.keepAlive = false - break - end - if #item == 0 then - break - end - body[#body + 1] = item - end - end - - if res.keepAlive then - saveConnection(connection) - else - write() - end - - -- Follow redirects - if method == "GET" and (res.code == 302 or res.code == 307) then - for i = 1, #res do - local key, location = unpack(res[i]) - if key:lower() == "location" then - return exports.request(method, location, headers) - end - end - end - - return res, table.concat(body) -end - -return exports diff --git a/plugins/coro-http/plugin.json b/plugins/coro-http/plugin.json deleted file mode 100644 index 0c8047c9ebe..00000000000 --- a/plugins/coro-http/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "coro-http", - "version": "1.2.1-1", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/plugins/coro-net/LICENSE b/plugins/coro-net/LICENSE deleted file mode 100644 index 5789b767285..00000000000 --- a/plugins/coro-net/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Tim Caswell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/plugins/coro-net/README.md b/plugins/coro-net/README.md deleted file mode 100644 index c8a94b9980a..00000000000 --- a/plugins/coro-net/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luv-coro-net -A luv port of creationix/coro-net from lit.luvit.io diff --git a/plugins/coro-net/init.lua b/plugins/coro-net/init.lua deleted file mode 100644 index 3ae6c2ad824..00000000000 --- a/plugins/coro-net/init.lua +++ /dev/null @@ -1,113 +0,0 @@ -local exports = {} -exports.name = "creationix/coro-net" -exports.version = "1.1.1-1" -exports.dependencies = { - "creationix/coro-channel@1.2.0" -} -exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-net.lua" -exports.description = "An coro style client and server helper for tcp and pipes." -exports.tags = {"coro", "tcp", "pipe", "net"} -exports.license = "MIT" -exports.author = { name = "Tim Caswell" } - -local uv = require('luv') -local wrapStream = require('coro-channel').wrapStream - -local function makeCallback(timeout) - local thread = coroutine.running() - local timer, done - if timeout then - timer = uv.new_timer() - timer:start(timeout, 0, function () - if done then return end - done = true - timer:close() - return assert(coroutine.resume(thread, nil, "timeout")) - end) - end - return function (err, data) - if done then return end - done = true - if timer then timer:close() end - if err then - return assert(coroutine.resume(thread, nil, err)) - end - return assert(coroutine.resume(thread, data or true)) - end -end -exports.makeCallback = makeCallback - -local function normalize(options) - local t = type(options) - if t == "string" then - options = {path=options} - elseif t == "number" then - options = {port=options} - elseif t ~= "table" then - assert("Net options must be table, string, or number") - end - if options.port or options.host then - return true, - options.host or "127.0.0.1", - assert(options.port, "options.port is required for tcp connections") - elseif options.path then - return false, options.path - else - error("Must set either options.path or options.port") - end -end - -function exports.connect(options) - local socket, success, err - local isTcp, host, port = normalize(options) - if isTcp then - assert(uv.getaddrinfo(host, port, { - socktype = options.socktype or "stream", - family = options.family or "inet", - }, makeCallback(options.timeout))) - local res - res, err = coroutine.yield() - if not res then return nil, err end - socket = uv.new_tcp() - socket:connect(res[1].addr, res[1].port, makeCallback(options.timeout)) - else - socket = uv.new_pipe(false) - socket:connect(host, makeCallback(options.timeout)) - end - success, err = coroutine.yield() - if not success then return nil, err end - local read, write = wrapStream(socket) - return read, write, socket -end - -function exports.createServer(options, onConnect) - local server - local isTcp, host, port = normalize(options) - if isTcp then - server = uv.new_tcp() - assert(server:bind(host, port)) - else - server = uv.new_pipe(false) - assert(server:bind(host)) - end - assert(server:listen(256, function (err) - assert(not err, err) - local socket = isTcp and uv.new_tcp() or uv.new_pipe(false) - server:accept(socket) - coroutine.wrap(function () - local success, failure = xpcall(function () - local read, write = wrapStream(socket) - return onConnect(read, write, socket) - end, debug.traceback) - if not success then - print(failure) - end - if not socket:is_closing() then - socket:close() - end - end)() - end)) - return server -end - -return exports diff --git a/plugins/coro-net/plugin.json b/plugins/coro-net/plugin.json deleted file mode 100644 index cf839aad881..00000000000 --- a/plugins/coro-net/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "coro-net", - "version": "1.1.1-1", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/plugins/coro-tls/LICENSE b/plugins/coro-tls/LICENSE deleted file mode 100644 index 5789b767285..00000000000 --- a/plugins/coro-tls/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Tim Caswell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/plugins/coro-tls/README.md b/plugins/coro-tls/README.md deleted file mode 100644 index 50aae3f7657..00000000000 --- a/plugins/coro-tls/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luv-coro-tls -A luv port of lit's coro-tls module diff --git a/plugins/coro-tls/init.lua b/plugins/coro-tls/init.lua deleted file mode 100644 index 03d6e1c3f76..00000000000 --- a/plugins/coro-tls/init.lua +++ /dev/null @@ -1,122 +0,0 @@ -local exports = {} -exports.name = "creationix/coro-tls" -exports.version = "1.2.1" -exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-tls.lua" -exports.description = "A coro-stream wrapper implementing tls sessions." -exports.tags = {"coro", "tls", "ssl"} -exports.license = "MIT" -exports.author = { name = "Tim Caswell" } - -local openssl = require('openssl') -local bit = require('bit') - -local DEFAULT_CIPHERS = 'ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:' .. -- TLS 1.2 - 'RC4:HIGH:!MD5:!aNULL:!EDH' -- TLS 1.0 - --- Given a read/write pair, return a new read/write pair for plaintext -exports.wrap = function (read, write, options) - if not options then - options = {} - end - - local ctx = openssl.ssl.ctx_new(options.protocol or 'TLSv1_2', options.ciphers or DEFAULT_CIPHERS) - - local key, cert, ca - if options.key then - key = assert(openssl.pkey.read(options.key, true, 'pem')) - end - if options.cert then - cert = assert(openssl.x509.read(options.cert)) - end - if options.ca then - if type(options.ca) == "string" then - ca = { assert(openssl.x509.read(options.ca)) } - elseif type(options.ca) == "table" then - ca = {} - for i = 1, #options.ca do - ca[i] = assert(openssl.x509.read(options.ca[i])) - end - else - error("options.ca must be string or table of strings") - end - end - if key and cert then - assert(ctx:use(key, cert)) - end - if ca then - local store = openssl.x509.store:new() - for i = 1, #ca do - assert(store:add(ca[i])) - end - ctx:cert_store(store) - else - ctx:verify_mode({"none"}) - end - - ctx:options(bit.bor( - openssl.ssl.no_sslv2, - openssl.ssl.no_sslv3, - openssl.ssl.no_compression)) - local bin, bout = openssl.bio.mem(8192), openssl.bio.mem(8192) - local ssl = ctx:ssl(bin, bout, options.server) - - local function flush() - while bout:pending() > 0 do - write(bout:read()) - end - end - - -- Do handshake - while true do - if ssl:handshake() then break end - flush() - local chunk = read() - if chunk then - bin:write(chunk) - else - error("disconnect while handshaking") - end - end - flush() - - local done = false - local function shutdown() - if done then return end - done = true - while true do - if ssl:shutdown() then break end - flush() - local chunk = read() - if chunk then - bin:write(chunk) - else - break - end - end - flush() - write() - end - - local function plainRead() - while true do - local chunk = ssl:read() - if chunk then return chunk end - local cipher = read() - if not cipher then return end - bin:write(cipher) - end - end - - local function plainWrite(plain) - if not plain then - return shutdown() - end - ssl:write(plain) - flush() - end - - return plainRead, plainWrite - -end - -return exports diff --git a/plugins/coro-tls/plugin.json b/plugins/coro-tls/plugin.json deleted file mode 100644 index 257224e2ea3..00000000000 --- a/plugins/coro-tls/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "coro-tls", - "version": "1.2.1", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/plugins/coro-wrapper/LICENSE b/plugins/coro-wrapper/LICENSE deleted file mode 100644 index 5789b767285..00000000000 --- a/plugins/coro-wrapper/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Tim Caswell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/plugins/coro-wrapper/README.md b/plugins/coro-wrapper/README.md deleted file mode 100644 index a9351a7f531..00000000000 --- a/plugins/coro-wrapper/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luv-coro-wrapper -A luv port of lit's coro-wrapper module diff --git a/plugins/coro-wrapper/init.lua b/plugins/coro-wrapper/init.lua deleted file mode 100644 index aab2683baf3..00000000000 --- a/plugins/coro-wrapper/init.lua +++ /dev/null @@ -1,41 +0,0 @@ -local exports = {} -exports.name = "creationix/coro-wrapper" -exports.version = "1.0.0-1" -exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-wrapper.lua" -exports.description = "An adapter for applying decoders to coro-streams." -exports.tags = {"coro", "decoder", "adapter"} -exports.license = "MIT" -exports.author = { name = "Tim Caswell" } - -function exports.reader(read, decode) - local buffer = "" - return function () - while true do - local item, extra = decode(buffer) - if item then - buffer = extra - return item - end - local chunk = read() - if not chunk then return end - buffer = buffer .. chunk - end - end, - function (newDecode) - decode = newDecode - end -end - -function exports.writer(write, encode) - return function (item) - if not item then - return write() - end - return write(encode(item)) - end, - function (newEncode) - encode = newEncode - end -end - -return exports diff --git a/plugins/coro-wrapper/plugin.json b/plugins/coro-wrapper/plugin.json deleted file mode 100644 index 6075edba1fa..00000000000 --- a/plugins/coro-wrapper/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "coro-wrapper", - "version": "1.0.0-1", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/plugins/http-codec/LICENSE b/plugins/http-codec/LICENSE deleted file mode 100644 index 8f71f43fee3..00000000000 --- a/plugins/http-codec/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/plugins/http-codec/README.md b/plugins/http-codec/README.md deleted file mode 100644 index 80d050416ae..00000000000 --- a/plugins/http-codec/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luv-http-codec -A luv port of luvit's http-codec diff --git a/plugins/http-codec/init.lua b/plugins/http-codec/init.lua deleted file mode 100644 index 11a32945729..00000000000 --- a/plugins/http-codec/init.lua +++ /dev/null @@ -1,291 +0,0 @@ ---[[ - -Copyright 2014-2015 The Luvit Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS-IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ---]] - -local exports = {} - -exports.name = "luvit/http-codec" -exports.version = "1.0.0-1" -exports.homepage = "https://github.com/luvit/luvit/blob/master/deps/http-codec.lua" -exports.description = "A simple pair of functions for converting between hex and raw strings." -exports.tags = {"codec", "http"} -exports.license = "Apache 2" -exports.author = { name = "Tim Caswell" } - -local sub = string.sub -local gsub = string.gsub -local lower = string.lower -local find = string.find -local format = string.format -local concat = table.concat -local match = string.match - -local STATUS_CODES = { - [100] = 'Continue', - [101] = 'Switching Protocols', - [102] = 'Processing', -- RFC 2518, obsoleted by RFC 4918 - [200] = 'OK', - [201] = 'Created', - [202] = 'Accepted', - [203] = 'Non-Authoritative Information', - [204] = 'No Content', - [205] = 'Reset Content', - [206] = 'Partial Content', - [207] = 'Multi-Status', -- RFC 4918 - [300] = 'Multiple Choices', - [301] = 'Moved Permanently', - [302] = 'Moved Temporarily', - [303] = 'See Other', - [304] = 'Not Modified', - [305] = 'Use Proxy', - [307] = 'Temporary Redirect', - [400] = 'Bad Request', - [401] = 'Unauthorized', - [402] = 'Payment Required', - [403] = 'Forbidden', - [404] = 'Not Found', - [405] = 'Method Not Allowed', - [406] = 'Not Acceptable', - [407] = 'Proxy Authentication Required', - [408] = 'Request Time-out', - [409] = 'Conflict', - [410] = 'Gone', - [411] = 'Length Required', - [412] = 'Precondition Failed', - [413] = 'Request Entity Too Large', - [414] = 'Request-URI Too Large', - [415] = 'Unsupported Media Type', - [416] = 'Requested Range Not Satisfiable', - [417] = 'Expectation Failed', - [418] = "I'm a teapot", -- RFC 2324 - [422] = 'Unprocessable Entity', -- RFC 4918 - [423] = 'Locked', -- RFC 4918 - [424] = 'Failed Dependency', -- RFC 4918 - [425] = 'Unordered Collection', -- RFC 4918 - [426] = 'Upgrade Required', -- RFC 2817 - [500] = 'Internal Server Error', - [501] = 'Not Implemented', - [502] = 'Bad Gateway', - [503] = 'Service Unavailable', - [504] = 'Gateway Time-out', - [505] = 'HTTP Version not supported', - [506] = 'Variant Also Negotiates', -- RFC 2295 - [507] = 'Insufficient Storage', -- RFC 4918 - [509] = 'Bandwidth Limit Exceeded', - [510] = 'Not Extended' -- RFC 2774 -} - -exports.encoder = function () - - local mode - local encodeHead, encodeRaw, encodeChunked - - function encodeHead(item) - if not item or item == "" then - return item - elseif not (type(item) == "table") then - error("expected a table but got a " .. type(item) .. " when encoding data") - end - local head, chunkedEncoding - local version = item.version or 1.1 - if item.method then - local path = item.path - assert(path and #path > 0, "expected non-empty path") - head = { item.method .. ' ' .. item.path .. ' HTTP/' .. version .. '\r\n' } - else - local reason = item.reason or STATUS_CODES[item.code] - head = { 'HTTP/' .. version .. ' ' .. item.code .. ' ' .. reason .. '\r\n' } - end - for i = 1, #item do - local key, value = unpack(item[i]) - local lowerKey = lower(key) - if lowerKey == "transfer-encoding" then - chunkedEncoding = lower(value) == "chunked" - end - value = gsub(tostring(value), "[\r\n]+", " ") - head[#head + 1] = key .. ': ' .. tostring(value) .. '\r\n' - end - head[#head + 1] = '\r\n' - - mode = chunkedEncoding and encodeChunked or encodeRaw - return concat(head) - end - - function encodeRaw(item) - if type(item) ~= "string" then - mode = encodeHead - return encodeHead(item) - end - return item - end - - function encodeChunked(item) - if type(item) ~= "string" then - mode = encodeHead - local extra = encodeHead(item) - if extra then - return "0\r\n\r\n" .. extra - else - return "0\r\n\r\n" - end - end - if #item == 0 then - mode = encodeHead - end - return format("%x", #item) .. "\r\n" .. item .. "\r\n" - end - - mode = encodeHead - return function (item) - return mode(item) - end -end - -exports.decoder = function () - - -- This decoder is somewhat stateful with 5 different parsing states. - local decodeHead, decodeEmpty, decodeRaw, decodeChunked, decodeCounted - local mode -- state variable that points to various decoders - local bytesLeft -- For counted decoder - - -- This state is for decoding the status line and headers. - function decodeHead(chunk) - if not chunk then return end - - local _, length = find(chunk, "\r?\n\r?\n", 1) - -- First make sure we have all the head before continuing - if not length then - if #chunk < 8 * 1024 then return end - -- But protect against evil clients by refusing heads over 8K long. - error("entity too large") - end - - -- Parse the status/request line - local head = {} - local _, offset - local version - _, offset, version, head.code, head.reason = - find(chunk, "^HTTP/(%d%.%d) (%d+) ([^\r\n]+)\r?\n") - if offset then - head.code = tonumber(head.code) - else - _, offset, head.method, head.path, version = - find(chunk, "^(%u+) ([^ ]+) HTTP/(%d%.%d)\r?\n") - if not offset then - error("expected HTTP data") - end - end - version = tonumber(version) - head.version = version - head.keepAlive = version > 1.0 - - -- We need to inspect some headers to know how to parse the body. - local contentLength - local chunkedEncoding - - -- Parse the header lines - while true do - local key, value - _, offset, key, value = find(chunk, "^([^:\r\n]+): *([^\r\n]+)\r?\n", offset + 1) - if not offset then break end - local lowerKey = lower(key) - - -- Inspect a few headers and remember the values - if lowerKey == "content-length" then - contentLength = tonumber(value) - elseif lowerKey == "transfer-encoding" then - chunkedEncoding = lower(value) == "chunked" - elseif lowerKey == "connection" then - head.keepAlive = lower(value) == "keep-alive" - end - head[#head + 1] = {key, value} - end - - if head.keepAlive and (not (chunkedEncoding or (contentLength and contentLength > 0))) - or (head.method == "GET" or head.method == "HEAD") then - mode = decodeEmpty - elseif chunkedEncoding then - mode = decodeChunked - elseif contentLength then - bytesLeft = contentLength - mode = decodeCounted - elseif not head.keepAlive then - mode = decodeRaw - end - - return head, sub(chunk, length + 1) - - end - - -- This is used for inserting a single empty string into the output string for known empty bodies - function decodeEmpty(chunk) - mode = decodeHead - return "", chunk or "" - end - - function decodeRaw(chunk) - if not chunk then return "", "" end - if #chunk == 0 then return end - return chunk, "" - end - - function decodeChunked(chunk) - local len, term - len, term = match(chunk, "^(%x+)(..)") - if not len then return end - assert(term == "\r\n") - local length = tonumber(len, 16) - if #chunk < length + 4 + #len then return end - if length == 0 then - mode = decodeHead - end - chunk = sub(chunk, #len + 3) - assert(sub(chunk, length + 1, length + 2) == "\r\n") - return sub(chunk, 1, length), sub(chunk, length + 3) - end - - function decodeCounted(chunk) - if bytesLeft == 0 then - mode = decodeEmpty - return mode(chunk) - end - local length = #chunk - -- Make sure we have at least one byte to process - if length == 0 then return end - - if length >= bytesLeft then - mode = decodeEmpty - end - - -- If the entire chunk fits, pass it all through - if length <= bytesLeft then - bytesLeft = bytesLeft - length - return chunk, "" - end - - return sub(chunk, 1, bytesLeft), sub(chunk, bytesLeft + 1) - end - - -- Switch between states by changing which decoder mode points to - mode = decodeHead - return function (chunk) - return mode(chunk) - end - -end - -return exports diff --git a/plugins/http-codec/plugin.json b/plugins/http-codec/plugin.json deleted file mode 100644 index ce511afa785..00000000000 --- a/plugins/http-codec/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "http-codec", - "version": "1.0.0-1", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/plugins/mime/LICENSE b/plugins/mime/LICENSE deleted file mode 100644 index 5789b767285..00000000000 --- a/plugins/mime/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Tim Caswell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/plugins/mime/README.md b/plugins/mime/README.md deleted file mode 100644 index 550ba582b69..00000000000 --- a/plugins/mime/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luv-mime -A luv port of weblit's mime module diff --git a/plugins/mime/init.lua b/plugins/mime/init.lua deleted file mode 100644 index ac41dad1cfc..00000000000 --- a/plugins/mime/init.lua +++ /dev/null @@ -1,194 +0,0 @@ -local exports = {} -exports.name = "creationix/mime" -exports.version = "0.1.2-1" -exports.description = "A simple mime type database useful for serving static files over http." -exports.tags = {"mime", "static"} -exports.license = "MIT" -exports.author = { name = "Tim Caswell" } -exports.homepage = "https://github.com/creationix/weblit/blob/master/libs/mime.lua" - -local mime = exports -local table = { - ["3gp"] = "video/3gpp", - a = "application/octet-stream", - ai = "application/postscript", - aif = "audio/x-aiff", - aiff = "audio/x-aiff", - asc = "application/pgp-signature", - asf = "video/x-ms-asf", - asm = "text/x-asm", - asx = "video/x-ms-asf", - atom = "application/atom+xml", - au = "audio/basic", - avi = "video/x-msvideo", - bat = "application/x-msdownload", - bin = "application/octet-stream", - bmp = "image/bmp", - bz2 = "application/x-bzip2", - c = "text/x-c", - cab = "application/vnd.ms-cab-compressed", - cc = "text/x-c", - chm = "application/vnd.ms-htmlhelp", - class = "application/octet-stream", - com = "application/x-msdownload", - conf = "text/plain", - cpp = "text/x-c", - crt = "application/x-x509-ca-cert", - css = "text/css", - csv = "text/csv", - cxx = "text/x-c", - deb = "application/x-debian-package", - der = "application/x-x509-ca-cert", - diff = "text/x-diff", - djv = "image/vnd.djvu", - djvu = "image/vnd.djvu", - dll = "application/x-msdownload", - dmg = "application/octet-stream", - doc = "application/msword", - dot = "application/msword", - dtd = "application/xml-dtd", - dvi = "application/x-dvi", - ear = "application/java-archive", - eml = "message/rfc822", - eps = "application/postscript", - exe = "application/x-msdownload", - f = "text/x-fortran", - f77 = "text/x-fortran", - f90 = "text/x-fortran", - flv = "video/x-flv", - ["for"] = "text/x-fortran", - gem = "application/octet-stream", - gemspec = "text/x-script.ruby", - gif = "image/gif", - gz = "application/x-gzip", - h = "text/x-c", - hh = "text/x-c", - htm = "text/html", - html = "text/html", - ico = "image/vnd.microsoft.icon", - ics = "text/calendar", - ifb = "text/calendar", - iso = "application/octet-stream", - jar = "application/java-archive", - java = "text/x-java-source", - jnlp = "application/x-java-jnlp-file", - jpeg = "image/jpeg", - jpg = "image/jpeg", - js = "application/javascript", - json = "application/json", - less = "text/css", - log = "text/plain", - lua = "text/x-lua", - luac = "application/x-lua-bytecode", - m3u = "audio/x-mpegurl", - m4v = "video/mp4", - man = "text/troff", - manifest = "text/cache-manifest", - markdown = "text/markdown", - mathml = "application/mathml+xml", - mbox = "application/mbox", - mdoc = "text/troff", - md = "text/markdown", - me = "text/troff", - mid = "audio/midi", - midi = "audio/midi", - mime = "message/rfc822", - mml = "application/mathml+xml", - mng = "video/x-mng", - mov = "video/quicktime", - mp3 = "audio/mpeg", - mp4 = "video/mp4", - mp4v = "video/mp4", - mpeg = "video/mpeg", - mpg = "video/mpeg", - ms = "text/troff", - msi = "application/x-msdownload", - odp = "application/vnd.oasis.opendocument.presentation", - ods = "application/vnd.oasis.opendocument.spreadsheet", - odt = "application/vnd.oasis.opendocument.text", - ogg = "application/ogg", - p = "text/x-pascal", - pas = "text/x-pascal", - pbm = "image/x-portable-bitmap", - pdf = "application/pdf", - pem = "application/x-x509-ca-cert", - pgm = "image/x-portable-graymap", - pgp = "application/pgp-encrypted", - pkg = "application/octet-stream", - pl = "text/x-script.perl", - pm = "text/x-script.perl-module", - png = "image/png", - pnm = "image/x-portable-anymap", - ppm = "image/x-portable-pixmap", - pps = "application/vnd.ms-powerpoint", - ppt = "application/vnd.ms-powerpoint", - ps = "application/postscript", - psd = "image/vnd.adobe.photoshop", - py = "text/x-script.python", - qt = "video/quicktime", - ra = "audio/x-pn-realaudio", - rake = "text/x-script.ruby", - ram = "audio/x-pn-realaudio", - rar = "application/x-rar-compressed", - rb = "text/x-script.ruby", - rdf = "application/rdf+xml", - roff = "text/troff", - rpm = "application/x-redhat-package-manager", - rss = "application/rss+xml", - rtf = "application/rtf", - ru = "text/x-script.ruby", - s = "text/x-asm", - sgm = "text/sgml", - sgml = "text/sgml", - sh = "application/x-sh", - sig = "application/pgp-signature", - snd = "audio/basic", - so = "application/octet-stream", - svg = "image/svg+xml", - svgz = "image/svg+xml", - swf = "application/x-shockwave-flash", - t = "text/troff", - tar = "application/x-tar", - tbz = "application/x-bzip-compressed-tar", - tci = "application/x-topcloud", - tcl = "application/x-tcl", - tex = "application/x-tex", - texi = "application/x-texinfo", - texinfo = "application/x-texinfo", - text = "text/plain", - tif = "image/tiff", - tiff = "image/tiff", - torrent = "application/x-bittorrent", - tr = "text/troff", - ttf = "application/x-font-ttf", - txt = "text/plain", - vcf = "text/x-vcard", - vcs = "text/x-vcalendar", - vrml = "model/vrml", - war = "application/java-archive", - wav = "audio/x-wav", - webm = "video/webm", - wma = "audio/x-ms-wma", - wmv = "video/x-ms-wmv", - wmx = "video/x-ms-wmx", - wrl = "model/vrml", - wsdl = "application/wsdl+xml", - xbm = "image/x-xbitmap", - xhtml = "application/xhtml+xml", - xls = "application/vnd.ms-excel", - xml = "application/xml", - xpm = "image/x-xpixmap", - xsl = "application/xml", - xslt = "application/xslt+xml", - yaml = "text/yaml", - yml = "text/yaml", - zip = "application/zip", -} -mime.table = table -mime.default = "application/octet-stream" - -function mime.getType(path) - return mime.table[path:lower():match("[^.]*$")] or mime.default -end - -return mime diff --git a/plugins/mime/plugin.json b/plugins/mime/plugin.json deleted file mode 100644 index ee55fd559b3..00000000000 --- a/plugins/mime/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "mime", - "version": "0.1.2-1", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/plugins/path/LICENSE b/plugins/path/LICENSE deleted file mode 100644 index 8f71f43fee3..00000000000 --- a/plugins/path/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/plugins/path/README.md b/plugins/path/README.md deleted file mode 100644 index 75d881e35e3..00000000000 --- a/plugins/path/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luv-path -A luv port of luvi's path module diff --git a/plugins/path/init.lua b/plugins/path/init.lua deleted file mode 100644 index d0e427d02ee..00000000000 --- a/plugins/path/init.lua +++ /dev/null @@ -1,139 +0,0 @@ ---[[ - -Copyright 2014 The Luvit Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS-IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ---]] - --- Extracted from https://github.com/luvit/luvi/blob/master/src/lua/init.lua - -local isWindows -if jit and jit.os then - -- Luajit provides explicit platform detection - isWindows = jit.os == "Windows" -else - -- Normal lua will only have \ for path separator on windows. - isWindows = package.config:find("\\") and true or false -end - -local uv = require('luv') - -local getPrefix, splitPath, joinParts - -if isWindows then - -- Windows aware path utilities - function getPrefix(path) - return path:match("^%a:\\") or - path:match("^/") or - path:match("^\\+") - end - function splitPath(path) - local parts = {} - for part in string.gmatch(path, '([^/\\]+)') do - table.insert(parts, part) - end - return parts - end - function joinParts(prefix, parts, i, j) - if not prefix then - return table.concat(parts, '/', i, j) - elseif prefix ~= '/' then - return prefix .. table.concat(parts, '\\', i, j) - else - return prefix .. table.concat(parts, '/', i, j) - end - end -else - -- Simple optimized versions for UNIX systems - function getPrefix(path) - return path:match("^/") - end - function splitPath(path) - local parts = {} - for part in string.gmatch(path, '([^/]+)') do - table.insert(parts, part) - end - return parts - end - function joinParts(prefix, parts, i, j) - if prefix then - return prefix .. table.concat(parts, '/', i, j) - end - return table.concat(parts, '/', i, j) - end -end - -local function pathJoin(...) - local inputs = {...} - local l = #inputs - - -- Find the last segment that is an absolute path - -- Or if all are relative, prefix will be nil - local i = l - local prefix - while true do - prefix = getPrefix(inputs[i]) - if prefix or i <= 1 then break end - i = i - 1 - end - - -- If there was one, remove its prefix from its segment - if prefix then - inputs[i] = inputs[i]:sub(#prefix) - end - - -- Split all the paths segments into one large list - local parts = {} - while i <= l do - local sub = splitPath(inputs[i]) - for j = 1, #sub do - parts[#parts + 1] = sub[j] - end - i = i + 1 - end - - -- Evaluate special segments in reverse order. - local skip = 0 - local reversed = {} - for idx = #parts, 1, -1 do - local part = parts[idx] - if part == '.' then - -- Ignore - elseif part == '..' then - skip = skip + 1 - elseif skip > 0 then - skip = skip - 1 - else - reversed[#reversed + 1] = part - end - end - - -- Reverse the list again to get the correct order - parts = reversed - for idx = 1, #parts / 2 do - local j = #parts - idx + 1 - parts[idx], parts[j] = parts[j], parts[idx] - end - - local path = joinParts(prefix, parts) - return path -end - -return { - isWindows = isWindows, - join = pathJoin, - getPrefix = getPrefix, - splitPath = splitPath, - joinparts = joinParts, -} diff --git a/plugins/path/plugin.json b/plugins/path/plugin.json deleted file mode 100644 index c88de67d77c..00000000000 --- a/plugins/path/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "path", - "version": "1.0.0", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/plugins/pretty-print/LICENSE b/plugins/pretty-print/LICENSE deleted file mode 100644 index 8f71f43fee3..00000000000 --- a/plugins/pretty-print/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/plugins/pretty-print/README.md b/plugins/pretty-print/README.md deleted file mode 100644 index 82372160e09..00000000000 --- a/plugins/pretty-print/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luv-pretty-print -luvit's pretty-print module re-packaged as a luv submodule. diff --git a/plugins/pretty-print/init.lua b/plugins/pretty-print/init.lua deleted file mode 100644 index f1c112d6e4f..00000000000 --- a/plugins/pretty-print/init.lua +++ /dev/null @@ -1,362 +0,0 @@ ---[[ - -Copyright 2014-2015 The Luvit Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS-IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ---]] - --- Luv port by Tim Caswell - -local exports = {} -exports.name = "luvit/pretty-print" -exports.version = "1.0.3" -exports.homepage = "https://github.com/luvit/luvit/blob/master/deps/pretty-print.lua" -exports.description = "A lua value pretty printer and colorizer for terminals." -exports.tags = {"colors", "tty"} -exports.license = "Apache 2" -exports.author = { name = "Tim Caswell" } - -local uv = require('luv') - -local prettyPrint, dump, strip, color, colorize, loadColors -local theme = {} -local useColors = false -local defaultTheme - -local stdout, stdin, stderr, width - -local quote, quote2, dquote, dquote2, obracket, cbracket, obrace, cbrace, comma, equals, controls - -local themes = { - -- nice color theme using 16 ansi colors - [16] = { - property = "0;37", -- white - sep = "1;30", -- bright-black - braces = "1;30", -- bright-black - - ["nil"] = "1;30", -- bright-black - boolean = "0;33", -- yellow - number = "1;33", -- bright-yellow - string = "0;32", -- green - quotes = "1;32", -- bright-green - escape = "1;32", -- bright-green - ["function"] = "0;35", -- purple - thread = "1;35", -- bright-purple - - table = "1;34", -- bright blue - userdata = "1;36", -- bright cyan - cdata = "0;36", -- cyan - - err = "1;31", -- bright red - success = "1;33;42", -- bright-yellow on green - failure = "1;33;41", -- bright-yellow on red - highlight = "1;36;44", -- bright-cyan on blue - }, - -- nice color theme using ansi 256-mode colors - [256] = { - property = "38;5;253", - braces = "38;5;247", - sep = "38;5;240", - - ["nil"] = "38;5;244", - boolean = "38;5;220", -- yellow-orange - number = "38;5;202", -- orange - string = "38;5;34", -- darker green - quotes = "38;5;40", -- green - escape = "38;5;46", -- bright green - ["function"] = "38;5;129", -- purple - thread = "38;5;199", -- pink - - table = "38;5;27", -- blue - userdata = "38;5;39", -- blue2 - cdata = "38;5;69", -- teal - - err = "38;5;196", -- bright red - success = "38;5;120;48;5;22", -- bright green on dark green - failure = "38;5;215;48;5;52", -- bright red on dark red - highlight = "38;5;45;48;5;236", -- bright teal on dark grey - }, -} - -local special = { - [7] = 'a', - [8] = 'b', - [9] = 't', - [10] = 'n', - [11] = 'v', - [12] = 'f', - [13] = 'r' -} - -function strip(str) - return string.gsub(str, '\027%[[^m]*m', '') -end - - -function loadColors(index) - if index == nil then index = defaultTheme end - - -- Remove the old theme - for key in pairs(theme) do - theme[key] = nil - end - - if index then - local new = themes[index] - if not new then error("Invalid theme index: " .. tostring(index)) end - -- Add the new theme - for key in pairs(new) do - theme[key] = new[key] - end - useColors = true - else - useColors = false - end - - quote = colorize('quotes', "'", 'string') - quote2 = colorize('quotes', "'") - dquote = colorize('quotes', '"', 'string') - dquote2 = colorize('quotes', '"') - obrace = colorize('braces', '{ ') - cbrace = colorize('braces', '}') - obracket = colorize('property', '[') - cbracket = colorize('property', ']') - comma = colorize('sep', ', ') - equals = colorize('sep', ' = ') - - controls = {} - for i = 0, 31 do - local c = special[i] - if not c then - if i < 10 then - c = "00" .. tostring(i) - else - c = "0" .. tostring(i) - end - end - controls[i] = colorize('escape', '\\' .. c, 'string') - end - controls[92] = colorize('escape', '\\\\', 'string') - controls[34] = colorize('escape', '\\"', 'string') - controls[39] = colorize('escape', "\\'", 'string') - for i = 128, 255 do - local c - if i < 100 then - c = "0" .. tostring(i) - else - c = tostring(i) - end - controls[i] = colorize('escape', '\\' .. c, 'string') - end - -end - -function color(colorName) - return '\27[' .. (theme[colorName] or '0') .. 'm' -end - -function colorize(colorName, string, resetName) - return useColors and - (color(colorName) .. tostring(string) .. color(resetName)) or - tostring(string) -end - -local function stringEscape(c) - return controls[string.byte(c, 1)] -end - -function dump(value, recurse, nocolor) - local seen = {} - local output = {} - local offset = 0 - local stack = {} - - local function recalcOffset(index) - for i = index + 1, #output do - local m = string.match(output[i], "\n([^\n]*)$") - if m then - offset = #(strip(m)) - else - offset = offset + #(strip(output[i])) - end - end - end - - local function write(text, length) - if not length then length = #(strip(text)) end - -- Create room for data by opening parent blocks - -- Start at the root and go down. - local i = 1 - while offset + length > width and stack[i] do - local entry = stack[i] - if not entry.opened then - entry.opened = true - table.insert(output, entry.index + 1, "\n" .. string.rep(" ", i)) - -- Recalculate the offset - recalcOffset(entry.index) - -- Bump the index of all deeper entries - for j = i + 1, #stack do - stack[j].index = stack[j].index + 1 - end - end - i = i + 1 - end - output[#output + 1] = text - offset = offset + length - if offset > width then - return dump(stack) - end - end - - local function indent() - stack[#stack + 1] = { - index = #output, - opened = false, - } - end - - local function unindent() - stack[#stack] = nil - end - - local function process(value) - local typ = type(value) - if typ == 'string' then - if string.match(value, "'") and not string.match(value, '"') then - write(dquote .. string.gsub(value, '[%c\\\128-\255]', stringEscape) .. dquote2) - else - write(quote .. string.gsub(value, "[%c\\'\128-\255]", stringEscape) .. quote2) - end - elseif typ == 'table' and not seen[value] then - if not recurse then seen[value] = true end - write(obrace) - local i = 1 - -- Count the number of keys so we know when to stop adding commas - local total = 0 - for _ in pairs(value) do total = total + 1 end - - local nextIndex = 1 - for k, v in pairs(value) do - indent() - if k == nextIndex then - -- if the key matches the last numerical index + 1 - -- This is how lists print without keys - nextIndex = k + 1 - process(v) - else - if type(k) == "string" and string.find(k,"^[%a_][%a%d_]*$") then - write(colorize("property", k) .. equals) - else - write(obracket) - process(k) - write(cbracket .. equals) - end - if type(v) == "table" then - process(v) - else - indent() - process(v) - unindent() - end - end - if i < total then - write(comma) - else - write(" ") - end - i = i + 1 - unindent() - end - write(cbrace) - else - write(colorize(typ, tostring(value))) - end - end - - process(value) - local s = table.concat(output, "") - return nocolor and strip(s) or s -end - --- Print replacement that goes through libuv. This is useful on windows --- to use libuv's code to translate ansi escape codes to windows API calls. -function _G.print(...) - local n = select('#', ...) - local arguments = {...} - for i = 1, n do - arguments[i] = tostring(arguments[i]) - end - uv.write(stdout, table.concat(arguments, "\t") .. "\n") -end - -function prettyPrint(...) - local n = select('#', ...) - local arguments = { ... } - - for i = 1, n do - arguments[i] = dump(arguments[i]) - end - - print(table.concat(arguments, "\t")) -end - -function strip(str) - return string.gsub(str, '\027%[[^m]*m', '') -end - -if uv.guess_handle(0) == 'tty' then - stdin = assert(uv.new_tty(0, true)) -else - stdin = uv.new_pipe(false) - uv.pipe_open(stdin, 0) -end - -if uv.guess_handle(1) == 'tty' then - stdout = assert(uv.new_tty(1, false)) - width = uv.tty_get_winsize(stdout) - if width == 0 then width = 80 end - -- auto-detect when 16 color mode should be used - local term = os.getenv("TERM") - if term == 'xterm' or term == 'xterm-256color' then - defaultTheme = 256 - else - defaultTheme = 16 - end -else - stdout = uv.new_pipe(false) - uv.pipe_open(stdout, 1) - width = 80 -end -loadColors() - -if uv.guess_handle(2) == 'tty' then - stderr = assert(uv.new_tty(2, false)) -else - stderr = uv.new_pipe(false) - uv.pipe_open(stderr, 2) -end - -exports.loadColors = loadColors -exports.theme = theme -exports.print = print -exports.prettyPrint = prettyPrint -exports.dump = dump -exports.color = color -exports.colorize = colorize -exports.stdin = stdin -exports.stdout = stdout -exports.stderr = stderr -exports.strip = strip - -return exports diff --git a/plugins/pretty-print/plugin.json b/plugins/pretty-print/plugin.json deleted file mode 100644 index 556608c8dd6..00000000000 --- a/plugins/pretty-print/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "pretty-print", - "version": "1.0.3", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/plugins/querystring/LICENSE b/plugins/querystring/LICENSE deleted file mode 100644 index 8f71f43fee3..00000000000 --- a/plugins/querystring/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/plugins/querystring/README.md b/plugins/querystring/README.md deleted file mode 100644 index 7f3437312bb..00000000000 --- a/plugins/querystring/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luv-querystring -A luv port of luvit's querystring diff --git a/plugins/querystring/init.lua b/plugins/querystring/init.lua deleted file mode 100644 index 0e2675f9252..00000000000 --- a/plugins/querystring/init.lua +++ /dev/null @@ -1,105 +0,0 @@ ---[[ - -Copyright 2015 The Luvit Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS-IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ---]] - -local exports = {} -exports.name = "luvit/querystring" -exports.version = "1.0.2" -exports.license = "Apache 2" -exports.homepage = "https://github.com/luvit/luvit/blob/master/deps/querystring.lua" -exports.description = "Node-style query-string codec for luvit" -exports.tags = {"luvit", "url", "codec"} - -local find = string.find -local gsub = string.gsub -local char = string.char -local byte = string.byte -local format = string.format -local match = string.match -local gmatch = string.gmatch - -function exports.urldecode(str) - str = gsub(str, '+', ' ') - str = gsub(str, '%%(%x%x)', function(h) - return char(tonumber(h, 16)) - end) - str = gsub(str, '\r\n', '\n') - return str -end - -function exports.urlencode(str) - if str then - str = gsub(str, '\n', '\r\n') - str = gsub(str, '([^%w])', function(c) - return format('%%%02X', byte(c)) - end) - end - return str -end - -local function stringifyPrimitive(v) - return tostring(v) -end - -function exports.stringify(params, sep, eq) - if not sep then sep = '&' end - if not eq then eq = '=' end - if type(params) == "table" then - local fields = {} - for key,value in pairs(params) do - local keyString = exports.urlencode(stringifyPrimitive(key)) .. eq - if type(value) == "table" then - for _, v in ipairs(value) do - table.insert(fields, keyString .. exports.urlencode(stringifyPrimitive(v))) - end - else - table.insert(fields, keyString .. exports.urlencode(stringifyPrimitive(value))) - end - end - return table.concat(fields, sep) - end - return '' -end - --- parse querystring into table. urldecode tokens -function exports.parse(str, sep, eq) - if not sep then sep = '&' end - if not eq then eq = '=' end - local vars = {} - for pair in gmatch(tostring(str), '[^' .. sep .. ']+') do - if not find(pair, eq) then - vars[exports.urldecode(pair)] = '' - else - local key, value = match(pair, '([^' .. eq .. ']*)' .. eq .. '(.*)') - if key then - key = exports.urldecode(key) - value = exports.urldecode(value) - local type = type(vars[key]) - if type=='nil' then - vars[key] = value - elseif type=='table' then - table.insert(vars[key], value) - else - vars[key] = {vars[key],value} - end - end - end - end - return vars -end - -return exports diff --git a/plugins/querystring/plugin.json b/plugins/querystring/plugin.json deleted file mode 100644 index ddd3cc4291e..00000000000 --- a/plugins/querystring/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "querystring", - "version": "1.0.2", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/plugins/weblit/LICENSE b/plugins/weblit/LICENSE deleted file mode 100644 index 5789b767285..00000000000 --- a/plugins/weblit/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Tim Caswell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/plugins/weblit/README.md b/plugins/weblit/README.md deleted file mode 100644 index 55d6085d22b..00000000000 --- a/plugins/weblit/README.md +++ /dev/null @@ -1,239 +0,0 @@ -# weblit - -A web framework for luv (ported from luvit/lit) - -Weblit is a collection of lit packages that together form a nice web framework. - -## weblit/app - -This is the core of the framework. It's export value is the app itself. The -config functions can be chained off this config for super terse syntax. - -```lua -require('weblit/app') - - .bind({ - host = "0.0.0.0", - port = 8080 - }) - - .use(require('weblit/logger')) - .use(require('weblit/auto-headers')) - .use(require('weblit/etag-cache')) - - .route({ - method = "GET", - path = "/do/:user/:action", - domain = "*.myapp.io" - }, function (req, res, go) - -- Handle route - end) - - .start() - -``` - -### bind(options) - -Use this to configure your server. You can bind to multiple addresses and -ports. For example, the same server can listen on port `8080` using normal HTTP -while also listening on port `8443` using HTTPS. - -```lua --- Listen on port 8080 internally using plain HTTP. -.bind({ - host = "127.0.0.1", - port = 8080 -}) - --- Also listen on port 8443 externally using encrypted HTTPS. -.bind({ - host = "0.0.0.0", - port = 8443, - tls = { - cert = module:load("cert.pem"), - key = module:load("key.pem", - } -}) -``` - -The `host` option defaults to `"127.0.0.1"`. The default port depends on if -you're running as root and if the connection is TLS encrypted. - - | Root | User -------|-----:|------: -HTTP | 80 | 8080 -HTTPS | 442 | 8443 - - -### use(middleware) - -This adds a raw middleware to the chain. It's signature is: - -```lua -.use(function (req, res, go) - -- Log the request table - p("request", req) - -- Hand off to the next layer. - return go() -end) -``` - -The `req` table will contain information about the HTTP request. This includes -several fields: - - - `socket` - The raw libuv `uv_tty_t` socket. - - `method` - The HTTP request method verb like `GET` or `POST`. - - `path` - The raw HTTP request path (including query string). - - `headers` - A list of headers. Each header is a table with two entries for - key and value. For convenience, there are special `__index` and - `__newindex` metamethods that let you treat this like a case insensitive - key/value store. - - `version` - The HTTP version (Usually either `1.0` or `1.1`). - - `keepAlive` - A flag telling you if this should be a keepalive connection. - - `body` - The request body as a string. In the future, this may also be a stream. - -The `res` table also has some conventions used to form the response a piece at a -time. Initially it contains: - - - `code` - The response status code. Initially contains `404`. - - `headers` - Another special headers table like in `req`. - - `body` - The response body to send. Initially contains `"Not Found\n"`. - -The `go` function is to be called if you wish to not handle a request. This -allows other middleware layers to get a chance to respond to the request. Use a -tail call if there is nothing more to do. - -Otherwise do further processing after `go` returns. At this point, all inner -layers have finished and a response is ready in `res`. - -### route(options, middleware) - -Route is like use, but allows you to pre-filter the requests before the middleware -is called. - -```lua -.route({ - method = "PUT", - path = "/upload/:username" -}, function (req, res, go) - local url = saveFile(req.params.username, req.body) - res.code = 201 - res.headers.Location = url -end) -``` - -The route options accept several parameters: - - - `method` - This is a simple filter on a specific HTTP method verb. - - `path` - This is either an exact match or can contain patterns. Segments - looking like `:name` will match single path segments while `:name:` will - match multiple segments. The matches will go into `req.params`. Also any - query string will be stripped off, parsed out, and stored in `req.query`. - - `host` - Will filter against the `Host` header. This can be an exact match - or a glob match like `*.mydomain.org`. - - `filter` - Filter is a custom lua function that accepts `req` and returns - `true` or `false`. - -If the request matches all the requirements, then the middleware is called the -same as with `use`. - -### start - -Bind to the port(s), listen on the socket(s) and start accepting connections. - -## weblit/logger - -This is a simple middleware that logs the request method, url and user agent. -It also includes the response status code. - -Make sure to use it at the top of your middleware chain so that it's able to see -the final response code sent to the client. - -```lua -.use(require('weblit/logger')) -``` - -## weblit/auto-headers - -This implements lots of conventions and useful defaults that help your app -implement a proper HTTP server. - -You should always use this near the top of the list. The only middleware that -goes before this is the logger. - - -```lua -.use(require('weblit/auto-headers')) -``` - -## weblit/etag-cache - -This caches responses in memory keyed by etag. If there is no etag, but there -is a response body, it will use the body to generate an etag. - -Put this in your list after auto-headers, but before custom server logic. - -```lua -.use(require('weblit/etag-cache')) -``` - -## weblit/static - -This middleware serves static files to the user. Use this to serve your client- -side web assets. - -Usage is pretty simplistic for now. - -```lua -local static = require('weblit/static') -app.use(static("path/to/static/assets")) -``` - -If you want to only match a sub-path, use the router. - -```lua -app.route({ - path = "/blog/:path:" -}, static(pathJoin(module.dir, "articles"))) -``` - -The `path` param will be used if it exists and the full path will be used -otherwise. - -## weblit/websocket - -This implements a websocket upgrade handler. You can choose the subprotocol and -other routing information. - -```lua -app.websocket({ - path = "/v2/socket", -- Prefix for matching - protocol = "virgo/2.0", -- Restrict to a websocket sub-protocol -}, function (req, read, write) - -- Log the request headers - p(req) - -- Log and echo all messages - for message in read do - write(message) - end - -- End the stream - write() -end) -``` - - -## weblit - -This is the metapackage that simply includes the other modules. - -It exposes the other modules as a single exports table. - -```lua -exports.app = require('weblit/app') -exports.autoHeaders = require('weblit/auto-headers') -exports.etagCache = require('weblit/etag-cache') -exports.logger = require('weblit/logger') -exports.static = require('weblit/static') -exports.websocket = require('weblit/websocket') -``` diff --git a/plugins/weblit/app.lua b/plugins/weblit/app.lua deleted file mode 100644 index d3839c1df8e..00000000000 --- a/plugins/weblit/app.lua +++ /dev/null @@ -1,261 +0,0 @@ - - -local createServer = require('coro-net').createServer -local wrapper = require('coro-wrapper') -local readWrap, writeWrap = wrapper.reader, wrapper.writer -local httpCodec = require('http-codec') ---local tlsWrap = require('coro-tls').wrap -local parseQuery = require('querystring').parse - --- Ignore SIGPIPE if it exists on platform -local uv = require('luv') -if uv.constants.SIGPIPE then - uv.new_signal():start("sigpipe") -end - -local server = {} -local handlers = {} -local bindings = {} - --- Provide a nice case insensitive interface to headers. -local headerMeta = { - __index = function (list, name) - if type(name) ~= "string" then - return rawget(list, name) - end - name = name:lower() - for i = 1, #list do - local key, value = unpack(list[i]) - if key:lower() == name then return value end - end - end, - __newindex = function (list, name, value) - -- non-string keys go through as-is. - if type(name) ~= "string" then - return rawset(list, name, value) - end - -- First remove any existing pairs with matching key - local lowerName = name:lower() - for i = #list, 1, -1 do - if list[i][1]:lower() == lowerName then - table.remove(list, i) - end - end - -- If value is nil, we're done - if value == nil then return end - -- Otherwise, set the key(s) - if (type(value) == "table") then - -- We accept a table of strings - for i = 1, #value do - rawset(list, #list + 1, {name, tostring(value[i])}) - end - else - -- Or a single value interperted as string - rawset(list, #list + 1, {name, tostring(value)}) - end - end, -} - -local function handleRequest(head, input, socket) - local req = { - socket = socket, - method = head.method, - path = head.path, - headers = setmetatable({}, headerMeta), - version = head.version, - keepAlive = head.keepAlive, - body = input - } - for i = 1, #head do - req.headers[i] = head[i] - end - - local res = { - code = 404, - headers = setmetatable({}, headerMeta), - body = "Not Found\n", - } - - local function run(i) - local success, err = pcall(function () - i = i or 1 - local go = i < #handlers - and function () - return run(i + 1) - end - or function () end - return handlers[i](req, res, go) - end) - if not success then - res.code = 500 - res.headers = setmetatable({}, headerMeta) - res.body = err - print(err) - end - end - run(1) - - local out = { - code = res.code, - keepAlive = res.keepAlive, - } - for i = 1, #res.headers do - out[i] = res.headers[i] - end - return out, res.body, res.upgrade -end - -local function handleConnection(rawRead, rawWrite, socket) - - -- Speak in HTTP events - local read, updateDecoder = readWrap(rawRead, httpCodec.decoder()) - local write, updateEncoder = writeWrap(rawWrite, httpCodec.encoder()) - - for head in read do - local parts = {} - for chunk in read do - if #chunk > 0 then - parts[#parts + 1] = chunk - else - break - end - end - local res, body, upgrade = handleRequest(head, #parts > 0 and table.concat(parts) or nil, socket) - write(res) - if upgrade then - return upgrade(read, write, updateDecoder, updateEncoder, socket) - end - write(body) - if not (res.keepAlive and head.keepAlive) then - break - end - end - write() - -end - -function server.bind(options) - if not options.host then - options.host = "127.0.0.1" - end - if not options.port then - options.port = require('uv').getuid() == 0 and - (options.tls and 443 or 80) or - (options.tls and 8443 or 8080) - end - bindings[#bindings + 1] = options - return server -end - -function server.use(handler) - handlers[#handlers + 1] = handler - return server -end - - -function server.start() - if #bindings == 0 then - server.bind({}) - end - for i = 1, #bindings do - local options = bindings[i] - createServer(options, function (rawRead, rawWrite, socket) - --local tls = options.tls - --if tls then - --rawRead, rawWrite = tlsWrap(rawRead, rawWrite, { - -- server = true, - --key = assert(tls.key, "tls key required"), - --cert = assert(tls.cert, "tls cert required"), - --}) - --end - return handleConnection(rawRead, rawWrite, socket) - end) - print("HTTP server listening at http" .. (options.tls and "s" or "") .. "://" .. options.host .. (options.port == (options.tls and 443 or 80) and "" or ":" .. options.port) .. "/") - end - return server -end - -local quotepattern = '(['..("%^$().[]*+-?"):gsub("(.)", "%%%1")..'])' -local function escape(str) - return str:gsub(quotepattern, "%%%1") -end - -local function compileGlob(glob) - local parts = {"^"} - for a, b in glob:gmatch("([^*]*)(%**)") do - if #a > 0 then - parts[#parts + 1] = escape(a) - end - if #b > 0 then - parts[#parts + 1] = "(.*)" - end - end - parts[#parts + 1] = "$" - local pattern = table.concat(parts) - return function (string) - return string and string:match(pattern) - end -end - -local function compileRoute(route) - local parts = {"^"} - local names = {} - for a, b, c, d in route:gmatch("([^:]*):([_%a][_%w]*)(:?)([^:]*)") do - if #a > 0 then - parts[#parts + 1] = escape(a) - end - if #c > 0 then - parts[#parts + 1] = "(.*)" - else - parts[#parts + 1] = "([^/]*)" - end - names[#names + 1] = b - if #d > 0 then - parts[#parts + 1] = escape(d) - end - end - if #parts == 1 then - return function (string) - if string == route then return {} end - end - end - parts[#parts + 1] = "$" - local pattern = table.concat(parts) - return function (string) - local matches = {string:match(pattern)} - if #matches > 0 then - local results = {} - for i = 1, #matches do - results[i] = matches[i] - results[names[i]] = matches[i] - end - return results - end - end -end - -function server.route(options, handler) - local method = options.method - local path = options.path and compileRoute(options.path) - local host = options.host and compileGlob(options.host) - local filter = options.filter - server.use(function (req, res, go) - if method and req.method ~= method then return go() end - if host and not host(req.headers.host) then return go() end - if filter and not filter(req) then return go() end - local params - if path then - local pathname, query = req.path:match("^([^?]*)%??(.*)") - params = path(pathname) - if not params then return go() end - if #query > 0 then - req.query = parseQuery(query) - end - end - req.params = params or {} - return handler(req, res, go) - end) - return server -end - -return server diff --git a/plugins/weblit/auto-headers.lua b/plugins/weblit/auto-headers.lua deleted file mode 100644 index 44ad65779e9..00000000000 --- a/plugins/weblit/auto-headers.lua +++ /dev/null @@ -1,92 +0,0 @@ - - ---[[ - -Response automatic values: - - Auto Server header - - Auto Date Header - - code defaults to 404 with body "Not Found\n" - - if there is a string body add Content-Length and ETag if missing - - if string body and no Content-Type, use text/plain for valid utf-8, application/octet-stream otherwise - - Auto add "; charset=utf-8" to Content-Type when body is known to be valid utf-8 - - Auto 304 responses for if-none-match requests - - Auto strip body with HEAD requests - - Auto chunked encoding if body with unknown length - - if Connection header set and not keep-alive, set res.keepAlive to false - - Add Connection Keep-Alive/Close if not found based on res.keepAlive - ---TODO: utf8 scanning - -]] - ---local digest = require('openssl').digest.digest -local date = require('os').date - -return function (req, res, go) - local isHead = false - if req.method == "HEAD" then - req.method = "GET" - isHead = true - end - - local requested = req.headers["if-none-match"] - - go() - - -- We could use the fancy metatable, but this is much faster - local lowerHeaders = {} - local headers = res.headers - for i = 1, #headers do - local key, value = unpack(headers[i]) - lowerHeaders[key:lower()] = value - end - - - if not lowerHeaders.server then - headers[#headers + 1] = {"Server", serverName} - end - if not lowerHeaders.date then - headers[#headers + 1] = {"Date", date("!%a, %d %b %Y %H:%M:%S GMT")} - end - - if not lowerHeaders.connection then - if req.keepAlive then - lowerHeaders.connection = "Keep-Alive" - headers[#headers + 1] = {"Connection", "Keep-Alive"} - else - headers[#headers + 1] = {"Connection", "Close"} - end - end - res.keepAlive = lowerHeaders.connection and lowerHeaders.connection:lower() == "keep-alive" - - local body = res.body - if body then - local needLength = not lowerHeaders["content-length"] and not lowerHeaders["transfer-encoding"] - if type(body) == "string" then - if needLength then - headers[#headers + 1] = {"Content-Length", #body} - end - -- if not lowerHeaders.etag then - -- local etag = '"' .. digest("sha1", body) .. '"' - -- lowerHeaders.etag = etag - --headers[#headers + 1] = {"ETag", etag} - -- end - else - if needLength then - headers[#headers + 1] = {"Transfer-Encoding", "chunked"} - end - end - if not lowerHeaders["content-type"] then - headers[#headers + 1] = {"Content-Type", "text/plain"} - end - end - - local etag = lowerHeaders.etag - if requested and res.code >= 200 and res.code < 300 and requested == etag then - res.code = 304 - body = nil - end - - if isHead then body = nil end - res.body = body -end diff --git a/plugins/weblit/etag-cache.lua b/plugins/weblit/etag-cache.lua deleted file mode 100644 index e8c5d149b35..00000000000 --- a/plugins/weblit/etag-cache.lua +++ /dev/null @@ -1,39 +0,0 @@ - -local function clone(headers) - local copy = setmetatable({}, getmetatable(headers)) - for i = 1, #headers do - copy[i] = headers[i] - end - return copy -end - -local cache = {} -return function (req, res, go) - local requested = req.headers["If-None-Match"] - local host = req.headers.Host - local key = host and host .. "|" .. req.path or req.path - local cached = cache[key] - if not requested and cached then - req.headers["If-None-Match"] = cached.etag - end - go() - local etag = res.headers.ETag - if not etag then return end - if res.code >= 200 and res.code < 300 then - local body = res.body - if not body or type(body) == "string" then - cache[key] = { - etag = etag, - code = res.code, - headers = clone(res.headers), - body = body - } - end - elseif res.code == 304 then - if not requested and cached and etag == cached.etag then - res.code = cached.code - res.headers = clone(cached.headers) - res.body = cached.body - end - end -end diff --git a/plugins/weblit/init.lua b/plugins/weblit/init.lua deleted file mode 100644 index f9224b7880c..00000000000 --- a/plugins/weblit/init.lua +++ /dev/null @@ -1,8 +0,0 @@ -local exports = {} -exports.app = require('weblit/app') -exports.autoHeaders = require('weblit/auto-headers') -exports.etagCache = require('weblit/etag-cache') -exports.logger = require('weblit/logger') -exports.static = require('weblit/static') -exports.websocket = require('weblit/websocket') -return exports diff --git a/plugins/weblit/logger.lua b/plugins/weblit/logger.lua deleted file mode 100644 index 912b4eed768..00000000000 --- a/plugins/weblit/logger.lua +++ /dev/null @@ -1,10 +0,0 @@ - -return function (req, res, go) - -- Skip this layer for clients who don't send User-Agent headers. - local userAgent = req.headers["user-agent"] - if not userAgent then return go() end - -- Run all inner layers first. - go() - -- And then log after everything is done - --print(string.format("%s %s %s %s", req.method, req.path, userAgent, res.code)) -end diff --git a/plugins/weblit/plugin.json b/plugins/weblit/plugin.json deleted file mode 100644 index 69dd45ccc0e..00000000000 --- a/plugins/weblit/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "weblit", - "version": "1.0.0", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/plugins/weblit/static.lua b/plugins/weblit/static.lua deleted file mode 100644 index b34ea638fa1..00000000000 --- a/plugins/weblit/static.lua +++ /dev/null @@ -1,62 +0,0 @@ - -local getType = require("mime").getType -local jsonStringify = require('json').stringify - -local makeChroot = require('coro-fs').chroot - -return function (rootPath) - - local fs = makeChroot(rootPath) - - return function (req, res, go) - if req.method ~= "GET" then return go() end - local path = (req.params and req.params.path) or req.path - path = path:match("^[^?#]*") - if path:byte(1) == 47 then - path = path:sub(2) - end - local stat = fs.stat(path) - if not stat then return go() end - - local function renderFile() - local body = assert(fs.readFile(path)) - res.code = 200 - res.headers["Content-Type"] = getType(path) - res.body = body - return - end - - local function renderDirectory() - if req.path:byte(-1) ~= 47 then - res.code = 301 - res.headers.Location = req.path .. '/' - return - end - local files = {} - for entry in fs.scandir(path) do - if entry.name == "index.html" and entry.type == "file" then - path = (#path > 0 and path .. "/" or "") .. "index.html" - return renderFile() - end - files[#files + 1] = entry - entry.url = "http://" .. req.headers.host .. req.path .. entry.name - end - local body = jsonStringify(files) .. "\n" - res.code = 200 - res.headers["Content-Type"] = "application/json" - res.body = body - return - end - - if stat.type == "directory" then - return renderDirectory() - elseif stat.type == "file" then - if req.path:byte(-1) == 47 then - res.code = 301 - res.headers.Location = req.path:match("^(.*[^/])/+$") - return - end - return renderFile() - end - end -end diff --git a/plugins/weblit/websocket.lua b/plugins/weblit/websocket.lua deleted file mode 100644 index d5dfe572ea6..00000000000 --- a/plugins/weblit/websocket.lua +++ /dev/null @@ -1,82 +0,0 @@ - -local websocketCodec = require('websocket-codec') - -local function websocketHandler(options, handler) - return function (req, res, go) - -- Websocket connections must be GET requests - -- with 'Upgrade: websocket' - -- and 'Connection: Upgrade' headers - local headers = req.headers - local connection = headers.connection - local upgrade = headers.upgrade - if not ( - req.method == "GET" and - upgrade and upgrade:lower():find("websocket", 1, true) and - connection and connection:lower():find("upgrade", 1, true) - ) then - return go() - end - - if options.filter and not options.filter(req) then - return go() - end - - -- If there is a sub-protocol specified, filter on it. - local protocol = options.protocol - if protocol then - local list = headers["sec-websocket-protocol"] - local foundProtocol - if list then - for item in list:gmatch("[^, ]+") do - if item == protocol then - foundProtocol = true - break - end - end - end - if not foundProtocol then - return go() - end - end - - -- Make sure it's a new client speaking v13 of the protocol - assert(tonumber(headers["sec-websocket-version"]) >= 13, "only websocket protocol v13 supported") - - -- Get the security key - local key = assert(headers["sec-websocket-key"], "websocket security required") - - res.code = 101 - headers = res.headers - headers.Upgrade = "websocket" - headers.Connection = "Upgrade" - headers["Sec-WebSocket-Accept"] = websocketCodec.acceptKey(key) - if protocol then - headers["Sec-WebSocket-Protocol"] = protocol - end - function res.upgrade(read, write, updateDecoder, updateEncoder) - updateDecoder(websocketCodec.decode) - updateEncoder(websocketCodec.encode) - local success, err = pcall(handler, req, read, write) - if not success then - print(err) - write({ - opcode = 1, - payload = err, - }) - return write() - end - end - end -end - -local server = require('weblit-app') -function server.websocket(options, handler) - server.route({ - method = "GET", - path = options.path, - host = options.host, - }, websocketHandler(options, handler)) - return server -end - -return websocketHandler diff --git a/plugins/webserver/init.lua b/plugins/webserver/init.lua deleted file mode 100644 index 3d68b01e6d5..00000000000 --- a/plugins/webserver/init.lua +++ /dev/null @@ -1,34 +0,0 @@ -local exports = {} -exports.name = "webserver" -exports.version = "1.0.0" -exports.description = "A simple web server" -exports.license = "MIT" -exports.author = { name = "Miodrag Milanovic" } - -local ws = exports - -local app = require('weblit/app') - -function ws.startplugin() - app.bind({ - host = "0.0.0.0", - port = 8080 - }) - - app.use(require('weblit/logger')) - app.use(require('weblit/auto-headers')) - app.use(require('weblit/etag-cache')) - - app.route({ - method = "GET", - path = "/", - }, function (req, res, go) - res.code = 200 - res.headers["Content-Type"] = "text/html" - res.body = "

Hello!

\n" - end) - - app.start() -end - -return exports diff --git a/plugins/webserver/plugin.json b/plugins/webserver/plugin.json deleted file mode 100644 index e420a5d5485..00000000000 --- a/plugins/webserver/plugin.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "plugin": { - "name": "webserver", - "version": "1.0.0", - "author": "Miodrag Milanovic", - "type": "plugin", - "start": "false", - } -} \ No newline at end of file diff --git a/plugins/websocket-codec/LICENSE b/plugins/websocket-codec/LICENSE deleted file mode 100644 index 5789b767285..00000000000 --- a/plugins/websocket-codec/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Tim Caswell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/plugins/websocket-codec/README.md b/plugins/websocket-codec/README.md deleted file mode 100644 index 50f41340dce..00000000000 --- a/plugins/websocket-codec/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luv-websocket-codec -A luv port of lit's websocket codec diff --git a/plugins/websocket-codec/init.lua b/plugins/websocket-codec/init.lua deleted file mode 100644 index 8a7da7f9190..00000000000 --- a/plugins/websocket-codec/init.lua +++ /dev/null @@ -1,261 +0,0 @@ -local exports = {} - -exports.name = "creationix/websocket-codec" -exports.version = "1.0.7" -exports.homepage = "https://github.com/luvit/lit/blob/master/deps/websocket-codec.lua" -exports.description = "A codec implementing websocket framing and helpers for handshakeing" -exports.tags = {"http", "websocket", "codec"} -exports.license = "MIT" -exports.author = { name = "Tim Caswell" } - -local digest = require('openssl').digest.digest -local base64 = require('openssl').base64 -local random = require('openssl').random -local bit = require('bit') - -local band = bit.band -local bor = bit.bor -local bxor = bit.bxor -local rshift = bit.rshift -local lshift = bit.lshift -local char = string.char -local byte = string.byte -local sub = string.sub -local gmatch = string.gmatch -local lower = string.lower -local gsub = string.gsub -local concat = table.concat - -local function applyMask(data, mask) - local bytes = { - [0] = byte(mask, 1), - [1] = byte(mask, 2), - [2] = byte(mask, 3), - [3] = byte(mask, 4) - } - local out = {} - for i = 1, #data do - out[i] = char( - bxor(byte(data, i), bytes[(i - 1) % 4]) - ) - end - return concat(out) -end - -function exports.decode(chunk) - if #chunk < 2 then return end - local second = byte(chunk, 2) - local len = band(second, 0x7f) - local offset - if len == 126 then - if #chunk < 4 then return end - len = bor( - lshift(byte(chunk, 3), 8), - byte(chunk, 4)) - offset = 4 - elseif len == 127 then - if #chunk < 10 then return end - len = bor( - lshift(byte(chunk, 3), 56), - lshift(byte(chunk, 4), 48), - lshift(byte(chunk, 5), 40), - lshift(byte(chunk, 6), 32), - lshift(byte(chunk, 7), 24), - lshift(byte(chunk, 8), 16), - lshift(byte(chunk, 9), 8), - byte(chunk, 10)) - offset = 10 - else - offset = 2 - end - local mask = band(second, 0x80) > 0 - if mask then - offset = offset + 4 - end - if #chunk < offset + len then return end - - local first = byte(chunk, 1) - local payload = sub(chunk, offset + 1, offset + len) - assert(#payload == len, "Length mismatch") - if mask then - payload = applyMask(payload, sub(chunk, offset - 3, offset)) - end - local extra = sub(chunk, offset + len + 1) - return { - fin = band(first, 0x80) > 0, - rsv1 = band(first, 0x40) > 0, - rsv2 = band(first, 0x20) > 0, - rsv3 = band(first, 0x10) > 0, - opcode = band(first, 0xf), - mask = mask, - len = len, - payload = payload - }, extra -end - -function exports.encode(item) - if type(item) == "string" then - item = { - opcode = 2, - payload = item - } - end - local payload = item.payload - assert(type(payload) == "string", "payload must be string") - local len = #payload - local fin = item.fin - if fin == nil then fin = true end - local rsv1 = item.rsv1 - local rsv2 = item.rsv2 - local rsv3 = item.rsv3 - local opcode = item.opcode or 2 - local mask = item.mask - local chars = { - char(bor( - fin and 0x80 or 0, - rsv1 and 0x40 or 0, - rsv2 and 0x20 or 0, - rsv3 and 0x10 or 0, - opcode - )), - char(bor( - mask and 0x80 or 0, - len < 126 and len or (len < 0x10000) and 126 or 127 - )) - } - if len >= 0x10000 then - chars[3] = char(band(rshift(len, 56), 0xff)) - chars[4] = char(band(rshift(len, 48), 0xff)) - chars[5] = char(band(rshift(len, 40), 0xff)) - chars[6] = char(band(rshift(len, 32), 0xff)) - chars[7] = char(band(rshift(len, 24), 0xff)) - chars[8] = char(band(rshift(len, 16), 0xff)) - chars[9] = char(band(rshift(len, 8), 0xff)) - chars[10] = char(band(len, 0xff)) - elseif len >= 126 then - chars[3] = char(band(rshift(len, 8), 0xff)) - chars[4] = char(band(len, 0xff)) - end - if mask then - local key = random(4) - return concat(chars) .. key .. applyMask(payload, key) - end - return concat(chars) .. payload -end - -local websocketGuid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" - -function exports.acceptKey(key) - return gsub(base64(digest("sha1", key .. websocketGuid, true)), "\n", "") -end -local acceptKey = exports.acceptKey - --- Make a client handshake connection -function exports.handshake(options, request) - local key = gsub(base64(random(20)), "\n", "") - local host = options.host - local path = options.path or "/" - local protocol = options.protocol - local req = { - method = "GET", - path = path, - {"Connection", "Upgrade"}, - {"Upgrade", "websocket"}, - {"Sec-WebSocket-Version", "13"}, - {"Sec-WebSocket-Key", key}, - } - for i = 1, #options do - req[#req + 1] = options[i] - end - if host then - req[#req + 1] = {"Host", host} - end - if protocol then - req[#req + 1] = {"Sec-WebSocket-Protocol", protocol} - end - local res = request(req) - if not res then - return nil, "Missing response from server" - end - -- Parse the headers for quick reading - if res.code ~= 101 then - return nil, "response must be code 101" - end - - local headers = {} - for i = 1, #res do - local name, value = unpack(res[i]) - headers[lower(name)] = value - end - - if not headers.connection or lower(headers.connection) ~= "upgrade" then - return nil, "Invalid or missing connection upgrade header in response" - end - if headers["sec-websocket-accept"] ~= acceptKey(key) then - return nil, "challenge key missing or mismatched" - end - if protocol and headers["sec-websocket-protocol"] ~= protocol then - return nil, "protocol missing or mistmatched" - end - return true -end - -function exports.handleHandshake(head, protocol) - - -- WebSocket connections must be GET requests - if not head.method == "GET" then return end - - -- Parse the headers for quick reading - local headers = {} - for i = 1, #head do - local name, value = unpack(head[i]) - headers[lower(name)] = value - end - - -- Must have 'Upgrade: websocket' and 'Connection: Upgrade' headers - if not (headers.connection and headers.upgrade and - headers.connection:lower():find("upgrade", 1, true) and - headers.upgrade:lower():find("websocket", 1, true)) then return end - - -- Make sure it's a new client speaking v13 of the protocol - if tonumber(headers["sec-websocket-version"]) < 13 then - return nil, "only websocket protocol v13 supported" - end - - local key = headers["sec-websocket-key"] - if not key then - return nil, "websocket security key missing" - end - - -- If the server wants a specified protocol, check for it. - if protocol then - local foundProtocol = false - local list = headers["sec-websocket-protocol"] - if list then - for item in gmatch(list, "[^, ]+") do - if item == protocol then - foundProtocol = true - break - end - end - end - if not foundProtocol then - return nil, "specified protocol missing in request" - end - end - - local accept = acceptKey(key) - - local res = { - code = 101, - {"Upgrade", "websocket"}, - {"Connection", "Upgrade"}, - {"Sec-WebSocket-Accept", accept}, - } - if protocol then - res[#res + 1] = {"Sec-WebSocket-Protocol", protocol} - end - - return res -end -return exports diff --git a/plugins/websocket-codec/plugin.json b/plugins/websocket-codec/plugin.json deleted file mode 100644 index 00a49dbcba3..00000000000 --- a/plugins/websocket-codec/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "plugin": { - "name": "websocket-codec", - "version": "1.0.7", - "author": "Tim Caswell", - "type": "library", - } -} \ No newline at end of file diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 82fb09947de..330a31221ee 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -510,64 +510,6 @@ project "lualibs" MAME_DIR .. "3rdparty/luafilesystem/src/lfs.c", } --------------------------------------------------- --- luv lua library objects --------------------------------------------------- -if _OPTIONS["USE_LIBUV"]=="1" then -project "luv" - uuid "d98ec5ca-da2a-4a50-88a2-52061ca53871" - kind "StaticLib" - - if _OPTIONS["targetos"]=="windows" then - defines { - "_WIN32_WINNT=0x0600", - } - end - - configuration { "vs*" } - buildoptions { - "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data - } - - configuration { "gmake" } - buildoptions_c { - "-Wno-unused-function", - "-Wno-strict-prototypes", - "-Wno-unused-variable", - "-Wno-undef", - } - - configuration { "not android-*" } - buildoptions_c { - "-Wno-maybe-uninitialized", - } - - configuration { "vs2015" } - buildoptions { - "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used - "/wd4703", -- warning C4703: potentially uninitialized local pointer variable 'xxx' used - } - - configuration { } - defines { - "LUA_COMPAT_ALL", - } - - includedirs { - MAME_DIR .. "3rdparty/lua/src", - MAME_DIR .. "3rdparty/libuv/include", - } - if _OPTIONS["with-bundled-lua"] then - includedirs { - MAME_DIR .. "3rdparty/luv/deps/lua/src", - } - end - - files { - MAME_DIR .. "3rdparty/luv/src/luv.c", - MAME_DIR .. "3rdparty/luv/src/luv.h", - } -end -------------------------------------------------- -- SQLite3 library objects -------------------------------------------------- diff --git a/scripts/src/main.lua b/scripts/src/main.lua index eafcc59f72e..daa73731b90 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -165,7 +165,6 @@ end if _OPTIONS["USE_LIBUV"]=="1" then links { - "luv", "uv", "http-parser", } diff --git a/src/emu/luaengine.cpp b/src/emu/luaengine.cpp index ecf1b418de5..d35a10d9167 100644 --- a/src/emu/luaengine.cpp +++ b/src/emu/luaengine.cpp @@ -19,9 +19,6 @@ #include "ui/ui.h" #include "luaengine.h" #include -#if !defined(NO_LIBUV) -#include "libuv/include/uv.h" -#endif //************************************************************************** // LUA ENGINE @@ -52,10 +49,6 @@ extern "C" { int luaopen_lsqlite3(lua_State *L); int luaopen_zlib(lua_State *L); int luaopen_lfs(lua_State *L); -#if !defined(NO_LIBUV) - int luaopen_luv(lua_State *L); - uv_loop_t* luv_loop(lua_State* L); -#endif } static void lstop(lua_State *L, lua_Debug *ar) @@ -1199,12 +1192,6 @@ lua_engine::lua_engine() lua_getfield(m_lua_state, -1, "preload"); lua_remove(m_lua_state, -2); // Remove package -#if !defined(NO_LIBUV) - // Store uv module definition at preload.uv - lua_pushcfunction(m_lua_state, luaopen_luv); - lua_setfield(m_lua_state, -2, "luv"); -#endif - lua_pushcfunction(m_lua_state, luaopen_zlib); lua_setfield(m_lua_state, -2, "zlib"); @@ -1670,11 +1657,6 @@ void lua_engine::periodic_check() msg.ready = 0; msg.done = 1; } -#if !defined(NO_LIBUV) - auto loop = luv_loop(m_lua_state); - if (loop!=nullptr) - uv_run(loop, UV_RUN_NOWAIT); -#endif } //------------------------------------------------- -- cgit v1.2.3-70-g09d2 From 2ed0b0f5c6bf2d933eccbb47059da075b27c45f7 Mon Sep 17 00:00:00 2001 From: angelosa Date: Fri, 4 Mar 2016 22:55:28 +0100 Subject: Checkpoint, nw --- src/mame/drivers/sprcros2.cpp | 470 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 439 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/sprcros2.cpp b/src/mame/drivers/sprcros2.cpp index 040b508ee5c..9ec331bcfe7 100644 --- a/src/mame/drivers/sprcros2.cpp +++ b/src/mame/drivers/sprcros2.cpp @@ -1,9 +1,15 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:Angelo Salese +/*************************************************************************** -// **** SKELETON DRIVER **** original removed due to unresolved licensing. +TODO: +- complete rewrite; +- scanline renderer; +- understand irq 0 source; +- output bit 0 might be watchdog armed bit/sprite start DMA instead of irq enable; + +=================================== -/* Super Cross II (JPN Ver.) (c)1986 GM Shoji @@ -39,47 +45,445 @@ SCM-23.5B SC-60.4K SC-61.5A -*/ +***************************************************************************/ #include "emu.h" +#include "cpu/z80/z80.h" +#include "sound/sn76496.h" + +#define MAIN_CLOCK XTAL_10MHz class sprcros2_state : public driver_device { public: sprcros2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) + : driver_device(mconfig, type, tag), + m_master_cpu(*this, "master_cpu"), + m_slave_cpu(*this, "slave_cpu"), + m_gfxdecode(*this, "gfxdecode"), + m_fgvram(*this, "fgvram"), + m_fgattr(*this, "fgattr"), + m_bgvram(*this, "bgvram"), + m_bgattr(*this, "bgattr"), + m_sprram(*this, "sprram") { } + // devices + required_device m_master_cpu; + required_device m_slave_cpu; + required_device m_gfxdecode; + + required_shared_ptr m_fgvram; + required_shared_ptr m_fgattr; + required_shared_ptr m_bgvram; + required_shared_ptr m_bgattr; + required_shared_ptr m_sprram; + + + // screen updates + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + DECLARE_PALETTE_INIT(sprcros2); + DECLARE_WRITE8_MEMBER(master_output_w); + DECLARE_WRITE8_MEMBER(slave_output_w); + DECLARE_WRITE8_MEMBER(bg_scrollx_w); + DECLARE_WRITE8_MEMBER(bg_scrolly_w); + INTERRUPT_GEN_MEMBER(master_vblank_irq); + INTERRUPT_GEN_MEMBER(slave_vblank_irq); + TIMER_DEVICE_CALLBACK_MEMBER(master_scanline); + + bool m_master_nmi_enable; + bool m_master_irq_enable; + bool m_slave_nmi_enable; + UINT8 m_bg_scrollx, m_bg_scrolly; +protected: + // driver_device overrides + virtual void machine_start(); + virtual void machine_reset(); + + virtual void video_start(); + + }; +void sprcros2_state::video_start() +{ +} + +UINT32 sprcros2_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) +{ + gfx_element *gfx_0 = m_gfxdecode->gfx(0); + gfx_element *gfx_1 = m_gfxdecode->gfx(1); + gfx_element *gfx_2 = m_gfxdecode->gfx(2); + int y,x; + int count = 0; + + for (y=0;y<32;y++) + { + for (x=0;x<32;x++) + { + UINT16 tile = m_bgvram[count]; + tile |= (m_bgattr[count] & 7) << 8; + bool flipx = bool(m_bgattr[count] & 0x08); + UINT8 color = (m_bgattr[count] & 0xf0) >> 4; + + gfx_0->opaque(bitmap,cliprect,tile,color,flipx,0,x*8-m_bg_scrollx,y*8-m_bg_scrolly); + gfx_0->opaque(bitmap,cliprect,tile,color,flipx,0,x*8+256-m_bg_scrollx,y*8-m_bg_scrolly); + gfx_0->opaque(bitmap,cliprect,tile,color,flipx,0,x*8-m_bg_scrollx,y*8+256-m_bg_scrolly); + gfx_0->opaque(bitmap,cliprect,tile,color,flipx,0,x*8+256-m_bg_scrollx,y*8+256-m_bg_scrolly); + + count++; + } + } + + for(count=0x40-4;count>-1;count-=4) + { + UINT8 x,y,tile,color; + bool flipx; + + y = m_sprram[count+2]; + x = m_sprram[count+3]; + tile = m_sprram[count+0]; + flipx = bool(m_sprram[count+1] & 2); + color = (m_sprram[count+1] & 0x38) >> 3; + gfx_1->transpen(bitmap,cliprect,tile,color,flipx,0,x,y,0); + } + + + count = 0; + + //gfx = m_gfxdecode->gfx(2); + + for (y=0;y<32;y++) + { + for (x=0;x<32;x++) + { + UINT16 tile = m_fgvram[count]; + tile |= (m_fgattr[count] & 3) << 8; + UINT8 color = (m_fgattr[count] & 0xfc) >> 2; + + gfx_2->transpen(bitmap,cliprect,tile,color,0,0,x*8,y*8,0); + + count++; + } + } + + + return 0; +} + +WRITE8_MEMBER(sprcros2_state::master_output_w) +{ + popmessage("%02x",data); + if(data & 0xbe) + printf("master 07 -> %02x\n",data); + + membank("master_rombank")->set_entry((data&0x40)>>6); + m_master_nmi_enable = bool(data & 1); + m_master_irq_enable = bool(data & 8); +// if(data & 0x80) +// m_master_cpu->set_input_line(0,HOLD_LINE); +} + +WRITE8_MEMBER(sprcros2_state::slave_output_w) +{ + if(data & 0xf6) + printf("slave 03 -> %02x\n",data); + + m_slave_nmi_enable = bool(data & 1); + membank("slave_rombank")->set_entry((data&8)>>3); +} + +WRITE8_MEMBER(sprcros2_state::bg_scrollx_w) +{ + m_bg_scrollx = data; +} + +WRITE8_MEMBER(sprcros2_state::bg_scrolly_w) +{ + m_bg_scrolly = data; +} + +static ADDRESS_MAP_START( master_map, AS_PROGRAM, 8, sprcros2_state ) + AM_RANGE(0x0000, 0xbfff) AM_ROM AM_REGION("master", 0) + AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("master_rombank") + AM_RANGE(0xe000, 0xe3ff) AM_RAM AM_SHARE("fgvram") + AM_RANGE(0xe400, 0xe7ff) AM_RAM AM_SHARE("fgattr") + AM_RANGE(0xe800, 0xe83f) AM_RAM AM_SHARE("sprram") + AM_RANGE(0xe840, 0xf7ff) AM_RAM + AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE("shared_ram") +ADDRESS_MAP_END + +static ADDRESS_MAP_START( master_io, AS_IO, 8, sprcros2_state ) + ADDRESS_MAP_GLOBAL_MASK(0xff) + AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") AM_DEVWRITE("sn1", sn76489_device, write) + AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") AM_DEVWRITE("sn2", sn76489_device, write) + AM_RANGE(0x02, 0x02) AM_READ_PORT("EXTRA") AM_DEVWRITE("sn3", sn76489_device, write) + AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW1") + AM_RANGE(0x05, 0x05) AM_READ_PORT("DSW2") + AM_RANGE(0x07, 0x07) AM_WRITE(master_output_w) +ADDRESS_MAP_END + +static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 8, sprcros2_state ) + AM_RANGE(0x0000, 0xbfff) AM_ROM AM_REGION("slave", 0) + AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("slave_rombank") + AM_RANGE(0xe000, 0xe3ff) AM_RAM AM_SHARE("bgvram") + AM_RANGE(0xe400, 0xe7ff) AM_RAM AM_SHARE("bgattr") + AM_RANGE(0xe800, 0xf7ff) AM_RAM + AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE("shared_ram") +ADDRESS_MAP_END + +static ADDRESS_MAP_START( slave_io, AS_IO, 8, sprcros2_state ) + ADDRESS_MAP_GLOBAL_MASK(0xff) + AM_RANGE(0x00, 0x00) AM_WRITE(bg_scrollx_w) + AM_RANGE(0x01, 0x01) AM_WRITE(bg_scrolly_w) + AM_RANGE(0x03, 0x03) AM_WRITE(slave_output_w) +ADDRESS_MAP_END static INPUT_PORTS_START( sprcros2 ) + PORT_START("P1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("P2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("EXTRA") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL + PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("DSW1") + PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x07, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x03, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x05, DEF_STR( 1C_6C ) ) + PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("DSW2") + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) + PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_UNUSED ) //unused coinage bits + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END +static const gfx_layout sprite_layout = +{ + 32,32, + RGN_FRAC(1,3), + 3, + { RGN_FRAC(0,3), RGN_FRAC(1,3), RGN_FRAC(2,3) }, + { STEP8(0,1), STEP8(256,1), STEP8(512,1), STEP8(768,1) }, + { STEP16(0,8), STEP16(128,8) }, + 32*32 +}; + +static const gfx_layout fg_layout = +{ + 8,8, + RGN_FRAC(1,1), + 2, + { 0, 4 }, + { STEP4(64,1), STEP4(0,1) }, + { STEP8(0,8) }, + 8*8*2 +}; + +static GFXDECODE_START( sprcros2 ) + GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x3_planar, 0, 16 ) + GFXDECODE_ENTRY( "gfx2", 0, sprite_layout, 256, 32 ) + GFXDECODE_ENTRY( "gfx3", 0, fg_layout, 512, 64 ) +GFXDECODE_END + + + +void sprcros2_state::machine_start() +{ + membank("master_rombank")->configure_entries(0, 2, memregion("master_bank")->base(), 0x2000); + membank("slave_rombank")->configure_entries(0, 2, memregion("slave_bank")->base(), 0x2000); + +} + +void sprcros2_state::machine_reset() +{ + m_master_nmi_enable = false; + m_slave_nmi_enable = false; +} + + +PALETTE_INIT_MEMBER(sprcros2_state, sprcros2) +{ + const UINT8 *color_prom = memregion("proms")->base(); + int i; + + /* create a lookup table for the palette */ + for (i = 0; i < 0x20; i++) + { + int bit0, bit1, bit2; + int r, g, b; + + /* red component */ + bit0 = (color_prom[i] >> 0) & 0x01; + bit1 = (color_prom[i] >> 1) & 0x01; + bit2 = (color_prom[i] >> 2) & 0x01; + r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + + /* green component */ + bit0 = (color_prom[i] >> 3) & 0x01; + bit1 = (color_prom[i] >> 4) & 0x01; + bit2 = (color_prom[i] >> 5) & 0x01; + g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + + /* blue component */ + bit0 = (color_prom[i] >> 6) & 0x01; + bit1 = (color_prom[i] >> 7) & 0x01; + b = 0x47 * bit0 + 0xb8 * bit1; + palette.set_pen_color(i,rgb_t(r,g,b)); + + palette.set_indirect_color(i, rgb_t(r, g, b)); + } + + /* color_prom now points to the beginning of the lookup table */ + color_prom += 0x20; + + /* bg */ + for (i = 0; i < 0x100; i++) + { + UINT8 ctabentry = (color_prom[i] & 0x0f) | ((color_prom[i + 0x100] & 0x0f) << 4); + palette.set_pen_indirect(i, ctabentry); + } + + /* sprites & fg */ + for (i = 0x100; i < 0x300; i++) + { + UINT8 ctabentry = color_prom[i + 0x100]; + palette.set_pen_indirect(i, ctabentry); + } +} + +INTERRUPT_GEN_MEMBER(sprcros2_state::master_vblank_irq) +{ + if(m_master_nmi_enable == true) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); +} + +INTERRUPT_GEN_MEMBER(sprcros2_state::slave_vblank_irq) +{ + if(m_slave_nmi_enable == true) + device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); +} + +TIMER_DEVICE_CALLBACK_MEMBER(sprcros2_state::master_scanline) +{ + int scanline = param; + + + if(scanline == 0 && m_master_irq_enable == true) + m_master_cpu->set_input_line(0, HOLD_LINE); +} static MACHINE_CONFIG_START( sprcros2, sprcros2_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("master_cpu",Z80,MAIN_CLOCK/4) + MCFG_CPU_PROGRAM_MAP(master_map) + MCFG_CPU_IO_MAP(master_io) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sprcros2_state, master_vblank_irq) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sprcros2_state, master_scanline, "screen", 0, 1) + + MCFG_CPU_ADD("slave_cpu",Z80,MAIN_CLOCK/4) + MCFG_CPU_PROGRAM_MAP(slave_map) + MCFG_CPU_IO_MAP(slave_io) + MCFG_CPU_VBLANK_INT_DRIVER("screen", sprcros2_state, slave_vblank_irq) + + MCFG_QUANTUM_PERFECT_CPU("master_cpu") + + /* video hardware */ + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_UPDATE_DRIVER(sprcros2_state, screen_update) + MCFG_SCREEN_REFRESH_RATE(60) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) + MCFG_SCREEN_SIZE(32*8, 32*8) + MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) +// MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK/2, 343, 0, 256, 262, 0, 256) // TODO: Wrong screen parameters + MCFG_SCREEN_PALETTE("palette") + + MCFG_GFXDECODE_ADD("gfxdecode", "palette", sprcros2) + + MCFG_PALETTE_ADD("palette", 768) + MCFG_PALETTE_INDIRECT_ENTRIES(32) + MCFG_PALETTE_INIT_OWNER(sprcros2_state, sprcros2) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("sn1", SN76489, 10000000/4) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + + MCFG_SOUND_ADD("sn2", SN76489, 10000000/4) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + + MCFG_SOUND_ADD("sn3", SN76489, 10000000/4) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MACHINE_CONFIG_END + +/*************************************************************************** + + Machine driver(s) + +***************************************************************************/ + + + ROM_START( sprcros2 ) - ROM_REGION( 0x14000, "master", 0 ) + ROM_REGION( 0x0c000, "master", 0 ) ROM_LOAD( "scm-03.10g", 0x00000, 0x4000, CRC(b9757908) SHA1(d59cb2aac1b6268fc766306850f5711d4a12d897) ) ROM_LOAD( "scm-02.10j", 0x04000, 0x4000, CRC(849c5c87) SHA1(0e02c4990e371d6a290efa53301818e769648945) ) ROM_LOAD( "scm-01.10k", 0x08000, 0x4000, CRC(385a62de) SHA1(847bf9d97ab3fa8949d9198e4e509948a940d6aa) ) - ROM_LOAD( "scm-00.10l", 0x10000, 0x4000, CRC(13fa3684) SHA1(611b7a237e394f285dcc5beb027dacdbdd58a7a0) ) + + ROM_REGION( 0x4000, "master_bank", 0) + ROM_LOAD( "scm-00.10l", 0x00000, 0x4000, CRC(13fa3684) SHA1(611b7a237e394f285dcc5beb027dacdbdd58a7a0) ) - ROM_REGION( 0x14000, "slave", 0 ) + ROM_REGION( 0xc000, "slave", 0 ) ROM_LOAD( "scs-30.5f", 0x00000, 0x4000, CRC(c0a40e41) SHA1(e74131b353855749258dffa45091c825ccdbf05a) ) ROM_LOAD( "scs-29.5h", 0x04000, 0x4000, CRC(83d49fa5) SHA1(7112110df2f382bbc0e651adcec975054a485b9b) ) ROM_LOAD( "scs-28.5j", 0x08000, 0x4000, CRC(480d351f) SHA1(d1b86f441ae0e58b30e0f089ab25de219d5f30e3) ) - ROM_LOAD( "scs-27.5k", 0x10000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) + + ROM_REGION( 0x4000, "slave_bank", 0) + ROM_LOAD( "scs-27.5k", 0x00000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) ROM_REGION( 0xc000, "gfx1", 0 ) //bg - ROM_LOAD( "scs-26.4b", 0x0000, 0x4000, CRC(f958b56d) SHA1(a1973179d336d2ba57294155550515f2b8a33a09) ) + ROM_LOAD( "scs-26.4b", 0x8000, 0x4000, CRC(f958b56d) SHA1(a1973179d336d2ba57294155550515f2b8a33a09) ) ROM_LOAD( "scs-25.4c", 0x4000, 0x4000, CRC(d6fd7ba5) SHA1(1c26c4c1655b2be9cb6103e75386cc2f0cf27fc5) ) - ROM_LOAD( "scs-24.4e", 0x8000, 0x4000, CRC(87783c36) SHA1(7102be795afcddd76b4d41823e95c65fe1ffbca0) ) + ROM_LOAD( "scs-24.4e", 0x0000, 0x4000, CRC(87783c36) SHA1(7102be795afcddd76b4d41823e95c65fe1ffbca0) ) ROM_REGION( 0xc000, "gfx2", 0 ) - ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) + ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) //sprites ROM_LOAD( "scm-22.5e", 0x4000, 0x4000, CRC(0cad254c) SHA1(36e30e30b652b3a388a3c4a82251196f79368f59) ) ROM_LOAD( "scm-21.5g", 0x8000, 0x4000, CRC(b6b68998) SHA1(cc3c6d996beeedcc7e5199f10d65c5b1d3c6e666) ) @@ -87,33 +491,37 @@ ROM_START( sprcros2 ) ROM_LOAD( "scm-20.5k", 0x0000, 0x4000, CRC(67a099a6) SHA1(43981abdcaa0ff36183027a3c691ce2df7f06ec7) ) ROM_REGION( 0x0420, "proms", 0 ) - ROM_LOAD( "sc-64.6a", 0x0000, 0x0020, CRC(336dd1c0) SHA1(f0a0d2c13617fd84ee55c0cb96643761a8735147) ) - ROM_LOAD( "sc-63.3b", 0x0020, 0x0100, CRC(9034a059) SHA1(1801965b4f0f3e04ca4b3faf0ba3a27dbb008474) ) - ROM_LOAD( "sc-62.3a", 0x0120, 0x0100, CRC(3c78a14f) SHA1(8f9c196a3e18bdce2d4855bc285bd5bde534bf09) ) - ROM_LOAD( "sc-61.5a", 0x0220, 0x0100, CRC(2f71185d) SHA1(974fbb52285f01f4353e9acb1992dcd6fdefedcb) ) - ROM_LOAD( "sc-60.4k", 0x0320, 0x0100, CRC(d7a4e57d) SHA1(6db02ec6aa55b05422cb505e63c71e36b4b11b4a) ) + ROM_LOAD( "sc-64.6a", 0x0000, 0x0020, CRC(336dd1c0) SHA1(f0a0d2c13617fd84ee55c0cb96643761a8735147) ) //palette + ROM_LOAD( "sc-63.3b", 0x0020, 0x0100, CRC(9034a059) SHA1(1801965b4f0f3e04ca4b3faf0ba3a27dbb008474) ) //bg clut lo nibble + ROM_LOAD( "sc-62.3a", 0x0120, 0x0100, CRC(3c78a14f) SHA1(8f9c196a3e18bdce2d4855bc285bd5bde534bf09) ) //bg clut hi nibble + ROM_LOAD( "sc-61.5a", 0x0220, 0x0100, CRC(2f71185d) SHA1(974fbb52285f01f4353e9acb1992dcd6fdefedcb) ) //sprite clut + ROM_LOAD( "sc-60.4k", 0x0320, 0x0100, CRC(d7a4e57d) SHA1(6db02ec6aa55b05422cb505e63c71e36b4b11b4a) ) //fg clut ROM_END ROM_START( sprcros2a ) - ROM_REGION( 0x14000, "master", 0 ) + ROM_REGION( 0xc000, "master", 0 ) ROM_LOAD( "15.bin", 0x00000, 0x4000, CRC(b9d02558) SHA1(775404c6c7648d9dab02b496541739ea700cd481) ) ROM_LOAD( "scm-02.10j", 0x04000, 0x4000, CRC(849c5c87) SHA1(0e02c4990e371d6a290efa53301818e769648945) ) ROM_LOAD( "scm-01.10k", 0x08000, 0x4000, CRC(385a62de) SHA1(847bf9d97ab3fa8949d9198e4e509948a940d6aa) ) - ROM_LOAD( "scm-00.10l", 0x10000, 0x4000, CRC(13fa3684) SHA1(611b7a237e394f285dcc5beb027dacdbdd58a7a0) ) - ROM_REGION( 0x14000, "slave", 0 ) + ROM_REGION( 0x4000, "master_bank", 0) + ROM_LOAD( "scm-00.10l", 0x00000, 0x4000, CRC(13fa3684) SHA1(611b7a237e394f285dcc5beb027dacdbdd58a7a0) ) + + ROM_REGION( 0xc000, "slave", 0 ) ROM_LOAD( "scs-30.5f", 0x00000, 0x4000, CRC(c0a40e41) SHA1(e74131b353855749258dffa45091c825ccdbf05a) ) ROM_LOAD( "scs-29.5h", 0x04000, 0x4000, CRC(83d49fa5) SHA1(7112110df2f382bbc0e651adcec975054a485b9b) ) ROM_LOAD( "scs-28.5j", 0x08000, 0x4000, CRC(480d351f) SHA1(d1b86f441ae0e58b30e0f089ab25de219d5f30e3) ) - ROM_LOAD( "scs-27.5k", 0x10000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) + + ROM_REGION( 0x4000, "slave_bank", 0) + ROM_LOAD( "scs-27.5k", 0x00000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) //banked into c000-dfff ROM_REGION( 0xc000, "gfx1", 0 ) //bg - ROM_LOAD( "scs-26.4b", 0x0000, 0x4000, CRC(f958b56d) SHA1(a1973179d336d2ba57294155550515f2b8a33a09) ) + ROM_LOAD( "scs-26.4b", 0x8000, 0x4000, CRC(f958b56d) SHA1(a1973179d336d2ba57294155550515f2b8a33a09) ) ROM_LOAD( "scs-25.4c", 0x4000, 0x4000, CRC(d6fd7ba5) SHA1(1c26c4c1655b2be9cb6103e75386cc2f0cf27fc5) ) - ROM_LOAD( "scs-24.4e", 0x8000, 0x4000, CRC(87783c36) SHA1(7102be795afcddd76b4d41823e95c65fe1ffbca0) ) + ROM_LOAD( "scs-24.4e", 0x0000, 0x4000, CRC(87783c36) SHA1(7102be795afcddd76b4d41823e95c65fe1ffbca0) ) ROM_REGION( 0xc000, "gfx2", 0 ) - ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) + ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) //sprites ROM_LOAD( "scm-22.5e", 0x4000, 0x4000, CRC(0cad254c) SHA1(36e30e30b652b3a388a3c4a82251196f79368f59) ) ROM_LOAD( "scm-21.5g", 0x8000, 0x4000, CRC(b6b68998) SHA1(cc3c6d996beeedcc7e5199f10d65c5b1d3c6e666) ) @@ -121,12 +529,12 @@ ROM_START( sprcros2a ) ROM_LOAD( "scm-20.5k", 0x0000, 0x4000, CRC(67a099a6) SHA1(43981abdcaa0ff36183027a3c691ce2df7f06ec7) ) ROM_REGION( 0x0420, "proms", 0 ) - ROM_LOAD( "sc-64.6a", 0x0000, 0x0020, CRC(336dd1c0) SHA1(f0a0d2c13617fd84ee55c0cb96643761a8735147) ) - ROM_LOAD( "sc-63.3b", 0x0020, 0x0100, CRC(9034a059) SHA1(1801965b4f0f3e04ca4b3faf0ba3a27dbb008474) ) - ROM_LOAD( "sc-62.3a", 0x0120, 0x0100, CRC(3c78a14f) SHA1(8f9c196a3e18bdce2d4855bc285bd5bde534bf09) ) - ROM_LOAD( "sc-61.5a", 0x0220, 0x0100, CRC(2f71185d) SHA1(974fbb52285f01f4353e9acb1992dcd6fdefedcb) ) - ROM_LOAD( "sc-60.4k", 0x0320, 0x0100, CRC(d7a4e57d) SHA1(6db02ec6aa55b05422cb505e63c71e36b4b11b4a) ) + ROM_LOAD( "sc-64.6a", 0x0000, 0x0020, CRC(336dd1c0) SHA1(f0a0d2c13617fd84ee55c0cb96643761a8735147) ) //palette + ROM_LOAD( "sc-63.3b", 0x0020, 0x0100, CRC(9034a059) SHA1(1801965b4f0f3e04ca4b3faf0ba3a27dbb008474) ) //bg clut lo nibble + ROM_LOAD( "sc-62.3a", 0x0120, 0x0100, CRC(3c78a14f) SHA1(8f9c196a3e18bdce2d4855bc285bd5bde534bf09) ) //bg clut hi nibble + ROM_LOAD( "sc-61.5a", 0x0220, 0x0100, CRC(2f71185d) SHA1(974fbb52285f01f4353e9acb1992dcd6fdefedcb) ) //sprite clut + ROM_LOAD( "sc-60.4k", 0x0320, 0x0100, CRC(d7a4e57d) SHA1(6db02ec6aa55b05422cb505e63c71e36b4b11b4a) ) //fg clut ROM_END -GAME( 1986, sprcros2, 0, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 1)", MACHINE_IS_SKELETON ) -GAME( 1986, sprcros2a,sprcros2, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 2)", MACHINE_IS_SKELETON ) +GAME( 1986, sprcros2, 0, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +GAME( 1986, sprcros2a,sprcros2, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) -- cgit v1.2.3-70-g09d2 From 7c2558e4cf5d258c9bb669e95c7271b149c19852 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Fri, 4 Mar 2016 17:11:51 -0500 Subject: NoteTaker: more multiprocessor related addresses documented, some address map fixes. [Lord Nightmare] --- src/mame/drivers/notetaker.cpp | 49 +++++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index 7fd3f9128bd..a369229365f 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -136,7 +136,7 @@ WRITE16_MEMBER(notetaker_state::IPConReg_w) //m_ProcLock = (data&0x40)?1:0; // bus lock for this processor (hold other processor in wait state) //m_CharCtr = (data&0x20)?1:0; // battery charge control m_DisableROM = (data&0x10)?1:0; // disable rom at 0000-0fff - //m_CorrOn = (data&0x08)?1:0; // corron (?) also LedInd5 + //m_CorrOn = (data&0x08)?1:0; // CorrectionOn (ECC correction enabled); also LedInd5 //m_LedInd6 = (data&0x04)?1:0; //m_LedInd7 = (data&0x02)?1:0; //m_LedInd8 = (data&0x01)?1:0; @@ -250,7 +250,9 @@ READ16_MEMBER(notetaker_state::iocpu_r) } else { - ram += (offset); + // are we in the FFFE8-FFFEF area where the parity/int/reset/etc stuff lives? + if (offset >= 0x7fff4) { logerror("attempt to read processor control regs at %d\n", offset<<1); return 0xFFFF; } + ram += offset; return *ram; } } @@ -260,9 +262,11 @@ WRITE16_MEMBER(notetaker_state::iocpu_w) UINT16 *ram = (UINT16 *)(memregion("mainram")->base()); if ( (m_BootSeqDone == 0) || ((m_DisableROM == 0) && ((offset&0x7F800) == 0)) ) { - logerror("attempt to write %04X to ROM-mapped area at %06X ignored\n", data, offset); + logerror("attempt to write %04X to ROM-mapped area at %06X ignored\n", data, offset<<1); return; } + // are we in the FFFE8-FFFEF area where the parity/int/reset/etc stuff lives? + if (offset >= 0x7fff4) { logerror("attempt to write processor control regs at %d with %02X ignored\n", offset<<1, data); } ram += offset; *ram = data; } @@ -277,21 +281,40 @@ mode 1: (during most of boot) 0 0 0 0 0 0 1 * * * * * * * * * * * * * 1 0 RW RAM x x x x x x x x x x x x x x 1 0 . Open Bus mode 2: (during load of the emulatorcpu's firmware to the first 4k of shared ram which is on the emulatorcpu board) -0 0 0 0 0 0 * * * * * * * * * * * * * * 1 1 RW RAM +0 0 * * * * * * * * * * * * * * * * * * 1 1 RW RAM x x x x x x x x x x x x x x 1 1 . Open Bus + EXCEPT for the following, decoded by the memory address logic board: +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 x 1 x . Open Bus +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 x 1 x W FFFEA (Multiprocessor Control (reset/int/boot for each proc; data bits 3,2,1,0 = 0010 means IP, bits 3210 = 0111 means EP; all others ignored.)) +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 x 1 x R FFFEC (Syndrome bits (gnd bit 15, parity bit 14, exp (ECC) bits 13-8, bits 7-0 are 'other' (?maybe highest address bits?) +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 x 1 x R FFFEE (Parity Error Address: row bits 15-8, column bits 7-0; reading this acknowledges a parity interrupt) More or less: BootSeqDone is 0, DisableROM is ignored, mem map is 0x00000-0xfffff reading is the 0x1000-long ROM, repeated every 0x1000 bytes. writing goes nowhere. BootSeqDone is 1, DisableROM is 0, mem map is 0x00000-0x00fff reading is the 0x1000-long ROM, remainder of memory map goes to RAM or open bus. writing the ROM area goes nowhere, writing RAM goes to RAM. BootSeqDone is 1, DisableROM is 1, mem map is entirely RAM or open bus for both reading and writing. + + +Emulator cpu mem map: +a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0 4KPage0' +x x 0 0 0 0 0 0 * * * * * * * * * * * * 0 RW Local (fast) RAM +x x 0 0 0 0 0 0 * * * * * * * * * * * * 1 RW System/Shared RAM +x x * * * * * * * * * * * * * * * * * * x RW System/Shared RAM + EXCEPT for the following, decoded by the EP board and superseding above: +1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 x x x x x x RW FFFC0-FFFDF (trigger ILLINST interrupt on EP, data ignored?) + And the following, decoded by the memory address logic board: +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 x x . Open Bus +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 x x W FFFEA (Multiprocessor Control (reset/int/boot for each proc; data bits 3,2,1,0 = 0010 means IP, bits 3210 = 0111 means EP; all others ignored.)) +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 x x R FFFEC (Syndrome bits (gnd bit 15, parity bit 14, exp bits 13-8, bits 7-0 are 'other', maybe highest address bits) +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 x x R FFFEE (Parity Error Address: row bits 15-8, column bits 7-0; reading this acknowledges a parity interrupt) */ + static ADDRESS_MAP_START(notetaker_iocpu_mem, AS_PROGRAM, 16, notetaker_state) /* - AM_RANGE(0x00000, 0x00fff) AM_ROM AM_REGION("iocpu", 0xFF000) // rom is here if either BootSeqDone OR DisableROM are zero. the 1.5 source code implies writes here are ignored - AM_RANGE(0x01000, 0x01fff) AM_RAM // 4k of ram, local to the io processor - AM_RANGE(0x02000, 0x3ffff) AM_RAM AM_BASE("mainram") // 256k of ram (less 8k), shared between both processors + AM_RANGE(0x00000, 0x00fff) AM_ROM AM_REGION("iocpu", 0xFF000) // rom is here if either BootSeqDone OR DisableROM are zero. the 1.5 source code and the schematics implies writes here are ignored while rom is enabled; if disablerom is 1 this goes to mainram + AM_RANGE(0x01000, 0x3ffff) AM_RAM AM_BASE("mainram") // 256k of ram (less 4k), shared between both processors. rom goes here if bootseqdone is 0 // note 4000-8fff? is the framebuffer for the screen? - AM_RANGE(0xff000, 0xfffff) AM_ROM // rom is only banked in here if bootseqdone is 0, so the reset vector is in the proper place + AM_RANGE(0xff000, 0xfffff) AM_ROM // rom is only banked in here if bootseqdone is 0, so the reset vector is in the proper place. otherwise the memory control regs live at fffe8-fffef */ AM_RANGE(0x00000, 0xfffff) AM_READWRITE(iocpu_r, iocpu_w) // bypass MAME's memory map system as we need finer grained control ADDRESS_MAP_END @@ -398,6 +421,16 @@ read from 0x0002 (byte wide) (check interrupts) Date: Fri, 4 Mar 2016 17:27:39 -0500 Subject: forgot this (nw) --- src/mame/drivers/notetaker.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index a369229365f..ff8ce2072e8 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -425,8 +425,7 @@ read from 0x44 (byte wide) in a loop forever (read keyboard fifo status) /* static ADDRESS_MAP_START(notetaker_emulatorcpu_mem, AS_PROGRAM, 16, notetaker_state) AM_RANGE(0x00000, 0x00fff) AM_RAM // actually a banked block of ram - AM_RANGE(0x02000, 0x3ffff) AM_RAM AM_BASE("mainram") // 256k of ram (less 8k), shared between both processors - // note 4000-8fff? is the framebuffer for the screen? + AM_RANGE(0x01000, 0x3ffff) AM_MIRROR(0xC0000) AM_RAM AM_BASE("mainram") // 256k of ram (less 4k), shared between both processors, mirrored 4 times AM_RANGE(0xFFFE0, 0xFFFEF) AM_READWRITE(proc_control_r, proc_control_w) ADDRESS_MAP_END */ -- cgit v1.2.3-70-g09d2 From c95862d51277a208bb4ef01dee20ece2eebfec19 Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Fri, 4 Mar 2016 17:40:52 -0500 Subject: Fix for compile (nw) --- src/mame/drivers/sprcros2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/sprcros2.cpp b/src/mame/drivers/sprcros2.cpp index 9ec331bcfe7..403f958923a 100644 --- a/src/mame/drivers/sprcros2.cpp +++ b/src/mame/drivers/sprcros2.cpp @@ -97,10 +97,10 @@ public: UINT8 m_bg_scrollx, m_bg_scrolly; protected: // driver_device overrides - virtual void machine_start(); - virtual void machine_reset(); + virtual void machine_start() override; + virtual void machine_reset() override; - virtual void video_start(); + virtual void video_start() override; }; -- cgit v1.2.3-70-g09d2 From b87afda9dedeb45805c62d17c62f8839a1b0b851 Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Fri, 4 Mar 2016 21:50:40 -0300 Subject: New clones marked as NOT_WORKING -------------------------------- Hipoly (bootleg of Hyper Olympic) [Roberto Fresca, Peter Weuffen] --- src/mame/drivers/trackfld.cpp | 47 +++++++++++++++++++++++++++++++++++++++++++ src/mame/mame.lst | 1 + 2 files changed, 48 insertions(+) (limited to 'src') diff --git a/src/mame/drivers/trackfld.cpp b/src/mame/drivers/trackfld.cpp index c898f8d4bde..4f8a41ef80a 100644 --- a/src/mame/drivers/trackfld.cpp +++ b/src/mame/drivers/trackfld.cpp @@ -1266,6 +1266,52 @@ ROM_START( hyprolymba ) ROM_LOAD( "pal16l8.e6", 0x0200, 0x0104, CRC(122f23e6) SHA1(d178510843a46f043ecafaa44d95bb590ad67fb0) ) ROM_END +ROM_START( hipoly ) + /* These ROM's are located on the CPU/Video Board */ + ROM_REGION( 0x10000, "maincpu", 0 ) /* 64k for code + 64k for decrypted opcodes */ + ROM_LOAD( "2.1a", 0x6000, 0x2000, CRC(82257fb7) SHA1(4a5038292e582d5c3b5f2d82b01c57ccb24f3095) ) // only one byte of difference with hyprolymba + ROM_LOAD( "2.2a", 0x8000, 0x2000, CRC(15b83099) SHA1(79827590d74f20c9a95723e06b05af2b15c34f5f) ) // ok + ROM_LOAD( "2.4a", 0xa000, 0x2000, CRC(93a32a97) SHA1(4fbb2fcdf9bc7a3d273dbc27b8157f163ff9bf11) ) // too different... maybe a bad dump? + ROM_LOAD( "2.5a", 0xc000, 0x2000, CRC(d099b1e8) SHA1(0472991ad6caef41ec6b8ec8bf3d9d07584a57cc) ) // ok + ROM_LOAD( "2.7a", 0xe000, 0x2000, CRC(974ff815) SHA1(11512df2008a79ba44bbb84bd70885f187113211) ) // ok + + /* These ROM's are located on the Sound Board */ + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "1.2c", 0x0000, 0x2000, CRC(95bf79b6) SHA1(ea9135acd7ad162c19c5cdde356e69792d61b675) ) + + /* These ROM's are located on the Sound Board */ + ROM_REGION( 0x10000, "adpcm", 0 ) /* 64k for the 6802 which plays ADPCM samples */ + ROM_LOAD( "1.11d", 0x8000, 0x2000, CRC(102d3a78) SHA1(0587e87c579f6d333fb1793d20eb7a3c769fbd11) ) + ROM_LOAD( "1.10d", 0xa000, 0x2000, CRC(e9919365) SHA1(bd11d6e3ee2c6e698159c2768e315389d666107f) ) + ROM_LOAD( "1.11c", 0xc000, 0x2000, CRC(c3ec42e1) SHA1(048a95726c4f031552e629c3788952c1bc5e7251) ) + ROM_LOAD( "1.10c", 0xe000, 0x2000, CRC(76998389) SHA1(499189b0e20296af88712199b93b958655083608) ) + + /* These ROM's are located on the CPU/Video Board */ + ROM_REGION( 0x8000, "gfx1", 0 ) + ROM_LOAD( "2.18a", 0x0000, 0x2000, CRC(8d28864f) SHA1(b6827592095543c92384a7e8b817a741d249cff8) ) + ROM_LOAD( "2.19a", 0x2000, 0x2000, CRC(800ff1f1) SHA1(33d73b18903e3e6bfb30f1a06db4b8105d4040d8) ) + ROM_LOAD( "2.21a", 0x4000, 0x2000, CRC(d9faf183) SHA1(4448b6242790783d37acf50704d597af5878c2ab) ) + ROM_LOAD( "2.22a", 0x6000, 0x2000, CRC(5886c802) SHA1(884a12a8f63600da4f23b29be6dbaacef37add20) ) + + /* These ROM's are located on the CPU/Video Board */ + ROM_REGION( 0x6000, "gfx2", 0 ) + ROM_LOAD( "2.22h", 0x0000, 0x2000, CRC(6c107a9c) SHA1(139e99b126aad16223573ef987adc94d96d17857) ) + ROM_LOAD( "2.21h", 0x2000, 0x2000, CRC(21847e56) SHA1(dcc4f6e85e7125a6dfa2de9874f6adf8382e019c) ) + ROM_LOAD( "2.19h", 0x4000, 0x2000, CRC(c2166a5c) SHA1(5ba25900e653ce4edcf35f1fbce758a327a715ce) ) + + /* These PROM's are located on the CPU/Video Board, borrowed from other sets */ + ROM_REGION( 0x0220, "proms", 0 ) + ROM_LOAD( "361b16.e1", 0x0000, 0x0020, CRC(d55f30b5) SHA1(4d6a851f4886778307f75771645078b97ad55f5f) ) /* palette */ + ROM_LOAD( "361b17.b15", 0x0020, 0x0100, CRC(d2ba4d32) SHA1(894b5cedf01ba9225a0d6215291857e455b84903) ) /* sprite lookup table */ + ROM_LOAD( "361b18.f22", 0x0120, 0x0100, CRC(053e5861) SHA1(6740a62cf7b6938a4f936a2fed429704612060a5) ) /* char lookup table */ + + /* These PAL's are located on the CPU/Video Board */ + ROM_REGION( 0x0400, "plds", 0 ) + ROM_LOAD( "pal16l8.e4", 0x0000, 0x0104, NO_DUMP ) + ROM_LOAD( "pal16l8.e6", 0x0200, 0x0104, NO_DUMP ) +ROM_END + + ROM_START( atlantol ) ROM_REGION( 0x10000, "maincpu", 0 ) /* 64k for code + 64k for decrypted opcodes */ ROM_LOAD( "atl37", 0x00000, 0x10000, CRC(aca8da51) SHA1(50e96fd8496ed32e11eb43bcbfd468ce566caa47) ) @@ -1556,6 +1602,7 @@ GAME( 1983, trackfldc, trackfld, trackfld, trackfld, trackfld_state, trackfld, R GAME( 1983, hyprolym, trackfld, trackfld, trackfld, trackfld_state, trackfld, ROT0, "Konami", "Hyper Olympic", MACHINE_SUPPORTS_SAVE ) GAME( 1983, hyprolymb, trackfld, hyprolyb, trackfld, trackfld_state, trackfld, ROT0, "bootleg", "Hyper Olympic (bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1983, hyprolymba,trackfld, hyprolyb, trackfld, trackfld_state, trackfld, ROT0, "bootleg", "Hyper Olympic (bootleg, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1983, hipoly, trackfld, hyprolyb, trackfld, trackfld_state, trackfld, ROT0, "bootleg", "Hipoly (bootleg of Hyper Olympic)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) GAME( 1996, atlantol, trackfld, atlantol, atlantol, trackfld_state, atlantol, ROT0, "bootleg", "Atlant Olimpic", MACHINE_SUPPORTS_SAVE ) GAME( 1982, trackfldnz,trackfld, trackfld, trackfld, trackfld_state, trackfldnz,ROT0, "bootleg? (Goldberg Enterprizes Inc.)", "Track & Field (NZ bootleg?)", MACHINE_SUPPORTS_SAVE) // bootleg of the Centuri version diff --git a/src/mame/mame.lst b/src/mame/mame.lst index bd1d3bed189..310c0325d17 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -35064,6 +35064,7 @@ atlantol // bootleg hyprolym // GX361 (c) 1983 hyprolymb // bootleg hyprolymba // bootleg +hipoly // bootleg mastkin // (c) 1988 Du Tech reaktor // (c) 1985 Zilec trackfld // GX361 (c) 1983 -- cgit v1.2.3-70-g09d2 From f0bbd842a439fd9f55435dd9db20b27a95f2d655 Mon Sep 17 00:00:00 2001 From: angelosa Date: Sat, 5 Mar 2016 02:34:50 +0100 Subject: Fixed sprites y positioning. Split legacy code in convenient function calls, nw --- src/mame/drivers/sprcros2.cpp | 52 ++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/sprcros2.cpp b/src/mame/drivers/sprcros2.cpp index 403f958923a..ad7c67dccef 100644 --- a/src/mame/drivers/sprcros2.cpp +++ b/src/mame/drivers/sprcros2.cpp @@ -102,24 +102,24 @@ protected: virtual void video_start() override; - +private: + void legacy_bg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect); + void legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect); + void legacy_obj_draw(bitmap_ind16 &bitmap,const rectangle &cliprect); }; void sprcros2_state::video_start() { } -UINT32 sprcros2_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) +void sprcros2_state::legacy_bg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect) { gfx_element *gfx_0 = m_gfxdecode->gfx(0); - gfx_element *gfx_1 = m_gfxdecode->gfx(1); - gfx_element *gfx_2 = m_gfxdecode->gfx(2); - int y,x; int count = 0; - for (y=0;y<32;y++) + for (int y=0;y<32;y++) { - for (x=0;x<32;x++) + for (int x=0;x<32;x++) { UINT16 tile = m_bgvram[count]; tile |= (m_bgattr[count] & 7) << 8; @@ -135,27 +135,34 @@ UINT32 sprcros2_state::screen_update( screen_device &screen, bitmap_ind16 &bitma } } - for(count=0x40-4;count>-1;count-=4) +} + +void sprcros2_state::legacy_obj_draw(bitmap_ind16 &bitmap,const rectangle &cliprect) +{ + gfx_element *gfx_1 = m_gfxdecode->gfx(1); + + for(int count=0x40-4;count>-1;count-=4) { UINT8 x,y,tile,color; bool flipx; - y = m_sprram[count+2]; + y = 224-m_sprram[count+2]; x = m_sprram[count+3]; tile = m_sprram[count+0]; flipx = bool(m_sprram[count+1] & 2); color = (m_sprram[count+1] & 0x38) >> 3; - gfx_1->transpen(bitmap,cliprect,tile,color,flipx,0,x,y,0); + gfx_1->transpen(bitmap,cliprect,tile,color,flipx,0,x,y & 0xff,0); } - - - count = 0; - - //gfx = m_gfxdecode->gfx(2); +} - for (y=0;y<32;y++) +void sprcros2_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect) +{ + gfx_element *gfx_2 = m_gfxdecode->gfx(2); + int count = 0; + + for (int y=0;y<32;y++) { - for (x=0;x<32;x++) + for (int x=0;x<32;x++) { UINT16 tile = m_fgvram[count]; tile |= (m_fgattr[count] & 3) << 8; @@ -166,7 +173,16 @@ UINT32 sprcros2_state::screen_update( screen_device &screen, bitmap_ind16 &bitma count++; } } - +} + + + + +UINT32 sprcros2_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) +{ + legacy_bg_draw(bitmap,cliprect); + legacy_obj_draw(bitmap,cliprect); + legacy_fg_draw(bitmap,cliprect); return 0; } -- cgit v1.2.3-70-g09d2 From d74c750cbede2a93b2fdec84b2269e62631d453b Mon Sep 17 00:00:00 2001 From: cracyc Date: Fri, 4 Mar 2016 21:36:39 -0600 Subject: pc: simplify somewhat the pcs/clones and enable configs with less than 640k ram (nw) tandy1t: make the shared vram actually work and use banking (nw) -- Some of the tandy's will show garbage on the screen when booted, it's the memory test overwriting the shared vram --- scripts/target/mame/mess.lua | 3 - src/devices/bus/isa/isa_cards.cpp | 2 + src/mame/drivers/amstr_pc.cpp | 123 +++++------- src/mame/drivers/asst128.cpp | 59 ++---- src/mame/drivers/ec184x.cpp | 145 ++++++-------- src/mame/drivers/europc.cpp | 25 +-- src/mame/drivers/genpc.cpp | 186 +++++------------- src/mame/drivers/ibmpc.cpp | 105 +++++----- src/mame/drivers/ibmpcjr.cpp | 40 ++-- src/mame/drivers/iskr103x.cpp | 65 ++----- src/mame/drivers/m24.cpp | 12 +- src/mame/drivers/mc1502.cpp | 69 +++---- src/mame/drivers/pasogo.cpp | 8 +- src/mame/drivers/pc.cpp | 183 +++++++++--------- src/mame/drivers/poisk1.cpp | 398 ++++++++++++++++++++++++++++++++++++-- src/mame/drivers/tandy1t.cpp | 309 +++++++++++++++++------------ src/mame/includes/genpc.h | 37 ++-- src/mame/includes/poisk1.h | 101 ---------- src/mame/machine/genpc.cpp | 84 +++----- src/mame/machine/pcshare.cpp | 5 - src/mame/video/pc_t1t.cpp | 168 ++++++++-------- src/mame/video/pc_t1t.h | 14 +- src/mame/video/poisk1.cpp | 322 ------------------------------ 23 files changed, 1109 insertions(+), 1354 deletions(-) delete mode 100644 src/mame/includes/poisk1.h delete mode 100644 src/mame/video/poisk1.cpp (limited to 'src') diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 9a5a4489352..ab2dd075fe5 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -2992,9 +2992,6 @@ files { MAME_DIR .. "src/mame/includes/mc1502.h", MAME_DIR .. "src/mame/drivers/poisk1.cpp", MAME_DIR .. "src/mame/machine/kb_poisk1.h", - MAME_DIR .. "src/mame/includes/poisk1.h", - MAME_DIR .. "src/mame/video/poisk1.cpp", - MAME_DIR .. "src/mame/video/poisk1.h", } createMESSProjects(_target, _subtarget, "yamaha") diff --git a/src/devices/bus/isa/isa_cards.cpp b/src/devices/bus/isa/isa_cards.cpp index a9ab1b9dc8f..e2702a5598f 100644 --- a/src/devices/bus/isa/isa_cards.cpp +++ b/src/devices/bus/isa/isa_cards.cpp @@ -19,6 +19,7 @@ SLOT_INTERFACE_START( pc_isa8_cards ) SLOT_INTERFACE("aga_pc200", ISA8_AGA_PC200) SLOT_INTERFACE("ega", ISA8_EGA) SLOT_INTERFACE("pgc", ISA8_PGC) + SLOT_INTERFACE("vga", ISA8_VGA) SLOT_INTERFACE("svga_et4k", ISA8_SVGA_ET4K) SLOT_INTERFACE("num9rev",ISA8_NUM_9_REV) SLOT_INTERFACE("com", ISA8_COM) @@ -40,6 +41,7 @@ SLOT_INTERFACE_START( pc_isa8_cards ) SLOT_INTERFACE("sblaster1_0", ISA8_SOUND_BLASTER_1_0) SLOT_INTERFACE("sblaster1_5", ISA8_SOUND_BLASTER_1_5) SLOT_INTERFACE("stereo_fx", ISA8_STEREO_FX) + SLOT_INTERFACE("ssi2001", ISA8_SSI2001) SLOT_INTERFACE("mpu401", ISA8_MPU401) SLOT_INTERFACE("ne1000", NE1000) SLOT_INTERFACE("3c503", EL2_3C503) diff --git a/src/mame/drivers/amstr_pc.cpp b/src/mame/drivers/amstr_pc.cpp index d33fa47a6b3..8b1558a4575 100644 --- a/src/mame/drivers/amstr_pc.cpp +++ b/src/mame/drivers/amstr_pc.cpp @@ -71,8 +71,6 @@ public: DECLARE_READ8_MEMBER( pc1640_port4278_r ); DECLARE_READ8_MEMBER( pc1640_port278_r ); - DECLARE_DRIVER_INIT(pc1640); - struct { UINT8 x,y; //byte clipping needed } m_mouse; @@ -86,45 +84,30 @@ public: int m_dipstate; }; -static ADDRESS_MAP_START( ppc512_map, AS_PROGRAM, 16, amstrad_pc_state ) - AM_RANGE(0x00000, 0x7ffff) AM_RAMBANK("bank10") - AM_RANGE(0x80000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xd0000, 0xeffff) AM_NOP - AM_RANGE(0xf0000, 0xfffff) AM_ROM -ADDRESS_MAP_END - static ADDRESS_MAP_START( ppc640_map, AS_PROGRAM, 16, amstrad_pc_state ) - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xd0000, 0xeffff) AM_NOP - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END -static ADDRESS_MAP_START(ppc512_io, AS_IO, 16, amstrad_pc_state ) - AM_RANGE(0x0060, 0x0065) AM_READWRITE8(pc1640_port60_r, pc1640_port60_w, 0xffff) - AM_RANGE(0x0070, 0x0071) AM_DEVREADWRITE8("rtc", mc146818_device, read, write, 0xffff) - AM_RANGE(0x0078, 0x0079) AM_READWRITE8(pc1640_mouse_x_r, pc1640_mouse_x_w, 0xffff) - AM_RANGE(0x007a, 0x007b) AM_READWRITE8(pc1640_mouse_y_r, pc1640_mouse_y_w, 0xffff) - AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff) - AM_RANGE(0x0278, 0x027b) AM_READ8(pc200_port278_r, 0xffff) AM_DEVWRITE8("lpt_2", pc_lpt_device, write, 0x00ff) - AM_RANGE(0x0378, 0x037b) AM_READ8(pc200_port378_r, 0xffff) AM_DEVWRITE8("lpt_1", pc_lpt_device, write, 0x00ff) - AM_RANGE(0x03bc, 0x03bf) AM_DEVREADWRITE8("lpt_0", pc_lpt_device, read, write, 0x00ff) +static ADDRESS_MAP_START( pc2086_map, AS_PROGRAM, 16, amstrad_pc_state ) + AM_RANGE(0xc0000, 0xc9fff) AM_ROM AM_REGION("bios", 0) + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0x10000) ADDRESS_MAP_END static ADDRESS_MAP_START(pc200_io, AS_IO, 16, amstrad_pc_state ) AM_RANGE(0x0060, 0x0065) AM_READWRITE8(pc1640_port60_r, pc1640_port60_w, 0xffff) AM_RANGE(0x0078, 0x0079) AM_READWRITE8(pc1640_mouse_x_r, pc1640_mouse_x_w, 0xffff) AM_RANGE(0x007a, 0x007b) AM_READWRITE8(pc1640_mouse_y_r, pc1640_mouse_y_w, 0xffff) + AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", pc_noppi_mb_device, map, 0xffff) AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff) AM_RANGE(0x0278, 0x027b) AM_READ8(pc200_port278_r, 0xffff) AM_DEVWRITE8("lpt_2", pc_lpt_device, write, 0x00ff) AM_RANGE(0x0378, 0x037b) AM_READ8(pc200_port378_r, 0xffff) AM_DEVWRITE8("lpt_1", pc_lpt_device, write, 0x00ff) AM_RANGE(0x03bc, 0x03bf) AM_DEVREADWRITE8("lpt_0", pc_lpt_device, read, write, 0x00ff) ADDRESS_MAP_END +static ADDRESS_MAP_START(ppc512_io, AS_IO, 16, amstrad_pc_state ) + AM_RANGE(0x0070, 0x0071) AM_DEVREADWRITE8("rtc", mc146818_device, read, write, 0xffff) + AM_IMPORT_FROM(pc200_io) +ADDRESS_MAP_END /* pc20 (v2) fc078 @@ -250,14 +233,6 @@ port 03de write/read 7d 01 01 mouse button right */ -DRIVER_INIT_MEMBER(amstrad_pc_state,pc1640) -{ - address_space &io_space = m_maincpu->space( AS_IO ); - - io_space.install_read_handler(0x278, 0x27b, read8_delegate(FUNC(amstrad_pc_state::pc1640_port278_r),this), 0xffff); - io_space.install_read_handler(0x4278, 0x427b, read8_delegate(FUNC(amstrad_pc_state::pc1640_port4278_r),this), 0xffff); -} - WRITE8_MEMBER( amstrad_pc_state::pc1640_port60_w ) { switch (offset) { @@ -525,14 +500,17 @@ static MACHINE_CONFIG_START( pc200, amstrad_pc_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("512K") MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( pc2086, pc200 ) + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(pc2086_map) +MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( ppc512, pc200 ) - MCFG_DEVICE_REMOVE("maincpu") - - MCFG_CPU_ADD("maincpu", V30, 8000000) - MCFG_CPU_PROGRAM_MAP(ppc512_map) +static MACHINE_CONFIG_DERIVED( ppc640, pc200 ) + MCFG_CPU_REPLACE("maincpu", V30, 8000000) + MCFG_CPU_PROGRAM_MAP(ppc640_map) MCFG_CPU_IO_MAP(ppc512_io) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb) @@ -542,9 +520,10 @@ static MACHINE_CONFIG_DERIVED( ppc512, pc200 ) MCFG_MC146818_ADD( "rtc", XTAL_32_768kHz ) MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( ppc640, ppc512 ) - MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_PROGRAM_MAP(ppc640_map) +static MACHINE_CONFIG_DERIVED( ppc512, ppc640 ) + MCFG_DEVICE_MODIFY(RAM_TAG) + MCFG_RAM_DEFAULT_SIZE("512K") + MCFG_RAM_EXTRA_OPTIONS("640K") MACHINE_CONFIG_END /* @@ -564,18 +543,18 @@ Sinclair PC200 ROMs (from a v1.2 PC200): V1.2:5EA8 V1.2:A058 */ ROM_START( pc200 ) -// ROM_REGION(0x100000,"maincpu", 0) - ROM_REGION16_LE(0x100000,"maincpu", 0) +// ROM_REGION(0x100000,"bios", 0) + ROM_REGION16_LE(0x10000,"bios", 0) // special bios at 0xe0000 !? ROM_SYSTEM_BIOS(0, "v15", "v1.5") - ROMX_LOAD("40185-2.ic129", 0xfc001, 0x2000, CRC(41302eb8) SHA1(8b4b2afea543b96b45d6a30365281decc15f2932), ROM_SKIP(1) | ROM_BIOS(1)) // v2 - ROMX_LOAD("40184-2.ic132", 0xfc000, 0x2000, CRC(71b84616) SHA1(4135102a491b25fc659d70b957e07649f3eacf24), ROM_SKIP(1) | ROM_BIOS(1)) // v2 + ROMX_LOAD("40185-2.ic129", 0xc001, 0x2000, CRC(41302eb8) SHA1(8b4b2afea543b96b45d6a30365281decc15f2932), ROM_SKIP(1) | ROM_BIOS(1)) // v2 + ROMX_LOAD("40184-2.ic132", 0xc000, 0x2000, CRC(71b84616) SHA1(4135102a491b25fc659d70b957e07649f3eacf24), ROM_SKIP(1) | ROM_BIOS(1)) // v2 ROM_SYSTEM_BIOS(1, "v13", "v1.3") - ROMX_LOAD("40185v13.ic129", 0xfc001, 0x2000, CRC(f082f08e) SHA1(b332db419033588a7380bfecdf46104974347341), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD("40184v13.ic132", 0xfc000, 0x2000, CRC(5daf6068) SHA1(93a2ccfb0e29c8f2c98f06c64bb0ea0b3acafb13), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD("40185v13.ic129", 0xc001, 0x2000, CRC(f082f08e) SHA1(b332db419033588a7380bfecdf46104974347341), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD("40184v13.ic132", 0xc000, 0x2000, CRC(5daf6068) SHA1(93a2ccfb0e29c8f2c98f06c64bb0ea0b3acafb13), ROM_SKIP(1) | ROM_BIOS(2)) ROM_SYSTEM_BIOS(2, "v12", "v1.2") - ROMX_LOAD("40185.ic129", 0xfc001, 0x2000, CRC(c2b4eeac) SHA1(f11015fadf0c16d86ce2c5047be3e6a4782044f7), ROM_SKIP(1) | ROM_BIOS(3)) - ROMX_LOAD("40184.ic132", 0xfc000, 0x2000, CRC(b22704a6) SHA1(dadd573db6cd34f339f2f0ae55b07537924c024a), ROM_SKIP(1) | ROM_BIOS(3)) + ROMX_LOAD("40185.ic129", 0xc001, 0x2000, CRC(c2b4eeac) SHA1(f11015fadf0c16d86ce2c5047be3e6a4782044f7), ROM_SKIP(1) | ROM_BIOS(3)) + ROMX_LOAD("40184.ic132", 0xc000, 0x2000, CRC(b22704a6) SHA1(dadd573db6cd34f339f2f0ae55b07537924c024a), ROM_SKIP(1) | ROM_BIOS(3)) // also mapped to f0000, f4000, f8000 ROM_REGION( 0x800, "keyboard", 0 ) ROM_LOAD( "40112.ic801", 0x000, 0x800, CRC(842a954c) SHA1(93ca6badf20e0215025fe109959eddead8c52f38) ) @@ -583,25 +562,25 @@ ROM_END ROM_START( pc20 ) -// ROM_REGION(0x100000,"maincpu", 0) - ROM_REGION16_LE(0x100000,"maincpu", 0) +// ROM_REGION(0x100000,"bios", 0) + ROM_REGION16_LE(0x10000,"bios", 0) // special bios at 0xe0000 !? // This is probably referring to a check for the Amstrad RP5-2 diagnostic // card, which can be plugged into an Amstrad XT for troubleshooting purposes. // - John Elliott - ROM_LOAD16_BYTE("pc20v2.0", 0xfc001, 0x2000, CRC(41302eb8) SHA1(8b4b2afea543b96b45d6a30365281decc15f2932)) // v2 - ROM_LOAD16_BYTE("pc20v2.1", 0xfc000, 0x2000, CRC(71b84616) SHA1(4135102a491b25fc659d70b957e07649f3eacf24)) // v2 + ROM_LOAD16_BYTE("pc20v2.0", 0xc001, 0x2000, CRC(41302eb8) SHA1(8b4b2afea543b96b45d6a30365281decc15f2932)) // v2 + ROM_LOAD16_BYTE("pc20v2.1", 0xc000, 0x2000, CRC(71b84616) SHA1(4135102a491b25fc659d70b957e07649f3eacf24)) // v2 // also mapped to f0000, f4000, f8000 ROM_END ROM_START( ppc512 ) -// ROM_REGION(0x100000,"maincpu", 0) - ROM_REGION16_LE(0x100000,"maincpu", 0) +// ROM_REGION(0x100000,"bios", 0) + ROM_REGION16_LE(0x10000,"bios", 0) // special bios at 0xe0000 !? - ROM_LOAD16_BYTE("40107.v1", 0xfc000, 0x2000, CRC(4e37e769) SHA1(88be3d3375ec3b0a7041dbcea225b197e50d4bfe)) // v1.9 - ROM_LOAD16_BYTE("40108.v1", 0xfc001, 0x2000, CRC(4f0302d9) SHA1(e4d69ca98c3b98f3705a2902b16746360043f039)) // v1.9 + ROM_LOAD16_BYTE("40107.v1", 0xc000, 0x2000, CRC(4e37e769) SHA1(88be3d3375ec3b0a7041dbcea225b197e50d4bfe)) // v1.9 + ROM_LOAD16_BYTE("40108.v1", 0xc001, 0x2000, CRC(4f0302d9) SHA1(e4d69ca98c3b98f3705a2902b16746360043f039)) // v1.9 // also mapped to f0000, f4000, f8000 ROM_REGION( 0x800, "keyboard", 0 ) // PPC512 / PPC640 / PC200 102-key keyboard ROM_LOAD( "40112.ic801", 0x000, 0x800, CRC(842a954c) SHA1(93ca6badf20e0215025fe109959eddead8c52f38) ) @@ -609,11 +588,11 @@ ROM_END ROM_START( ppc640 ) -// ROM_REGION(0x100000,"maincpu", 0) - ROM_REGION16_LE(0x100000,"maincpu", 0) +// ROM_REGION(0x100000,"bios", 0) + ROM_REGION16_LE(0x10000,"bios", 0) // special bios at 0xe0000 !? - ROM_LOAD16_BYTE("40107.v2", 0xfc000, 0x2000, CRC(0785b63e) SHA1(4dbde6b9e9500298bb6241a8daefd85927f1ad28)) // v2.1 - ROM_LOAD16_BYTE("40108.v2", 0xfc001, 0x2000, CRC(5351cf8c) SHA1(b4dbf11b39378ab4afd2107d3fe54a99fffdedeb)) // v2.1 + ROM_LOAD16_BYTE("40107.v2", 0xc000, 0x2000, CRC(0785b63e) SHA1(4dbde6b9e9500298bb6241a8daefd85927f1ad28)) // v2.1 + ROM_LOAD16_BYTE("40108.v2", 0xc001, 0x2000, CRC(5351cf8c) SHA1(b4dbf11b39378ab4afd2107d3fe54a99fffdedeb)) // v2.1 // also mapped to f0000, f4000, f8000 ROM_REGION(0x2000,"subcpu", 0) ROM_LOAD("40135.ic192", 0x00000, 0x2000, CRC(75d99199) SHA1(a76d39fda3d5140e1fb9ce70fcddbdfb8f891dc6)) @@ -624,10 +603,10 @@ ROM_END ROM_START( pc2086 ) - ROM_REGION16_LE( 0x100000, "maincpu", 0 ) - ROM_LOAD( "40186.ic171", 0xc0000, 0x8000, CRC(959f00ba) SHA1(5df1efe4203cd076292a7713bd7ebd1196dca577) ) - ROM_LOAD16_BYTE( "40179.ic129", 0xfc000, 0x2000, CRC(003605e4) SHA1(b882e97ee81b9ba0e7d969c63da3f2052f23b4b9) ) - ROM_LOAD16_BYTE( "40180.ic132", 0xfc001, 0x2000, CRC(28ee5e58) SHA1(93e045609466fcec74e2bb72578bb7405281cf7b) ) + ROM_REGION16_LE( 0x20000, "bios", 0 ) + ROM_LOAD( "40186.ic171", 0x00000, 0x8000, CRC(959f00ba) SHA1(5df1efe4203cd076292a7713bd7ebd1196dca577) ) + ROM_LOAD16_BYTE( "40179.ic129", 0x1c000, 0x2000, CRC(003605e4) SHA1(b882e97ee81b9ba0e7d969c63da3f2052f23b4b9) ) + ROM_LOAD16_BYTE( "40180.ic132", 0x1c001, 0x2000, CRC(28ee5e58) SHA1(93e045609466fcec74e2bb72578bb7405281cf7b) ) ROM_REGION( 0x800, "keyboard", 0 ) // PC2086 / PC3086 102-key keyboard ROM_LOAD( "40178.ic801", 0x000, 0x800, CRC(f72f1c2e) SHA1(34897e78b3d10f96b36d81778e97c4a9a1b8618b) ) @@ -635,10 +614,10 @@ ROM_END ROM_START( pc3086 ) - ROM_REGION16_LE( 0x100000, "maincpu", 0 ) - ROM_LOAD( "c000.bin", 0xc0000, 0x8000, CRC(5a6c38e9) SHA1(382d2028e0dc5515a68843829563ce29018edb08) ) - ROM_LOAD( "c800.bin", 0xc8000, 0x2000, CRC(3329c6d5) SHA1(982e852278185d69acde47a4f3942bc09ed76777) ) - ROM_LOAD( "fc00.bin", 0xfc000, 0x4000, CRC(b5630753) SHA1(98c344831cc4dc59ebb39bbb1961964a8d39fe20) ) + ROM_REGION16_LE( 0x20000, "bios", 0 ) + ROM_LOAD( "c000.bin", 0x00000, 0x8000, CRC(5a6c38e9) SHA1(382d2028e0dc5515a68843829563ce29018edb08) ) + ROM_LOAD( "c800.bin", 0x08000, 0x2000, CRC(3329c6d5) SHA1(982e852278185d69acde47a4f3942bc09ed76777) ) + ROM_LOAD( "fc00.bin", 0x1c000, 0x4000, CRC(b5630753) SHA1(98c344831cc4dc59ebb39bbb1961964a8d39fe20) ) ROM_REGION( 0x800, "keyboard", 0 ) // PC2086 / PC3086 102-key keyboard ROM_LOAD( "40178.ic801", 0x000, 0x800, CRC(f72f1c2e) SHA1(34897e78b3d10f96b36d81778e97c4a9a1b8618b) ) @@ -655,5 +634,5 @@ COMP( 1987, ppc512, ibm5150, 0, ppc512, pc200, driver_device, COMP( 1987, ppc640, ibm5150, 0, ppc640, pc200, driver_device, 0, "Amstrad plc", "Amstrad PPC640", MACHINE_NOT_WORKING) COMP( 1988, pc20, ibm5150, 0, pc200, pc200, driver_device, 0, "Amstrad plc", "Amstrad PC20" , MACHINE_NOT_WORKING) COMP( 1988, pc200, ibm5150, 0, pc200, pc200, driver_device, 0, "Sinclair Research Ltd", "PC200 Professional Series", MACHINE_NOT_WORKING) -COMP( 1988, pc2086, ibm5150, 0, pc200, pc200, driver_device, 0, "Amstrad plc", "Amstrad PC2086", MACHINE_NOT_WORKING ) -COMP( 1990, pc3086, ibm5150, 0, pc200, pc200, driver_device, 0, "Amstrad plc", "Amstrad PC3086", MACHINE_NOT_WORKING ) +COMP( 1988, pc2086, ibm5150, 0, pc2086, pc200, driver_device, 0, "Amstrad plc", "Amstrad PC2086", MACHINE_NOT_WORKING ) +COMP( 1990, pc3086, ibm5150, 0, pc2086, pc200, driver_device, 0, "Amstrad plc", "Amstrad PC3086", MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/asst128.cpp b/src/mame/drivers/asst128.cpp index 7ee9e464a66..1f246a3fec5 100644 --- a/src/mame/drivers/asst128.cpp +++ b/src/mame/drivers/asst128.cpp @@ -2,12 +2,9 @@ // copyright-holders:Sergey Svishchev #include "emu.h" #include "includes/genpc.h" +#include "bus/pc_kbd/keyboards.h" #include "machine/pc_fdc.h" -#include "cpu/i86/i86.h" -#include "bus/isa/isa.h" -#include "bus/isa/isa_cards.h" #include "formats/asst128_dsk.h" -#include "bus/pc_kbd/keyboards.h" class asst128_mb_device : public ibm5150_mb_device { @@ -16,22 +13,16 @@ public: asst128_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : ibm5150_mb_device(mconfig, tag, owner, clock) { } -protected: - // device-level overrides - void device_start() override; + DECLARE_ADDRESS_MAP(map, 8); }; -void asst128_mb_device::device_start() -{ - install_device(0x0020, 0x0021, 0, 0, read8_delegate(FUNC(pic8259_device::read), (pic8259_device*)m_pic8259), write8_delegate(FUNC(pic8259_device::write), (pic8259_device*)m_pic8259) ); - install_device(0x0040, 0x0043, 0, 0, read8_delegate(FUNC(pit8253_device::read), (pit8253_device*)m_pit8253), write8_delegate(FUNC(pit8253_device::write), (pit8253_device*)m_pit8253) ); - install_device(0x0060, 0x0063, 0, 0, read8_delegate(FUNC(i8255_device::read), (i8255_device*)m_ppi8255), write8_delegate(FUNC(i8255_device::write), (i8255_device*)m_ppi8255) ); - install_device(0x0080, 0x0087, 0, 0, read8_delegate(FUNC(ibm5160_mb_device::pc_page_r), this), write8_delegate(FUNC(ibm5160_mb_device::pc_page_w),this) ); - install_device(0x00a0, 0x00a1, 0, 0, read8_delegate(), write8_delegate(FUNC(ibm5160_mb_device::nmi_enable_w),this)); - /* MESS managed RAM */ - if ( m_ram->pointer() ) - membank( "bank10" )->set_base( m_ram->pointer() ); -} +DEVICE_ADDRESS_MAP_START( map, 8, asst128_mb_device ) + AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259", pic8259_device, read, write) + AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("pit8253", pit8253_device, read, write) + AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) + AM_RANGE(0x0080, 0x008f) AM_WRITE(pc_page_w) + AM_RANGE(0x00a0, 0x00a1) AM_WRITE(nmi_enable_w) +ADDRESS_MAP_END const device_type ASST128_MOTHERBOARD = &device_creator; @@ -42,12 +33,10 @@ public: asst128_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_mb(*this, "mb") , m_fdc(*this, "fdc") { } - required_device m_maincpu; - required_device m_mb; + required_device m_maincpu; required_device m_fdc; DECLARE_FLOPPY_FORMATS( asst128_formats ); @@ -59,8 +48,8 @@ public: void asst128_state::machine_start() { memory_region* font = memregion(":board0:cga_mc1502:gfx1"); - memcpy(font->base(), memregion("maincpu")->base()+0xffa6e, 0x0400); - memcpy(font->base()+0x0400, memregion("maincpu")->base()+0xf4000, 0x0400); + memcpy(font->base(), memregion("bios")->base()+0xfa6e, 0x0400); + memcpy(font->base()+0x0400, memregion("bios")->base()+0x4000, 0x0400); } WRITE8_MEMBER(asst128_state::asst128_fdc_dor_w) @@ -71,16 +60,12 @@ WRITE8_MEMBER(asst128_state::asst128_fdc_dor_w) static ADDRESS_MAP_START( asst128_map, AS_PROGRAM, 16, asst128_state) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x7ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xd0000, 0xeffff) AM_NOP - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START(asst128_io, AS_IO, 16, asst128_state) ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", asst128_mb_device, map, 0xffff) AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff) AM_RANGE(0x03f2, 0x03f3) AM_WRITE8(asst128_fdc_dor_w, 0xffff) AM_RANGE(0x03f4, 0x03f5) AM_DEVICE8("fdc:upd765", upd765a_device, map, 0xffff) @@ -108,10 +93,7 @@ static MACHINE_CONFIG_START( asst128, asst128_state ) asst128_mb_device::static_set_cputag(*device, "maincpu"); MCFG_DEVICE_INPUT_DEFAULTS(asst128) -// MCFG_DEVICE_REMOVE("mb:dma8237") - - MCFG_DEVICE_REMOVE("mb:cassette") - MCFG_CASSETTE_ADD("mb:cassette") + MCFG_DEVICE_MODIFY("mb:cassette") MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) MCFG_ISA8_SLOT_ADD("mb:isa", "board0", pc_isa8_cards, "cga_mc1502", true) @@ -127,14 +109,15 @@ static MACHINE_CONFIG_START( asst128, asst128_state ) MCFG_PC_JOY_ADD("pc_joy") MCFG_RAM_ADD(RAM_TAG) - MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_DEFAULT_SIZE("512K") + MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K") MACHINE_CONFIG_END ROM_START( asst128 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) - ROM_LOAD( "extbios.bin", 0xf4000, 0x2000, CRC(e3bf22de) SHA1(d4319edc82c0015ca0adc6c8771e887659717e62)) - ROM_LOAD( "basic.bin", 0xf6000, 0x8000, CRC(a4ec66f6) SHA1(80e934986022681ccde180e92aa108e716c4f19b)) - ROM_LOAD( "mainbios.bin", 0xfe000, 0x2000, CRC(8426cbf5) SHA1(41d14137ffa651977041da22aa8071c0f7854158)) + ROM_REGION16_LE(0x10000,"bios", 0) + ROM_LOAD( "extbios.bin", 0x4000, 0x2000, CRC(e3bf22de) SHA1(d4319edc82c0015ca0adc6c8771e887659717e62)) + ROM_LOAD( "basic.bin", 0x6000, 0x8000, CRC(a4ec66f6) SHA1(80e934986022681ccde180e92aa108e716c4f19b)) + ROM_LOAD( "mainbios.bin", 0xe000, 0x2000, CRC(8426cbf5) SHA1(41d14137ffa651977041da22aa8071c0f7854158)) // XXX needs dumping ROM_REGION(0x2000,"gfx1", ROMREGION_ERASE00) diff --git a/src/mame/drivers/ec184x.cpp b/src/mame/drivers/ec184x.cpp index e0a1ed23348..bbad68d0c37 100644 --- a/src/mame/drivers/ec184x.cpp +++ b/src/mame/drivers/ec184x.cpp @@ -168,63 +168,37 @@ MACHINE_RESET_MEMBER( ec184x_state, ec1841 ) static ADDRESS_MAP_START( ec1840_map, AS_PROGRAM, 8, ec184x_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x7ffff) AM_RAM - AM_RANGE(0xa0000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xdc000, 0xdffff) AM_RAM - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START( ec1841_map, AS_PROGRAM, 16, ec184x_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x7ffff) AM_RAM - AM_RANGE(0xa0000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START( ec1847_map, AS_PROGRAM, 8, ec184x_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xdc000, 0xdffff) AM_RAM - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xe0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START( ec1840_io, AS_IO, 8, ec184x_state ) ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", ibm5150_mb_device, map) ADDRESS_MAP_END static ADDRESS_MAP_START( ec1841_io, AS_IO, 16, ec184x_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x02b0, 0x02b3) AM_READWRITE8(memboard_r, memboard_w, 0xffff); + AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", ec1841_mb_device, map, 0xffff) + AM_RANGE(0x02b0, 0x02b3) AM_READWRITE8(memboard_r, memboard_w, 0xffff) ADDRESS_MAP_END static ADDRESS_MAP_START( ec1847_io, AS_IO, 8, ec184x_state ) ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", ibm5160_mb_device, map) // AM_RANGE(0x0210, 0x021f) AM_RAM // internal (non-standard?) bus extender ADDRESS_MAP_END -static INPUT_PORTS_START( ec1841 ) -INPUT_PORTS_END - -static DEVICE_INPUT_DEFAULTS_START( ec1840 ) - DEVICE_INPUT_DEFAULTS("DSW0", 0x31, 0x21) -DEVICE_INPUT_DEFAULTS_END - -static DEVICE_INPUT_DEFAULTS_START( ec1841 ) - DEVICE_INPUT_DEFAULTS("DSW0", 0x31, 0x21) -DEVICE_INPUT_DEFAULTS_END - -static DEVICE_INPUT_DEFAULTS_START( ec1847 ) - DEVICE_INPUT_DEFAULTS("DSW0", 0x31, 0x31) -DEVICE_INPUT_DEFAULTS_END - // XXX verify everything static MACHINE_CONFIG_START( ec1840, ec184x_state ) MCFG_CPU_ADD("maincpu", I8088, 4096000) @@ -233,7 +207,6 @@ static MACHINE_CONFIG_START( ec1840, ec184x_state ) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb) MCFG_IBM5150_MOTHERBOARD_ADD("mb","maincpu") - MCFG_DEVICE_INPUT_DEFAULTS(ec1840) MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", ec184x_isa8_cards, "ec1840.0002", false) MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false) // actually ec1840.0003 -- w/o mouse port @@ -259,7 +232,6 @@ static MACHINE_CONFIG_START( ec1841, ec184x_state ) MCFG_MACHINE_RESET_OVERRIDE(ec184x_state, ec1841) MCFG_EC1841_MOTHERBOARD_ADD("mb", "maincpu") - MCFG_DEVICE_INPUT_DEFAULTS(ec1841) MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", ec184x_isa8_cards, "ec1841.0002", false) // cga MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false) // fdc + mouse port @@ -285,7 +257,6 @@ static MACHINE_CONFIG_START( ec1847, ec184x_state ) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb) MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu") - MCFG_DEVICE_INPUT_DEFAULTS(ec1847) MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "hercules", false) // cga, ega and vga(?) are options too MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "fdc_xt", false) @@ -301,83 +272,83 @@ static MACHINE_CONFIG_START( ec1847, ec184x_state ) MACHINE_CONFIG_END ROM_START( ec1840 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) + ROM_REGION16_LE(0x10000,"bios", 0) ROM_DEFAULT_BIOS("v4") // supports MDA only ROM_SYSTEM_BIOS(0, "v1", "EC-1840.01") - ROMX_LOAD( "000-01.bin", 0xfe000, 0x0800, CRC(c3ab1fad) SHA1(8168bdee30698f4f9aa7bbb6dfabe62dd723cec5), ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD( "001-01.bin", 0xff000, 0x0800, CRC(601d1155) SHA1(9684d33b92743749704587a48e679ef7a3b20f9c), ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD( "002-01.bin", 0xfe001, 0x0800, CRC(ce4dddb7) SHA1(f9b1da60c848e68ff1c154d695a36a0833de4804), ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD( "003-01.bin", 0xff001, 0x0800, CRC(14b40431) SHA1(ce7fffa41897405ee64fd4e86015e774f8bd108a), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "000-01.bin", 0xe000, 0x0800, CRC(c3ab1fad) SHA1(8168bdee30698f4f9aa7bbb6dfabe62dd723cec5), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "001-01.bin", 0xf000, 0x0800, CRC(601d1155) SHA1(9684d33b92743749704587a48e679ef7a3b20f9c), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "002-01.bin", 0xe001, 0x0800, CRC(ce4dddb7) SHA1(f9b1da60c848e68ff1c154d695a36a0833de4804), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "003-01.bin", 0xf001, 0x0800, CRC(14b40431) SHA1(ce7fffa41897405ee64fd4e86015e774f8bd108a), ROM_SKIP(1) | ROM_BIOS(1)) ROM_SYSTEM_BIOS(1, "v4", "EC-1840.04") - ROMX_LOAD( "000-04-971b.bin", 0xfe000, 0x0800, CRC(06aeaee8) SHA1(9f954e4c48156d573a8e0109e7ca652be9e6036a), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD( "001-04-92b7.bin", 0xff000, 0x0800, CRC(3fae650a) SHA1(c98b777fdeceadd72d6eb9465b3501b9ead55a08), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD( "002-04-9e17.bin", 0xfe001, 0x0800, CRC(d59712df) SHA1(02ea1b3ae9662f5c64c58920a32ca9db0f6fbd12), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD( "003-04-3ccb.bin", 0xff001, 0x0800, CRC(7fc362c7) SHA1(538e13639ad2b4c30bd72582e323181e63513306), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "000-04-971b.bin", 0xe000, 0x0800, CRC(06aeaee8) SHA1(9f954e4c48156d573a8e0109e7ca652be9e6036a), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "001-04-92b7.bin", 0xf000, 0x0800, CRC(3fae650a) SHA1(c98b777fdeceadd72d6eb9465b3501b9ead55a08), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "002-04-9e17.bin", 0xe001, 0x0800, CRC(d59712df) SHA1(02ea1b3ae9662f5c64c58920a32ca9db0f6fbd12), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "003-04-3ccb.bin", 0xf001, 0x0800, CRC(7fc362c7) SHA1(538e13639ad2b4c30bd72582e323181e63513306), ROM_SKIP(1) | ROM_BIOS(2)) ROM_REGION(0x2000,"gfx1", ROMREGION_ERASE00) ROM_END ROM_START( ec1841 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) + ROM_REGION16_LE(0x10000,"bios", 0) ROM_DEFAULT_BIOS("v2") ROM_SYSTEM_BIOS(0, "v1", "EC-1841.01") - ROMX_LOAD( "012-01-3107.bin", 0xfc000, 0x0800, CRC(77957396) SHA1(785f1dceb6e2b4618f5c5f0af15eb74a8c951448), ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD( "013-01-203f.bin", 0xfc001, 0x0800, CRC(768bd3d5) SHA1(2e948f2ad262de306d889b7964c3f1aad45ff5bc), ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD( "014-01-fa40.bin", 0xfd000, 0x0800, CRC(47722b58) SHA1(a6339ee8af516f834826b7828a5cf79cb650480c), ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD( "015-01-bf1d.bin", 0xfd001, 0x0800, CRC(b585b5ea) SHA1(d0ebed586eb13031477c2e071c50416682f80489), ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD( "016-01-65f7.bin", 0xfe000, 0x0800, CRC(28a07db4) SHA1(17fbcd60dacd1d3f8d8355db429f97e4d1d1ac88), ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD( "017-01-5be1.bin", 0xfe001, 0x0800, CRC(928bda26) SHA1(ee889184067e2680b29a8ef1c3a76cf5afd4c78d), ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD( "018-01-7090.bin", 0xff000, 0x0800, CRC(75ca7d7e) SHA1(6356426820c5326a7893a437d54b02f250ef8609), ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD( "019-01-0492.bin", 0xff001, 0x0800, CRC(8a9d593e) SHA1(f3936d2cb4e6d130dd732973f126c3aa20612463), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "012-01-3107.bin", 0xc000, 0x0800, CRC(77957396) SHA1(785f1dceb6e2b4618f5c5f0af15eb74a8c951448), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "013-01-203f.bin", 0xc001, 0x0800, CRC(768bd3d5) SHA1(2e948f2ad262de306d889b7964c3f1aad45ff5bc), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "014-01-fa40.bin", 0xd000, 0x0800, CRC(47722b58) SHA1(a6339ee8af516f834826b7828a5cf79cb650480c), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "015-01-bf1d.bin", 0xd001, 0x0800, CRC(b585b5ea) SHA1(d0ebed586eb13031477c2e071c50416682f80489), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "016-01-65f7.bin", 0xe000, 0x0800, CRC(28a07db4) SHA1(17fbcd60dacd1d3f8d8355db429f97e4d1d1ac88), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "017-01-5be1.bin", 0xe001, 0x0800, CRC(928bda26) SHA1(ee889184067e2680b29a8ef1c3a76cf5afd4c78d), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "018-01-7090.bin", 0xf000, 0x0800, CRC(75ca7d7e) SHA1(6356426820c5326a7893a437d54b02f250ef8609), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "019-01-0492.bin", 0xf001, 0x0800, CRC(8a9d593e) SHA1(f3936d2cb4e6d130dd732973f126c3aa20612463), ROM_SKIP(1) | ROM_BIOS(1)) ROM_SYSTEM_BIOS(1, "v2", "EC-1841.02") - ROMX_LOAD( "012-02-37f6.bin", 0xfc000, 0x0800, CRC(8f5c6a20) SHA1(874b62f9cee8d3b974f33732f94eff10fc002c44), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD( "013-02-2552.bin", 0xfc001, 0x0800, CRC(e3c10128) SHA1(d6ed743ebe9c130925c9f17aad1a45db9194c967), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD( "014-02-0fbe.bin", 0xfd000, 0x0800, CRC(f8517e5e) SHA1(8034cd6ff5778365dc9daa494524f1753a74f1ed), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD( "015-02-d736.bin", 0xfd001, 0x0800, CRC(8538c52a) SHA1(ee981ce90870b6546a18f2a2e64d71b0038ce0dd), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD( "016-02-5b2c.bin", 0xfe000, 0x0800, CRC(3d1d1e67) SHA1(c527e29796537787c0f6c329f3c203f6131ca77f), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD( "017-02-4b9d.bin", 0xfe001, 0x0800, CRC(1b985264) SHA1(5ddcb9c13564be208c5068c105444a87159c67ee), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD( "018-02-7090.bin", 0xff000, 0x0800, CRC(75ca7d7e) SHA1(6356426820c5326a7893a437d54b02f250ef8609), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD( "019-02-0493.bin", 0xff001, 0x0800, CRC(61aae23d) SHA1(7b3aa24a63ee31b194297eb1e61c3827edfcb95a), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "012-02-37f6.bin", 0xc000, 0x0800, CRC(8f5c6a20) SHA1(874b62f9cee8d3b974f33732f94eff10fc002c44), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "013-02-2552.bin", 0xc001, 0x0800, CRC(e3c10128) SHA1(d6ed743ebe9c130925c9f17aad1a45db9194c967), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "014-02-0fbe.bin", 0xd000, 0x0800, CRC(f8517e5e) SHA1(8034cd6ff5778365dc9daa494524f1753a74f1ed), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "015-02-d736.bin", 0xd001, 0x0800, CRC(8538c52a) SHA1(ee981ce90870b6546a18f2a2e64d71b0038ce0dd), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "016-02-5b2c.bin", 0xe000, 0x0800, CRC(3d1d1e67) SHA1(c527e29796537787c0f6c329f3c203f6131ca77f), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "017-02-4b9d.bin", 0xe001, 0x0800, CRC(1b985264) SHA1(5ddcb9c13564be208c5068c105444a87159c67ee), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "018-02-7090.bin", 0xf000, 0x0800, CRC(75ca7d7e) SHA1(6356426820c5326a7893a437d54b02f250ef8609), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "019-02-0493.bin", 0xf001, 0x0800, CRC(61aae23d) SHA1(7b3aa24a63ee31b194297eb1e61c3827edfcb95a), ROM_SKIP(1) | ROM_BIOS(2)) ROM_SYSTEM_BIOS(2, "v3", "EC-1841.03") - ROMX_LOAD( "012-03-37e7.bin", 0xfc000, 0x0800, CRC(49992bd5) SHA1(119121e1b4af1c44b9b8c2edabe7dc1d3019c4a6), ROM_SKIP(1) | ROM_BIOS(3)) - ROMX_LOAD( "013-03-2554.bin", 0xfc001, 0x0800, CRC(834bd7d7) SHA1(e37514fc4cb8a5cbe68e7564e0e07d5116c4021a), ROM_SKIP(1) | ROM_BIOS(3)) - ROMX_LOAD( "014-03-0fbe.bin", 0xfd000, 0x0800, CRC(f8517e5e) SHA1(8034cd6ff5778365dc9daa494524f1753a74f1ed), ROM_SKIP(1) | ROM_BIOS(3)) - ROMX_LOAD( "015-03-d736.bin", 0xfd001, 0x0800, CRC(8538c52a) SHA1(ee981ce90870b6546a18f2a2e64d71b0038ce0dd), ROM_SKIP(1) | ROM_BIOS(3)) - ROMX_LOAD( "016-03-5b2c.bin", 0xfe000, 0x0800, CRC(3d1d1e67) SHA1(c527e29796537787c0f6c329f3c203f6131ca77f), ROM_SKIP(1) | ROM_BIOS(3)) - ROMX_LOAD( "017-03-4b9d.bin", 0xfe001, 0x0800, CRC(1b985264) SHA1(5ddcb9c13564be208c5068c105444a87159c67ee), ROM_SKIP(1) | ROM_BIOS(3)) - ROMX_LOAD( "018-03-7090.bin", 0xff000, 0x0800, CRC(75ca7d7e) SHA1(6356426820c5326a7893a437d54b02f250ef8609), ROM_SKIP(1) | ROM_BIOS(3)) - ROMX_LOAD( "019-03-0493.bin", 0xff001, 0x0800, CRC(61aae23d) SHA1(7b3aa24a63ee31b194297eb1e61c3827edfcb95a), ROM_SKIP(1) | ROM_BIOS(3)) + ROMX_LOAD( "012-03-37e7.bin", 0xc000, 0x0800, CRC(49992bd5) SHA1(119121e1b4af1c44b9b8c2edabe7dc1d3019c4a6), ROM_SKIP(1) | ROM_BIOS(3)) + ROMX_LOAD( "013-03-2554.bin", 0xc001, 0x0800, CRC(834bd7d7) SHA1(e37514fc4cb8a5cbe68e7564e0e07d5116c4021a), ROM_SKIP(1) | ROM_BIOS(3)) + ROMX_LOAD( "014-03-0fbe.bin", 0xd000, 0x0800, CRC(f8517e5e) SHA1(8034cd6ff5778365dc9daa494524f1753a74f1ed), ROM_SKIP(1) | ROM_BIOS(3)) + ROMX_LOAD( "015-03-d736.bin", 0xd001, 0x0800, CRC(8538c52a) SHA1(ee981ce90870b6546a18f2a2e64d71b0038ce0dd), ROM_SKIP(1) | ROM_BIOS(3)) + ROMX_LOAD( "016-03-5b2c.bin", 0xe000, 0x0800, CRC(3d1d1e67) SHA1(c527e29796537787c0f6c329f3c203f6131ca77f), ROM_SKIP(1) | ROM_BIOS(3)) + ROMX_LOAD( "017-03-4b9d.bin", 0xe001, 0x0800, CRC(1b985264) SHA1(5ddcb9c13564be208c5068c105444a87159c67ee), ROM_SKIP(1) | ROM_BIOS(3)) + ROMX_LOAD( "018-03-7090.bin", 0xf000, 0x0800, CRC(75ca7d7e) SHA1(6356426820c5326a7893a437d54b02f250ef8609), ROM_SKIP(1) | ROM_BIOS(3)) + ROMX_LOAD( "019-03-0493.bin", 0xf001, 0x0800, CRC(61aae23d) SHA1(7b3aa24a63ee31b194297eb1e61c3827edfcb95a), ROM_SKIP(1) | ROM_BIOS(3)) ROM_END ROM_START( ec1845 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) - ROMX_LOAD( "184500.bin", 0xfc000, 0x0800, CRC(7c472ef7) SHA1(3af53f27b49bbc731bf51f9300fbada23a1bfcfc), ROM_SKIP(1)) - ROMX_LOAD( "184501.bin", 0xfc001, 0x0800, CRC(db240dc6) SHA1(d7bb022213d09bbf2a8107fe4f1cd27b23939e18), ROM_SKIP(1)) - ROMX_LOAD( "184502.bin", 0xfd000, 0x0800, CRC(149e7e29) SHA1(7f2a297588fef1bc750c57e6ae0d5acf3d27c486), ROM_SKIP(1)) - ROMX_LOAD( "184503.bin", 0xfd001, 0x0800, CRC(e28cbd74) SHA1(cf1fba4e67c8e1dd8cdda547118e84b704029b03), ROM_SKIP(1)) - ROMX_LOAD( "184504.bin", 0xfe000, 0x0800, CRC(55fa7a1d) SHA1(58f7abab08b9d2f0a1c1636e11bb72af2694c95f), ROM_SKIP(1)) - ROMX_LOAD( "184505.bin", 0xfe001, 0x0800, CRC(c807e3f5) SHA1(08117e449f0d04f96041cff8d34893f500f3760d), ROM_SKIP(1)) - ROMX_LOAD( "184506.bin", 0xff000, 0x0800, CRC(24f5c27c) SHA1(7822dd7f715ef00ccf6d8408be8bbfe01c2eba20), ROM_SKIP(1)) - ROMX_LOAD( "184507.bin", 0xff001, 0x0800, CRC(75122203) SHA1(7b0fbdf1315230633e39574ac7360163bc7361e1), ROM_SKIP(1)) + ROM_REGION16_LE(0x10000,"bios", 0) + ROMX_LOAD( "184500.bin", 0xc000, 0x0800, CRC(7c472ef7) SHA1(3af53f27b49bbc731bf51f9300fbada23a1bfcfc), ROM_SKIP(1)) + ROMX_LOAD( "184501.bin", 0xc001, 0x0800, CRC(db240dc6) SHA1(d7bb022213d09bbf2a8107fe4f1cd27b23939e18), ROM_SKIP(1)) + ROMX_LOAD( "184502.bin", 0xd000, 0x0800, CRC(149e7e29) SHA1(7f2a297588fef1bc750c57e6ae0d5acf3d27c486), ROM_SKIP(1)) + ROMX_LOAD( "184503.bin", 0xd001, 0x0800, CRC(e28cbd74) SHA1(cf1fba4e67c8e1dd8cdda547118e84b704029b03), ROM_SKIP(1)) + ROMX_LOAD( "184504.bin", 0xe000, 0x0800, CRC(55fa7a1d) SHA1(58f7abab08b9d2f0a1c1636e11bb72af2694c95f), ROM_SKIP(1)) + ROMX_LOAD( "184505.bin", 0xe001, 0x0800, CRC(c807e3f5) SHA1(08117e449f0d04f96041cff8d34893f500f3760d), ROM_SKIP(1)) + ROMX_LOAD( "184506.bin", 0xf000, 0x0800, CRC(24f5c27c) SHA1(7822dd7f715ef00ccf6d8408be8bbfe01c2eba20), ROM_SKIP(1)) + ROMX_LOAD( "184507.bin", 0xf001, 0x0800, CRC(75122203) SHA1(7b0fbdf1315230633e39574ac7360163bc7361e1), ROM_SKIP(1)) ROM_END ROM_START( ec1847 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) + ROM_REGION16_LE(0x20000,"bios", 0) ROM_SYSTEM_BIOS(0, "vXXX", "EC-1847.0x") - ROMX_LOAD( "308_d47_2764.bin", 0xc8000, 0x2000, CRC(f06924f2) SHA1(83a5dedf1c06f875c598f087bbc087524bc9bfa3), ROM_BIOS(1)) - ROMX_LOAD( "188m_d47_2764.bin", 0xf4000, 0x2000, CRC(bc8742c7) SHA1(3af09d14e891e976b7a9a2a6e1af63f0eabe5426), ROM_BIOS(1)) - ROMX_LOAD( "188m_d48_2764.bin", 0xfe000, 0x2000, CRC(7d290e95) SHA1(e73e6c8e19477fce5de3f95b89693dc6ad6781ab), ROM_BIOS(1)) + ROMX_LOAD( "308_d47_2764.bin", 0x08000, 0x2000, CRC(f06924f2) SHA1(83a5dedf1c06f875c598f087bbc087524bc9bfa3), ROM_BIOS(1)) + ROMX_LOAD( "188m_d47_2764.bin", 0x14000, 0x2000, CRC(bc8742c7) SHA1(3af09d14e891e976b7a9a2a6e1af63f0eabe5426), ROM_BIOS(1)) + ROMX_LOAD( "188m_d48_2764.bin", 0x1e000, 0x2000, CRC(7d290e95) SHA1(e73e6c8e19477fce5de3f95b89693dc6ad6781ab), ROM_BIOS(1)) ROM_REGION(0x2000,"gfx1", ROMREGION_ERASE00) ROM_LOAD( "317_d28_2732.bin", 0x00000, 0x1000, CRC(8939599b) SHA1(53d02460cf93596882a96758ef4bac5fa1ce55b2)) // monochrome font ROM_END /* YEAR ROM NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP ( 1987, ec1840, ibm5150, 0, ec1840, ec1841, driver_device, 0, "", "EC-1840", MACHINE_NOT_WORKING) -COMP ( 1987, ec1841, ibm5150, 0, ec1841, ec1841, ec184x_state, ec1841, "", "EC-1841", 0) -COMP ( 1989, ec1845, ibm5150, 0, ec1841, ec1841, ec184x_state, ec1841, "", "EC-1845", MACHINE_NOT_WORKING) -COMP ( 1990, ec1847, ibm5150, 0, ec1847, ec1841, driver_device, 0, "", "EC-1847", MACHINE_NOT_WORKING) +COMP ( 1987, ec1840, ibm5150, 0, ec1840, 0, driver_device, 0, "", "EC-1840", MACHINE_NOT_WORKING) +COMP ( 1987, ec1841, ibm5150, 0, ec1841, 0, ec184x_state, ec1841, "", "EC-1841", 0) +COMP ( 1989, ec1845, ibm5150, 0, ec1841, 0, ec184x_state, ec1841, "", "EC-1845", MACHINE_NOT_WORKING) +COMP ( 1990, ec1847, ibm5150, 0, ec1847, 0, driver_device, 0, "", "EC-1847", MACHINE_NOT_WORKING) diff --git a/src/mame/drivers/europc.cpp b/src/mame/drivers/europc.cpp index 8a1f92ecfb0..476d1b1fda6 100644 --- a/src/mame/drivers/europc.cpp +++ b/src/mame/drivers/europc.cpp @@ -5,8 +5,6 @@ #include "includes/genpc.h" #include "machine/nvram.h" #include "machine/pckeybrd.h" -#include "bus/isa/isa.h" -#include "bus/isa/isa_cards.h" class europc_pc_state : public driver_device { @@ -325,18 +323,18 @@ WRITE8_MEMBER( europc_pc_state::europc_rtc_w ) DRIVER_INIT_MEMBER(europc_pc_state,europc) { - UINT8 *rom = &memregion("maincpu")->base()[0]; + UINT8 *rom = &memregion("bios")->base()[0]; int i; /* fix century rom bios bug ! if year <79 month (and not CENTURY) is loaded with 0x20 */ - if (rom[0xff93e]==0xb6){ // mov dh, + if (rom[0xf93e]==0xb6){ // mov dh, UINT8 a; - rom[0xff93e]=0xb5; // mov ch, - for (i=0xf8000, a=0; i<0xfffff; i++ ) a+=rom[i]; - rom[0xfffff]=256-a; + rom[0xf93e]=0xb5; // mov ch, + for (i=0x8000, a=0; i<0xffff; i++ ) a+=rom[i]; + rom[0xffff]=256-a; } memset(&m_rtc_data,0,sizeof(m_rtc_data)); @@ -462,17 +460,13 @@ INPUT_PORTS_END static ADDRESS_MAP_START( europc_map, AS_PROGRAM, 8, europc_pc_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xaffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_NOP - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xd0000, 0xeffff) AM_NOP - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START(europc_io, AS_IO, 8, europc_pc_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0060, 0x0063) AM_READWRITE(europc_pio_r, europc_pio_w) + AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", pc_noppi_mb_device, map) AM_RANGE(0x0250, 0x025f) AM_READWRITE(europc_jim_r, europc_jim_w) AM_RANGE(0x02e0, 0x02e0) AM_READ(europc_jim2_r) ADDRESS_MAP_END @@ -497,12 +491,13 @@ static MACHINE_CONFIG_START( europc, europc_pc_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K") MACHINE_CONFIG_END ROM_START( europc ) - ROM_REGION(0x100000,"maincpu", 0) + ROM_REGION(0x10000,"bios", 0) // hdd bios integrated! - ROM_LOAD("50145", 0xf8000, 0x8000, CRC(1775a11d) SHA1(54430d4d0462860860397487c9c109e6f70db8e3)) // V2.07 + ROM_LOAD("50145", 0x8000, 0x8000, CRC(1775a11d) SHA1(54430d4d0462860860397487c9c109e6f70db8e3)) // V2.07 ROM_END COMP( 1988, europc, ibm5150, 0, europc, europc, europc_pc_state, europc, "Schneider Rdf. AG", "EURO PC", MACHINE_NOT_WORKING) diff --git a/src/mame/drivers/genpc.cpp b/src/mame/drivers/genpc.cpp index 72d267b69af..857bac57eeb 100644 --- a/src/mame/drivers/genpc.cpp +++ b/src/mame/drivers/genpc.cpp @@ -15,7 +15,6 @@ #include "cpu/nec/nec.h" #include "cpu/i86/i86.h" -#include "machine/pc_lpt.h" #include "bus/pc_kbd/keyboards.h" #include "softlist.h" @@ -31,37 +30,25 @@ public: static ADDRESS_MAP_START( pc8_map, AS_PROGRAM, 8, genpc_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xd0000, 0xeffff) AM_NOP - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START( pc16_map, AS_PROGRAM, 16, genpc_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xd0000, 0xeffff) AM_NOP - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END - static ADDRESS_MAP_START(pc8_io, AS_IO, 8, genpc_state ) ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", ibm5160_mb_device, map) ADDRESS_MAP_END static ADDRESS_MAP_START(pc16_io, AS_IO, 16, genpc_state ) ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", ibm5160_mb_device, map, 0xffff) ADDRESS_MAP_END -static INPUT_PORTS_START( pcgen ) -INPUT_PORTS_END - static DEVICE_INPUT_DEFAULTS_START(cga) DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x20) DEVICE_INPUT_DEFAULTS_END @@ -70,7 +57,6 @@ static DEVICE_INPUT_DEFAULTS_START(vga) DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x00) DEVICE_INPUT_DEFAULTS_END - static MACHINE_CONFIG_START( pcmda, genpc_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V20, 4772720) @@ -93,147 +79,65 @@ static MACHINE_CONFIG_START( pcmda, genpc_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K") /* software lists */ MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150") MACHINE_CONFIG_END -static MACHINE_CONFIG_START( pcherc, genpc_state ) - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", V20, 4772720) - MCFG_CPU_PROGRAM_MAP(pc8_map) - MCFG_CPU_IO_MAP(pc8_io) - MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb) - - MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu") - - MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "hercules", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "com", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "fdc_xt", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "hdc", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "adlib", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false) - - /* keyboard */ - MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270) - - /* internal ram */ - MCFG_RAM_ADD(RAM_TAG) - MCFG_RAM_DEFAULT_SIZE("640K") - - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150") +static MACHINE_CONFIG_DERIVED( pcherc, pcmda ) + MCFG_DEVICE_MODIFY("isa1") + MCFG_DEVICE_SLOT_INTERFACE(pc_isa8_cards, "hercules", false) MACHINE_CONFIG_END -static MACHINE_CONFIG_START( pccga, genpc_state ) - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", I8086, 4772720) +static MACHINE_CONFIG_DERIVED( pccga, pcmda ) + MCFG_CPU_REPLACE("maincpu", I8086, 4772720) MCFG_CPU_PROGRAM_MAP(pc16_map) MCFG_CPU_IO_MAP(pc16_io) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb) - - MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu") + MCFG_DEVICE_MODIFY("mb") MCFG_DEVICE_INPUT_DEFAULTS(cga) - - MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "cga", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "com", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "fdc_xt", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "hdc", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "sblaster1_0", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false) - - /* keyboard */ - MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270) - - /* internal ram */ - MCFG_RAM_ADD(RAM_TAG) - MCFG_RAM_DEFAULT_SIZE("640K") - - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150") + MCFG_DEVICE_MODIFY("isa1") + MCFG_DEVICE_SLOT_INTERFACE(pc_isa8_cards, "cga", false) MACHINE_CONFIG_END -static MACHINE_CONFIG_START( pcega, genpc_state ) - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", I8086, 4772720) - MCFG_CPU_PROGRAM_MAP(pc16_map) - MCFG_CPU_IO_MAP(pc16_io) - MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb) - - MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu") +static MACHINE_CONFIG_DERIVED( pcega, pccga ) + MCFG_DEVICE_MODIFY("isa1") + MCFG_DEVICE_SLOT_INTERFACE(pc_isa8_cards, "ega", false) + MCFG_DEVICE_MODIFY("mb") MCFG_DEVICE_INPUT_DEFAULTS(vga) - - MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "com", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "fdc_xt", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "hdc", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "sblaster1_0", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "ega", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false) - - /* keyboard */ - MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270) - - /* internal ram */ - MCFG_RAM_ADD(RAM_TAG) - MCFG_RAM_DEFAULT_SIZE("640K") - - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150") MACHINE_CONFIG_END -static MACHINE_CONFIG_START( xtvga, genpc_state ) - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", I8086, 4772720) - MCFG_CPU_PROGRAM_MAP(pc16_map) - MCFG_CPU_IO_MAP(pc16_io) - MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb) - - MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu") - MCFG_DEVICE_INPUT_DEFAULTS(vga) - - MCFG_ISA8_SLOT_ADD("mb:isa","isa1", pc_isa8_cards, "com", false) - MCFG_ISA8_SLOT_ADD("mb:isa","isa2", pc_isa8_cards, "fdc_xt", false) - MCFG_ISA8_SLOT_ADD("mb:isa","isa3", pc_isa8_cards, "hdc", false) - MCFG_ISA8_SLOT_ADD("mb:isa","isa4", pc_isa8_cards, "sblaster1_0", false) - MCFG_ISA8_SLOT_ADD("mb:isa","isa5", pc_isa8_cards, "svga_et4k", false) - MCFG_ISA8_SLOT_ADD("mb:isa","isa6", pc_isa8_cards, nullptr, false) - - /* keyboard */ - MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270) - - /* internal ram */ - MCFG_RAM_ADD(RAM_TAG) - MCFG_RAM_DEFAULT_SIZE("640K") - - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150") +static MACHINE_CONFIG_DERIVED( xtvga, pcega ) + MCFG_DEVICE_MODIFY("isa1") + MCFG_DEVICE_SLOT_INTERFACE(pc_isa8_cards, "svga_et4k", false) MACHINE_CONFIG_END ROM_START( pcmda ) - ROM_REGION(0x100000,"maincpu", 0) + ROM_REGION(0x10000,"bios", 0) ROM_SYSTEM_BIOS(0, "anon", "XT Anonymous Generic Turbo BIOS") - ROMX_LOAD("pcxt.rom", 0xfe000, 0x02000, CRC(031aafad) SHA1(a641b505bbac97b8775f91fe9b83d9afdf4d038f),ROM_BIOS(1)) + ROMX_LOAD("pcxt.rom", 0xe000, 0x02000, CRC(031aafad) SHA1(a641b505bbac97b8775f91fe9b83d9afdf4d038f),ROM_BIOS(1)) ROM_SYSTEM_BIOS(1, "anon2007", "XT Anonymous Generic Turbo BIOS 2007") - ROMX_LOAD( "pcxt2007.bin", 0xfe000, 0x2000, CRC(1d7bd86c) SHA1(33a500f599b4dad2fe6d7a5c3e89b13bd5dd2987),ROM_BIOS(2)) + ROMX_LOAD( "pcxt2007.bin", 0xe000, 0x2000, CRC(1d7bd86c) SHA1(33a500f599b4dad2fe6d7a5c3e89b13bd5dd2987),ROM_BIOS(2)) ROM_SYSTEM_BIOS(2, "ami", "XT AMI") - ROMX_LOAD( "ami.bin", 0xfe000, 0x2000, CRC(b381eb22) SHA1(9735193de119270c946a17ed58c3ab9554e0852e),ROM_BIOS(3)) + ROMX_LOAD( "ami.bin", 0xe000, 0x2000, CRC(b381eb22) SHA1(9735193de119270c946a17ed58c3ab9554e0852e),ROM_BIOS(3)) ROM_SYSTEM_BIOS(3, "award", "XT Award 2.05") - ROMX_LOAD( "award2.05.bin", 0xfe000, 0x2000, CRC(5b3953e5) SHA1(4a36171aa8d993008187f39f732b9296401b7b6c),ROM_BIOS(4)) + ROMX_LOAD( "award2.05.bin", 0xe000, 0x2000, CRC(5b3953e5) SHA1(4a36171aa8d993008187f39f732b9296401b7b6c),ROM_BIOS(4)) ROM_SYSTEM_BIOS(4, "dtk", "XT DTK Erso bios 2.42") - ROMX_LOAD( "dtk2.42.bin", 0xfe000, 0x2000, CRC(3f2d2a76) SHA1(02fa057f2c22ab199a8d9795ab1ae570f2b13a36),ROM_BIOS(5)) + ROMX_LOAD( "dtk2.42.bin", 0xe000, 0x2000, CRC(3f2d2a76) SHA1(02fa057f2c22ab199a8d9795ab1ae570f2b13a36),ROM_BIOS(5)) ROM_SYSTEM_BIOS(5, "peter", "XT Peter Kohlman 3.75") // V20 Rom only - ROMX_LOAD( "peterv203.75.bin", 0xfe000, 0x2000, CRC(b053a6a4) SHA1(f53218ad3d725f12d9149b22d8afcf6a8869a3bd),ROM_BIOS(6)) + ROMX_LOAD( "peterv203.75.bin", 0xe000, 0x2000, CRC(b053a6a4) SHA1(f53218ad3d725f12d9149b22d8afcf6a8869a3bd),ROM_BIOS(6)) ROM_SYSTEM_BIOS(6, "pho227", "XT Phoenix Bios 2.27") - ROMX_LOAD( "phoenix2.27.bin", 0xfe000, 0x2000, CRC(168ffef0) SHA1(69465db2f9246a614044d1f433d374506a13a07f),ROM_BIOS(7)) + ROMX_LOAD( "phoenix2.27.bin", 0xe000, 0x2000, CRC(168ffef0) SHA1(69465db2f9246a614044d1f433d374506a13a07f),ROM_BIOS(7)) ROM_SYSTEM_BIOS(7, "pho251", "XT Phoenix Bios 2.51") - ROMX_LOAD( "phoenix2.51.bin", 0xfe000, 0x2000, CRC(9b7e9c40) SHA1(c948a8d3d715e469105c6e2acd8b46ec274b25a8),ROM_BIOS(8)) + ROMX_LOAD( "phoenix2.51.bin", 0xe000, 0x2000, CRC(9b7e9c40) SHA1(c948a8d3d715e469105c6e2acd8b46ec274b25a8),ROM_BIOS(8)) ROM_SYSTEM_BIOS(8, "turbo", "XT Turbo Bios 3.10") - ROMX_LOAD( "turbo3.10.bin", 0xfe000, 0x2000, CRC(8aaca1e3) SHA1(9c03da16713e08c0112a04c8bdfa394e7341c1fc),ROM_BIOS(9)) + ROMX_LOAD( "turbo3.10.bin", 0xe000, 0x2000, CRC(8aaca1e3) SHA1(9c03da16713e08c0112a04c8bdfa394e7341c1fc),ROM_BIOS(9)) ROM_END #define rom_pcherc rom_pcmda @@ -241,25 +145,25 @@ ROM_END #define rom_pcega rom_pcmda ROM_START( pc ) - ROM_REGION(0x100000,"maincpu", 0) + ROM_REGION(0x10000,"bios", 0) ROM_SYSTEM_BIOS(0, "anon", "XT Anonymous Generic Turbo BIOS") - ROMX_LOAD("pcxt.rom", 0xfe000, 0x02000, CRC(031aafad) SHA1(a641b505bbac97b8775f91fe9b83d9afdf4d038f),ROM_BIOS(1)) + ROMX_LOAD("pcxt.rom", 0xe000, 0x02000, CRC(031aafad) SHA1(a641b505bbac97b8775f91fe9b83d9afdf4d038f),ROM_BIOS(1)) ROM_SYSTEM_BIOS(1, "anon2007", "XT Anonymous Generic Turbo BIOS 2007") - ROMX_LOAD( "pcxt2007.bin", 0xfe000, 0x2000, CRC(1d7bd86c) SHA1(33a500f599b4dad2fe6d7a5c3e89b13bd5dd2987),ROM_BIOS(2)) + ROMX_LOAD( "pcxt2007.bin", 0xe000, 0x2000, CRC(1d7bd86c) SHA1(33a500f599b4dad2fe6d7a5c3e89b13bd5dd2987),ROM_BIOS(2)) ROM_SYSTEM_BIOS(2, "ami", "XT AMI") - ROMX_LOAD( "ami.bin", 0xfe000, 0x2000, CRC(b381eb22) SHA1(9735193de119270c946a17ed58c3ab9554e0852e),ROM_BIOS(3)) + ROMX_LOAD( "ami.bin", 0xe000, 0x2000, CRC(b381eb22) SHA1(9735193de119270c946a17ed58c3ab9554e0852e),ROM_BIOS(3)) ROM_SYSTEM_BIOS(3, "award", "XT Award 2.05") - ROMX_LOAD( "award2.05.bin", 0xfe000, 0x2000, CRC(5b3953e5) SHA1(4a36171aa8d993008187f39f732b9296401b7b6c),ROM_BIOS(4)) + ROMX_LOAD( "award2.05.bin", 0xe000, 0x2000, CRC(5b3953e5) SHA1(4a36171aa8d993008187f39f732b9296401b7b6c),ROM_BIOS(4)) ROM_SYSTEM_BIOS(4, "dtk", "XT DTK Erso bios 2.42") - ROMX_LOAD( "dtk2.42.bin", 0xfe000, 0x2000, CRC(3f2d2a76) SHA1(02fa057f2c22ab199a8d9795ab1ae570f2b13a36),ROM_BIOS(5)) + ROMX_LOAD( "dtk2.42.bin", 0xe000, 0x2000, CRC(3f2d2a76) SHA1(02fa057f2c22ab199a8d9795ab1ae570f2b13a36),ROM_BIOS(5)) ROM_SYSTEM_BIOS(5, "peter", "XT Peter Kohlman 3.75") - ROMX_LOAD( "peterv203.75.bin", 0xfe000, 0x2000, CRC(b053a6a4) SHA1(f53218ad3d725f12d9149b22d8afcf6a8869a3bd),ROM_BIOS(6)) + ROMX_LOAD( "peterv203.75.bin", 0xe000, 0x2000, CRC(b053a6a4) SHA1(f53218ad3d725f12d9149b22d8afcf6a8869a3bd),ROM_BIOS(6)) ROM_SYSTEM_BIOS(6, "pho227", "XT Phoenix Bios 2.27") - ROMX_LOAD( "phoenix2.27.bin", 0xfe000, 0x2000, CRC(168ffef0) SHA1(69465db2f9246a614044d1f433d374506a13a07f),ROM_BIOS(7)) + ROMX_LOAD( "phoenix2.27.bin", 0xe000, 0x2000, CRC(168ffef0) SHA1(69465db2f9246a614044d1f433d374506a13a07f),ROM_BIOS(7)) ROM_SYSTEM_BIOS(7, "pho251", "XT Phoenix Bios 2.51") - ROMX_LOAD( "phoenix2.51.bin", 0xfe000, 0x2000, CRC(9b7e9c40) SHA1(c948a8d3d715e469105c6e2acd8b46ec274b25a8),ROM_BIOS(8)) + ROMX_LOAD( "phoenix2.51.bin", 0xe000, 0x2000, CRC(9b7e9c40) SHA1(c948a8d3d715e469105c6e2acd8b46ec274b25a8),ROM_BIOS(8)) ROM_SYSTEM_BIOS(8, "turbo", "XT Turbo Bios 3.10") - ROMX_LOAD( "turbo3.10.bin", 0xfe000, 0x2000, CRC(8aaca1e3) SHA1(9c03da16713e08c0112a04c8bdfa394e7341c1fc),ROM_BIOS(9)) + ROMX_LOAD( "turbo3.10.bin", 0xe000, 0x2000, CRC(8aaca1e3) SHA1(9c03da16713e08c0112a04c8bdfa394e7341c1fc),ROM_BIOS(9)) /* IBM 1501981(CGA) and 1501985(MDA) Character rom */ ROM_REGION(0x2000,"gfx1", 0) ROM_LOAD("5788005.u33", 0x00000, 0x2000, CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) /* "AMI 8412PI // 5788005 // (C) IBM CORP. 1981 // KOREA" */ @@ -274,8 +178,8 @@ ROM_END ***************************************************************************/ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP( 1987, pc, ibm5150, 0, pccga, pcgen, driver_device, 0, "", "PC (CGA)" , 0) -COMP( 1987, pcega, ibm5150, 0, pcega, pcgen, driver_device, 0, "", "PC (EGA)" , 0) -COMP ( 1987, pcmda, ibm5150, 0, pcmda, pcgen, driver_device, 0, "", "PC (MDA)" , 0) -COMP ( 1987, pcherc, ibm5150, 0, pcherc, pcgen, driver_device, 0, "", "PC (Hercules)" , 0) -COMP ( 1987, xtvga, ibm5150, 0, xtvga, pcgen, driver_device, 0, "", "PC (VGA)" , MACHINE_NOT_WORKING) +COMP( 1987, pc, ibm5150, 0, pccga, 0, driver_device, 0, "", "PC (CGA)" , 0) +COMP( 1987, pcega, ibm5150, 0, pcega, 0, driver_device, 0, "", "PC (EGA)" , 0) +COMP ( 1987, pcmda, ibm5150, 0, pcmda, 0, driver_device, 0, "", "PC (MDA)" , 0) +COMP ( 1987, pcherc, ibm5150, 0, pcherc, 0, driver_device, 0, "", "PC (Hercules)" , 0) +COMP ( 1987, xtvga, ibm5150, 0, xtvga, 0, driver_device, 0, "", "PC (VGA)" , MACHINE_NOT_WORKING) diff --git a/src/mame/drivers/ibmpc.cpp b/src/mame/drivers/ibmpc.cpp index f49d500e829..3df1c92edaf 100644 --- a/src/mame/drivers/ibmpc.cpp +++ b/src/mame/drivers/ibmpc.cpp @@ -258,9 +258,6 @@ XT U44 IBM.bin: IBM 5160 PC/XT Bank-selection decoding ROM (256x4 bit). Not mapp #include "emu.h" #include "cpu/i86/i86.h" #include "machine/ram.h" -#include "bus/isa/isa.h" -#include "bus/isa/isa_cards.h" -#include "machine/pc_lpt.h" #include "bus/pc_kbd/keyboards.h" #include "includes/genpc.h" #include "softlist.h" @@ -277,30 +274,18 @@ public: static ADDRESS_MAP_START( pc8_map, AS_PROGRAM, 8, ibmpc_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xd0000, 0xeffff) AM_NOP - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START(pc8_io, AS_IO, 8, ibmpc_state ) ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", ibm5160_mb_device, map) ADDRESS_MAP_END -static INPUT_PORTS_START( ibm5150 ) -INPUT_PORTS_END - static DEVICE_INPUT_DEFAULTS_START(cga) DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x20) DEVICE_INPUT_DEFAULTS_END -//static DEVICE_INPUT_DEFAULTS_START(ega) -// DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x00) -//DEVICE_INPUT_DEFAULTS_END - - static MACHINE_CONFIG_START( ibm5150, ibmpc_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I8088, XTAL_14_31818MHz/3) @@ -323,6 +308,7 @@ static MACHINE_CONFIG_START( ibm5150, ibmpc_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K") /* software lists */ MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150") @@ -362,6 +348,7 @@ static MACHINE_CONFIG_START( ibm5160, ibmpc_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K") /* software lists */ MCFG_SOFTWARE_LIST_ADD("pc_disk_list","ibm5150") @@ -370,7 +357,7 @@ MACHINE_CONFIG_END ROM_START( ibm5150 ) - ROM_REGION(0x100000,"maincpu", 0) + ROM_REGION(0x10000,"bios", 0) // ROM_LOAD("600963.u12", 0xc8000, 0x02000, CRC(f3daf85f) SHA1(3bd29538832d3084cbddeec92593988772755283)) /* Tandon/Western Digital Fixed Disk Adapter 600963-001__TYPE_5.U12.2764.bin - Meant for an IBM PC or XT which lacked bios support for HDDs */ /* Xebec 1210 and 1220 Z80-based ST409/ST412 MFM controllers */ @@ -383,27 +370,27 @@ ROM_START( ibm5150 ) ROM_DEFAULT_BIOS( "rev3" ) ROM_SYSTEM_BIOS( 0, "rev3", "IBM PC 5150 1501476 10/27/82" ) - ROMX_LOAD("5000019.u29", 0xf6000, 0x2000, CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9), ROM_BIOS(1)) /* ROM Basic 1.1 F6000-F7FFF; IBM P/N: 5000019, FRU: 6359109 */ - ROMX_LOAD("5000021.u30", 0xf8000, 0x2000, CRC(673a4acc) SHA1(082ae803994048e225150f771794ca305f73d731), ROM_BIOS(1)) /* ROM Basic 1.1 F8000-F9FFF; IBM P/N: 5000021, FRU: 6359111 */ - ROMX_LOAD("5000022.u31", 0xfa000, 0x2000, CRC(aac3fc37) SHA1(c9e0529470edf04da093bb8c8ae2536c688c1a74), ROM_BIOS(1)) /* ROM Basic 1.1 FA000-FBFFF; IBM P/N: 5000022, FRU: 6359112 */ - ROMX_LOAD("5000023.u32", 0xfc000, 0x2000, CRC(3062b3fc) SHA1(5134dd64721cbf093d059ee5d3fd09c7f86604c7), ROM_BIOS(1)) /* ROM Basic 1.1 FC000-FDFFF; IBM P/N: 5000023, FRU: 6359113 */ - ROMX_LOAD("1501476.u33", 0xfe000, 0x2000, CRC(e88792b3) SHA1(40fce6a94dda4328a8b608c7ae2f39d1dc688af4), ROM_BIOS(1)) + ROMX_LOAD("5000019.u29", 0x6000, 0x2000, CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9), ROM_BIOS(1)) /* ROM Basic 1.1 F6000-F7FFF; IBM P/N: 5000019, FRU: 6359109 */ + ROMX_LOAD("5000021.u30", 0x8000, 0x2000, CRC(673a4acc) SHA1(082ae803994048e225150f771794ca305f73d731), ROM_BIOS(1)) /* ROM Basic 1.1 F8000-F9FFF; IBM P/N: 5000021, FRU: 6359111 */ + ROMX_LOAD("5000022.u31", 0xa000, 0x2000, CRC(aac3fc37) SHA1(c9e0529470edf04da093bb8c8ae2536c688c1a74), ROM_BIOS(1)) /* ROM Basic 1.1 FA000-FBFFF; IBM P/N: 5000022, FRU: 6359112 */ + ROMX_LOAD("5000023.u32", 0xc000, 0x2000, CRC(3062b3fc) SHA1(5134dd64721cbf093d059ee5d3fd09c7f86604c7), ROM_BIOS(1)) /* ROM Basic 1.1 FC000-FDFFF; IBM P/N: 5000023, FRU: 6359113 */ + ROMX_LOAD("1501476.u33", 0xe000, 0x2000, CRC(e88792b3) SHA1(40fce6a94dda4328a8b608c7ae2f39d1dc688af4), ROM_BIOS(1)) /* IBM PC 5150 (rev 1: 04/24/81) 2-screw case 16-64k MB w/MDA Card, ROM Basic 1.0 */ ROM_SYSTEM_BIOS( 1, "rev1", "IBM PC 5150 5700051 04/24/81" ) - ROMX_LOAD("5700019.u29", 0xf6000, 0x2000, CRC(b59e8f6c) SHA1(7a5db95370194c73b7921f2d69267268c69d2511), ROM_BIOS(2)) /* ROM Basic 1.0 F6000-F7FFF */ - ROMX_LOAD("5700027.u30", 0xf8000, 0x2000, CRC(bfff99b8) SHA1(ca2f126ba69c1613b7b5a4137d8d8cf1db36a8e6), ROM_BIOS(2)) /* ROM Basic 1.0 F8000-F9FFF */ - ROMX_LOAD("5700035.u31", 0xfa000, 0x2000, CRC(9fe4ec11) SHA1(89af8138185938c3da3386f97d3b0549a51de5ef), ROM_BIOS(2)) /* ROM Basic 1.0 FA000-FBFFF */ - ROMX_LOAD("5700043.u32", 0xfc000, 0x2000, CRC(ea2794e6) SHA1(22fe58bc853ffd393d5e2f98defda7456924b04f), ROM_BIOS(2)) /* ROM Basic 1.0 FC000-FDFFF */ - ROMX_LOAD("5700051.u33", 0xfe000, 0x2000, CRC(12d33fb8) SHA1(f046058faa016ad13aed5a082a45b21dea43d346), ROM_BIOS(2)) + ROMX_LOAD("5700019.u29", 0x6000, 0x2000, CRC(b59e8f6c) SHA1(7a5db95370194c73b7921f2d69267268c69d2511), ROM_BIOS(2)) /* ROM Basic 1.0 F6000-F7FFF */ + ROMX_LOAD("5700027.u30", 0x8000, 0x2000, CRC(bfff99b8) SHA1(ca2f126ba69c1613b7b5a4137d8d8cf1db36a8e6), ROM_BIOS(2)) /* ROM Basic 1.0 F8000-F9FFF */ + ROMX_LOAD("5700035.u31", 0xa000, 0x2000, CRC(9fe4ec11) SHA1(89af8138185938c3da3386f97d3b0549a51de5ef), ROM_BIOS(2)) /* ROM Basic 1.0 FA000-FBFFF */ + ROMX_LOAD("5700043.u32", 0xc000, 0x2000, CRC(ea2794e6) SHA1(22fe58bc853ffd393d5e2f98defda7456924b04f), ROM_BIOS(2)) /* ROM Basic 1.0 FC000-FDFFF */ + ROMX_LOAD("5700051.u33", 0xe000, 0x2000, CRC(12d33fb8) SHA1(f046058faa016ad13aed5a082a45b21dea43d346), ROM_BIOS(2)) /* IBM PC 5150 (rev 2: 10/19/81) 2-screw case, 16-64k MB w/MDA Card, ROM Basic 1.0 */ ROM_SYSTEM_BIOS( 2, "rev2", "IBM PC 5150 5700671 10/19/81" ) - ROMX_LOAD("5700019.u29", 0xf6000, 0x2000, CRC(b59e8f6c) SHA1(7a5db95370194c73b7921f2d69267268c69d2511), ROM_BIOS(3)) /* ROM Basic 1.0 F6000-F7FFF */ - ROMX_LOAD("5700027.u30", 0xf8000, 0x2000, CRC(bfff99b8) SHA1(ca2f126ba69c1613b7b5a4137d8d8cf1db36a8e6), ROM_BIOS(3)) /* ROM Basic 1.0 F8000-F9FFF */ - ROMX_LOAD("5700035.u31", 0xfa000, 0x2000, CRC(9fe4ec11) SHA1(89af8138185938c3da3386f97d3b0549a51de5ef), ROM_BIOS(3)) /* ROM Basic 1.0 FA000-FBFFF */ - ROMX_LOAD("5700043.u32", 0xfc000, 0x2000, CRC(ea2794e6) SHA1(22fe58bc853ffd393d5e2f98defda7456924b04f), ROM_BIOS(3)) /* ROM Basic 1.0 FC000-FDFFF */ - ROMX_LOAD("5700671.u33", 0xfe000, 0x2000, CRC(b7d4ec46) SHA1(bdb06f846c4768f39eeff7e16b6dbff8cd2117d2), ROM_BIOS(3)) + ROMX_LOAD("5700019.u29", 0x6000, 0x2000, CRC(b59e8f6c) SHA1(7a5db95370194c73b7921f2d69267268c69d2511), ROM_BIOS(3)) /* ROM Basic 1.0 F6000-F7FFF */ + ROMX_LOAD("5700027.u30", 0x8000, 0x2000, CRC(bfff99b8) SHA1(ca2f126ba69c1613b7b5a4137d8d8cf1db36a8e6), ROM_BIOS(3)) /* ROM Basic 1.0 F8000-F9FFF */ + ROMX_LOAD("5700035.u31", 0xa000, 0x2000, CRC(9fe4ec11) SHA1(89af8138185938c3da3386f97d3b0549a51de5ef), ROM_BIOS(3)) /* ROM Basic 1.0 FA000-FBFFF */ + ROMX_LOAD("5700043.u32", 0xc000, 0x2000, CRC(ea2794e6) SHA1(22fe58bc853ffd393d5e2f98defda7456924b04f), ROM_BIOS(3)) /* ROM Basic 1.0 FC000-FDFFF */ + ROMX_LOAD("5700671.u33", 0xe000, 0x2000, CRC(b7d4ec46) SHA1(bdb06f846c4768f39eeff7e16b6dbff8cd2117d2), ROM_BIOS(3)) /* Z80 on the Xebec 1210 and 1220 Hard Disk Controllers */ // ROM_REGION(0x10000, "cpu1", 0) @@ -415,29 +402,29 @@ ROM_START( ibm5150 ) ROM_LOAD("5788005.u33", 0x00000, 0x2000, CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) /* "AMI 8412PI // 5788005 // (C) IBM CORP. 1981 // KOREA" */ ROM_END ROM_START( ibm5155 ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD("5000027.u19", 0xf0000, 0x8000, CRC(fc982309) SHA1(2aa781a698a21c332398d9bc8503d4f580df0a05)) - ROM_LOAD("1501512.u18", 0xf8000, 0x8000, CRC(79522c3d) SHA1(6bac726d8d033491d52507278aa388ec04cf8b7e)) + ROM_REGION(0x10000,"bios", 0) + ROM_LOAD("5000027.u19", 0x0000, 0x8000, CRC(fc982309) SHA1(2aa781a698a21c332398d9bc8503d4f580df0a05)) + ROM_LOAD("1501512.u18", 0x8000, 0x8000, CRC(79522c3d) SHA1(6bac726d8d033491d52507278aa388ec04cf8b7e)) /* IBM 1501981(CGA) and 1501985(MDA) Character rom */ ROM_REGION(0x2000,"gfx1", 0) ROM_LOAD("5788005.u33", 0x00000, 0x2000, CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) /* "AMI 8412PI // 5788005 // (C) IBM CORP. 1981 // KOREA" */ ROM_END ROM_START( ibm5140 ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD("7396917.bin", 0xf0000, 0x08000, CRC(95c35652) SHA1(2bdac30715dba114fbe0895b8b4723f8dc26a90d)) - ROM_LOAD("7396918.bin", 0xf8000, 0x08000, CRC(1b4202b0) SHA1(4797ff853ba1675860f293b6368832d05e2f3ea9)) + ROM_REGION(0x10000,"bios", 0) + ROM_LOAD("7396917.bin", 0x0000, 0x08000, CRC(95c35652) SHA1(2bdac30715dba114fbe0895b8b4723f8dc26a90d)) + ROM_LOAD("7396918.bin", 0x8000, 0x08000, CRC(1b4202b0) SHA1(4797ff853ba1675860f293b6368832d05e2f3ea9)) /* IBM 1501981(CGA) and 1501985(MDA) Character rom */ ROM_REGION(0x2000,"gfx1", 0) ROM_LOAD("5788005.u33", 0x00000, 0x2000, CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) /* "AMI 8412PI // 5788005 // (C) IBM CORP. 1981 // KOREA" */ ROM_END #ifdef UNUSED_DEFINITION ROM_START( ibmpca ) - ROM_REGION(0x100000,"maincpu",0) - ROM_LOAD("basicc11.f6", 0xf6000, 0x2000, CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9)) - ROM_LOAD("basicc11.f8", 0xf8000, 0x2000, CRC(673a4acc) SHA1(082ae803994048e225150f771794ca305f73d731)) - ROM_LOAD("basicc11.fa", 0xfa000, 0x2000, CRC(aac3fc37) SHA1(c9e0529470edf04da093bb8c8ae2536c688c1a74)) - ROM_LOAD("basicc11.fc", 0xfc000, 0x2000, CRC(3062b3fc) SHA1(5134dd64721cbf093d059ee5d3fd09c7f86604c7)) - ROM_LOAD("pc081682.bin", 0xfe000, 0x2000, CRC(5c3f0256) SHA1(b42c78abd0a9c630a2f972ad2bae46d83c3a2a09)) + ROM_REGION(0x10000,"bios",0) + ROM_LOAD("basicc11.f6", 0x6000, 0x2000, CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9)) + ROM_LOAD("basicc11.f8", 0x8000, 0x2000, CRC(673a4acc) SHA1(082ae803994048e225150f771794ca305f73d731)) + ROM_LOAD("basicc11.fa", 0xa000, 0x2000, CRC(aac3fc37) SHA1(c9e0529470edf04da093bb8c8ae2536c688c1a74)) + ROM_LOAD("basicc11.fc", 0xc000, 0x2000, CRC(3062b3fc) SHA1(5134dd64721cbf093d059ee5d3fd09c7f86604c7)) + ROM_LOAD("pc081682.bin", 0xe000, 0x2000, CRC(5c3f0256) SHA1(b42c78abd0a9c630a2f972ad2bae46d83c3a2a09)) /* IBM 1501981(CGA) and 1501985(MDA) Character rom */ ROM_REGION(0x2000,"gfx1", 0) @@ -447,7 +434,7 @@ ROM_END ROM_START( ibm5160 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) + ROM_REGION16_LE(0x10000,"bios", 0) // ROM_LOAD("600963.u12", 0xc8000, 0x02000, CRC(f3daf85f) SHA1(3bd29538832d3084cbddeec92593988772755283)) /* Tandon/Western Digital Fixed Disk Adapter 600963-001__TYPE_5.U12.2764.bin */ /* PC/3270 has a 3270 keyboard controller card, plus a rom on that card to tell the pc how to run it. @@ -476,20 +463,20 @@ ROM_START( ibm5160 ) ROM_DEFAULT_BIOS( "rev4" ) ROM_SYSTEM_BIOS( 0, "rev1", "IBM XT 5160 08/16/82" ) /* ROM at u18 marked as BAD_DUMP for now, as current dump, while likely correct, was regenerated from a number of smaller dumps, and needs a proper redump. */ - ROMX_LOAD("5000027.u19", 0xf0000, 0x8000, CRC(fc982309) SHA1(2aa781a698a21c332398d9bc8503d4f580df0a05), ROM_BIOS(1) ) - ROMX_LOAD("5000026.u18", 0xf8000, 0x8000, BAD_DUMP CRC(3c9b0ac3) SHA1(271c9f4cef5029a1560075550b67c3395db09fef), ROM_BIOS(1) ) /* This is probably a good dump, and works fine, but as it was manually regenerated based on a partial dump, it needs to be reverified. It's a very rare rom revision and may have only appeared on XT prototypes. */ + ROMX_LOAD("5000027.u19", 0x0000, 0x8000, CRC(fc982309) SHA1(2aa781a698a21c332398d9bc8503d4f580df0a05), ROM_BIOS(1) ) + ROMX_LOAD("5000026.u18", 0x8000, 0x8000, BAD_DUMP CRC(3c9b0ac3) SHA1(271c9f4cef5029a1560075550b67c3395db09fef), ROM_BIOS(1) ) /* This is probably a good dump, and works fine, but as it was manually regenerated based on a partial dump, it needs to be reverified. It's a very rare rom revision and may have only appeared on XT prototypes. */ ROM_SYSTEM_BIOS( 1, "rev2", "IBM XT 5160 11/08/82" ) /* Same as PC 5155 BIOS and PC/3270 BIOS */ - ROMX_LOAD("5000027.u19", 0xf0000, 0x8000, CRC(fc982309) SHA1(2aa781a698a21c332398d9bc8503d4f580df0a05), ROM_BIOS(2) ) /* silkscreen "MK37050N-4 // 5000027" - FRU: 6359116 - Contents repeat 4 times; Alt Silkscreen (from yesterpc.com): "(M) // 5000027 // (C) 1983 IBM CORP // X E // 8425B NM"*/ - ROMX_LOAD("1501512.u18", 0xf8000, 0x8000, CRC(79522c3d) SHA1(6bac726d8d033491d52507278aa388ec04cf8b7e), ROM_BIOS(2) ) /* silkscreen "MK38036N-25 // 1501512 // ZA // (C)IBM CORP // 1981,1983 // D MALAYSIA // 8438 AP"*/ + ROMX_LOAD("5000027.u19", 0x0000, 0x8000, CRC(fc982309) SHA1(2aa781a698a21c332398d9bc8503d4f580df0a05), ROM_BIOS(2) ) /* silkscreen "MK37050N-4 // 5000027" - FRU: 6359116 - Contents repeat 4 times; Alt Silkscreen (from yesterpc.com): "(M) // 5000027 // (C) 1983 IBM CORP // X E // 8425B NM"*/ + ROMX_LOAD("1501512.u18", 0x8000, 0x8000, CRC(79522c3d) SHA1(6bac726d8d033491d52507278aa388ec04cf8b7e), ROM_BIOS(2) ) /* silkscreen "MK38036N-25 // 1501512 // ZA // (C)IBM CORP // 1981,1983 // D MALAYSIA // 8438 AP"*/ ROM_SYSTEM_BIOS( 2, "rev3", "IBM XT 5160 01/10/86" ) /* Has enhanced keyboard support and a 3.5" drive */ - ROMX_LOAD("62x0854.u19", 0xf0000, 0x8000, CRC(b5fb0e83) SHA1(937b43759ffd472da4fb0fe775b3842f5fb4c3b3), ROM_BIOS(3) ) - ROMX_LOAD("62x0851.u18", 0xf8000, 0x8000, CRC(1054f7bd) SHA1(e7d0155813e4c650085144327581f05486ed1484), ROM_BIOS(3) ) + ROMX_LOAD("62x0854.u19", 0x0000, 0x8000, CRC(b5fb0e83) SHA1(937b43759ffd472da4fb0fe775b3842f5fb4c3b3), ROM_BIOS(3) ) + ROMX_LOAD("62x0851.u18", 0x8000, 0x8000, CRC(1054f7bd) SHA1(e7d0155813e4c650085144327581f05486ed1484), ROM_BIOS(3) ) ROM_SYSTEM_BIOS( 3, "rev4", "IBM XT 5160 05/09/86" ) /* Minor bugfixes to keyboard code, supposedly */ - ROMX_LOAD("68x4370.u19", 0xf0000, 0x8000, CRC(758ff036) SHA1(045e27a70407d89b7956ecae4d275bd2f6b0f8e2), ROM_BIOS(4)) - ROMX_LOAD("62x0890.u18", 0xf8000, 0x8000, CRC(4f417635) SHA1(daa61762d3afdd7262e34edf1a3d2df9a05bcebb), ROM_BIOS(4)) + ROMX_LOAD("68x4370.u19", 0x0000, 0x8000, CRC(758ff036) SHA1(045e27a70407d89b7956ecae4d275bd2f6b0f8e2), ROM_BIOS(4)) + ROMX_LOAD("62x0890.u18", 0x8000, 0x8000, CRC(4f417635) SHA1(daa61762d3afdd7262e34edf1a3d2df9a05bcebb), ROM_BIOS(4)) // ROM_SYSTEM_BIOS( 4, "xtdiag", "IBM XT 5160 w/Supersoft Diagnostics" ) /* ROMs marked as BAD_DUMP for now. We expect the data to be in a different ROM chip layout */ // ROMX_LOAD("basicc11.f6", 0xf6000, 0x2000, BAD_DUMP CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9), ROM_BIOS(5) ) @@ -570,9 +557,7 @@ ROM_END ***************************************************************************/ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP( 1981, ibm5150, 0, 0, ibm5150, ibm5150, driver_device, 0, "International Business Machines", "IBM PC 5150" , 0) -COMP( 1982, ibm5155, ibm5150, 0, ibm5150, ibm5150, driver_device, 0, "International Business Machines", "IBM PC 5155" , 0) -COMP( 1985, ibm5140, ibm5150, 0, ibm5140, ibm5150, driver_device, 0, "International Business Machines", "IBM PC 5140 Convertible" , MACHINE_NOT_WORKING) - -// xt class (pc but 8086) -COMP( 1982, ibm5160, ibm5150, 0, ibm5160, ibm5150, driver_device, 0, "International Business Machines", "IBM XT 5160" , 0) +COMP( 1981, ibm5150, 0, 0, ibm5150, 0, driver_device, 0, "International Business Machines", "IBM PC 5150" , 0) +COMP( 1982, ibm5155, ibm5150, 0, ibm5150, 0, driver_device, 0, "International Business Machines", "IBM PC 5155" , 0) +COMP( 1985, ibm5140, ibm5150, 0, ibm5140, 0, driver_device, 0, "International Business Machines", "IBM PC 5140 Convertible" , MACHINE_NOT_WORKING) +COMP( 1982, ibm5160, ibm5150, 0, ibm5160, 0, driver_device, 0, "International Business Machines", "IBM XT 5160" , 0) diff --git a/src/mame/drivers/ibmpcjr.cpp b/src/mame/drivers/ibmpcjr.cpp index f67bc071494..c06ead888be 100644 --- a/src/mame/drivers/ibmpcjr.cpp +++ b/src/mame/drivers/ibmpcjr.cpp @@ -118,7 +118,7 @@ DRIVER_INIT_MEMBER(pcjr_state, pcjr) m_pc_int_delay_timer = timer_alloc(TIMER_IRQ_DELAY); m_pcjr_watchdog = timer_alloc(TIMER_WATCHDOG); m_keyb_signal_timer = timer_alloc(TIMER_KB_SIGNAL); - membank( "bank10" )->set_base( m_ram->pointer() ); + m_maincpu->space(AS_PROGRAM).install_ram(0, m_ram->size() - 1, m_ram->pointer()); } void pcjr_state::machine_reset() @@ -533,20 +533,16 @@ GFXDECODE_END static ADDRESS_MAP_START(ibmpcjr_map, AS_PROGRAM, 8, pcjr_state) - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xaffff) AM_RAM - AM_RANGE(0xb0000, 0xb7fff) AM_NOP - AM_RANGE(0xb8000, 0xbffff) AM_RAMBANK("bank14") - AM_RANGE(0xc0000, 0xc7fff) AM_NOP - AM_RANGE(0xc8000, 0xc9fff) AM_ROM - AM_RANGE(0xca000, 0xcffff) AM_NOP + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0xb8000, 0xbffff) AM_DEVICE("pcvideo_pcjr:vram", address_map_bank_device, amap8) AM_RANGE(0xd0000, 0xdffff) AM_DEVREAD("cartslot2", generic_slot_device, read_rom) AM_RANGE(0xe0000, 0xeffff) AM_DEVREAD("cartslot1", generic_slot_device, read_rom) - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START(ibmpcjr_io, AS_IO, 8, pcjr_state) + ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0020, 0x0021) AM_DEVREADWRITE("pic8259", pic8259_device, read, write) AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE("pit8253", pit8253_device, read, write) AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) @@ -561,11 +557,16 @@ static ADDRESS_MAP_START(ibmpcjr_io, AS_IO, 8, pcjr_state) ADDRESS_MAP_END static ADDRESS_MAP_START(ibmpcjx_map, AS_PROGRAM, 8, pcjr_state ) + ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x80000, 0xb7fff) AM_ROM AM_REGION("kanji",0) - AM_IMPORT_FROM( ibmpcjr_map ) + AM_RANGE(0x80000, 0x9ffff) AM_RAM AM_SHARE("vram") // TODO: remove this part of vram hack + AM_RANGE(0xb8000, 0xbffff) AM_DEVICE("pcvideo_pcjr:vram", address_map_bank_device, amap8) + AM_RANGE(0xd0000, 0xdffff) AM_DEVREAD("cartslot1", generic_slot_device, read_rom) + AM_RANGE(0xe0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START(ibmpcjx_io, AS_IO, 8, pcjr_state) + ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x01ff, 0x01ff) AM_READWRITE(pcjx_port_1ff_r, pcjx_port_1ff_w) AM_IMPORT_FROM( ibmpcjr_io ) ADDRESS_MAP_END @@ -650,6 +651,7 @@ static MACHINE_CONFIG_START( ibmpcjr, pcjr_state) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("128K, 256K, 512K") /* Software lists */ MCFG_SOFTWARE_LIST_ADD("cart_list","ibmpcjr_cart") @@ -673,26 +675,30 @@ static MACHINE_CONFIG_DERIVED( ibmpcjx, ibmpcjr ) MCFG_SLOT_FIXED(true) MCFG_GFXDECODE_MODIFY("gfxdecode", ibmpcjx) -MACHINE_CONFIG_END + /* internal ram */ + MCFG_DEVICE_MODIFY(RAM_TAG) + MCFG_RAM_DEFAULT_SIZE("512K") + MCFG_RAM_EXTRA_OPTIONS("") // only boots with 512k currently + MACHINE_CONFIG_END ROM_START( ibmpcjr ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD("bios.rom", 0xf0000, 0x10000,CRC(31e3a7aa) SHA1(1f5f7013f18c08ff50d7942e76c4fbd782412414)) + ROM_REGION(0x10000,"bios", 0) + ROM_LOAD("bios.rom", 0x0000, 0x10000,CRC(31e3a7aa) SHA1(1f5f7013f18c08ff50d7942e76c4fbd782412414)) ROM_REGION(0x08100,"gfx1", 0) ROM_LOAD("cga.chr", 0x00000, 0x01000, CRC(42009069) SHA1(ed08559ce2d7f97f68b9f540bddad5b6295294dd)) // from an unknown clone cga card ROM_END ROM_START( ibmpcjx ) - ROM_REGION(0x100000,"maincpu", ROMREGION_ERASEFF) + ROM_REGION(0x20000,"bios", ROMREGION_ERASEFF) ROM_DEFAULT_BIOS("unk") ROM_SYSTEM_BIOS( 0, "5601jda", "5601jda" ) - ROMX_LOAD("5601jda.bin", 0xf0000, 0x10000, CRC(b1e12366) SHA1(751feb16b985aa4f1ec1437493ff77e2ebd5e6a6), ROM_BIOS(1)) - ROMX_LOAD("basicjx.rom", 0xe8000, 0x08000, NO_DUMP, ROM_BIOS(1)) // boot fails due of this. + ROMX_LOAD("5601jda.bin", 0x10000, 0x10000, CRC(b1e12366) SHA1(751feb16b985aa4f1ec1437493ff77e2ebd5e6a6), ROM_BIOS(1)) + ROMX_LOAD("basicjx.rom", 0x08000, 0x08000, NO_DUMP, ROM_BIOS(1)) // boot fails due of this. ROM_SYSTEM_BIOS( 1, "unk", "unk" ) - ROMX_LOAD("ipljx.rom", 0xe0000, 0x20000, CRC(36a7b2de) SHA1(777db50c617725e149bca9b18cf51ce78f6dc548), ROM_BIOS(2)) + ROMX_LOAD("ipljx.rom", 0x00000, 0x20000, CRC(36a7b2de) SHA1(777db50c617725e149bca9b18cf51ce78f6dc548), ROM_BIOS(2)) ROM_REGION(0x08100,"gfx1", 0) //TODO: needs a different charset ROM_LOAD("cga.chr", 0x00000, 0x01000, BAD_DUMP CRC(42009069) SHA1(ed08559ce2d7f97f68b9f540bddad5b6295294dd)) // from an unknown clone cga card diff --git a/src/mame/drivers/iskr103x.cpp b/src/mame/drivers/iskr103x.cpp index 945415f676b..84273344fb5 100644 --- a/src/mame/drivers/iskr103x.cpp +++ b/src/mame/drivers/iskr103x.cpp @@ -41,28 +41,19 @@ public: static ADDRESS_MAP_START( iskr1031_map, AS_PROGRAM, 16, iskr103x_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x7ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xd0000, 0xeffff) AM_NOP - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START(iskr1031_io, AS_IO, 16, iskr103x_state) ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", ibm5160_mb_device, map, 0xffff) ADDRESS_MAP_END -static INPUT_PORTS_START( iskr1030m ) -INPUT_PORTS_END - -static INPUT_PORTS_START( iskr1031 ) -INPUT_PORTS_END - static DEVICE_INPUT_DEFAULTS_START(iskr1030m) - DEVICE_INPUT_DEFAULTS("DSW0", 0x31, 0x21) + DEVICE_INPUT_DEFAULTS("DSW0", 0x30, 0x20) + DEVICE_INPUT_DEFAULTS("DSW0", 0x01, 0x01) DEVICE_INPUT_DEFAULTS_END static DEVICE_INPUT_DEFAULTS_START(iskr1031) @@ -92,48 +83,30 @@ static MACHINE_CONFIG_START( iskr1030m, iskr103x_state ) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K") MACHINE_CONFIG_END -static MACHINE_CONFIG_START( iskr1031, iskr103x_state ) - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", I8086, 4772720) - MCFG_CPU_PROGRAM_MAP(iskr1031_map) - MCFG_CPU_IO_MAP(iskr1031_io) - MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb) - - MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu") +static MACHINE_CONFIG_DERIVED( iskr1031, iskr1030m ) + MCFG_DEVICE_MODIFY("mb") MCFG_DEVICE_INPUT_DEFAULTS(iskr1031) - - MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", iskr103x_isa8_cards, "cga_iskr1031", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", iskr103x_isa8_cards, "fdc_xt", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", iskr103x_isa8_cards, nullptr, false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", iskr103x_isa8_cards, nullptr, false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", iskr103x_isa8_cards, nullptr, false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", iskr103x_isa8_cards, nullptr, false) - -// MCFG_SOFTWARE_LIST_ADD("flop_list", "iskr1031") - - MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_EC_1841) -// MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_ISKR_1030) - - MCFG_RAM_ADD(RAM_TAG) - MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_DEVICE_MODIFY("isa1") + MCFG_DEVICE_SLOT_INTERFACE(iskr103x_isa8_cards, "cga_iskr1031", false) MACHINE_CONFIG_END ROM_START( iskr1030m ) - ROM_REGION16_LE(0x100000,"maincpu", 0) - ROMX_LOAD( "iskra-1030m_0.rom", 0xfc000, 0x2000, CRC(0d698e19) SHA1(2fe117c9f4f8c4b59085d5a41f919d743c425fdd), ROM_SKIP(1)) - ROMX_LOAD( "iskra-1030m_1.rom", 0xfc001, 0x2000, CRC(fe808337) SHA1(b0b7ebe14324ada8aa9a6926a82b18e80f78a257), ROM_SKIP(1)) + ROM_REGION16_LE(0x10000,"bios", 0) + ROMX_LOAD( "iskra-1030m_0.rom", 0xc000, 0x2000, CRC(0d698e19) SHA1(2fe117c9f4f8c4b59085d5a41f919d743c425fdd), ROM_SKIP(1)) + ROMX_LOAD( "iskra-1030m_1.rom", 0xc001, 0x2000, CRC(fe808337) SHA1(b0b7ebe14324ada8aa9a6926a82b18e80f78a257), ROM_SKIP(1)) ROM_END ROM_START( iskr1031 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) + ROM_REGION16_LE(0x10000,"bios", 0) ROM_SYSTEM_BIOS(0, "v1", "v1") - ROMX_LOAD( "150-02.bin", 0xfc000, 0x2000, CRC(e33fb974) SHA1(f5f3ece67c025c0033716ff516e1a34fbeb32749), ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD( "150-03.bin", 0xfc001, 0x2000, CRC(8c482258) SHA1(90ef48955e0df556dc06a000a797ef42ccf430c5), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "150-02.bin", 0xc000, 0x2000, CRC(e33fb974) SHA1(f5f3ece67c025c0033716ff516e1a34fbeb32749), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "150-03.bin", 0xc001, 0x2000, CRC(8c482258) SHA1(90ef48955e0df556dc06a000a797ef42ccf430c5), ROM_SKIP(1) | ROM_BIOS(1)) ROM_SYSTEM_BIOS(1, "v2", "v2") - ROMX_LOAD( "150-06.bin", 0xfc000, 0x2000, CRC(1adbf969) SHA1(08c0a0fc50a75e6207b1987bae389cca60893eac), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD( "150-07.bin", 0xfc001, 0x2000, CRC(0dc4b65a) SHA1(c96f066251a7343eac8113ea9dcb2cb12d0334d5), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "150-06.bin", 0xc000, 0x2000, CRC(1adbf969) SHA1(08c0a0fc50a75e6207b1987bae389cca60893eac), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "150-07.bin", 0xc001, 0x2000, CRC(0dc4b65a) SHA1(c96f066251a7343eac8113ea9dcb2cb12d0334d5), ROM_SKIP(1) | ROM_BIOS(2)) ROM_END /*************************************************************************** @@ -143,5 +116,5 @@ ROM_END ***************************************************************************/ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP ( 1989, iskr1030m, ibm5150, 0, iskr1030m, iskr1030m, driver_device, 0, "Schetmash", "Iskra 1030M", MACHINE_NOT_WORKING) -COMP ( 1989, iskr1031, ibm5150, 0, iskr1031, iskr1031, driver_device, 0, "", "Iskra 1031", 0) +COMP ( 1989, iskr1030m, ibm5150, 0, iskr1030m, 0, driver_device, 0, "Schetmash", "Iskra 1030M", MACHINE_NOT_WORKING) +COMP ( 1989, iskr1031, ibm5150, 0, iskr1031, 0, driver_device, 0, "", "Iskra 1031", 0) diff --git a/src/mame/drivers/m24.cpp b/src/mame/drivers/m24.cpp index a055e1df881..7e34eeaa16b 100644 --- a/src/mame/drivers/m24.cpp +++ b/src/mame/drivers/m24.cpp @@ -4,8 +4,6 @@ #include "cpu/i86/i86.h" #include "cpu/tms7000/tms7000.h" -#include "bus/isa/isa.h" -#include "bus/isa/isa_cards.h" #include "machine/m24_kbd.h" #include "machine/m24_z8000.h" #include "machine/mm58274c.h" @@ -165,9 +163,7 @@ WRITE_LINE_MEMBER(m24_state::halt_i86_w) static ADDRESS_MAP_START( m24_map, AS_PROGRAM, 16, m24_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xeffff) AM_NOP - AM_RANGE(0xf8000, 0xfffff) AM_ROM AM_REGION("maincpu", 0) + AM_RANGE(0xf8000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START(m24_io, AS_IO, 16, m24_state ) @@ -175,6 +171,7 @@ static ADDRESS_MAP_START(m24_io, AS_IO, 16, m24_state ) AM_RANGE(0x0060, 0x0065) AM_READWRITE8(keyboard_r, keyboard_w, 0xffff) AM_RANGE(0x0066, 0x0067) AM_READ_PORT("DSW0") AM_RANGE(0x0070, 0x007f) AM_DEVREADWRITE8("mm58174an", mm58274c_device, read, write, 0xffff) + AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", pc_noppi_mb_device, map, 0xffff) AM_RANGE(0x80c0, 0x80c1) AM_DEVREADWRITE8("z8000_apb", m24_z8000_device, handshake_r, handshake_w, 0xff00) ADDRESS_MAP_END @@ -267,6 +264,7 @@ static MACHINE_CONFIG_START( olivetti, m24_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K") MCFG_CPU_ADD("kbc", TMS7000, XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(kbc_map) @@ -291,7 +289,7 @@ static MACHINE_CONFIG_START( olivetti, m24_state ) MACHINE_CONFIG_END ROM_START( m24 ) - ROM_REGION16_LE(0x8000,"maincpu", 0) + ROM_REGION16_LE(0x8000,"bios", 0) ROMX_LOAD("olivetti_m24_version_1.43_high.bin",0x4001, 0x2000, CRC(04e697ba) SHA1(1066dcc849e6289b5ac6372c84a590e456d497a6), ROM_SKIP(1)) ROMX_LOAD("olivetti_m24_version_1.43_low.bin", 0x4000, 0x2000, CRC(ff7e0f10) SHA1(13423011a9bae3f3193e8c199f98a496cab48c0f), ROM_SKIP(1)) @@ -300,7 +298,7 @@ ROM_START( m24 ) ROM_END ROM_START( m240 ) - ROM_REGION16_LE(0x8000,"maincpu", 0) + ROM_REGION16_LE(0x8000,"bios", 0) ROMX_LOAD("olivetti_m240_pch5_2.04_high.bin", 0x0001, 0x4000, CRC(ceb97b59) SHA1(84fabbeab355e0a4c9445910f2b7d1ec98886642), ROM_SKIP(1)) ROMX_LOAD("olivetti_m240_pch6_2.04_low.bin", 0x0000, 0x4000, CRC(c463aa94) SHA1(a30c763c1ace9f3ff79e7136b252d624108a50ae), ROM_SKIP(1)) diff --git a/src/mame/drivers/mc1502.cpp b/src/mame/drivers/mc1502.cpp index ade7c5accfc..9e014ebcf04 100644 --- a/src/mame/drivers/mc1502.cpp +++ b/src/mame/drivers/mc1502.cpp @@ -182,7 +182,6 @@ DRIVER_INIT_MEMBER( mc1502_state, mc1502 ) DBG_LOG(0,"init",("driver_init()\n")); - program.unmap_readwrite(0, 0x7ffff); program.install_readwrite_bank(0, m_ram->size()-1, "bank10"); membank( "bank10" )->set_base( m_ram->pointer() ); } @@ -220,16 +219,7 @@ MACHINE_RESET_MEMBER( mc1502_state, mc1502 ) static ADDRESS_MAP_START( mc1502_map, AS_PROGRAM, 8, mc1502_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x97fff) AM_RAM /* 96K on mainboard + 512K on extension card */ - AM_RANGE(0xc0000, 0xfbfff) AM_NOP - AM_RANGE(0xfc000, 0xfffff) AM_ROM -ADDRESS_MAP_END - -static ADDRESS_MAP_START( pk88_map, AS_PROGRAM, 8, mc1502_state ) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x1ffff) AM_RAMBANK("bank10") /* 96K on mainboard */ - AM_RANGE(0xf0000, 0xf7fff) AM_ROM /* BASIC */ - AM_RANGE(0xfc000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START(mc1502_io, AS_IO, 8, mc1502_state ) @@ -328,11 +318,6 @@ static MACHINE_CONFIG_START( mc1502, mc1502_state ) MCFG_RAM_EXTRA_OPTIONS("96K") MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( pk88, mc1502 ) - MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_PROGRAM_MAP(pk88_map) -MACHINE_CONFIG_END - /* Apparently there was a hardware revision with built-in floppy @@ -344,42 +329,42 @@ MACHINE_CONFIG_END QWERTY). */ ROM_START( mc1502 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) + ROM_REGION16_LE(0x10000,"bios", 0) ROM_DEFAULT_BIOS("v52") ROM_SYSTEM_BIOS(0, "v50", "v5.0 10/05/89") - ROMX_LOAD( "monitor_5_0.rom", 0xfc000, 0x4000, CRC(9e97c6a0) SHA1(16a304e8de69ec4d8b92acda6bf28454c361a24f),ROM_BIOS(1)) + ROMX_LOAD( "monitor_5_0.rom", 0xc000, 0x4000, CRC(9e97c6a0) SHA1(16a304e8de69ec4d8b92acda6bf28454c361a24f),ROM_BIOS(1)) ROM_SYSTEM_BIOS(1, "v52", "v5.2 22/03/91") - ROMX_LOAD( "monitor_5_2.rom", 0xfc000, 0x4000, CRC(0e65491e) SHA1(8a4d556473b5e0e59b05fab77c79c29f4d562412),ROM_BIOS(2)) + ROMX_LOAD( "monitor_5_2.rom", 0xc000, 0x4000, CRC(0e65491e) SHA1(8a4d556473b5e0e59b05fab77c79c29f4d562412),ROM_BIOS(2)) ROM_SYSTEM_BIOS(2, "v521", "v5.21 12/10/92") - ROMX_LOAD( "monitor_5_21.rom", 0xfc000, 0x4000, CRC(28c8f653) SHA1(04b0b09e0b86d9648a83352cc1590eb8963833e0),ROM_BIOS(3)) + ROMX_LOAD( "monitor_5_21.rom", 0xc000, 0x4000, CRC(28c8f653) SHA1(04b0b09e0b86d9648a83352cc1590eb8963833e0),ROM_BIOS(3)) ROM_SYSTEM_BIOS(3, "v531", "v5.31 12/10/92") - ROMX_LOAD( "monitor_5_31.rom", 0xfc000, 0x4000, CRC(a48295d5) SHA1(6f38977c22f9cc6c2bc6f6e53edc4048ca6b6721),ROM_BIOS(4)) + ROMX_LOAD( "monitor_5_31.rom", 0xc000, 0x4000, CRC(a48295d5) SHA1(6f38977c22f9cc6c2bc6f6e53edc4048ca6b6721),ROM_BIOS(4)) ROM_SYSTEM_BIOS(4, "v533", "v5.33 01/08/93") - ROMX_LOAD( "0_(cbc0).bin", 0xfc000, 0x2000, CRC(9a55bc4f) SHA1(81da44eec2e52cf04b1fc7053502270f51270590),ROM_BIOS(5)) - ROMX_LOAD( "1_(dfe2).bin", 0xfe000, 0x2000, CRC(8dec077a) SHA1(d6f6d7cc2183abc77fbd9cd59132de5766f7c458),ROM_BIOS(5)) + ROMX_LOAD( "0_(cbc0).bin", 0xc000, 0x2000, CRC(9a55bc4f) SHA1(81da44eec2e52cf04b1fc7053502270f51270590),ROM_BIOS(5)) + ROMX_LOAD( "1_(dfe2).bin", 0xe000, 0x2000, CRC(8dec077a) SHA1(d6f6d7cc2183abc77fbd9cd59132de5766f7c458),ROM_BIOS(5)) // 5.21 + 3rd party HDC support. fails checksum test so marked BAD_DUMP. ROM_SYSTEM_BIOS(5, "v521h", "v5.21h 22/09/93") - ROMX_LOAD( "mshbios0.pgm", 0xfc000, 0x2000, BAD_DUMP CRC(be447261) SHA1(b93c597c17dfa4b678f72c20a3f7119b73e6ba1c),ROM_BIOS(6)) - ROMX_LOAD( "mshbios1.pgm", 0xfe000, 0x2000, BAD_DUMP CRC(89e2eaf2) SHA1(37d6b225b5e35574fdac81219589407d925225be),ROM_BIOS(6)) + ROMX_LOAD( "mshbios0.pgm", 0xc000, 0x2000, BAD_DUMP CRC(be447261) SHA1(b93c597c17dfa4b678f72c20a3f7119b73e6ba1c),ROM_BIOS(6)) + ROMX_LOAD( "mshbios1.pgm", 0xe000, 0x2000, BAD_DUMP CRC(89e2eaf2) SHA1(37d6b225b5e35574fdac81219589407d925225be),ROM_BIOS(6)) // 5.3 ROM_SYSTEM_BIOS(6, "v53", "v5.3 10/11/91") - ROMX_LOAD( "1502~3b0.pgm", 0xfc000, 0x2000, CRC(dc148763) SHA1(7a5e66438007b2de328ac680614f9c4ff60f6a75),ROM_BIOS(7)) - ROMX_LOAD( "1502~3b1.pgm", 0xfe000, 0x2000, CRC(17fc2af2) SHA1(a060d7b7302dfa639025f025106b50412cf26953),ROM_BIOS(7)) + ROMX_LOAD( "1502~3b0.pgm", 0xc000, 0x2000, CRC(dc148763) SHA1(7a5e66438007b2de328ac680614f9c4ff60f6a75),ROM_BIOS(7)) + ROMX_LOAD( "1502~3b1.pgm", 0xe000, 0x2000, CRC(17fc2af2) SHA1(a060d7b7302dfa639025f025106b50412cf26953),ROM_BIOS(7)) // 5.1 -- JCUKEN keyboard ROM_SYSTEM_BIOS(7, "v51", "v5.1 10/12/90") - ROMX_LOAD( "ms1502b0.pgm", 0xfc000, 0x2000, CRC(92fcc29a) SHA1(930a4cffcd6ec6110dd9a18bd389b78f0ccb110a),ROM_BIOS(8)) - ROMX_LOAD( "ms1502b1.pgm", 0xfe000, 0x2000, CRC(fe355a58) SHA1(b4ef7775045c6f2095e2b487fe19824986a4892c),ROM_BIOS(8)) + ROMX_LOAD( "ms1502b0.pgm", 0xc000, 0x2000, CRC(92fcc29a) SHA1(930a4cffcd6ec6110dd9a18bd389b78f0ccb110a),ROM_BIOS(8)) + ROMX_LOAD( "ms1502b1.pgm", 0xe000, 0x2000, CRC(fe355a58) SHA1(b4ef7775045c6f2095e2b487fe19824986a4892c),ROM_BIOS(8)) // 5.31 ROM_SYSTEM_BIOS(8, "v531_92", "v5.31 12/10/92") - ROMX_LOAD( "ms531b0.pgm", 0xfc000, 0x2000, CRC(d97157d1) SHA1(cb1a1e0e2d9a0fcc78f9b09bfb4814d408ee4fae),ROM_BIOS(9)) - ROMX_LOAD( "ms531b1.pgm", 0xfe000, 0x2000, CRC(b1368e1a) SHA1(286496d25dc0ac2d8fe1802caffc6c37b236d105),ROM_BIOS(9)) + ROMX_LOAD( "ms531b0.pgm", 0xc000, 0x2000, CRC(d97157d1) SHA1(cb1a1e0e2d9a0fcc78f9b09bfb4814d408ee4fae),ROM_BIOS(9)) + ROMX_LOAD( "ms531b1.pgm", 0xe000, 0x2000, CRC(b1368e1a) SHA1(286496d25dc0ac2d8fe1802caffc6c37b236d105),ROM_BIOS(9)) // 5.2 ROM_SYSTEM_BIOS(9, "v52_91", "v5.2 10/11/91") - ROMX_LOAD( "msv5~2b0.pgm", 0xfc000, 0x2000, CRC(f7f370e9) SHA1(e069a35005581a02856853b57dd511ab8e10054b),ROM_BIOS(10)) - ROMX_LOAD( "msv5~2b1.pgm", 0xfe000, 0x2000, CRC(d50e1c43) SHA1(22724dec0052ee9e52f44f5914f2f5f3fae14612),ROM_BIOS(10)) + ROMX_LOAD( "msv5~2b0.pgm", 0xc000, 0x2000, CRC(f7f370e9) SHA1(e069a35005581a02856853b57dd511ab8e10054b),ROM_BIOS(10)) + ROMX_LOAD( "msv5~2b1.pgm", 0xe000, 0x2000, CRC(d50e1c43) SHA1(22724dec0052ee9e52f44f5914f2f5f3fae14612),ROM_BIOS(10)) ROM_REGION(0x2000,"gfx1", ROMREGION_ERASE00) ROM_LOAD( "symgen.rom", 0x0000, 0x2000, CRC(b2747a52) SHA1(6766d275467672436e91ac2997ac6b77700eba1e)) @@ -390,14 +375,14 @@ ROM_END different video subsystem (not emulated). */ ROM_START( pk88 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) - - ROM_LOAD( "b0.064", 0xf0000, 0x2000, CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9)) - ROM_LOAD( "b1.064", 0xf2000, 0x2000, CRC(673a4acc) SHA1(082ae803994048e225150f771794ca305f73d731)) - ROM_LOAD( "b2.064", 0xf4000, 0x2000, CRC(1ee66152) SHA1(7ed8c4c6c582487e802beabeca5b86702e5083e8)) - ROM_LOAD( "b3.064", 0xf6000, 0x2000, CRC(3062b3fc) SHA1(5134dd64721cbf093d059ee5d3fd09c7f86604c7)) - ROM_LOAD( "pk88-0.064", 0xfc000, 0x2000, CRC(1e4666cf) SHA1(6364c5241f2792909ff318194161eb2c29737546)) - ROM_LOAD( "pk88-1.064", 0xfe000, 0x2000, CRC(6fa7e7ef) SHA1(d68bc273baa46ba733ac6ad4df7569dd70cf60dd)) + ROM_REGION16_LE(0x10000,"bios", 0) + + ROM_LOAD( "b0.064", 0x0000, 0x2000, CRC(80d3cf5d) SHA1(64769b7a8b60ffeefa04e4afbec778069a2840c9)) + ROM_LOAD( "b1.064", 0x2000, 0x2000, CRC(673a4acc) SHA1(082ae803994048e225150f771794ca305f73d731)) + ROM_LOAD( "b2.064", 0x4000, 0x2000, CRC(1ee66152) SHA1(7ed8c4c6c582487e802beabeca5b86702e5083e8)) + ROM_LOAD( "b3.064", 0x6000, 0x2000, CRC(3062b3fc) SHA1(5134dd64721cbf093d059ee5d3fd09c7f86604c7)) + ROM_LOAD( "pk88-0.064", 0xc000, 0x2000, CRC(1e4666cf) SHA1(6364c5241f2792909ff318194161eb2c29737546)) + ROM_LOAD( "pk88-1.064", 0xe000, 0x2000, CRC(6fa7e7ef) SHA1(d68bc273baa46ba733ac6ad4df7569dd70cf60dd)) ROM_END /*************************************************************************** @@ -408,4 +393,4 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ COMP ( 1989, mc1502, ibm5150, 0, mc1502, mc1502, mc1502_state, mc1502, "NPO Microprocessor", "Elektronika MC-1502", 0) -COMP ( 1988, pk88, ibm5150, 0, pk88, mc1502, mc1502_state, mc1502, "NPO Microprocessor", "Elektronika PK-88", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) +COMP ( 1988, pk88, ibm5150, 0, mc1502, mc1502, mc1502_state, mc1502, "NPO Microprocessor", "Elektronika PK-88", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) diff --git a/src/mame/drivers/pasogo.cpp b/src/mame/drivers/pasogo.cpp index d88f121264e..28e858e5b5b 100644 --- a/src/mame/drivers/pasogo.cpp +++ b/src/mame/drivers/pasogo.cpp @@ -442,7 +442,6 @@ static ADDRESS_MAP_START(emsbank_map, AS_PROGRAM, 16, pasogo_state) ADDRESS_MAP_END static ADDRESS_MAP_START(pasogo_mem, AS_PROGRAM, 16, pasogo_state) - AM_RANGE(0x00000, 0x7ffff) AM_RAMBANK("bank10") AM_RANGE(0xb8000, 0xbffff) AM_RAM AM_SHARE("vram") AM_RANGE(0x80000, 0xeffff) AM_READWRITE(emsram_r, emsram_w) AM_RANGE(0xf0000, 0xfffff) AM_ROMBANK("bank27") @@ -452,6 +451,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START(pasogo_io, AS_IO, 16, pasogo_state) AM_RANGE(0x0026, 0x0027) AM_READWRITE8(vg230_io_r, vg230_io_w, 0xffff) AM_RANGE(0x006c, 0x006f) AM_READWRITE(ems_r, ems_w) + AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", ibm5160_mb_device, map, 0xffff) ADDRESS_MAP_END @@ -521,8 +521,8 @@ void pasogo_state::machine_reset() std::string region_tag; ioport_port *color = ioport("COLOR"); m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); - if (!m_cart_rom) // this should never happen, since we make carts mandatory! - m_cart_rom = memregion("maincpu"); + if (!m_cart_rom) // even with mandatory carts, debug will crash without anything at the boot vector + m_cart_rom = memregion("empty"); membank("bank27")->set_base(m_cart_rom->base()); m_ems_index = 0; @@ -569,7 +569,7 @@ static MACHINE_CONFIG_START( pasogo, pasogo_state ) MACHINE_CONFIG_END ROM_START( pasogo ) - ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x10000, "empty", ROMREGION_ERASEFF ) ROM_END // YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS diff --git a/src/mame/drivers/pc.cpp b/src/mame/drivers/pc.cpp index b6836ab5f3a..22f14676a86 100644 --- a/src/mame/drivers/pc.cpp +++ b/src/mame/drivers/pc.cpp @@ -57,50 +57,29 @@ public: static ADDRESS_MAP_START( pc8_map, AS_PROGRAM, 8, pc_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xd0000, 0xeffff) AM_NOP - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START( zenith_map, AS_PROGRAM, 8, pc_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xd0000, 0xeffff) AM_NOP AM_RANGE(0xf0000, 0xf7fff) AM_RAM - AM_RANGE(0xf8000, 0xfffff) AM_ROM + AM_RANGE(0xf8000, 0xfffff) AM_ROM AM_REGION("bios", 0x8000) ADDRESS_MAP_END - static ADDRESS_MAP_START( pc16_map, AS_PROGRAM, 16, pc_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xbffff) AM_NOP - AM_RANGE(0xc0000, 0xc7fff) AM_ROM - AM_RANGE(0xc8000, 0xcffff) AM_ROM - AM_RANGE(0xd0000, 0xeffff) AM_NOP - AM_RANGE(0xf0000, 0xfffff) AM_ROM -ADDRESS_MAP_END - -static ADDRESS_MAP_START( ibm5550_map, AS_PROGRAM, 16, pc_state ) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xeffff) AM_RAM - AM_RANGE(0xfc000, 0xfffff) AM_ROM + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START(pc8_io, AS_IO, 8, pc_state ) ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", ibm5160_mb_device, map) ADDRESS_MAP_END static ADDRESS_MAP_START(pc16_io, AS_IO, 16, pc_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0070, 0x007f) AM_RAM // needed for Poisk-2 + AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", ibm5160_mb_device, map, 0xffff) ADDRESS_MAP_END READ8_MEMBER(pc_state::unk_r) @@ -111,6 +90,7 @@ READ8_MEMBER(pc_state::unk_r) static ADDRESS_MAP_START(ibm5550_io, AS_IO, 16, pc_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x00a0, 0x00a1) AM_READ8(unk_r, 0x00ff ) + AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", ibm5160_mb_device, map, 0xffff) ADDRESS_MAP_END INPUT_CHANGED_MEMBER(pc_state::pc_turbo_callback) @@ -201,6 +181,7 @@ static MACHINE_CONFIG_START( pccga, pc_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K") /* software lists */ MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150") @@ -229,6 +210,7 @@ static MACHINE_CONFIG_START( iskr3104, pc_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K") MACHINE_CONFIG_END @@ -249,6 +231,7 @@ static MACHINE_CONFIG_START( poisk2, pc_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K") MACHINE_CONFIG_END static MACHINE_CONFIG_START( zenith, pc_state ) @@ -268,6 +251,7 @@ static MACHINE_CONFIG_START( zenith, pc_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("128K, 256K, 512K") /* software lists */ MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150") @@ -294,12 +278,13 @@ static MACHINE_CONFIG_START( siemens, pc_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K") MACHINE_CONFIG_END static MACHINE_CONFIG_START( ibm5550, pc_state ) /* basic machine hardware */ - MCFG_CPU_PC(ibm5550, ibm5550, I8086, 8000000) + MCFG_CPU_PC(pc16, ibm5550, I8086, 8000000) MCFG_IBM5160_MOTHERBOARD_ADD("mb", "maincpu") MCFG_DEVICE_INPUT_DEFAULTS(pccga) @@ -314,6 +299,7 @@ static MACHINE_CONFIG_START( ibm5550, pc_state ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") + MCFG_RAM_EXTRA_OPTIONS("64K, 128K, 256K, 512K") MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED(bondwell, pccga) @@ -331,149 +317,162 @@ static MACHINE_CONFIG_DERIVED(eagle1600, pccga) MCFG_CPU_PC(pc16, pc16, I8086, 8000000) MACHINE_CONFIG_END +static DEVICE_INPUT_DEFAULTS_START( m15 ) + DEVICE_INPUT_DEFAULTS("DSW0", 0x30, 0x20) // TODO: document correct dip settings + DEVICE_INPUT_DEFAULTS("DSW0", 0x01, 0x00) +DEVICE_INPUT_DEFAULTS_END + +static MACHINE_CONFIG_DERIVED(m15, pccga) + MCFG_DEVICE_MODIFY("mb") + MCFG_DEVICE_INPUT_DEFAULTS(m15) + MCFG_DEVICE_MODIFY(RAM_TAG) + MCFG_RAM_DEFAULT_SIZE("448K") + MCFG_RAM_EXTRA_OPTIONS("16K, 160K, 304K") +MACHINE_CONFIG_END + ROM_START( bw230 ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD("bondwell.bin", 0xfe000, 0x2000, CRC(d435a405) SHA1(a57c705d1144c7b61940b6f5c05d785c272fc9bb)) + ROM_REGION(0x10000,"bios", 0) + ROM_LOAD("bondwell.bin", 0xe000, 0x2000, CRC(d435a405) SHA1(a57c705d1144c7b61940b6f5c05d785c272fc9bb)) ROM_END ROM_START( sicpc1605 ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD("multitech pc-700 3.1.bin", 0xfe000, 0x2000, CRC(0ac7a2e1) SHA1(b9c8504e21213d81a068dde9f51f9c973d726e7b)) + ROM_REGION(0x10000,"bios", 0) + ROM_LOAD("multitech pc-700 3.1.bin", 0xe000, 0x2000, CRC(0ac7a2e1) SHA1(b9c8504e21213d81a068dde9f51f9c973d726e7b)) ROM_END ROM_START( zdsupers ) - ROM_REGION(0x100000,"maincpu", 0) + ROM_REGION(0x10000,"bios", 0) ROM_SYSTEM_BIOS( 0, "v31d", "v3.1d" ) - ROMX_LOAD( "z184m v3.1d.10d", 0xf8000, 0x8000, CRC(44012c3b) SHA1(f2f28979798874386ca8ba3dd3ead24ae7c2aeb4), ROM_BIOS(1)) + ROMX_LOAD( "z184m v3.1d.10d", 0x8000, 0x8000, CRC(44012c3b) SHA1(f2f28979798874386ca8ba3dd3ead24ae7c2aeb4), ROM_BIOS(1)) ROM_SYSTEM_BIOS( 1, "v29e", "v2.9e" ) - ROMX_LOAD( "z184m v2.9e.10d", 0xf8000, 0x8000, CRC(de2f200b) SHA1(ad5ce601669a82351e412fc6c1c70c47779a1e55), ROM_BIOS(2)) + ROMX_LOAD( "z184m v2.9e.10d", 0x8000, 0x8000, CRC(de2f200b) SHA1(ad5ce601669a82351e412fc6c1c70c47779a1e55), ROM_BIOS(2)) ROM_END ROM_START( dgone ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD( "dgone.bin", 0xf8000, 0x08000, CRC(2c38c86e) SHA1(c0f85a000d1d13cd354965689e925d677822549e)) + ROM_REGION(0x10000,"bios", 0) + ROM_LOAD( "dgone.bin", 0x8000, 0x08000, CRC(2c38c86e) SHA1(c0f85a000d1d13cd354965689e925d677822549e)) ROM_END ROM_START( ssam88s ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD( "samsung_samtron_88s_vers_2.0a.bin", 0xf8000, 0x08000, CRC(d1252a91) SHA1(469d15b6ecd7b70234975dc12c6bda4212a66652)) + ROM_REGION(0x10000,"bios", 0) + ROM_LOAD( "samsung_samtron_88s_vers_2.0a.bin", 0x8000, 0x08000, CRC(d1252a91) SHA1(469d15b6ecd7b70234975dc12c6bda4212a66652)) ROM_END ROM_START( mk88 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) + ROM_REGION16_LE(0x10000,"bios", 0) ROM_DEFAULT_BIOS("v392") ROM_SYSTEM_BIOS(0, "v290", "v2.90") - ROMX_LOAD( "mk88m.bin", 0xfc000, 0x2000, CRC(09c9da3b) SHA1(d1e7ad23b5f5b3576ad128c1198294129754f39f), ROM_BIOS(1)) - ROMX_LOAD( "mk88b.bin", 0xfe000, 0x2000, CRC(8a922476) SHA1(c19c3644ab92fd12e13f32b410cd26e3c844a03b), ROM_BIOS(1)) + ROMX_LOAD( "mk88m.bin", 0xc000, 0x2000, CRC(09c9da3b) SHA1(d1e7ad23b5f5b3576ad128c1198294129754f39f), ROM_BIOS(1)) + ROMX_LOAD( "mk88b.bin", 0xe000, 0x2000, CRC(8a922476) SHA1(c19c3644ab92fd12e13f32b410cd26e3c844a03b), ROM_BIOS(1)) ROM_SYSTEM_BIOS(1, "v391", "v3.91") - ROMX_LOAD( "mkm.bin", 0xfc000, 0x2000, CRC(65f979e8) SHA1(13e85be9bc8ceb5ab9e559e7d0089e26fbbb84fc), ROM_BIOS(2)) - ROMX_LOAD( "mkb.bin", 0xfe000, 0x2000, CRC(830a0447) SHA1(11bc200fdbcfbbe335f4c282020750c0b5ca4167), ROM_BIOS(2)) + ROMX_LOAD( "mkm.bin", 0xc000, 0x2000, CRC(65f979e8) SHA1(13e85be9bc8ceb5ab9e559e7d0089e26fbbb84fc), ROM_BIOS(2)) + ROMX_LOAD( "mkb.bin", 0xe000, 0x2000, CRC(830a0447) SHA1(11bc200fdbcfbbe335f4c282020750c0b5ca4167), ROM_BIOS(2)) ROM_SYSTEM_BIOS(2, "v392", "v3.92") - ROMX_LOAD( "m88.bin", 0xfc000, 0x2000, CRC(fe1b4e36) SHA1(fcb420af0ff09a7d43fcb9b7d0b0233a2071c159), ROM_BIOS(3)) - ROMX_LOAD( "b88.bin", 0xfe000, 0x2000, CRC(58a418df) SHA1(216398d4e4302ee7efcc2c8f9ff9d8a1161229ea), ROM_BIOS(3)) + ROMX_LOAD( "m88.bin", 0xc000, 0x2000, CRC(fe1b4e36) SHA1(fcb420af0ff09a7d43fcb9b7d0b0233a2071c159), ROM_BIOS(3)) + ROMX_LOAD( "b88.bin", 0xe000, 0x2000, CRC(58a418df) SHA1(216398d4e4302ee7efcc2c8f9ff9d8a1161229ea), ROM_BIOS(3)) ROM_END ROM_START( iskr3104 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) - ROMX_LOAD( "198.bin", 0xfc000, 0x2000, CRC(bcfd8e41) SHA1(e21ddf78839aa51fa5feb23f511ff5e2da31b433),ROM_SKIP(1)) - ROMX_LOAD( "199.bin", 0xfc001, 0x2000, CRC(2da5fe79) SHA1(14d5dccc141a0b3367f7f8a7188306fdf03c2b6c),ROM_SKIP(1)) + ROM_REGION16_LE(0x10000,"bios", 0) + ROMX_LOAD( "198.bin", 0xc000, 0x2000, CRC(bcfd8e41) SHA1(e21ddf78839aa51fa5feb23f511ff5e2da31b433),ROM_SKIP(1)) + ROMX_LOAD( "199.bin", 0xc001, 0x2000, CRC(2da5fe79) SHA1(14d5dccc141a0b3367f7f8a7188306fdf03c2b6c),ROM_SKIP(1)) // EGA card from Iskra-3104 //ROMX_LOAD( "143-03.bin", 0xc0001, 0x2000, CRC(d0706345) SHA1(e04bb40d944426a4ae2e3a614d3f4953d7132ede),ROM_SKIP(1)) //ROMX_LOAD( "143-02.bin", 0xc0000, 0x2000, CRC(c8c18ebb) SHA1(fd6dac76d43ab8b582e70f1d5cc931d679036fb9),ROM_SKIP(1)) ROM_END ROM_START( poisk2 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) + ROM_REGION16_LE(0x10000,"bios", 0) ROM_SYSTEM_BIOS(0, "v20", "v2.0") - ROMX_LOAD( "b_p2_20h.rf4", 0xfc001, 0x2000, CRC(d53189b7) SHA1(ace40f1a40642b51fe5d2874acef81e48768b23b), ROM_SKIP(1) | ROM_BIOS(1)) - ROMX_LOAD( "b_p2_20l.rf4", 0xfc000, 0x2000, CRC(2d61fcc9) SHA1(11873c8741ba37d6c2fe1f482296aece514b7618), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "b_p2_20h.rf4", 0xc001, 0x2000, CRC(d53189b7) SHA1(ace40f1a40642b51fe5d2874acef81e48768b23b), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "b_p2_20l.rf4", 0xc000, 0x2000, CRC(2d61fcc9) SHA1(11873c8741ba37d6c2fe1f482296aece514b7618), ROM_SKIP(1) | ROM_BIOS(1)) ROM_SYSTEM_BIOS(1, "v21", "v2.1") - ROMX_LOAD( "b_p2_21h.rf4", 0xfc001, 0x2000, CRC(22197297) SHA1(506c7e63027f734d62ef537f484024548546011f), ROM_SKIP(1) | ROM_BIOS(2)) - ROMX_LOAD( "b_p2_21l.rf4", 0xfc000, 0x2000, CRC(0eb2ea7f) SHA1(67bb5fec53ebfa2a5cad2a3d3d595678d6023024), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "b_p2_21h.rf4", 0xc001, 0x2000, CRC(22197297) SHA1(506c7e63027f734d62ef537f484024548546011f), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "b_p2_21l.rf4", 0xc000, 0x2000, CRC(0eb2ea7f) SHA1(67bb5fec53ebfa2a5cad2a3d3d595678d6023024), ROM_SKIP(1) | ROM_BIOS(2)) ROM_SYSTEM_BIOS(2, "v24", "v2.4") - ROMX_LOAD( "b_p2_24h.rf4", 0xfc001, 0x2000, CRC(ea842c9e) SHA1(dcdbf27374149dae0ef76d410cc6c615d9b99372), ROM_SKIP(1) | ROM_BIOS(3)) - ROMX_LOAD( "b_p2_24l.rf4", 0xfc000, 0x2000, CRC(02f21250) SHA1(f0b133fb4470bddf2f7bf59688cf68198ed8ce55), ROM_SKIP(1) | ROM_BIOS(3)) + ROMX_LOAD( "b_p2_24h.rf4", 0xc001, 0x2000, CRC(ea842c9e) SHA1(dcdbf27374149dae0ef76d410cc6c615d9b99372), ROM_SKIP(1) | ROM_BIOS(3)) + ROMX_LOAD( "b_p2_24l.rf4", 0xc000, 0x2000, CRC(02f21250) SHA1(f0b133fb4470bddf2f7bf59688cf68198ed8ce55), ROM_SKIP(1) | ROM_BIOS(3)) ROM_SYSTEM_BIOS(3, "v21d", "v2.1d") - ROMX_LOAD( "opp2_1h.rf4", 0xfc001, 0x2000, CRC(b7cd7f4f) SHA1(ac473822fb44d7b898d628732cf0a27fcb4d26d6), ROM_SKIP(1) | ROM_BIOS(4)) - ROMX_LOAD( "opp2_1l.rf4", 0xfc000, 0x2000, CRC(1971dca3) SHA1(ecd61cc7952af834d8abc11db372c3e70775489d), ROM_SKIP(1) | ROM_BIOS(4)) + ROMX_LOAD( "opp2_1h.rf4", 0xc001, 0x2000, CRC(b7cd7f4f) SHA1(ac473822fb44d7b898d628732cf0a27fcb4d26d6), ROM_SKIP(1) | ROM_BIOS(4)) + ROMX_LOAD( "opp2_1l.rf4", 0xc000, 0x2000, CRC(1971dca3) SHA1(ecd61cc7952af834d8abc11db372c3e70775489d), ROM_SKIP(1) | ROM_BIOS(4)) ROM_SYSTEM_BIOS(4, "v22d", "v2.2d") - ROMX_LOAD( "opp2_2h.rf4", 0xfc001, 0x2000, CRC(b9e3a5cc) SHA1(0a28afbff612471ee81d69a98789e75253c57a30), ROM_SKIP(1) | ROM_BIOS(5)) - ROMX_LOAD( "opp2_2l.rf4", 0xfc000, 0x2000, CRC(6877aad6) SHA1(1d0031d044beb4f9f321e3c8fdedf57467958900), ROM_SKIP(1) | ROM_BIOS(5)) + ROMX_LOAD( "opp2_2h.rf4", 0xc001, 0x2000, CRC(b9e3a5cc) SHA1(0a28afbff612471ee81d69a98789e75253c57a30), ROM_SKIP(1) | ROM_BIOS(5)) + ROMX_LOAD( "opp2_2l.rf4", 0xc000, 0x2000, CRC(6877aad6) SHA1(1d0031d044beb4f9f321e3c8fdedf57467958900), ROM_SKIP(1) | ROM_BIOS(5)) ROM_SYSTEM_BIOS(5, "v23d", "v2.3d") - ROMX_LOAD( "opp2_3h.rf4", 0xfc001, 0x2000, CRC(ac7d4f06) SHA1(858d6e084a38814280b3e29fb54971f4f532e484), ROM_SKIP(1) | ROM_BIOS(6)) - ROMX_LOAD( "opp2_3l.rf4", 0xfc000, 0x2000, CRC(3c877ea1) SHA1(0753168659653538311c0ad1df851cbbdba426f4), ROM_SKIP(1) | ROM_BIOS(6)) + ROMX_LOAD( "opp2_3h.rf4", 0xc001, 0x2000, CRC(ac7d4f06) SHA1(858d6e084a38814280b3e29fb54971f4f532e484), ROM_SKIP(1) | ROM_BIOS(6)) + ROMX_LOAD( "opp2_3l.rf4", 0xc000, 0x2000, CRC(3c877ea1) SHA1(0753168659653538311c0ad1df851cbbdba426f4), ROM_SKIP(1) | ROM_BIOS(6)) ROM_END ROM_START( mc1702 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) - ROM_LOAD16_BYTE( "2764_2_(573rf4).rom", 0xfc000, 0x2000, CRC(34a0c8fb) SHA1(88dc247f2e417c2848a2fd3e9b52258ad22a2c07)) - ROM_LOAD16_BYTE( "2764_3_(573rf4).rom", 0xfc001, 0x2000, CRC(68ab212b) SHA1(f3313f77392877d28ce290ffa3432f0a32fc4619)) + ROM_REGION16_LE(0x10000,"bios", 0) + ROM_LOAD16_BYTE( "2764_2_(573rf4).rom", 0xc000, 0x2000, CRC(34a0c8fb) SHA1(88dc247f2e417c2848a2fd3e9b52258ad22a2c07)) + ROM_LOAD16_BYTE( "2764_3_(573rf4).rom", 0xc001, 0x2000, CRC(68ab212b) SHA1(f3313f77392877d28ce290ffa3432f0a32fc4619)) ROM_LOAD( "ba1m_(573rf5).rom", 0x0000, 0x0800, CRC(08d938e8) SHA1(957b6c691dbef75c1c735e8e4e81669d056971e4)) ROM_END ROM_START( ibm5550 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) - ROM_LOAD( "ipl5550.rom", 0xfc000, 0x4000, CRC(40cf34c9) SHA1(d41f77fdfa787b0e97ed311e1c084b8699a5b197)) + ROM_REGION16_LE(0x10000,"bios", 0) + ROM_LOAD( "ipl5550.rom", 0xc000, 0x4000, CRC(40cf34c9) SHA1(d41f77fdfa787b0e97ed311e1c084b8699a5b197)) ROM_END ROM_START( pc7000 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) - ROMX_LOAD( "mitsubishi-m5l27128k-1.bin", 0xf8000, 0x4000, CRC(9683957f) SHA1(4569eab6d88eb1bba0d553d1358e593c326978aa), ROM_SKIP(1)) - ROMX_LOAD( "mitsubishi-m5l27128k-2.bin", 0xf8001, 0x4000, CRC(99b229a4) SHA1(5800c8bafed26873d8cfcc79a05f93a780a31c91), ROM_SKIP(1)) + ROM_REGION16_LE(0x10000,"bios", 0) + ROMX_LOAD( "mitsubishi-m5l27128k-1.bin", 0x8000, 0x4000, CRC(9683957f) SHA1(4569eab6d88eb1bba0d553d1358e593c326978aa), ROM_SKIP(1)) + ROMX_LOAD( "mitsubishi-m5l27128k-2.bin", 0x8001, 0x4000, CRC(99b229a4) SHA1(5800c8bafed26873d8cfcc79a05f93a780a31c91), ROM_SKIP(1)) ROM_END ROM_START( olivm15 ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD( "oliv_m15.bin",0xfc000, 0x04000, CRC(bf2ef795) SHA1(02d497131f5ca2c78f2accd38ab0eab6813e3ebf)) + ROM_REGION(0x10000,"bios", 0) + ROM_LOAD( "oliv_m15.bin",0xc000, 0x04000, CRC(bf2ef795) SHA1(02d497131f5ca2c78f2accd38ab0eab6813e3ebf)) ROM_END ROM_START( sx16 ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD( "tmm27128ad.bin",0xfc000, 0x4000, CRC(f8543362) SHA1(fef625e260ca89ba02174584bdc12db609f0780e)) + ROM_REGION(0x10000,"bios", 0) + ROM_LOAD( "tmm27128ad.bin",0xc000, 0x4000, CRC(f8543362) SHA1(fef625e260ca89ba02174584bdc12db609f0780e)) ROM_END ROM_START( compc1 ) - ROM_REGION(0x100000, "maincpu", 0) - ROM_LOAD("380270-01.bin", 0xfc000, 0x4000, BAD_DUMP CRC(75135d37) SHA1(177283642240fee191ba2d87e1d0c2a377c78ccb)) + ROM_REGION(0x10000, "bios", 0) + ROM_LOAD("380270-01.bin", 0xc000, 0x4000, BAD_DUMP CRC(75135d37) SHA1(177283642240fee191ba2d87e1d0c2a377c78ccb)) ROM_REGION(0x8000, "gfx1", 0) ROM_LOAD("pc1_char.bin", 0x0000, 0x8000, CRC(4773a945) SHA1(bcc38abecc75d3f641d42987cb0d2ed71d71bc4c)) ROM_END // Note: Commodore PC20-III, PC10-III and COLT share the same BIOS ROM_START( pc10iii ) - ROM_REGION(0x100000, "maincpu", 0) + ROM_REGION(0x10000, "bios", 0) ROM_DEFAULT_BIOS("v441") ROM_SYSTEM_BIOS(0, "v435", "v4.35") - ROMX_LOAD("318085-01.u201", 0xf8000, 0x8000, NO_DUMP, ROM_BIOS(1)) + ROMX_LOAD("318085-01.u201", 0x8000, 0x8000, NO_DUMP, ROM_BIOS(1)) ROM_SYSTEM_BIOS(1, "v436", "v4.36") - ROMX_LOAD("318085-02.u201", 0xf8000, 0x8000, NO_DUMP, ROM_BIOS(2)) + ROMX_LOAD("318085-02.u201", 0x8000, 0x8000, NO_DUMP, ROM_BIOS(2)) ROM_SYSTEM_BIOS(2, "v436c", "v4.36c") - ROMX_LOAD("318085-04.u201", 0xf8000, 0x8000, NO_DUMP, ROM_BIOS(3)) + ROMX_LOAD("318085-04.u201", 0x8000, 0x8000, NO_DUMP, ROM_BIOS(3)) ROM_SYSTEM_BIOS(3, "v438", "v4.38") - ROMX_LOAD("318085-05.u201", 0xf8000, 0x8000, CRC(ae9e6a31) SHA1(853ee251cf230818c407a8d13ef060a21c90a8c1), ROM_BIOS(4)) + ROMX_LOAD("318085-05.u201", 0x8000, 0x8000, CRC(ae9e6a31) SHA1(853ee251cf230818c407a8d13ef060a21c90a8c1), ROM_BIOS(4)) ROM_SYSTEM_BIOS(4, "v439", "v4.39") - ROMX_LOAD("318085-06.u201", 0xf8000, 0x8000, NO_DUMP, ROM_BIOS(5)) + ROMX_LOAD("318085-06.u201", 0x8000, 0x8000, NO_DUMP, ROM_BIOS(5)) ROM_SYSTEM_BIOS(5, "v440", "v4.40") - ROMX_LOAD("318085-07.u201", 0xf8000, 0x8000, NO_DUMP, ROM_BIOS(6)) + ROMX_LOAD("318085-07.u201", 0x8000, 0x8000, NO_DUMP, ROM_BIOS(6)) ROM_SYSTEM_BIOS(6, "v441", "v4.41") - ROMX_LOAD("318085-08.u201", 0xf8000, 0x8000, CRC(7e228dc8) SHA1(958dfdd637bd31c01b949fac729d6973a7e630bc), ROM_BIOS(7)) + ROMX_LOAD("318085-08.u201", 0x8000, 0x8000, CRC(7e228dc8) SHA1(958dfdd637bd31c01b949fac729d6973a7e630bc), ROM_BIOS(7)) ROM_REGION(0x8000, "gfx1", 0) ROM_LOAD("318086-02.u607", 0x0000, 0x8000, CRC(b406651c) SHA1(856f58353391a74a06ebb8ec9f8333d7d69e5fd6)) //ROM_LOAD("5788005.u33", 0x00000, 0x2000, BAD_DUMP CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) /* temp so you can read the text */ ROM_END ROM_START( mbc16 ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD( "mbc16.bin", 0xfc000, 0x4000, CRC(f3e0934a) SHA1(e4b91c3d395be0414e20f23ad4919b8ac52639b2)) + ROM_REGION(0x10000,"bios", 0) + ROM_LOAD( "mbc16.bin", 0xc000, 0x4000, CRC(f3e0934a) SHA1(e4b91c3d395be0414e20f23ad4919b8ac52639b2)) ROM_REGION(0x2000,"gfx1", 0) //ATI Graphics Solution SR (graphics card, need to make it ISA card) ROM_LOAD( "atigssr.bin", 0x0000, 0x2000, CRC(aca81498) SHA1(0d84c89487ee7a6ac4c9e73fdb30c5fd8aa595f8)) ROM_END ROM_START( ataripc3 ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD( "c101701-004 308.u61",0xf8000, 0x8000, CRC(929a2443) SHA1(8e98f3c9180c55b1f5521727779c016083d27960)) + ROM_REGION(0x10000,"bios", 0) + ROM_LOAD( "c101701-004 308.u61",0x8000, 0x8000, CRC(929a2443) SHA1(8e98f3c9180c55b1f5521727779c016083d27960)) ROM_REGION(0x8000,"gfx1", 0) ROM_LOAD("5788005.u33", 0x00000, 0x2000, BAD_DUMP CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) // not the real character ROM @@ -483,9 +482,9 @@ ROM_START( ataripc3 ) ROM_END ROM_START( eagle1600 ) - ROM_REGION(0x100000,"maincpu", 0) - ROMX_LOAD( "eagle 1600 62-2732-001 rev e u403.bin",0xfe000, 0x1000, CRC(3da1e96a) SHA1(77861ba5ebd056da1daf048f5abd459e0528666d), ROM_SKIP(1)) - ROMX_LOAD( "eagle 1600 62-2732-002 rev e u404.bin",0xfe001, 0x1000, CRC(be6492d4) SHA1(ef25faf33e8336121d030e38e177be39be8afb7a), ROM_SKIP(1)) + ROM_REGION(0x10000,"bios", 0) + ROMX_LOAD( "eagle 1600 62-2732-001 rev e u403.bin",0xe000, 0x1000, CRC(3da1e96a) SHA1(77861ba5ebd056da1daf048f5abd459e0528666d), ROM_SKIP(1)) + ROMX_LOAD( "eagle 1600 62-2732-002 rev e u404.bin",0xe001, 0x1000, CRC(be6492d4) SHA1(ef25faf33e8336121d030e38e177be39be8afb7a), ROM_SKIP(1)) ROM_REGION(0x8000,"gfx1", 0) ROM_LOAD("eagle 1600 video char gen u301.bin", 0x00000, 0x1000, CRC(1a7e552f) SHA1(749058783eec9d96a70dc5fdbfccb56196f889dc)) @@ -512,7 +511,7 @@ COMP( 1990, mc1702, ibm5150, 0, pccga, pccga, driver_device COMP( 1987, zdsupers, ibm5150, 0, zenith, pccga, driver_device, 0, "Zenith Data Systems", "SuperSport", 0) COMP( 1985, sicpc1605, ibm5150, 0, siemens, pccga, driver_device, 0, "Siemens", "Sicomp PC16-05", 0) -COMP( 198?, olivm15, ibm5150, 0, pccga, pccga, driver_device, 0, "Olivetti", "M15", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) // is this a pc clone or not? +COMP( 198?, olivm15, ibm5150, 0, m15, pccga, driver_device, 0, "Olivetti", "M15", 0) COMP( 1983, ibm5550, ibm5150, 0, ibm5550, pccga, driver_device, 0, "International Business Machines", "IBM 5550", MACHINE_NOT_WORKING) @@ -521,6 +520,6 @@ COMP( 1985, pc7000, ibm5150, 0, pccga, pccga, driver_device COMP( 1988, sx16, ibm5150, 0, pccga, pccga, driver_device, 0, "Sanyo", "SX-16", MACHINE_NOT_WORKING) COMP( 198?, mbc16, ibm5150, 0, pccga, pccga, driver_device, 0, "Sanyo", "MBC-16" , MACHINE_NOT_WORKING) -COMP( 198?, ataripc3, ibm5150, 0, pccga, pccga, driver_device, 0, "Atari", "PC-3" , MACHINE_NOT_WORKING) +COMP( 198?, ataripc3, ibm5150, 0, pccga, pccga, driver_device, 0, "Atari", "PC-3" , 0) COMP( 1989, ssam88s, ibm5150, 0, pccga, pccga, driver_device, 0, "Samsung", "Samtron 88S" , MACHINE_NOT_WORKING) COMP( 1983, eagle1600, ibm5150, 0, eagle1600, pccga, driver_device, 0, "Eagle", "1600" , MACHINE_NOT_WORKING) diff --git a/src/mame/drivers/poisk1.cpp b/src/mame/drivers/poisk1.cpp index 0ac808a8553..96381face12 100644 --- a/src/mame/drivers/poisk1.cpp +++ b/src/mame/drivers/poisk1.cpp @@ -10,14 +10,24 @@ #include "emu.h" -#include "includes/poisk1.h" #include "machine/kb_poisk1.h" +#include "video/cgapal.h" +#include "imagedev/cassette.h" +#include "machine/i8255.h" +#include "bus/isa/isa.h" +#include "machine/pic8259.h" +#include "machine/pit8253.h" +#include "machine/ram.h" +#include "bus/isa/xsu_cards.h" +#include "sound/speaker.h" #include "cpu/i86/i86.h" #define CGA_PALETTE_SETS 83 /* one for colour, one for mono, 81 for colour composite */ +#define BG_COLOR(x) (((x) & 7)|(((x) & 0x10) >> 1)) + #define VERBOSE_DBG 0 #define DBG_LOG(N,M,A) \ @@ -30,10 +40,380 @@ } \ } while (0) +#define POISK1_UPDATE_ROW(name) \ + void name(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride) + +class p1_state : public driver_device +{ +public: + p1_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_pic8259(*this, "pic8259"), + m_pit8253(*this, "pit8253"), + m_ppi8255n1(*this, "ppi8255n1"), + m_ppi8255n2(*this, "ppi8255n2"), + m_isabus(*this, "isa"), + m_speaker(*this, "speaker"), + m_cassette(*this, "cassette"), + m_ram(*this, RAM_TAG), + m_palette(*this, "palette") { } + + required_device m_maincpu; + required_device m_pic8259; + required_device m_pit8253; + required_device m_ppi8255n1; + required_device m_ppi8255n2; + required_device m_isabus; + required_device m_speaker; + required_device m_cassette; + required_device m_ram; + required_device m_palette; + + DECLARE_DRIVER_INIT(poisk1); + DECLARE_MACHINE_START(poisk1); + DECLARE_MACHINE_RESET(poisk1); + + DECLARE_PALETTE_INIT(p1); + virtual void video_start() override; + UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + void set_palette_luts(); + POISK1_UPDATE_ROW(cga_gfx_2bpp_update_row); + POISK1_UPDATE_ROW(cga_gfx_1bpp_update_row); + POISK1_UPDATE_ROW(poisk1_gfx_1bpp_update_row); + + DECLARE_WRITE_LINE_MEMBER(p1_pit8253_out2_changed); + DECLARE_WRITE_LINE_MEMBER(p1_speaker_set_spkrdata); + UINT8 m_p1_spkrdata; + UINT8 m_p1_input; + + UINT8 m_kbpoll_mask; + + struct + { + UINT8 trap[4]; + std::unique_ptr videoram_base; + UINT8 *videoram; + UINT8 mode_control_6a; + UINT8 color_select_68; + UINT8 palette_lut_2bpp[4]; + int stride; + void *update_row(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride); + } m_video; + + DECLARE_READ8_MEMBER(p1_trap_r); + DECLARE_WRITE8_MEMBER(p1_trap_w); + DECLARE_READ8_MEMBER(p1_cga_r); + DECLARE_WRITE8_MEMBER(p1_cga_w); + DECLARE_WRITE8_MEMBER(p1_vram_w); + + DECLARE_READ8_MEMBER(p1_ppi_r); + DECLARE_WRITE8_MEMBER(p1_ppi_w); + DECLARE_WRITE8_MEMBER(p1_ppi_porta_w); + DECLARE_READ8_MEMBER(p1_ppi_porta_r); + DECLARE_READ8_MEMBER(p1_ppi_portb_r); + DECLARE_READ8_MEMBER(p1_ppi_portc_r); + DECLARE_WRITE8_MEMBER(p1_ppi_portc_w); + DECLARE_WRITE8_MEMBER(p1_ppi2_porta_w); + DECLARE_WRITE8_MEMBER(p1_ppi2_portb_w); + DECLARE_READ8_MEMBER(p1_ppi2_portc_r); + const char *m_cputag; +}; + /* * onboard devices: */ +/* + * Poisk-1 doesn't have a mc6845 and always runs in graphics mode. Text mode is emulated by BIOS; + * NMI is triggered on access to video memory and to mc6845 ports. Address and data are latched into: + * + * Port 28H (offset 0) -- lower 8 bits of address + * Port 29H (offset 1) -- high -//- and mode bits + * Port 2AH (offset 2) -- data + */ + +READ8_MEMBER(p1_state::p1_trap_r) +{ + UINT8 data = m_video.trap[offset]; + DBG_LOG(1,"trap",("R %.2x $%02x\n", 0x28+offset, data)); + if (offset == 0) + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); + return data; +} + +WRITE8_MEMBER(p1_state::p1_trap_w) +{ + DBG_LOG(1,"trap",("W %.2x $%02x\n", 0x28+offset, data)); +} + +READ8_MEMBER(p1_state::p1_cga_r) +{ + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + return 0; +} + +WRITE8_MEMBER(p1_state::p1_cga_w) +{ + UINT16 port = offset + 0x3d0; + + DBG_LOG(1,"cga",("W %.4x $%02x\n", port, data)); + m_video.trap[2] = data; + m_video.trap[1] = 0xC0 | ((port >> 8) & 0x3f); + m_video.trap[0] = port & 255; + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); +} + +WRITE8_MEMBER(p1_state::p1_vram_w) +{ + DBG_LOG(1,"vram",("W %.4x $%02x\n", offset, data)); + if (m_video.videoram_base) + m_video.videoram_base[offset] = data; + m_video.trap[2] = data; + m_video.trap[1] = 0x80 | ((offset >> 8) & 0x3f); + m_video.trap[0] = offset & 255; + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); +} + +// CGA emulator +/* +068h D42 0..2 R, G, B XXX Foreground/Background color + 3 NMI DISABLE NMI trap 1: Disabled 0: Enabled + 4 PALETTE XXX Colour palette 0: XXX 1: XXX + 5 I (INTENS) XXX Foreground/Background color intensity + 6 DISPLAY BANK XXX Video RAM page + 7 HIRES 1: 640x200 0: 320x200 +*/ + +WRITE8_MEMBER(p1_state::p1_ppi2_porta_w) +{ + address_space &space_prg = m_maincpu->space(AS_PROGRAM); + + DBG_LOG(1,"color_select_68",("W $%02x\n", data)); + + // NMI DISABLE + if (BIT(data, 3) != BIT(m_video.color_select_68, 3)) { + if (BIT(data, 3)) { + space_prg.install_readwrite_bank( 0xb8000, 0xbbfff, "bank11" ); + } else { + space_prg.install_read_bank( 0xb8000, 0xbbfff, "bank11" ); + space_prg.install_write_handler( 0xb8000, 0xbbfff, WRITE8_DELEGATE(p1_state, p1_vram_w) ); + } + } + // DISPLAY BANK + if (BIT(data, 6) != BIT(m_video.color_select_68, 6)) { + if (BIT(data, 6)) + m_video.videoram = m_video.videoram_base.get() + 0x4000; + else + m_video.videoram = m_video.videoram_base.get(); + } + // HIRES -- XXX + if (BIT(data, 7) != BIT(m_video.color_select_68, 7)) { + if (BIT(data, 7)) + machine().first_screen()->set_visible_area(0, 640-1, 0, 200-1); + else + machine().first_screen()->set_visible_area(0, 320-1, 0, 200-1); + } + m_video.color_select_68 = data; + set_palette_luts(); +} + +/* +06Ah Dxx 6 Enable/Disable color burst (?) + 7 Enable/Disable D7H/D7L +*/ + +WRITE8_MEMBER(p1_state::p1_ppi_portc_w) +{ + DBG_LOG(1,"mode_control_6a",("W $%02x\n", data)); + + m_video.mode_control_6a = data; + set_palette_luts(); +} + +void p1_state::set_palette_luts(void) +{ + /* Setup 2bpp palette lookup table */ + // HIRES + if ( m_video.color_select_68 & 0x80 ) + { + m_video.palette_lut_2bpp[0] = 0; + } + else + { + m_video.palette_lut_2bpp[0] = BG_COLOR(m_video.color_select_68); + } + // B&W -- XXX +/* + if ( m_video.mode_control_6a & 0x40 ) + { + m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 3; + m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 4; + m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 7; + } + else +*/ + { + // PALETTE + if ( m_video.color_select_68 & 0x20 ) + { + m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 3; + m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 5; + m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 7; + } + else + { + m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 2; + m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 4; + m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 6; + } + } +} + +/*************************************************************************** + Draw graphics mode with 320x200 pixels (default) with 2 bits/pixel. + Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000 + cga fetches 2 byte per mc6845 access. +***************************************************************************/ + +POISK1_UPDATE_ROW( p1_state::cga_gfx_2bpp_update_row ) +{ + const rgb_t *palette = m_palette->palette()->entry_list_raw(); + UINT32 *p = &bitmap.pix32(ra); + UINT16 odd, offset; + int i; + + if ( ra == 0 ) DBG_LOG(1,"cga_gfx_2bpp_update_row",("\n")); + odd = ( ra & 1 ) << 13; + offset = ( ma & 0x1fff ) | odd; + for ( i = 0; i < stride; i++ ) + { + UINT8 data = videoram[ offset++ ]; + + *p = palette[m_video.palette_lut_2bpp[ ( data >> 6 ) & 0x03 ]]; p++; + *p = palette[m_video.palette_lut_2bpp[ ( data >> 4 ) & 0x03 ]]; p++; + *p = palette[m_video.palette_lut_2bpp[ ( data >> 2 ) & 0x03 ]]; p++; + *p = palette[m_video.palette_lut_2bpp[ data & 0x03 ]]; p++; + } +} + +/*************************************************************************** + Draw graphics mode with 640x200 pixels (default). + The cell size is 1x1 (1 scanline is the real default) + Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000 +***************************************************************************/ + +POISK1_UPDATE_ROW( p1_state::cga_gfx_1bpp_update_row ) +{ + const rgb_t *palette = m_palette->palette()->entry_list_raw(); + UINT32 *p = &bitmap.pix32(ra); + UINT8 fg = 15, bg = BG_COLOR(m_video.color_select_68); + UINT16 odd, offset; + int i; + + if ( ra == 0 ) DBG_LOG(1,"cga_gfx_1bpp_update_row",("bg %d\n", bg)); + odd = ( ra & 1 ) << 13; + offset = ( ma & 0x1fff ) | odd; + for ( i = 0; i < stride; i++ ) + { + UINT8 data = videoram[ offset++ ]; + + *p = palette[( data & 0x80 ) ? fg : bg ]; p++; + *p = palette[( data & 0x40 ) ? fg : bg ]; p++; + *p = palette[( data & 0x20 ) ? fg : bg ]; p++; + *p = palette[( data & 0x10 ) ? fg : bg ]; p++; + *p = palette[( data & 0x08 ) ? fg : bg ]; p++; + *p = palette[( data & 0x04 ) ? fg : bg ]; p++; + *p = palette[( data & 0x02 ) ? fg : bg ]; p++; + *p = palette[( data & 0x01 ) ? fg : bg ]; p++; + } +} + +/*************************************************************************** + Draw graphics mode with 640x200 pixels + extra highlight color for text + mode emulation + Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000 +***************************************************************************/ + +POISK1_UPDATE_ROW( p1_state::poisk1_gfx_1bpp_update_row ) +{ + const rgb_t *palette = m_palette->palette()->entry_list_raw(); + UINT32 *p = &bitmap.pix32(ra); + UINT8 fg, bg = BG_COLOR(m_video.color_select_68); + UINT16 odd, offset; + int i; + + if ( ra == 0 ) DBG_LOG(1,"poisk1_gfx_1bpp_update_row",("bg %d\n", bg)); + odd = ( ra & 1 ) << 13; + offset = ( ma & 0x1fff ) | odd; + for ( i = 0; i < stride; i++ ) + { + UINT8 data = videoram[ offset++ ]; + + fg = (data & 0x80) ? ( (m_video.color_select_68 & 0x20) ? 10 : 11 ) : 15; // XXX + *p = palette[bg]; p++; + *p = palette[( data & 0x40 ) ? fg : bg ]; p++; + *p = palette[( data & 0x20 ) ? fg : bg ]; p++; + *p = palette[( data & 0x10 ) ? fg : bg ]; p++; + *p = palette[( data & 0x08 ) ? fg : bg ]; p++; + *p = palette[( data & 0x04 ) ? fg : bg ]; p++; + *p = palette[( data & 0x02 ) ? fg : bg ]; p++; + *p = palette[( data & 0x01 ) ? fg : bg ]; p++; + } +} + +/* Initialise the cga palette */ +PALETTE_INIT_MEMBER(p1_state, p1) +{ + int i; + + DBG_LOG(0,"init",("palette_init()\n")); + + for ( i = 0; i < CGA_PALETTE_SETS * 16; i++ ) + { + palette.set_pen_color(i, cga_palette[i][0], cga_palette[i][1], cga_palette[i][2] ); + } +} + +void p1_state::video_start() +{ + address_space &space = m_maincpu->space( AS_PROGRAM ); + + DBG_LOG(0,"init",("video_start()\n")); + + memset(&m_video, 0, sizeof(m_video)); + m_video.videoram_base = std::make_unique(0x8000); + m_video.videoram = m_video.videoram_base.get(); + m_video.stride = 80; + + space.install_readwrite_bank(0xb8000, 0xbffff, "bank11" ); + machine().root_device().membank("bank11")->set_base(m_video.videoram); +} + +UINT32 p1_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + UINT16 ra, ma = 0; + + if (!m_video.stride || !m_video.videoram) return 0; + + // bit 6 of 6Ah disables color burst -- not implemented + for (ra = cliprect.min_y; ra <= cliprect.max_y; ra++) + { + if (BIT(m_video.color_select_68, 7)) { + if (BIT(m_video.mode_control_6a, 7)) { + cga_gfx_1bpp_update_row(bitmap, cliprect, m_video.videoram, ma, ra, m_video.stride); + } else { + poisk1_gfx_1bpp_update_row(bitmap, cliprect, m_video.videoram, ma, ra, m_video.stride); + } + } else { + cga_gfx_2bpp_update_row(bitmap, cliprect, m_video.videoram, ma, ra, m_video.stride); + } + if (ra & 1) ma += m_video.stride; + } + + return 0; +} + // Timer. Poisk-1 uses single XTAL for everything? -- check WRITE_LINE_MEMBER( p1_state::p1_speaker_set_spkrdata ) @@ -177,7 +557,6 @@ DRIVER_INIT_MEMBER( p1_state, poisk1 ) DBG_LOG(0,"init",("driver_init()\n")); - program.unmap_readwrite(0, 0x7ffff); program.install_readwrite_bank(0, m_ram->size()-1, "bank10"); membank( "bank10" )->set_base( m_ram->pointer() ); } @@ -200,10 +579,7 @@ MACHINE_RESET_MEMBER( p1_state, poisk1 ) static ADDRESS_MAP_START( poisk1_map, AS_PROGRAM, 8, p1_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x7ffff) AM_RAM - AM_RANGE(0xc0000, 0xc1fff) AM_ROM - AM_RANGE(0xc0000, 0xfbfff) AM_NOP - AM_RANGE(0xfc000, 0xfffff) AM_ROM + AM_RANGE(0xfc000, 0xfffff) AM_ROM AM_REGION("bios", 0xc000) ADDRESS_MAP_END static ADDRESS_MAP_START( poisk1_io, AS_IO, 8, p1_state ) @@ -238,7 +614,7 @@ static MACHINE_CONFIG_START( poisk1, p1_state ) MCFG_PIT8253_CLK2(XTAL_15MHz/12) /* pio port c pin 4, and speaker polling enough */ MCFG_PIT8253_OUT2_HANDLER(WRITELINE(p1_state, p1_pit8253_out2_changed)) - MCFG_PIC8259_ADD( "pic8259", INPUTLINE(":maincpu", 0), VCC, NULL ) + MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NULL ) MCFG_DEVICE_ADD("ppi8255n1", I8255A, 0) MCFG_I8255_IN_PORTA_CB(READ8(p1_state, p1_ppi_porta_r)) /*60H*/ @@ -285,15 +661,15 @@ static MACHINE_CONFIG_START( poisk1, p1_state ) MACHINE_CONFIG_END ROM_START( poisk1 ) - ROM_REGION16_LE(0x100000,"maincpu", 0) + ROM_REGION16_LE(0x10000,"bios", 0) ROM_DEFAULT_BIOS("v91") ROM_SYSTEM_BIOS(0, "v89", "1989") - ROMX_LOAD( "biosp1s.rf4", 0xfe000, 0x2000, CRC(1a85f671) SHA1(f0e59b2c4d92164abca55a96a58071ce869ff988), ROM_BIOS(1)) + ROMX_LOAD( "biosp1s.rf4", 0xe000, 0x2000, CRC(1a85f671) SHA1(f0e59b2c4d92164abca55a96a58071ce869ff988), ROM_BIOS(1)) ROM_SYSTEM_BIOS(1, "v91", "1991") - ROMX_LOAD( "poisk_1991.bin", 0xfe000, 0x2000, CRC(d61c56fd) SHA1(de202e1f7422d585a1385a002a4fcf9d756236e5), ROM_BIOS(2)) + ROMX_LOAD( "poisk_1991.bin", 0xe000, 0x2000, CRC(d61c56fd) SHA1(de202e1f7422d585a1385a002a4fcf9d756236e5), ROM_BIOS(2)) ROM_SYSTEM_BIOS(2, "v91r2", "1991r2") - ROMX_LOAD( "p_bios_nm.bin", 0xfe000, 0x2000, CRC(84430b4f) SHA1(3e477962be3cea09662cb2e3ad9966ad01c7455d), ROM_BIOS(3)) + ROMX_LOAD( "p_bios_nm.bin", 0xe000, 0x2000, CRC(84430b4f) SHA1(3e477962be3cea09662cb2e3ad9966ad01c7455d), ROM_BIOS(3)) // 0xc0000, sets 80x25 text and loops asking for 'Boot from hard disk (Y or N)?' ROM_LOAD( "boot_net.rf4", 0x00000, 0x2000, CRC(316c2030) SHA1(d043325596455772252e465b85321f1b5c529d0b)) // NET BIOS diff --git a/src/mame/drivers/tandy1t.cpp b/src/mame/drivers/tandy1t.cpp index 3ba893c7610..cf1aabfc0ed 100644 --- a/src/mame/drivers/tandy1t.cpp +++ b/src/mame/drivers/tandy1t.cpp @@ -36,35 +36,51 @@ Tandy 1000 (80386) variations: #include "machine/pckeybrd.h" #include "machine/nvram.h" #include "machine/pc_fdc.h" +#include "machine/bankdev.h" #include "video/pc_t1t.h" #include "sound/sn76496.h" #include "cpu/i86/i86.h" #include "cpu/i86/i286.h" -#include "bus/isa/isa.h" -#include "bus/isa/isa_cards.h" #include "softlist.h" +class t1000_mb_device : public pc_noppi_mb_device +{ +public: + // construction/destruction + t1000_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : pc_noppi_mb_device(mconfig, tag, owner, clock) { } +protected: + virtual void device_start() override; +}; + +void t1000_mb_device::device_start() +{ +} + +const device_type T1000_MOTHERBOARD = &device_creator; + class tandy1000_state : public driver_device { public: tandy1000_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_romcs0(*this, "romcs0") - , m_romcs1(*this, "romcs1") , m_biosbank(*this, "biosbank") , m_keyboard(*this, "pc_keyboard") - , m_mb(*this, "mb") { } + , m_mb(*this, "mb") + , m_video(*this, "pcvideo_t1000") + , m_ram(*this, RAM_TAG) + , m_vram_bank(0) { } required_device m_maincpu; // Memory regions for the machines that support rom banking - optional_memory_region m_romcs0; - optional_memory_region m_romcs1; - optional_memory_bank m_biosbank; + optional_device m_biosbank; required_device m_keyboard; - required_device m_mb; + required_device m_mb; + required_device m_video; + required_device m_ram; DECLARE_WRITE8_MEMBER ( pc_t1t_p37x_w ); DECLARE_READ8_MEMBER ( pc_t1t_p37x_r ); @@ -73,13 +89,18 @@ public: DECLARE_READ8_MEMBER(tandy1000_pio_r); DECLARE_READ8_MEMBER( tandy1000_bank_r ); DECLARE_WRITE8_MEMBER( tandy1000_bank_w ); + DECLARE_WRITE8_MEMBER( nmi_vram_bank_w ); + DECLARE_WRITE8_MEMBER( vram_bank_w ); + DECLARE_READ8_MEMBER( vram_r ); + DECLARE_WRITE8_MEMBER( vram_w ); + DECLARE_WRITE8_MEMBER( devctrl_w ); + DECLARE_READ8_MEMBER( unk_r ); int tandy1000_read_eeprom(); void tandy1000_write_eeprom(UINT8 data); void tandy1000_set_bios_bank(); - DECLARE_DRIVER_INIT(t1000hx); - DECLARE_DRIVER_INIT(t1000sl); + void machine_start() override; DECLARE_MACHINE_RESET(tandy1000rl); @@ -97,6 +118,7 @@ public: UINT8 m_tandy_bios_bank; /* I/O port FFEAh */ UINT8 m_tandy_ppi_portb, m_tandy_ppi_portc; + UINT8 m_vram_bank; }; /* tandy 1000 eeprom @@ -294,39 +316,64 @@ READ8_MEMBER(tandy1000_state::tandy1000_pio_r) return data; } +WRITE8_MEMBER( tandy1000_state::nmi_vram_bank_w ) +{ + m_mb->nmi_enable_w(space, 0, data & 0x80); + vram_bank_w(space, 0, data & 0x1e); + m_video->disable_w((data & 1) ? ASSERT_LINE : CLEAR_LINE); +} -void tandy1000_state::tandy1000_set_bios_bank() +WRITE8_MEMBER( tandy1000_state::vram_bank_w ) { - UINT8 *p = nullptr; + m_vram_bank = (data >> 1) & 7; +} - assert( m_romcs0 != nullptr ); - assert( m_romcs1 != nullptr ); - assert( m_biosbank != nullptr ); +WRITE8_MEMBER( tandy1000_state::devctrl_w ) +{ + m_video->disable_w((data & 4) ? ASSERT_LINE : CLEAR_LINE); +} + +READ8_MEMBER( tandy1000_state::unk_r ) +{ + return 0; // status port? +} + +READ8_MEMBER( tandy1000_state::vram_r ) +{ + UINT8 vram_base = (m_ram->size() >> 17) - 1; + if((m_vram_bank - vram_base) == (offset >> 17)) + return m_ram->pointer()[offset & 0x1ffff]; + return 0xff; +} + +WRITE8_MEMBER( tandy1000_state::vram_w ) +{ + UINT8 vram_base = (m_ram->size() >> 17) - 1; + if((m_vram_bank - vram_base) == (offset >> 17)) + m_ram->pointer()[offset & 0x1ffff] = data; +} + +void tandy1000_state::tandy1000_set_bios_bank() +{ + int bank; if ( m_tandy_bios_bank & 0x10 ) { - if ( m_tandy_bios_bank & 0x04 ) + if (m_tandy_bios_bank & 0x04 ) { - p = m_romcs0->base() + ( m_tandy_bios_bank & 0x03 ) * 0x10000; + bank = (m_tandy_bios_bank & 3) + 8; } else { - p = m_romcs1->base() + ( m_tandy_bios_bank & 0x03 ) * 0x10000; + bank = m_tandy_bios_bank & 3; } } else { - if ( m_tandy_bios_bank & 0x08 ) - { - p = m_romcs0->base() + ( m_tandy_bios_bank & 0x07 ) * 0x10000; - } - else - { - p = m_romcs1->base() + ( m_tandy_bios_bank & 0x07 ) * 0x10000; - } + bank = m_tandy_bios_bank & 0x0f; } - m_biosbank->set_base( p ); + m_biosbank->set_bank( bank ); } MACHINE_RESET_MEMBER(tandy1000_state, tandy1000rl) @@ -335,28 +382,18 @@ MACHINE_RESET_MEMBER(tandy1000_state, tandy1000rl) tandy1000_set_bios_bank(); } -DRIVER_INIT_MEMBER(tandy1000_state,t1000hx) +void tandy1000_state::machine_start() { + m_maincpu->space(AS_PROGRAM).install_ram(0, m_ram->size() - (128*1024) - 1, &m_ram->pointer()[128*1024]); + if(m_maincpu->space(AS_PROGRAM).data_width() == 8) + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(m_ram->size() - (128*1024), 640*1024 - 1, + read8_delegate(FUNC(tandy1000_state::vram_r), this), write8_delegate(FUNC(tandy1000_state::vram_w), this)); + else + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(m_ram->size() - (128*1024), 640*1024 - 1, + read8_delegate(FUNC(tandy1000_state::vram_r), this), write8_delegate(FUNC(tandy1000_state::vram_w), this), 0xffff); machine().device("nvram")->set_base(m_eeprom_ee, sizeof(m_eeprom_ee)); } - -DRIVER_INIT_MEMBER(tandy1000_state,t1000sl) -{ - // Fix up memory region (highest address bit flipped??) - UINT8 *rom = memregion("romcs0")->base(); - - for( int i = 0; i < 0x40000; i++ ) - { - UINT8 d = rom[0x40000 + i]; - rom[0x40000 + i] = rom[i]; - rom[i] = d; - } - - DRIVER_INIT_NAME(t1000hx)(); -} - - READ8_MEMBER( tandy1000_state::tandy1000_bank_r ) { UINT8 data = 0xFF; @@ -467,61 +504,64 @@ static INPUT_PORTS_START( tandy1t ) INPUT_PORTS_END static ADDRESS_MAP_START(tandy1000_map, AS_PROGRAM, 8, tandy1000_state ) - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xaffff) AM_RAM - AM_RANGE(0xb0000, 0xb7fff) AM_NOP - AM_RANGE(0xb8000, 0xbffff) AM_DEVREADWRITE("pcvideo_t1000", pcvideo_t1000_device, videoram_r, videoram_w); - AM_RANGE(0xc0000, 0xc7fff) AM_NOP - AM_RANGE(0xc8000, 0xc9fff) AM_ROM - AM_RANGE(0xca000, 0xcffff) AM_NOP - AM_RANGE(0xd0000, 0xeffff) AM_NOP - AM_RANGE(0xf0000, 0xfffff) AM_ROM + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0xb8000, 0xbffff) AM_DEVICE("pcvideo_t1000:vram", address_map_bank_device, amap8) + AM_RANGE(0xe0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START(tandy1000_io, AS_IO, 8, tandy1000_state ) - AM_RANGE(0x0060, 0x0063) AM_READWRITE(tandy1000_pio_r, tandy1000_pio_w) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0060, 0x0063) AM_READWRITE(tandy1000_pio_r, tandy1000_pio_w) + AM_RANGE(0x00a0, 0x00a0) AM_WRITE(nmi_vram_bank_w) AM_RANGE(0x00c0, 0x00c0) AM_DEVWRITE("sn76496", ncr7496_device, write) + AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", t1000_mb_device, map) AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE("pc_joy", pc_joy_device, joy_port_r, joy_port_w) - AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc_t1t_p37x_r, pc_t1t_p37x_w) + AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc_t1t_p37x_r, pc_t1t_p37x_w) AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE("pcvideo_t1000", pcvideo_t1000_device, read, write) ADDRESS_MAP_END -static ADDRESS_MAP_START(tandy1000_16_map, AS_PROGRAM, 16, tandy1000_state ) - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xaffff) AM_RAM - AM_RANGE(0xb0000, 0xb7fff) AM_NOP - AM_RANGE(0xb8000, 0xbffff) AM_DEVREADWRITE8("pcvideo_t1000", pcvideo_t1000_device, videoram_r, videoram_w, 0xffff) - AM_RANGE(0xc0000, 0xc7fff) AM_NOP - AM_RANGE(0xc8000, 0xc9fff) AM_ROM - AM_RANGE(0xca000, 0xcffff) AM_NOP - AM_RANGE(0xe0000, 0xeffff) AM_ROMBANK("biosbank") /* Banked part of the BIOS */ - AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION( "romcs0", 0x70000 ) +static ADDRESS_MAP_START(tandy1000_bank_map, AS_PROGRAM, 16, tandy1000_state ) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0xb8000, 0xbffff) AM_DEVICE8("pcvideo_t1000:vram", address_map_bank_device, amap8, 0xffff) + AM_RANGE(0xe0000, 0xeffff) AM_DEVICE("biosbank", address_map_bank_device, amap16) + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION( "rom", 0x70000 ) +ADDRESS_MAP_END + +static ADDRESS_MAP_START(biosbank_map, AS_0, 16, tandy1000_state) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x80000, 0xfffff) AM_ROM AM_REGION("rom", 0) ADDRESS_MAP_END static ADDRESS_MAP_START(tandy1000_16_io, AS_IO, 16, tandy1000_state ) - AM_RANGE(0x0060, 0x0063) AM_READWRITE8(tandy1000_pio_r, tandy1000_pio_w, 0xffff) - AM_RANGE(0x00c0, 0x00c1) AM_DEVWRITE8("sn76496", ncr7496_device, write, 0xffff) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0060, 0x0063) AM_READWRITE8(tandy1000_pio_r, tandy1000_pio_w, 0xffff) + AM_RANGE(0x0064, 0x0065) AM_WRITE8(devctrl_w, 0xff00) + AM_RANGE(0x00a0, 0x00a1) AM_READ8(unk_r, 0x00ff) + AM_RANGE(0x00c0, 0x00c1) AM_DEVWRITE8("sn76496", ncr7496_device, write, 0xffff) + AM_RANGE(0x0000, 0x00ff) AM_DEVICE8("mb", t1000_mb_device, map, 0xffff) AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff) - AM_RANGE(0x0378, 0x037f) AM_READWRITE8(pc_t1t_p37x_r, pc_t1t_p37x_w, 0xffff) + AM_RANGE(0x0378, 0x037f) AM_READWRITE8(pc_t1t_p37x_r, pc_t1t_p37x_w, 0xffff) AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("pcvideo_t1000", pcvideo_t1000_device, read, write, 0xffff) + AM_RANGE(0xffe8, 0xffe9) AM_WRITE8(vram_bank_w, 0x00ff) ADDRESS_MAP_END -static ADDRESS_MAP_START(tandy1000_16_bank_io, AS_IO, 16, tandy1000_state ) +static ADDRESS_MAP_START(tandy1000_bank_io, AS_IO, 16, tandy1000_state ) + ADDRESS_MAP_UNMAP_HIGH AM_IMPORT_FROM(tandy1000_16_io) AM_RANGE(0xffea, 0xffeb) AM_READWRITE8(tandy1000_bank_r, tandy1000_bank_w, 0xffff) ADDRESS_MAP_END +static ADDRESS_MAP_START(tandy1000tx_io, AS_IO, 16, tandy1000_state ) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x00a0, 0x00a1) AM_WRITE8(nmi_vram_bank_w, 0x00ff) + AM_IMPORT_FROM(tandy1000_16_io) +ADDRESS_MAP_END + static ADDRESS_MAP_START(tandy1000_286_map, AS_PROGRAM, 16, tandy1000_state ) + ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0x000fffff) - AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") - AM_RANGE(0xa0000, 0xaffff) AM_RAM - AM_RANGE(0xb0000, 0xb7fff) AM_NOP - AM_RANGE(0xb8000, 0xbffff) AM_DEVREADWRITE8("pcvideo_t1000", pcvideo_t1000_device, videoram_r, videoram_w, 0xffff) - AM_RANGE(0xc0000, 0xc7fff) AM_NOP - AM_RANGE(0xc8000, 0xc9fff) AM_ROM - AM_RANGE(0xca000, 0xcffff) AM_NOP - AM_RANGE(0xe0000, 0xeffff) AM_NOP - AM_RANGE(0xf8000, 0xfffff) AM_ROM + AM_RANGE(0xb8000, 0xbffff) AM_DEVICE8("pcvideo_t1000:vram", address_map_bank_device, amap8, 0xffff) + AM_RANGE(0xe0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static const gfx_layout t1000_charlayout = @@ -555,7 +595,8 @@ static GFXDECODE_START( t1000 ) GFXDECODE_END static MACHINE_CONFIG_FRAGMENT(tandy1000_common) - MCFG_PCNOPPI_MOTHERBOARD_ADD("mb", "maincpu") + MCFG_DEVICE_ADD("mb", T1000_MOTHERBOARD, 0) + t1000_mb_device::static_set_cputag(*device, "maincpu"); /* video hardware */ MCFG_PCVIDEO_T1000_ADD("pcvideo_t1000") @@ -591,6 +632,8 @@ static MACHINE_CONFIG_START( t1000hx, tandy1000_state ) // plus cards are isa with a nonstandard conntector MCFG_ISA8_SLOT_ADD("mb:isa", "plus1", pc_isa8_cards, nullptr, false) + MCFG_DEVICE_MODIFY(RAM_TAG) + MCFG_RAM_EXTRA_OPTIONS("256K, 384K") MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( t1000sx, t1000hx ) @@ -604,21 +647,31 @@ static MACHINE_CONFIG_DERIVED( t1000sx, t1000hx ) /* software lists */ MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150") + MCFG_DEVICE_MODIFY(RAM_TAG) + MCFG_RAM_EXTRA_OPTIONS("384K") MACHINE_CONFIG_END -static MACHINE_CONFIG_START( t1000_16, tandy1000_state ) +static MACHINE_CONFIG_START( t1000rl, tandy1000_state ) MCFG_CPU_ADD("maincpu", I8086, XTAL_28_63636MHz / 3) - MCFG_CPU_PROGRAM_MAP(tandy1000_16_map) - MCFG_CPU_IO_MAP(tandy1000_16_bank_io) + MCFG_CPU_PROGRAM_MAP(tandy1000_bank_map) + MCFG_CPU_IO_MAP(tandy1000_bank_io) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb) MCFG_FRAGMENT_ADD(tandy1000_common) - MCFG_MACHINE_RESET_OVERRIDE(tandy1000_state,tandy1000rl) + MCFG_DEVICE_ADD("biosbank", ADDRESS_MAP_BANK, 0) + MCFG_DEVICE_PROGRAM_MAP(biosbank_map) + MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE) + MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(16) + MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(20) + MCFG_ADDRESS_MAP_BANK_STRIDE(0x10000) + MCFG_MACHINE_RESET_OVERRIDE(tandy1000_state,tandy1000rl) + MCFG_DEVICE_MODIFY(RAM_TAG) + MCFG_RAM_EXTRA_OPTIONS("384K") MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( t1000_16_8, t1000_16 ) +static MACHINE_CONFIG_DERIVED( t1000sl2, t1000rl ) MCFG_CPU_MODIFY( "maincpu" ) MCFG_CPU_CLOCK( XTAL_24MHz / 3 ) @@ -628,7 +681,7 @@ static MACHINE_CONFIG_DERIVED( t1000_16_8, t1000_16 ) MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, nullptr, false) MACHINE_CONFIG_END -static MACHINE_CONFIG_START( t1000_286, tandy1000_state ) +static MACHINE_CONFIG_START( t1000tl, tandy1000_state ) MCFG_CPU_ADD("maincpu", I80286, XTAL_28_63636MHz / 2) MCFG_CPU_PROGRAM_MAP(tandy1000_286_map) MCFG_CPU_IO_MAP(tandy1000_16_io) @@ -643,14 +696,19 @@ static MACHINE_CONFIG_START( t1000_286, tandy1000_state ) MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, nullptr, false) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( t1000tx, t1000tl ) + MCFG_CPU_MODIFY( "maincpu" ) + MCFG_CPU_IO_MAP(tandy1000tx_io) +MACHINE_CONFIG_END + #ifdef UNUSED_DEFINITION ROM_START( t1000 ) // Schematics displays 2 32KB ROMs at U9 and U10 - ROM_REGION(0x100000,"maincpu", 0) + ROM_REGION(0x20000,"bios", 0) ROM_SYSTEM_BIOS( 0, "v010000", "v010000" ) - ROMX_LOAD("v010000.f0", 0xf0000, 0x10000, NO_DUMP, ROM_BIOS(1)) + ROMX_LOAD("v010000.f0", 0x10000, 0x10000, NO_DUMP, ROM_BIOS(1)) ROM_SYSTEM_BIOS( 1, "v010100", "v010100" ) - ROMX_LOAD("v010100.f0", 0xf0000, 0x10000, CRC(b6760881) SHA1(8275e4c48ac09cf36685db227434ca438aebe0b9), ROM_BIOS(2)) + ROMX_LOAD("v010100.f0", 0x10000, 0x10000, CRC(b6760881) SHA1(8275e4c48ac09cf36685db227434ca438aebe0b9), ROM_BIOS(2)) // Part of video array at u76? ROM_REGION(0x08000,"gfx1", 0) @@ -658,21 +716,21 @@ ROM_START( t1000 ) ROM_END ROM_START( t1000a ) - ROM_REGION(0x100000,"maincpu", 0) + ROM_REGION(0x20000,"bios", 0) // partlist says it has 1 128kbyte rom - ROM_LOAD("t1000hx.e0", 0xe0000, 0x10000, CRC(61dbf242) SHA1(555b58d8aa8e0b0839259621c44b832d993beaef)) // not sure about this one - ROM_LOAD("v010100.f0", 0xf0000, 0x10000, CRC(b6760881) SHA1(8275e4c48ac09cf36685db227434ca438aebe0b9)) + ROM_LOAD("t1000hx.e0", 0x00000, 0x10000, CRC(61dbf242) SHA1(555b58d8aa8e0b0839259621c44b832d993beaef)) // not sure about this one + ROM_LOAD("v010100.f0", 0x10000, 0x10000, CRC(b6760881) SHA1(8275e4c48ac09cf36685db227434ca438aebe0b9)) ROM_REGION(0x08000,"gfx1", 0) ROM_LOAD("8079027.u25", 0x00000, 0x04000, CRC(33d64a11) SHA1(b63da2a656b6c0a8a32f2be8bdcb51aed983a450)) // TODO: Verify location ROM_END ROM_START( t1000ex ) - ROM_REGION(0x100000,"maincpu", 0) + ROM_REGION(0x20000,"bios", 0) // partlist says it has 1 128kb rom, schematics list a 32k x 8 rom // "8040328.u17" - ROM_LOAD("t1000hx.e0", 0xe0000, 0x10000, CRC(61dbf242) SHA1(555b58d8aa8e0b0839259621c44b832d993beaef)) // not sure about this one - ROM_LOAD("v010200.f0", 0xf0000, 0x10000, CRC(0e016ecf) SHA1(2f5ac8921b7cba56b02122ef772f5f11bbf6d8a2)) + ROM_LOAD("t1000hx.e0", 0x00000, 0x10000, CRC(61dbf242) SHA1(555b58d8aa8e0b0839259621c44b832d993beaef)) // not sure about this one + ROM_LOAD("v010200.f0", 0x10000, 0x10000, CRC(0e016ecf) SHA1(2f5ac8921b7cba56b02122ef772f5f11bbf6d8a2)) // TODO: Add dump of the 8048 at u8 if it ever gets dumped ROM_REGION(0x400, "kbdc", 0) @@ -685,22 +743,22 @@ ROM_END // The T1000SL and T1000SL/2 only differ in amount of RAM installed and BIOS version (SL/2 has v01.04.04) ROM_START( t1000sl ) - ROM_REGION(0x100000,"maincpu", 0) + ROM_REGION(0x20000,"bios", 0) // 8076312.hu1 - most likely v01.04.00 // 8075312.hu2 // partlist says it has 1 128kbyte rom - ROM_LOAD("t1000hx.e0", 0xe0000, 0x10000, CRC(61dbf242) SHA1(555b58d8aa8e0b0839259621c44b832d993beaef)) // not sure about this one + ROM_LOAD("t1000hx.e0", 0x00000, 0x10000, CRC(61dbf242) SHA1(555b58d8aa8e0b0839259621c44b832d993beaef)) // not sure about this one ROM_SYSTEM_BIOS( 0, "v010400", "v010400" ) - ROMX_LOAD("v010400.f0", 0xf0000, 0x10000, NO_DUMP, ROM_BIOS(1) ) + ROMX_LOAD("v010400.f0", 0x10000, 0x10000, NO_DUMP, ROM_BIOS(1) ) ROM_SYSTEM_BIOS( 1, "v010401", "v010401" ) - ROMX_LOAD("v010401.f0", 0xf0000, 0x10000, NO_DUMP, ROM_BIOS(2) ) + ROMX_LOAD("v010401.f0", 0x10000, 0x10000, NO_DUMP, ROM_BIOS(2) ) ROM_SYSTEM_BIOS( 2, "v010402", "v010402" ) - ROMX_LOAD("v010402.f0", 0xf0000, 0x10000, NO_DUMP, ROM_BIOS(3) ) + ROMX_LOAD("v010402.f0", 0x10000, 0x10000, NO_DUMP, ROM_BIOS(3) ) ROM_SYSTEM_BIOS( 3, "v020001", "v020001" ) - ROMX_LOAD("v020001.f0", 0xf0000, 0x10000, NO_DUMP, ROM_BIOS(4) ) + ROMX_LOAD("v020001.f0", 0x10000, 0x10000, NO_DUMP, ROM_BIOS(4) ) ROM_REGION(0x08000,"gfx1", 0) ROM_LOAD("8079027.u25", 0x00000, 0x04000, CRC(33d64a11) SHA1(b63da2a656b6c0a8a32f2be8bdcb51aed983a450)) @@ -708,7 +766,7 @@ ROM_END ROM_START( t1000tl ) - ROM_REGIoN(0x100000, "maincpu", ROMREGION_ERASE00) + ROM_REGIoN(0x10000, "bios", ROMREGION_ERASE00) ROM_REGION(0x80000, "romcs0", 0) // These 2 sets most likely have the same contents @@ -731,8 +789,8 @@ ROM_END #endif ROM_START( t1000hx ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD("v020000.u12", 0xe0000, 0x20000, CRC(6f3acd80) SHA1(976af8c04c3f6fde14d7047f6521d302bdc2d017)) // TODO: Rom label + ROM_REGION(0x20000,"bios", 0) + ROM_LOAD("v020000.u12", 0x00000, 0x20000, CRC(6f3acd80) SHA1(976af8c04c3f6fde14d7047f6521d302bdc2d017)) // TODO: Rom label // TODO: Add dump of the 8048 at u9 if it ever gets dumped ROM_REGION(0x400, "kbdc", 0) @@ -743,8 +801,8 @@ ROM_START( t1000hx ) ROM_END ROM_START( t1000sx ) - ROM_REGION(0x100000,"maincpu", 0) - ROM_LOAD("8040328.u41", 0xf8000, 0x8000, CRC(4e2b9f0b) SHA1(e79a9ed9e885736e30d9b135557f0e596ce5a70b)) + ROM_REGION(0x20000,"bios", 0) + ROM_LOAD("8040328.u41", 0x18000, 0x8000, CRC(4e2b9f0b) SHA1(e79a9ed9e885736e30d9b135557f0e596ce5a70b)) // No character rom is listed in the schematics? // But disabling it results in no text being printed @@ -755,10 +813,10 @@ ROM_END ROM_START( t1000tx ) - ROM_REGION(0x100000,"maincpu", 0) + ROM_REGION(0x20000,"bios", 0) // There should be 2 32KBx8 ROMs, one for odd at u38, one for even at u39 // The machine already boots up with just this one rom - ROM_LOAD("t1000tx.bin", 0xf8000, 0x8000, BAD_DUMP CRC(9b34765c) SHA1(0b07e87f6843393f7d4ca4634b832b0c0bec304e)) + ROM_LOAD("t1000tx.bin", 0x18000, 0x8000, BAD_DUMP CRC(9b34765c) SHA1(0b07e87f6843393f7d4ca4634b832b0c0bec304e)) // No character rom is listed in the schematics? // It is most likely part of the big blue chip at u36 @@ -768,14 +826,11 @@ ROM_END ROM_START( t1000rl ) - ROM_REGION(0x100000,"maincpu", ROMREGION_ERASE00) - // bankable ROM regions - ROM_REGION(0x80000, "romcs0", 0) + ROM_REGION(0x80000, "rom", 0) /* v2.0.0.1 */ /* Rom is labeled "(C) TANDY CORP. 1990 // 8079073 // LH534G70 JAPAN // 9034 D" */ ROM_LOAD("8079073.u23", 0x00000, 0x80000, CRC(6fab50f7) SHA1(2ccc02bee4c250dc1b7c17faef2590bc158860b0) ) - ROM_REGION(0x80000, "romcs1", ROMREGION_ERASEFF) ROM_REGION(0x08000,"gfx1", 0) /* Character rom located at U3 w/label "8079027 // NCR // 609-2495004 // F841030 A9025" */ @@ -784,14 +839,14 @@ ROM_END ROM_START( t1000sl2 ) - ROM_REGION(0x100000,"maincpu", ROMREGION_ERASE00) - // bankable ROM regions - ROM_REGION(0x80000, "romcs0", 0) + ROM_REGION(0x80000, "rom", 0) // v01.04.04 BIOS - ROM_LOAD16_BYTE("8079047.hu1", 0x00000, 0x40000, CRC(c773ec0e) SHA1(7deb71f14c2c418400b639d60066ab61b7e9df32)) - ROM_LOAD16_BYTE("8079048.hu2", 0x00001, 0x40000, CRC(0f3e6586) SHA1(10f1a7204f69b82a18bc94a3010c9660aec0c802)) - ROM_REGION(0x80000, "romcs1", ROMREGION_ERASEFF) + // Fix up memory region (highest address bit flipped??) + ROM_LOAD16_BYTE("8079047.hu1", 0x40000, 0x20000, CRC(c773ec0e) SHA1(7deb71f14c2c418400b639d60066ab61b7e9df32)) + ROM_CONTINUE(0x00000, 0x20000) + ROM_LOAD16_BYTE("8079048.hu2", 0x40001, 0x20000, CRC(0f3e6586) SHA1(10f1a7204f69b82a18bc94a3010c9660aec0c802)) + ROM_CONTINUE(0x00001, 0x20000) ROM_REGION(0x08000,"gfx1", 0) ROM_LOAD("8079027.u25", 0x00000, 0x04000, CRC(33d64a11) SHA1(b63da2a656b6c0a8a32f2be8bdcb51aed983a450)) @@ -802,8 +857,8 @@ ROM_END ROM_START( t1000tl2 ) - ROM_REGION(0x100000, "maincpu", 0) - ROM_LOAD( "t10000tl2.bin", 0xf0000, 0x10000, CRC(e288f12c) SHA1(9d54ccf773cd7202c9906323f1b5a68b1b3a3a67)) + ROM_REGION(0x20000, "bios", 0) + ROM_LOAD( "t10000tl2.bin", 0x10000, 0x10000, CRC(e288f12c) SHA1(9d54ccf773cd7202c9906323f1b5a68b1b3a3a67)) ROM_REGION(0x08000,"gfx1", 0) ROM_LOAD("8079027.u24", 0x00000, 0x04000, CRC(33d64a11) SHA1(b63da2a656b6c0a8a32f2be8bdcb51aed983a450)) // TODO: Verify location @@ -812,9 +867,9 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ // tandy 1000 -COMP( 1987, t1000hx, ibm5150, 0, t1000hx, tandy1t, tandy1000_state, t1000hx, "Tandy Radio Shack", "Tandy 1000 HX", 0) -COMP( 1987, t1000sx, ibm5150, 0, t1000sx, tandy1t, tandy1000_state, t1000hx, "Tandy Radio Shack", "Tandy 1000 SX", 0) -COMP( 1987, t1000tx, ibm5150, 0, t1000_286, tandy1t, tandy1000_state, t1000hx, "Tandy Radio Shack", "Tandy 1000 TX", 0) -COMP( 1989, t1000rl, ibm5150, 0, t1000_16, tandy1t, tandy1000_state, t1000hx, "Tandy Radio Shack", "Tandy 1000 RL", 0) -COMP( 1989, t1000tl2, ibm5150, 0, t1000_286, tandy1t, tandy1000_state, t1000hx, "Tandy Radio Shack", "Tandy 1000 TL/2", 0) -COMP( 1988, t1000sl2, ibm5150, 0, t1000_16_8, tandy1t, tandy1000_state, t1000sl, "Tandy Radio Shack", "Tandy 1000 SL/2", 0) +COMP( 1987, t1000hx, ibm5150, 0, t1000hx, tandy1t, driver_device, 0, "Tandy Radio Shack", "Tandy 1000 HX", 0) +COMP( 1987, t1000sx, ibm5150, 0, t1000sx, tandy1t, driver_device, 0, "Tandy Radio Shack", "Tandy 1000 SX", 0) +COMP( 1987, t1000tx, ibm5150, 0, t1000tx, tandy1t, driver_device, 0, "Tandy Radio Shack", "Tandy 1000 TX", 0) +COMP( 1989, t1000rl, ibm5150, 0, t1000rl, tandy1t, driver_device, 0, "Tandy Radio Shack", "Tandy 1000 RL", 0) +COMP( 1989, t1000tl2, ibm5150, 0, t1000tl, tandy1t, driver_device, 0, "Tandy Radio Shack", "Tandy 1000 TL/2", 0) +COMP( 1988, t1000sl2, ibm5150, 0, t1000sl2, tandy1t, driver_device, 0, "Tandy Radio Shack", "Tandy 1000 SL/2", 0) diff --git a/src/mame/includes/genpc.h b/src/mame/includes/genpc.h index b3353de35d6..13f00e8eac2 100644 --- a/src/mame/includes/genpc.h +++ b/src/mame/includes/genpc.h @@ -36,12 +36,12 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; + + DECLARE_ADDRESS_MAP(map, 8); protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; - - void install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler); public: required_device m_maincpu; required_device m_pic8259; @@ -76,12 +76,12 @@ public: UINT8 m_ppi_shift_enable; // interface to the keyboard - virtual DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); + DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); DECLARE_WRITE_LINE_MEMBER( keyboard_data_w ); - virtual DECLARE_READ8_MEMBER ( pc_ppi_porta_r ); - virtual DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); - virtual DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); + DECLARE_READ8_MEMBER ( pc_ppi_porta_r ); + DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); + DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out1_changed ); DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out2_changed ); @@ -104,7 +104,6 @@ public: DECLARE_WRITE_LINE_MEMBER( pc_speaker_set_spkrdata ); - DECLARE_READ8_MEMBER(pc_page_r); DECLARE_WRITE8_MEMBER(pc_page_w); DECLARE_WRITE8_MEMBER(nmi_enable_w); @@ -133,18 +132,16 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; - virtual DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ) override; + DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); protected: // device-level overrides - virtual void device_start() override; - virtual void device_reset() override; required_device m_cassette; public: - virtual DECLARE_READ8_MEMBER ( pc_ppi_porta_r ) override; - virtual DECLARE_READ8_MEMBER ( pc_ppi_portc_r ) override; - virtual DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ) override; + DECLARE_READ8_MEMBER ( pc_ppi_porta_r ); + DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); + DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); }; @@ -165,17 +162,13 @@ public: // optional information overrides virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; - -protected: - // device-level overrides virtual void device_start() override; - virtual void device_reset() override; public: - virtual DECLARE_READ8_MEMBER ( pc_ppi_portc_r ) override; - virtual DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ) override; + DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); + DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); - virtual DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ) override; + DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); }; extern const device_type EC1841_MOTHERBOARD; @@ -190,11 +183,11 @@ public: // construction/destruction pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + DECLARE_ADDRESS_MAP(map, 8); + virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; protected: - // device-level overrides - void device_start() override; }; extern const device_type PCNOPPI_MOTHERBOARD; diff --git a/src/mame/includes/poisk1.h b/src/mame/includes/poisk1.h deleted file mode 100644 index 57a24f0c052..00000000000 --- a/src/mame/includes/poisk1.h +++ /dev/null @@ -1,101 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sergey Svishchev -/***************************************************************************** - * - * includes/poisk1.h - * - ****************************************************************************/ - -#ifndef POISK1_H_ -#define POISK1_H_ - -#include "imagedev/cassette.h" -#include "machine/i8255.h" -#include "bus/isa/isa.h" -#include "machine/pic8259.h" -#include "machine/pit8253.h" -#include "machine/ram.h" -#include "bus/isa/xsu_cards.h" -#include "sound/speaker.h" - -#define POISK1_UPDATE_ROW(name) \ - void name(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride) - -class p1_state : public driver_device -{ -public: - p1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_pic8259(*this, "pic8259"), - m_pit8253(*this, "pit8253"), - m_ppi8255n1(*this, "ppi8255n1"), - m_ppi8255n2(*this, "ppi8255n2"), - m_isabus(*this, "isa"), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_palette(*this, "palette") { } - - required_device m_maincpu; - required_device m_pic8259; - required_device m_pit8253; - required_device m_ppi8255n1; - required_device m_ppi8255n2; - required_device m_isabus; - required_device m_speaker; - required_device m_cassette; - required_device m_ram; - - DECLARE_DRIVER_INIT(poisk1); - DECLARE_MACHINE_START(poisk1); - DECLARE_MACHINE_RESET(poisk1); - - DECLARE_PALETTE_INIT(p1); - virtual void video_start() override; - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void set_palette_luts(); - POISK1_UPDATE_ROW(cga_gfx_2bpp_update_row); - POISK1_UPDATE_ROW(cga_gfx_1bpp_update_row); - POISK1_UPDATE_ROW(poisk1_gfx_1bpp_update_row); - - DECLARE_WRITE_LINE_MEMBER(p1_pit8253_out2_changed); - DECLARE_WRITE_LINE_MEMBER(p1_speaker_set_spkrdata); - UINT8 m_p1_spkrdata; - UINT8 m_p1_input; - - UINT8 m_kbpoll_mask; - - struct - { - UINT8 trap[4]; - std::unique_ptr videoram_base; - UINT8 *videoram; - UINT8 mode_control_6a; - UINT8 color_select_68; - UINT8 palette_lut_2bpp[4]; - int stride; - void *update_row(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride); - } m_video; - - DECLARE_READ8_MEMBER(p1_trap_r); - DECLARE_WRITE8_MEMBER(p1_trap_w); - DECLARE_READ8_MEMBER(p1_cga_r); - DECLARE_WRITE8_MEMBER(p1_cga_w); - DECLARE_WRITE8_MEMBER(p1_vram_w); - - DECLARE_READ8_MEMBER(p1_ppi_r); - DECLARE_WRITE8_MEMBER(p1_ppi_w); - DECLARE_WRITE8_MEMBER(p1_ppi_porta_w); - DECLARE_READ8_MEMBER(p1_ppi_porta_r); - DECLARE_READ8_MEMBER(p1_ppi_portb_r); - DECLARE_READ8_MEMBER(p1_ppi_portc_r); - DECLARE_WRITE8_MEMBER(p1_ppi_portc_w); - DECLARE_WRITE8_MEMBER(p1_ppi2_porta_w); - DECLARE_WRITE8_MEMBER(p1_ppi2_portb_w); - DECLARE_READ8_MEMBER(p1_ppi2_portc_r); - required_device m_palette; - const char *m_cputag; -}; - -#endif /* POISK1_H_ */ diff --git a/src/mame/machine/genpc.cpp b/src/mame/machine/genpc.cpp index 44dbcd00d20..a749180fd3a 100644 --- a/src/mame/machine/genpc.cpp +++ b/src/mame/machine/genpc.cpp @@ -36,12 +36,6 @@ * *************************************************************************/ -READ8_MEMBER( ibm5160_mb_device::pc_page_r) -{ - return 0xff; -} - - WRITE8_MEMBER( ibm5160_mb_device::pc_page_w) { switch(offset % 4) @@ -528,24 +522,14 @@ ibm5160_mb_device::ibm5160_mb_device(const machine_config &mconfig, const char * { } -void ibm5160_mb_device::install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler) -{ - int buswidth = m_maincpu->space_config(AS_IO)->m_databus_width; - switch(buswidth) - { - case 8: - if(!rhandler.isnull()) m_maincpu->space(AS_IO).install_read_handler(start, end, mask, mirror, rhandler, 0); - if(!whandler.isnull()) m_maincpu->space(AS_IO).install_write_handler(start, end, mask, mirror, whandler, 0); - break; - case 16: - if(!rhandler.isnull()) m_maincpu->space(AS_IO).install_read_handler(start, end, mask, mirror, rhandler, 0xffff); - if(!whandler.isnull()) m_maincpu->space(AS_IO).install_write_handler(start, end, mask, mirror, whandler, 0xffff); - break; - default: - fatalerror("IBM5160_MOTHERBOARD: Bus width %d not supported\n", buswidth); - } -} - +DEVICE_ADDRESS_MAP_START( map, 8, ibm5160_mb_device ) + AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237", am9517a_device, read, write) + AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259", pic8259_device, read, write) + AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("pit8253", pit8253_device, read, write) + AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) + AM_RANGE(0x0080, 0x008f) AM_WRITE(pc_page_w) + AM_RANGE(0x00a0, 0x00a1) AM_WRITE(nmi_enable_w) +ADDRESS_MAP_END //------------------------------------------------- // device_start - device-specific startup @@ -553,15 +537,9 @@ void ibm5160_mb_device::install_device(offs_t start, offs_t end, offs_t mask, of void ibm5160_mb_device::device_start() { - install_device(0x0000, 0x000f, 0, 0, read8_delegate(FUNC(am9517a_device::read), (am9517a_device*)m_dma8237), write8_delegate(FUNC(am9517a_device::write), (am9517a_device*)m_dma8237) ); - install_device(0x0020, 0x0021, 0, 0, read8_delegate(FUNC(pic8259_device::read), (pic8259_device*)m_pic8259), write8_delegate(FUNC(pic8259_device::write), (pic8259_device*)m_pic8259) ); - install_device(0x0040, 0x0043, 0, 0, read8_delegate(FUNC(pit8253_device::read), (pit8253_device*)m_pit8253), write8_delegate(FUNC(pit8253_device::write), (pit8253_device*)m_pit8253) ); - install_device(0x0060, 0x0063, 0, 0, read8_delegate(FUNC(i8255_device::read), (i8255_device*)m_ppi8255), write8_delegate(FUNC(i8255_device::write), (i8255_device*)m_ppi8255) ); - install_device(0x0080, 0x0087, 0, 0, read8_delegate(FUNC(ibm5160_mb_device::pc_page_r), this), write8_delegate(FUNC(ibm5160_mb_device::pc_page_w),this) ); - install_device(0x00a0, 0x00a1, 0, 0, read8_delegate(), write8_delegate(FUNC(ibm5160_mb_device::nmi_enable_w),this)); - /* MESS managed RAM */ - if ( m_ram->pointer() ) - membank( "bank10" )->set_base( m_ram->pointer() ); + if(!m_ram->started()) + throw device_missing_dependencies(); + m_maincpu->space(AS_PROGRAM).install_ram(0, m_ram->size() - 1, m_ram->pointer()); } @@ -607,6 +585,10 @@ static MACHINE_CONFIG_FRAGMENT( ibm5150_mb_config ) MCFG_DEVICE_MODIFY("pc_kbdc") MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ibm5150_mb_device, keyboard_clock_w)) + MCFG_DEVICE_MODIFY("ppi8255") + MCFG_I8255_OUT_PORTB_CB(WRITE8(ibm5150_mb_device, pc_ppi_portb_w)) + MCFG_I8255_IN_PORTC_CB(READ8(ibm5150_mb_device, pc_ppi_portc_r)) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) MACHINE_CONFIG_END @@ -636,15 +618,6 @@ ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, const char * { } -void ibm5150_mb_device::device_start() -{ - ibm5160_mb_device::device_start(); -} -void ibm5150_mb_device::device_reset() -{ - ibm5160_mb_device::device_reset(); -} - READ8_MEMBER (ibm5150_mb_device::pc_ppi_porta_r) { int data = 0xFF; @@ -788,6 +761,10 @@ const device_type EC1841_MOTHERBOARD = &device_creator; static MACHINE_CONFIG_FRAGMENT( ec1841_mb_config ) MCFG_FRAGMENT_ADD(ibm5160_mb_config) + MCFG_DEVICE_MODIFY("ppi8255") + MCFG_I8255_OUT_PORTB_CB(WRITE8(ec1841_mb_device, pc_ppi_portb_w)) + MCFG_I8255_IN_PORTC_CB(READ8(ec1841_mb_device, pc_ppi_portc_r)) + MCFG_DEVICE_MODIFY("pc_kbdc") MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ec1841_mb_device, keyboard_clock_w)) MACHINE_CONFIG_END @@ -857,11 +834,6 @@ ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, const char *ta void ec1841_mb_device::device_start() { - ibm5160_mb_device::device_start(); -} -void ec1841_mb_device::device_reset() -{ - ibm5160_mb_device::device_reset(); } // kbd interface is 5150-like but PB2 controls access to second bank of DIP switches (SA2). @@ -939,16 +911,12 @@ ioport_constructor pc_noppi_mb_device::device_input_ports() const return INPUT_PORTS_NAME( pc_noppi_mb ); } -void pc_noppi_mb_device::device_start() -{ - install_device(0x0000, 0x000f, 0, 0, read8_delegate(FUNC(am9517a_device::read), (am9517a_device*)m_dma8237), write8_delegate(FUNC(am9517a_device::write), (am9517a_device*)m_dma8237) ); - install_device(0x0020, 0x0021, 0, 0, read8_delegate(FUNC(pic8259_device::read), (pic8259_device*)m_pic8259), write8_delegate(FUNC(pic8259_device::write), (pic8259_device*)m_pic8259) ); - install_device(0x0040, 0x0043, 0, 0, read8_delegate(FUNC(pit8253_device::read), (pit8253_device*)m_pit8253), write8_delegate(FUNC(pit8253_device::write), (pit8253_device*)m_pit8253) ); - install_device(0x0080, 0x0087, 0, 0, read8_delegate(FUNC(ibm5160_mb_device::pc_page_r), this), write8_delegate(FUNC(ibm5160_mb_device::pc_page_w),this) ); - install_device(0x00a0, 0x00a1, 0, 0, read8_delegate(), write8_delegate(FUNC(ibm5160_mb_device::nmi_enable_w),this)); - /* MESS managed RAM */ - if ( m_ram->pointer() ) - membank( "bank10" )->set_base( m_ram->pointer() ); -} +DEVICE_ADDRESS_MAP_START( map, 8, pc_noppi_mb_device ) + AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237", am9517a_device, read, write) + AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259", pic8259_device, read, write) + AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("pit8253", pit8253_device, read, write) + AM_RANGE(0x0080, 0x008f) AM_WRITE(pc_page_w) + AM_RANGE(0x00a0, 0x00a1) AM_WRITE(nmi_enable_w) +ADDRESS_MAP_END const device_type PCNOPPI_MOTHERBOARD = &device_creator; diff --git a/src/mame/machine/pcshare.cpp b/src/mame/machine/pcshare.cpp index e6d3451c5c4..c93fc57338d 100644 --- a/src/mame/machine/pcshare.cpp +++ b/src/mame/machine/pcshare.cpp @@ -14,12 +14,7 @@ ***************************************************************************/ #include "emu.h" -#include "cpu/i386/i386.h" #include "machine/pcshare.h" -#include "machine/pckeybrd.h" -#include "machine/mc146818.h" -#include "machine/idectrl.h" - /****************** DMA8237 Controller diff --git a/src/mame/video/pc_t1t.cpp b/src/mame/video/pc_t1t.cpp index b5931d4daba..8c7b2fafdfd 100644 --- a/src/mame/video/pc_t1t.cpp +++ b/src/mame/video/pc_t1t.cpp @@ -49,13 +49,14 @@ pc_t1t_device::pc_t1t_device(const machine_config &mconfig, device_type type, co m_display_enable(0), m_vsync(0), m_palette_base(0), - m_palette(*this,"palette") + m_palette(*this,"palette"), + m_ram(*this, ":" RAM_TAG), + m_vram(*this, "vram") { } pcvideo_t1000_device::pcvideo_t1000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : pc_t1t_device(mconfig, PCVIDEO_T1000, "Tandy 1000 Graphics Adapter", tag, owner, clock, "tandy_1000_graphics_adapter", __FILE__), - m_t1_displayram(nullptr) + : pc_t1t_device(mconfig, PCVIDEO_T1000, "Tandy 1000 Graphics Adapter", tag, owner, clock, "tandy_1000_graphics_adapter", __FILE__) { } @@ -68,24 +69,35 @@ pcvideo_pcjr_device::pcvideo_pcjr_device(const machine_config &mconfig, const ch void pcvideo_t1000_device::device_start() { + if(!m_ram->started()) + throw device_missing_dependencies(); m_chr_gen = machine().root_device().memregion("gfx1")->base(); m_bank = 0; m_chr_size = 1; m_ra_offset = 256; + m_vram->space(AS_0).install_ram(0, 128*1024 - 1, m_ram->pointer()); } void pcvideo_pcjr_device::device_start() { + if(!m_ram->started()) + throw device_missing_dependencies(); m_chr_gen = machine().root_device().memregion("gfx1")->base(); m_bank = 0; m_mode_control = 0x08; m_chr_size = 8; m_ra_offset = 1; if(!strncmp(machine().system().name, "ibmpcjx", 7)) + { m_jxkanji = machine().root_device().memregion("kanji")->base(); + m_vram->space(AS_0).install_ram(0, 128*1024 - 1, memshare(":vram")->ptr()); // TODO: fix when this is really understood + } else + { m_jxkanji = nullptr; + m_vram->space(AS_0).install_ram(0, 128*1024 - 1, m_ram->pointer()); + } } @@ -95,6 +107,11 @@ void pcvideo_pcjr_device::device_start() ***************************************************************************/ +static ADDRESS_MAP_START(vram_map, AS_0, 8, pcvideo_t1000_device) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x20000, 0x3ffff) AM_NOP +ADDRESS_MAP_END + MACHINE_CONFIG_FRAGMENT( pcvideo_t1000 ) MCFG_SCREEN_ADD(T1000_SCREEN_NAME, RASTER) MCFG_SCREEN_RAW_PARAMS(XTAL_14_31818MHz,912,0,640,262,0,200) @@ -109,6 +126,13 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_t1000 ) MCFG_MC6845_UPDATE_ROW_CB(pc_t1t_device, crtc_update_row) MCFG_MC6845_OUT_DE_CB(WRITELINE(pc_t1t_device, t1000_de_changed)) MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(pcvideo_t1000_device, t1000_vsync_changed)) + + MCFG_DEVICE_ADD("vram", ADDRESS_MAP_BANK, 0) + MCFG_DEVICE_PROGRAM_MAP(vram_map) + MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE) + MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8) + MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(18) + MCFG_ADDRESS_MAP_BANK_STRIDE(0x4000) MACHINE_CONFIG_END machine_config_constructor pcvideo_t1000_device::device_mconfig_additions() const @@ -116,7 +140,6 @@ machine_config_constructor pcvideo_t1000_device::device_mconfig_additions() cons return MACHINE_CONFIG_NAME( pcvideo_t1000 ); } - MACHINE_CONFIG_FRAGMENT( pcvideo_pcjr ) MCFG_SCREEN_ADD(T1000_SCREEN_NAME, RASTER) MCFG_SCREEN_RAW_PARAMS(XTAL_14_31818MHz,912,0,640,262,0,200) @@ -131,6 +154,12 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_pcjr ) MCFG_MC6845_UPDATE_ROW_CB(pcvideo_pcjr_device, crtc_update_row) MCFG_MC6845_OUT_DE_CB(WRITELINE(pc_t1t_device, t1000_de_changed)) MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(pcvideo_pcjr_device, pcjr_vsync_changed)) + MCFG_DEVICE_ADD("vram", ADDRESS_MAP_BANK, 0) + MCFG_DEVICE_PROGRAM_MAP(vram_map) + MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE) + MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8) + MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(18) + MCFG_ADDRESS_MAP_BANK_STRIDE(0x4000) MACHINE_CONFIG_END machine_config_constructor pcvideo_pcjr_device::device_mconfig_additions() const @@ -474,22 +503,6 @@ MC6845_UPDATE_ROW( pcvideo_pcjr_device::crtc_update_row ) } -READ8_MEMBER( pcvideo_t1000_device::videoram_r ) -{ - UINT8 *videoram = m_t1_displayram; - int data = 0xff; - if( videoram ) - data = videoram[offset]; - return data; -} - -WRITE8_MEMBER( pcvideo_t1000_device::videoram_w ) -{ - UINT8 *videoram = m_t1_displayram; - if( videoram ) - videoram[offset] = data; -} - void pcvideo_t1000_device::mode_switch( void ) { switch( m_mode_control & 0x3B ) @@ -798,78 +811,66 @@ int pc_t1t_device::vga_data_r(void) */ void pcvideo_t1000_device::bank_w(int data) { - if (m_bank != data) + int dram, vram; + if ((data&0xc0)==0xc0) /* needed for lemmings */ { - UINT8 *ram = machine().root_device().memregion("maincpu")->base(); - int dram, vram; - m_bank = data; - /* it seems the video ram is mapped to the last 128K of main memory */ -#if 1 - if ((data&0xc0)==0xc0) /* needed for lemmings */ - { - dram = 0x80000 + ((data & 0x06) << 14); - vram = 0x80000 + ((data & 0x30) << (14-3)); - } - else - { - dram = 0x80000 + ((data & 0x07) << 14); - vram = 0x80000 + ((data & 0x38) << (14-3)); - } -#else - dram = (data & 0x07) << 14; - vram = (data & 0x38) << (14-3); -#endif - m_t1_displayram = &ram[vram]; - m_displayram = &ram[dram]; - mode_switch(); + dram = (m_bank & 0x06);// | ((m_bank & 0x1800) >> 8); + vram = ((m_bank & 0x30) >> 3);// | ((m_bank & 0x6000) >> 10); + } + else + { + dram = (m_bank & 0x07);// | ((m_bank & 0x1800) >> 8); + vram = ((m_bank & 0x38) >> 3);// | ((m_bank & 0x6000) >> 10); } + m_displayram = m_ram->pointer() + (dram << 14); + if(m_disable) + return; + m_vram->set_bank(vram); + if((m_bank & 0xc0) != (data & 0xc0)) + mode_switch(); } void pcvideo_pcjr_device::pc_pcjr_bank_w(int data) { - if (m_bank != data) + int dram, vram; + m_bank = data; + /* it seems the video ram is mapped to the last 128K of main memory */ + if ((data&0xc0)==0xc0) /* needed for lemmings */ { - int dram, vram; - m_bank = data; - /* it seems the video ram is mapped to the last 128K of main memory */ - if ((data&0xc0)==0xc0) /* needed for lemmings */ - { - dram = ((data & 0x06) << 14); - vram = ((data & 0x30) << (14-3)); - } - else - { - dram = ((data & 0x07) << 14); - vram = ((data & 0x38) << (14-3)); - } - machine().root_device().membank( "bank14" )->set_base( machine().device(RAM_TAG)->pointer() + vram ); - m_displayram = machine().device(RAM_TAG)->pointer() + dram; - pc_pcjr_mode_switch(); + dram = (data & 0x06); + vram = (data & 0x30) >> 3; } + else + { + dram = (data & 0x07); + vram = (data & 0x38) >> 3; + } + m_vram->set_bank(vram); + m_displayram = m_ram->pointer() + (dram << 14); + if((m_bank & 0xc0) != (data & 0xc0)) + pc_pcjr_mode_switch(); } void pcvideo_pcjr_device::pc_pcjx_bank_w(int data) { - if (m_bank != data) + int dram, vram; + m_bank = data; + if ((data&0xc0)==0xc0) /* needed for lemmings */ { - int dram, vram; - m_bank = data; - /* this probably isn't right, but otherwise the memory test stomps on the vram */ - if ((data&0xc0)==0xc0) /* needed for lemmings */ - { - dram = 0x80000 + ((data & 0x06) << 14); - vram = 0x80000 + ((data & 0x30) << (14-3)); - } - else - { - dram = 0x80000 + ((data & 0x07) << 14); - vram = 0x80000 + ((data & 0x38) << (14-3)); - } - machine().root_device().membank( "bank14" )->set_base( machine().device(RAM_TAG)->pointer() + vram ); - m_displayram = machine().device(RAM_TAG)->pointer() + dram; - pc_pcjr_mode_switch(); + dram = (data & 0x06); + vram = (data & 0x30) >> 3; + } + else + { + dram = (data & 0x07); + vram = (data & 0x38) >> 3; } + m_vram->set_bank(vram); + /* this certainly isn't correct but otherwise the memory test stomps on the vram */ + m_displayram = (UINT8 *)memshare(":vram")->ptr() + (dram << 14); + if((m_bank & 0xc0) != (data & 0xc0)) + pc_pcjr_mode_switch(); } int pc_t1t_device::bank_r(void) @@ -909,17 +910,19 @@ WRITE8_MEMBER( pcvideo_t1000_device::write ) case 12: break; case 13: + m_bank = (data << 8) | (m_bank & 0xff); + bank_w(m_bank); break; case 14: vga_data_w(data); break; case 15: + m_bank = (m_bank & 0xff00) | data; bank_w(data); break; } } - WRITE8_MEMBER( pcvideo_pcjr_device::write ) { switch( offset ) @@ -1005,7 +1008,6 @@ READ8_MEMBER( pc_t1t_device::read ) return data; } - WRITE_LINE_MEMBER( pc_t1t_device::t1000_de_changed ) { m_display_enable = state ? 1 : 0; @@ -1021,6 +1023,14 @@ WRITE_LINE_MEMBER( pcvideo_t1000_device::t1000_vsync_changed ) } } +WRITE_LINE_MEMBER( pcvideo_t1000_device::disable_w ) +{ + if(state) + m_vram->set_bank(8); + else + bank_w(m_bank); + m_disable = state ? true : false; +} WRITE_LINE_MEMBER( pcvideo_pcjr_device::pcjr_vsync_changed ) { diff --git a/src/mame/video/pc_t1t.h b/src/mame/video/pc_t1t.h index 7dc6f981762..34839955b95 100644 --- a/src/mame/video/pc_t1t.h +++ b/src/mame/video/pc_t1t.h @@ -4,6 +4,8 @@ #define PC_T1T_H #include "video/mc6845.h" +#include "machine/ram.h" +#include "machine/bankdev.h" #define T1000_SCREEN_NAME "screen" #define T1000_MC6845_NAME "mc6845_t1000" @@ -39,6 +41,7 @@ public: DECLARE_PALETTE_INIT( pcjr ); DECLARE_WRITE_LINE_MEMBER( t1000_de_changed ); + DECLARE_READ8_MEMBER( read ); virtual MC6845_UPDATE_ROW( crtc_update_row ); MC6845_UPDATE_ROW( t1000_text_inten_update_row ); @@ -48,13 +51,14 @@ public: MC6845_UPDATE_ROW( t1000_gfx_2bpp_tga_update_row ); MC6845_UPDATE_ROW( t1000_gfx_1bpp_update_row ); +protected: required_device m_mc6845; UINT8 m_mode_control, m_color_select; UINT8 m_status; struct reg m_reg; - UINT8 m_bank; + UINT16 m_bank; int m_pc_framecnt; @@ -80,8 +84,9 @@ public: int vga_data_r(void); int bank_r(void); - DECLARE_READ8_MEMBER( read ); required_device m_palette; + required_device m_ram; + required_device m_vram; }; class pcvideo_t1000_device : public pc_t1t_device @@ -91,20 +96,19 @@ public: pcvideo_t1000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); DECLARE_WRITE8_MEMBER( write ); - DECLARE_READ8_MEMBER( videoram_r ); - DECLARE_WRITE8_MEMBER( videoram_w ); DECLARE_WRITE_LINE_MEMBER( t1000_vsync_changed ); + DECLARE_WRITE_LINE_MEMBER( disable_w ); protected: virtual machine_config_constructor device_mconfig_additions() const override; virtual void device_start() override; private: - UINT8 *m_t1_displayram; void mode_switch( void ); void vga_data_w(int data); void bank_w(int data); void mode_control_w(int data); + bool m_disable; }; extern const device_type PCVIDEO_T1000; diff --git a/src/mame/video/poisk1.cpp b/src/mame/video/poisk1.cpp deleted file mode 100644 index 6f2a102bde4..00000000000 --- a/src/mame/video/poisk1.cpp +++ /dev/null @@ -1,322 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sergey Svishchev -/* - * Poisk-1 does not have a real mc6845 and always runs in graphics mode. - * Text mode is emulated by BIOS. - * Video RAM in native graphics mode starts at 0xB8000, in emulated text mode -- at 0xBC000. - */ - -#include "emu.h" - -#include "includes/poisk1.h" - -#define CGA_PALETTE_SETS 83 -/* one for colour, one for mono, 81 for colour composite */ - -#include "video/cgapal.h" - -#define BG_COLOR(x) (((x) & 7)|(((x) & 0x10) >> 1)) - -#define VERBOSE_DBG 0 - -#define DBG_LOG(N,M,A) \ - do { \ - if(VERBOSE_DBG>=N) \ - { \ - if( M ) \ - logerror("%11.6f: %-24s",machine().time().as_double(),(char*)M ); \ - logerror A; \ - } \ - } while (0) - -// - -/* - * Poisk-1 doesn't have a mc6845 and always runs in graphics mode. Text mode is emulated by BIOS; - * NMI is triggered on access to video memory and to mc6845 ports. Address and data are latched into: - * - * Port 28H (offset 0) -- lower 8 bits of address - * Port 29H (offset 1) -- high -//- and mode bits - * Port 2AH (offset 2) -- data - */ - -READ8_MEMBER(p1_state::p1_trap_r) -{ - UINT8 data = m_video.trap[offset]; - DBG_LOG(1,"trap",("R %.2x $%02x\n", 0x28+offset, data)); - if (offset == 0) - m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); - return data; -} - -WRITE8_MEMBER(p1_state::p1_trap_w) -{ - DBG_LOG(1,"trap",("W %.2x $%02x\n", 0x28+offset, data)); -} - -READ8_MEMBER(p1_state::p1_cga_r) -{ - m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); - return 0; -} - -WRITE8_MEMBER(p1_state::p1_cga_w) -{ - UINT16 port = offset + 0x3d0; - - DBG_LOG(1,"cga",("W %.4x $%02x\n", port, data)); - m_video.trap[2] = data; - m_video.trap[1] = 0xC0 | ((port >> 8) & 0x3f); - m_video.trap[0] = port & 255; - m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); -} - -WRITE8_MEMBER(p1_state::p1_vram_w) -{ - DBG_LOG(1,"vram",("W %.4x $%02x\n", offset, data)); - if (m_video.videoram_base) - m_video.videoram_base[offset] = data; - m_video.trap[2] = data; - m_video.trap[1] = 0x80 | ((offset >> 8) & 0x3f); - m_video.trap[0] = offset & 255; - m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); -} - -// CGA emulator -/* -068h D42 0..2 R, G, B XXX Foreground/Background color - 3 NMI DISABLE NMI trap 1: Disabled 0: Enabled - 4 PALETTE XXX Colour palette 0: XXX 1: XXX - 5 I (INTENS) XXX Foreground/Background color intensity - 6 DISPLAY BANK XXX Video RAM page - 7 HIRES 1: 640x200 0: 320x200 -*/ - -WRITE8_MEMBER(p1_state::p1_ppi2_porta_w) -{ - address_space &space_prg = m_maincpu->space(AS_PROGRAM); - - DBG_LOG(1,"color_select_68",("W $%02x\n", data)); - - // NMI DISABLE - if (BIT(data, 3) != BIT(m_video.color_select_68, 3)) { - if (BIT(data, 3)) { - space_prg.install_readwrite_bank( 0xb8000, 0xbbfff, "bank11" ); - } else { - space_prg.install_read_bank( 0xb8000, 0xbbfff, "bank11" ); - space_prg.install_write_handler( 0xb8000, 0xbbfff, WRITE8_DELEGATE(p1_state, p1_vram_w) ); - } - } - // DISPLAY BANK - if (BIT(data, 6) != BIT(m_video.color_select_68, 6)) { - if (BIT(data, 6)) - m_video.videoram = m_video.videoram_base.get() + 0x4000; - else - m_video.videoram = m_video.videoram_base.get(); - } - // HIRES -- XXX - if (BIT(data, 7) != BIT(m_video.color_select_68, 7)) { - if (BIT(data, 7)) - machine().first_screen()->set_visible_area(0, 640-1, 0, 200-1); - else - machine().first_screen()->set_visible_area(0, 320-1, 0, 200-1); - } - m_video.color_select_68 = data; - set_palette_luts(); -} - -/* -06Ah Dxx 6 Enable/Disable color burst (?) - 7 Enable/Disable D7H/D7L -*/ - -WRITE8_MEMBER(p1_state::p1_ppi_portc_w) -{ - DBG_LOG(1,"mode_control_6a",("W $%02x\n", data)); - - m_video.mode_control_6a = data; - set_palette_luts(); -} - -void p1_state::set_palette_luts(void) -{ - /* Setup 2bpp palette lookup table */ - // HIRES - if ( m_video.color_select_68 & 0x80 ) - { - m_video.palette_lut_2bpp[0] = 0; - } - else - { - m_video.palette_lut_2bpp[0] = BG_COLOR(m_video.color_select_68); - } - // B&W -- XXX -/* - if ( m_video.mode_control_6a & 0x40 ) - { - m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 3; - m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 4; - m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 7; - } - else -*/ - { - // PALETTE - if ( m_video.color_select_68 & 0x20 ) - { - m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 3; - m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 5; - m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 7; - } - else - { - m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 2; - m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 4; - m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 6; - } - } -} - -/*************************************************************************** - Draw graphics mode with 320x200 pixels (default) with 2 bits/pixel. - Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000 - cga fetches 2 byte per mc6845 access. -***************************************************************************/ - -POISK1_UPDATE_ROW( p1_state::cga_gfx_2bpp_update_row ) -{ - const rgb_t *palette = m_palette->palette()->entry_list_raw(); - UINT32 *p = &bitmap.pix32(ra); - UINT16 odd, offset; - int i; - - if ( ra == 0 ) DBG_LOG(1,"cga_gfx_2bpp_update_row",("\n")); - odd = ( ra & 1 ) << 13; - offset = ( ma & 0x1fff ) | odd; - for ( i = 0; i < stride; i++ ) - { - UINT8 data = videoram[ offset++ ]; - - *p = palette[m_video.palette_lut_2bpp[ ( data >> 6 ) & 0x03 ]]; p++; - *p = palette[m_video.palette_lut_2bpp[ ( data >> 4 ) & 0x03 ]]; p++; - *p = palette[m_video.palette_lut_2bpp[ ( data >> 2 ) & 0x03 ]]; p++; - *p = palette[m_video.palette_lut_2bpp[ data & 0x03 ]]; p++; - } -} - -/*************************************************************************** - Draw graphics mode with 640x200 pixels (default). - The cell size is 1x1 (1 scanline is the real default) - Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000 -***************************************************************************/ - -POISK1_UPDATE_ROW( p1_state::cga_gfx_1bpp_update_row ) -{ - const rgb_t *palette = m_palette->palette()->entry_list_raw(); - UINT32 *p = &bitmap.pix32(ra); - UINT8 fg = 15, bg = BG_COLOR(m_video.color_select_68); - UINT16 odd, offset; - int i; - - if ( ra == 0 ) DBG_LOG(1,"cga_gfx_1bpp_update_row",("bg %d\n", bg)); - odd = ( ra & 1 ) << 13; - offset = ( ma & 0x1fff ) | odd; - for ( i = 0; i < stride; i++ ) - { - UINT8 data = videoram[ offset++ ]; - - *p = palette[( data & 0x80 ) ? fg : bg ]; p++; - *p = palette[( data & 0x40 ) ? fg : bg ]; p++; - *p = palette[( data & 0x20 ) ? fg : bg ]; p++; - *p = palette[( data & 0x10 ) ? fg : bg ]; p++; - *p = palette[( data & 0x08 ) ? fg : bg ]; p++; - *p = palette[( data & 0x04 ) ? fg : bg ]; p++; - *p = palette[( data & 0x02 ) ? fg : bg ]; p++; - *p = palette[( data & 0x01 ) ? fg : bg ]; p++; - } -} - -/*************************************************************************** - Draw graphics mode with 640x200 pixels + extra highlight color for text - mode emulation - Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000 -***************************************************************************/ - -POISK1_UPDATE_ROW( p1_state::poisk1_gfx_1bpp_update_row ) -{ - const rgb_t *palette = m_palette->palette()->entry_list_raw(); - UINT32 *p = &bitmap.pix32(ra); - UINT8 fg, bg = BG_COLOR(m_video.color_select_68); - UINT16 odd, offset; - int i; - - if ( ra == 0 ) DBG_LOG(1,"poisk1_gfx_1bpp_update_row",("bg %d\n", bg)); - odd = ( ra & 1 ) << 13; - offset = ( ma & 0x1fff ) | odd; - for ( i = 0; i < stride; i++ ) - { - UINT8 data = videoram[ offset++ ]; - - fg = (data & 0x80) ? ( (m_video.color_select_68 & 0x20) ? 10 : 11 ) : 15; // XXX - *p = palette[bg]; p++; - *p = palette[( data & 0x40 ) ? fg : bg ]; p++; - *p = palette[( data & 0x20 ) ? fg : bg ]; p++; - *p = palette[( data & 0x10 ) ? fg : bg ]; p++; - *p = palette[( data & 0x08 ) ? fg : bg ]; p++; - *p = palette[( data & 0x04 ) ? fg : bg ]; p++; - *p = palette[( data & 0x02 ) ? fg : bg ]; p++; - *p = palette[( data & 0x01 ) ? fg : bg ]; p++; - } -} - -/* Initialise the cga palette */ -PALETTE_INIT_MEMBER(p1_state, p1) -{ - int i; - - DBG_LOG(0,"init",("palette_init()\n")); - - for ( i = 0; i < CGA_PALETTE_SETS * 16; i++ ) - { - palette.set_pen_color(i, cga_palette[i][0], cga_palette[i][1], cga_palette[i][2] ); - } -} - -void p1_state::video_start() -{ - address_space &space = m_maincpu->space( AS_PROGRAM ); - - DBG_LOG(0,"init",("video_start()\n")); - - memset(&m_video, 0, sizeof(m_video)); - m_video.videoram_base = std::make_unique(0x8000); - m_video.videoram = m_video.videoram_base.get(); - m_video.stride = 80; - - space.install_readwrite_bank(0xb8000, 0xbffff, "bank11" ); - machine().root_device().membank("bank11")->set_base(m_video.videoram); -} - -UINT32 p1_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) -{ - UINT16 ra, ma = 0; - - if (!m_video.stride || !m_video.videoram) return 0; - - // bit 6 of 6Ah disables color burst -- not implemented - for (ra = cliprect.min_y; ra <= cliprect.max_y; ra++) - { - if (BIT(m_video.color_select_68, 7)) { - if (BIT(m_video.mode_control_6a, 7)) { - cga_gfx_1bpp_update_row(bitmap, cliprect, m_video.videoram, ma, ra, m_video.stride); - } else { - poisk1_gfx_1bpp_update_row(bitmap, cliprect, m_video.videoram, ma, ra, m_video.stride); - } - } else { - cga_gfx_2bpp_update_row(bitmap, cliprect, m_video.videoram, ma, ra, m_video.stride); - } - if (ra & 1) ma += m_video.stride; - } - - return 0; -} -- cgit v1.2.3-70-g09d2 From ac575fa05f658888fe9c83de3103e748d9d2764f Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 5 Mar 2016 17:33:36 +1100 Subject: Fix build of pcshare --- src/mame/machine/pcshare.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mame/machine/pcshare.cpp b/src/mame/machine/pcshare.cpp index c93fc57338d..46b53464304 100644 --- a/src/mame/machine/pcshare.cpp +++ b/src/mame/machine/pcshare.cpp @@ -15,6 +15,7 @@ #include "emu.h" #include "machine/pcshare.h" +#include "cpu/i86/i286.h" /****************** DMA8237 Controller -- cgit v1.2.3-70-g09d2 From a38c82c236d71ffb26ecdebbc4eeaf240ac37d6a Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 5 Mar 2016 08:02:06 +0100 Subject: hh_cop400: added handlers to plus1 --- src/mame/drivers/hh_cop400.cpp | 22 +++++++++++++++++++++- src/mame/drivers/hh_hmcs40.cpp | 6 +++--- 2 files changed, 24 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index a946ceffc08..fcf3eabc189 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -653,16 +653,33 @@ public: plus1_state(const machine_config &mconfig, device_type type, const char *tag) : hh_cop400_state(mconfig, type, tag) { } + + DECLARE_WRITE8_MEMBER(write_d); }; // handlers -//.. +WRITE8_MEMBER(plus1_state::write_d) +{ + // D?: speaker out + m_speaker->level_w(data & 1); +} // config static INPUT_PORTS_START( plus1 ) + PORT_START("IN.0") // port G + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN.1") // port L + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) INPUT_PORTS_END static MACHINE_CONFIG_START( plus1, plus1_state ) @@ -670,6 +687,9 @@ static MACHINE_CONFIG_START( plus1, plus1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", COP410, 1000000) // approximation - RC osc. R=51K to +5V, C=100pf to GND MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, true) // guessed + MCFG_COP400_WRITE_D_CB(WRITE8(plus1_state, write_d)) + MCFG_COP400_READ_G_CB(IOPORT("IN.0")) + MCFG_COP400_READ_L_CB(IOPORT("IN.1")) /* no visual feedback! */ diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp index 02434fd6f48..d3639a6fb84 100644 --- a/src/mame/drivers/hh_hmcs40.cpp +++ b/src/mame/drivers/hh_hmcs40.cpp @@ -58,10 +58,10 @@ @88 HD38820A 1984, Bandai Pair Match (PT-460) (1/2) @89 HD38820A 1984, Bandai Pair Match (PT-460) (2/2) - *75 HD44801A 1982, Alpha 8201 protection MCU (have dump) + 75 HD44801A 1982, Alpha 8201 protection MCU -> machine/alpha8201.* - *35 HD44801B 1983, Alpha 8302 protection MCU (have dump) - *42 HD44801B 1984, Alpha 8303 protection MCU (have dump) + 35 HD44801B 1983, Alpha 8302 protection MCU (see 8201) + 42 HD44801B 1984, Alpha 8303 protection MCU (see 8201) (* denotes not yet emulated by MAME, @ denotes it's in this driver) -- cgit v1.2.3-70-g09d2 From 298ce35d641be59c89b0a2df0f9c851b6815b962 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 5 Mar 2016 08:57:59 +0100 Subject: Added missing xaudio2 header from WINE that is free to use (nw) --- 3rdparty/compat/mingw/xaudio2.h | 6491 +++++++++++++++++++++++++++++++ 3rdparty/win81sdk/Include/um/xaudio2.h | 1196 ------ scripts/src/osd/modules.lua | 8 +- src/osd/modules/sound/xaudio2_sound.cpp | 7 + 4 files changed, 6503 insertions(+), 1199 deletions(-) create mode 100644 3rdparty/compat/mingw/xaudio2.h delete mode 100644 3rdparty/win81sdk/Include/um/xaudio2.h (limited to 'src') diff --git a/3rdparty/compat/mingw/xaudio2.h b/3rdparty/compat/mingw/xaudio2.h new file mode 100644 index 00000000000..15165a3ecdd --- /dev/null +++ b/3rdparty/compat/mingw/xaudio2.h @@ -0,0 +1,6491 @@ +/*** Autogenerated by WIDL 1.6 from xaudio2.idl - Do not edit ***/ + +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +#include +#include + +#ifndef COM_NO_WINDOWS_H +#include +#include +#endif + +#ifndef __widl_tab__ +#define __widl_tab__ + +/* Forward declarations */ + +#ifndef __XAudio20_FWD_DEFINED__ +#define __XAudio20_FWD_DEFINED__ +#ifdef __cplusplus +typedef class XAudio20 XAudio20; +#else +typedef struct XAudio20 XAudio20; +#endif /* defined __cplusplus */ +#endif /* defined __XAudio20_FWD_DEFINED__ */ + +#ifndef __XAudio21_FWD_DEFINED__ +#define __XAudio21_FWD_DEFINED__ +#ifdef __cplusplus +typedef class XAudio21 XAudio21; +#else +typedef struct XAudio21 XAudio21; +#endif /* defined __cplusplus */ +#endif /* defined __XAudio21_FWD_DEFINED__ */ + +#ifndef __XAudio22_FWD_DEFINED__ +#define __XAudio22_FWD_DEFINED__ +#ifdef __cplusplus +typedef class XAudio22 XAudio22; +#else +typedef struct XAudio22 XAudio22; +#endif /* defined __cplusplus */ +#endif /* defined __XAudio22_FWD_DEFINED__ */ + +#ifndef __XAudio23_FWD_DEFINED__ +#define __XAudio23_FWD_DEFINED__ +#ifdef __cplusplus +typedef class XAudio23 XAudio23; +#else +typedef struct XAudio23 XAudio23; +#endif /* defined __cplusplus */ +#endif /* defined __XAudio23_FWD_DEFINED__ */ + +#ifndef __XAudio24_FWD_DEFINED__ +#define __XAudio24_FWD_DEFINED__ +#ifdef __cplusplus +typedef class XAudio24 XAudio24; +#else +typedef struct XAudio24 XAudio24; +#endif /* defined __cplusplus */ +#endif /* defined __XAudio24_FWD_DEFINED__ */ + +#ifndef __XAudio25_FWD_DEFINED__ +#define __XAudio25_FWD_DEFINED__ +#ifdef __cplusplus +typedef class XAudio25 XAudio25; +#else +typedef struct XAudio25 XAudio25; +#endif /* defined __cplusplus */ +#endif /* defined __XAudio25_FWD_DEFINED__ */ + +#ifndef __XAudio26_FWD_DEFINED__ +#define __XAudio26_FWD_DEFINED__ +#ifdef __cplusplus +typedef class XAudio26 XAudio26; +#else +typedef struct XAudio26 XAudio26; +#endif /* defined __cplusplus */ +#endif /* defined __XAudio26_FWD_DEFINED__ */ + +#ifndef __XAudio27_FWD_DEFINED__ +#define __XAudio27_FWD_DEFINED__ +#ifdef __cplusplus +typedef class XAudio27 XAudio27; +#else +typedef struct XAudio27 XAudio27; +#endif /* defined __cplusplus */ +#endif /* defined __XAudio27_FWD_DEFINED__ */ + +#ifndef __XAudio2Debug_FWD_DEFINED__ +#define __XAudio2Debug_FWD_DEFINED__ +#ifdef __cplusplus +typedef class XAudio2Debug XAudio2Debug; +#else +typedef struct XAudio2Debug XAudio2Debug; +#endif /* defined __cplusplus */ +#endif /* defined __XAudio2Debug_FWD_DEFINED__ */ + +#ifndef __IXAudio2EngineCallback_FWD_DEFINED__ +#define __IXAudio2EngineCallback_FWD_DEFINED__ +typedef interface IXAudio2EngineCallback IXAudio2EngineCallback; +#endif + +#ifndef __IXAudio20Voice_FWD_DEFINED__ +#define __IXAudio20Voice_FWD_DEFINED__ +typedef interface IXAudio20Voice IXAudio20Voice; +#endif + +#ifndef __IXAudio23Voice_FWD_DEFINED__ +#define __IXAudio23Voice_FWD_DEFINED__ +typedef interface IXAudio23Voice IXAudio23Voice; +#endif + +#ifndef __IXAudio2Voice_FWD_DEFINED__ +#define __IXAudio2Voice_FWD_DEFINED__ +typedef interface IXAudio2Voice IXAudio2Voice; +#endif + +#ifndef __IXAudio20SourceVoice_FWD_DEFINED__ +#define __IXAudio20SourceVoice_FWD_DEFINED__ +typedef interface IXAudio20SourceVoice IXAudio20SourceVoice; +#endif + +#ifndef __IXAudio23SourceVoice_FWD_DEFINED__ +#define __IXAudio23SourceVoice_FWD_DEFINED__ +typedef interface IXAudio23SourceVoice IXAudio23SourceVoice; +#endif + +#ifndef __IXAudio27SourceVoice_FWD_DEFINED__ +#define __IXAudio27SourceVoice_FWD_DEFINED__ +typedef interface IXAudio27SourceVoice IXAudio27SourceVoice; +#endif + +#ifndef __IXAudio2SourceVoice_FWD_DEFINED__ +#define __IXAudio2SourceVoice_FWD_DEFINED__ +typedef interface IXAudio2SourceVoice IXAudio2SourceVoice; +#endif + +#ifndef __IXAudio20SubmixVoice_FWD_DEFINED__ +#define __IXAudio20SubmixVoice_FWD_DEFINED__ +typedef interface IXAudio20SubmixVoice IXAudio20SubmixVoice; +#endif + +#ifndef __IXAudio23SubmixVoice_FWD_DEFINED__ +#define __IXAudio23SubmixVoice_FWD_DEFINED__ +typedef interface IXAudio23SubmixVoice IXAudio23SubmixVoice; +#endif + +#ifndef __IXAudio2SubmixVoice_FWD_DEFINED__ +#define __IXAudio2SubmixVoice_FWD_DEFINED__ +typedef interface IXAudio2SubmixVoice IXAudio2SubmixVoice; +#endif + +#ifndef __IXAudio20MasteringVoice_FWD_DEFINED__ +#define __IXAudio20MasteringVoice_FWD_DEFINED__ +typedef interface IXAudio20MasteringVoice IXAudio20MasteringVoice; +#endif + +#ifndef __IXAudio23MasteringVoice_FWD_DEFINED__ +#define __IXAudio23MasteringVoice_FWD_DEFINED__ +typedef interface IXAudio23MasteringVoice IXAudio23MasteringVoice; +#endif + +#ifndef __IXAudio2MasteringVoice_FWD_DEFINED__ +#define __IXAudio2MasteringVoice_FWD_DEFINED__ +typedef interface IXAudio2MasteringVoice IXAudio2MasteringVoice; +#endif + +#ifndef __IXAudio20VoiceCallback_FWD_DEFINED__ +#define __IXAudio20VoiceCallback_FWD_DEFINED__ +typedef interface IXAudio20VoiceCallback IXAudio20VoiceCallback; +#endif + +#ifndef __IXAudio2VoiceCallback_FWD_DEFINED__ +#define __IXAudio2VoiceCallback_FWD_DEFINED__ +typedef interface IXAudio2VoiceCallback IXAudio2VoiceCallback; +#endif + +#ifndef __IXAudio20_FWD_DEFINED__ +#define __IXAudio20_FWD_DEFINED__ +typedef interface IXAudio20 IXAudio20; +#endif + +#ifndef __IXAudio22_FWD_DEFINED__ +#define __IXAudio22_FWD_DEFINED__ +typedef interface IXAudio22 IXAudio22; +#endif + +#ifndef __IXAudio27_FWD_DEFINED__ +#define __IXAudio27_FWD_DEFINED__ +typedef interface IXAudio27 IXAudio27; +#endif + +#ifndef __IXAudio2_FWD_DEFINED__ +#define __IXAudio2_FWD_DEFINED__ +typedef interface IXAudio2 IXAudio2; +#endif + +/* Headers for imported files */ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#include +/***************************************************************************** + * XAudio20 coclass + */ + +DEFINE_GUID(CLSID_XAudio20, 0xfac23f48, 0x31f5, 0x45a8, 0xb4,0x9b, 0x52,0x25,0xd6,0x14,0x01,0xaa); + +#ifdef __cplusplus +class DECLSPEC_UUID("fac23f48-31f5-45a8-b49b-5225d61401aa") XAudio20; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(XAudio20, 0xfac23f48, 0x31f5, 0x45a8, 0xb4,0x9b, 0x52,0x25,0xd6,0x14,0x01,0xaa) +#endif +#endif + +/***************************************************************************** + * XAudio21 coclass + */ + +DEFINE_GUID(CLSID_XAudio21, 0xe21a7345, 0xeb21, 0x468e, 0xbe,0x50, 0x80,0x4d,0xb9,0x7c,0xf7,0x08); + +#ifdef __cplusplus +class DECLSPEC_UUID("e21a7345-eb21-468e-be50-804db97cf708") XAudio21; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(XAudio21, 0xe21a7345, 0xeb21, 0x468e, 0xbe,0x50, 0x80,0x4d,0xb9,0x7c,0xf7,0x08) +#endif +#endif + +/***************************************************************************** + * XAudio22 coclass + */ + +DEFINE_GUID(CLSID_XAudio22, 0xb802058a, 0x464a, 0x42db, 0xbc,0x10, 0xb6,0x50,0xd6,0xf2,0x58,0x6a); + +#ifdef __cplusplus +class DECLSPEC_UUID("b802058a-464a-42db-bc10-b650d6f2586a") XAudio22; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(XAudio22, 0xb802058a, 0x464a, 0x42db, 0xbc,0x10, 0xb6,0x50,0xd6,0xf2,0x58,0x6a) +#endif +#endif + +/***************************************************************************** + * XAudio23 coclass + */ + +DEFINE_GUID(CLSID_XAudio23, 0x4c5e637a, 0x16c7, 0x4de3, 0x9c,0x46, 0x5e,0xd2,0x21,0x81,0x96,0x2d); + +#ifdef __cplusplus +class DECLSPEC_UUID("4c5e637a-16c7-4de3-9c46-5ed22181962d") XAudio23; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(XAudio23, 0x4c5e637a, 0x16c7, 0x4de3, 0x9c,0x46, 0x5e,0xd2,0x21,0x81,0x96,0x2d) +#endif +#endif + +/***************************************************************************** + * XAudio24 coclass + */ + +DEFINE_GUID(CLSID_XAudio24, 0x03219e78, 0x5bc3, 0x44d1, 0xb9,0x2e, 0xf6,0x3d,0x89,0xcc,0x65,0x26); + +#ifdef __cplusplus +class DECLSPEC_UUID("03219e78-5bc3-44d1-b92e-f63d89cc6526") XAudio24; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(XAudio24, 0x03219e78, 0x5bc3, 0x44d1, 0xb9,0x2e, 0xf6,0x3d,0x89,0xcc,0x65,0x26) +#endif +#endif + +/***************************************************************************** + * XAudio25 coclass + */ + +DEFINE_GUID(CLSID_XAudio25, 0x4c9b6dde, 0x6809, 0x46e6, 0xa2,0x78, 0x9b,0x6a,0x97,0x58,0x86,0x70); + +#ifdef __cplusplus +class DECLSPEC_UUID("4c9b6dde-6809-46e6-a278-9b6a97588670") XAudio25; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(XAudio25, 0x4c9b6dde, 0x6809, 0x46e6, 0xa2,0x78, 0x9b,0x6a,0x97,0x58,0x86,0x70) +#endif +#endif + +/***************************************************************************** + * XAudio26 coclass + */ + +DEFINE_GUID(CLSID_XAudio26, 0x3eda9b49, 0x2085, 0x498b, 0x9b,0xb2, 0x39,0xa6,0x77,0x84,0x93,0xde); + +#ifdef __cplusplus +class DECLSPEC_UUID("3eda9b49-2085-498b-9bb2-39a6778493de") XAudio26; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(XAudio26, 0x3eda9b49, 0x2085, 0x498b, 0x9b,0xb2, 0x39,0xa6,0x77,0x84,0x93,0xde) +#endif +#endif + +/***************************************************************************** + * XAudio27 coclass + */ + +DEFINE_GUID(CLSID_XAudio27, 0x5a508685, 0xa254, 0x4fba, 0x9b,0x82, 0x9a,0x24,0xb0,0x03,0x06,0xaf); + +#ifdef __cplusplus +class DECLSPEC_UUID("5a508685-a254-4fba-9b82-9a24b00306af") XAudio27; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(XAudio27, 0x5a508685, 0xa254, 0x4fba, 0x9b,0x82, 0x9a,0x24,0xb0,0x03,0x06,0xaf) +#endif +#endif + +/***************************************************************************** + * XAudio2Debug coclass + */ + +DEFINE_GUID(CLSID_XAudio2Debug, 0xdb05ea35, 0x0329, 0x4d4b, 0xa5,0x3a, 0x6d,0xea,0xd0,0x3d,0x38,0x52); + +#ifdef __cplusplus +class DECLSPEC_UUID("db05ea35-0329-4d4b-a53a-6dead03d3852") XAudio2Debug; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(XAudio2Debug, 0xdb05ea35, 0x0329, 0x4d4b, 0xa5,0x3a, 0x6d,0xea,0xd0,0x3d,0x38,0x52) +#endif +#endif + +#if 0 +typedef struct WAVEFORMATEX { + WORD wFormatTag; + WORD nChannels; + DWORD nSamplesPerSec; + DWORD nAvgBytesPerSec; + WORD nBlockAlign; + WORD wBitsPerSample; + WORD cbSize; +} WAVEFORMATEX; +typedef struct __WIDL_xaudio2_generated_name_00000013 { + WAVEFORMATEX Format; + union { + WORD wValidBitsPerSample; + WORD wSamplesPerBlock; + WORD wReserved; + } Samples; + DWORD dwChannelMask; + GUID SubFormat; +} WAVEFORMATEXTENSIBLE; +typedef struct __WIDL_xaudio2_generated_name_00000013 *PWAVEFORMATEXTENSIBLE; +#else +#include +#endif +#ifndef __IXAudio2Voice_FWD_DEFINED__ +#define __IXAudio2Voice_FWD_DEFINED__ +typedef interface IXAudio2Voice IXAudio2Voice; +#endif + +typedef enum XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER { + Processor1 = 0x1, + Processor2 = 0x2, + Processor3 = 0x4, + Processor4 = 0x8, + Processor5 = 0x10, + Processor6 = 0x20, + Processor7 = 0x40, + Processor8 = 0x80, + Processor9 = 0x100, + Processor10 = 0x200, + Processor11 = 0x400, + Processor12 = 0x800, + Processor13 = 0x1000, + Processor14 = 0x2000, + Processor15 = 0x4000, + Processor16 = 0x8000, + Processor17 = 0x10000, + Processor18 = 0x20000, + Processor19 = 0x40000, + Processor20 = 0x80000, + Processor21 = 0x100000, + Processor22 = 0x200000, + Processor23 = 0x400000, + Processor24 = 0x800000, + Processor25 = 0x1000000, + Processor26 = 0x2000000, + Processor27 = 0x4000000, + Processor28 = 0x8000000, + Processor29 = 0x10000000, + Processor30 = 0x20000000, + Processor31 = 0x40000000, + Processor32 = 0x80000000, + XAUDIO2_ANY_PROCESSOR = 0xffffffff, + XAUDIO2_DEFAULT_PROCESSOR = XAUDIO2_ANY_PROCESSOR +} XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER; +typedef enum XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER XAUDIO2_PROCESSOR; +typedef struct XAUDIO2_PERFORMANCE_DATA { + UINT64 AudioCyclesSinceLastQuery; + UINT64 TotalCyclesSinceLastQuery; + UINT32 MinimumCyclesPerQuantum; + UINT32 MaximumCyclesPerQuantum; + UINT32 MemoryUsageInBytes; + UINT32 CurrentLatencyInSamples; + UINT32 GlitchesSinceEngineStarted; + UINT32 ActiveSourceVoiceCount; + UINT32 TotalSourceVoiceCount; + UINT32 ActiveSubmixVoiceCount; + UINT32 ActiveResamplerCount; + UINT32 ActiveMatrixMixCount; + UINT32 ActiveXmaSourceVoices; + UINT32 ActiveXmaStreams; +} XAUDIO2_PERFORMANCE_DATA; +typedef struct XAUDIO22_PERFORMANCE_DATA { + UINT64 AudioCyclesSinceLastQuery; + UINT64 TotalCyclesSinceLastQuery; + UINT32 MinimumCyclesPerQuantum; + UINT32 MaximumCyclesPerQuantum; + UINT32 MemoryUsageInBytes; + UINT32 CurrentLatencyInSamples; + UINT32 GlitchesSinceEngineStarted; + UINT32 ActiveSourceVoiceCount; + UINT32 TotalSourceVoiceCount; + UINT32 ActiveSubmixVoiceCount; + UINT32 TotalSubmixVoiceCount; + UINT32 ActiveXmaSourceVoices; + UINT32 ActiveXmaStreams; +} XAUDIO22_PERFORMANCE_DATA; +typedef struct XAUDIO20_PERFORMANCE_DATA { + UINT64 AudioCyclesSinceLastQuery; + UINT64 TotalCyclesSinceLastQuery; + UINT32 MinimumCyclesPerQuantum; + UINT32 MaximumCyclesPerQuantum; + UINT32 MemoryUsageInBytes; + UINT32 CurrentLatencyInSamples; + UINT32 GlitchesSinceLastQuery; + UINT32 ActiveSourceVoiceCount; + UINT32 TotalSourceVoiceCount; + UINT32 ActiveSubmixVoiceCount; + UINT32 TotalSubmixVoiceCount; + UINT32 ActiveXmaSourceVoices; + UINT32 ActiveXmaStreams; +} XAUDIO20_PERFORMANCE_DATA; +typedef enum XAUDIO2_DEVICE_ROLE { + NotDefaultDevice = 0x0, + DefaultConsoleDevice = 0x1, + DefaultMultimediaDevice = 0x2, + DefaultCommunicationsDevice = 0x4, + DefaultGameDevice = 0x8, + GlobalDefaultDevice = 0xf, + InvalidDeviceRole = ~GlobalDefaultDevice +} XAUDIO2_DEVICE_ROLE; +typedef struct XAUDIO2_DEVICE_DETAILS { + WCHAR DeviceID[256]; + WCHAR DisplayName[256]; + XAUDIO2_DEVICE_ROLE Role; + WAVEFORMATEXTENSIBLE OutputFormat; +} XAUDIO2_DEVICE_DETAILS; +typedef struct XAUDIO2_VOICE_DETAILS { + UINT32 CreationFlags; + UINT32 InputChannels; + UINT32 InputSampleRate; +} XAUDIO2_VOICE_DETAILS; +typedef struct XAUDIO2_SEND_DESCRIPTOR { + UINT32 Flags; + IXAudio2Voice *pOutputVoice; +} XAUDIO2_SEND_DESCRIPTOR; +typedef struct XAUDIO23_VOICE_SENDS { + UINT32 OutputCount; + IXAudio2Voice **pOutputVoices; +} XAUDIO23_VOICE_SENDS; +typedef struct XAUDIO2_VOICE_SENDS { + UINT32 SendCount; + XAUDIO2_SEND_DESCRIPTOR *pSends; +} XAUDIO2_VOICE_SENDS; +typedef struct XAUDIO2_EFFECT_DESCRIPTOR { + IUnknown *pEffect; + BOOL InitialState; + UINT32 OutputChannels; +} XAUDIO2_EFFECT_DESCRIPTOR; +typedef struct XAUDIO2_EFFECT_CHAIN { + UINT32 EffectCount; + XAUDIO2_EFFECT_DESCRIPTOR *pEffectDescriptors; +} XAUDIO2_EFFECT_CHAIN; +#define XAUDIO2_MAX_BUFFER_BYTES (0x80000000) + +#define XAUDIO2_MAX_QUEUED_BUFFERS (64) + +#define XAUDIO2_MAX_BUFFERS_SYSTEM (2) + +#define XAUDIO2_MAX_AUDIO_CHANNELS (64) + +#define XAUDIO2_MIN_SAMPLE_RATE (1000) + +#define XAUDIO2_MAX_SAMPLE_RATE (200000) + +#define XAUDIO2_MAX_VOLUME_LEVEL (16777216.0000000) + +#define XAUDIO2_MIN_FREQ_RATIO (1 / 1024.00000000000) + +#define XAUDIO2_MAX_FREQ_RATIO (1024.00000000000) + +#define XAUDIO2_DEFAULT_FREQ_RATIO (2.00000000000000) + +#define XAUDIO2_MAX_FILTER_ONEOVERQ (1.50000000000000) + +#define XAUDIO2_MAX_FILTER_FREQUENCY (1.00000000000000) + +#define XAUDIO2_MAX_LOOP_COUNT (254) + +#define XAUDIO20_MAX_LOOP_COUNT (0x100000) + +#define XAUDIO2_COMMIT_NOW (0) + +#define XAUDIO2_COMMIT_ALL (0) + +#define XAUDIO2_INVALID_OPSET (0xffffffff) + +#define XAUDIO2_NO_LOOP_REGION (0) + +#define XAUDIO2_LOOP_INFINITE (255) + +#define XAUDIO20_LOOP_INFINITE ((UINT)-1) + +#define XAUDIO2_DEFAULT_CHANNELS (0) + +#define XAUDIO2_DEFAULT_SAMPLERATE (0) + +/***************************************************************************** + * IXAudio2EngineCallback interface + */ +#ifndef __IXAudio2EngineCallback_INTERFACE_DEFINED__ +#define __IXAudio2EngineCallback_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio2EngineCallback +{ + BEGIN_INTERFACE + + virtual void STDMETHODCALLTYPE OnProcessingPassStart( + ) = 0; + + virtual void STDMETHODCALLTYPE OnProcessingPassEnd( + ) = 0; + + virtual void STDMETHODCALLTYPE OnCriticalError( + HRESULT Error) = 0; + + END_INTERFACE +}; +#else +typedef struct IXAudio2EngineCallbackVtbl { + BEGIN_INTERFACE + + /*** IXAudio2EngineCallback methods ***/ + void (STDMETHODCALLTYPE *OnProcessingPassStart)( + IXAudio2EngineCallback* This); + + void (STDMETHODCALLTYPE *OnProcessingPassEnd)( + IXAudio2EngineCallback* This); + + void (STDMETHODCALLTYPE *OnCriticalError)( + IXAudio2EngineCallback* This, + HRESULT Error); + + END_INTERFACE +} IXAudio2EngineCallbackVtbl; +interface IXAudio2EngineCallback { + CONST_VTBL IXAudio2EngineCallbackVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio2EngineCallback methods ***/ +#define IXAudio2EngineCallback_OnProcessingPassStart(This) (This)->lpVtbl->OnProcessingPassStart(This) +#define IXAudio2EngineCallback_OnProcessingPassEnd(This) (This)->lpVtbl->OnProcessingPassEnd(This) +#define IXAudio2EngineCallback_OnCriticalError(This,Error) (This)->lpVtbl->OnCriticalError(This,Error) +#else +/*** IXAudio2EngineCallback methods ***/ +static FORCEINLINE void IXAudio2EngineCallback_OnProcessingPassStart(IXAudio2EngineCallback* This) { + This->lpVtbl->OnProcessingPassStart(This); +} +static FORCEINLINE void IXAudio2EngineCallback_OnProcessingPassEnd(IXAudio2EngineCallback* This) { + This->lpVtbl->OnProcessingPassEnd(This); +} +static FORCEINLINE void IXAudio2EngineCallback_OnCriticalError(IXAudio2EngineCallback* This,HRESULT Error) { + This->lpVtbl->OnCriticalError(This,Error); +} +#endif +#endif + +#endif + +void STDMETHODCALLTYPE IXAudio2EngineCallback_OnProcessingPassStart_Proxy( + IXAudio2EngineCallback* This); +void __RPC_STUB IXAudio2EngineCallback_OnProcessingPassStart_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2EngineCallback_OnProcessingPassEnd_Proxy( + IXAudio2EngineCallback* This); +void __RPC_STUB IXAudio2EngineCallback_OnProcessingPassEnd_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2EngineCallback_OnCriticalError_Proxy( + IXAudio2EngineCallback* This, + HRESULT Error); +void __RPC_STUB IXAudio2EngineCallback_OnCriticalError_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio2EngineCallback_INTERFACE_DEFINED__ */ + +typedef enum XAUDIO2_FILTER_TYPE { + LowPassFilter = 0, + BandPassFilter = 1, + HighPassFilter = 2, + NotchFilter = 3 +} XAUDIO2_FILTER_TYPE; +typedef struct XAUDIO2_FILTER_PARAMETERS { + XAUDIO2_FILTER_TYPE Type; + float Frequency; + float OneOverQ; +} XAUDIO2_FILTER_PARAMETERS; +/***************************************************************************** + * IXAudio20Voice interface + */ +#ifndef __IXAudio20Voice_INTERFACE_DEFINED__ +#define __IXAudio20Voice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio20Voice +{ + BEGIN_INTERFACE + + virtual void STDMETHODCALLTYPE GetVoiceDetails( + XAUDIO2_VOICE_DETAILS *pVoiceDetails) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOutputVoices( + const XAUDIO23_VOICE_SENDS *pSendList) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEffectChain( + const XAUDIO2_EFFECT_CHAIN *pEffectChain) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnableEffect( + UINT32 EffectIndex, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE DisableEffect( + UINT32 EffectIndex, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetEffectState( + UINT32 EffectIndex, + BOOL *pEnabled) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEffectParameters( + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEffectParameters( + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFilterParameters( + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetFilterParameters( + XAUDIO2_FILTER_PARAMETERS *pParameters) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetVolume( + float Volume, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetVolume( + float *pVolume) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetChannelVolumes( + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetChannelVolumes( + UINT32 Channels, + float *pVolumes) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOutputMatrix( + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOutputMatrix( + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix) = 0; + + virtual void STDMETHODCALLTYPE DestroyVoice( + ) = 0; + + END_INTERFACE +}; +#else +typedef struct IXAudio20VoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio20Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio20Voice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio20Voice* This, + const XAUDIO23_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio20Voice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio20Voice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio20Voice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio20Voice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio20Voice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio20Voice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio20Voice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio20Voice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio20Voice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio20Voice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio20Voice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio20Voice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio20Voice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio20Voice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio20Voice* This); + + END_INTERFACE +} IXAudio20VoiceVtbl; +interface IXAudio20Voice { + CONST_VTBL IXAudio20VoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio20Voice methods ***/ +#define IXAudio20Voice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio20Voice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio20Voice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio20Voice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio20Voice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio20Voice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio20Voice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio20Voice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio20Voice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio20Voice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio20Voice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio20Voice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio20Voice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio20Voice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio20Voice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio20Voice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio20Voice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +#else +/*** IXAudio20Voice methods ***/ +static FORCEINLINE void IXAudio20Voice_GetVoiceDetails(IXAudio20Voice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio20Voice_SetOutputVoices(IXAudio20Voice* This,const XAUDIO23_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio20Voice_SetEffectChain(IXAudio20Voice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio20Voice_EnableEffect(IXAudio20Voice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20Voice_DisableEffect(IXAudio20Voice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio20Voice_GetEffectState(IXAudio20Voice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio20Voice_SetEffectParameters(IXAudio20Voice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20Voice_GetEffectParameters(IXAudio20Voice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio20Voice_SetFilterParameters(IXAudio20Voice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio20Voice_GetFilterParameters(IXAudio20Voice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio20Voice_SetVolume(IXAudio20Voice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio20Voice_GetVolume(IXAudio20Voice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio20Voice_SetChannelVolumes(IXAudio20Voice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio20Voice_GetChannelVolumes(IXAudio20Voice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio20Voice_SetOutputMatrix(IXAudio20Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20Voice_GetOutputMatrix(IXAudio20Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + return This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio20Voice_DestroyVoice(IXAudio20Voice* This) { + This->lpVtbl->DestroyVoice(This); +} +#endif +#endif + +#endif + +void STDMETHODCALLTYPE IXAudio20Voice_GetVoiceDetails_Proxy( + IXAudio20Voice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); +void __RPC_STUB IXAudio20Voice_GetVoiceDetails_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetOutputVoices_Proxy( + IXAudio20Voice* This, + const XAUDIO23_VOICE_SENDS *pSendList); +void __RPC_STUB IXAudio20Voice_SetOutputVoices_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetEffectChain_Proxy( + IXAudio20Voice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio20Voice_SetEffectChain_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20Voice_EnableEffect_Proxy( + IXAudio20Voice* This, + UINT32 EffectIndex, + UINT32 OperationSet); +void __RPC_STUB IXAudio20Voice_EnableEffect_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20Voice_DisableEffect_Proxy( + IXAudio20Voice* This, + UINT32 EffectIndex, + UINT32 OperationSet); +void __RPC_STUB IXAudio20Voice_DisableEffect_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20Voice_GetEffectState_Proxy( + IXAudio20Voice* This, + UINT32 EffectIndex, + BOOL *pEnabled); +void __RPC_STUB IXAudio20Voice_GetEffectState_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetEffectParameters_Proxy( + IXAudio20Voice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); +void __RPC_STUB IXAudio20Voice_SetEffectParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20Voice_GetEffectParameters_Proxy( + IXAudio20Voice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); +void __RPC_STUB IXAudio20Voice_GetEffectParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetFilterParameters_Proxy( + IXAudio20Voice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); +void __RPC_STUB IXAudio20Voice_SetFilterParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20Voice_GetFilterParameters_Proxy( + IXAudio20Voice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); +void __RPC_STUB IXAudio20Voice_GetFilterParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetVolume_Proxy( + IXAudio20Voice* This, + float Volume, + UINT32 OperationSet); +void __RPC_STUB IXAudio20Voice_SetVolume_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20Voice_GetVolume_Proxy( + IXAudio20Voice* This, + float *pVolume); +void __RPC_STUB IXAudio20Voice_GetVolume_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetChannelVolumes_Proxy( + IXAudio20Voice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); +void __RPC_STUB IXAudio20Voice_SetChannelVolumes_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20Voice_GetChannelVolumes_Proxy( + IXAudio20Voice* This, + UINT32 Channels, + float *pVolumes); +void __RPC_STUB IXAudio20Voice_GetChannelVolumes_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20Voice_SetOutputMatrix_Proxy( + IXAudio20Voice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); +void __RPC_STUB IXAudio20Voice_SetOutputMatrix_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20Voice_GetOutputMatrix_Proxy( + IXAudio20Voice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); +void __RPC_STUB IXAudio20Voice_GetOutputMatrix_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20Voice_DestroyVoice_Proxy( + IXAudio20Voice* This); +void __RPC_STUB IXAudio20Voice_DestroyVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio20Voice_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio23Voice interface + */ +#ifndef __IXAudio23Voice_INTERFACE_DEFINED__ +#define __IXAudio23Voice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio23Voice +{ + BEGIN_INTERFACE + + virtual void STDMETHODCALLTYPE GetVoiceDetails( + XAUDIO2_VOICE_DETAILS *pVoiceDetails) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOutputVoices( + const XAUDIO23_VOICE_SENDS *pSendList) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEffectChain( + const XAUDIO2_EFFECT_CHAIN *pEffectChain) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnableEffect( + UINT32 EffectIndex, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE DisableEffect( + UINT32 EffectIndex, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetEffectState( + UINT32 EffectIndex, + BOOL *pEnabled) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEffectParameters( + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEffectParameters( + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFilterParameters( + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetFilterParameters( + XAUDIO2_FILTER_PARAMETERS *pParameters) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetVolume( + float Volume, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetVolume( + float *pVolume) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetChannelVolumes( + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetChannelVolumes( + UINT32 Channels, + float *pVolumes) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOutputMatrix( + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetOutputMatrix( + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix) = 0; + + virtual void STDMETHODCALLTYPE DestroyVoice( + ) = 0; + + END_INTERFACE +}; +#else +typedef struct IXAudio23VoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio23Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio23Voice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio23Voice* This, + const XAUDIO23_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio23Voice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio23Voice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio23Voice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio23Voice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio23Voice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio23Voice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio23Voice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio23Voice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio23Voice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio23Voice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio23Voice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio23Voice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio23Voice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio23Voice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio23Voice* This); + + END_INTERFACE +} IXAudio23VoiceVtbl; +interface IXAudio23Voice { + CONST_VTBL IXAudio23VoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio23Voice methods ***/ +#define IXAudio23Voice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio23Voice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio23Voice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio23Voice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio23Voice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio23Voice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio23Voice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio23Voice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio23Voice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio23Voice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio23Voice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio23Voice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio23Voice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio23Voice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio23Voice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio23Voice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio23Voice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +#else +/*** IXAudio23Voice methods ***/ +static FORCEINLINE void IXAudio23Voice_GetVoiceDetails(IXAudio23Voice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio23Voice_SetOutputVoices(IXAudio23Voice* This,const XAUDIO23_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio23Voice_SetEffectChain(IXAudio23Voice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio23Voice_EnableEffect(IXAudio23Voice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio23Voice_DisableEffect(IXAudio23Voice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio23Voice_GetEffectState(IXAudio23Voice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio23Voice_SetEffectParameters(IXAudio23Voice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio23Voice_GetEffectParameters(IXAudio23Voice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio23Voice_SetFilterParameters(IXAudio23Voice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio23Voice_GetFilterParameters(IXAudio23Voice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio23Voice_SetVolume(IXAudio23Voice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio23Voice_GetVolume(IXAudio23Voice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio23Voice_SetChannelVolumes(IXAudio23Voice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio23Voice_GetChannelVolumes(IXAudio23Voice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio23Voice_SetOutputMatrix(IXAudio23Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE void IXAudio23Voice_GetOutputMatrix(IXAudio23Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio23Voice_DestroyVoice(IXAudio23Voice* This) { + This->lpVtbl->DestroyVoice(This); +} +#endif +#endif + +#endif + +void STDMETHODCALLTYPE IXAudio23Voice_GetVoiceDetails_Proxy( + IXAudio23Voice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); +void __RPC_STUB IXAudio23Voice_GetVoiceDetails_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetOutputVoices_Proxy( + IXAudio23Voice* This, + const XAUDIO23_VOICE_SENDS *pSendList); +void __RPC_STUB IXAudio23Voice_SetOutputVoices_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetEffectChain_Proxy( + IXAudio23Voice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio23Voice_SetEffectChain_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23Voice_EnableEffect_Proxy( + IXAudio23Voice* This, + UINT32 EffectIndex, + UINT32 OperationSet); +void __RPC_STUB IXAudio23Voice_EnableEffect_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23Voice_DisableEffect_Proxy( + IXAudio23Voice* This, + UINT32 EffectIndex, + UINT32 OperationSet); +void __RPC_STUB IXAudio23Voice_DisableEffect_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio23Voice_GetEffectState_Proxy( + IXAudio23Voice* This, + UINT32 EffectIndex, + BOOL *pEnabled); +void __RPC_STUB IXAudio23Voice_GetEffectState_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetEffectParameters_Proxy( + IXAudio23Voice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); +void __RPC_STUB IXAudio23Voice_SetEffectParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23Voice_GetEffectParameters_Proxy( + IXAudio23Voice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); +void __RPC_STUB IXAudio23Voice_GetEffectParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetFilterParameters_Proxy( + IXAudio23Voice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); +void __RPC_STUB IXAudio23Voice_SetFilterParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio23Voice_GetFilterParameters_Proxy( + IXAudio23Voice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); +void __RPC_STUB IXAudio23Voice_GetFilterParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetVolume_Proxy( + IXAudio23Voice* This, + float Volume, + UINT32 OperationSet); +void __RPC_STUB IXAudio23Voice_SetVolume_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio23Voice_GetVolume_Proxy( + IXAudio23Voice* This, + float *pVolume); +void __RPC_STUB IXAudio23Voice_GetVolume_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetChannelVolumes_Proxy( + IXAudio23Voice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); +void __RPC_STUB IXAudio23Voice_SetChannelVolumes_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio23Voice_GetChannelVolumes_Proxy( + IXAudio23Voice* This, + UINT32 Channels, + float *pVolumes); +void __RPC_STUB IXAudio23Voice_GetChannelVolumes_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23Voice_SetOutputMatrix_Proxy( + IXAudio23Voice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); +void __RPC_STUB IXAudio23Voice_SetOutputMatrix_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio23Voice_GetOutputMatrix_Proxy( + IXAudio23Voice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); +void __RPC_STUB IXAudio23Voice_GetOutputMatrix_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio23Voice_DestroyVoice_Proxy( + IXAudio23Voice* This); +void __RPC_STUB IXAudio23Voice_DestroyVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio23Voice_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio2Voice interface + */ +#ifndef __IXAudio2Voice_INTERFACE_DEFINED__ +#define __IXAudio2Voice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio2Voice +{ + BEGIN_INTERFACE + + virtual void STDMETHODCALLTYPE GetVoiceDetails( + XAUDIO2_VOICE_DETAILS *pVoiceDetails) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOutputVoices( + const XAUDIO2_VOICE_SENDS *pSendList) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEffectChain( + const XAUDIO2_EFFECT_CHAIN *pEffectChain) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnableEffect( + UINT32 EffectIndex, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE DisableEffect( + UINT32 EffectIndex, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetEffectState( + UINT32 EffectIndex, + BOOL *pEnabled) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEffectParameters( + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEffectParameters( + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFilterParameters( + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetFilterParameters( + XAUDIO2_FILTER_PARAMETERS *pParameters) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOutputFilterParameters( + IXAudio2Voice *pDestinationVoice, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetOutputFilterParameters( + IXAudio2Voice *pDestinationVoice, + XAUDIO2_FILTER_PARAMETERS *pParameters) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetVolume( + float Volume, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetVolume( + float *pVolume) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetChannelVolumes( + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetChannelVolumes( + UINT32 Channels, + float *pVolumes) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOutputMatrix( + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetOutputMatrix( + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix) = 0; + + virtual void STDMETHODCALLTYPE DestroyVoice( + ) = 0; + + END_INTERFACE +}; +#else +typedef struct IXAudio2VoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio2Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio2Voice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio2Voice* This, + const XAUDIO2_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio2Voice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio2Voice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio2Voice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio2Voice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio2Voice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio2Voice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio2Voice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio2Voice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)( + IXAudio2Voice* This, + IXAudio2Voice *pDestinationVoice, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputFilterParameters)( + IXAudio2Voice* This, + IXAudio2Voice *pDestinationVoice, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio2Voice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio2Voice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio2Voice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio2Voice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio2Voice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio2Voice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio2Voice* This); + + END_INTERFACE +} IXAudio2VoiceVtbl; +interface IXAudio2Voice { + CONST_VTBL IXAudio2VoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio2Voice methods ***/ +#define IXAudio2Voice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio2Voice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio2Voice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio2Voice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio2Voice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio2Voice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio2Voice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio2Voice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio2Voice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio2Voice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio2Voice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) +#define IXAudio2Voice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters) +#define IXAudio2Voice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio2Voice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio2Voice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio2Voice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio2Voice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio2Voice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio2Voice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +#else +/*** IXAudio2Voice methods ***/ +static FORCEINLINE void IXAudio2Voice_GetVoiceDetails(IXAudio2Voice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio2Voice_SetOutputVoices(IXAudio2Voice* This,const XAUDIO2_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio2Voice_SetEffectChain(IXAudio2Voice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio2Voice_EnableEffect(IXAudio2Voice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio2Voice_DisableEffect(IXAudio2Voice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio2Voice_GetEffectState(IXAudio2Voice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio2Voice_SetEffectParameters(IXAudio2Voice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio2Voice_GetEffectParameters(IXAudio2Voice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio2Voice_SetFilterParameters(IXAudio2Voice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio2Voice_GetFilterParameters(IXAudio2Voice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio2Voice_SetOutputFilterParameters(IXAudio2Voice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio2Voice_GetOutputFilterParameters(IXAudio2Voice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters); +} +static FORCEINLINE HRESULT IXAudio2Voice_SetVolume(IXAudio2Voice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio2Voice_GetVolume(IXAudio2Voice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio2Voice_SetChannelVolumes(IXAudio2Voice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio2Voice_GetChannelVolumes(IXAudio2Voice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio2Voice_SetOutputMatrix(IXAudio2Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE void IXAudio2Voice_GetOutputMatrix(IXAudio2Voice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio2Voice_DestroyVoice(IXAudio2Voice* This) { + This->lpVtbl->DestroyVoice(This); +} +#endif +#endif + +#endif + +void STDMETHODCALLTYPE IXAudio2Voice_GetVoiceDetails_Proxy( + IXAudio2Voice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); +void __RPC_STUB IXAudio2Voice_GetVoiceDetails_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetOutputVoices_Proxy( + IXAudio2Voice* This, + const XAUDIO2_VOICE_SENDS *pSendList); +void __RPC_STUB IXAudio2Voice_SetOutputVoices_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetEffectChain_Proxy( + IXAudio2Voice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio2Voice_SetEffectChain_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2Voice_EnableEffect_Proxy( + IXAudio2Voice* This, + UINT32 EffectIndex, + UINT32 OperationSet); +void __RPC_STUB IXAudio2Voice_EnableEffect_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2Voice_DisableEffect_Proxy( + IXAudio2Voice* This, + UINT32 EffectIndex, + UINT32 OperationSet); +void __RPC_STUB IXAudio2Voice_DisableEffect_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2Voice_GetEffectState_Proxy( + IXAudio2Voice* This, + UINT32 EffectIndex, + BOOL *pEnabled); +void __RPC_STUB IXAudio2Voice_GetEffectState_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetEffectParameters_Proxy( + IXAudio2Voice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); +void __RPC_STUB IXAudio2Voice_SetEffectParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2Voice_GetEffectParameters_Proxy( + IXAudio2Voice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); +void __RPC_STUB IXAudio2Voice_GetEffectParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetFilterParameters_Proxy( + IXAudio2Voice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); +void __RPC_STUB IXAudio2Voice_SetFilterParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2Voice_GetFilterParameters_Proxy( + IXAudio2Voice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); +void __RPC_STUB IXAudio2Voice_GetFilterParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetOutputFilterParameters_Proxy( + IXAudio2Voice* This, + IXAudio2Voice *pDestinationVoice, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); +void __RPC_STUB IXAudio2Voice_SetOutputFilterParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2Voice_GetOutputFilterParameters_Proxy( + IXAudio2Voice* This, + IXAudio2Voice *pDestinationVoice, + XAUDIO2_FILTER_PARAMETERS *pParameters); +void __RPC_STUB IXAudio2Voice_GetOutputFilterParameters_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetVolume_Proxy( + IXAudio2Voice* This, + float Volume, + UINT32 OperationSet); +void __RPC_STUB IXAudio2Voice_SetVolume_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2Voice_GetVolume_Proxy( + IXAudio2Voice* This, + float *pVolume); +void __RPC_STUB IXAudio2Voice_GetVolume_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetChannelVolumes_Proxy( + IXAudio2Voice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); +void __RPC_STUB IXAudio2Voice_SetChannelVolumes_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2Voice_GetChannelVolumes_Proxy( + IXAudio2Voice* This, + UINT32 Channels, + float *pVolumes); +void __RPC_STUB IXAudio2Voice_GetChannelVolumes_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2Voice_SetOutputMatrix_Proxy( + IXAudio2Voice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); +void __RPC_STUB IXAudio2Voice_SetOutputMatrix_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2Voice_GetOutputMatrix_Proxy( + IXAudio2Voice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); +void __RPC_STUB IXAudio2Voice_GetOutputMatrix_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2Voice_DestroyVoice_Proxy( + IXAudio2Voice* This); +void __RPC_STUB IXAudio2Voice_DestroyVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio2Voice_INTERFACE_DEFINED__ */ + +typedef struct XAUDIO2_BUFFER { + UINT32 Flags; + UINT32 AudioBytes; + const BYTE *pAudioData; + UINT32 PlayBegin; + UINT32 PlayLength; + UINT32 LoopBegin; + UINT32 LoopLength; + UINT32 LoopCount; + void *pContext; +} XAUDIO2_BUFFER; +typedef struct XAUDIO2_BUFFER_WMA { + const UINT32 *pDecodedPacketCumulativeBytes; + UINT32 PacketCount; +} XAUDIO2_BUFFER_WMA; +typedef struct XAUDIO2_VOICE_STATE { + void *pCurrentBufferContext; + UINT32 BuffersQueued; + UINT64 SamplesPlayed; +} XAUDIO2_VOICE_STATE; +/***************************************************************************** + * IXAudio20SourceVoice interface + */ +#ifndef __IXAudio20SourceVoice_INTERFACE_DEFINED__ +#define __IXAudio20SourceVoice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio20SourceVoice : public IXAudio20Voice +{ + virtual HRESULT STDMETHODCALLTYPE Start( + UINT32 Flags = 0, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE Stop( + UINT32 Flags = 0, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE SubmitSourceBuffer( + const XAUDIO2_BUFFER *pBuffer, + const XAUDIO2_BUFFER_WMA *pBufferWMA = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE FlushSourceBuffers( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE Discontinuity( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE ExitLoop( + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetState( + XAUDIO2_VOICE_STATE *pVoiceState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFrequencyRatio( + float Ratio, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetFrequencyRatio( + float *pRatio) = 0; + +}; +#else +typedef struct IXAudio20SourceVoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio20Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio20SourceVoice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio20SourceVoice* This, + const XAUDIO23_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio20SourceVoice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio20SourceVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio20SourceVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio20SourceVoice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio20SourceVoice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio20SourceVoice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio20SourceVoice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio20SourceVoice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio20SourceVoice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio20SourceVoice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio20SourceVoice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio20SourceVoice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio20SourceVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio20SourceVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio20SourceVoice* This); + + /*** IXAudio20SourceVoice methods ***/ + HRESULT (STDMETHODCALLTYPE *Start)( + IXAudio20SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *Stop)( + IXAudio20SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *SubmitSourceBuffer)( + IXAudio20SourceVoice* This, + const XAUDIO2_BUFFER *pBuffer, + const XAUDIO2_BUFFER_WMA *pBufferWMA); + + HRESULT (STDMETHODCALLTYPE *FlushSourceBuffers)( + IXAudio20SourceVoice* This); + + HRESULT (STDMETHODCALLTYPE *Discontinuity)( + IXAudio20SourceVoice* This); + + HRESULT (STDMETHODCALLTYPE *ExitLoop)( + IXAudio20SourceVoice* This, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetState)( + IXAudio20SourceVoice* This, + XAUDIO2_VOICE_STATE *pVoiceState); + + HRESULT (STDMETHODCALLTYPE *SetFrequencyRatio)( + IXAudio20SourceVoice* This, + float Ratio, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFrequencyRatio)( + IXAudio20SourceVoice* This, + float *pRatio); + + END_INTERFACE +} IXAudio20SourceVoiceVtbl; +interface IXAudio20SourceVoice { + CONST_VTBL IXAudio20SourceVoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio20Voice methods ***/ +#define IXAudio20SourceVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio20SourceVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio20SourceVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio20SourceVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio20SourceVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio20SourceVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio20SourceVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio20SourceVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio20SourceVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio20SourceVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio20SourceVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio20SourceVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio20SourceVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio20SourceVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio20SourceVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio20SourceVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio20SourceVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +/*** IXAudio20SourceVoice methods ***/ +#define IXAudio20SourceVoice_Start(This,Flags,OperationSet) (This)->lpVtbl->Start(This,Flags,OperationSet) +#define IXAudio20SourceVoice_Stop(This,Flags,OperationSet) (This)->lpVtbl->Stop(This,Flags,OperationSet) +#define IXAudio20SourceVoice_SubmitSourceBuffer(This,pBuffer,pBufferWMA) (This)->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA) +#define IXAudio20SourceVoice_FlushSourceBuffers(This) (This)->lpVtbl->FlushSourceBuffers(This) +#define IXAudio20SourceVoice_Discontinuity(This) (This)->lpVtbl->Discontinuity(This) +#define IXAudio20SourceVoice_ExitLoop(This,OperationSet) (This)->lpVtbl->ExitLoop(This,OperationSet) +#define IXAudio20SourceVoice_GetState(This,pVoiceState) (This)->lpVtbl->GetState(This,pVoiceState) +#define IXAudio20SourceVoice_SetFrequencyRatio(This,Ratio,OperationSet) (This)->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet) +#define IXAudio20SourceVoice_GetFrequencyRatio(This,pRatio) (This)->lpVtbl->GetFrequencyRatio(This,pRatio) +#else +/*** IXAudio20Voice methods ***/ +static FORCEINLINE void IXAudio20SourceVoice_GetVoiceDetails(IXAudio20SourceVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_SetOutputVoices(IXAudio20SourceVoice* This,const XAUDIO23_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_SetEffectChain(IXAudio20SourceVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_EnableEffect(IXAudio20SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_DisableEffect(IXAudio20SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio20SourceVoice_GetEffectState(IXAudio20SourceVoice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_SetEffectParameters(IXAudio20SourceVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_GetEffectParameters(IXAudio20SourceVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_SetFilterParameters(IXAudio20SourceVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio20SourceVoice_GetFilterParameters(IXAudio20SourceVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_SetVolume(IXAudio20SourceVoice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio20SourceVoice_GetVolume(IXAudio20SourceVoice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_SetChannelVolumes(IXAudio20SourceVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio20SourceVoice_GetChannelVolumes(IXAudio20SourceVoice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_SetOutputMatrix(IXAudio20SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_GetOutputMatrix(IXAudio20SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + return This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio20SourceVoice_DestroyVoice(IXAudio20SourceVoice* This) { + This->lpVtbl->DestroyVoice(This); +} +/*** IXAudio20SourceVoice methods ***/ +static FORCEINLINE HRESULT IXAudio20SourceVoice_Start(IXAudio20SourceVoice* This,UINT32 Flags,UINT32 OperationSet) { + return This->lpVtbl->Start(This,Flags,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_Stop(IXAudio20SourceVoice* This,UINT32 Flags,UINT32 OperationSet) { + return This->lpVtbl->Stop(This,Flags,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_SubmitSourceBuffer(IXAudio20SourceVoice* This,const XAUDIO2_BUFFER *pBuffer,const XAUDIO2_BUFFER_WMA *pBufferWMA) { + return This->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_FlushSourceBuffers(IXAudio20SourceVoice* This) { + return This->lpVtbl->FlushSourceBuffers(This); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_Discontinuity(IXAudio20SourceVoice* This) { + return This->lpVtbl->Discontinuity(This); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_ExitLoop(IXAudio20SourceVoice* This,UINT32 OperationSet) { + return This->lpVtbl->ExitLoop(This,OperationSet); +} +static FORCEINLINE void IXAudio20SourceVoice_GetState(IXAudio20SourceVoice* This,XAUDIO2_VOICE_STATE *pVoiceState) { + This->lpVtbl->GetState(This,pVoiceState); +} +static FORCEINLINE HRESULT IXAudio20SourceVoice_SetFrequencyRatio(IXAudio20SourceVoice* This,float Ratio,UINT32 OperationSet) { + return This->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet); +} +static FORCEINLINE void IXAudio20SourceVoice_GetFrequencyRatio(IXAudio20SourceVoice* This,float *pRatio) { + This->lpVtbl->GetFrequencyRatio(This,pRatio); +} +#endif +#endif + +#endif + +HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_Start_Proxy( + IXAudio20SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); +void __RPC_STUB IXAudio20SourceVoice_Start_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_Stop_Proxy( + IXAudio20SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); +void __RPC_STUB IXAudio20SourceVoice_Stop_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_SubmitSourceBuffer_Proxy( + IXAudio20SourceVoice* This, + const XAUDIO2_BUFFER *pBuffer, + const XAUDIO2_BUFFER_WMA *pBufferWMA); +void __RPC_STUB IXAudio20SourceVoice_SubmitSourceBuffer_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_FlushSourceBuffers_Proxy( + IXAudio20SourceVoice* This); +void __RPC_STUB IXAudio20SourceVoice_FlushSourceBuffers_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_Discontinuity_Proxy( + IXAudio20SourceVoice* This); +void __RPC_STUB IXAudio20SourceVoice_Discontinuity_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_ExitLoop_Proxy( + IXAudio20SourceVoice* This, + UINT32 OperationSet); +void __RPC_STUB IXAudio20SourceVoice_ExitLoop_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20SourceVoice_GetState_Proxy( + IXAudio20SourceVoice* This, + XAUDIO2_VOICE_STATE *pVoiceState); +void __RPC_STUB IXAudio20SourceVoice_GetState_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20SourceVoice_SetFrequencyRatio_Proxy( + IXAudio20SourceVoice* This, + float Ratio, + UINT32 OperationSet); +void __RPC_STUB IXAudio20SourceVoice_SetFrequencyRatio_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20SourceVoice_GetFrequencyRatio_Proxy( + IXAudio20SourceVoice* This, + float *pRatio); +void __RPC_STUB IXAudio20SourceVoice_GetFrequencyRatio_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio20SourceVoice_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio23SourceVoice interface + */ +#ifndef __IXAudio23SourceVoice_INTERFACE_DEFINED__ +#define __IXAudio23SourceVoice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio23SourceVoice : public IXAudio23Voice +{ + virtual HRESULT STDMETHODCALLTYPE Start( + UINT32 Flags = 0, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE Stop( + UINT32 Flags = 0, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE SubmitSourceBuffer( + const XAUDIO2_BUFFER *pBuffer, + const XAUDIO2_BUFFER_WMA *pBufferWMA = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE FlushSourceBuffers( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE Discontinuity( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE ExitLoop( + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetState( + XAUDIO2_VOICE_STATE *pVoiceState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFrequencyRatio( + float Ratio, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetFrequencyRatio( + float *pRatio) = 0; + +}; +#else +typedef struct IXAudio23SourceVoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio23Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio23SourceVoice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio23SourceVoice* This, + const XAUDIO23_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio23SourceVoice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio23SourceVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio23SourceVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio23SourceVoice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio23SourceVoice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio23SourceVoice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio23SourceVoice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio23SourceVoice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio23SourceVoice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio23SourceVoice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio23SourceVoice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio23SourceVoice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio23SourceVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio23SourceVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio23SourceVoice* This); + + /*** IXAudio23SourceVoice methods ***/ + HRESULT (STDMETHODCALLTYPE *Start)( + IXAudio23SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *Stop)( + IXAudio23SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *SubmitSourceBuffer)( + IXAudio23SourceVoice* This, + const XAUDIO2_BUFFER *pBuffer, + const XAUDIO2_BUFFER_WMA *pBufferWMA); + + HRESULT (STDMETHODCALLTYPE *FlushSourceBuffers)( + IXAudio23SourceVoice* This); + + HRESULT (STDMETHODCALLTYPE *Discontinuity)( + IXAudio23SourceVoice* This); + + HRESULT (STDMETHODCALLTYPE *ExitLoop)( + IXAudio23SourceVoice* This, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetState)( + IXAudio23SourceVoice* This, + XAUDIO2_VOICE_STATE *pVoiceState); + + HRESULT (STDMETHODCALLTYPE *SetFrequencyRatio)( + IXAudio23SourceVoice* This, + float Ratio, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFrequencyRatio)( + IXAudio23SourceVoice* This, + float *pRatio); + + END_INTERFACE +} IXAudio23SourceVoiceVtbl; +interface IXAudio23SourceVoice { + CONST_VTBL IXAudio23SourceVoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio23Voice methods ***/ +#define IXAudio23SourceVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio23SourceVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio23SourceVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio23SourceVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio23SourceVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio23SourceVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio23SourceVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio23SourceVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio23SourceVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio23SourceVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio23SourceVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio23SourceVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio23SourceVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio23SourceVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio23SourceVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio23SourceVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio23SourceVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +/*** IXAudio23SourceVoice methods ***/ +#define IXAudio23SourceVoice_Start(This,Flags,OperationSet) (This)->lpVtbl->Start(This,Flags,OperationSet) +#define IXAudio23SourceVoice_Stop(This,Flags,OperationSet) (This)->lpVtbl->Stop(This,Flags,OperationSet) +#define IXAudio23SourceVoice_SubmitSourceBuffer(This,pBuffer,pBufferWMA) (This)->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA) +#define IXAudio23SourceVoice_FlushSourceBuffers(This) (This)->lpVtbl->FlushSourceBuffers(This) +#define IXAudio23SourceVoice_Discontinuity(This) (This)->lpVtbl->Discontinuity(This) +#define IXAudio23SourceVoice_ExitLoop(This,OperationSet) (This)->lpVtbl->ExitLoop(This,OperationSet) +#define IXAudio23SourceVoice_GetState(This,pVoiceState) (This)->lpVtbl->GetState(This,pVoiceState) +#define IXAudio23SourceVoice_SetFrequencyRatio(This,Ratio,OperationSet) (This)->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet) +#define IXAudio23SourceVoice_GetFrequencyRatio(This,pRatio) (This)->lpVtbl->GetFrequencyRatio(This,pRatio) +#else +/*** IXAudio23Voice methods ***/ +static FORCEINLINE void IXAudio23SourceVoice_GetVoiceDetails(IXAudio23SourceVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_SetOutputVoices(IXAudio23SourceVoice* This,const XAUDIO23_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_SetEffectChain(IXAudio23SourceVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_EnableEffect(IXAudio23SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_DisableEffect(IXAudio23SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio23SourceVoice_GetEffectState(IXAudio23SourceVoice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_SetEffectParameters(IXAudio23SourceVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_GetEffectParameters(IXAudio23SourceVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_SetFilterParameters(IXAudio23SourceVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio23SourceVoice_GetFilterParameters(IXAudio23SourceVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_SetVolume(IXAudio23SourceVoice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio23SourceVoice_GetVolume(IXAudio23SourceVoice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_SetChannelVolumes(IXAudio23SourceVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio23SourceVoice_GetChannelVolumes(IXAudio23SourceVoice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_SetOutputMatrix(IXAudio23SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE void IXAudio23SourceVoice_GetOutputMatrix(IXAudio23SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio23SourceVoice_DestroyVoice(IXAudio23SourceVoice* This) { + This->lpVtbl->DestroyVoice(This); +} +/*** IXAudio23SourceVoice methods ***/ +static FORCEINLINE HRESULT IXAudio23SourceVoice_Start(IXAudio23SourceVoice* This,UINT32 Flags,UINT32 OperationSet) { + return This->lpVtbl->Start(This,Flags,OperationSet); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_Stop(IXAudio23SourceVoice* This,UINT32 Flags,UINT32 OperationSet) { + return This->lpVtbl->Stop(This,Flags,OperationSet); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_SubmitSourceBuffer(IXAudio23SourceVoice* This,const XAUDIO2_BUFFER *pBuffer,const XAUDIO2_BUFFER_WMA *pBufferWMA) { + return This->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_FlushSourceBuffers(IXAudio23SourceVoice* This) { + return This->lpVtbl->FlushSourceBuffers(This); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_Discontinuity(IXAudio23SourceVoice* This) { + return This->lpVtbl->Discontinuity(This); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_ExitLoop(IXAudio23SourceVoice* This,UINT32 OperationSet) { + return This->lpVtbl->ExitLoop(This,OperationSet); +} +static FORCEINLINE void IXAudio23SourceVoice_GetState(IXAudio23SourceVoice* This,XAUDIO2_VOICE_STATE *pVoiceState) { + This->lpVtbl->GetState(This,pVoiceState); +} +static FORCEINLINE HRESULT IXAudio23SourceVoice_SetFrequencyRatio(IXAudio23SourceVoice* This,float Ratio,UINT32 OperationSet) { + return This->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet); +} +static FORCEINLINE void IXAudio23SourceVoice_GetFrequencyRatio(IXAudio23SourceVoice* This,float *pRatio) { + This->lpVtbl->GetFrequencyRatio(This,pRatio); +} +#endif +#endif + +#endif + +HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_Start_Proxy( + IXAudio23SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); +void __RPC_STUB IXAudio23SourceVoice_Start_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_Stop_Proxy( + IXAudio23SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); +void __RPC_STUB IXAudio23SourceVoice_Stop_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_SubmitSourceBuffer_Proxy( + IXAudio23SourceVoice* This, + const XAUDIO2_BUFFER *pBuffer, + const XAUDIO2_BUFFER_WMA *pBufferWMA); +void __RPC_STUB IXAudio23SourceVoice_SubmitSourceBuffer_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_FlushSourceBuffers_Proxy( + IXAudio23SourceVoice* This); +void __RPC_STUB IXAudio23SourceVoice_FlushSourceBuffers_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_Discontinuity_Proxy( + IXAudio23SourceVoice* This); +void __RPC_STUB IXAudio23SourceVoice_Discontinuity_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_ExitLoop_Proxy( + IXAudio23SourceVoice* This, + UINT32 OperationSet); +void __RPC_STUB IXAudio23SourceVoice_ExitLoop_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio23SourceVoice_GetState_Proxy( + IXAudio23SourceVoice* This, + XAUDIO2_VOICE_STATE *pVoiceState); +void __RPC_STUB IXAudio23SourceVoice_GetState_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio23SourceVoice_SetFrequencyRatio_Proxy( + IXAudio23SourceVoice* This, + float Ratio, + UINT32 OperationSet); +void __RPC_STUB IXAudio23SourceVoice_SetFrequencyRatio_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio23SourceVoice_GetFrequencyRatio_Proxy( + IXAudio23SourceVoice* This, + float *pRatio); +void __RPC_STUB IXAudio23SourceVoice_GetFrequencyRatio_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio23SourceVoice_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio27SourceVoice interface + */ +#ifndef __IXAudio27SourceVoice_INTERFACE_DEFINED__ +#define __IXAudio27SourceVoice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio27SourceVoice : public IXAudio2Voice +{ + virtual HRESULT STDMETHODCALLTYPE Start( + UINT32 Flags = 0, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE Stop( + UINT32 Flags = 0, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE SubmitSourceBuffer( + const XAUDIO2_BUFFER *pBuffer, + const XAUDIO2_BUFFER_WMA *pBufferWMA = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE FlushSourceBuffers( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE Discontinuity( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE ExitLoop( + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetState( + XAUDIO2_VOICE_STATE *pVoiceState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFrequencyRatio( + float Ratio, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetFrequencyRatio( + float *pRatio) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSourceSampleRate( + UINT32 NewSourceSampleRate) = 0; + +}; +#else +typedef struct IXAudio27SourceVoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio2Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio27SourceVoice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio27SourceVoice* This, + const XAUDIO2_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio27SourceVoice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio27SourceVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio27SourceVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio27SourceVoice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio27SourceVoice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio27SourceVoice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio27SourceVoice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio27SourceVoice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)( + IXAudio27SourceVoice* This, + IXAudio2Voice *pDestinationVoice, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputFilterParameters)( + IXAudio27SourceVoice* This, + IXAudio2Voice *pDestinationVoice, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio27SourceVoice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio27SourceVoice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio27SourceVoice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio27SourceVoice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio27SourceVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio27SourceVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio27SourceVoice* This); + + /*** IXAudio27SourceVoice methods ***/ + HRESULT (STDMETHODCALLTYPE *Start)( + IXAudio27SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *Stop)( + IXAudio27SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *SubmitSourceBuffer)( + IXAudio27SourceVoice* This, + const XAUDIO2_BUFFER *pBuffer, + const XAUDIO2_BUFFER_WMA *pBufferWMA); + + HRESULT (STDMETHODCALLTYPE *FlushSourceBuffers)( + IXAudio27SourceVoice* This); + + HRESULT (STDMETHODCALLTYPE *Discontinuity)( + IXAudio27SourceVoice* This); + + HRESULT (STDMETHODCALLTYPE *ExitLoop)( + IXAudio27SourceVoice* This, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetState)( + IXAudio27SourceVoice* This, + XAUDIO2_VOICE_STATE *pVoiceState); + + HRESULT (STDMETHODCALLTYPE *SetFrequencyRatio)( + IXAudio27SourceVoice* This, + float Ratio, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFrequencyRatio)( + IXAudio27SourceVoice* This, + float *pRatio); + + HRESULT (STDMETHODCALLTYPE *SetSourceSampleRate)( + IXAudio27SourceVoice* This, + UINT32 NewSourceSampleRate); + + END_INTERFACE +} IXAudio27SourceVoiceVtbl; +interface IXAudio27SourceVoice { + CONST_VTBL IXAudio27SourceVoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio2Voice methods ***/ +#define IXAudio27SourceVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio27SourceVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio27SourceVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio27SourceVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio27SourceVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio27SourceVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio27SourceVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio27SourceVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio27SourceVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio27SourceVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio27SourceVoice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) +#define IXAudio27SourceVoice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters) +#define IXAudio27SourceVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio27SourceVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio27SourceVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio27SourceVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio27SourceVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio27SourceVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio27SourceVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +/*** IXAudio27SourceVoice methods ***/ +#define IXAudio27SourceVoice_Start(This,Flags,OperationSet) (This)->lpVtbl->Start(This,Flags,OperationSet) +#define IXAudio27SourceVoice_Stop(This,Flags,OperationSet) (This)->lpVtbl->Stop(This,Flags,OperationSet) +#define IXAudio27SourceVoice_SubmitSourceBuffer(This,pBuffer,pBufferWMA) (This)->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA) +#define IXAudio27SourceVoice_FlushSourceBuffers(This) (This)->lpVtbl->FlushSourceBuffers(This) +#define IXAudio27SourceVoice_Discontinuity(This) (This)->lpVtbl->Discontinuity(This) +#define IXAudio27SourceVoice_ExitLoop(This,OperationSet) (This)->lpVtbl->ExitLoop(This,OperationSet) +#define IXAudio27SourceVoice_GetState(This,pVoiceState) (This)->lpVtbl->GetState(This,pVoiceState) +#define IXAudio27SourceVoice_SetFrequencyRatio(This,Ratio,OperationSet) (This)->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet) +#define IXAudio27SourceVoice_GetFrequencyRatio(This,pRatio) (This)->lpVtbl->GetFrequencyRatio(This,pRatio) +#define IXAudio27SourceVoice_SetSourceSampleRate(This,NewSourceSampleRate) (This)->lpVtbl->SetSourceSampleRate(This,NewSourceSampleRate) +#else +/*** IXAudio2Voice methods ***/ +static FORCEINLINE void IXAudio27SourceVoice_GetVoiceDetails(IXAudio27SourceVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_SetOutputVoices(IXAudio27SourceVoice* This,const XAUDIO2_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_SetEffectChain(IXAudio27SourceVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_EnableEffect(IXAudio27SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_DisableEffect(IXAudio27SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio27SourceVoice_GetEffectState(IXAudio27SourceVoice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_SetEffectParameters(IXAudio27SourceVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_GetEffectParameters(IXAudio27SourceVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_SetFilterParameters(IXAudio27SourceVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio27SourceVoice_GetFilterParameters(IXAudio27SourceVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_SetOutputFilterParameters(IXAudio27SourceVoice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio27SourceVoice_GetOutputFilterParameters(IXAudio27SourceVoice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_SetVolume(IXAudio27SourceVoice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio27SourceVoice_GetVolume(IXAudio27SourceVoice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_SetChannelVolumes(IXAudio27SourceVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio27SourceVoice_GetChannelVolumes(IXAudio27SourceVoice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_SetOutputMatrix(IXAudio27SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE void IXAudio27SourceVoice_GetOutputMatrix(IXAudio27SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio27SourceVoice_DestroyVoice(IXAudio27SourceVoice* This) { + This->lpVtbl->DestroyVoice(This); +} +/*** IXAudio27SourceVoice methods ***/ +static FORCEINLINE HRESULT IXAudio27SourceVoice_Start(IXAudio27SourceVoice* This,UINT32 Flags,UINT32 OperationSet) { + return This->lpVtbl->Start(This,Flags,OperationSet); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_Stop(IXAudio27SourceVoice* This,UINT32 Flags,UINT32 OperationSet) { + return This->lpVtbl->Stop(This,Flags,OperationSet); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_SubmitSourceBuffer(IXAudio27SourceVoice* This,const XAUDIO2_BUFFER *pBuffer,const XAUDIO2_BUFFER_WMA *pBufferWMA) { + return This->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_FlushSourceBuffers(IXAudio27SourceVoice* This) { + return This->lpVtbl->FlushSourceBuffers(This); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_Discontinuity(IXAudio27SourceVoice* This) { + return This->lpVtbl->Discontinuity(This); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_ExitLoop(IXAudio27SourceVoice* This,UINT32 OperationSet) { + return This->lpVtbl->ExitLoop(This,OperationSet); +} +static FORCEINLINE void IXAudio27SourceVoice_GetState(IXAudio27SourceVoice* This,XAUDIO2_VOICE_STATE *pVoiceState) { + This->lpVtbl->GetState(This,pVoiceState); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_SetFrequencyRatio(IXAudio27SourceVoice* This,float Ratio,UINT32 OperationSet) { + return This->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet); +} +static FORCEINLINE void IXAudio27SourceVoice_GetFrequencyRatio(IXAudio27SourceVoice* This,float *pRatio) { + This->lpVtbl->GetFrequencyRatio(This,pRatio); +} +static FORCEINLINE HRESULT IXAudio27SourceVoice_SetSourceSampleRate(IXAudio27SourceVoice* This,UINT32 NewSourceSampleRate) { + return This->lpVtbl->SetSourceSampleRate(This,NewSourceSampleRate); +} +#endif +#endif + +#endif + +HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_Start_Proxy( + IXAudio27SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); +void __RPC_STUB IXAudio27SourceVoice_Start_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_Stop_Proxy( + IXAudio27SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); +void __RPC_STUB IXAudio27SourceVoice_Stop_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_SubmitSourceBuffer_Proxy( + IXAudio27SourceVoice* This, + const XAUDIO2_BUFFER *pBuffer, + const XAUDIO2_BUFFER_WMA *pBufferWMA); +void __RPC_STUB IXAudio27SourceVoice_SubmitSourceBuffer_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_FlushSourceBuffers_Proxy( + IXAudio27SourceVoice* This); +void __RPC_STUB IXAudio27SourceVoice_FlushSourceBuffers_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_Discontinuity_Proxy( + IXAudio27SourceVoice* This); +void __RPC_STUB IXAudio27SourceVoice_Discontinuity_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_ExitLoop_Proxy( + IXAudio27SourceVoice* This, + UINT32 OperationSet); +void __RPC_STUB IXAudio27SourceVoice_ExitLoop_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio27SourceVoice_GetState_Proxy( + IXAudio27SourceVoice* This, + XAUDIO2_VOICE_STATE *pVoiceState); +void __RPC_STUB IXAudio27SourceVoice_GetState_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_SetFrequencyRatio_Proxy( + IXAudio27SourceVoice* This, + float Ratio, + UINT32 OperationSet); +void __RPC_STUB IXAudio27SourceVoice_SetFrequencyRatio_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio27SourceVoice_GetFrequencyRatio_Proxy( + IXAudio27SourceVoice* This, + float *pRatio); +void __RPC_STUB IXAudio27SourceVoice_GetFrequencyRatio_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27SourceVoice_SetSourceSampleRate_Proxy( + IXAudio27SourceVoice* This, + UINT32 NewSourceSampleRate); +void __RPC_STUB IXAudio27SourceVoice_SetSourceSampleRate_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio27SourceVoice_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio2SourceVoice interface + */ +#ifndef __IXAudio2SourceVoice_INTERFACE_DEFINED__ +#define __IXAudio2SourceVoice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio2SourceVoice : public IXAudio2Voice +{ + virtual HRESULT STDMETHODCALLTYPE Start( + UINT32 Flags = 0, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE Stop( + UINT32 Flags = 0, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual HRESULT STDMETHODCALLTYPE SubmitSourceBuffer( + const XAUDIO2_BUFFER *pBuffer, + const XAUDIO2_BUFFER_WMA *pBufferWMA = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE FlushSourceBuffers( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE Discontinuity( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE ExitLoop( + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetState( + XAUDIO2_VOICE_STATE *pVoiceState, + UINT32 Flags = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFrequencyRatio( + float Ratio, + UINT32 OperationSet = XAUDIO2_COMMIT_NOW) = 0; + + virtual void STDMETHODCALLTYPE GetFrequencyRatio( + float *pRatio) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSourceSampleRate( + UINT32 NewSourceSampleRate) = 0; + +}; +#else +typedef struct IXAudio2SourceVoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio2Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio2SourceVoice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio2SourceVoice* This, + const XAUDIO2_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio2SourceVoice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio2SourceVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio2SourceVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio2SourceVoice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio2SourceVoice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio2SourceVoice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio2SourceVoice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio2SourceVoice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)( + IXAudio2SourceVoice* This, + IXAudio2Voice *pDestinationVoice, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputFilterParameters)( + IXAudio2SourceVoice* This, + IXAudio2Voice *pDestinationVoice, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio2SourceVoice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio2SourceVoice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio2SourceVoice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio2SourceVoice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio2SourceVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio2SourceVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio2SourceVoice* This); + + /*** IXAudio2SourceVoice methods ***/ + HRESULT (STDMETHODCALLTYPE *Start)( + IXAudio2SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *Stop)( + IXAudio2SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *SubmitSourceBuffer)( + IXAudio2SourceVoice* This, + const XAUDIO2_BUFFER *pBuffer, + const XAUDIO2_BUFFER_WMA *pBufferWMA); + + HRESULT (STDMETHODCALLTYPE *FlushSourceBuffers)( + IXAudio2SourceVoice* This); + + HRESULT (STDMETHODCALLTYPE *Discontinuity)( + IXAudio2SourceVoice* This); + + HRESULT (STDMETHODCALLTYPE *ExitLoop)( + IXAudio2SourceVoice* This, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetState)( + IXAudio2SourceVoice* This, + XAUDIO2_VOICE_STATE *pVoiceState, + UINT32 Flags); + + HRESULT (STDMETHODCALLTYPE *SetFrequencyRatio)( + IXAudio2SourceVoice* This, + float Ratio, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFrequencyRatio)( + IXAudio2SourceVoice* This, + float *pRatio); + + HRESULT (STDMETHODCALLTYPE *SetSourceSampleRate)( + IXAudio2SourceVoice* This, + UINT32 NewSourceSampleRate); + + END_INTERFACE +} IXAudio2SourceVoiceVtbl; +interface IXAudio2SourceVoice { + CONST_VTBL IXAudio2SourceVoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio2Voice methods ***/ +#define IXAudio2SourceVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio2SourceVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio2SourceVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio2SourceVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio2SourceVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio2SourceVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio2SourceVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio2SourceVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio2SourceVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio2SourceVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio2SourceVoice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) +#define IXAudio2SourceVoice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters) +#define IXAudio2SourceVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio2SourceVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio2SourceVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio2SourceVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio2SourceVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio2SourceVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio2SourceVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +/*** IXAudio2SourceVoice methods ***/ +#define IXAudio2SourceVoice_Start(This,Flags,OperationSet) (This)->lpVtbl->Start(This,Flags,OperationSet) +#define IXAudio2SourceVoice_Stop(This,Flags,OperationSet) (This)->lpVtbl->Stop(This,Flags,OperationSet) +#define IXAudio2SourceVoice_SubmitSourceBuffer(This,pBuffer,pBufferWMA) (This)->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA) +#define IXAudio2SourceVoice_FlushSourceBuffers(This) (This)->lpVtbl->FlushSourceBuffers(This) +#define IXAudio2SourceVoice_Discontinuity(This) (This)->lpVtbl->Discontinuity(This) +#define IXAudio2SourceVoice_ExitLoop(This,OperationSet) (This)->lpVtbl->ExitLoop(This,OperationSet) +#define IXAudio2SourceVoice_GetState(This,pVoiceState,Flags) (This)->lpVtbl->GetState(This,pVoiceState,Flags) +#define IXAudio2SourceVoice_SetFrequencyRatio(This,Ratio,OperationSet) (This)->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet) +#define IXAudio2SourceVoice_GetFrequencyRatio(This,pRatio) (This)->lpVtbl->GetFrequencyRatio(This,pRatio) +#define IXAudio2SourceVoice_SetSourceSampleRate(This,NewSourceSampleRate) (This)->lpVtbl->SetSourceSampleRate(This,NewSourceSampleRate) +#else +/*** IXAudio2Voice methods ***/ +static FORCEINLINE void IXAudio2SourceVoice_GetVoiceDetails(IXAudio2SourceVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_SetOutputVoices(IXAudio2SourceVoice* This,const XAUDIO2_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_SetEffectChain(IXAudio2SourceVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_EnableEffect(IXAudio2SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_DisableEffect(IXAudio2SourceVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio2SourceVoice_GetEffectState(IXAudio2SourceVoice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_SetEffectParameters(IXAudio2SourceVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_GetEffectParameters(IXAudio2SourceVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_SetFilterParameters(IXAudio2SourceVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio2SourceVoice_GetFilterParameters(IXAudio2SourceVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_SetOutputFilterParameters(IXAudio2SourceVoice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio2SourceVoice_GetOutputFilterParameters(IXAudio2SourceVoice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_SetVolume(IXAudio2SourceVoice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio2SourceVoice_GetVolume(IXAudio2SourceVoice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_SetChannelVolumes(IXAudio2SourceVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio2SourceVoice_GetChannelVolumes(IXAudio2SourceVoice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_SetOutputMatrix(IXAudio2SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE void IXAudio2SourceVoice_GetOutputMatrix(IXAudio2SourceVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio2SourceVoice_DestroyVoice(IXAudio2SourceVoice* This) { + This->lpVtbl->DestroyVoice(This); +} +/*** IXAudio2SourceVoice methods ***/ +static FORCEINLINE HRESULT IXAudio2SourceVoice_Start(IXAudio2SourceVoice* This,UINT32 Flags,UINT32 OperationSet) { + return This->lpVtbl->Start(This,Flags,OperationSet); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_Stop(IXAudio2SourceVoice* This,UINT32 Flags,UINT32 OperationSet) { + return This->lpVtbl->Stop(This,Flags,OperationSet); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_SubmitSourceBuffer(IXAudio2SourceVoice* This,const XAUDIO2_BUFFER *pBuffer,const XAUDIO2_BUFFER_WMA *pBufferWMA) { + return This->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_FlushSourceBuffers(IXAudio2SourceVoice* This) { + return This->lpVtbl->FlushSourceBuffers(This); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_Discontinuity(IXAudio2SourceVoice* This) { + return This->lpVtbl->Discontinuity(This); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_ExitLoop(IXAudio2SourceVoice* This,UINT32 OperationSet) { + return This->lpVtbl->ExitLoop(This,OperationSet); +} +static FORCEINLINE void IXAudio2SourceVoice_GetState(IXAudio2SourceVoice* This,XAUDIO2_VOICE_STATE *pVoiceState,UINT32 Flags) { + This->lpVtbl->GetState(This,pVoiceState,Flags); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_SetFrequencyRatio(IXAudio2SourceVoice* This,float Ratio,UINT32 OperationSet) { + return This->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet); +} +static FORCEINLINE void IXAudio2SourceVoice_GetFrequencyRatio(IXAudio2SourceVoice* This,float *pRatio) { + This->lpVtbl->GetFrequencyRatio(This,pRatio); +} +static FORCEINLINE HRESULT IXAudio2SourceVoice_SetSourceSampleRate(IXAudio2SourceVoice* This,UINT32 NewSourceSampleRate) { + return This->lpVtbl->SetSourceSampleRate(This,NewSourceSampleRate); +} +#endif +#endif + +#endif + +HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_Start_Proxy( + IXAudio2SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); +void __RPC_STUB IXAudio2SourceVoice_Start_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_Stop_Proxy( + IXAudio2SourceVoice* This, + UINT32 Flags, + UINT32 OperationSet); +void __RPC_STUB IXAudio2SourceVoice_Stop_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_SubmitSourceBuffer_Proxy( + IXAudio2SourceVoice* This, + const XAUDIO2_BUFFER *pBuffer, + const XAUDIO2_BUFFER_WMA *pBufferWMA); +void __RPC_STUB IXAudio2SourceVoice_SubmitSourceBuffer_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_FlushSourceBuffers_Proxy( + IXAudio2SourceVoice* This); +void __RPC_STUB IXAudio2SourceVoice_FlushSourceBuffers_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_Discontinuity_Proxy( + IXAudio2SourceVoice* This); +void __RPC_STUB IXAudio2SourceVoice_Discontinuity_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_ExitLoop_Proxy( + IXAudio2SourceVoice* This, + UINT32 OperationSet); +void __RPC_STUB IXAudio2SourceVoice_ExitLoop_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2SourceVoice_GetState_Proxy( + IXAudio2SourceVoice* This, + XAUDIO2_VOICE_STATE *pVoiceState, + UINT32 Flags); +void __RPC_STUB IXAudio2SourceVoice_GetState_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_SetFrequencyRatio_Proxy( + IXAudio2SourceVoice* This, + float Ratio, + UINT32 OperationSet); +void __RPC_STUB IXAudio2SourceVoice_SetFrequencyRatio_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2SourceVoice_GetFrequencyRatio_Proxy( + IXAudio2SourceVoice* This, + float *pRatio); +void __RPC_STUB IXAudio2SourceVoice_GetFrequencyRatio_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2SourceVoice_SetSourceSampleRate_Proxy( + IXAudio2SourceVoice* This, + UINT32 NewSourceSampleRate); +void __RPC_STUB IXAudio2SourceVoice_SetSourceSampleRate_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio2SourceVoice_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio20SubmixVoice interface + */ +#ifndef __IXAudio20SubmixVoice_INTERFACE_DEFINED__ +#define __IXAudio20SubmixVoice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio20SubmixVoice : public IXAudio20Voice +{ +}; +#else +typedef struct IXAudio20SubmixVoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio20Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio20SubmixVoice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio20SubmixVoice* This, + const XAUDIO23_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio20SubmixVoice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio20SubmixVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio20SubmixVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio20SubmixVoice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio20SubmixVoice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio20SubmixVoice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio20SubmixVoice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio20SubmixVoice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio20SubmixVoice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio20SubmixVoice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio20SubmixVoice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio20SubmixVoice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio20SubmixVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio20SubmixVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio20SubmixVoice* This); + + END_INTERFACE +} IXAudio20SubmixVoiceVtbl; +interface IXAudio20SubmixVoice { + CONST_VTBL IXAudio20SubmixVoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio20Voice methods ***/ +#define IXAudio20SubmixVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio20SubmixVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio20SubmixVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio20SubmixVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio20SubmixVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio20SubmixVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio20SubmixVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio20SubmixVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio20SubmixVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio20SubmixVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio20SubmixVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio20SubmixVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio20SubmixVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio20SubmixVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio20SubmixVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio20SubmixVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio20SubmixVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +#else +/*** IXAudio20Voice methods ***/ +static FORCEINLINE void IXAudio20SubmixVoice_GetVoiceDetails(IXAudio20SubmixVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetOutputVoices(IXAudio20SubmixVoice* This,const XAUDIO23_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetEffectChain(IXAudio20SubmixVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio20SubmixVoice_EnableEffect(IXAudio20SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20SubmixVoice_DisableEffect(IXAudio20SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio20SubmixVoice_GetEffectState(IXAudio20SubmixVoice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetEffectParameters(IXAudio20SubmixVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20SubmixVoice_GetEffectParameters(IXAudio20SubmixVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetFilterParameters(IXAudio20SubmixVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio20SubmixVoice_GetFilterParameters(IXAudio20SubmixVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetVolume(IXAudio20SubmixVoice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio20SubmixVoice_GetVolume(IXAudio20SubmixVoice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetChannelVolumes(IXAudio20SubmixVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio20SubmixVoice_GetChannelVolumes(IXAudio20SubmixVoice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio20SubmixVoice_SetOutputMatrix(IXAudio20SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20SubmixVoice_GetOutputMatrix(IXAudio20SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + return This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio20SubmixVoice_DestroyVoice(IXAudio20SubmixVoice* This) { + This->lpVtbl->DestroyVoice(This); +} +#endif +#endif + +#endif + + +#endif /* __IXAudio20SubmixVoice_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio23SubmixVoice interface + */ +#ifndef __IXAudio23SubmixVoice_INTERFACE_DEFINED__ +#define __IXAudio23SubmixVoice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio23SubmixVoice : public IXAudio23Voice +{ +}; +#else +typedef struct IXAudio23SubmixVoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio23Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio23SubmixVoice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio23SubmixVoice* This, + const XAUDIO23_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio23SubmixVoice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio23SubmixVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio23SubmixVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio23SubmixVoice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio23SubmixVoice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio23SubmixVoice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio23SubmixVoice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio23SubmixVoice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio23SubmixVoice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio23SubmixVoice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio23SubmixVoice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio23SubmixVoice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio23SubmixVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio23SubmixVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio23SubmixVoice* This); + + END_INTERFACE +} IXAudio23SubmixVoiceVtbl; +interface IXAudio23SubmixVoice { + CONST_VTBL IXAudio23SubmixVoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio23Voice methods ***/ +#define IXAudio23SubmixVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio23SubmixVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio23SubmixVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio23SubmixVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio23SubmixVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio23SubmixVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio23SubmixVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio23SubmixVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio23SubmixVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio23SubmixVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio23SubmixVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio23SubmixVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio23SubmixVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio23SubmixVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio23SubmixVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio23SubmixVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio23SubmixVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +#else +/*** IXAudio23Voice methods ***/ +static FORCEINLINE void IXAudio23SubmixVoice_GetVoiceDetails(IXAudio23SubmixVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetOutputVoices(IXAudio23SubmixVoice* This,const XAUDIO23_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetEffectChain(IXAudio23SubmixVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio23SubmixVoice_EnableEffect(IXAudio23SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio23SubmixVoice_DisableEffect(IXAudio23SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio23SubmixVoice_GetEffectState(IXAudio23SubmixVoice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetEffectParameters(IXAudio23SubmixVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio23SubmixVoice_GetEffectParameters(IXAudio23SubmixVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetFilterParameters(IXAudio23SubmixVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio23SubmixVoice_GetFilterParameters(IXAudio23SubmixVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetVolume(IXAudio23SubmixVoice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio23SubmixVoice_GetVolume(IXAudio23SubmixVoice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetChannelVolumes(IXAudio23SubmixVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio23SubmixVoice_GetChannelVolumes(IXAudio23SubmixVoice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio23SubmixVoice_SetOutputMatrix(IXAudio23SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE void IXAudio23SubmixVoice_GetOutputMatrix(IXAudio23SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio23SubmixVoice_DestroyVoice(IXAudio23SubmixVoice* This) { + This->lpVtbl->DestroyVoice(This); +} +#endif +#endif + +#endif + + +#endif /* __IXAudio23SubmixVoice_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio2SubmixVoice interface + */ +#ifndef __IXAudio2SubmixVoice_INTERFACE_DEFINED__ +#define __IXAudio2SubmixVoice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio2SubmixVoice : public IXAudio2Voice +{ +}; +#else +typedef struct IXAudio2SubmixVoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio2Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio2SubmixVoice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio2SubmixVoice* This, + const XAUDIO2_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio2SubmixVoice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio2SubmixVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio2SubmixVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio2SubmixVoice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio2SubmixVoice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio2SubmixVoice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio2SubmixVoice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio2SubmixVoice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)( + IXAudio2SubmixVoice* This, + IXAudio2Voice *pDestinationVoice, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputFilterParameters)( + IXAudio2SubmixVoice* This, + IXAudio2Voice *pDestinationVoice, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio2SubmixVoice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio2SubmixVoice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio2SubmixVoice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio2SubmixVoice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio2SubmixVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio2SubmixVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio2SubmixVoice* This); + + END_INTERFACE +} IXAudio2SubmixVoiceVtbl; +interface IXAudio2SubmixVoice { + CONST_VTBL IXAudio2SubmixVoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio2Voice methods ***/ +#define IXAudio2SubmixVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio2SubmixVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio2SubmixVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio2SubmixVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio2SubmixVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio2SubmixVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio2SubmixVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio2SubmixVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio2SubmixVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio2SubmixVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio2SubmixVoice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) +#define IXAudio2SubmixVoice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters) +#define IXAudio2SubmixVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio2SubmixVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio2SubmixVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio2SubmixVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio2SubmixVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio2SubmixVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio2SubmixVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +#else +/*** IXAudio2Voice methods ***/ +static FORCEINLINE void IXAudio2SubmixVoice_GetVoiceDetails(IXAudio2SubmixVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetOutputVoices(IXAudio2SubmixVoice* This,const XAUDIO2_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetEffectChain(IXAudio2SubmixVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio2SubmixVoice_EnableEffect(IXAudio2SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio2SubmixVoice_DisableEffect(IXAudio2SubmixVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio2SubmixVoice_GetEffectState(IXAudio2SubmixVoice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetEffectParameters(IXAudio2SubmixVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio2SubmixVoice_GetEffectParameters(IXAudio2SubmixVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetFilterParameters(IXAudio2SubmixVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio2SubmixVoice_GetFilterParameters(IXAudio2SubmixVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetOutputFilterParameters(IXAudio2SubmixVoice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio2SubmixVoice_GetOutputFilterParameters(IXAudio2SubmixVoice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters); +} +static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetVolume(IXAudio2SubmixVoice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio2SubmixVoice_GetVolume(IXAudio2SubmixVoice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetChannelVolumes(IXAudio2SubmixVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio2SubmixVoice_GetChannelVolumes(IXAudio2SubmixVoice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio2SubmixVoice_SetOutputMatrix(IXAudio2SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE void IXAudio2SubmixVoice_GetOutputMatrix(IXAudio2SubmixVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio2SubmixVoice_DestroyVoice(IXAudio2SubmixVoice* This) { + This->lpVtbl->DestroyVoice(This); +} +#endif +#endif + +#endif + + +#endif /* __IXAudio2SubmixVoice_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio20MasteringVoice interface + */ +#ifndef __IXAudio20MasteringVoice_INTERFACE_DEFINED__ +#define __IXAudio20MasteringVoice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio20MasteringVoice : public IXAudio20Voice +{ +}; +#else +typedef struct IXAudio20MasteringVoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio20Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio20MasteringVoice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio20MasteringVoice* This, + const XAUDIO23_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio20MasteringVoice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio20MasteringVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio20MasteringVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio20MasteringVoice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio20MasteringVoice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio20MasteringVoice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio20MasteringVoice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio20MasteringVoice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio20MasteringVoice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio20MasteringVoice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio20MasteringVoice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio20MasteringVoice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio20MasteringVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio20MasteringVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio20MasteringVoice* This); + + END_INTERFACE +} IXAudio20MasteringVoiceVtbl; +interface IXAudio20MasteringVoice { + CONST_VTBL IXAudio20MasteringVoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio20Voice methods ***/ +#define IXAudio20MasteringVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio20MasteringVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio20MasteringVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio20MasteringVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio20MasteringVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio20MasteringVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio20MasteringVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio20MasteringVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio20MasteringVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio20MasteringVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio20MasteringVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio20MasteringVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio20MasteringVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio20MasteringVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio20MasteringVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio20MasteringVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio20MasteringVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +#else +/*** IXAudio20Voice methods ***/ +static FORCEINLINE void IXAudio20MasteringVoice_GetVoiceDetails(IXAudio20MasteringVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetOutputVoices(IXAudio20MasteringVoice* This,const XAUDIO23_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetEffectChain(IXAudio20MasteringVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio20MasteringVoice_EnableEffect(IXAudio20MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20MasteringVoice_DisableEffect(IXAudio20MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio20MasteringVoice_GetEffectState(IXAudio20MasteringVoice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetEffectParameters(IXAudio20MasteringVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20MasteringVoice_GetEffectParameters(IXAudio20MasteringVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetFilterParameters(IXAudio20MasteringVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio20MasteringVoice_GetFilterParameters(IXAudio20MasteringVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetVolume(IXAudio20MasteringVoice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio20MasteringVoice_GetVolume(IXAudio20MasteringVoice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetChannelVolumes(IXAudio20MasteringVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio20MasteringVoice_GetChannelVolumes(IXAudio20MasteringVoice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio20MasteringVoice_SetOutputMatrix(IXAudio20MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE HRESULT IXAudio20MasteringVoice_GetOutputMatrix(IXAudio20MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + return This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio20MasteringVoice_DestroyVoice(IXAudio20MasteringVoice* This) { + This->lpVtbl->DestroyVoice(This); +} +#endif +#endif + +#endif + + +#endif /* __IXAudio20MasteringVoice_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio23MasteringVoice interface + */ +#ifndef __IXAudio23MasteringVoice_INTERFACE_DEFINED__ +#define __IXAudio23MasteringVoice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio23MasteringVoice : public IXAudio23Voice +{ +}; +#else +typedef struct IXAudio23MasteringVoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio23Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio23MasteringVoice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio23MasteringVoice* This, + const XAUDIO23_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio23MasteringVoice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio23MasteringVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio23MasteringVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio23MasteringVoice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio23MasteringVoice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio23MasteringVoice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio23MasteringVoice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio23MasteringVoice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio23MasteringVoice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio23MasteringVoice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio23MasteringVoice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio23MasteringVoice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio23MasteringVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio23MasteringVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio23MasteringVoice* This); + + END_INTERFACE +} IXAudio23MasteringVoiceVtbl; +interface IXAudio23MasteringVoice { + CONST_VTBL IXAudio23MasteringVoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio23Voice methods ***/ +#define IXAudio23MasteringVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio23MasteringVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio23MasteringVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio23MasteringVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio23MasteringVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio23MasteringVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio23MasteringVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio23MasteringVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio23MasteringVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio23MasteringVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio23MasteringVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio23MasteringVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio23MasteringVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio23MasteringVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio23MasteringVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio23MasteringVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio23MasteringVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +#else +/*** IXAudio23Voice methods ***/ +static FORCEINLINE void IXAudio23MasteringVoice_GetVoiceDetails(IXAudio23MasteringVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetOutputVoices(IXAudio23MasteringVoice* This,const XAUDIO23_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetEffectChain(IXAudio23MasteringVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio23MasteringVoice_EnableEffect(IXAudio23MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio23MasteringVoice_DisableEffect(IXAudio23MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio23MasteringVoice_GetEffectState(IXAudio23MasteringVoice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetEffectParameters(IXAudio23MasteringVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio23MasteringVoice_GetEffectParameters(IXAudio23MasteringVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetFilterParameters(IXAudio23MasteringVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio23MasteringVoice_GetFilterParameters(IXAudio23MasteringVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetVolume(IXAudio23MasteringVoice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio23MasteringVoice_GetVolume(IXAudio23MasteringVoice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetChannelVolumes(IXAudio23MasteringVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio23MasteringVoice_GetChannelVolumes(IXAudio23MasteringVoice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio23MasteringVoice_SetOutputMatrix(IXAudio23MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE void IXAudio23MasteringVoice_GetOutputMatrix(IXAudio23MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio23MasteringVoice_DestroyVoice(IXAudio23MasteringVoice* This) { + This->lpVtbl->DestroyVoice(This); +} +#endif +#endif + +#endif + + +#endif /* __IXAudio23MasteringVoice_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio2MasteringVoice interface + */ +#ifndef __IXAudio2MasteringVoice_INTERFACE_DEFINED__ +#define __IXAudio2MasteringVoice_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio2MasteringVoice : public IXAudio2Voice +{ + virtual void STDMETHODCALLTYPE GetChannelMask( + DWORD *pChannelMask) = 0; + +}; +#else +typedef struct IXAudio2MasteringVoiceVtbl { + BEGIN_INTERFACE + + /*** IXAudio2Voice methods ***/ + void (STDMETHODCALLTYPE *GetVoiceDetails)( + IXAudio2MasteringVoice* This, + XAUDIO2_VOICE_DETAILS *pVoiceDetails); + + HRESULT (STDMETHODCALLTYPE *SetOutputVoices)( + IXAudio2MasteringVoice* This, + const XAUDIO2_VOICE_SENDS *pSendList); + + HRESULT (STDMETHODCALLTYPE *SetEffectChain)( + IXAudio2MasteringVoice* This, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *EnableEffect)( + IXAudio2MasteringVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *DisableEffect)( + IXAudio2MasteringVoice* This, + UINT32 EffectIndex, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetEffectState)( + IXAudio2MasteringVoice* This, + UINT32 EffectIndex, + BOOL *pEnabled); + + HRESULT (STDMETHODCALLTYPE *SetEffectParameters)( + IXAudio2MasteringVoice* This, + UINT32 EffectIndex, + const void *pParameters, + UINT32 ParametersByteSize, + UINT32 OperationSet); + + HRESULT (STDMETHODCALLTYPE *GetEffectParameters)( + IXAudio2MasteringVoice* This, + UINT32 EffectIndex, + void *pParameters, + UINT32 ParametersByteSize); + + HRESULT (STDMETHODCALLTYPE *SetFilterParameters)( + IXAudio2MasteringVoice* This, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetFilterParameters)( + IXAudio2MasteringVoice* This, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetOutputFilterParameters)( + IXAudio2MasteringVoice* This, + IXAudio2Voice *pDestinationVoice, + const XAUDIO2_FILTER_PARAMETERS *pParameters, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputFilterParameters)( + IXAudio2MasteringVoice* This, + IXAudio2Voice *pDestinationVoice, + XAUDIO2_FILTER_PARAMETERS *pParameters); + + HRESULT (STDMETHODCALLTYPE *SetVolume)( + IXAudio2MasteringVoice* This, + float Volume, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetVolume)( + IXAudio2MasteringVoice* This, + float *pVolume); + + HRESULT (STDMETHODCALLTYPE *SetChannelVolumes)( + IXAudio2MasteringVoice* This, + UINT32 Channels, + const float *pVolumes, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetChannelVolumes)( + IXAudio2MasteringVoice* This, + UINT32 Channels, + float *pVolumes); + + HRESULT (STDMETHODCALLTYPE *SetOutputMatrix)( + IXAudio2MasteringVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + const float *pLevelMatrix, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetOutputMatrix)( + IXAudio2MasteringVoice* This, + IXAudio2Voice *pDestinationVoice, + UINT32 SourceChannels, + UINT32 DestinationChannels, + float *pLevelMatrix); + + void (STDMETHODCALLTYPE *DestroyVoice)( + IXAudio2MasteringVoice* This); + + /*** IXAudio2MasteringVoice methods ***/ + void (STDMETHODCALLTYPE *GetChannelMask)( + IXAudio2MasteringVoice* This, + DWORD *pChannelMask); + + END_INTERFACE +} IXAudio2MasteringVoiceVtbl; +interface IXAudio2MasteringVoice { + CONST_VTBL IXAudio2MasteringVoiceVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio2Voice methods ***/ +#define IXAudio2MasteringVoice_GetVoiceDetails(This,pVoiceDetails) (This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails) +#define IXAudio2MasteringVoice_SetOutputVoices(This,pSendList) (This)->lpVtbl->SetOutputVoices(This,pSendList) +#define IXAudio2MasteringVoice_SetEffectChain(This,pEffectChain) (This)->lpVtbl->SetEffectChain(This,pEffectChain) +#define IXAudio2MasteringVoice_EnableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet) +#define IXAudio2MasteringVoice_DisableEffect(This,EffectIndex,OperationSet) (This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet) +#define IXAudio2MasteringVoice_GetEffectState(This,EffectIndex,pEnabled) (This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled) +#define IXAudio2MasteringVoice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) (This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet) +#define IXAudio2MasteringVoice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) (This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) +#define IXAudio2MasteringVoice_SetFilterParameters(This,pParameters,OperationSet) (This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet) +#define IXAudio2MasteringVoice_GetFilterParameters(This,pParameters) (This)->lpVtbl->GetFilterParameters(This,pParameters) +#define IXAudio2MasteringVoice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) (This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) +#define IXAudio2MasteringVoice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) (This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters) +#define IXAudio2MasteringVoice_SetVolume(This,Volume,OperationSet) (This)->lpVtbl->SetVolume(This,Volume,OperationSet) +#define IXAudio2MasteringVoice_GetVolume(This,pVolume) (This)->lpVtbl->GetVolume(This,pVolume) +#define IXAudio2MasteringVoice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) (This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet) +#define IXAudio2MasteringVoice_GetChannelVolumes(This,Channels,pVolumes) (This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes) +#define IXAudio2MasteringVoice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) (This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) +#define IXAudio2MasteringVoice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) (This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) +#define IXAudio2MasteringVoice_DestroyVoice(This) (This)->lpVtbl->DestroyVoice(This) +/*** IXAudio2MasteringVoice methods ***/ +#define IXAudio2MasteringVoice_GetChannelMask(This,pChannelMask) (This)->lpVtbl->GetChannelMask(This,pChannelMask) +#else +/*** IXAudio2Voice methods ***/ +static FORCEINLINE void IXAudio2MasteringVoice_GetVoiceDetails(IXAudio2MasteringVoice* This,XAUDIO2_VOICE_DETAILS *pVoiceDetails) { + This->lpVtbl->GetVoiceDetails(This,pVoiceDetails); +} +static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetOutputVoices(IXAudio2MasteringVoice* This,const XAUDIO2_VOICE_SENDS *pSendList) { + return This->lpVtbl->SetOutputVoices(This,pSendList); +} +static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetEffectChain(IXAudio2MasteringVoice* This,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->SetEffectChain(This,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio2MasteringVoice_EnableEffect(IXAudio2MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->EnableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE HRESULT IXAudio2MasteringVoice_DisableEffect(IXAudio2MasteringVoice* This,UINT32 EffectIndex,UINT32 OperationSet) { + return This->lpVtbl->DisableEffect(This,EffectIndex,OperationSet); +} +static FORCEINLINE void IXAudio2MasteringVoice_GetEffectState(IXAudio2MasteringVoice* This,UINT32 EffectIndex,BOOL *pEnabled) { + This->lpVtbl->GetEffectState(This,EffectIndex,pEnabled); +} +static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetEffectParameters(IXAudio2MasteringVoice* This,UINT32 EffectIndex,const void *pParameters,UINT32 ParametersByteSize,UINT32 OperationSet) { + return This->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet); +} +static FORCEINLINE HRESULT IXAudio2MasteringVoice_GetEffectParameters(IXAudio2MasteringVoice* This,UINT32 EffectIndex,void *pParameters,UINT32 ParametersByteSize) { + return This->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize); +} +static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetFilterParameters(IXAudio2MasteringVoice* This,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetFilterParameters(This,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio2MasteringVoice_GetFilterParameters(IXAudio2MasteringVoice* This,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetFilterParameters(This,pParameters); +} +static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetOutputFilterParameters(IXAudio2MasteringVoice* This,IXAudio2Voice *pDestinationVoice,const XAUDIO2_FILTER_PARAMETERS *pParameters,UINT32 OperationSet) { + return This->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet); +} +static FORCEINLINE void IXAudio2MasteringVoice_GetOutputFilterParameters(IXAudio2MasteringVoice* This,IXAudio2Voice *pDestinationVoice,XAUDIO2_FILTER_PARAMETERS *pParameters) { + This->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters); +} +static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetVolume(IXAudio2MasteringVoice* This,float Volume,UINT32 OperationSet) { + return This->lpVtbl->SetVolume(This,Volume,OperationSet); +} +static FORCEINLINE void IXAudio2MasteringVoice_GetVolume(IXAudio2MasteringVoice* This,float *pVolume) { + This->lpVtbl->GetVolume(This,pVolume); +} +static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetChannelVolumes(IXAudio2MasteringVoice* This,UINT32 Channels,const float *pVolumes,UINT32 OperationSet) { + return This->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet); +} +static FORCEINLINE void IXAudio2MasteringVoice_GetChannelVolumes(IXAudio2MasteringVoice* This,UINT32 Channels,float *pVolumes) { + This->lpVtbl->GetChannelVolumes(This,Channels,pVolumes); +} +static FORCEINLINE HRESULT IXAudio2MasteringVoice_SetOutputMatrix(IXAudio2MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,const float *pLevelMatrix,UINT32 OperationSet) { + return This->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet); +} +static FORCEINLINE void IXAudio2MasteringVoice_GetOutputMatrix(IXAudio2MasteringVoice* This,IXAudio2Voice *pDestinationVoice,UINT32 SourceChannels,UINT32 DestinationChannels,float *pLevelMatrix) { + This->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix); +} +static FORCEINLINE void IXAudio2MasteringVoice_DestroyVoice(IXAudio2MasteringVoice* This) { + This->lpVtbl->DestroyVoice(This); +} +/*** IXAudio2MasteringVoice methods ***/ +static FORCEINLINE void IXAudio2MasteringVoice_GetChannelMask(IXAudio2MasteringVoice* This,DWORD *pChannelMask) { + This->lpVtbl->GetChannelMask(This,pChannelMask); +} +#endif +#endif + +#endif + +void STDMETHODCALLTYPE IXAudio2MasteringVoice_GetChannelMask_Proxy( + IXAudio2MasteringVoice* This, + DWORD *pChannelMask); +void __RPC_STUB IXAudio2MasteringVoice_GetChannelMask_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio2MasteringVoice_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio20VoiceCallback interface + */ +#ifndef __IXAudio20VoiceCallback_INTERFACE_DEFINED__ +#define __IXAudio20VoiceCallback_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio20VoiceCallback +{ + BEGIN_INTERFACE + + virtual void STDMETHODCALLTYPE OnVoiceProcessingPassStart( + ) = 0; + + virtual void STDMETHODCALLTYPE OnVoiceProcessingPassEnd( + ) = 0; + + virtual void STDMETHODCALLTYPE OnStreamEnd( + ) = 0; + + virtual void STDMETHODCALLTYPE OnBufferStart( + void *pBufferContext) = 0; + + virtual void STDMETHODCALLTYPE OnBufferEnd( + void *pBufferContext) = 0; + + virtual void STDMETHODCALLTYPE OnLoopEnd( + void *pBufferContext) = 0; + + virtual void STDMETHODCALLTYPE OnVoiceError( + void *pBuffercontext, + HRESULT Error) = 0; + + END_INTERFACE +}; +#else +typedef struct IXAudio20VoiceCallbackVtbl { + BEGIN_INTERFACE + + /*** IXAudio20VoiceCallback methods ***/ + void (STDMETHODCALLTYPE *OnVoiceProcessingPassStart)( + IXAudio20VoiceCallback* This); + + void (STDMETHODCALLTYPE *OnVoiceProcessingPassEnd)( + IXAudio20VoiceCallback* This); + + void (STDMETHODCALLTYPE *OnStreamEnd)( + IXAudio20VoiceCallback* This); + + void (STDMETHODCALLTYPE *OnBufferStart)( + IXAudio20VoiceCallback* This, + void *pBufferContext); + + void (STDMETHODCALLTYPE *OnBufferEnd)( + IXAudio20VoiceCallback* This, + void *pBufferContext); + + void (STDMETHODCALLTYPE *OnLoopEnd)( + IXAudio20VoiceCallback* This, + void *pBufferContext); + + void (STDMETHODCALLTYPE *OnVoiceError)( + IXAudio20VoiceCallback* This, + void *pBuffercontext, + HRESULT Error); + + END_INTERFACE +} IXAudio20VoiceCallbackVtbl; +interface IXAudio20VoiceCallback { + CONST_VTBL IXAudio20VoiceCallbackVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio20VoiceCallback methods ***/ +#define IXAudio20VoiceCallback_OnVoiceProcessingPassStart(This) (This)->lpVtbl->OnVoiceProcessingPassStart(This) +#define IXAudio20VoiceCallback_OnVoiceProcessingPassEnd(This) (This)->lpVtbl->OnVoiceProcessingPassEnd(This) +#define IXAudio20VoiceCallback_OnStreamEnd(This) (This)->lpVtbl->OnStreamEnd(This) +#define IXAudio20VoiceCallback_OnBufferStart(This,pBufferContext) (This)->lpVtbl->OnBufferStart(This,pBufferContext) +#define IXAudio20VoiceCallback_OnBufferEnd(This,pBufferContext) (This)->lpVtbl->OnBufferEnd(This,pBufferContext) +#define IXAudio20VoiceCallback_OnLoopEnd(This,pBufferContext) (This)->lpVtbl->OnLoopEnd(This,pBufferContext) +#define IXAudio20VoiceCallback_OnVoiceError(This,pBuffercontext,Error) (This)->lpVtbl->OnVoiceError(This,pBuffercontext,Error) +#else +/*** IXAudio20VoiceCallback methods ***/ +static FORCEINLINE void IXAudio20VoiceCallback_OnVoiceProcessingPassStart(IXAudio20VoiceCallback* This) { + This->lpVtbl->OnVoiceProcessingPassStart(This); +} +static FORCEINLINE void IXAudio20VoiceCallback_OnVoiceProcessingPassEnd(IXAudio20VoiceCallback* This) { + This->lpVtbl->OnVoiceProcessingPassEnd(This); +} +static FORCEINLINE void IXAudio20VoiceCallback_OnStreamEnd(IXAudio20VoiceCallback* This) { + This->lpVtbl->OnStreamEnd(This); +} +static FORCEINLINE void IXAudio20VoiceCallback_OnBufferStart(IXAudio20VoiceCallback* This,void *pBufferContext) { + This->lpVtbl->OnBufferStart(This,pBufferContext); +} +static FORCEINLINE void IXAudio20VoiceCallback_OnBufferEnd(IXAudio20VoiceCallback* This,void *pBufferContext) { + This->lpVtbl->OnBufferEnd(This,pBufferContext); +} +static FORCEINLINE void IXAudio20VoiceCallback_OnLoopEnd(IXAudio20VoiceCallback* This,void *pBufferContext) { + This->lpVtbl->OnLoopEnd(This,pBufferContext); +} +static FORCEINLINE void IXAudio20VoiceCallback_OnVoiceError(IXAudio20VoiceCallback* This,void *pBuffercontext,HRESULT Error) { + This->lpVtbl->OnVoiceError(This,pBuffercontext,Error); +} +#endif +#endif + +#endif + +void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnVoiceProcessingPassStart_Proxy( + IXAudio20VoiceCallback* This); +void __RPC_STUB IXAudio20VoiceCallback_OnVoiceProcessingPassStart_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnVoiceProcessingPassEnd_Proxy( + IXAudio20VoiceCallback* This); +void __RPC_STUB IXAudio20VoiceCallback_OnVoiceProcessingPassEnd_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnStreamEnd_Proxy( + IXAudio20VoiceCallback* This); +void __RPC_STUB IXAudio20VoiceCallback_OnStreamEnd_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnBufferStart_Proxy( + IXAudio20VoiceCallback* This, + void *pBufferContext); +void __RPC_STUB IXAudio20VoiceCallback_OnBufferStart_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnBufferEnd_Proxy( + IXAudio20VoiceCallback* This, + void *pBufferContext); +void __RPC_STUB IXAudio20VoiceCallback_OnBufferEnd_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnLoopEnd_Proxy( + IXAudio20VoiceCallback* This, + void *pBufferContext); +void __RPC_STUB IXAudio20VoiceCallback_OnLoopEnd_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20VoiceCallback_OnVoiceError_Proxy( + IXAudio20VoiceCallback* This, + void *pBuffercontext, + HRESULT Error); +void __RPC_STUB IXAudio20VoiceCallback_OnVoiceError_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio20VoiceCallback_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio2VoiceCallback interface + */ +#ifndef __IXAudio2VoiceCallback_INTERFACE_DEFINED__ +#define __IXAudio2VoiceCallback_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) +interface IXAudio2VoiceCallback +{ + BEGIN_INTERFACE + + virtual void STDMETHODCALLTYPE OnVoiceProcessingPassStart( + UINT32 BytesRequired) = 0; + + virtual void STDMETHODCALLTYPE OnVoiceProcessingPassEnd( + ) = 0; + + virtual void STDMETHODCALLTYPE OnStreamEnd( + ) = 0; + + virtual void STDMETHODCALLTYPE OnBufferStart( + void *pBufferContext) = 0; + + virtual void STDMETHODCALLTYPE OnBufferEnd( + void *pBufferContext) = 0; + + virtual void STDMETHODCALLTYPE OnLoopEnd( + void *pBufferContext) = 0; + + virtual void STDMETHODCALLTYPE OnVoiceError( + void *pBuffercontext, + HRESULT Error) = 0; + + END_INTERFACE +}; +#else +typedef struct IXAudio2VoiceCallbackVtbl { + BEGIN_INTERFACE + + /*** IXAudio2VoiceCallback methods ***/ + void (STDMETHODCALLTYPE *OnVoiceProcessingPassStart)( + IXAudio2VoiceCallback* This, + UINT32 BytesRequired); + + void (STDMETHODCALLTYPE *OnVoiceProcessingPassEnd)( + IXAudio2VoiceCallback* This); + + void (STDMETHODCALLTYPE *OnStreamEnd)( + IXAudio2VoiceCallback* This); + + void (STDMETHODCALLTYPE *OnBufferStart)( + IXAudio2VoiceCallback* This, + void *pBufferContext); + + void (STDMETHODCALLTYPE *OnBufferEnd)( + IXAudio2VoiceCallback* This, + void *pBufferContext); + + void (STDMETHODCALLTYPE *OnLoopEnd)( + IXAudio2VoiceCallback* This, + void *pBufferContext); + + void (STDMETHODCALLTYPE *OnVoiceError)( + IXAudio2VoiceCallback* This, + void *pBuffercontext, + HRESULT Error); + + END_INTERFACE +} IXAudio2VoiceCallbackVtbl; +interface IXAudio2VoiceCallback { + CONST_VTBL IXAudio2VoiceCallbackVtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IXAudio2VoiceCallback methods ***/ +#define IXAudio2VoiceCallback_OnVoiceProcessingPassStart(This,BytesRequired) (This)->lpVtbl->OnVoiceProcessingPassStart(This,BytesRequired) +#define IXAudio2VoiceCallback_OnVoiceProcessingPassEnd(This) (This)->lpVtbl->OnVoiceProcessingPassEnd(This) +#define IXAudio2VoiceCallback_OnStreamEnd(This) (This)->lpVtbl->OnStreamEnd(This) +#define IXAudio2VoiceCallback_OnBufferStart(This,pBufferContext) (This)->lpVtbl->OnBufferStart(This,pBufferContext) +#define IXAudio2VoiceCallback_OnBufferEnd(This,pBufferContext) (This)->lpVtbl->OnBufferEnd(This,pBufferContext) +#define IXAudio2VoiceCallback_OnLoopEnd(This,pBufferContext) (This)->lpVtbl->OnLoopEnd(This,pBufferContext) +#define IXAudio2VoiceCallback_OnVoiceError(This,pBuffercontext,Error) (This)->lpVtbl->OnVoiceError(This,pBuffercontext,Error) +#else +/*** IXAudio2VoiceCallback methods ***/ +static FORCEINLINE void IXAudio2VoiceCallback_OnVoiceProcessingPassStart(IXAudio2VoiceCallback* This,UINT32 BytesRequired) { + This->lpVtbl->OnVoiceProcessingPassStart(This,BytesRequired); +} +static FORCEINLINE void IXAudio2VoiceCallback_OnVoiceProcessingPassEnd(IXAudio2VoiceCallback* This) { + This->lpVtbl->OnVoiceProcessingPassEnd(This); +} +static FORCEINLINE void IXAudio2VoiceCallback_OnStreamEnd(IXAudio2VoiceCallback* This) { + This->lpVtbl->OnStreamEnd(This); +} +static FORCEINLINE void IXAudio2VoiceCallback_OnBufferStart(IXAudio2VoiceCallback* This,void *pBufferContext) { + This->lpVtbl->OnBufferStart(This,pBufferContext); +} +static FORCEINLINE void IXAudio2VoiceCallback_OnBufferEnd(IXAudio2VoiceCallback* This,void *pBufferContext) { + This->lpVtbl->OnBufferEnd(This,pBufferContext); +} +static FORCEINLINE void IXAudio2VoiceCallback_OnLoopEnd(IXAudio2VoiceCallback* This,void *pBufferContext) { + This->lpVtbl->OnLoopEnd(This,pBufferContext); +} +static FORCEINLINE void IXAudio2VoiceCallback_OnVoiceError(IXAudio2VoiceCallback* This,void *pBuffercontext,HRESULT Error) { + This->lpVtbl->OnVoiceError(This,pBuffercontext,Error); +} +#endif +#endif + +#endif + +void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnVoiceProcessingPassStart_Proxy( + IXAudio2VoiceCallback* This, + UINT32 BytesRequired); +void __RPC_STUB IXAudio2VoiceCallback_OnVoiceProcessingPassStart_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnVoiceProcessingPassEnd_Proxy( + IXAudio2VoiceCallback* This); +void __RPC_STUB IXAudio2VoiceCallback_OnVoiceProcessingPassEnd_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnStreamEnd_Proxy( + IXAudio2VoiceCallback* This); +void __RPC_STUB IXAudio2VoiceCallback_OnStreamEnd_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnBufferStart_Proxy( + IXAudio2VoiceCallback* This, + void *pBufferContext); +void __RPC_STUB IXAudio2VoiceCallback_OnBufferStart_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnBufferEnd_Proxy( + IXAudio2VoiceCallback* This, + void *pBufferContext); +void __RPC_STUB IXAudio2VoiceCallback_OnBufferEnd_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnLoopEnd_Proxy( + IXAudio2VoiceCallback* This, + void *pBufferContext); +void __RPC_STUB IXAudio2VoiceCallback_OnLoopEnd_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2VoiceCallback_OnVoiceError_Proxy( + IXAudio2VoiceCallback* This, + void *pBuffercontext, + HRESULT Error); +void __RPC_STUB IXAudio2VoiceCallback_OnVoiceError_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio2VoiceCallback_INTERFACE_DEFINED__ */ + +typedef struct XAUDIO2_DEBUG_CONFIGURATION { + UINT32 TraceMask; + UINT32 BreakMask; + BOOL LogThreadID; + BOOL LogFileline; + BOOL LogFunctionName; + BOOL LogTiming; +} XAUDIO2_DEBUG_CONFIGURATION; +/***************************************************************************** + * IXAudio20 interface + */ +#ifndef __IXAudio20_INTERFACE_DEFINED__ +#define __IXAudio20_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IXAudio20, 0x8bcf1f58, 0x9fe7, 0x4583, 0x8a,0xc6, 0xe2,0xad,0xc4,0x65,0xc8,0xbb); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("8bcf1f58-9fe7-4583-8ac6-e2adc465c8bb") +IXAudio20 : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE GetDeviceCount( + UINT32 *pCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDeviceDetails( + UINT32 Index, + XAUDIO2_DEVICE_DETAILS *pDeviceDetails) = 0; + + virtual HRESULT STDMETHODCALLTYPE Initialize( + UINT32 Flags = 0, + XAUDIO2_PROCESSOR XAudio2Processor = XAUDIO2_DEFAULT_PROCESSOR) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterForCallbacks( + IXAudio2EngineCallback *pCallback) = 0; + + virtual void STDMETHODCALLTYPE UnregisterForCallbacks( + IXAudio2EngineCallback *pCallback) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSourceVoice( + IXAudio2SourceVoice **ppSourceVoice, + const WAVEFORMATEX *pSourceFormat, + UINT32 Flags = 0, + float MaxFrequencyRatio = XAUDIO2_DEFAULT_FREQ_RATIO, + IXAudio2VoiceCallback *pCallback = 0, + const XAUDIO2_VOICE_SENDS *pSendList = 0, + const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSubmixVoice( + IXAudio2SubmixVoice **ppSubmixVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags = 0, + UINT32 ProcessingStage = 0, + const XAUDIO2_VOICE_SENDS *pSendList = 0, + const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateMasteringVoice( + IXAudio2MasteringVoice **ppMasteringVoice, + UINT32 InputChannels = XAUDIO2_DEFAULT_CHANNELS, + UINT32 InputSampleRate = XAUDIO2_DEFAULT_SAMPLERATE, + UINT32 Flags = 0, + UINT32 DeviceIndex = 0, + const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE StartEngine( + ) = 0; + + virtual void STDMETHODCALLTYPE StopEngine( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE CommitChanges( + UINT32 OperationSet) = 0; + + virtual void STDMETHODCALLTYPE GetPerformanceData( + XAUDIO20_PERFORMANCE_DATA *pPerfData) = 0; + + virtual void STDMETHODCALLTYPE SetDebugConfiguration( + const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration, + void *pReserved = 0) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IXAudio20, 0x8bcf1f58, 0x9fe7, 0x4583, 0x8a,0xc6, 0xe2,0xad,0xc4,0x65,0xc8,0xbb) +#endif +#else +typedef struct IXAudio20Vtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IXAudio20* This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IXAudio20* This); + + ULONG (STDMETHODCALLTYPE *Release)( + IXAudio20* This); + + /*** IXAudio20 methods ***/ + HRESULT (STDMETHODCALLTYPE *GetDeviceCount)( + IXAudio20* This, + UINT32 *pCount); + + HRESULT (STDMETHODCALLTYPE *GetDeviceDetails)( + IXAudio20* This, + UINT32 Index, + XAUDIO2_DEVICE_DETAILS *pDeviceDetails); + + HRESULT (STDMETHODCALLTYPE *Initialize)( + IXAudio20* This, + UINT32 Flags, + XAUDIO2_PROCESSOR XAudio2Processor); + + HRESULT (STDMETHODCALLTYPE *RegisterForCallbacks)( + IXAudio20* This, + IXAudio2EngineCallback *pCallback); + + void (STDMETHODCALLTYPE *UnregisterForCallbacks)( + IXAudio20* This, + IXAudio2EngineCallback *pCallback); + + HRESULT (STDMETHODCALLTYPE *CreateSourceVoice)( + IXAudio20* This, + IXAudio2SourceVoice **ppSourceVoice, + const WAVEFORMATEX *pSourceFormat, + UINT32 Flags, + float MaxFrequencyRatio, + IXAudio2VoiceCallback *pCallback, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *CreateSubmixVoice)( + IXAudio20* This, + IXAudio2SubmixVoice **ppSubmixVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 ProcessingStage, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *CreateMasteringVoice)( + IXAudio20* This, + IXAudio2MasteringVoice **ppMasteringVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 DeviceIndex, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *StartEngine)( + IXAudio20* This); + + void (STDMETHODCALLTYPE *StopEngine)( + IXAudio20* This); + + HRESULT (STDMETHODCALLTYPE *CommitChanges)( + IXAudio20* This, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetPerformanceData)( + IXAudio20* This, + XAUDIO20_PERFORMANCE_DATA *pPerfData); + + void (STDMETHODCALLTYPE *SetDebugConfiguration)( + IXAudio20* This, + const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration, + void *pReserved); + + END_INTERFACE +} IXAudio20Vtbl; +interface IXAudio20 { + CONST_VTBL IXAudio20Vtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IXAudio20_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IXAudio20_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IXAudio20_Release(This) (This)->lpVtbl->Release(This) +/*** IXAudio20 methods ***/ +#define IXAudio20_GetDeviceCount(This,pCount) (This)->lpVtbl->GetDeviceCount(This,pCount) +#define IXAudio20_GetDeviceDetails(This,Index,pDeviceDetails) (This)->lpVtbl->GetDeviceDetails(This,Index,pDeviceDetails) +#define IXAudio20_Initialize(This,Flags,XAudio2Processor) (This)->lpVtbl->Initialize(This,Flags,XAudio2Processor) +#define IXAudio20_RegisterForCallbacks(This,pCallback) (This)->lpVtbl->RegisterForCallbacks(This,pCallback) +#define IXAudio20_UnregisterForCallbacks(This,pCallback) (This)->lpVtbl->UnregisterForCallbacks(This,pCallback) +#define IXAudio20_CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (This)->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) +#define IXAudio20_CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) (This)->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) +#define IXAudio20_CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (This)->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) +#define IXAudio20_StartEngine(This) (This)->lpVtbl->StartEngine(This) +#define IXAudio20_StopEngine(This) (This)->lpVtbl->StopEngine(This) +#define IXAudio20_CommitChanges(This,OperationSet) (This)->lpVtbl->CommitChanges(This,OperationSet) +#define IXAudio20_GetPerformanceData(This,pPerfData) (This)->lpVtbl->GetPerformanceData(This,pPerfData) +#define IXAudio20_SetDebugConfiguration(This,pDebugConfiguration,pReserved) (This)->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved) +#else +/*** IUnknown methods ***/ +static FORCEINLINE HRESULT IXAudio20_QueryInterface(IXAudio20* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static FORCEINLINE ULONG IXAudio20_AddRef(IXAudio20* This) { + return This->lpVtbl->AddRef(This); +} +static FORCEINLINE ULONG IXAudio20_Release(IXAudio20* This) { + return This->lpVtbl->Release(This); +} +/*** IXAudio20 methods ***/ +static FORCEINLINE HRESULT IXAudio20_GetDeviceCount(IXAudio20* This,UINT32 *pCount) { + return This->lpVtbl->GetDeviceCount(This,pCount); +} +static FORCEINLINE HRESULT IXAudio20_GetDeviceDetails(IXAudio20* This,UINT32 Index,XAUDIO2_DEVICE_DETAILS *pDeviceDetails) { + return This->lpVtbl->GetDeviceDetails(This,Index,pDeviceDetails); +} +static FORCEINLINE HRESULT IXAudio20_Initialize(IXAudio20* This,UINT32 Flags,XAUDIO2_PROCESSOR XAudio2Processor) { + return This->lpVtbl->Initialize(This,Flags,XAudio2Processor); +} +static FORCEINLINE HRESULT IXAudio20_RegisterForCallbacks(IXAudio20* This,IXAudio2EngineCallback *pCallback) { + return This->lpVtbl->RegisterForCallbacks(This,pCallback); +} +static FORCEINLINE void IXAudio20_UnregisterForCallbacks(IXAudio20* This,IXAudio2EngineCallback *pCallback) { + This->lpVtbl->UnregisterForCallbacks(This,pCallback); +} +static FORCEINLINE HRESULT IXAudio20_CreateSourceVoice(IXAudio20* This,IXAudio2SourceVoice **ppSourceVoice,const WAVEFORMATEX *pSourceFormat,UINT32 Flags,float MaxFrequencyRatio,IXAudio2VoiceCallback *pCallback,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio20_CreateSubmixVoice(IXAudio20* This,IXAudio2SubmixVoice **ppSubmixVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 ProcessingStage,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio20_CreateMasteringVoice(IXAudio20* This,IXAudio2MasteringVoice **ppMasteringVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 DeviceIndex,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio20_StartEngine(IXAudio20* This) { + return This->lpVtbl->StartEngine(This); +} +static FORCEINLINE void IXAudio20_StopEngine(IXAudio20* This) { + This->lpVtbl->StopEngine(This); +} +static FORCEINLINE HRESULT IXAudio20_CommitChanges(IXAudio20* This,UINT32 OperationSet) { + return This->lpVtbl->CommitChanges(This,OperationSet); +} +static FORCEINLINE void IXAudio20_GetPerformanceData(IXAudio20* This,XAUDIO20_PERFORMANCE_DATA *pPerfData) { + This->lpVtbl->GetPerformanceData(This,pPerfData); +} +static FORCEINLINE void IXAudio20_SetDebugConfiguration(IXAudio20* This,const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,void *pReserved) { + This->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved); +} +#endif +#endif + +#endif + +HRESULT STDMETHODCALLTYPE IXAudio20_GetDeviceCount_Proxy( + IXAudio20* This, + UINT32 *pCount); +void __RPC_STUB IXAudio20_GetDeviceCount_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20_GetDeviceDetails_Proxy( + IXAudio20* This, + UINT32 Index, + XAUDIO2_DEVICE_DETAILS *pDeviceDetails); +void __RPC_STUB IXAudio20_GetDeviceDetails_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20_Initialize_Proxy( + IXAudio20* This, + UINT32 Flags, + XAUDIO2_PROCESSOR XAudio2Processor); +void __RPC_STUB IXAudio20_Initialize_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20_RegisterForCallbacks_Proxy( + IXAudio20* This, + IXAudio2EngineCallback *pCallback); +void __RPC_STUB IXAudio20_RegisterForCallbacks_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20_UnregisterForCallbacks_Proxy( + IXAudio20* This, + IXAudio2EngineCallback *pCallback); +void __RPC_STUB IXAudio20_UnregisterForCallbacks_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20_CreateSourceVoice_Proxy( + IXAudio20* This, + IXAudio2SourceVoice **ppSourceVoice, + const WAVEFORMATEX *pSourceFormat, + UINT32 Flags, + float MaxFrequencyRatio, + IXAudio2VoiceCallback *pCallback, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio20_CreateSourceVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20_CreateSubmixVoice_Proxy( + IXAudio20* This, + IXAudio2SubmixVoice **ppSubmixVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 ProcessingStage, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio20_CreateSubmixVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20_CreateMasteringVoice_Proxy( + IXAudio20* This, + IXAudio2MasteringVoice **ppMasteringVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 DeviceIndex, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio20_CreateMasteringVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20_StartEngine_Proxy( + IXAudio20* This); +void __RPC_STUB IXAudio20_StartEngine_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20_StopEngine_Proxy( + IXAudio20* This); +void __RPC_STUB IXAudio20_StopEngine_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio20_CommitChanges_Proxy( + IXAudio20* This, + UINT32 OperationSet); +void __RPC_STUB IXAudio20_CommitChanges_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio20_GetPerformanceData_Proxy( + IXAudio20* This, + XAUDIO20_PERFORMANCE_DATA *pPerfData); +void __RPC_STUB IXAudio20_GetPerformanceData_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio20_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio22 interface + */ +#ifndef __IXAudio22_INTERFACE_DEFINED__ +#define __IXAudio22_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IXAudio22, 0x8bcf1f58, 0x9fe7, 0x4583, 0x8a,0xc6, 0xe2,0xad,0xc4,0x65,0xc8,0xbb); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("8bcf1f58-9fe7-4583-8ac6-e2adc465c8bb") +IXAudio22 : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE GetDeviceCount( + UINT32 *pCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDeviceDetails( + UINT32 Index, + XAUDIO2_DEVICE_DETAILS *pDeviceDetails) = 0; + + virtual HRESULT STDMETHODCALLTYPE Initialize( + UINT32 Flags = 0, + XAUDIO2_PROCESSOR XAudio2Processor = XAUDIO2_DEFAULT_PROCESSOR) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterForCallbacks( + IXAudio2EngineCallback *pCallback) = 0; + + virtual void STDMETHODCALLTYPE UnregisterForCallbacks( + IXAudio2EngineCallback *pCallback) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSourceVoice( + IXAudio2SourceVoice **ppSourceVoice, + const WAVEFORMATEX *pSourceFormat, + UINT32 Flags = 0, + float MaxFrequencyRatio = XAUDIO2_DEFAULT_FREQ_RATIO, + IXAudio2VoiceCallback *pCallback = 0, + const XAUDIO2_VOICE_SENDS *pSendList = 0, + const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSubmixVoice( + IXAudio2SubmixVoice **ppSubmixVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags = 0, + UINT32 ProcessingStage = 0, + const XAUDIO2_VOICE_SENDS *pSendList = 0, + const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateMasteringVoice( + IXAudio2MasteringVoice **ppMasteringVoice, + UINT32 InputChannels = XAUDIO2_DEFAULT_CHANNELS, + UINT32 InputSampleRate = XAUDIO2_DEFAULT_SAMPLERATE, + UINT32 Flags = 0, + UINT32 DeviceIndex = 0, + const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE StartEngine( + ) = 0; + + virtual void STDMETHODCALLTYPE StopEngine( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE CommitChanges( + UINT32 OperationSet) = 0; + + virtual void STDMETHODCALLTYPE GetPerformanceData( + XAUDIO22_PERFORMANCE_DATA *pPerfData) = 0; + + virtual void STDMETHODCALLTYPE SetDebugConfiguration( + const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration, + void *pReserved = 0) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IXAudio22, 0x8bcf1f58, 0x9fe7, 0x4583, 0x8a,0xc6, 0xe2,0xad,0xc4,0x65,0xc8,0xbb) +#endif +#else +typedef struct IXAudio22Vtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IXAudio22* This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IXAudio22* This); + + ULONG (STDMETHODCALLTYPE *Release)( + IXAudio22* This); + + /*** IXAudio22 methods ***/ + HRESULT (STDMETHODCALLTYPE *GetDeviceCount)( + IXAudio22* This, + UINT32 *pCount); + + HRESULT (STDMETHODCALLTYPE *GetDeviceDetails)( + IXAudio22* This, + UINT32 Index, + XAUDIO2_DEVICE_DETAILS *pDeviceDetails); + + HRESULT (STDMETHODCALLTYPE *Initialize)( + IXAudio22* This, + UINT32 Flags, + XAUDIO2_PROCESSOR XAudio2Processor); + + HRESULT (STDMETHODCALLTYPE *RegisterForCallbacks)( + IXAudio22* This, + IXAudio2EngineCallback *pCallback); + + void (STDMETHODCALLTYPE *UnregisterForCallbacks)( + IXAudio22* This, + IXAudio2EngineCallback *pCallback); + + HRESULT (STDMETHODCALLTYPE *CreateSourceVoice)( + IXAudio22* This, + IXAudio2SourceVoice **ppSourceVoice, + const WAVEFORMATEX *pSourceFormat, + UINT32 Flags, + float MaxFrequencyRatio, + IXAudio2VoiceCallback *pCallback, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *CreateSubmixVoice)( + IXAudio22* This, + IXAudio2SubmixVoice **ppSubmixVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 ProcessingStage, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *CreateMasteringVoice)( + IXAudio22* This, + IXAudio2MasteringVoice **ppMasteringVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 DeviceIndex, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *StartEngine)( + IXAudio22* This); + + void (STDMETHODCALLTYPE *StopEngine)( + IXAudio22* This); + + HRESULT (STDMETHODCALLTYPE *CommitChanges)( + IXAudio22* This, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetPerformanceData)( + IXAudio22* This, + XAUDIO22_PERFORMANCE_DATA *pPerfData); + + void (STDMETHODCALLTYPE *SetDebugConfiguration)( + IXAudio22* This, + const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration, + void *pReserved); + + END_INTERFACE +} IXAudio22Vtbl; +interface IXAudio22 { + CONST_VTBL IXAudio22Vtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IXAudio22_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IXAudio22_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IXAudio22_Release(This) (This)->lpVtbl->Release(This) +/*** IXAudio22 methods ***/ +#define IXAudio22_GetDeviceCount(This,pCount) (This)->lpVtbl->GetDeviceCount(This,pCount) +#define IXAudio22_GetDeviceDetails(This,Index,pDeviceDetails) (This)->lpVtbl->GetDeviceDetails(This,Index,pDeviceDetails) +#define IXAudio22_Initialize(This,Flags,XAudio2Processor) (This)->lpVtbl->Initialize(This,Flags,XAudio2Processor) +#define IXAudio22_RegisterForCallbacks(This,pCallback) (This)->lpVtbl->RegisterForCallbacks(This,pCallback) +#define IXAudio22_UnregisterForCallbacks(This,pCallback) (This)->lpVtbl->UnregisterForCallbacks(This,pCallback) +#define IXAudio22_CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (This)->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) +#define IXAudio22_CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) (This)->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) +#define IXAudio22_CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (This)->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) +#define IXAudio22_StartEngine(This) (This)->lpVtbl->StartEngine(This) +#define IXAudio22_StopEngine(This) (This)->lpVtbl->StopEngine(This) +#define IXAudio22_CommitChanges(This,OperationSet) (This)->lpVtbl->CommitChanges(This,OperationSet) +#define IXAudio22_GetPerformanceData(This,pPerfData) (This)->lpVtbl->GetPerformanceData(This,pPerfData) +#define IXAudio22_SetDebugConfiguration(This,pDebugConfiguration,pReserved) (This)->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved) +#else +/*** IUnknown methods ***/ +static FORCEINLINE HRESULT IXAudio22_QueryInterface(IXAudio22* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static FORCEINLINE ULONG IXAudio22_AddRef(IXAudio22* This) { + return This->lpVtbl->AddRef(This); +} +static FORCEINLINE ULONG IXAudio22_Release(IXAudio22* This) { + return This->lpVtbl->Release(This); +} +/*** IXAudio22 methods ***/ +static FORCEINLINE HRESULT IXAudio22_GetDeviceCount(IXAudio22* This,UINT32 *pCount) { + return This->lpVtbl->GetDeviceCount(This,pCount); +} +static FORCEINLINE HRESULT IXAudio22_GetDeviceDetails(IXAudio22* This,UINT32 Index,XAUDIO2_DEVICE_DETAILS *pDeviceDetails) { + return This->lpVtbl->GetDeviceDetails(This,Index,pDeviceDetails); +} +static FORCEINLINE HRESULT IXAudio22_Initialize(IXAudio22* This,UINT32 Flags,XAUDIO2_PROCESSOR XAudio2Processor) { + return This->lpVtbl->Initialize(This,Flags,XAudio2Processor); +} +static FORCEINLINE HRESULT IXAudio22_RegisterForCallbacks(IXAudio22* This,IXAudio2EngineCallback *pCallback) { + return This->lpVtbl->RegisterForCallbacks(This,pCallback); +} +static FORCEINLINE void IXAudio22_UnregisterForCallbacks(IXAudio22* This,IXAudio2EngineCallback *pCallback) { + This->lpVtbl->UnregisterForCallbacks(This,pCallback); +} +static FORCEINLINE HRESULT IXAudio22_CreateSourceVoice(IXAudio22* This,IXAudio2SourceVoice **ppSourceVoice,const WAVEFORMATEX *pSourceFormat,UINT32 Flags,float MaxFrequencyRatio,IXAudio2VoiceCallback *pCallback,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio22_CreateSubmixVoice(IXAudio22* This,IXAudio2SubmixVoice **ppSubmixVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 ProcessingStage,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio22_CreateMasteringVoice(IXAudio22* This,IXAudio2MasteringVoice **ppMasteringVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 DeviceIndex,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio22_StartEngine(IXAudio22* This) { + return This->lpVtbl->StartEngine(This); +} +static FORCEINLINE void IXAudio22_StopEngine(IXAudio22* This) { + This->lpVtbl->StopEngine(This); +} +static FORCEINLINE HRESULT IXAudio22_CommitChanges(IXAudio22* This,UINT32 OperationSet) { + return This->lpVtbl->CommitChanges(This,OperationSet); +} +static FORCEINLINE void IXAudio22_GetPerformanceData(IXAudio22* This,XAUDIO22_PERFORMANCE_DATA *pPerfData) { + This->lpVtbl->GetPerformanceData(This,pPerfData); +} +static FORCEINLINE void IXAudio22_SetDebugConfiguration(IXAudio22* This,const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,void *pReserved) { + This->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved); +} +#endif +#endif + +#endif + +HRESULT STDMETHODCALLTYPE IXAudio22_GetDeviceCount_Proxy( + IXAudio22* This, + UINT32 *pCount); +void __RPC_STUB IXAudio22_GetDeviceCount_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio22_GetDeviceDetails_Proxy( + IXAudio22* This, + UINT32 Index, + XAUDIO2_DEVICE_DETAILS *pDeviceDetails); +void __RPC_STUB IXAudio22_GetDeviceDetails_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio22_Initialize_Proxy( + IXAudio22* This, + UINT32 Flags, + XAUDIO2_PROCESSOR XAudio2Processor); +void __RPC_STUB IXAudio22_Initialize_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio22_RegisterForCallbacks_Proxy( + IXAudio22* This, + IXAudio2EngineCallback *pCallback); +void __RPC_STUB IXAudio22_RegisterForCallbacks_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio22_UnregisterForCallbacks_Proxy( + IXAudio22* This, + IXAudio2EngineCallback *pCallback); +void __RPC_STUB IXAudio22_UnregisterForCallbacks_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio22_CreateSourceVoice_Proxy( + IXAudio22* This, + IXAudio2SourceVoice **ppSourceVoice, + const WAVEFORMATEX *pSourceFormat, + UINT32 Flags, + float MaxFrequencyRatio, + IXAudio2VoiceCallback *pCallback, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio22_CreateSourceVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio22_CreateSubmixVoice_Proxy( + IXAudio22* This, + IXAudio2SubmixVoice **ppSubmixVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 ProcessingStage, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio22_CreateSubmixVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio22_CreateMasteringVoice_Proxy( + IXAudio22* This, + IXAudio2MasteringVoice **ppMasteringVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 DeviceIndex, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio22_CreateMasteringVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio22_StartEngine_Proxy( + IXAudio22* This); +void __RPC_STUB IXAudio22_StartEngine_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio22_StopEngine_Proxy( + IXAudio22* This); +void __RPC_STUB IXAudio22_StopEngine_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio22_CommitChanges_Proxy( + IXAudio22* This, + UINT32 OperationSet); +void __RPC_STUB IXAudio22_CommitChanges_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio22_GetPerformanceData_Proxy( + IXAudio22* This, + XAUDIO22_PERFORMANCE_DATA *pPerfData); +void __RPC_STUB IXAudio22_GetPerformanceData_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio22_INTERFACE_DEFINED__ */ + +/***************************************************************************** + * IXAudio27 interface + */ +#ifndef __IXAudio27_INTERFACE_DEFINED__ +#define __IXAudio27_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IXAudio27, 0x8bcf1f58, 0x9fe7, 0x4583, 0x8a,0xc6, 0xe2,0xad,0xc4,0x65,0xc8,0xbb); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("8bcf1f58-9fe7-4583-8ac6-e2adc465c8bb") +IXAudio27 : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE GetDeviceCount( + UINT32 *pCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDeviceDetails( + UINT32 Index, + XAUDIO2_DEVICE_DETAILS *pDeviceDetails) = 0; + + virtual HRESULT STDMETHODCALLTYPE Initialize( + UINT32 Flags = 0, + XAUDIO2_PROCESSOR XAudio2Processor = XAUDIO2_DEFAULT_PROCESSOR) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterForCallbacks( + IXAudio2EngineCallback *pCallback) = 0; + + virtual void STDMETHODCALLTYPE UnregisterForCallbacks( + IXAudio2EngineCallback *pCallback) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSourceVoice( + IXAudio2SourceVoice **ppSourceVoice, + const WAVEFORMATEX *pSourceFormat, + UINT32 Flags = 0, + float MaxFrequencyRatio = XAUDIO2_DEFAULT_FREQ_RATIO, + IXAudio2VoiceCallback *pCallback = 0, + const XAUDIO2_VOICE_SENDS *pSendList = 0, + const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSubmixVoice( + IXAudio2SubmixVoice **ppSubmixVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags = 0, + UINT32 ProcessingStage = 0, + const XAUDIO2_VOICE_SENDS *pSendList = 0, + const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateMasteringVoice( + IXAudio2MasteringVoice **ppMasteringVoice, + UINT32 InputChannels = XAUDIO2_DEFAULT_CHANNELS, + UINT32 InputSampleRate = XAUDIO2_DEFAULT_SAMPLERATE, + UINT32 Flags = 0, + UINT32 DeviceIndex = 0, + const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE StartEngine( + ) = 0; + + virtual void STDMETHODCALLTYPE StopEngine( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE CommitChanges( + UINT32 OperationSet) = 0; + + virtual void STDMETHODCALLTYPE GetPerformanceData( + XAUDIO2_PERFORMANCE_DATA *pPerfData) = 0; + + virtual void STDMETHODCALLTYPE SetDebugConfiguration( + const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration, + void *pReserved = 0) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IXAudio27, 0x8bcf1f58, 0x9fe7, 0x4583, 0x8a,0xc6, 0xe2,0xad,0xc4,0x65,0xc8,0xbb) +#endif +#else +typedef struct IXAudio27Vtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IXAudio27* This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IXAudio27* This); + + ULONG (STDMETHODCALLTYPE *Release)( + IXAudio27* This); + + /*** IXAudio27 methods ***/ + HRESULT (STDMETHODCALLTYPE *GetDeviceCount)( + IXAudio27* This, + UINT32 *pCount); + + HRESULT (STDMETHODCALLTYPE *GetDeviceDetails)( + IXAudio27* This, + UINT32 Index, + XAUDIO2_DEVICE_DETAILS *pDeviceDetails); + + HRESULT (STDMETHODCALLTYPE *Initialize)( + IXAudio27* This, + UINT32 Flags, + XAUDIO2_PROCESSOR XAudio2Processor); + + HRESULT (STDMETHODCALLTYPE *RegisterForCallbacks)( + IXAudio27* This, + IXAudio2EngineCallback *pCallback); + + void (STDMETHODCALLTYPE *UnregisterForCallbacks)( + IXAudio27* This, + IXAudio2EngineCallback *pCallback); + + HRESULT (STDMETHODCALLTYPE *CreateSourceVoice)( + IXAudio27* This, + IXAudio2SourceVoice **ppSourceVoice, + const WAVEFORMATEX *pSourceFormat, + UINT32 Flags, + float MaxFrequencyRatio, + IXAudio2VoiceCallback *pCallback, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *CreateSubmixVoice)( + IXAudio27* This, + IXAudio2SubmixVoice **ppSubmixVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 ProcessingStage, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *CreateMasteringVoice)( + IXAudio27* This, + IXAudio2MasteringVoice **ppMasteringVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 DeviceIndex, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *StartEngine)( + IXAudio27* This); + + void (STDMETHODCALLTYPE *StopEngine)( + IXAudio27* This); + + HRESULT (STDMETHODCALLTYPE *CommitChanges)( + IXAudio27* This, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetPerformanceData)( + IXAudio27* This, + XAUDIO2_PERFORMANCE_DATA *pPerfData); + + void (STDMETHODCALLTYPE *SetDebugConfiguration)( + IXAudio27* This, + const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration, + void *pReserved); + + END_INTERFACE +} IXAudio27Vtbl; +interface IXAudio27 { + CONST_VTBL IXAudio27Vtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IXAudio27_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IXAudio27_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IXAudio27_Release(This) (This)->lpVtbl->Release(This) +/*** IXAudio27 methods ***/ +#define IXAudio27_GetDeviceCount(This,pCount) (This)->lpVtbl->GetDeviceCount(This,pCount) +#define IXAudio27_GetDeviceDetails(This,Index,pDeviceDetails) (This)->lpVtbl->GetDeviceDetails(This,Index,pDeviceDetails) +#define IXAudio27_Initialize(This,Flags,XAudio2Processor) (This)->lpVtbl->Initialize(This,Flags,XAudio2Processor) +#define IXAudio27_RegisterForCallbacks(This,pCallback) (This)->lpVtbl->RegisterForCallbacks(This,pCallback) +#define IXAudio27_UnregisterForCallbacks(This,pCallback) (This)->lpVtbl->UnregisterForCallbacks(This,pCallback) +#define IXAudio27_CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (This)->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) +#define IXAudio27_CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) (This)->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) +#define IXAudio27_CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (This)->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) +#define IXAudio27_StartEngine(This) (This)->lpVtbl->StartEngine(This) +#define IXAudio27_StopEngine(This) (This)->lpVtbl->StopEngine(This) +#define IXAudio27_CommitChanges(This,OperationSet) (This)->lpVtbl->CommitChanges(This,OperationSet) +#define IXAudio27_GetPerformanceData(This,pPerfData) (This)->lpVtbl->GetPerformanceData(This,pPerfData) +#define IXAudio27_SetDebugConfiguration(This,pDebugConfiguration,pReserved) (This)->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved) +#else +/*** IUnknown methods ***/ +static FORCEINLINE HRESULT IXAudio27_QueryInterface(IXAudio27* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static FORCEINLINE ULONG IXAudio27_AddRef(IXAudio27* This) { + return This->lpVtbl->AddRef(This); +} +static FORCEINLINE ULONG IXAudio27_Release(IXAudio27* This) { + return This->lpVtbl->Release(This); +} +/*** IXAudio27 methods ***/ +static FORCEINLINE HRESULT IXAudio27_GetDeviceCount(IXAudio27* This,UINT32 *pCount) { + return This->lpVtbl->GetDeviceCount(This,pCount); +} +static FORCEINLINE HRESULT IXAudio27_GetDeviceDetails(IXAudio27* This,UINT32 Index,XAUDIO2_DEVICE_DETAILS *pDeviceDetails) { + return This->lpVtbl->GetDeviceDetails(This,Index,pDeviceDetails); +} +static FORCEINLINE HRESULT IXAudio27_Initialize(IXAudio27* This,UINT32 Flags,XAUDIO2_PROCESSOR XAudio2Processor) { + return This->lpVtbl->Initialize(This,Flags,XAudio2Processor); +} +static FORCEINLINE HRESULT IXAudio27_RegisterForCallbacks(IXAudio27* This,IXAudio2EngineCallback *pCallback) { + return This->lpVtbl->RegisterForCallbacks(This,pCallback); +} +static FORCEINLINE void IXAudio27_UnregisterForCallbacks(IXAudio27* This,IXAudio2EngineCallback *pCallback) { + This->lpVtbl->UnregisterForCallbacks(This,pCallback); +} +static FORCEINLINE HRESULT IXAudio27_CreateSourceVoice(IXAudio27* This,IXAudio2SourceVoice **ppSourceVoice,const WAVEFORMATEX *pSourceFormat,UINT32 Flags,float MaxFrequencyRatio,IXAudio2VoiceCallback *pCallback,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio27_CreateSubmixVoice(IXAudio27* This,IXAudio2SubmixVoice **ppSubmixVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 ProcessingStage,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio27_CreateMasteringVoice(IXAudio27* This,IXAudio2MasteringVoice **ppMasteringVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 DeviceIndex,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio27_StartEngine(IXAudio27* This) { + return This->lpVtbl->StartEngine(This); +} +static FORCEINLINE void IXAudio27_StopEngine(IXAudio27* This) { + This->lpVtbl->StopEngine(This); +} +static FORCEINLINE HRESULT IXAudio27_CommitChanges(IXAudio27* This,UINT32 OperationSet) { + return This->lpVtbl->CommitChanges(This,OperationSet); +} +static FORCEINLINE void IXAudio27_GetPerformanceData(IXAudio27* This,XAUDIO2_PERFORMANCE_DATA *pPerfData) { + This->lpVtbl->GetPerformanceData(This,pPerfData); +} +static FORCEINLINE void IXAudio27_SetDebugConfiguration(IXAudio27* This,const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,void *pReserved) { + This->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved); +} +#endif +#endif + +#endif + +HRESULT STDMETHODCALLTYPE IXAudio27_GetDeviceCount_Proxy( + IXAudio27* This, + UINT32 *pCount); +void __RPC_STUB IXAudio27_GetDeviceCount_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27_GetDeviceDetails_Proxy( + IXAudio27* This, + UINT32 Index, + XAUDIO2_DEVICE_DETAILS *pDeviceDetails); +void __RPC_STUB IXAudio27_GetDeviceDetails_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27_Initialize_Proxy( + IXAudio27* This, + UINT32 Flags, + XAUDIO2_PROCESSOR XAudio2Processor); +void __RPC_STUB IXAudio27_Initialize_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27_RegisterForCallbacks_Proxy( + IXAudio27* This, + IXAudio2EngineCallback *pCallback); +void __RPC_STUB IXAudio27_RegisterForCallbacks_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio27_UnregisterForCallbacks_Proxy( + IXAudio27* This, + IXAudio2EngineCallback *pCallback); +void __RPC_STUB IXAudio27_UnregisterForCallbacks_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27_CreateSourceVoice_Proxy( + IXAudio27* This, + IXAudio2SourceVoice **ppSourceVoice, + const WAVEFORMATEX *pSourceFormat, + UINT32 Flags, + float MaxFrequencyRatio, + IXAudio2VoiceCallback *pCallback, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio27_CreateSourceVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27_CreateSubmixVoice_Proxy( + IXAudio27* This, + IXAudio2SubmixVoice **ppSubmixVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 ProcessingStage, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio27_CreateSubmixVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27_CreateMasteringVoice_Proxy( + IXAudio27* This, + IXAudio2MasteringVoice **ppMasteringVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 DeviceIndex, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio27_CreateMasteringVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27_StartEngine_Proxy( + IXAudio27* This); +void __RPC_STUB IXAudio27_StartEngine_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio27_StopEngine_Proxy( + IXAudio27* This); +void __RPC_STUB IXAudio27_StopEngine_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio27_CommitChanges_Proxy( + IXAudio27* This, + UINT32 OperationSet); +void __RPC_STUB IXAudio27_CommitChanges_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio27_GetPerformanceData_Proxy( + IXAudio27* This, + XAUDIO2_PERFORMANCE_DATA *pPerfData); +void __RPC_STUB IXAudio27_GetPerformanceData_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio27_INTERFACE_DEFINED__ */ + +DEFINE_GUID(IID_IXAudio28, 0x60d8dac8, 0x5aa1, 0x4e8e, 0xb5, 0x97, 0x2f, 0x5e, 0x28, 0x83, 0xd4, 0x84); +/***************************************************************************** + * IXAudio2 interface + */ +#ifndef __IXAudio2_INTERFACE_DEFINED__ +#define __IXAudio2_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IXAudio2, 0x2b02e3cf, 0x2e0b, 0x4ec3, 0xbe,0x45, 0x1b,0x2a,0x3f,0xe7,0x21,0x0d); +#if defined(__cplusplus) && !defined(CINTERFACE) +MIDL_INTERFACE("2b02e3cf-2e0b-4ec3-be45-1b2a3fe7210d") +IXAudio2 : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE RegisterForCallbacks( + IXAudio2EngineCallback *pCallback) = 0; + + virtual void STDMETHODCALLTYPE UnregisterForCallbacks( + IXAudio2EngineCallback *pCallback) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSourceVoice( + IXAudio2SourceVoice **ppSourceVoice, + const WAVEFORMATEX *pSourceFormat, + UINT32 Flags = 0, + float MaxFrequencyRatio = XAUDIO2_DEFAULT_FREQ_RATIO, + IXAudio2VoiceCallback *pCallback = 0, + const XAUDIO2_VOICE_SENDS *pSendList = 0, + const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSubmixVoice( + IXAudio2SubmixVoice **ppSubmixVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags = 0, + UINT32 ProcessingStage = 0, + const XAUDIO2_VOICE_SENDS *pSendList = 0, + const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateMasteringVoice( + IXAudio2MasteringVoice **ppMasteringVoice, + UINT32 InputChannels = XAUDIO2_DEFAULT_CHANNELS, + UINT32 InputSampleRate = XAUDIO2_DEFAULT_SAMPLERATE, + UINT32 Flags = 0, + LPCWSTR DeviceId = 0, + const XAUDIO2_EFFECT_CHAIN *pEffectChain = 0, + AUDIO_STREAM_CATEGORY StreamCategory = AudioCategory_GameEffects) = 0; + + virtual HRESULT STDMETHODCALLTYPE StartEngine( + ) = 0; + + virtual void STDMETHODCALLTYPE StopEngine( + ) = 0; + + virtual HRESULT STDMETHODCALLTYPE CommitChanges( + UINT32 OperationSet) = 0; + + virtual void STDMETHODCALLTYPE GetPerformanceData( + XAUDIO2_PERFORMANCE_DATA *pPerfData) = 0; + + virtual void STDMETHODCALLTYPE SetDebugConfiguration( + const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration, + void *pReserved = 0) = 0; + +}; +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IXAudio2, 0x2b02e3cf, 0x2e0b, 0x4ec3, 0xbe,0x45, 0x1b,0x2a,0x3f,0xe7,0x21,0x0d) +#endif +#else +typedef struct IXAudio2Vtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IXAudio2* This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IXAudio2* This); + + ULONG (STDMETHODCALLTYPE *Release)( + IXAudio2* This); + + /*** IXAudio2 methods ***/ + HRESULT (STDMETHODCALLTYPE *RegisterForCallbacks)( + IXAudio2* This, + IXAudio2EngineCallback *pCallback); + + void (STDMETHODCALLTYPE *UnregisterForCallbacks)( + IXAudio2* This, + IXAudio2EngineCallback *pCallback); + + HRESULT (STDMETHODCALLTYPE *CreateSourceVoice)( + IXAudio2* This, + IXAudio2SourceVoice **ppSourceVoice, + const WAVEFORMATEX *pSourceFormat, + UINT32 Flags, + float MaxFrequencyRatio, + IXAudio2VoiceCallback *pCallback, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *CreateSubmixVoice)( + IXAudio2* This, + IXAudio2SubmixVoice **ppSubmixVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 ProcessingStage, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); + + HRESULT (STDMETHODCALLTYPE *CreateMasteringVoice)( + IXAudio2* This, + IXAudio2MasteringVoice **ppMasteringVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + LPCWSTR DeviceId, + const XAUDIO2_EFFECT_CHAIN *pEffectChain, + AUDIO_STREAM_CATEGORY StreamCategory); + + HRESULT (STDMETHODCALLTYPE *StartEngine)( + IXAudio2* This); + + void (STDMETHODCALLTYPE *StopEngine)( + IXAudio2* This); + + HRESULT (STDMETHODCALLTYPE *CommitChanges)( + IXAudio2* This, + UINT32 OperationSet); + + void (STDMETHODCALLTYPE *GetPerformanceData)( + IXAudio2* This, + XAUDIO2_PERFORMANCE_DATA *pPerfData); + + void (STDMETHODCALLTYPE *SetDebugConfiguration)( + IXAudio2* This, + const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration, + void *pReserved); + + END_INTERFACE +} IXAudio2Vtbl; +interface IXAudio2 { + CONST_VTBL IXAudio2Vtbl* lpVtbl; +}; + +#ifdef COBJMACROS +#ifndef WIDL_C_INLINE_WRAPPERS +/*** IUnknown methods ***/ +#define IXAudio2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) +#define IXAudio2_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IXAudio2_Release(This) (This)->lpVtbl->Release(This) +/*** IXAudio2 methods ***/ +#define IXAudio2_RegisterForCallbacks(This,pCallback) (This)->lpVtbl->RegisterForCallbacks(This,pCallback) +#define IXAudio2_UnregisterForCallbacks(This,pCallback) (This)->lpVtbl->UnregisterForCallbacks(This,pCallback) +#define IXAudio2_CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (This)->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) +#define IXAudio2_CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) (This)->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) +#define IXAudio2_CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,StreamCategory) (This)->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,StreamCategory) +#define IXAudio2_StartEngine(This) (This)->lpVtbl->StartEngine(This) +#define IXAudio2_StopEngine(This) (This)->lpVtbl->StopEngine(This) +#define IXAudio2_CommitChanges(This,OperationSet) (This)->lpVtbl->CommitChanges(This,OperationSet) +#define IXAudio2_GetPerformanceData(This,pPerfData) (This)->lpVtbl->GetPerformanceData(This,pPerfData) +#define IXAudio2_SetDebugConfiguration(This,pDebugConfiguration,pReserved) (This)->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved) +#else +/*** IUnknown methods ***/ +static FORCEINLINE HRESULT IXAudio2_QueryInterface(IXAudio2* This,REFIID riid,void **ppvObject) { + return This->lpVtbl->QueryInterface(This,riid,ppvObject); +} +static FORCEINLINE ULONG IXAudio2_AddRef(IXAudio2* This) { + return This->lpVtbl->AddRef(This); +} +static FORCEINLINE ULONG IXAudio2_Release(IXAudio2* This) { + return This->lpVtbl->Release(This); +} +/*** IXAudio2 methods ***/ +static FORCEINLINE HRESULT IXAudio2_RegisterForCallbacks(IXAudio2* This,IXAudio2EngineCallback *pCallback) { + return This->lpVtbl->RegisterForCallbacks(This,pCallback); +} +static FORCEINLINE void IXAudio2_UnregisterForCallbacks(IXAudio2* This,IXAudio2EngineCallback *pCallback) { + This->lpVtbl->UnregisterForCallbacks(This,pCallback); +} +static FORCEINLINE HRESULT IXAudio2_CreateSourceVoice(IXAudio2* This,IXAudio2SourceVoice **ppSourceVoice,const WAVEFORMATEX *pSourceFormat,UINT32 Flags,float MaxFrequencyRatio,IXAudio2VoiceCallback *pCallback,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio2_CreateSubmixVoice(IXAudio2* This,IXAudio2SubmixVoice **ppSubmixVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,UINT32 ProcessingStage,const XAUDIO2_VOICE_SENDS *pSendList,const XAUDIO2_EFFECT_CHAIN *pEffectChain) { + return This->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain); +} +static FORCEINLINE HRESULT IXAudio2_CreateMasteringVoice(IXAudio2* This,IXAudio2MasteringVoice **ppMasteringVoice,UINT32 InputChannels,UINT32 InputSampleRate,UINT32 Flags,LPCWSTR DeviceId,const XAUDIO2_EFFECT_CHAIN *pEffectChain,AUDIO_STREAM_CATEGORY StreamCategory) { + return This->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,StreamCategory); +} +static FORCEINLINE HRESULT IXAudio2_StartEngine(IXAudio2* This) { + return This->lpVtbl->StartEngine(This); +} +static FORCEINLINE void IXAudio2_StopEngine(IXAudio2* This) { + This->lpVtbl->StopEngine(This); +} +static FORCEINLINE HRESULT IXAudio2_CommitChanges(IXAudio2* This,UINT32 OperationSet) { + return This->lpVtbl->CommitChanges(This,OperationSet); +} +static FORCEINLINE void IXAudio2_GetPerformanceData(IXAudio2* This,XAUDIO2_PERFORMANCE_DATA *pPerfData) { + This->lpVtbl->GetPerformanceData(This,pPerfData); +} +static FORCEINLINE void IXAudio2_SetDebugConfiguration(IXAudio2* This,const XAUDIO2_DEBUG_CONFIGURATION *pDebugConfiguration,void *pReserved) { + This->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved); +} +#endif +#endif + +#endif + +HRESULT STDMETHODCALLTYPE IXAudio2_RegisterForCallbacks_Proxy( + IXAudio2* This, + IXAudio2EngineCallback *pCallback); +void __RPC_STUB IXAudio2_RegisterForCallbacks_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2_UnregisterForCallbacks_Proxy( + IXAudio2* This, + IXAudio2EngineCallback *pCallback); +void __RPC_STUB IXAudio2_UnregisterForCallbacks_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2_CreateSourceVoice_Proxy( + IXAudio2* This, + IXAudio2SourceVoice **ppSourceVoice, + const WAVEFORMATEX *pSourceFormat, + UINT32 Flags, + float MaxFrequencyRatio, + IXAudio2VoiceCallback *pCallback, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio2_CreateSourceVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2_CreateSubmixVoice_Proxy( + IXAudio2* This, + IXAudio2SubmixVoice **ppSubmixVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + UINT32 ProcessingStage, + const XAUDIO2_VOICE_SENDS *pSendList, + const XAUDIO2_EFFECT_CHAIN *pEffectChain); +void __RPC_STUB IXAudio2_CreateSubmixVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2_CreateMasteringVoice_Proxy( + IXAudio2* This, + IXAudio2MasteringVoice **ppMasteringVoice, + UINT32 InputChannels, + UINT32 InputSampleRate, + UINT32 Flags, + LPCWSTR DeviceId, + const XAUDIO2_EFFECT_CHAIN *pEffectChain, + AUDIO_STREAM_CATEGORY StreamCategory); +void __RPC_STUB IXAudio2_CreateMasteringVoice_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2_StartEngine_Proxy( + IXAudio2* This); +void __RPC_STUB IXAudio2_StartEngine_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2_StopEngine_Proxy( + IXAudio2* This); +void __RPC_STUB IXAudio2_StopEngine_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT STDMETHODCALLTYPE IXAudio2_CommitChanges_Proxy( + IXAudio2* This, + UINT32 OperationSet); +void __RPC_STUB IXAudio2_CommitChanges_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +void STDMETHODCALLTYPE IXAudio2_GetPerformanceData_Proxy( + IXAudio2* This, + XAUDIO2_PERFORMANCE_DATA *pPerfData); +void __RPC_STUB IXAudio2_GetPerformanceData_Stub( + IRpcStubBuffer* This, + IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); + +#endif /* __IXAudio2_INTERFACE_DEFINED__ */ + +#define XAUDIO2_DEBUG_ENGINE (1) + +#define XAUDIO2_VOICE_NOPITCH (2) + +#define XAUDIO2_VOICE_NOSRC (4) + +#define XAUDIO2_VOICE_USEFILTER (8) + +#define XAUDIO2_VOICE_MUSIC (16) + +#define XAUDIO2_PLAY_TAILS (32) + +#define XAUDIO2_END_OF_STREAM (64) + +#define XAUDIO2_SEND_USEFILTER (128) + +#define XAUDIO2_VOICE_NOSAMPLESPLAYED (256) + +#define XAUDIO2_DEFAULT_FILTER_TYPE (LowPassFilter) + +#define XAUDIO2_DEFAULT_FILTER_FREQUENCY (XAUDIO2_MAX_FILTER_FREQUENCY) + +#define XAUDIO2_DEFAULT_FILTER_ONEOVERQ (1.00000000000000) + +#define XAUDIO2_QUANTUM_NUMERATOR (1) + +#define XAUDIO2_QUANTUM_DENOMINATOR (100) + +#define XAUDIO2_QUANTUM_MS ((1000.00000000000 * XAUDIO2_QUANTUM_NUMERATOR) / XAUDIO2_QUANTUM_DENOMINATOR) + +#define XAUDIO2_E_INVALID_CALL (0x88960001) + +#define XAUDIO2_E_XMA_DECODER_ERROR (0x88960002) + +#define XAUDIO2_E_XAPO_CREATION_FAILED (0x88960003) + +#define XAUDIO2_E_DEVICE_INVALIDATED (0x88960004) + +#define XAUDIO20_E_XMA_DECODER_ERROR (0x88960001) + +#define XAUDIO20_E_XAPO_CREATION_FAILED (0x88960002) + +#define XAUDIO20_E_DEVICE_INVALIDATED (0x88960003) + +#ifdef XAUDIO2_HELPER_FUNCTIONS +#define _USE_MATH_DEFINES +#include +inline static float XAudio2DecibelsToAmplitudeRatio(float decibels) { return powf(10.0f, decibels/20.0f); } +inline static float XAudio2AmplitudeRatioToDecibels(float volume) { if (volume == 0) { return -3.402823466e+38f; } return 20.0f * log10f(volume); } +inline static float XAudio2SemitonesToFrequencyRatio(float semitones) { return powf(2.0f, semitones/12.0f); } +inline static float XAudio2FrequencyRatioToSemitones(float freqratio) { return 39.86313713864835f * log10f(freqratio); } +inline static float XAudio2CutoffFrequencyToRadians(float cutofffreq, UINT32 samplerate) { if ((UINT32)(cutofffreq * 6.0f) >= samplerate) { return XAUDIO2_MAX_FILTER_FREQUENCY; } return 2.0f * sinf((float)M_PI * cutofffreq / samplerate); } +inline static float XAudio2RadiansToCutoffFrequency(float radians, float samplerate) { return samplerate * asinf(radians/2.0f) / (float)M_PI; } +#endif +HRESULT WINAPI XAudio2Create(IXAudio2** pxaudio2, UINT32 flags, XAUDIO2_PROCESSOR processor); +#include +/* Begin additional prototypes for all interfaces */ + + +/* End additional prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif /* __widl_tab__ */ diff --git a/3rdparty/win81sdk/Include/um/xaudio2.h b/3rdparty/win81sdk/Include/um/xaudio2.h deleted file mode 100644 index e44c6a0f163..00000000000 --- a/3rdparty/win81sdk/Include/um/xaudio2.h +++ /dev/null @@ -1,1196 +0,0 @@ -/************************************************************************** - * - * Copyright (c) Microsoft Corporation. All rights reserved. - * - * File: xaudio2.h - * Content: Declarations for the XAudio2 game audio API. - * - **************************************************************************/ - -#ifdef _MSC_VER -#pragma once -#endif - -#ifndef __XAUDIO2_INCLUDED__ -#define __XAUDIO2_INCLUDED__ - -#include - -#if(_WIN32_WINNT < _WIN32_WINNT_WIN8) -#error "This version of XAudio2 is available only in Windows 8 or later. Use the XAudio2 headers and libraries from the DirectX SDK with applications that target Windows 7 and earlier versions." -#endif // (_WIN32_WINNT < _WIN32_WINNT_WIN8) - -#include - -#pragma region Application Family -#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) - -// Current name of the DLL shipped in the same SDK as this header. -// The name reflects the current version -#define XAUDIO2_DLL_A "xaudio2_8.dll" -#define XAUDIO2_DLL_W L"xaudio2_8.dll" - -#ifdef UNICODE - #define XAUDIO2_DLL XAUDIO2_DLL_W -#else - #define XAUDIO2_DLL XAUDIO2_DLL_A -#endif - - -/************************************************************************** - * - * XAudio2 COM object class and interface IDs. - * - **************************************************************************/ - -#include - -// XAudio 2.8 -interface __declspec(uuid("60d8dac8-5aa1-4e8e-b597-2f5e2883d484")) IXAudio2; - -// Ignore the rest of this header if only the GUID definitions were requested -#ifndef GUID_DEFS_ONLY - -#include // Windows COM declarations - -#include // Markers for documenting API semantics -#include // Basic data types and constants for audio work -#include // For AUDIO_STREAM_CATEGORY - -// All structures defined in this file use tight field packing -#pragma pack(push, 1) - - -/************************************************************************** - * - * XAudio2 constants, flags and error codes. - * - **************************************************************************/ - -// Numeric boundary values -#define XAUDIO2_MAX_BUFFER_BYTES 0x80000000 // Maximum bytes allowed in a source buffer -#define XAUDIO2_MAX_QUEUED_BUFFERS 64 // Maximum buffers allowed in a voice queue -#define XAUDIO2_MAX_BUFFERS_SYSTEM 2 // Maximum buffers allowed for system threads (Xbox 360 only) -#define XAUDIO2_MAX_AUDIO_CHANNELS 64 // Maximum channels in an audio stream -#define XAUDIO2_MIN_SAMPLE_RATE 1000 // Minimum audio sample rate supported -#define XAUDIO2_MAX_SAMPLE_RATE 200000 // Maximum audio sample rate supported -#define XAUDIO2_MAX_VOLUME_LEVEL 16777216.0f // Maximum acceptable volume level (2^24) -#define XAUDIO2_MIN_FREQ_RATIO (1/1024.0f) // Minimum SetFrequencyRatio argument -#define XAUDIO2_MAX_FREQ_RATIO 1024.0f // Maximum MaxFrequencyRatio argument -#define XAUDIO2_DEFAULT_FREQ_RATIO 2.0f // Default MaxFrequencyRatio argument -#define XAUDIO2_MAX_FILTER_ONEOVERQ 1.5f // Maximum XAUDIO2_FILTER_PARAMETERS.OneOverQ -#define XAUDIO2_MAX_FILTER_FREQUENCY 1.0f // Maximum XAUDIO2_FILTER_PARAMETERS.Frequency -#define XAUDIO2_MAX_LOOP_COUNT 254 // Maximum non-infinite XAUDIO2_BUFFER.LoopCount -#define XAUDIO2_MAX_INSTANCES 8 // Maximum simultaneous XAudio2 objects on Xbox 360 - -// For XMA voices on Xbox 360 there is an additional restriction on the MaxFrequencyRatio -// argument and the voice's sample rate: the product of these numbers cannot exceed 600000 -// for one-channel voices or 300000 for voices with more than one channel. -#define XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MONO 600000 -#define XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MULTICHANNEL 300000 - -// Numeric values with special meanings -#define XAUDIO2_COMMIT_NOW 0 // Used as an OperationSet argument -#define XAUDIO2_COMMIT_ALL 0 // Used in IXAudio2::CommitChanges -#define XAUDIO2_INVALID_OPSET (UINT32)(-1) // Not allowed for OperationSet arguments -#define XAUDIO2_NO_LOOP_REGION 0 // Used in XAUDIO2_BUFFER.LoopCount -#define XAUDIO2_LOOP_INFINITE 255 // Used in XAUDIO2_BUFFER.LoopCount -#define XAUDIO2_DEFAULT_CHANNELS 0 // Used in CreateMasteringVoice -#define XAUDIO2_DEFAULT_SAMPLERATE 0 // Used in CreateMasteringVoice - -// Flags -#define XAUDIO2_VOICE_NOPITCH 0x0002 // Used in IXAudio2::CreateSourceVoice -#define XAUDIO2_VOICE_NOSRC 0x0004 // Used in IXAudio2::CreateSourceVoice -#define XAUDIO2_VOICE_USEFILTER 0x0008 // Used in IXAudio2::CreateSource/SubmixVoice -#define XAUDIO2_PLAY_TAILS 0x0020 // Used in IXAudio2SourceVoice::Stop -#define XAUDIO2_END_OF_STREAM 0x0040 // Used in XAUDIO2_BUFFER.Flags -#define XAUDIO2_SEND_USEFILTER 0x0080 // Used in XAUDIO2_SEND_DESCRIPTOR.Flags -#define XAUDIO2_VOICE_NOSAMPLESPLAYED 0x0100 // Used in IXAudio2SourceVoice::GetState - -// Default parameters for the built-in filter -#define XAUDIO2_DEFAULT_FILTER_TYPE LowPassFilter -#define XAUDIO2_DEFAULT_FILTER_FREQUENCY XAUDIO2_MAX_FILTER_FREQUENCY -#define XAUDIO2_DEFAULT_FILTER_ONEOVERQ 1.0f - -// Internal XAudio2 constants -#define XAUDIO2_QUANTUM_NUMERATOR 1 // On Windows, XAudio2 processes audio -#define XAUDIO2_QUANTUM_DENOMINATOR 100 // in 10ms chunks (= 1/100 seconds) -#define XAUDIO2_QUANTUM_MS (1000.0f * XAUDIO2_QUANTUM_NUMERATOR / XAUDIO2_QUANTUM_DENOMINATOR) - -// XAudio2 error codes -#define FACILITY_XAUDIO2 0x896 -#define XAUDIO2_E_INVALID_CALL 0x88960001 // An API call or one of its arguments was illegal -#define XAUDIO2_E_XMA_DECODER_ERROR 0x88960002 // The XMA hardware suffered an unrecoverable error -#define XAUDIO2_E_XAPO_CREATION_FAILED 0x88960003 // XAudio2 failed to initialize an XAPO effect -#define XAUDIO2_E_DEVICE_INVALIDATED 0x88960004 // An audio device became unusable (unplugged, etc) - - -/************************************************************************** - * - * Forward declarations for the XAudio2 interfaces. - * - **************************************************************************/ - -#ifdef __cplusplus - #define FWD_DECLARE(x) interface x -#else - #define FWD_DECLARE(x) typedef interface x x -#endif - -FWD_DECLARE(IXAudio2); -FWD_DECLARE(IXAudio2Voice); -FWD_DECLARE(IXAudio2SourceVoice); -FWD_DECLARE(IXAudio2SubmixVoice); -FWD_DECLARE(IXAudio2MasteringVoice); -FWD_DECLARE(IXAudio2EngineCallback); -FWD_DECLARE(IXAudio2VoiceCallback); - - -/************************************************************************** - * - * XAudio2 structures and enumerations. - * - **************************************************************************/ - -// Used in XAudio2Create, specifies which CPU(s) to use. -typedef UINT32 XAUDIO2_PROCESSOR; -#define Processor1 0x00000001 -#define Processor2 0x00000002 -#define Processor3 0x00000004 -#define Processor4 0x00000008 -#define Processor5 0x00000010 -#define Processor6 0x00000020 -#define Processor7 0x00000040 -#define Processor8 0x00000080 -#define Processor9 0x00000100 -#define Processor10 0x00000200 -#define Processor11 0x00000400 -#define Processor12 0x00000800 -#define Processor13 0x00001000 -#define Processor14 0x00002000 -#define Processor15 0x00004000 -#define Processor16 0x00008000 -#define Processor17 0x00010000 -#define Processor18 0x00020000 -#define Processor19 0x00040000 -#define Processor20 0x00080000 -#define Processor21 0x00100000 -#define Processor22 0x00200000 -#define Processor23 0x00400000 -#define Processor24 0x00800000 -#define Processor25 0x01000000 -#define Processor26 0x02000000 -#define Processor27 0x04000000 -#define Processor28 0x08000000 -#define Processor29 0x10000000 -#define Processor30 0x20000000 -#define Processor31 0x40000000 -#define Processor32 0x80000000 -#define XAUDIO2_ANY_PROCESSOR 0xffffffff -#define XAUDIO2_DEFAULT_PROCESSOR Processor1 - -// Returned by IXAudio2Voice::GetVoiceDetails -typedef struct XAUDIO2_VOICE_DETAILS -{ - UINT32 CreationFlags; // Flags the voice was created with. - UINT32 ActiveFlags; // Flags currently active. - UINT32 InputChannels; // Channels in the voice's input audio. - UINT32 InputSampleRate; // Sample rate of the voice's input audio. -} XAUDIO2_VOICE_DETAILS; - -// Used in XAUDIO2_VOICE_SENDS below -typedef struct XAUDIO2_SEND_DESCRIPTOR -{ - UINT32 Flags; // Either 0 or XAUDIO2_SEND_USEFILTER. - IXAudio2Voice* pOutputVoice; // This send's destination voice. -} XAUDIO2_SEND_DESCRIPTOR; - -// Used in the voice creation functions and in IXAudio2Voice::SetOutputVoices -typedef struct XAUDIO2_VOICE_SENDS -{ - UINT32 SendCount; // Number of sends from this voice. - XAUDIO2_SEND_DESCRIPTOR* pSends; // Array of SendCount send descriptors. -} XAUDIO2_VOICE_SENDS; - -// Used in XAUDIO2_EFFECT_CHAIN below -typedef struct XAUDIO2_EFFECT_DESCRIPTOR -{ - IUnknown* pEffect; // Pointer to the effect object's IUnknown interface. - BOOL InitialState; // TRUE if the effect should begin in the enabled state. - UINT32 OutputChannels; // How many output channels the effect should produce. -} XAUDIO2_EFFECT_DESCRIPTOR; - -// Used in the voice creation functions and in IXAudio2Voice::SetEffectChain -typedef struct XAUDIO2_EFFECT_CHAIN -{ - UINT32 EffectCount; // Number of effects in this voice's effect chain. - XAUDIO2_EFFECT_DESCRIPTOR* pEffectDescriptors; // Array of effect descriptors. -} XAUDIO2_EFFECT_CHAIN; - -// Used in XAUDIO2_FILTER_PARAMETERS below -typedef enum XAUDIO2_FILTER_TYPE -{ - LowPassFilter, // Attenuates frequencies above the cutoff frequency (state-variable filter). - BandPassFilter, // Attenuates frequencies outside a given range (state-variable filter). - HighPassFilter, // Attenuates frequencies below the cutoff frequency (state-variable filter). - NotchFilter, // Attenuates frequencies inside a given range (state-variable filter). - LowPassOnePoleFilter, // Attenuates frequencies above the cutoff frequency (one-pole filter, XAUDIO2_FILTER_PARAMETERS.OneOverQ has no effect) - HighPassOnePoleFilter // Attenuates frequencies below the cutoff frequency (one-pole filter, XAUDIO2_FILTER_PARAMETERS.OneOverQ has no effect) -} XAUDIO2_FILTER_TYPE; - -// Used in IXAudio2Voice::Set/GetFilterParameters and Set/GetOutputFilterParameters -typedef struct XAUDIO2_FILTER_PARAMETERS -{ - XAUDIO2_FILTER_TYPE Type; // Filter type. - float Frequency; // Filter coefficient. - // must be >= 0 and <= XAUDIO2_MAX_FILTER_FREQUENCY - // See XAudio2CutoffFrequencyToRadians() for state-variable filter types and - // XAudio2CutoffFrequencyToOnePoleCoefficient() for one-pole filter types. - float OneOverQ; // Reciprocal of the filter's quality factor Q; - // must be > 0 and <= XAUDIO2_MAX_FILTER_ONEOVERQ. - // Has no effect for one-pole filters. -} XAUDIO2_FILTER_PARAMETERS; - -// Used in IXAudio2SourceVoice::SubmitSourceBuffer -typedef struct XAUDIO2_BUFFER -{ - UINT32 Flags; // Either 0 or XAUDIO2_END_OF_STREAM. - UINT32 AudioBytes; // Size of the audio data buffer in bytes. - const BYTE* pAudioData; // Pointer to the audio data buffer. - UINT32 PlayBegin; // First sample in this buffer to be played. - UINT32 PlayLength; // Length of the region to be played in samples, - // or 0 to play the whole buffer. - UINT32 LoopBegin; // First sample of the region to be looped. - UINT32 LoopLength; // Length of the desired loop region in samples, - // or 0 to loop the entire buffer. - UINT32 LoopCount; // Number of times to repeat the loop region, - // or XAUDIO2_LOOP_INFINITE to loop forever. - void* pContext; // Context value to be passed back in callbacks. -} XAUDIO2_BUFFER; - -// Used in IXAudio2SourceVoice::SubmitSourceBuffer when submitting XWMA data. -// NOTE: If an XWMA sound is submitted in more than one buffer, each buffer's -// pDecodedPacketCumulativeBytes[PacketCount-1] value must be subtracted from -// all the entries in the next buffer's pDecodedPacketCumulativeBytes array. -// And whether a sound is submitted in more than one buffer or not, the final -// buffer of the sound should use the XAUDIO2_END_OF_STREAM flag, or else the -// client must call IXAudio2SourceVoice::Discontinuity after submitting it. -typedef struct XAUDIO2_BUFFER_WMA -{ - const UINT32* pDecodedPacketCumulativeBytes; // Decoded packet's cumulative size array. - // Each element is the number of bytes accumulated - // when the corresponding XWMA packet is decoded in - // order. The array must have PacketCount elements. - UINT32 PacketCount; // Number of XWMA packets submitted. Must be >= 1 and - // divide evenly into XAUDIO2_BUFFER.AudioBytes. -} XAUDIO2_BUFFER_WMA; - -// Returned by IXAudio2SourceVoice::GetState -typedef struct XAUDIO2_VOICE_STATE -{ - void* pCurrentBufferContext; // The pContext value provided in the XAUDIO2_BUFFER - // that is currently being processed, or NULL if - // there are no buffers in the queue. - UINT32 BuffersQueued; // Number of buffers currently queued on the voice - // (including the one that is being processed). - UINT64 SamplesPlayed; // Total number of samples produced by the voice since - // it began processing the current audio stream. - // If XAUDIO2_VOICE_NOSAMPLESPLAYED is specified - // in the call to IXAudio2SourceVoice::GetState, - // this member will not be calculated, saving CPU. -} XAUDIO2_VOICE_STATE; - -// Returned by IXAudio2::GetPerformanceData -typedef struct XAUDIO2_PERFORMANCE_DATA -{ - // CPU usage information - UINT64 AudioCyclesSinceLastQuery; // CPU cycles spent on audio processing since the - // last call to StartEngine or GetPerformanceData. - UINT64 TotalCyclesSinceLastQuery; // Total CPU cycles elapsed since the last call - // (only counts the CPU XAudio2 is running on). - UINT32 MinimumCyclesPerQuantum; // Fewest CPU cycles spent processing any one - // audio quantum since the last call. - UINT32 MaximumCyclesPerQuantum; // Most CPU cycles spent processing any one - // audio quantum since the last call. - - // Memory usage information - UINT32 MemoryUsageInBytes; // Total heap space currently in use. - - // Audio latency and glitching information - UINT32 CurrentLatencyInSamples; // Minimum delay from when a sample is read from a - // source buffer to when it reaches the speakers. - UINT32 GlitchesSinceEngineStarted; // Audio dropouts since the engine was started. - - // Data about XAudio2's current workload - UINT32 ActiveSourceVoiceCount; // Source voices currently playing. - UINT32 TotalSourceVoiceCount; // Source voices currently existing. - UINT32 ActiveSubmixVoiceCount; // Submix voices currently playing/existing. - - UINT32 ActiveResamplerCount; // Resample xAPOs currently active. - UINT32 ActiveMatrixMixCount; // MatrixMix xAPOs currently active. - - // Usage of the hardware XMA decoder (Xbox 360 only) - UINT32 ActiveXmaSourceVoices; // Number of source voices decoding XMA data. - UINT32 ActiveXmaStreams; // A voice can use more than one XMA stream. -} XAUDIO2_PERFORMANCE_DATA; - -// Used in IXAudio2::SetDebugConfiguration -typedef struct XAUDIO2_DEBUG_CONFIGURATION -{ - UINT32 TraceMask; // Bitmap of enabled debug message types. - UINT32 BreakMask; // Message types that will break into the debugger. - BOOL LogThreadID; // Whether to log the thread ID with each message. - BOOL LogFileline; // Whether to log the source file and line number. - BOOL LogFunctionName; // Whether to log the function name. - BOOL LogTiming; // Whether to log message timestamps. -} XAUDIO2_DEBUG_CONFIGURATION; - -// Values for the TraceMask and BreakMask bitmaps. Only ERRORS and WARNINGS -// are valid in BreakMask. WARNINGS implies ERRORS, DETAIL implies INFO, and -// FUNC_CALLS implies API_CALLS. By default, TraceMask is ERRORS and WARNINGS -// and all the other settings are zero. -#define XAUDIO2_LOG_ERRORS 0x0001 // For handled errors with serious effects. -#define XAUDIO2_LOG_WARNINGS 0x0002 // For handled errors that may be recoverable. -#define XAUDIO2_LOG_INFO 0x0004 // Informational chit-chat (e.g. state changes). -#define XAUDIO2_LOG_DETAIL 0x0008 // More detailed chit-chat. -#define XAUDIO2_LOG_API_CALLS 0x0010 // Public API function entries and exits. -#define XAUDIO2_LOG_FUNC_CALLS 0x0020 // Internal function entries and exits. -#define XAUDIO2_LOG_TIMING 0x0040 // Delays detected and other timing data. -#define XAUDIO2_LOG_LOCKS 0x0080 // Usage of critical sections and mutexes. -#define XAUDIO2_LOG_MEMORY 0x0100 // Memory heap usage information. -#define XAUDIO2_LOG_STREAMING 0x1000 // Audio streaming information. - - -/************************************************************************** - * - * IXAudio2: Top-level XAudio2 COM interface. - * - **************************************************************************/ - -// Use default arguments if compiling as C++ -#ifdef __cplusplus - #define X2DEFAULT(x) =x -#else - #define X2DEFAULT(x) -#endif - -#undef INTERFACE -#define INTERFACE IXAudio2 -DECLARE_INTERFACE_(IXAudio2, IUnknown) -{ - // NAME: IXAudio2::QueryInterface - // DESCRIPTION: Queries for a given COM interface on the XAudio2 object. - // Only IID_IUnknown and IID_IXAudio2 are supported. - // - // ARGUMENTS: - // riid - IID of the interface to be obtained. - // ppvInterface - Returns a pointer to the requested interface. - // - STDMETHOD(QueryInterface) (THIS_ REFIID riid, _Outptr_ void** ppvInterface) PURE; - - // NAME: IXAudio2::AddRef - // DESCRIPTION: Adds a reference to the XAudio2 object. - // - STDMETHOD_(ULONG, AddRef) (THIS) PURE; - - // NAME: IXAudio2::Release - // DESCRIPTION: Releases a reference to the XAudio2 object. - // - STDMETHOD_(ULONG, Release) (THIS) PURE; - - // NAME: IXAudio2::RegisterForCallbacks - // DESCRIPTION: Adds a new client to receive XAudio2's engine callbacks. - // - // ARGUMENTS: - // pCallback - Callback interface to be called during each processing pass. - // - STDMETHOD(RegisterForCallbacks) (_In_ IXAudio2EngineCallback* pCallback) PURE; - - // NAME: IXAudio2::UnregisterForCallbacks - // DESCRIPTION: Removes an existing receiver of XAudio2 engine callbacks. - // - // ARGUMENTS: - // pCallback - Previously registered callback interface to be removed. - // - STDMETHOD_(void, UnregisterForCallbacks) (_In_ IXAudio2EngineCallback* pCallback) PURE; - - // NAME: IXAudio2::CreateSourceVoice - // DESCRIPTION: Creates and configures a source voice. - // - // ARGUMENTS: - // ppSourceVoice - Returns the new object's IXAudio2SourceVoice interface. - // pSourceFormat - Format of the audio that will be fed to the voice. - // Flags - XAUDIO2_VOICE flags specifying the source voice's behavior. - // MaxFrequencyRatio - Maximum SetFrequencyRatio argument to be allowed. - // pCallback - Optional pointer to a client-provided callback interface. - // pSendList - Optional list of voices this voice should send audio to. - // pEffectChain - Optional list of effects to apply to the audio data. - // - STDMETHOD(CreateSourceVoice) (THIS_ _Outptr_ IXAudio2SourceVoice** ppSourceVoice, - _In_ const WAVEFORMATEX* pSourceFormat, - UINT32 Flags X2DEFAULT(0), - float MaxFrequencyRatio X2DEFAULT(XAUDIO2_DEFAULT_FREQ_RATIO), - _In_opt_ IXAudio2VoiceCallback* pCallback X2DEFAULT(NULL), - _In_opt_ const XAUDIO2_VOICE_SENDS* pSendList X2DEFAULT(NULL), - _In_opt_ const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE; - - // NAME: IXAudio2::CreateSubmixVoice - // DESCRIPTION: Creates and configures a submix voice. - // - // ARGUMENTS: - // ppSubmixVoice - Returns the new object's IXAudio2SubmixVoice interface. - // InputChannels - Number of channels in this voice's input audio data. - // InputSampleRate - Sample rate of this voice's input audio data. - // Flags - XAUDIO2_VOICE flags specifying the submix voice's behavior. - // ProcessingStage - Arbitrary number that determines the processing order. - // pSendList - Optional list of voices this voice should send audio to. - // pEffectChain - Optional list of effects to apply to the audio data. - // - STDMETHOD(CreateSubmixVoice) (THIS_ _Outptr_ IXAudio2SubmixVoice** ppSubmixVoice, - UINT32 InputChannels, UINT32 InputSampleRate, - UINT32 Flags X2DEFAULT(0), UINT32 ProcessingStage X2DEFAULT(0), - _In_opt_ const XAUDIO2_VOICE_SENDS* pSendList X2DEFAULT(NULL), - _In_opt_ const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE; - - - // NAME: IXAudio2::CreateMasteringVoice - // DESCRIPTION: Creates and configures a mastering voice. - // - // ARGUMENTS: - // ppMasteringVoice - Returns the new object's IXAudio2MasteringVoice interface. - // InputChannels - Number of channels in this voice's input audio data. - // InputSampleRate - Sample rate of this voice's input audio data. - // Flags - XAUDIO2_VOICE flags specifying the mastering voice's behavior. - // szDeviceId - Identifier of the device to receive the output audio. - // pEffectChain - Optional list of effects to apply to the audio data. - // StreamCategory - The audio stream category to use for this mastering voice - // - STDMETHOD(CreateMasteringVoice) (THIS_ _Outptr_ IXAudio2MasteringVoice** ppMasteringVoice, - UINT32 InputChannels X2DEFAULT(XAUDIO2_DEFAULT_CHANNELS), - UINT32 InputSampleRate X2DEFAULT(XAUDIO2_DEFAULT_SAMPLERATE), - UINT32 Flags X2DEFAULT(0), _In_opt_z_ LPCWSTR szDeviceId X2DEFAULT(NULL), - _In_opt_ const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL), - _In_ AUDIO_STREAM_CATEGORY StreamCategory X2DEFAULT(AudioCategory_GameEffects)) PURE; - - // NAME: IXAudio2::StartEngine - // DESCRIPTION: Creates and starts the audio processing thread. - // - STDMETHOD(StartEngine) (THIS) PURE; - - // NAME: IXAudio2::StopEngine - // DESCRIPTION: Stops and destroys the audio processing thread. - // - STDMETHOD_(void, StopEngine) (THIS) PURE; - - // NAME: IXAudio2::CommitChanges - // DESCRIPTION: Atomically applies a set of operations previously tagged - // with a given identifier. - // - // ARGUMENTS: - // OperationSet - Identifier of the set of operations to be applied. - // - STDMETHOD(CommitChanges) (THIS_ UINT32 OperationSet) PURE; - - // NAME: IXAudio2::GetPerformanceData - // DESCRIPTION: Returns current resource usage details: memory, CPU, etc. - // - // ARGUMENTS: - // pPerfData - Returns the performance data structure. - // - STDMETHOD_(void, GetPerformanceData) (THIS_ _Out_ XAUDIO2_PERFORMANCE_DATA* pPerfData) PURE; - - // NAME: IXAudio2::SetDebugConfiguration - // DESCRIPTION: Configures XAudio2's debug output (in debug builds only). - // - // ARGUMENTS: - // pDebugConfiguration - Structure describing the debug output behavior. - // pReserved - Optional parameter; must be NULL. - // - STDMETHOD_(void, SetDebugConfiguration) (THIS_ _In_opt_ const XAUDIO2_DEBUG_CONFIGURATION* pDebugConfiguration, - _Reserved_ void* pReserved X2DEFAULT(NULL)) PURE; -}; - - -/************************************************************************** - * - * IXAudio2Voice: Base voice management interface. - * - **************************************************************************/ - -#undef INTERFACE -#define INTERFACE IXAudio2Voice -DECLARE_INTERFACE(IXAudio2Voice) -{ - // These methods are declared in a macro so that the same declarations - // can be used in the derived voice types (IXAudio2SourceVoice, etc). - - #define Declare_IXAudio2Voice_Methods() \ - \ - /* NAME: IXAudio2Voice::GetVoiceDetails - // DESCRIPTION: Returns the basic characteristics of this voice. - // - // ARGUMENTS: - // pVoiceDetails - Returns the voice's details. - */\ - STDMETHOD_(void, GetVoiceDetails) (THIS_ _Out_ XAUDIO2_VOICE_DETAILS* pVoiceDetails) PURE; \ - \ - /* NAME: IXAudio2Voice::SetOutputVoices - // DESCRIPTION: Replaces the set of submix/mastering voices that receive - // this voice's output. - // - // ARGUMENTS: - // pSendList - Optional list of voices this voice should send audio to. - */\ - STDMETHOD(SetOutputVoices) (THIS_ _In_opt_ const XAUDIO2_VOICE_SENDS* pSendList) PURE; \ - \ - /* NAME: IXAudio2Voice::SetEffectChain - // DESCRIPTION: Replaces this voice's current effect chain with a new one. - // - // ARGUMENTS: - // pEffectChain - Structure describing the new effect chain to be used. - */\ - STDMETHOD(SetEffectChain) (THIS_ _In_opt_ const XAUDIO2_EFFECT_CHAIN* pEffectChain) PURE; \ - \ - /* NAME: IXAudio2Voice::EnableEffect - // DESCRIPTION: Enables an effect in this voice's effect chain. - // - // ARGUMENTS: - // EffectIndex - Index of an effect within this voice's effect chain. - // OperationSet - Used to identify this call as part of a deferred batch. - */\ - STDMETHOD(EnableEffect) (THIS_ UINT32 EffectIndex, \ - UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ - \ - /* NAME: IXAudio2Voice::DisableEffect - // DESCRIPTION: Disables an effect in this voice's effect chain. - // - // ARGUMENTS: - // EffectIndex - Index of an effect within this voice's effect chain. - // OperationSet - Used to identify this call as part of a deferred batch. - */\ - STDMETHOD(DisableEffect) (THIS_ UINT32 EffectIndex, \ - UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ - \ - /* NAME: IXAudio2Voice::GetEffectState - // DESCRIPTION: Returns the running state of an effect. - // - // ARGUMENTS: - // EffectIndex - Index of an effect within this voice's effect chain. - // pEnabled - Returns the enabled/disabled state of the given effect. - */\ - STDMETHOD_(void, GetEffectState) (THIS_ UINT32 EffectIndex, _Out_ BOOL* pEnabled) PURE; \ - \ - /* NAME: IXAudio2Voice::SetEffectParameters - // DESCRIPTION: Sets effect-specific parameters. - // - // REMARKS: Unlike IXAPOParameters::SetParameters, this method may - // be called from any thread. XAudio2 implements - // appropriate synchronization to copy the parameters to the - // realtime audio processing thread. - // - // ARGUMENTS: - // EffectIndex - Index of an effect within this voice's effect chain. - // pParameters - Pointer to an effect-specific parameters block. - // ParametersByteSize - Size of the pParameters array in bytes. - // OperationSet - Used to identify this call as part of a deferred batch. - */\ - STDMETHOD(SetEffectParameters) (THIS_ UINT32 EffectIndex, \ - _In_reads_bytes_(ParametersByteSize) const void* pParameters, \ - UINT32 ParametersByteSize, \ - UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ - \ - /* NAME: IXAudio2Voice::GetEffectParameters - // DESCRIPTION: Obtains the current effect-specific parameters. - // - // ARGUMENTS: - // EffectIndex - Index of an effect within this voice's effect chain. - // pParameters - Returns the current values of the effect-specific parameters. - // ParametersByteSize - Size of the pParameters array in bytes. - */\ - STDMETHOD(GetEffectParameters) (THIS_ UINT32 EffectIndex, \ - _Out_writes_bytes_(ParametersByteSize) void* pParameters, \ - UINT32 ParametersByteSize) PURE; \ - \ - /* NAME: IXAudio2Voice::SetFilterParameters - // DESCRIPTION: Sets this voice's filter parameters. - // - // ARGUMENTS: - // pParameters - Pointer to the filter's parameter structure. - // OperationSet - Used to identify this call as part of a deferred batch. - */\ - STDMETHOD(SetFilterParameters) (THIS_ _In_ const XAUDIO2_FILTER_PARAMETERS* pParameters, \ - UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ - \ - /* NAME: IXAudio2Voice::GetFilterParameters - // DESCRIPTION: Returns this voice's current filter parameters. - // - // ARGUMENTS: - // pParameters - Returns the filter parameters. - */\ - STDMETHOD_(void, GetFilterParameters) (THIS_ _Out_ XAUDIO2_FILTER_PARAMETERS* pParameters) PURE; \ - \ - /* NAME: IXAudio2Voice::SetOutputFilterParameters - // DESCRIPTION: Sets the filter parameters on one of this voice's sends. - // - // ARGUMENTS: - // pDestinationVoice - Destination voice of the send whose filter parameters will be set. - // pParameters - Pointer to the filter's parameter structure. - // OperationSet - Used to identify this call as part of a deferred batch. - */\ - STDMETHOD(SetOutputFilterParameters) (THIS_ _In_opt_ IXAudio2Voice* pDestinationVoice, \ - _In_ const XAUDIO2_FILTER_PARAMETERS* pParameters, \ - UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ - \ - /* NAME: IXAudio2Voice::GetOutputFilterParameters - // DESCRIPTION: Returns the filter parameters from one of this voice's sends. - // - // ARGUMENTS: - // pDestinationVoice - Destination voice of the send whose filter parameters will be read. - // pParameters - Returns the filter parameters. - */\ - STDMETHOD_(void, GetOutputFilterParameters) (THIS_ _In_opt_ IXAudio2Voice* pDestinationVoice, \ - _Out_ XAUDIO2_FILTER_PARAMETERS* pParameters) PURE; \ - \ - /* NAME: IXAudio2Voice::SetVolume - // DESCRIPTION: Sets this voice's overall volume level. - // - // ARGUMENTS: - // Volume - New overall volume level to be used, as an amplitude factor. - // OperationSet - Used to identify this call as part of a deferred batch. - */\ - STDMETHOD(SetVolume) (THIS_ float Volume, \ - UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ - \ - /* NAME: IXAudio2Voice::GetVolume - // DESCRIPTION: Obtains this voice's current overall volume level. - // - // ARGUMENTS: - // pVolume: Returns the voice's current overall volume level. - */\ - STDMETHOD_(void, GetVolume) (THIS_ _Out_ float* pVolume) PURE; \ - \ - /* NAME: IXAudio2Voice::SetChannelVolumes - // DESCRIPTION: Sets this voice's per-channel volume levels. - // - // ARGUMENTS: - // Channels - Used to confirm the voice's channel count. - // pVolumes - Array of per-channel volume levels to be used. - // OperationSet - Used to identify this call as part of a deferred batch. - */\ - STDMETHOD(SetChannelVolumes) (THIS_ UINT32 Channels, _In_reads_(Channels) const float* pVolumes, \ - UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ - \ - /* NAME: IXAudio2Voice::GetChannelVolumes - // DESCRIPTION: Returns this voice's current per-channel volume levels. - // - // ARGUMENTS: - // Channels - Used to confirm the voice's channel count. - // pVolumes - Returns an array of the current per-channel volume levels. - */\ - STDMETHOD_(void, GetChannelVolumes) (THIS_ UINT32 Channels, _Out_writes_(Channels) float* pVolumes) PURE; \ - \ - /* NAME: IXAudio2Voice::SetOutputMatrix - // DESCRIPTION: Sets the volume levels used to mix from each channel of this - // voice's output audio to each channel of a given destination - // voice's input audio. - // - // ARGUMENTS: - // pDestinationVoice - The destination voice whose mix matrix to change. - // SourceChannels - Used to confirm this voice's output channel count - // (the number of channels produced by the last effect in the chain). - // DestinationChannels - Confirms the destination voice's input channels. - // pLevelMatrix - Array of [SourceChannels * DestinationChannels] send - // levels. The level used to send from source channel S to destination - // channel D should be in pLevelMatrix[S + SourceChannels * D]. - // OperationSet - Used to identify this call as part of a deferred batch. - */\ - STDMETHOD(SetOutputMatrix) (THIS_ _In_opt_ IXAudio2Voice* pDestinationVoice, \ - UINT32 SourceChannels, UINT32 DestinationChannels, \ - _In_reads_(SourceChannels * DestinationChannels) const float* pLevelMatrix, \ - UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \ - \ - /* NAME: IXAudio2Voice::GetOutputMatrix - // DESCRIPTION: Obtains the volume levels used to send each channel of this - // voice's output audio to each channel of a given destination - // voice's input audio. - // - // ARGUMENTS: - // pDestinationVoice - The destination voice whose mix matrix to obtain. - // SourceChannels - Used to confirm this voice's output channel count - // (the number of channels produced by the last effect in the chain). - // DestinationChannels - Confirms the destination voice's input channels. - // pLevelMatrix - Array of send levels, as above. - */\ - STDMETHOD_(void, GetOutputMatrix) (THIS_ _In_opt_ IXAudio2Voice* pDestinationVoice, \ - UINT32 SourceChannels, UINT32 DestinationChannels, \ - _Out_writes_(SourceChannels * DestinationChannels) float* pLevelMatrix) PURE; \ - \ - /* NAME: IXAudio2Voice::DestroyVoice - // DESCRIPTION: Destroys this voice, stopping it if necessary and removing - // it from the XAudio2 graph. - */\ - STDMETHOD_(void, DestroyVoice) (THIS) PURE - - Declare_IXAudio2Voice_Methods(); -}; - - -/************************************************************************** - * - * IXAudio2SourceVoice: Source voice management interface. - * - **************************************************************************/ - -#undef INTERFACE -#define INTERFACE IXAudio2SourceVoice -DECLARE_INTERFACE_(IXAudio2SourceVoice, IXAudio2Voice) -{ - // Methods from IXAudio2Voice base interface - Declare_IXAudio2Voice_Methods(); - - // NAME: IXAudio2SourceVoice::Start - // DESCRIPTION: Makes this voice start consuming and processing audio. - // - // ARGUMENTS: - // Flags - Flags controlling how the voice should be started. - // OperationSet - Used to identify this call as part of a deferred batch. - // - STDMETHOD(Start) (THIS_ UINT32 Flags X2DEFAULT(0), UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; - - // NAME: IXAudio2SourceVoice::Stop - // DESCRIPTION: Makes this voice stop consuming audio. - // - // ARGUMENTS: - // Flags - Flags controlling how the voice should be stopped. - // OperationSet - Used to identify this call as part of a deferred batch. - // - STDMETHOD(Stop) (THIS_ UINT32 Flags X2DEFAULT(0), UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; - - // NAME: IXAudio2SourceVoice::SubmitSourceBuffer - // DESCRIPTION: Adds a new audio buffer to this voice's input queue. - // - // ARGUMENTS: - // pBuffer - Pointer to the buffer structure to be queued. - // pBufferWMA - Additional structure used only when submitting XWMA data. - // - STDMETHOD(SubmitSourceBuffer) (THIS_ _In_ const XAUDIO2_BUFFER* pBuffer, _In_opt_ const XAUDIO2_BUFFER_WMA* pBufferWMA X2DEFAULT(NULL)) PURE; - - // NAME: IXAudio2SourceVoice::FlushSourceBuffers - // DESCRIPTION: Removes all pending audio buffers from this voice's queue. - // - STDMETHOD(FlushSourceBuffers) (THIS) PURE; - - // NAME: IXAudio2SourceVoice::Discontinuity - // DESCRIPTION: Notifies the voice of an intentional break in the stream of - // audio buffers (e.g. the end of a sound), to prevent XAudio2 - // from interpreting an empty buffer queue as a glitch. - // - STDMETHOD(Discontinuity) (THIS) PURE; - - // NAME: IXAudio2SourceVoice::ExitLoop - // DESCRIPTION: Breaks out of the current loop when its end is reached. - // - // ARGUMENTS: - // OperationSet - Used to identify this call as part of a deferred batch. - // - STDMETHOD(ExitLoop) (THIS_ UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; - - // NAME: IXAudio2SourceVoice::GetState - // DESCRIPTION: Returns the number of buffers currently queued on this voice, - // the pContext value associated with the currently processing - // buffer (if any), and other voice state information. - // - // ARGUMENTS: - // pVoiceState - Returns the state information. - // Flags - Flags controlling what voice state is returned. - // - STDMETHOD_(void, GetState) (THIS_ _Out_ XAUDIO2_VOICE_STATE* pVoiceState, UINT32 Flags X2DEFAULT(0)) PURE; - - // NAME: IXAudio2SourceVoice::SetFrequencyRatio - // DESCRIPTION: Sets this voice's frequency adjustment, i.e. its pitch. - // - // ARGUMENTS: - // Ratio - Frequency change, expressed as source frequency / target frequency. - // OperationSet - Used to identify this call as part of a deferred batch. - // - STDMETHOD(SetFrequencyRatio) (THIS_ float Ratio, - UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; - - // NAME: IXAudio2SourceVoice::GetFrequencyRatio - // DESCRIPTION: Returns this voice's current frequency adjustment ratio. - // - // ARGUMENTS: - // pRatio - Returns the frequency adjustment. - // - STDMETHOD_(void, GetFrequencyRatio) (THIS_ _Out_ float* pRatio) PURE; - - // NAME: IXAudio2SourceVoice::SetSourceSampleRate - // DESCRIPTION: Reconfigures this voice to treat its source data as being - // at a different sample rate than the original one specified - // in CreateSourceVoice's pSourceFormat argument. - // - // ARGUMENTS: - // UINT32 - The intended sample rate of further submitted source data. - // - STDMETHOD(SetSourceSampleRate) (THIS_ UINT32 NewSourceSampleRate) PURE; -}; - - -/************************************************************************** - * - * IXAudio2SubmixVoice: Submixing voice management interface. - * - **************************************************************************/ - -#undef INTERFACE -#define INTERFACE IXAudio2SubmixVoice -DECLARE_INTERFACE_(IXAudio2SubmixVoice, IXAudio2Voice) -{ - // Methods from IXAudio2Voice base interface - Declare_IXAudio2Voice_Methods(); - - // There are currently no methods specific to submix voices. -}; - - -/************************************************************************** - * - * IXAudio2MasteringVoice: Mastering voice management interface. - * - **************************************************************************/ - -#undef INTERFACE -#define INTERFACE IXAudio2MasteringVoice -DECLARE_INTERFACE_(IXAudio2MasteringVoice, IXAudio2Voice) -{ - // Methods from IXAudio2Voice base interface - Declare_IXAudio2Voice_Methods(); - - // NAME: IXAudio2MasteringVoice::GetChannelMask - // DESCRIPTION: Returns the channel mask for this voice - // - // ARGUMENTS: - // pChannelMask - returns the channel mask for this voice. This corresponds - // to the dwChannelMask member of WAVEFORMATEXTENSIBLE. - // - STDMETHOD(GetChannelMask) (THIS_ _Out_ DWORD* pChannelmask) PURE; -}; - - -/************************************************************************** - * - * IXAudio2EngineCallback: Client notification interface for engine events. - * - * REMARKS: Contains methods to notify the client when certain events happen - * in the XAudio2 engine. This interface should be implemented by - * the client. XAudio2 will call these methods via the interface - * pointer provided by the client when it calls - * IXAudio2::RegisterForCallbacks. - * - **************************************************************************/ - -#undef INTERFACE -#define INTERFACE IXAudio2EngineCallback -DECLARE_INTERFACE(IXAudio2EngineCallback) -{ - // Called by XAudio2 just before an audio processing pass begins. - STDMETHOD_(void, OnProcessingPassStart) (THIS) PURE; - - // Called just after an audio processing pass ends. - STDMETHOD_(void, OnProcessingPassEnd) (THIS) PURE; - - // Called in the event of a critical system error which requires XAudio2 - // to be closed down and restarted. The error code is given in Error. - STDMETHOD_(void, OnCriticalError) (THIS_ HRESULT Error) PURE; -}; - - -/************************************************************************** - * - * IXAudio2VoiceCallback: Client notification interface for voice events. - * - * REMARKS: Contains methods to notify the client when certain events happen - * in an XAudio2 voice. This interface should be implemented by the - * client. XAudio2 will call these methods via an interface pointer - * provided by the client in the IXAudio2::CreateSourceVoice call. - * - **************************************************************************/ - -#undef INTERFACE -#define INTERFACE IXAudio2VoiceCallback -DECLARE_INTERFACE(IXAudio2VoiceCallback) -{ - // Called just before this voice's processing pass begins. - STDMETHOD_(void, OnVoiceProcessingPassStart) (THIS_ UINT32 BytesRequired) PURE; - - // Called just after this voice's processing pass ends. - STDMETHOD_(void, OnVoiceProcessingPassEnd) (THIS) PURE; - - // Called when this voice has just finished playing a buffer stream - // (as marked with the XAUDIO2_END_OF_STREAM flag on the last buffer). - STDMETHOD_(void, OnStreamEnd) (THIS) PURE; - - // Called when this voice is about to start processing a new buffer. - STDMETHOD_(void, OnBufferStart) (THIS_ void* pBufferContext) PURE; - - // Called when this voice has just finished processing a buffer. - // The buffer can now be reused or destroyed. - STDMETHOD_(void, OnBufferEnd) (THIS_ void* pBufferContext) PURE; - - // Called when this voice has just reached the end position of a loop. - STDMETHOD_(void, OnLoopEnd) (THIS_ void* pBufferContext) PURE; - - // Called in the event of a critical error during voice processing, - // such as a failing xAPO or an error from the hardware XMA decoder. - // The voice may have to be destroyed and re-created to recover from - // the error. The callback arguments report which buffer was being - // processed when the error occurred, and its HRESULT code. - STDMETHOD_(void, OnVoiceError) (THIS_ void* pBufferContext, HRESULT Error) PURE; -}; - - -/************************************************************************** - * - * Macros to make it easier to use the XAudio2 COM interfaces in C code. - * - **************************************************************************/ - -#ifndef __cplusplus - -// IXAudio2 -#define IXAudio2_QueryInterface(This,riid,ppvInterface) ((This)->lpVtbl->QueryInterface(This,riid,ppvInterface)) -#define IXAudio2_AddRef(This) ((This)->lpVtbl->AddRef(This)) -#define IXAudio2_Release(This) ((This)->lpVtbl->Release(This)) -#define IXAudio2_CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) ((This)->lpVtbl->CreateSourceVoice(This,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)) -#define IXAudio2_CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain) ((This)->lpVtbl->CreateSubmixVoice(This,ppSubmixVoice,InputChannels,InputSampleRate,Flags,ProcessingStage,pSendList,pEffectChain)) -#define IXAudio2_CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,StreamCategory) ((This)->lpVtbl->CreateMasteringVoice(This,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceId,pEffectChain,StreamCategory)) -#define IXAudio2_StartEngine(This) ((This)->lpVtbl->StartEngine(This)) -#define IXAudio2_StopEngine(This) ((This)->lpVtbl->StopEngine(This)) -#define IXAudio2_CommitChanges(This,OperationSet) ((This)->lpVtbl->CommitChanges(This,OperationSet)) -#define IXAudio2_GetPerformanceData(This,pPerfData) ((This)->lpVtbl->GetPerformanceData(This,pPerfData)) -#define IXAudio2_SetDebugConfiguration(This,pDebugConfiguration,pReserved) ((This)->lpVtbl->SetDebugConfiguration(This,pDebugConfiguration,pReserved)) - -// IXAudio2Voice -#define IXAudio2Voice_GetVoiceDetails(This,pVoiceDetails) ((This)->lpVtbl->GetVoiceDetails(This,pVoiceDetails)) -#define IXAudio2Voice_SetOutputVoices(This,pSendList) ((This)->lpVtbl->SetOutputVoices(This,pSendList)) -#define IXAudio2Voice_SetEffectChain(This,pEffectChain) ((This)->lpVtbl->SetEffectChain(This,pEffectChain)) -#define IXAudio2Voice_EnableEffect(This,EffectIndex,OperationSet) ((This)->lpVtbl->EnableEffect(This,EffectIndex,OperationSet)) -#define IXAudio2Voice_DisableEffect(This,EffectIndex,OperationSet) ((This)->lpVtbl->DisableEffect(This,EffectIndex,OperationSet)) -#define IXAudio2Voice_GetEffectState(This,EffectIndex,pEnabled) ((This)->lpVtbl->GetEffectState(This,EffectIndex,pEnabled)) -#define IXAudio2Voice_SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize, OperationSet) ((This)->lpVtbl->SetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize,OperationSet)) -#define IXAudio2Voice_GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize) ((This)->lpVtbl->GetEffectParameters(This,EffectIndex,pParameters,ParametersByteSize)) -#define IXAudio2Voice_SetFilterParameters(This,pParameters,OperationSet) ((This)->lpVtbl->SetFilterParameters(This,pParameters,OperationSet)) -#define IXAudio2Voice_GetFilterParameters(This,pParameters) ((This)->lpVtbl->GetFilterParameters(This,pParameters)) -#define IXAudio2Voice_SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet) ((This)->lpVtbl->SetOutputFilterParameters(This,pDestinationVoice,pParameters,OperationSet)) -#define IXAudio2Voice_GetOutputFilterParameters(This,pDestinationVoice,pParameters) ((This)->lpVtbl->GetOutputFilterParameters(This,pDestinationVoice,pParameters)) -#define IXAudio2Voice_SetVolume(This,Volume,OperationSet) ((This)->lpVtbl->SetVolume(This,Volume,OperationSet)) -#define IXAudio2Voice_GetVolume(This,pVolume) ((This)->lpVtbl->GetVolume(This,pVolume)) -#define IXAudio2Voice_SetChannelVolumes(This,Channels,pVolumes,OperationSet) ((This)->lpVtbl->SetChannelVolumes(This,Channels,pVolumes,OperationSet)) -#define IXAudio2Voice_GetChannelVolumes(This,Channels,pVolumes) ((This)->lpVtbl->GetChannelVolumes(This,Channels,pVolumes)) -#define IXAudio2Voice_SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet) ((This)->lpVtbl->SetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix,OperationSet)) -#define IXAudio2Voice_GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix) ((This)->lpVtbl->GetOutputMatrix(This,pDestinationVoice,SourceChannels,DestinationChannels,pLevelMatrix)) -#define IXAudio2Voice_DestroyVoice(This) ((This)->lpVtbl->DestroyVoice(This)) - -// IXAudio2SourceVoice -#define IXAudio2SourceVoice_GetVoiceDetails IXAudio2Voice_GetVoiceDetails -#define IXAudio2SourceVoice_SetOutputVoices IXAudio2Voice_SetOutputVoices -#define IXAudio2SourceVoice_SetEffectChain IXAudio2Voice_SetEffectChain -#define IXAudio2SourceVoice_EnableEffect IXAudio2Voice_EnableEffect -#define IXAudio2SourceVoice_DisableEffect IXAudio2Voice_DisableEffect -#define IXAudio2SourceVoice_GetEffectState IXAudio2Voice_GetEffectState -#define IXAudio2SourceVoice_SetEffectParameters IXAudio2Voice_SetEffectParameters -#define IXAudio2SourceVoice_GetEffectParameters IXAudio2Voice_GetEffectParameters -#define IXAudio2SourceVoice_SetFilterParameters IXAudio2Voice_SetFilterParameters -#define IXAudio2SourceVoice_GetFilterParameters IXAudio2Voice_GetFilterParameters -#define IXAudio2SourceVoice_SetOutputFilterParameters IXAudio2Voice_SetOutputFilterParameters -#define IXAudio2SourceVoice_GetOutputFilterParameters IXAudio2Voice_GetOutputFilterParameters -#define IXAudio2SourceVoice_SetVolume IXAudio2Voice_SetVolume -#define IXAudio2SourceVoice_GetVolume IXAudio2Voice_GetVolume -#define IXAudio2SourceVoice_SetChannelVolumes IXAudio2Voice_SetChannelVolumes -#define IXAudio2SourceVoice_GetChannelVolumes IXAudio2Voice_GetChannelVolumes -#define IXAudio2SourceVoice_SetOutputMatrix IXAudio2Voice_SetOutputMatrix -#define IXAudio2SourceVoice_GetOutputMatrix IXAudio2Voice_GetOutputMatrix -#define IXAudio2SourceVoice_DestroyVoice IXAudio2Voice_DestroyVoice -#define IXAudio2SourceVoice_Start(This,Flags,OperationSet) ((This)->lpVtbl->Start(This,Flags,OperationSet)) -#define IXAudio2SourceVoice_Stop(This,Flags,OperationSet) ((This)->lpVtbl->Stop(This,Flags,OperationSet)) -#define IXAudio2SourceVoice_SubmitSourceBuffer(This,pBuffer,pBufferWMA) ((This)->lpVtbl->SubmitSourceBuffer(This,pBuffer,pBufferWMA)) -#define IXAudio2SourceVoice_FlushSourceBuffers(This) ((This)->lpVtbl->FlushSourceBuffers(This)) -#define IXAudio2SourceVoice_Discontinuity(This) ((This)->lpVtbl->Discontinuity(This)) -#define IXAudio2SourceVoice_ExitLoop(This,OperationSet) ((This)->lpVtbl->ExitLoop(This,OperationSet)) -#define IXAudio2SourceVoice_GetState(This,pVoiceState,Flags) ((This)->lpVtbl->GetState(This,pVoiceState,Flags)) -#define IXAudio2SourceVoice_SetFrequencyRatio(This,Ratio,OperationSet) ((This)->lpVtbl->SetFrequencyRatio(This,Ratio,OperationSet)) -#define IXAudio2SourceVoice_GetFrequencyRatio(This,pRatio) ((This)->lpVtbl->GetFrequencyRatio(This,pRatio)) -#define IXAudio2SourceVoice_SetSourceSampleRate(This,NewSourceSampleRate) ((This)->lpVtbl->SetSourceSampleRate(This,NewSourceSampleRate)) - -// IXAudio2SubmixVoice -#define IXAudio2SubmixVoice_GetVoiceDetails IXAudio2Voice_GetVoiceDetails -#define IXAudio2SubmixVoice_SetOutputVoices IXAudio2Voice_SetOutputVoices -#define IXAudio2SubmixVoice_SetEffectChain IXAudio2Voice_SetEffectChain -#define IXAudio2SubmixVoice_EnableEffect IXAudio2Voice_EnableEffect -#define IXAudio2SubmixVoice_DisableEffect IXAudio2Voice_DisableEffect -#define IXAudio2SubmixVoice_GetEffectState IXAudio2Voice_GetEffectState -#define IXAudio2SubmixVoice_SetEffectParameters IXAudio2Voice_SetEffectParameters -#define IXAudio2SubmixVoice_GetEffectParameters IXAudio2Voice_GetEffectParameters -#define IXAudio2SubmixVoice_SetFilterParameters IXAudio2Voice_SetFilterParameters -#define IXAudio2SubmixVoice_GetFilterParameters IXAudio2Voice_GetFilterParameters -#define IXAudio2SubmixVoice_SetOutputFilterParameters IXAudio2Voice_SetOutputFilterParameters -#define IXAudio2SubmixVoice_GetOutputFilterParameters IXAudio2Voice_GetOutputFilterParameters -#define IXAudio2SubmixVoice_SetVolume IXAudio2Voice_SetVolume -#define IXAudio2SubmixVoice_GetVolume IXAudio2Voice_GetVolume -#define IXAudio2SubmixVoice_SetChannelVolumes IXAudio2Voice_SetChannelVolumes -#define IXAudio2SubmixVoice_GetChannelVolumes IXAudio2Voice_GetChannelVolumes -#define IXAudio2SubmixVoice_SetOutputMatrix IXAudio2Voice_SetOutputMatrix -#define IXAudio2SubmixVoice_GetOutputMatrix IXAudio2Voice_GetOutputMatrix -#define IXAudio2SubmixVoice_DestroyVoice IXAudio2Voice_DestroyVoice - -// IXAudio2MasteringVoice -#define IXAudio2MasteringVoice_GetVoiceDetails IXAudio2Voice_GetVoiceDetails -#define IXAudio2MasteringVoice_SetOutputVoices IXAudio2Voice_SetOutputVoices -#define IXAudio2MasteringVoice_SetEffectChain IXAudio2Voice_SetEffectChain -#define IXAudio2MasteringVoice_EnableEffect IXAudio2Voice_EnableEffect -#define IXAudio2MasteringVoice_DisableEffect IXAudio2Voice_DisableEffect -#define IXAudio2MasteringVoice_GetEffectState IXAudio2Voice_GetEffectState -#define IXAudio2MasteringVoice_SetEffectParameters IXAudio2Voice_SetEffectParameters -#define IXAudio2MasteringVoice_GetEffectParameters IXAudio2Voice_GetEffectParameters -#define IXAudio2MasteringVoice_SetFilterParameters IXAudio2Voice_SetFilterParameters -#define IXAudio2MasteringVoice_GetFilterParameters IXAudio2Voice_GetFilterParameters -#define IXAudio2MasteringVoice_SetOutputFilterParameters IXAudio2Voice_SetOutputFilterParameters -#define IXAudio2MasteringVoice_GetOutputFilterParameters IXAudio2Voice_GetOutputFilterParameters -#define IXAudio2MasteringVoice_SetVolume IXAudio2Voice_SetVolume -#define IXAudio2MasteringVoice_GetVolume IXAudio2Voice_GetVolume -#define IXAudio2MasteringVoice_SetChannelVolumes IXAudio2Voice_SetChannelVolumes -#define IXAudio2MasteringVoice_GetChannelVolumes IXAudio2Voice_GetChannelVolumes -#define IXAudio2MasteringVoice_SetOutputMatrix IXAudio2Voice_SetOutputMatrix -#define IXAudio2MasteringVoice_GetOutputMatrix IXAudio2Voice_GetOutputMatrix -#define IXAudio2MasteringVoice_DestroyVoice IXAudio2Voice_DestroyVoice -#define IXAudio2MasteringVoice_GetChannelMask(This,pChannelMask) ((This)->lpVtbl->GetChannelMask(This,pChannelMask)) - -#endif // #ifndef __cplusplus - - -/************************************************************************** - * - * Utility functions used to convert from pitch in semitones and volume - * in decibels to the frequency and amplitude ratio units used by XAudio2. - * These are only defined if the client #defines XAUDIO2_HELPER_FUNCTIONS - * prior to #including xaudio2.h. - * - **************************************************************************/ - -#ifdef XAUDIO2_HELPER_FUNCTIONS - -#define _USE_MATH_DEFINES // Make math.h define M_PI -#include // For powf, log10f, sinf and asinf - -// Calculate the argument to SetVolume from a decibel value -__inline float XAudio2DecibelsToAmplitudeRatio(float Decibels) -{ - return powf(10.0f, Decibels / 20.0f); -} - -// Recover a volume in decibels from an amplitude factor -__inline float XAudio2AmplitudeRatioToDecibels(float Volume) -{ - if (Volume == 0) - { - return -3.402823466e+38f; // Smallest float value (-FLT_MAX) - } - return 20.0f * log10f(Volume); -} - -// Calculate the argument to SetFrequencyRatio from a semitone value -__inline float XAudio2SemitonesToFrequencyRatio(float Semitones) -{ - // FrequencyRatio = 2 ^ Octaves - // = 2 ^ (Semitones / 12) - return powf(2.0f, Semitones / 12.0f); -} - -// Recover a pitch in semitones from a frequency ratio -__inline float XAudio2FrequencyRatioToSemitones(float FrequencyRatio) -{ - // Semitones = 12 * log2(FrequencyRatio) - // = 12 * log2(10) * log10(FrequencyRatio) - return 39.86313713864835f * log10f(FrequencyRatio); -} - -// Convert from filter cutoff frequencies expressed in Hertz to the radian -// frequency values used in XAUDIO2_FILTER_PARAMETERS.Frequency, state-variable -// filter types only. Use XAudio2CutoffFrequencyToOnePoleCoefficient() for one-pole filter types. -// Note that the highest CutoffFrequency supported is SampleRate/6. -// Higher values of CutoffFrequency will return XAUDIO2_MAX_FILTER_FREQUENCY. -__inline float XAudio2CutoffFrequencyToRadians(float CutoffFrequency, UINT32 SampleRate) -{ - if ((UINT32)(CutoffFrequency * 6.0f) >= SampleRate) - { - return XAUDIO2_MAX_FILTER_FREQUENCY; - } - return 2.0f * sinf((float)M_PI * CutoffFrequency / SampleRate); -} - -// Convert from radian frequencies back to absolute frequencies in Hertz -__inline float XAudio2RadiansToCutoffFrequency(float Radians, float SampleRate) -{ - return SampleRate * asinf(Radians / 2.0f) / (float)M_PI; -} - -// Convert from filter cutoff frequencies expressed in Hertz to the filter -// coefficients used with XAUDIO2_FILTER_PARAMETERS.Frequency, -// LowPassOnePoleFilter and HighPassOnePoleFilter filter types only. -// Use XAudio2CutoffFrequencyToRadians() for state-variable filter types. -__inline float XAudio2CutoffFrequencyToOnePoleCoefficient(float CutoffFrequency, UINT32 SampleRate) -{ - if ((UINT32)CutoffFrequency >= SampleRate) - { - return XAUDIO2_MAX_FILTER_FREQUENCY; - } - return ( 1.0f - powf(1.0f - 2.0f * CutoffFrequency / SampleRate, 2.0f) ); -} - - -#endif // #ifdef XAUDIO2_HELPER_FUNCTIONS - - -/************************************************************************** - * - * XAudio2Create: Top-level function that creates an XAudio2 instance. - * - * ARGUMENTS: - * - * Flags - Flags specifying the XAudio2 object's behavior. Currently - * unused, must be set to 0. - * - * XAudio2Processor - An XAUDIO2_PROCESSOR value that specifies the - * hardware threads (Xbox) or processors (Windows) that XAudio2 - * will use. Note that XAudio2 supports concurrent processing on - * multiple threads, using any combination of XAUDIO2_PROCESSOR - * flags. The values are platform-specific; platform-independent - * code can use XAUDIO2_DEFAULT_PROCESSOR to use the default on - * each platform. - * - **************************************************************************/ - -#if (defined XAUDIO2_EXPORT) - // We're building xaudio2.dll - #define XAUDIO2_STDAPI extern "C" __declspec(dllexport) HRESULT __stdcall -#elif (defined DX_BUILD) - // We're building xaudio2 as a static library - #define XAUDIO2_STDAPI STDAPI -#else - // We're an xaudio2 client - #define XAUDIO2_STDAPI extern "C" __declspec(dllimport) HRESULT __stdcall -#endif - -XAUDIO2_STDAPI XAudio2Create(_Outptr_ IXAudio2** ppXAudio2, UINT32 Flags X2DEFAULT(0), - XAUDIO2_PROCESSOR XAudio2Processor X2DEFAULT(XAUDIO2_DEFAULT_PROCESSOR)); - -// Undo the #pragma pack(push, 1) directive at the top of this file -#pragma pack(pop) - -#endif // #ifndef GUID_DEFS_ONLY - -#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ -#pragma endregion - -#endif // #ifndef __XAUDIO2_INCLUDED__ - diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index 54443d4f618..1468ac6faca 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -445,9 +445,11 @@ if _OPTIONS["USE_XAUDIO2"]=="1" then defines { "USE_XAUDIO2=1", }, - includedirs { - MAME_DIR .. "3rdparty/win81sdk/Include/um", - } + configuration { "mingw*"} + includedirs { + MAME_DIR .. "3rdparty/compat/mingw", + } + configuration { } else defines { "USE_XAUDIO2=0", diff --git a/src/osd/modules/sound/xaudio2_sound.cpp b/src/osd/modules/sound/xaudio2_sound.cpp index 9dc3d0461be..8388cea521e 100644 --- a/src/osd/modules/sound/xaudio2_sound.cpp +++ b/src/osd/modules/sound/xaudio2_sound.cpp @@ -38,6 +38,13 @@ #include "emu.h" #include "osdepend.h" #include "emuopts.h" +#if !defined(XAUDIO2_DLL) +#if defined(UNICODE) +#define XAUDIO2_DLL L"xaudio2_8.dll" +#else +#define XAUDIO2_DLL "xaudio2_8.dll" +#endif +#endif //============================================================ // Constants -- cgit v1.2.3-70-g09d2 From 823b8cbc1cfd18916c77633cb6936f9298bb7425 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 5 Mar 2016 10:29:28 +0100 Subject: Add license to files that were not part of build or are containing data to build sources for cpu emulation (nw) --- nl_examples/7400_astable.c | 2 ++ nl_examples/74123_mstable.c | 2 ++ nl_examples/9602_mstable.c | 2 ++ nl_examples/bjt.c | 2 ++ nl_examples/bjt_eb.c | 2 ++ nl_examples/bjt_eb_pnp.c | 2 ++ nl_examples/breakout.c | 3 ++- nl_examples/cd4066.c | 2 ++ nl_examples/cdelay.c | 2 ++ nl_examples/congo_bongo.c | 3 ++- nl_examples/kidniki.c | 3 ++- nl_examples/mm5837_noise.c | 2 ++ nl_examples/msx_mixer_stage.c | 2 ++ nl_examples/ne555_astable.c | 2 ++ nl_examples/opamp.c | 2 ++ nl_examples/sn74ls629_osc.c | 2 ++ nl_examples/test.c | 2 ++ nl_examples/todo.c | 2 ++ nl_examples/vccs.c | 2 ++ nl_examples/vccs1.c | 2 ++ nl_examples/vs_cs.c | 2 ++ src/devices/cpu/arcompact/arcompact_make.py | 3 ++- src/devices/cpu/h8/h8.lst | 2 ++ src/devices/cpu/h8/h8make.py | 3 ++- src/devices/cpu/m6502/ddeco16.lst | 2 ++ src/devices/cpu/m6502/dm4510.lst | 2 ++ src/devices/cpu/m6502/dm6502.lst | 2 ++ src/devices/cpu/m6502/dm6509.lst | 2 ++ src/devices/cpu/m6502/dm6510.lst | 2 ++ src/devices/cpu/m6502/dm65c02.lst | 2 ++ src/devices/cpu/m6502/dm65ce02.lst | 2 ++ src/devices/cpu/m6502/dm740.lst | 2 ++ src/devices/cpu/m6502/dn2a03.lst | 2 ++ src/devices/cpu/m6502/dr65c02.lst | 2 ++ src/devices/cpu/m6502/m6502make.py | 2 ++ src/devices/cpu/m6502/odeco16.lst | 2 ++ src/devices/cpu/m6502/om4510.lst | 2 ++ src/devices/cpu/m6502/om6502.lst | 2 ++ src/devices/cpu/m6502/om6509.lst | 2 ++ src/devices/cpu/m6502/om6510.lst | 2 ++ src/devices/cpu/m6502/om65c02.lst | 2 ++ src/devices/cpu/m6502/om65ce02.lst | 2 ++ src/devices/cpu/m6502/om740.lst | 2 ++ src/devices/cpu/m6502/on2a03.lst | 2 ++ src/devices/cpu/m6809/base6x09.ops | 2 ++ src/devices/cpu/m6809/hd6309.ops | 2 ++ src/devices/cpu/m6809/konami.ops | 2 ++ src/devices/cpu/m6809/m6809.ops | 2 ++ src/devices/cpu/m6809/m6809make.py | 2 ++ src/devices/cpu/mcs96/mcs96make.py | 2 ++ src/devices/cpu/mcs96/mcs96ops.lst | 2 ++ src/devices/cpu/tms57002/tmsmake.py | 2 ++ 52 files changed, 104 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/nl_examples/7400_astable.c b/nl_examples/7400_astable.c index 87e925b4a97..07748a0816a 100644 --- a/nl_examples/7400_astable.c +++ b/nl_examples/7400_astable.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * 7400_astable.c * diff --git a/nl_examples/74123_mstable.c b/nl_examples/74123_mstable.c index ddb8955e033..fd2bfd85871 100644 --- a/nl_examples/74123_mstable.c +++ b/nl_examples/74123_mstable.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * 74123_mstable.c * diff --git a/nl_examples/9602_mstable.c b/nl_examples/9602_mstable.c index 5db2df04d0e..8e482c8dfb3 100644 --- a/nl_examples/9602_mstable.c +++ b/nl_examples/9602_mstable.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * 9602_mstable.c * diff --git a/nl_examples/bjt.c b/nl_examples/bjt.c index fc5b72f3d02..7222ced4445 100644 --- a/nl_examples/bjt.c +++ b/nl_examples/bjt.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * bjt.c * diff --git a/nl_examples/bjt_eb.c b/nl_examples/bjt_eb.c index bc35345a44d..f21735c36ec 100644 --- a/nl_examples/bjt_eb.c +++ b/nl_examples/bjt_eb.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * bjt.c * diff --git a/nl_examples/bjt_eb_pnp.c b/nl_examples/bjt_eb_pnp.c index a4a0b8f566f..10169b6bd3f 100644 --- a/nl_examples/bjt_eb_pnp.c +++ b/nl_examples/bjt_eb_pnp.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * bjt.c * diff --git a/nl_examples/breakout.c b/nl_examples/breakout.c index 2c8d9f3ccae..591ffaf3414 100644 --- a/nl_examples/breakout.c +++ b/nl_examples/breakout.c @@ -1,4 +1,5 @@ - +// license:GPL-2.0+ +// copyright-holders:Couriersud #define NETLIST_DEVELOPMENT 1 #include "netlist/nl_dice_compat.h" diff --git a/nl_examples/cd4066.c b/nl_examples/cd4066.c index 1db59b670ed..c77e6438c0f 100644 --- a/nl_examples/cd4066.c +++ b/nl_examples/cd4066.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * bjt.c * diff --git a/nl_examples/cdelay.c b/nl_examples/cdelay.c index 9a6bdcc1aff..6f396e8ca07 100644 --- a/nl_examples/cdelay.c +++ b/nl_examples/cdelay.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * cdelay.c * diff --git a/nl_examples/congo_bongo.c b/nl_examples/congo_bongo.c index facd4054c00..4256d364d17 100644 --- a/nl_examples/congo_bongo.c +++ b/nl_examples/congo_bongo.c @@ -1,4 +1,5 @@ - +// license:GPL-2.0+ +// copyright-holders:Couriersud /* € */ // ABC #include "netlist/devices/net_lib.h" diff --git a/nl_examples/kidniki.c b/nl_examples/kidniki.c index 9e2b0052dae..661f94ca72d 100644 --- a/nl_examples/kidniki.c +++ b/nl_examples/kidniki.c @@ -1,4 +1,5 @@ - +// license:GPL-2.0+ +// copyright-holders:Couriersud #include "netlist/devices/net_lib.h" #include "netlist/devices/nld_system.h" #include "netlist/analog/nld_bjt.h" diff --git a/nl_examples/mm5837_noise.c b/nl_examples/mm5837_noise.c index 7afe2b6e54d..dff1966e1eb 100644 --- a/nl_examples/mm5837_noise.c +++ b/nl_examples/mm5837_noise.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * mm5837_noise.c * diff --git a/nl_examples/msx_mixer_stage.c b/nl_examples/msx_mixer_stage.c index ddc1cd70cfd..445777eb9cf 100644 --- a/nl_examples/msx_mixer_stage.c +++ b/nl_examples/msx_mixer_stage.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * bjt.c * diff --git a/nl_examples/ne555_astable.c b/nl_examples/ne555_astable.c index 0ab323d3c2d..d5a77b9b8fa 100644 --- a/nl_examples/ne555_astable.c +++ b/nl_examples/ne555_astable.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * ne555_astable.c * diff --git a/nl_examples/opamp.c b/nl_examples/opamp.c index ce347c21c64..40c04a5d4f2 100644 --- a/nl_examples/opamp.c +++ b/nl_examples/opamp.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * opamp.c * diff --git a/nl_examples/sn74ls629_osc.c b/nl_examples/sn74ls629_osc.c index 8e697e0855f..f40c464f55c 100644 --- a/nl_examples/sn74ls629_osc.c +++ b/nl_examples/sn74ls629_osc.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * ne555_astable.c * diff --git a/nl_examples/test.c b/nl_examples/test.c index aee7bf9ec86..9a75dd3ad91 100644 --- a/nl_examples/test.c +++ b/nl_examples/test.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * bjt.c * diff --git a/nl_examples/todo.c b/nl_examples/todo.c index 1c9815864ed..62c713e86fd 100644 --- a/nl_examples/todo.c +++ b/nl_examples/todo.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * todo.c * diff --git a/nl_examples/vccs.c b/nl_examples/vccs.c index 3945734a5da..27ebf5a64e0 100644 --- a/nl_examples/vccs.c +++ b/nl_examples/vccs.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * vccs.c * diff --git a/nl_examples/vccs1.c b/nl_examples/vccs1.c index 72db7467d84..7e6dd1ea48c 100644 --- a/nl_examples/vccs1.c +++ b/nl_examples/vccs1.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * vccs.c * diff --git a/nl_examples/vs_cs.c b/nl_examples/vs_cs.c index 4e6bb9615fe..9b39106a540 100644 --- a/nl_examples/vs_cs.c +++ b/nl_examples/vs_cs.c @@ -1,3 +1,5 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud /* * vs_cs.c * diff --git a/src/devices/cpu/arcompact/arcompact_make.py b/src/devices/cpu/arcompact/arcompact_make.py index 080fd72b426..30aba810a99 100644 --- a/src/devices/cpu/arcompact/arcompact_make.py +++ b/src/devices/cpu/arcompact/arcompact_make.py @@ -1,5 +1,6 @@ #!/usr/bin/python - +# license:BSD-3-Clause +# copyright-holders:David Haywood from __future__ import print_function import sys diff --git a/src/devices/cpu/h8/h8.lst b/src/devices/cpu/h8/h8.lst index 3ec1f46fbe4..56fcd25a548 100644 --- a/src/devices/cpu/h8/h8.lst +++ b/src/devices/cpu/h8/h8.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert macro bxx_any %cond prefetch_start(); TMP2 = read16i(TMP1); diff --git a/src/devices/cpu/h8/h8make.py b/src/devices/cpu/h8/h8make.py index 929b5d14c4e..2115bc01cbe 100644 --- a/src/devices/cpu/h8/h8make.py +++ b/src/devices/cpu/h8/h8make.py @@ -1,5 +1,6 @@ #!/usr/bin/python - +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert from __future__ import print_function USAGE = """ diff --git a/src/devices/cpu/m6502/ddeco16.lst b/src/devices/cpu/m6502/ddeco16.lst index b57f2614cf0..9c84900e98b 100644 --- a/src/devices/cpu/m6502/ddeco16.lst +++ b/src/devices/cpu/m6502/ddeco16.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # deco16 - deco variant brk_16_imp ora_idx ill_non ill_non ill_non ora_zpg asl_zpg ill_non php_imp ora_imm asl_acc u0B_zpg ill_non ora_aba asl_aba ill_non bpl_rel ora_idy ill_non u13_zpg ill_non ora_zpx asl_zpx ill_non clc_imp ora_aby ill_non ill_non ill_non ora_abx asl_abx ill_non diff --git a/src/devices/cpu/m6502/dm4510.lst b/src/devices/cpu/m6502/dm4510.lst index 6de7627ebc7..eae3c8ef006 100644 --- a/src/devices/cpu/m6502/dm4510.lst +++ b/src/devices/cpu/m6502/dm4510.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # m4510 - 65ce02 with a mmu brk_ce_imp ora_ce_idx cle_imp see_imp tsb_ce_zpg ora_ce_zpg asl_ce_zpg rmb_ce_bzp php_ce_imp ora_imm asl_ce_acc tsy_imp tsb_ce_aba ora_aba asl_ce_aba bbr_ce_zpb bpl_ce_rel ora_ce_idy ora_idz bpl_rw2 trb_ce_zpg ora_ce_zpx asl_ce_zpx rmb_ce_bzp clc_ce_imp ora_ce_aby inc_ce_acc inz_imp trb_ce_aba ora_ce_abx asl_ce_abx bbr_ce_zpb diff --git a/src/devices/cpu/m6502/dm6502.lst b/src/devices/cpu/m6502/dm6502.lst index 335cae3d2e7..654a2f1fe74 100644 --- a/src/devices/cpu/m6502/dm6502.lst +++ b/src/devices/cpu/m6502/dm6502.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # m6502_family_device - 6502, 6504 brk_imp ora_idx kil_non slo_idx nop_zpg ora_zpg asl_zpg slo_zpg php_imp ora_imm asl_acc anc_imm nop_aba ora_aba asl_aba slo_aba bpl_rel ora_idy kil_non slo_idy nop_zpx ora_zpx asl_zpx slo_zpx clc_imp ora_aby nop_imp slo_aby nop_abx ora_abx asl_abx slo_abx diff --git a/src/devices/cpu/m6502/dm6509.lst b/src/devices/cpu/m6502/dm6509.lst index 644aa6c79d6..d8e498ecdf8 100644 --- a/src/devices/cpu/m6502/dm6509.lst +++ b/src/devices/cpu/m6502/dm6509.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # m6509 - special banking on two specific instructions, and banking in general brk_imp ora_idx kil_non slo_idx nop_zpg ora_zpg asl_zpg slo_zpg php_imp ora_imm asl_acc anc_imm nop_aba ora_aba asl_aba slo_aba bpl_rel ora_idy kil_non slo_idy nop_zpx ora_zpx asl_zpx slo_zpx clc_imp ora_aby nop_imp slo_aby nop_abx ora_abx asl_abx slo_abx diff --git a/src/devices/cpu/m6502/dm6510.lst b/src/devices/cpu/m6502/dm6510.lst index dbc8bd88d57..18b78643795 100644 --- a/src/devices/cpu/m6502/dm6510.lst +++ b/src/devices/cpu/m6502/dm6510.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # m6510_family - identical to 6502, except for some undocumented instructions that have to be handled specifically brk_imp ora_idx kil_non slo_idx nop_zpg ora_zpg asl_zpg slo_zpg php_imp ora_imm asl_acc anc_10_imm nop_aba ora_aba asl_aba slo_aba bpl_rel ora_idy kil_non slo_idy nop_zpx ora_zpx asl_zpx slo_zpx clc_imp ora_aby nop_imp slo_aby nop_abx ora_abx asl_abx slo_abx diff --git a/src/devices/cpu/m6502/dm65c02.lst b/src/devices/cpu/m6502/dm65c02.lst index 4b0cd1f2db4..a174a154041 100644 --- a/src/devices/cpu/m6502/dm65c02.lst +++ b/src/devices/cpu/m6502/dm65c02.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # m65c02 brk_c_imp ora_idx nop_imm nop_c_imp tsb_zpg ora_zpg asl_zpg nop_c_imp php_imp ora_imm asl_acc nop_c_imp tsb_aba ora_aba asl_aba nop_c_imp bpl_rel ora_idy ora_zpi nop_c_imp trb_zpg ora_zpx asl_zpx nop_c_imp clc_imp ora_aby inc_acc nop_c_imp trb_aba ora_abx asl_c_abx nop_c_imp diff --git a/src/devices/cpu/m6502/dm65ce02.lst b/src/devices/cpu/m6502/dm65ce02.lst index b2fafe67203..819ce35c614 100644 --- a/src/devices/cpu/m6502/dm65ce02.lst +++ b/src/devices/cpu/m6502/dm65ce02.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # m65ce02 - Adds the B and Z registers to the r65c02, a bunch of instructions, and changes most of the timings brk_ce_imp ora_ce_idx cle_imp see_imp tsb_ce_zpg ora_ce_zpg asl_ce_zpg rmb_ce_bzp php_ce_imp ora_imm asl_ce_acc tsy_imp tsb_ce_aba ora_aba asl_ce_aba bbr_ce_zpb bpl_ce_rel ora_ce_idy ora_idz bpl_rw2 trb_ce_zpg ora_ce_zpx asl_ce_zpx rmb_ce_bzp clc_ce_imp ora_ce_aby inc_ce_acc inz_imp trb_ce_aba ora_ce_abx asl_ce_abx bbr_ce_zpb diff --git a/src/devices/cpu/m6502/dm740.lst b/src/devices/cpu/m6502/dm740.lst index c11f0826cd5..04f67738dc9 100644 --- a/src/devices/cpu/m6502/dm740.lst +++ b/src/devices/cpu/m6502/dm740.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # m740 device brk740_imp ora_idx kil_non bbs_bar nop_zpg ora_zpg asl_zpg bbs_bzr php_imp ora_imm asl_acc seb_bac nop_aba ora_aba asl_aba seb_biz bpl_rel ora_idy clt_imp bbc_bar nop_zpx ora_zpx asl_zpx bbc_bzr clc_imp ora_aby dec_acc clb_bac nop_abx ora_abx asl_abx clb_biz diff --git a/src/devices/cpu/m6502/dn2a03.lst b/src/devices/cpu/m6502/dn2a03.lst index 7f0a5d4a9cb..06dcc2610a2 100644 --- a/src/devices/cpu/m6502/dn2a03.lst +++ b/src/devices/cpu/m6502/dn2a03.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # n2a03 - D flag is disabled but present in the P register brk_imp ora_idx kil_non slo_idx nop_zpg ora_zpg asl_zpg slo_zpg php_imp ora_imm asl_acc anc_imm nop_aba ora_aba asl_aba slo_aba bpl_rel ora_idy kil_non slo_idy nop_zpx ora_zpx asl_zpx slo_zpx clc_imp ora_aby nop_imp slo_aby nop_abx ora_abx asl_abx slo_abx diff --git a/src/devices/cpu/m6502/dr65c02.lst b/src/devices/cpu/m6502/dr65c02.lst index fa4a97bda56..60573ac30d3 100644 --- a/src/devices/cpu/m6502/dr65c02.lst +++ b/src/devices/cpu/m6502/dr65c02.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # r65c02 - rockwell variant, with the bitwise instructions and stp/wai brk_c_imp ora_idx nop_imm nop_c_imp tsb_zpg ora_zpg asl_zpg rmb_bzp php_imp ora_imm asl_acc nop_c_imp tsb_aba ora_aba asl_aba bbr_zpb bpl_rel ora_idy ora_zpi nop_c_imp trb_zpg ora_zpx asl_zpx rmb_bzp clc_imp ora_aby inc_acc nop_c_imp trb_aba ora_abx asl_c_abx bbr_zpb diff --git a/src/devices/cpu/m6502/m6502make.py b/src/devices/cpu/m6502/m6502make.py index 4ac62e90ce9..8bcd85f8e21 100755 --- a/src/devices/cpu/m6502/m6502make.py +++ b/src/devices/cpu/m6502/m6502make.py @@ -1,4 +1,6 @@ #!/usr/bin/python +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert from __future__ import print_function diff --git a/src/devices/cpu/m6502/odeco16.lst b/src/devices/cpu/m6502/odeco16.lst index 6cea2fa7282..f3aade96499 100644 --- a/src/devices/cpu/m6502/odeco16.lst +++ b/src/devices/cpu/m6502/odeco16.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # deco 16 opcodes brk_16_imp // The 6502 bug when a nmi occurs in a brk is reproduced (case !irq_taken && nmi_state) diff --git a/src/devices/cpu/m6502/om4510.lst b/src/devices/cpu/m6502/om4510.lst index fbe49491fac..ade37a82db6 100644 --- a/src/devices/cpu/m6502/om4510.lst +++ b/src/devices/cpu/m6502/om4510.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # 4510 opcodes eom_imp diff --git a/src/devices/cpu/m6502/om6502.lst b/src/devices/cpu/m6502/om6502.lst index 24c560c02fa..93026a1fc8b 100644 --- a/src/devices/cpu/m6502/om6502.lst +++ b/src/devices/cpu/m6502/om6502.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # NMOS 6502 opcodes # Verified with visual6502 # documented opcodes diff --git a/src/devices/cpu/m6502/om6509.lst b/src/devices/cpu/m6502/om6509.lst index 4595827b1d7..8c9a6f9baa1 100644 --- a/src/devices/cpu/m6502/om6509.lst +++ b/src/devices/cpu/m6502/om6509.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # 6509 opcodes lda_9_idy diff --git a/src/devices/cpu/m6502/om6510.lst b/src/devices/cpu/m6502/om6510.lst index e08a5229111..1ad0dfc0182 100644 --- a/src/devices/cpu/m6502/om6510.lst +++ b/src/devices/cpu/m6502/om6510.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # 6510 undocumented instructions in a C64 context anc_10_imm TMP2 = read_pc(); diff --git a/src/devices/cpu/m6502/om65c02.lst b/src/devices/cpu/m6502/om65c02.lst index d64ddcdc409..c2536d2c11d 100644 --- a/src/devices/cpu/m6502/om65c02.lst +++ b/src/devices/cpu/m6502/om65c02.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # m65c02 opcodes adc_c_aba diff --git a/src/devices/cpu/m6502/om65ce02.lst b/src/devices/cpu/m6502/om65ce02.lst index 049097fded8..f5b6beebc9a 100644 --- a/src/devices/cpu/m6502/om65ce02.lst +++ b/src/devices/cpu/m6502/om65ce02.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # 65ce02 opcodes, a lot only remove dummy read/write cycles, some are new, some use the B register adc_ce_aba diff --git a/src/devices/cpu/m6502/om740.lst b/src/devices/cpu/m6502/om740.lst index 9f17dc639bf..f5ea32d49dc 100644 --- a/src/devices/cpu/m6502/om740.lst +++ b/src/devices/cpu/m6502/om740.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # m740 opcodes set_imp read_pc_noinc(); diff --git a/src/devices/cpu/m6502/on2a03.lst b/src/devices/cpu/m6502/on2a03.lst index 7d8a72c8d62..2719f7c6ad2 100644 --- a/src/devices/cpu/m6502/on2a03.lst +++ b/src/devices/cpu/m6502/on2a03.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert # n2a03 opcodes - same as 6502 but with d disabled adc_nd_aba TMP = read_pc(); diff --git a/src/devices/cpu/m6809/base6x09.ops b/src/devices/cpu/m6809/base6x09.ops index 334521eb385..54226cddfb9 100644 --- a/src/devices/cpu/m6809/base6x09.ops +++ b/src/devices/cpu/m6809/base6x09.ops @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Nathan Woods NMI: m_nmi_asserted = false; m_cc |= CC_E; diff --git a/src/devices/cpu/m6809/hd6309.ops b/src/devices/cpu/m6809/hd6309.ops index 6da3a904d2b..f96acfc695a 100644 --- a/src/devices/cpu/m6809/hd6309.ops +++ b/src/devices/cpu/m6809/hd6309.ops @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Nathan Woods MAIN: // check interrupt lines switch(get_pending_interrupt()) diff --git a/src/devices/cpu/m6809/konami.ops b/src/devices/cpu/m6809/konami.ops index e2246f85b71..fefa27aea26 100644 --- a/src/devices/cpu/m6809/konami.ops +++ b/src/devices/cpu/m6809/konami.ops @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Nathan Woods MAIN: // check interrupt lines switch(get_pending_interrupt()) diff --git a/src/devices/cpu/m6809/m6809.ops b/src/devices/cpu/m6809/m6809.ops index 96b9f6c11a7..5602211527a 100644 --- a/src/devices/cpu/m6809/m6809.ops +++ b/src/devices/cpu/m6809/m6809.ops @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Nathan Woods MAIN: // check interrupt lines switch(get_pending_interrupt()) diff --git a/src/devices/cpu/m6809/m6809make.py b/src/devices/cpu/m6809/m6809make.py index c3d5b0f66ee..8838b960191 100644 --- a/src/devices/cpu/m6809/m6809make.py +++ b/src/devices/cpu/m6809/m6809make.py @@ -1,4 +1,6 @@ #!/usr/bin/python +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert import sys import re diff --git a/src/devices/cpu/mcs96/mcs96make.py b/src/devices/cpu/mcs96/mcs96make.py index 72d8f36cfa6..b4844942e3d 100644 --- a/src/devices/cpu/mcs96/mcs96make.py +++ b/src/devices/cpu/mcs96/mcs96make.py @@ -1,4 +1,6 @@ #!/usr/bin/python +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert from __future__ import print_function diff --git a/src/devices/cpu/mcs96/mcs96ops.lst b/src/devices/cpu/mcs96/mcs96ops.lst index 7ccedf358da..372acb44218 100644 --- a/src/devices/cpu/mcs96/mcs96ops.lst +++ b/src/devices/cpu/mcs96/mcs96ops.lst @@ -1,3 +1,5 @@ +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert fetch if(irq_requested) { int level; diff --git a/src/devices/cpu/tms57002/tmsmake.py b/src/devices/cpu/tms57002/tmsmake.py index df37f261dc1..e2e12b5a4b3 100755 --- a/src/devices/cpu/tms57002/tmsmake.py +++ b/src/devices/cpu/tms57002/tmsmake.py @@ -1,4 +1,6 @@ #!/usr/bin/python +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert from __future__ import print_function -- cgit v1.2.3-70-g09d2 From d4fe78a48ac992ce2312f54413439dbc6e4a2e2e Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 5 Mar 2016 10:31:41 +0100 Subject: Added README and LICENSE files (CC0) to folders containing meta-data or documentation (nw) --- docs/LICENSE | 116 ++++++++++++++++++++++++++++++++++++++++++ docs/README.md | 5 ++ doxygen/LICENSE | 116 ++++++++++++++++++++++++++++++++++++++++++ hash/LICENSE | 116 ++++++++++++++++++++++++++++++++++++++++++ hash/README.md | 6 +++ keymaps/LICENSE | 116 ++++++++++++++++++++++++++++++++++++++++++ keymaps/README.md | 6 +++ samples/LICENSE | 116 ++++++++++++++++++++++++++++++++++++++++++ samples/README.md | 5 ++ shaders/README.md | 3 ++ src/emu/layout/LICENSE | 116 ++++++++++++++++++++++++++++++++++++++++++ src/emu/layout/README.md | 6 +++ src/ldplayer/layout/LICENSE | 116 ++++++++++++++++++++++++++++++++++++++++++ src/ldplayer/layout/README.md | 6 +++ src/mame/layout/LICENSE | 116 ++++++++++++++++++++++++++++++++++++++++++ src/mame/layout/README.md | 6 +++ src/osd/sdl/man/LICENSE | 116 ++++++++++++++++++++++++++++++++++++++++++ src/osd/sdl/man/README.md | 5 ++ 18 files changed, 1092 insertions(+) create mode 100644 docs/LICENSE create mode 100644 docs/README.md create mode 100644 doxygen/LICENSE create mode 100644 hash/LICENSE create mode 100644 hash/README.md create mode 100644 keymaps/LICENSE create mode 100644 keymaps/README.md create mode 100644 samples/LICENSE create mode 100644 samples/README.md create mode 100644 shaders/README.md create mode 100644 src/emu/layout/LICENSE create mode 100644 src/emu/layout/README.md create mode 100644 src/ldplayer/layout/LICENSE create mode 100644 src/ldplayer/layout/README.md create mode 100644 src/mame/layout/LICENSE create mode 100644 src/mame/layout/README.md create mode 100644 src/osd/sdl/man/LICENSE create mode 100644 src/osd/sdl/man/README.md (limited to 'src') diff --git a/docs/LICENSE b/docs/LICENSE new file mode 100644 index 00000000000..670154e3538 --- /dev/null +++ b/docs/LICENSE @@ -0,0 +1,116 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000000..669c251a923 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,5 @@ +# **Docs** # + +Documentation of MAME is work of many different contributors, and contain information about usage and internals of MAME. + +Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file diff --git a/doxygen/LICENSE b/doxygen/LICENSE new file mode 100644 index 00000000000..670154e3538 --- /dev/null +++ b/doxygen/LICENSE @@ -0,0 +1,116 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + diff --git a/hash/LICENSE b/hash/LICENSE new file mode 100644 index 00000000000..670154e3538 --- /dev/null +++ b/hash/LICENSE @@ -0,0 +1,116 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + diff --git a/hash/README.md b/hash/README.md new file mode 100644 index 00000000000..85b1e7d400c --- /dev/null +++ b/hash/README.md @@ -0,0 +1,6 @@ +# **Software Lists** # + +Software lists are containing meta-data of software for computers and consoles and are comming from various sources, +they are not compiled in code but use as valuable source of information in order to preserve and document software. + +Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file diff --git a/keymaps/LICENSE b/keymaps/LICENSE new file mode 100644 index 00000000000..670154e3538 --- /dev/null +++ b/keymaps/LICENSE @@ -0,0 +1,116 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + diff --git a/keymaps/README.md b/keymaps/README.md new file mode 100644 index 00000000000..f38fc2492d4 --- /dev/null +++ b/keymaps/README.md @@ -0,0 +1,6 @@ +# **Keymaps** # + +Keymap files are definiton files for mapping different keyboard layouts to MAME input system, and are +product of work of many different contributors. + +Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file diff --git a/samples/LICENSE b/samples/LICENSE new file mode 100644 index 00000000000..670154e3538 --- /dev/null +++ b/samples/LICENSE @@ -0,0 +1,116 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + diff --git a/samples/README.md b/samples/README.md new file mode 100644 index 00000000000..95f2526cee0 --- /dev/null +++ b/samples/README.md @@ -0,0 +1,5 @@ +# **Samples** # + +Samples are taken by team members or contributors to make mechanical sounds of various machines available in emulation. + +Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file diff --git a/shaders/README.md b/shaders/README.md new file mode 100644 index 00000000000..74a8c7d7834 --- /dev/null +++ b/shaders/README.md @@ -0,0 +1,3 @@ +# **Shares** # + +This folder is containing precompiled shaders to be used with BGFX, source files are available under their own license \ No newline at end of file diff --git a/src/emu/layout/LICENSE b/src/emu/layout/LICENSE new file mode 100644 index 00000000000..670154e3538 --- /dev/null +++ b/src/emu/layout/LICENSE @@ -0,0 +1,116 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + diff --git a/src/emu/layout/README.md b/src/emu/layout/README.md new file mode 100644 index 00000000000..78ef2e5e6ad --- /dev/null +++ b/src/emu/layout/README.md @@ -0,0 +1,6 @@ +# **Layout** # + +Layouts files are definiton files to describe look and fell of emulated machines, and are product +of many different contributors. + +Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file diff --git a/src/ldplayer/layout/LICENSE b/src/ldplayer/layout/LICENSE new file mode 100644 index 00000000000..670154e3538 --- /dev/null +++ b/src/ldplayer/layout/LICENSE @@ -0,0 +1,116 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + diff --git a/src/ldplayer/layout/README.md b/src/ldplayer/layout/README.md new file mode 100644 index 00000000000..78ef2e5e6ad --- /dev/null +++ b/src/ldplayer/layout/README.md @@ -0,0 +1,6 @@ +# **Layout** # + +Layouts files are definiton files to describe look and fell of emulated machines, and are product +of many different contributors. + +Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file diff --git a/src/mame/layout/LICENSE b/src/mame/layout/LICENSE new file mode 100644 index 00000000000..670154e3538 --- /dev/null +++ b/src/mame/layout/LICENSE @@ -0,0 +1,116 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + diff --git a/src/mame/layout/README.md b/src/mame/layout/README.md new file mode 100644 index 00000000000..78ef2e5e6ad --- /dev/null +++ b/src/mame/layout/README.md @@ -0,0 +1,6 @@ +# **Layout** # + +Layouts files are definiton files to describe look and fell of emulated machines, and are product +of many different contributors. + +Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file diff --git a/src/osd/sdl/man/LICENSE b/src/osd/sdl/man/LICENSE new file mode 100644 index 00000000000..670154e3538 --- /dev/null +++ b/src/osd/sdl/man/LICENSE @@ -0,0 +1,116 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + diff --git a/src/osd/sdl/man/README.md b/src/osd/sdl/man/README.md new file mode 100644 index 00000000000..61036986e6a --- /dev/null +++ b/src/osd/sdl/man/README.md @@ -0,0 +1,5 @@ +# **man pages** # + +man pages for MAME and its tools is work of many different contributors, and contain information about usage of MAME and utilities that are comming in package. + +Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 15dadb5bc01bfbf9c5e4819dc1d33b11ccc7dc89 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 5 Mar 2016 10:45:40 +0100 Subject: Missed a few files (nw) --- artwork/LICENSE | 116 +++++++++++++++++++++ artwork/README.md | 5 + .../opengl/shader/glsl_bilinear_idx16_lut.fsh | 3 +- .../opengl/shader/glsl_bilinear_rgb32_dir.fsh | 3 +- .../opengl/shader/glsl_bilinear_rgb32_lut.fsh | 3 +- .../modules/opengl/shader/glsl_plain_idx16_lut.fsh | 3 +- .../modules/opengl/shader/glsl_plain_rgb32_dir.fsh | 3 +- .../modules/opengl/shader/glsl_plain_rgb32_lut.fsh | 3 +- src/osd/sdl/aueffectutil.mm | 2 + src/osd/sdl/keymaps/km-be.txt | 23 ---- src/osd/sdl/keymaps/km-ch.txt | 14 --- src/osd/sdl/keymaps/km-de.txt | 26 ----- src/osd/sdl/keymaps/km-fr-OSX.txt | 13 --- src/osd/sdl/keymaps/km-fr.txt | 23 ---- src/osd/sdl/keymaps/km_it.txt | 12 --- src/osd/sdl/ledutil.sh | 3 +- src/osd/sdl/taputil.sh | 3 +- 17 files changed, 139 insertions(+), 119 deletions(-) create mode 100644 artwork/LICENSE create mode 100644 artwork/README.md delete mode 100644 src/osd/sdl/keymaps/km-be.txt delete mode 100644 src/osd/sdl/keymaps/km-ch.txt delete mode 100644 src/osd/sdl/keymaps/km-de.txt delete mode 100644 src/osd/sdl/keymaps/km-fr-OSX.txt delete mode 100644 src/osd/sdl/keymaps/km-fr.txt delete mode 100644 src/osd/sdl/keymaps/km_it.txt (limited to 'src') diff --git a/artwork/LICENSE b/artwork/LICENSE new file mode 100644 index 00000000000..670154e3538 --- /dev/null +++ b/artwork/LICENSE @@ -0,0 +1,116 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + diff --git a/artwork/README.md b/artwork/README.md new file mode 100644 index 00000000000..4505ae5c1e5 --- /dev/null +++ b/artwork/README.md @@ -0,0 +1,5 @@ +# **Artwork** # + +Artwork files are representing work of multiple people and are used by layout manager and shaders. + +Licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file diff --git a/src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh b/src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh index ef0030b7519..c2fba95bdc6 100644 --- a/src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh +++ b/src/osd/modules/opengl/shader/glsl_bilinear_idx16_lut.fsh @@ -1,4 +1,5 @@ - +// license:BSD-3-Clause +// copyright-holders:Sven Gothel #pragma optimize (on) #pragma debug (off) diff --git a/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh b/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh index c739c16934e..97278c65df5 100644 --- a/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh +++ b/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_dir.fsh @@ -1,4 +1,5 @@ - +// license:BSD-3-Clause +// copyright-holders:Sven Gothel #pragma optimize (on) #pragma debug (off) diff --git a/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh b/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh index d6c9f5e7f59..93cd172e0b1 100644 --- a/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh +++ b/src/osd/modules/opengl/shader/glsl_bilinear_rgb32_lut.fsh @@ -1,4 +1,5 @@ - +// license:BSD-3-Clause +// copyright-holders:Sven Gothel #pragma optimize (on) #pragma debug (off) diff --git a/src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh b/src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh index 465aa610d59..9c8728d90b9 100644 --- a/src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh +++ b/src/osd/modules/opengl/shader/glsl_plain_idx16_lut.fsh @@ -1,4 +1,5 @@ - +// license:BSD-3-Clause +// copyright-holders:Sven Gothel #pragma optimize (on) #pragma debug (off) diff --git a/src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh b/src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh index 0e5a4605ac8..eb3f902f93b 100644 --- a/src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh +++ b/src/osd/modules/opengl/shader/glsl_plain_rgb32_dir.fsh @@ -1,4 +1,5 @@ - +// license:BSD-3-Clause +// copyright-holders:Sven Gothel #pragma optimize (on) #pragma debug (off) diff --git a/src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh b/src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh index 14c05aaa844..3bc16870166 100644 --- a/src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh +++ b/src/osd/modules/opengl/shader/glsl_plain_rgb32_lut.fsh @@ -1,4 +1,5 @@ - +// license:BSD-3-Clause +// copyright-holders:Sven Gothel #pragma optimize (on) #pragma debug (off) diff --git a/src/osd/sdl/aueffectutil.mm b/src/osd/sdl/aueffectutil.mm index 45ca18d178e..531d814e987 100644 --- a/src/osd/sdl/aueffectutil.mm +++ b/src/osd/sdl/aueffectutil.mm @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Vas Crabb #import #import #import diff --git a/src/osd/sdl/keymaps/km-be.txt b/src/osd/sdl/keymaps/km-be.txt deleted file mode 100644 index 014f3f02fac..00000000000 --- a/src/osd/sdl/keymaps/km-be.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Keymap for Belgian AZERTY keyboard (Linux) -ITEM_ID_TILDE SDLK_WORLD_18 0x31 0xb2 ² -ITEM_ID_1 SDLK_AMPERSAND 0xa 0x26 & -ITEM_ID_2 SDLK_WORLD_73 0xb 0xe9 é -ITEM_ID_3 SDLK_QUOTEDBL 0xc 0x22 " -ITEM_ID_4 SDLK_QUOTE 0xd 0x27 ' -ITEM_ID_5 SDLK_LEFTPAREN 0xe 0x28 ( -ITEM_ID_6 SDLK_WORLD_39 0xf 0xa7 § -ITEM_ID_7 SDLK_WORLD_72 0x10 0xe8 è -ITEM_ID_8 SDLK_EXCLAIM 0x11 0x21 ! -ITEM_ID_9 SDLK_WORLD_71 0x12 0xe7 ç -ITEM_ID_0 SDLK_WORLD_64 0x13 0xe0 à -ITEM_ID_MINUS SDLK_RIGHTPAREN 0x14 0x29 ) -ITEM_ID_EQUALS SDLK_MINUS 0x15 0x2d - -ITEM_ID_OPENBRACE SDLK_CARET 0x22 0x5e ^ -ITEM_ID_CLOSEBRACE SDLK_DOLLAR 0x23 0x24 $ -ITEM_ID_COMMA SDLK_COMMA 0x3a 0x2c , -ITEM_ID_STOP SDLK_SEMICOLON 0x3b 0x3b ; -ITEM_ID_SLASH SDLK_COLON 0x3c 0x3a : -ITEM_ID_COLON SDLK_WORLD_89 0x30 0xf9 ù -ITEM_ID_QUOTE SDLK_WORLD_53 0x33 0xb5 µ -ITEM_ID_BACKSLASH SDLK_EQUALS 0x3d 0x3d = -ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c < diff --git a/src/osd/sdl/keymaps/km-ch.txt b/src/osd/sdl/keymaps/km-ch.txt deleted file mode 100644 index a23545bf5c8..00000000000 --- a/src/osd/sdl/keymaps/km-ch.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Keymap file for a swiss keyboard (Linux) -# -# -ITEM_ID_MINUS SDLK_QUOTE 0x14 0x27 ' -ITEM_ID_EQUALS SDLK_CARET 0x15 0x0 ^ -ITEM_ID_Y SDLK_z 0x1d 0x7a z -ITEM_ID_OPENBRACE SDLK_WORLD_92 0x22 0xfc ü -ITEM_ID_CLOSEBRACE SDLK_COMPOSE 0x23 0x0 " -ITEM_ID_COLON SDLK_WORLD_86 0x2f 0xf6 ö -ITEM_ID_QUOTE SDLK_WORLD_68 0x30 0xe4 ä -ITEM_ID_TILDE SDLK_WORLD_7 0x31 0xa7 § -ITEM_ID_BACKSLASH SDLK_LESS 0x5e 0x3c < -ITEM_ID_Z SDLK_y 0x34 0x79 y -ITEM_ID_SLASH SDLK_MINUS 0x3d 0x2d - diff --git a/src/osd/sdl/keymaps/km-de.txt b/src/osd/sdl/keymaps/km-de.txt deleted file mode 100644 index 5e5b75fa7e9..00000000000 --- a/src/osd/sdl/keymaps/km-de.txt +++ /dev/null @@ -1,26 +0,0 @@ -# Keymap file for a german keyboard (Linux) -# -# -ITEM_ID_TILDE SDLK_CARET 0x31 0x0 ^ -ITEM_ID_MINUS SDLK_WORLD_63 0x14 0xdf ß -ITEM_ID_EQUALS SDLK_COMPOSE 0x15 0x0 ' -ITEM_ID_OPENBRACE SDLK_WORLD_92 0x22 0xfc Ü -ITEM_ID_CLOSEBRACE SDLK_PLUS 0x23 0x2b + -ITEM_ID_COLON SDLK_WORLD_86 0x2f 0xf6 Ö -ITEM_ID_QUOTE SDLK_WORLD_68 0x30 0xe4 Ä -ITEM_ID_BACKSLASH SDLK_LESS 0x5e 0x3c < -ITEM_ID_SLASH SDLK_MINUS 0x3d 0x2d - -ITEM_ID_Z SDLK_y 0x34 0x79 Y -ITEM_ID_Y SDLK_z 0x1d 0x7a Z -[SDL2] -ITEM_ID_TILDE SDL_SCANCODE_GRAVE 0x35 0x0 ^ -ITEM_ID_MINUS SDL_SCANCODE_MINUS 0x2d 0x0 ß -ITEM_ID_EQUALS SDL_SCANCODE_EQUALS 0x2e 0x0 ' -ITEM_ID_OPENBRACE SDL_SCANCODE_LEFTBRACKET 0x2f 0x0 Ü -ITEM_ID_CLOSEBRACE SDL_SCANCODE_RIGHTBRACKET 0x30 0x0 + -ITEM_ID_COLON SDL_SCANCODE_SEMICOLON 0x33 0x0 Ö -ITEM_ID_QUOTE SDL_SCANCODE_APOSTROPHE 0x34 0x0 Ä -ITEM_ID_BACKSLASH SDL_SCANCODE_BACKSLASH 0x31 0x0 # -ITEM_ID_SLASH SDL_SCANCODE_SLASH 0x38 0x0 - -ITEM_ID_Z SDL_SCANCODE_Y 0x34 0x79 Y -ITEM_ID_Y SDL_SCANCODE_Z 0x1d 0x7a Z diff --git a/src/osd/sdl/keymaps/km-fr-OSX.txt b/src/osd/sdl/keymaps/km-fr-OSX.txt deleted file mode 100644 index fc9bbef9f7c..00000000000 --- a/src/osd/sdl/keymaps/km-fr-OSX.txt +++ /dev/null @@ -1,13 +0,0 @@ -# Keymap for French AZERTY keyboard (OSX) -ITEM_ID_1 SDLK_AMPERSAND 0x12 0x26 & -ITEM_ID_2 SDLK_WORLD_0 0x13 0xe9 é -ITEM_ID_3 SDLK_QUOTEDBL 0x14 0x22 " -ITEM_ID_4 SDLK_QUOTE 0x15 0x27 ' -ITEM_ID_5 SDLK_LEFTPAREN 0x17 0x28 ( -ITEM_ID_6 SDLK_WORLD_1 0x16 0xa7 § -ITEM_ID_7 SDLK_WORLD_3 0x1a 0xe8 è -ITEM_ID_8 SDLK_EXCLAIM 0x1c 0x21 ! -ITEM_ID_9 SDLK_WORLD_2 0x19 0xe7 ç -ITEM_ID_0 SDLK_WORLD_4 0x1d 0xe0 à -ITEM_ID_MINUS SDLK_RIGHTPAREN 0x1b 0x29 ) -ITEM_ID_EQUALS SDLK_MINUS 0x18 0x2d - diff --git a/src/osd/sdl/keymaps/km-fr.txt b/src/osd/sdl/keymaps/km-fr.txt deleted file mode 100644 index f68948295da..00000000000 --- a/src/osd/sdl/keymaps/km-fr.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Keymap for French AZERTY keyboard (Linux) -ITEM_ID_TILDE SDLK_WORLD_18 0x31 0xb2 ² -ITEM_ID_1 SDLK_AMPERSAND 0xa 0x26 & -ITEM_ID_2 SDLK_WORLD_73 0xb 0xe9 é -ITEM_ID_3 SDLK_QUOTEDBL 0xc 0x22 " -ITEM_ID_4 SDLK_QUOTE 0xd 0x27 ' -ITEM_ID_5 SDLK_LEFTPAREN 0xe 0x28 ( -ITEM_ID_6 SDLK_MINUS 0xf 0x2d - -ITEM_ID_7 SDLK_WORLD_72 0x10 0xe8 è -ITEM_ID_8 SDLK_UNDERSCORE 0x11 0x5f _ -ITEM_ID_9 SDLK_WORLD_71 0x12 0xe7 ç -ITEM_ID_0 SDLK_WORLD_64 0x13 0xe0 à -ITEM_ID_MINUS SDLK_RIGHTPAREN 0x14 0x29 ) -ITEM_ID_EQUALS SDLK_EQUALS 0x15 0x3d = -ITEM_ID_OPENBRACE SDLK_CARET 0x22 0x0 -ITEM_ID_CLOSEBRACE SDLK_DOLLAR 0x23 0x0 -ITEM_ID_COMMA SDLK_COMMA 0x3a 0x2c , -ITEM_ID_STOP SDLK_SEMICOLON 0x3b 0x3b ; -ITEM_ID_SLASH SDLK_COLON 0x3c 0x3a : -ITEM_ID_COLON SDLK_WORLD_89 0x30 0xf9 ù -ITEM_ID_QUOTE SDLK_ASTERISK 0x33 0x2a * -ITEM_ID_BACKSLASH SDLK_EXCLAIM 0x3d 0x21 ! -ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c < diff --git a/src/osd/sdl/keymaps/km_it.txt b/src/osd/sdl/keymaps/km_it.txt deleted file mode 100644 index aae0a121356..00000000000 --- a/src/osd/sdl/keymaps/km_it.txt +++ /dev/null @@ -1,12 +0,0 @@ -# MAME/MESS keymap for an italian PC 105-keys keyboard - -ITEM_ID_TILDE SDLK_BACKSLASH 0x31 0x5c \ -ITEM_ID_MINUS SDLK_QUOTE 0x14 0x27 ' -ITEM_ID_EQUALS SDLK_WORLD_76 0x15 0xec ì -ITEM_ID_OPENBRACE SDLK_WORLD_72 0x22 0xe8 è -ITEM_ID_CLOSEBRACE SDLK_PLUS 0x23 0x2b + -ITEM_ID_COLON SDLK_WORLD_82 0x2f 0xf2 ò -ITEM_ID_QUOTE SDLK_WORLD_64 0x30 0xe0 à -ITEM_ID_BACKSLASH SDLK_WORLD_89 0x33 0xf9 ù -ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c < -ITEM_ID_SLASH SDLK_MINUS 0x3d 0x2d - \ No newline at end of file diff --git a/src/osd/sdl/ledutil.sh b/src/osd/sdl/ledutil.sh index ef9ac93d353..e91e44200de 100644 --- a/src/osd/sdl/ledutil.sh +++ b/src/osd/sdl/ledutil.sh @@ -1,5 +1,6 @@ #!/bin/sh - +# license:BSD-3-Clause +# copyright-holders:Olivier Galibert, R. Belmont # ============================================================ # # ledutil.sh - Example script for output notifiers diff --git a/src/osd/sdl/taputil.sh b/src/osd/sdl/taputil.sh index 669d652436e..1a22048b9ca 100644 --- a/src/osd/sdl/taputil.sh +++ b/src/osd/sdl/taputil.sh @@ -1,5 +1,6 @@ #!/bin/sh - +# license:BSD-3-Clause +# copyright-holders:Carl NAME=$2 OURUID=`id -u $NAME` HOSTIP=$4 -- cgit v1.2.3-70-g09d2 From 80b569fb2b499fd0026e4e571bd99bd1c67ff370 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 5 Mar 2016 11:00:51 +0100 Subject: hh_cop400: ctstein WIP --- src/mame/drivers/hh_cop400.cpp | 55 +++++++++++++++++++++++++++++++++++++++--- src/mame/layout/ctstein.lay | 23 ++++++++++++++++++ 2 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 src/mame/layout/ctstein.lay (limited to 'src') diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index fcf3eabc189..74f513bb824 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -17,6 +17,7 @@ #include "sound/speaker.h" // internal artwork +#include "ctstein.lh" // clickable #include "einvaderc.lh" // test-layout(but still playable) #include "funjacks.lh" #include "funrlgl.lh" @@ -245,26 +246,74 @@ public: ctstein_state(const machine_config &mconfig, device_type type, const char *tag) : hh_cop400_state(mconfig, type, tag) { } + + DECLARE_WRITE8_MEMBER(write_g); + DECLARE_WRITE8_MEMBER(write_l); + DECLARE_WRITE_LINE_MEMBER(write_sk); + DECLARE_READ8_MEMBER(read_l); }; // handlers -//.. +WRITE8_MEMBER(ctstein_state::write_g) +{ + // G0-G2: input mux + m_inp_mux = ~data & 7; +} + +WRITE8_MEMBER(ctstein_state::write_l) +{ + // L0-L3: button lamps + display_matrix(4, 1, data & 0xf, 1); +} + +READ8_MEMBER(ctstein_state::read_l) +{ + // L4-L7: multiplexed inputs + return read_inputs(3) << 4 | 0xf; +} + +WRITE_LINE_MEMBER(ctstein_state::write_sk) +{ + // SK: speaker out + m_speaker->level_w(state); +} // config static INPUT_PORTS_START( ctstein ) + PORT_START("IN.0") // D0 port L + PORT_CONFNAME( 0x0f, 0x01, DEF_STR( Difficulty ) ) + PORT_CONFSETTING( 0x01, "1" ) + PORT_CONFSETTING( 0x02, "2" ) + PORT_CONFSETTING( 0x04, "3" ) + PORT_CONFSETTING( 0x08, "4" ) + + PORT_START("IN.1") // D1 port L + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON6 ) + PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN.2") // D2 port L + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) INPUT_PORTS_END static MACHINE_CONFIG_START( ctstein, ctstein_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", COP421, 1000000) // approximation - RC osc. R=12K to +6V, C=100pf to GND + MCFG_CPU_ADD("maincpu", COP421, 2000000) // approximation - RC osc. R=12K to +6V, C=100pf to GND MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed + MCFG_COP400_WRITE_G_CB(WRITE8(ctstein_state, write_g)) + MCFG_COP400_WRITE_L_CB(WRITE8(ctstein_state, write_l)) + MCFG_COP400_WRITE_SK_CB(WRITELINE(ctstein_state, write_sk)) + MCFG_COP400_READ_L_CB(READ8(ctstein_state, read_l)) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_cop400_state, display_decay_tick, attotime::from_msec(1)) -// MCFG_DEFAULT_LAYOUT(layout_ctstein) + MCFG_DEFAULT_LAYOUT(layout_ctstein) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/layout/ctstein.lay b/src/mame/layout/ctstein.lay new file mode 100644 index 00000000000..c65fae22176 --- /dev/null +++ b/src/mame/layout/ctstein.lay @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-70-g09d2 From 6cc3a6cc90503f4007d77bf11a9ff698fe588868 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 5 Mar 2016 11:55:22 +0100 Subject: Support for filtering exceptions (nw) --- scripts/build/makelist.py | 13 +++++++++++++ src/mame/mess.flt | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/scripts/build/makelist.py b/scripts/build/makelist.py index 329ff374520..cb6400b4d80 100644 --- a/scripts/build/makelist.py +++ b/scripts/build/makelist.py @@ -9,6 +9,8 @@ import sys drivlist = [] sourcelist = [] +filter_addlist = [] +filter_removelist = [] def parse_file(srcfile): try: @@ -102,6 +104,12 @@ def parse_filter_file(srcfile): sys.stderr.write("Importing drivers from '%s'\n" % sourcename[1:]) parse_filter_file(sourcename[1:]) continue + if sourcename[0]=='+': + filter_addlist.append(sourcename[1:]) + continue + if sourcename[0]=='-': + filter_removelist.append(sourcename[1:]) + continue if not all(((c >='a' and c<='z') or (c>='0' and c<='9') or c=='_' or c=='.' or c=='-') for c in sourcename): sys.stderr.write("%s:%d - Invalid character in driver \"%s\"\n" % (srcfile, linenum, sourcename)) return 1 @@ -128,6 +136,11 @@ if len(drivlist)==0 : sys.stderr.write("No drivers found\n") sys.exit(1) +for x in filter_addlist: + drivlist.append(x) + +drivlist = [x for x in drivlist if (x not in filter_removelist)] + sys.stderr.write("%d driver(s) found\n" % len(drivlist)) # add a reference to the ___empty driver diff --git a/src/mame/mess.flt b/src/mame/mess.flt index 00289661e14..28a2befb2cb 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -123,7 +123,6 @@ concept.cpp cortex.cpp cosmicos.cpp cp1.cpp -cps1.cpp craft.cpp crvision.cpp ct486.cpp @@ -672,3 +671,9 @@ zorba.cpp zrt80.cpp zsbc3.cpp zx.cpp +//exceptions + to add - to remove form imported list +-orbatak ++wofch ++sfzch ++sfach ++sfzbch -- cgit v1.2.3-70-g09d2 From b18ebd99ce33bdad9aa6742053e2615499afd5cf Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 5 Mar 2016 12:26:22 +0100 Subject: Machine promoted to WORKING ------------- Castle Toy Einstein [hap, Sean Riddle] --- src/mame/drivers/hh_cop400.cpp | 44 +++++++++++--------- src/mame/layout/ctstein.lay | 92 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 108 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index 74f513bb824..abd92f5867d 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -237,6 +237,8 @@ UINT8 hh_cop400_state::read_inputs(int columns) Castle Toy Einstein * COP421 MCU label ~/927 COP421-NEZ/N * 4 lamps, 1-bit sound + + This is a Simon clone, the tones are not harmonic. ***************************************************************************/ @@ -263,8 +265,9 @@ WRITE8_MEMBER(ctstein_state::write_g) WRITE8_MEMBER(ctstein_state::write_l) { - // L0-L3: button lamps - display_matrix(4, 1, data & 0xf, 1); + // L0-L3: button lamps (strobed) + display_matrix(4, 1, data, 1); + display_matrix(4, 1, data, 0); } READ8_MEMBER(ctstein_state::read_l) @@ -283,30 +286,30 @@ WRITE_LINE_MEMBER(ctstein_state::write_sk) // config static INPUT_PORTS_START( ctstein ) - PORT_START("IN.0") // D0 port L - PORT_CONFNAME( 0x0f, 0x01, DEF_STR( Difficulty ) ) - PORT_CONFSETTING( 0x01, "1" ) - PORT_CONFSETTING( 0x02, "2" ) - PORT_CONFSETTING( 0x04, "3" ) - PORT_CONFSETTING( 0x08, "4" ) - - PORT_START("IN.1") // D1 port L - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON6 ) + PORT_START("IN.0") // G0 port L + PORT_CONFNAME( 0x0f, 0x01^0x0f, DEF_STR( Difficulty ) ) + PORT_CONFSETTING( 0x01^0x0f, "1" ) + PORT_CONFSETTING( 0x02^0x0f, "2" ) + PORT_CONFSETTING( 0x04^0x0f, "3" ) + PORT_CONFSETTING( 0x08^0x0f, "4" ) + + PORT_START("IN.1") // G1 port L + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("Best Score") PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("IN.2") // D2 port L - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) + PORT_START("IN.2") // G2 port L + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Red Button") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Yellow Button") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Green Button") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Blue Button") INPUT_PORTS_END static MACHINE_CONFIG_START( ctstein, ctstein_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", COP421, 2000000) // approximation - RC osc. R=12K to +6V, C=100pf to GND - MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed + MCFG_CPU_ADD("maincpu", COP421, 850000) // approximation - RC osc. R=12K to +6V, C=100pf to GND + MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed MCFG_COP400_WRITE_G_CB(WRITE8(ctstein_state, write_g)) MCFG_COP400_WRITE_L_CB(WRITE8(ctstein_state, write_l)) MCFG_COP400_WRITE_SK_CB(WRITELINE(ctstein_state, write_sk)) @@ -729,6 +732,7 @@ static INPUT_PORTS_START( plus1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) + PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END static MACHINE_CONFIG_START( plus1, plus1_state ) @@ -939,7 +943,7 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ -CONS( 1979, ctstein, 0, 0, ctstein, ctstein, driver_device, 0, "Castle Toy", "Einstein (Castle Toy)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +CONS( 1979, ctstein, 0, 0, ctstein, ctstein, driver_device, 0, "Castle Toy", "Einstein (Castle Toy)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1979, h2hbaskb, 0, 0, h2hbaskb, h2hbaskb, driver_device, 0, "Coleco", "Head to Head Basketball (COP420L)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) diff --git a/src/mame/layout/ctstein.lay b/src/mame/layout/ctstein.lay index c65fae22176..d86f5caa719 100644 --- a/src/mame/layout/ctstein.lay +++ b/src/mame/layout/ctstein.lay @@ -3,21 +3,97 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + -- cgit v1.2.3-70-g09d2 From 5b549a4fe01408bc959e858a343883156264b4ad Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 5 Mar 2016 13:02:05 +0100 Subject: Using SDL_INIT_GAMECONTROLLER it explicitly calls SDL_INIT_JOYSTICK some experimental code (nw) --- src/osd/modules/input/input_sdl.cpp | 19 ++++++++++++++----- src/osd/sdl/sdlmain.cpp | 7 +++---- src/osd/sdl/window.cpp | 2 +- 3 files changed, 18 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp index 3894f25e1b4..43d4cbf6a6c 100644 --- a/src/osd/modules/input/input_sdl.cpp +++ b/src/osd/modules/input/input_sdl.cpp @@ -688,11 +688,20 @@ public: int physical_stick; for (physical_stick = 0; physical_stick < SDL_NumJoysticks(); physical_stick++) { - SDL_Joystick *joy = SDL_JoystickOpen(physical_stick); - std::string joy_name = remove_spaces(SDL_JoystickName(joy)); - SDL_JoystickClose(joy); - - devmap_register(&m_joy_map, physical_stick, joy_name.c_str()); + if (SDL_IsGameController(physical_stick)) { + osd_printf_verbose("Joystick %i is supported by the game controller interface!\n", physical_stick); + osd_printf_verbose("Compatible controller, named \'%s\'\n", SDL_GameControllerNameForIndex(physical_stick)); + SDL_GameController *joy = SDL_GameControllerOpen(physical_stick); + osd_printf_verbose("Controller is mapped as \"%s\".\n", SDL_GameControllerMapping(joy)); + std::string joy_name = remove_spaces(SDL_GameControllerName(joy)); + SDL_GameControllerClose(joy); + devmap_register(&m_joy_map, physical_stick, joy_name.c_str()); + } else { + SDL_Joystick *joy = SDL_JoystickOpen(physical_stick); + std::string joy_name = remove_spaces(SDL_JoystickName(joy)); + SDL_JoystickClose(joy); + devmap_register(&m_joy_map, physical_stick, joy_name.c_str()); + } } for (int stick = 0; stick < MAX_DEVMAP_ENTRIES; stick++) diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp index 1a52a105fd5..66bca69b1cf 100644 --- a/src/osd/sdl/sdlmain.cpp +++ b/src/osd/sdl/sdlmain.cpp @@ -270,8 +270,7 @@ void sdl_osd_interface::osd_exit() if (!SDLMAME_INIT_IN_WORKER_THREAD) { - /* FixMe: Bug in SDL2.0, Quitting joystick will cause SIGSEGV */ - SDL_QuitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO /*| SDL_INIT_JOYSTICK */); + SDL_QuitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER ); } } @@ -490,9 +489,9 @@ void sdl_osd_interface::init(running_machine &machine) { #ifdef SDLMAME_EMSCRIPTEN // timer brings in threads which are not supported in Emscripten - if (SDL_InitSubSystem(SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) { + if (SDL_InitSubSystem(SDL_INIT_VIDEO| SDL_INIT_GAMECONTROLLER|SDL_INIT_NOPARACHUTE)) { #else - if (SDL_InitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) { + if (SDL_InitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO| SDL_INIT_GAMECONTROLLER|SDL_INIT_NOPARACHUTE)) { #endif osd_printf_error("Could not initialize SDL %s\n", SDL_GetError()); exit(-1); diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp index 2a0147afea5..483ad426186 100644 --- a/src/osd/sdl/window.cpp +++ b/src/osd/sdl/window.cpp @@ -184,7 +184,7 @@ static OSDWORK_CALLBACK(sdlwindow_thread_id) if (SDLMAME_INIT_IN_WORKER_THREAD) { - if (SDL_InitSubSystem(SDL_INIT_TIMER|SDL_INIT_AUDIO| SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) + if (SDL_InitSubSystem(SDL_INIT_TIMER|SDL_INIT_AUDIO| SDL_INIT_VIDEO| SDL_INIT_GAMECONTROLLER|SDL_INIT_NOPARACHUTE)) { osd_printf_error("Could not initialize SDL: %s.\n", SDL_GetError()); exit(-1); -- cgit v1.2.3-70-g09d2 From b7bbfe18975ec73fda36dcb4993b6458e73bf32f Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Sat, 5 Mar 2016 13:13:49 +0100 Subject: selsoft: fixed failure to load software from the BIOS menu selection. (nw) --- src/emu/ui/selsoft.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/emu/ui/selsoft.cpp b/src/emu/ui/selsoft.cpp index 2c8fa5135ea..93be1b636ba 100644 --- a/src/emu/ui/selsoft.cpp +++ b/src/emu/ui/selsoft.cpp @@ -2040,7 +2040,7 @@ void ui_bios_selection::handle() { // process the menu const ui_menu_event *event = process(0); - ui_options &moptions = machine().ui().options(); + emu_options &moptions = machine().options(); if (event != nullptr && event->iptkey == IPT_UI_SELECT && event->itemref != nullptr) for (auto & elem : m_bios) if ((void*)&elem.name == event->itemref) @@ -2073,7 +2073,7 @@ void ui_bios_selection::handle() drivlist.next(); software_list_device *swlist = software_list_device::find_by_name(drivlist.config(), ui_swinfo->listname.c_str()); software_info *swinfo = swlist->find(ui_swinfo->shortname.c_str()); - if (!moptions.skip_parts_menu() && swinfo->has_multiple_parts(ui_swinfo->interface.c_str())) + if (!machine().ui().options().skip_parts_menu() && swinfo->has_multiple_parts(ui_swinfo->interface.c_str())) { std::unordered_map parts; for (const software_part *swpart = swinfo->first_part(); swpart != nullptr; swpart = swpart->next()) -- cgit v1.2.3-70-g09d2 From af2c95ebe3f4308080ef5769753969c75200ff73 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 5 Mar 2016 22:50:44 +1100 Subject: Fix some more unlocalisable crap --- src/emu/ui/dirmenu.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/emu/ui/dirmenu.cpp b/src/emu/ui/dirmenu.cpp index a24a0041653..8ae0372af30 100644 --- a/src/emu/ui/dirmenu.cpp +++ b/src/emu/ui/dirmenu.cpp @@ -180,7 +180,7 @@ void ui_menu_display_actual::handle() void ui_menu_display_actual::populate() { - m_tempbuf.assign(_("Current ")).append(_(s_folders[m_ref].name)).append(_(" Folders")); + m_tempbuf = string_format(_("Current %1$s Folders"), _(s_folders[m_ref].name)); if (machine().ui().options().exists(s_folders[m_ref].option)) m_searchpath.assign(machine().ui().options().value(s_folders[m_ref].option)); else @@ -494,8 +494,12 @@ void ui_menu_add_change_folder::custom_render(void *selectedref, float top, floa float width, maxwidth = origx2 - origx1; ui_manager &mui = machine().ui(); std::string tempbuf[2]; - tempbuf[0] = (m_change) ? _("Change)") : _("Add"); - tempbuf[0].append(" ").append(_(s_folders[m_ref].name)).append(_(" Folder - Search: ")).append(m_search).append("_"); + tempbuf[0] = string_format( + (m_change) + ? _("Change %1$s Folder - Search: %2$s_") + : _("Add %1$s Folder - Search: %2$s_"), + _(s_folders[m_ref].name), + m_search); tempbuf[1] = m_current_path; // get the size of the text @@ -636,7 +640,7 @@ void ui_menu_remove_folder::custom_render(void *selectedref, float top, float bo { float width; ui_manager &mui = machine().ui(); - std::string tempbuf = std::string(_("Remove ")).append(_(s_folders[m_ref].name)).append(_(" Folder")); + std::string tempbuf = string_format(_("Remove %1$s Folder"), _(s_folders[m_ref].name)); // get the size of the text mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); -- cgit v1.2.3-70-g09d2 From 626a13ae1a675ca0ee3ef0f22bf2963afb4d1972 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 5 Mar 2016 14:12:51 +0100 Subject: Fixing issue compiling on GCC 4.9 till 5.1 (nw) --- 3rdparty/compat_cpp14.h | 65 +++++++++++++++++++++++++++++++++++++++++++++ scripts/src/osd/windows.lua | 1 + src/emu/emu.h | 2 ++ 3 files changed, 68 insertions(+) create mode 100644 3rdparty/compat_cpp14.h (limited to 'src') diff --git a/3rdparty/compat_cpp14.h b/3rdparty/compat_cpp14.h new file mode 100644 index 00000000000..6f7ea71885a --- /dev/null +++ b/3rdparty/compat_cpp14.h @@ -0,0 +1,65 @@ +// Ville Voutilainen code from include/bits/range_access.h from libstdc++ + +#if defined(__GNUC__) && ((__GNUC__ == 5 && __GNUC_MINOR__ < 2) || (__GNUC__ == 4 && __GNUC_MINOR__ > 8)) + +template + inline constexpr auto + cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont)))-> decltype(std::begin(__cont)) + { return std::begin(__cont); } + +template + inline constexpr auto + cend(const _Container& __cont) noexcept(noexcept(std::end(__cont)))-> decltype(std::end(__cont)) + { return std::end(__cont); } + +template + inline auto + rbegin(_Container& __cont) -> decltype(__cont.rbegin()) + { return __cont.rbegin(); } + +template + inline auto + rbegin(const _Container& __cont) -> decltype(__cont.rbegin()) + { return __cont.rbegin(); } + +template + inline auto + rend(_Container& __cont) -> decltype(__cont.rend()) + { return __cont.rend(); } + +template + inline auto + rend(const _Container& __cont) -> decltype(__cont.rend()) + { return __cont.rend(); } + +template + inline reverse_iterator<_Tp*> + rbegin(_Tp (&__arr)[_Nm]) + { return reverse_iterator<_Tp*>(__arr + _Nm); } + +template + inline reverse_iterator<_Tp*> + rend(_Tp (&__arr)[_Nm]) + { return reverse_iterator<_Tp*>(__arr); } + +template + inline reverse_iterator + rbegin(initializer_list<_Tp> __il) + { return reverse_iterator(__il.end()); } + +template + inline reverse_iterator + rend(initializer_list<_Tp> __il) + { return reverse_iterator(__il.begin()); } + +template + inline auto + crbegin(const _Container& __cont) -> decltype(std::rbegin(__cont)) + { return std::rbegin(__cont); } + +template + inline auto + crend(const _Container& __cont) -> decltype(std::rend(__cont)) + { return std::rend(__cont); } + +#endif \ No newline at end of file diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua index 50e19e8e71a..80360ac2ecb 100644 --- a/scripts/src/osd/windows.lua +++ b/scripts/src/osd/windows.lua @@ -217,6 +217,7 @@ project ("ocore_" .. _OPTIONS["osd"]) dofile("windows_cfg.lua") includedirs { + MAME_DIR .. "3rdparty", MAME_DIR .. "src/emu", MAME_DIR .. "src/osd", MAME_DIR .. "src/lib", diff --git a/src/emu/emu.h b/src/emu/emu.h index 0cf7b7c1384..afea75e477f 100644 --- a/src/emu/emu.h +++ b/src/emu/emu.h @@ -25,6 +25,8 @@ #include #include +#include "compat_cpp14.h" + // core emulator headers -- must be first #include "emucore.h" #include "eminline.h" -- cgit v1.2.3-70-g09d2 From 4a876eab0eaea8f68e9634976f9aaea53a7cd12f Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 5 Mar 2016 14:41:30 +0100 Subject: This works (nw) --- 3rdparty/compat_cpp14.h | 65 ------------------------------------------------ src/emu/emu.h | 2 -- src/lib/util/strformat.h | 15 +++++++++++ 3 files changed, 15 insertions(+), 67 deletions(-) delete mode 100644 3rdparty/compat_cpp14.h (limited to 'src') diff --git a/3rdparty/compat_cpp14.h b/3rdparty/compat_cpp14.h deleted file mode 100644 index 6f7ea71885a..00000000000 --- a/3rdparty/compat_cpp14.h +++ /dev/null @@ -1,65 +0,0 @@ -// Ville Voutilainen code from include/bits/range_access.h from libstdc++ - -#if defined(__GNUC__) && ((__GNUC__ == 5 && __GNUC_MINOR__ < 2) || (__GNUC__ == 4 && __GNUC_MINOR__ > 8)) - -template - inline constexpr auto - cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont)))-> decltype(std::begin(__cont)) - { return std::begin(__cont); } - -template - inline constexpr auto - cend(const _Container& __cont) noexcept(noexcept(std::end(__cont)))-> decltype(std::end(__cont)) - { return std::end(__cont); } - -template - inline auto - rbegin(_Container& __cont) -> decltype(__cont.rbegin()) - { return __cont.rbegin(); } - -template - inline auto - rbegin(const _Container& __cont) -> decltype(__cont.rbegin()) - { return __cont.rbegin(); } - -template - inline auto - rend(_Container& __cont) -> decltype(__cont.rend()) - { return __cont.rend(); } - -template - inline auto - rend(const _Container& __cont) -> decltype(__cont.rend()) - { return __cont.rend(); } - -template - inline reverse_iterator<_Tp*> - rbegin(_Tp (&__arr)[_Nm]) - { return reverse_iterator<_Tp*>(__arr + _Nm); } - -template - inline reverse_iterator<_Tp*> - rend(_Tp (&__arr)[_Nm]) - { return reverse_iterator<_Tp*>(__arr); } - -template - inline reverse_iterator - rbegin(initializer_list<_Tp> __il) - { return reverse_iterator(__il.end()); } - -template - inline reverse_iterator - rend(initializer_list<_Tp> __il) - { return reverse_iterator(__il.begin()); } - -template - inline auto - crbegin(const _Container& __cont) -> decltype(std::rbegin(__cont)) - { return std::rbegin(__cont); } - -template - inline auto - crend(const _Container& __cont) -> decltype(std::rend(__cont)) - { return std::rend(__cont); } - -#endif \ No newline at end of file diff --git a/src/emu/emu.h b/src/emu/emu.h index afea75e477f..0cf7b7c1384 100644 --- a/src/emu/emu.h +++ b/src/emu/emu.h @@ -25,8 +25,6 @@ #include #include -#include "compat_cpp14.h" - // core emulator headers -- must be first #include "emucore.h" #include "eminline.h" diff --git a/src/lib/util/strformat.h b/src/lib/util/strformat.h index 51d521fd25b..dc8061ca944 100644 --- a/src/lib/util/strformat.h +++ b/src/lib/util/strformat.h @@ -185,6 +185,21 @@ #include #include +#if defined(__GNUC__) && ((__GNUC__ == 5 && __GNUC_MINOR__ < 2) || (__GNUC__ == 4 && __GNUC_MINOR__ > 8)) +namespace std +{ +template + inline constexpr auto + cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont)))-> decltype(std::begin(__cont)) + { return std::begin(__cont); } + +template + inline constexpr auto + cend(const _Container& __cont) noexcept(noexcept(std::end(__cont)))-> decltype(std::end(__cont)) + { return std::end(__cont); } +} +#endif + namespace util { namespace detail { //************************************************************************** -- cgit v1.2.3-70-g09d2 From 02d24565dc183f3d2f7ff364e8ce9472cbaf2baf Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Sat, 5 Mar 2016 15:38:22 +0100 Subject: menu: added handling of mouse button held down on arrows in the machine list. (nw) --- src/emu/mame.cpp | 2 +- src/emu/ui/menu.cpp | 23 +++++++++++++++++++++++ src/emu/ui/menu.h | 9 ++++++++- src/emu/ui/selgame.cpp | 20 +++++++++++--------- 4 files changed, 43 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/emu/mame.cpp b/src/emu/mame.cpp index 513300553d6..5e93623498d 100644 --- a/src/emu/mame.cpp +++ b/src/emu/mame.cpp @@ -259,7 +259,7 @@ int machine_manager::execute() sw_instance = sw_load.substr(right + 1); sw_load.assign(sw_load.substr(0, right)); - char arg[] = "ume"; + char arg[] = "mame"; char *argv = &arg[0]; m_options.set_value(OPTION_SOFTWARENAME, sw_name.c_str(), OPTION_PRIORITY_CMDLINE, error_string); m_options.parse_slot_devices(1, &argv, option_errors, sw_instance.c_str(), sw_load.c_str()); diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp index 56c41062afd..ccc73f55002 100644 --- a/src/emu/ui/menu.cpp +++ b/src/emu/ui/menu.cpp @@ -1891,6 +1891,21 @@ void ui_menu::handle_main_events(UINT32 flags) bool stop = false; ui_event local_menu_event; + if (m_pressed) + { + bool pressed = mouse_pressed(); + INT32 m_target_x, m_target_y; + bool m_button; + render_target *mouse_target = machine().ui_input().find_mouse(&m_target_x, &m_target_y, &m_button); + if (mouse_target != nullptr && m_button && (hover == HOVER_ARROW_DOWN || hover == HOVER_ARROW_UP)) + { + if (pressed) + machine().ui_input().push_mouse_down_event(mouse_target, m_target_x, m_target_y); + } + else + reset_pressed(); + } + // loop while we have interesting events while (!stop && machine().ui_input().pop_event(&local_menu_event)) { @@ -1919,6 +1934,7 @@ void ui_menu::handle_main_events(UINT32 flags) if (selected < 0) selected = 0; top_line -= visitems - (top_line + visible_lines == visible_items); + set_pressed(); } else if (hover == HOVER_ARROW_DOWN) { @@ -1926,6 +1942,7 @@ void ui_menu::handle_main_events(UINT32 flags) if (selected >= visible_items) selected = visible_items - 1; top_line += visible_lines - 2; + set_pressed(); } else if (hover == HOVER_UI_RIGHT) menu_event.iptkey = IPT_UI_RIGHT; @@ -2820,3 +2837,9 @@ void ui_menu::draw_dats_menu() // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != visible_items); } + +void ui_menu::set_pressed() +{ + (m_repeat == 0) ? m_repeat = osd_ticks() + osd_ticks_per_second() / 2 : m_repeat = osd_ticks() + osd_ticks_per_second() / 4; + m_pressed = true; +} \ No newline at end of file diff --git a/src/emu/ui/menu.h b/src/emu/ui/menu.h index 562650d0e51..4a788c612c7 100644 --- a/src/emu/ui/menu.h +++ b/src/emu/ui/menu.h @@ -266,8 +266,15 @@ protected: static std::unique_ptr hilight_main_bitmap; static render_texture *hilight_main_texture; private: + + // mouse button held down + bool m_pressed = false; + osd_ticks_t m_repeat = 0; + void reset_pressed() { m_pressed = false; m_repeat = 0; } + bool mouse_pressed() { return (osd_ticks() >= m_repeat); } + void set_pressed(); + static std::unique_ptr no_avail_bitmap, bgrnd_bitmap, star_bitmap; -// static std::unique_ptr hilight_main_bitmap; static render_texture *bgrnd_texture, *star_texture; static bitmap_argb32 *icons_bitmap[]; static render_texture *icons_texture[]; diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp index 34fdab6d64e..c3c724b900c 100644 --- a/src/emu/ui/selgame.cpp +++ b/src/emu/ui/selgame.cpp @@ -358,13 +358,13 @@ void ui_menu_select_game::handle() if (!isfavorite()) { const game_driver *driver = (const game_driver *)m_event->itemref; - if ((FPTR)driver > 3 && machine().datfile().has_data(driver)) + if ((FPTR)driver > skip_main_items && machine().datfile().has_data(driver)) ui_menu::stack_push(global_alloc_clear(machine(), container, driver)); } else { ui_software_info *swinfo = (ui_software_info *)m_event->itemref; - if ((FPTR)swinfo > 3 && machine().datfile().has_data(swinfo->driver)) + if ((FPTR)swinfo > skip_main_items && machine().datfile().has_data(swinfo->driver)) { if (swinfo->startempty == 1) ui_menu::stack_push(global_alloc_clear(machine(), container, swinfo->driver)); @@ -380,7 +380,7 @@ void ui_menu_select_game::handle() if (!isfavorite()) { const game_driver *driver = (const game_driver *)m_event->itemref; - if ((FPTR)driver > 3) + if ((FPTR)driver > skip_main_items) { if (!machine().favorite().isgame_favorite(driver)) { @@ -398,7 +398,7 @@ void ui_menu_select_game::handle() else { ui_software_info *swinfo = (ui_software_info *)m_event->itemref; - if ((FPTR)swinfo > 3) + if ((FPTR)swinfo > skip_main_items) { machine().popmessage(_("%s\n removed from favorites list."), swinfo->longname.c_str()); machine().favorite().remove_favorite_game(*swinfo); @@ -534,24 +534,26 @@ void ui_menu_select_game::populate() } // iterate over entries - for (size_t curitem = 0; curitem < m_displaylist.size(); ++curitem) + int curitem = 0; + for (auto & elem : m_displaylist) { UINT32 flags_ui = MENU_FLAG_UI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW; - if (old_item_selected == -1 && m_displaylist[curitem]->name == reselect_last::driver) + if (old_item_selected == -1 && elem->name == reselect_last::driver) old_item_selected = curitem; - bool cloneof = strcmp(m_displaylist[curitem]->parent, "0"); + bool cloneof = strcmp(elem->parent, "0"); if (cloneof) { - int cx = driver_list::find(m_displaylist[curitem]->parent); + int cx = driver_list::find(elem->parent); if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0)) cloneof = false; } if (cloneof) flags_ui |= MENU_FLAG_INVERT; - item_append(m_displaylist[curitem]->description, nullptr, flags_ui, (void *)m_displaylist[curitem]); + item_append(elem->description, nullptr, flags_ui, (void *)elem); + curitem++; } } } -- cgit v1.2.3-70-g09d2 From c5b4ff95b025ce5910d9dea35278ffa3b238af3d Mon Sep 17 00:00:00 2001 From: cracyc Date: Sat, 5 Mar 2016 08:56:35 -0600 Subject: pc: it appears the ibm keyboard interferes with the k286i a20 check (nw) --- src/mame/drivers/at.cpp | 2 ++ src/mame/video/poisk1.h | 10 ---------- 2 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 src/mame/video/poisk1.h (limited to 'src') diff --git a/src/mame/drivers/at.cpp b/src/mame/drivers/at.cpp index 55c2d1d9536..8263a879c04 100644 --- a/src/mame/drivers/at.cpp +++ b/src/mame/drivers/at.cpp @@ -358,6 +358,8 @@ static MACHINE_CONFIG_DERIVED( xb42639, atvga ) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( k286i, ibm5162 ) + MCFG_DEVICE_MODIFY("kbd") + MCFG_DEVICE_SLOT_INTERFACE(pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL, false) MCFG_ISA16_SLOT_ADD("mb:isabus","isa5", pc_isa16_cards, nullptr, false) MCFG_ISA16_SLOT_ADD("mb:isabus","isa6", pc_isa16_cards, nullptr, false) MCFG_ISA16_SLOT_ADD("mb:isabus","isa7", pc_isa16_cards, nullptr, false) diff --git a/src/mame/video/poisk1.h b/src/mame/video/poisk1.h deleted file mode 100644 index 092de267b1e..00000000000 --- a/src/mame/video/poisk1.h +++ /dev/null @@ -1,10 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sergey Svishchev -#include "emu.h" - -#define CGA_PALETTE_SETS 83 -/* one for colour, one for mono, 81 for colour composite */ - -INPUT_PORTS_EXTERN( pcvideo_poisk1 ); - -MACHINE_CONFIG_EXTERN( pcvideo_poisk1 ); -- cgit v1.2.3-70-g09d2 From 785a324d689b3bcb9827153b9771366db245189d Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 5 Mar 2016 20:33:42 +0100 Subject: hh_cop400: coleco h2h basketball WIP --- src/mame/drivers/hh_cop400.cpp | 106 +++++++++++++++++++++++++++++++--- src/mame/layout/h2hbaskb.lay | 127 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 226 insertions(+), 7 deletions(-) create mode 100644 src/mame/layout/h2hbaskb.lay (limited to 'src') diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index abd92f5867d..3aca96c8a13 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -21,6 +21,7 @@ #include "einvaderc.lh" // test-layout(but still playable) #include "funjacks.lh" #include "funrlgl.lh" +#include "h2hbaskb.lh" #include "lightfgt.lh" // clickable //#include "hh_cop400_test.lh" // common test-layout - use external artwork @@ -67,6 +68,7 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); void display_update(); void set_display_size(int maxx, int maxy); + void set_display_segmask(UINT32 digits, UINT32 mask); void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true); protected: @@ -195,6 +197,17 @@ void hh_cop400_state::set_display_size(int maxx, int maxy) m_display_maxy = maxy; } +void hh_cop400_state::set_display_segmask(UINT32 digits, UINT32 mask) +{ + // set a segment mask per selected digit, but leave unselected ones alone + for (int i = 0; i < 0x20; i++) + { + if (digits & 1) + m_display_segmask[i] = mask; + digits >>= 1; + } +} + void hh_cop400_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update) { set_display_size(maxx, maxy); @@ -266,8 +279,8 @@ WRITE8_MEMBER(ctstein_state::write_g) WRITE8_MEMBER(ctstein_state::write_l) { // L0-L3: button lamps (strobed) - display_matrix(4, 1, data, 1); - display_matrix(4, 1, data, 0); + display_matrix(4, 1, data & 0xf, 1); + display_matrix(4, 1, data & 0xf, 0); } READ8_MEMBER(ctstein_state::read_l) @@ -300,9 +313,9 @@ static INPUT_PORTS_START( ctstein ) PORT_START("IN.2") // G2 port L PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Red Button") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Yellow Button") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Yellow Button") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Green Button") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Blue Button") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Blue Button") INPUT_PORTS_END static MACHINE_CONFIG_START( ctstein, ctstein_state ) @@ -333,7 +346,7 @@ MACHINE_CONFIG_END Coleco Head to Head Basketball * COP420 MCU label COP420L-NEZ/N * 2-digit 7seg display, 41 other leds, 1-bit sound - + ***************************************************************************/ class h2hbaskb_state : public hh_cop400_state @@ -342,16 +355,90 @@ public: h2hbaskb_state(const machine_config &mconfig, device_type type, const char *tag) : hh_cop400_state(mconfig, type, tag) { } + + void prepare_display(); + DECLARE_WRITE8_MEMBER(write_d); + DECLARE_WRITE8_MEMBER(write_g); + DECLARE_WRITE8_MEMBER(write_l); + DECLARE_READ8_MEMBER(read_in); + DECLARE_WRITE_LINE_MEMBER(write_so); }; // handlers -//.. +void h2hbaskb_state::prepare_display() +{ + // D2,D3 double as multiplexer + UINT16 mask = ((m_d >> 2 & 1) * 0xf) | ((m_d << 1 & 0x10) * 0xf); + UINT16 sel = (m_g | m_d << 4 | m_g << 8 | m_d << 12) & mask; + + // D2+G0,G1 are 7segs + set_display_segmask(3, 0x7f); + display_matrix(7, 16, m_l, sel); +} + +WRITE8_MEMBER(h2hbaskb_state::write_d) +{ + // D: led select + m_d = data & 0xf; + prepare_display(); +} + +WRITE8_MEMBER(h2hbaskb_state::write_g) +{ + // G: led select, input mux + m_inp_mux = data; + m_g = data & 0xf; + prepare_display(); +} + +WRITE8_MEMBER(h2hbaskb_state::write_l) +{ + // L0-L6: digit segments A-G + // L0-L4: led data + m_l = data; + prepare_display(); +} + +READ8_MEMBER(h2hbaskb_state::read_in) +{ + // IN: multiplexed inputs + return read_inputs(4); +} + +WRITE_LINE_MEMBER(h2hbaskb_state::write_so) +{ + // SO: speaker out + m_speaker->level_w(state); +} // config static INPUT_PORTS_START( h2hbaskb ) + PORT_START("IN.0") // G0 port IN + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_1) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_2) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_3) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_4) + + PORT_START("IN.1") // G1 port IN + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_5) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_6) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_CODE(KEYCODE_7) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_CODE(KEYCODE_8) + + PORT_START("IN.2") // G2 port IN + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_CODE(KEYCODE_Q) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_CODE(KEYCODE_W) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_CODE(KEYCODE_E) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_CODE(KEYCODE_R) + + PORT_START("IN.3") // G3 port IN + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_CODE(KEYCODE_T) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_CODE(KEYCODE_Y) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_CODE(KEYCODE_U) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON16 ) PORT_CODE(KEYCODE_I) INPUT_PORTS_END static MACHINE_CONFIG_START( h2hbaskb, h2hbaskb_state ) @@ -359,9 +446,14 @@ static MACHINE_CONFIG_START( h2hbaskb, h2hbaskb_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", COP420, 1000000) // approximation - RC osc. R=43K to +9V, C=101pf to GND MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed + MCFG_COP400_WRITE_D_CB(WRITE8(h2hbaskb_state, write_d)) + MCFG_COP400_WRITE_G_CB(WRITE8(h2hbaskb_state, write_g)) + MCFG_COP400_WRITE_L_CB(WRITE8(h2hbaskb_state, write_l)) + MCFG_COP400_READ_IN_CB(READ8(h2hbaskb_state, read_in)) + MCFG_COP400_WRITE_SO_CB(WRITELINE(h2hbaskb_state, write_so)) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_cop400_state, display_decay_tick, attotime::from_msec(1)) -// MCFG_DEFAULT_LAYOUT(layout_h2hbaskb) + MCFG_DEFAULT_LAYOUT(layout_h2hbaskb) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/layout/h2hbaskb.lay b/src/mame/layout/h2hbaskb.lay new file mode 100644 index 00000000000..7bf05409154 --- /dev/null +++ b/src/mame/layout/h2hbaskb.lay @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-70-g09d2 From 88412da8626ae505b0215226bb0cf78e013a1d4f Mon Sep 17 00:00:00 2001 From: Brad Hughes Date: Sat, 5 Mar 2016 15:02:52 -0500 Subject: Make XAudio2 available in all Windows OSD builds, plus use 2.9 if available, plus code cleanup. --- makefile | 5 -- scripts/src/osd/modules.lua | 30 ++----- src/osd/modules/sound/xaudio2_sound.cpp | 141 +++++++++++++------------------- 3 files changed, 61 insertions(+), 115 deletions(-) (limited to 'src') diff --git a/makefile b/makefile index dc19443e627..8721f0566f3 100644 --- a/makefile +++ b/makefile @@ -25,7 +25,6 @@ # USE_DISPATCH_GL = 0 # MODERN_WIN_API = 0 -# USE_XAUDIO2 = 0 # DIRECTINPUT = 7 # USE_SDL = 1 # SDL_INI_PATH = .;$HOME/.mame/;ini; @@ -577,10 +576,6 @@ ifdef MODERN_WIN_API PARAMS += --MODERN_WIN_API='$(MODERN_WIN_API)' endif -ifdef USE_XAUDIO2 -PARAMS += --USE_XAUDIO2='$(USE_XAUDIO2)' -endif - ifdef DIRECTINPUT PARAMS += --DIRECTINPUT='$(DIRECTINPUT)' endif diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index 1468ac6faca..1638cbfd8d0 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -86,6 +86,11 @@ function osdmodulesbuild() MAME_DIR .. "src/osd/modules/input/input_xinput.cpp", } + configuration { "mingw*"} + includedirs { + MAME_DIR .. "3rdparty/compat/mingw", + } + if _OPTIONS["targetos"]=="windows" then includedirs { MAME_DIR .. "3rdparty/winpcap/Include", @@ -431,31 +436,6 @@ newoption { }, } -newoption { - trigger = "USE_XAUDIO2", - description = "Use XAudio2 API for audio", - allowed = { - { "0", "Disable XAudio2" }, - { "1", "Enable XAudio2" }, - }, -} - -if _OPTIONS["USE_XAUDIO2"]=="1" then - _OPTIONS["MODERN_WIN_API"] = "1", - defines { - "USE_XAUDIO2=1", - }, - configuration { "mingw*"} - includedirs { - MAME_DIR .. "3rdparty/compat/mingw", - } - configuration { } -else - defines { - "USE_XAUDIO2=0", - } -end - newoption { trigger = "USE_QTDEBUG", description = "Use QT debugger", diff --git a/src/osd/modules/sound/xaudio2_sound.cpp b/src/osd/modules/sound/xaudio2_sound.cpp index 8388cea521e..55293f3b896 100644 --- a/src/osd/modules/sound/xaudio2_sound.cpp +++ b/src/osd/modules/sound/xaudio2_sound.cpp @@ -9,26 +9,17 @@ #include "sound_module.h" #include "modules/osdmodule.h" -#if (defined(OSD_WINDOWS) && USE_XAUDIO2) +#if defined(OSD_WINDOWS) // standard windows headers #define WIN32_LEAN_AND_MEAN #include -#include -#pragma warning( push ) -#pragma warning( disable: 4068 ) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wattributes" // XAudio2 include #include -#pragma GCC diagnostic pop -#pragma warning( pop ) - - -#include // stdlib includes +#include #include #include @@ -37,14 +28,8 @@ // MAME headers #include "emu.h" #include "osdepend.h" -#include "emuopts.h" -#if !defined(XAUDIO2_DLL) -#if defined(UNICODE) -#define XAUDIO2_DLL L"xaudio2_8.dll" -#else -#define XAUDIO2_DLL "xaudio2_8.dll" -#endif -#endif + +#include "winutil.h" //============================================================ // Constants @@ -140,7 +125,7 @@ typedef std::unique_ptr masterin typedef std::unique_ptr src_voice_ptr; // Typedef for pointer to XAudio2Create -typedef HRESULT(__stdcall* PFN_XAUDIO2CREATE)(IXAudio2**, UINT32, XAUDIO2_PROCESSOR); +typedef lazy_loaded_function_p3 xaudio2_create_ptr; //============================================================ // Helper classes @@ -203,6 +188,8 @@ public: class sound_xaudio2 : public osd_module, public sound_module, public IXAudio2VoiceCallback { private: + const wchar_t* XAUDIO_DLLS[2] = { L"XAudio2_9.dll", L"XAudio2_8.dll" }; + xaudio2_ptr m_xAudio2; mastering_voice_ptr m_masterVoice; src_voice_ptr m_sourceVoice; @@ -219,10 +206,10 @@ private: std::queue m_queue; std::unique_ptr m_buffer_pool; HMODULE m_xaudio2_module; - PFN_XAUDIO2CREATE m_pfnxaudio2create; UINT32 m_overflows; UINT32 m_underflows; BOOL m_in_underflow; + xaudio2_create_ptr XAudio2Create; public: sound_xaudio2() : @@ -236,56 +223,74 @@ public: m_buffer_size(0), m_buffer_count(0), m_writepos(0), - m_hEventBufferCompleted(NULL), - m_hEventDataAvailable(NULL), - m_hEventExiting(NULL), + m_hEventBufferCompleted(nullptr), + m_hEventDataAvailable(nullptr), + m_hEventExiting(nullptr), m_buffer_pool(nullptr), - m_xaudio2_module(NULL), - m_pfnxaudio2create(nullptr), + m_xaudio2_module(nullptr), m_overflows(0), m_underflows(0), - m_in_underflow(FALSE) + m_in_underflow(FALSE), + XAudio2Create("XAudio2Create", XAUDIO_DLLS, ARRAY_LENGTH(XAUDIO_DLLS)) { } - virtual int init(osd_options const &options) override; - virtual void exit() override; + bool probe() override; + int init(osd_options const &options) override; + void exit() override; // sound_module - virtual void update_audio_stream(bool is_throttled, INT16 const *buffer, int samples_this_frame) override; - virtual void set_mastervolume(int attenuation) override; + void update_audio_stream(bool is_throttled, INT16 const *buffer, int samples_this_frame) override; + void set_mastervolume(int attenuation) override; // Xaudio callbacks - void OnVoiceProcessingPassStart(UINT32 bytes_required) override; - void OnVoiceProcessingPassEnd() override {} - void OnStreamEnd() override {} - void OnBufferStart(void* pBufferContext) override {} - void OnLoopEnd(void* pBufferContext) override {} - void OnVoiceError(void* pBufferContext, HRESULT error) override {} - void OnBufferEnd(void *pBufferContext) override; + void STDAPICALLTYPE OnVoiceProcessingPassStart(UINT32 bytes_required) override; + void STDAPICALLTYPE OnVoiceProcessingPassEnd() override {} + void STDAPICALLTYPE OnStreamEnd() override {} + void STDAPICALLTYPE OnBufferStart(void* pBufferContext) override {} + void STDAPICALLTYPE OnLoopEnd(void* pBufferContext) override {} + void STDAPICALLTYPE OnVoiceError(void* pBufferContext, HRESULT error) override {} + void STDAPICALLTYPE OnBufferEnd(void *pBufferContext) override; private: void create_buffers(const WAVEFORMATEX &format); HRESULT create_voices(const WAVEFORMATEX &format); void process_audio(); - void submit_buffer(std::unique_ptr audioData, DWORD audioLength); + void submit_buffer(std::unique_ptr audioData, DWORD audioLength) const; void submit_needed(); - HRESULT xaudio2_create(IXAudio2 ** xaudio2_interface); void roll_buffer(); BOOL submit_next_queued(); }; +//============================================================ +// probe +//============================================================ + +bool sound_xaudio2::probe() +{ + int status = XAudio2Create.initialize(); + return status == 0; +} + //============================================================ // init //============================================================ int sound_xaudio2::init(osd_options const &options) { - HRESULT result = S_OK; + HRESULT result; + + // Make sure our XAudio2Create entrypoint is bound + int status = XAudio2Create.initialize(); + if (status != 0) + { + osd_printf_error("Could not find XAudio2 library\n"); + return 1; + } // Create the IXAudio2 object IXAudio2 *temp_xaudio2 = nullptr; - HR_RET1(xaudio2_create(&temp_xaudio2)); + HR_RET1(this->XAudio2Create(&temp_xaudio2, 0, XAUDIO2_DEFAULT_PROCESSOR)); m_xAudio2 = xaudio2_ptr(temp_xaudio2); // make a format description for what we want @@ -310,9 +315,9 @@ int sound_xaudio2::init(osd_options const &options) create_buffers(format); // Initialize our events - m_hEventBufferCompleted = CreateEvent(NULL, FALSE, FALSE, NULL); - m_hEventDataAvailable = CreateEvent(NULL, FALSE, FALSE, NULL); - m_hEventExiting = CreateEvent(NULL, FALSE, FALSE, NULL); + m_hEventBufferCompleted = CreateEvent(nullptr, FALSE, FALSE, nullptr); + m_hEventDataAvailable = CreateEvent(nullptr, FALSE, FALSE, nullptr); + m_hEventExiting = CreateEvent(nullptr, FALSE, FALSE, nullptr); // create the voices and start them HR_RET1(create_voices(format)); @@ -420,7 +425,7 @@ void sound_xaudio2::set_mastervolume(int attenuation) // The XAudio2 voice callback triggered when a buffer finishes playing void sound_xaudio2::OnBufferEnd(void *pBufferContext) { - BYTE* completed_buffer = (BYTE*)pBufferContext; + BYTE* completed_buffer = static_cast(pBufferContext); if (completed_buffer != nullptr) { std::lock_guard lock(m_buffer_lock); @@ -453,40 +458,6 @@ void sound_xaudio2::OnVoiceProcessingPassStart(UINT32 bytes_required) } } -//============================================================ -// xaudio2_create -//============================================================ - -// Dynamically loads the XAudio2 DLL and calls the exported XAudio2Create() -HRESULT sound_xaudio2::xaudio2_create(IXAudio2 ** ppxaudio2_interface) -{ - HRESULT result; - - if (nullptr == m_pfnxaudio2create) - { - if (nullptr == m_xaudio2_module) - { - m_xaudio2_module = LoadLibrary(XAUDIO2_DLL); - if (nullptr == m_xaudio2_module) - { - osd_printf_error("Failed to load module '%S', error: 0x%X\n", XAUDIO2_DLL, (unsigned int)GetLastError()); - HR_RETHR(E_FAIL); - } - } - - m_pfnxaudio2create = (PFN_XAUDIO2CREATE)GetProcAddress(m_xaudio2_module, "XAudio2Create"); - if (nullptr == m_pfnxaudio2create) - { - osd_printf_error("Failed to get adddress of exported function XAudio2Create, error: 0x%X\n", (unsigned int)GetLastError()); - HR_RETHR(E_FAIL); - } - } - - HR_RETHR(m_pfnxaudio2create(ppxaudio2_interface, 0, XAUDIO2_DEFAULT_PROCESSOR)); - - return S_OK; -} - //============================================================ // create_buffers //============================================================ @@ -517,9 +488,9 @@ void sound_xaudio2::create_buffers(const WAVEFORMATEX &format) osd_printf_verbose( "Sound: XAudio2 created initial buffers. total size: %u, count %u, size each %u\n", - (unsigned int)total_buffer_size, - (unsigned int)m_buffer_count, - (unsigned int)m_buffer_size); + static_cast(total_buffer_size), + static_cast(m_buffer_count), + static_cast(m_buffer_size)); // reset buffer states m_writepos = 0; @@ -615,7 +586,7 @@ void sound_xaudio2::submit_needed() // submit_buffer //============================================================ -void sound_xaudio2::submit_buffer(std::unique_ptr audioData, DWORD audioLength) +void sound_xaudio2::submit_buffer(std::unique_ptr audioData, DWORD audioLength) const { assert(audioLength != 0); @@ -630,7 +601,7 @@ void sound_xaudio2::submit_buffer(std::unique_ptr audioData, DWORD audio HRESULT result; if (FAILED(result = m_sourceVoice->SubmitSourceBuffer(&buf))) { - osd_printf_verbose("Sound: XAudio2 failed to submit source buffer (non-fatal). Error: 0x%X\n", (unsigned int)result); + osd_printf_verbose("Sound: XAudio2 failed to submit source buffer (non-fatal). Error: 0x%X\n", static_cast(result)); m_buffer_pool->return_to_pool(audioData.release()); return; } -- cgit v1.2.3-70-g09d2 From b1182ed63ba29a6cb646a0cff49b42b323d90ad1 Mon Sep 17 00:00:00 2001 From: Jeffrey Clark Date: Sat, 5 Mar 2016 14:36:09 -0600 Subject: fix build errors (nw) --- scripts/build/makelist.py | 6 +++--- src/osd/modules/input/input_xinput.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/scripts/build/makelist.py b/scripts/build/makelist.py index cb6400b4d80..a9b450474e2 100644 --- a/scripts/build/makelist.py +++ b/scripts/build/makelist.py @@ -59,9 +59,9 @@ def parse_file(srcfile): if not all(((c >='a' and c<='z') or (c>='0' and c<='9') or c=='_') for c in drivname): sys.stderr.write("%s:%d - Invalid character in driver \"%s\"\n" % (srcfile, linenum, drivname)) return 1 - else: + else: if (curr_source == '') or (len(sourcelist)==0) or (curr_source in sourcelist): - drivlist.append(drivname) + drivlist.append(drivname) return 0 def parse_filter_file(srcfile): @@ -113,7 +113,7 @@ def parse_filter_file(srcfile): if not all(((c >='a' and c<='z') or (c>='0' and c<='9') or c=='_' or c=='.' or c=='-') for c in sourcename): sys.stderr.write("%s:%d - Invalid character in driver \"%s\"\n" % (srcfile, linenum, sourcename)) return 1 - else: + else: sourcelist.append(sourcename) return 0 diff --git a/src/osd/modules/input/input_xinput.cpp b/src/osd/modules/input/input_xinput.cpp index e256b04b101..a531bbdfefb 100644 --- a/src/osd/modules/input/input_xinput.cpp +++ b/src/osd/modules/input/input_xinput.cpp @@ -16,7 +16,7 @@ #include // XInput header -#include +#include #undef interface -- cgit v1.2.3-70-g09d2 From 35065d2a719960cd4d59223f19f1f41285d28b41 Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Sat, 5 Mar 2016 17:51:22 -0300 Subject: New machines marked as NOT_WORKING ---------------------------------- Super Poker (v306US) [Roberto Fresca, Ioannis Bampoulas] New clones marked as NOT_WORKING -------------------------------- Super Poker (v205US) [Roberto Fresca, Ioannis Bampoulas] Super Poker (v203US) [Roberto Fresca, Ioannis Bampoulas] Super Poker (v200UA) [Roberto Fresca, Ioannis Bampoulas] Super Poker (v102UA) [Roberto Fresca, Ioannis Bampoulas] --- src/mame/drivers/spoker.cpp | 102 ++++++++++++++++++++++++++++++++++++++++++++ src/mame/mame.lst | 5 +++ 2 files changed, 107 insertions(+) (limited to 'src') diff --git a/src/mame/drivers/spoker.cpp b/src/mame/drivers/spoker.cpp index 1c652c9717e..c8a684968b1 100644 --- a/src/mame/drivers/spoker.cpp +++ b/src/mame/drivers/spoker.cpp @@ -639,6 +639,103 @@ ROM_START( spk115it ) ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) ROM_END +/* Super Poker (IGS) + US & UA versions. + + Original IGS boards + IGS PCB-0308-01 + + HD64180RP8 (u25) + IGS026a (u10) + IGS001a (u30) + IGS002 (u20) + U3567 (u42) + + Programs are encrypted. + See the last 0x1000 of each one + to see the patterns... +*/ +ROM_START( spk306us ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "27c512_v306_us.u27", 0x0000, 0x10000, CRC(a6c6359e) SHA1(768c53e6c9a4d453e5342a169932fcc30b10fd04) ) + + ROM_REGION( 0xc0000, "gfx1", 0 ) + ROM_LOAD( "1_mx28f2000p_v306_us.u33", 0x80000, 0x40000, BAD_DUMP CRC(7ae9b639) SHA1(eb29acf94e96b5a8446dab1e46675766da0538f9) ) + ROM_LOAD( "2_mx28f2000p_v306_us.u32", 0x40000, 0x40000, BAD_DUMP CRC(3a9fc765) SHA1(10ccacf4da189f41b1c0fdc8d943b24ac3464e17) ) + ROM_LOAD( "3_mx28f2000p_v306_us.u31", 0x00000, 0x40000, BAD_DUMP CRC(71f6ea7a) SHA1(f91735d79af153cbbbe82312ba2af789b89c43dd) ) + + ROM_REGION( 0x30000, "gfx2", 0 ) + ROM_FILL( 0x0000, 0x30000, 0xff ) /* filling the whole bank */ + + ROM_REGION( 0x40000, "oki", 0 ) /* 4-bit adpcm samples */ + ROM_LOAD( "mx28f2000p_v306_ussp.u34", 0x0000, 0x40000, BAD_DUMP CRC(33e6089d) SHA1(cd1ad01e92c18bbeab3fe3ea9152f8b0a3eb1b29) ) +ROM_END + +ROM_START( spk205us ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "27c512_v205_us.u27", 0x0000, 0x10000, CRC(4b743c73) SHA1(bd05db13e27dc441e0483b883b770365b2702254) ) + + ROM_REGION( 0xc0000, "gfx1", 0 ) + ROM_LOAD( "1_mx28f2000p_v205_us.u33", 0x80000, 0x40000, CRC(7ae9b639) SHA1(eb29acf94e96b5a8446dab1e46675766da0538f9) ) + ROM_LOAD( "2_mx28f2000p_v205_us.u32", 0x40000, 0x40000, CRC(3a9fc765) SHA1(10ccacf4da189f41b1c0fdc8d943b24ac3464e17) ) + ROM_LOAD( "3_mx28f2000p_v205_us.u31", 0x00000, 0x40000, CRC(71f6ea7a) SHA1(f91735d79af153cbbbe82312ba2af789b89c43dd) ) + + ROM_REGION( 0x30000, "gfx2", 0 ) + ROM_FILL( 0x0000, 0x30000, 0xff ) /* filling the whole bank */ + + ROM_REGION( 0x40000, "oki", 0 ) /* 4-bit adpcm samples */ + ROM_LOAD( "mx28f2000p_v205_ussp.u34", 0x0000, 0x40000, CRC(33e6089d) SHA1(cd1ad01e92c18bbeab3fe3ea9152f8b0a3eb1b29) ) +ROM_END + +ROM_START( spk203us ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "27c512_v203_us.u27", 0x0000, 0x10000, CRC(41328b3d) SHA1(2a4cf0cfdb09e72dabbaf09901cff222847c195a) ) + + ROM_REGION( 0xc0000, "gfx1", 0 ) + ROM_LOAD( "1_mx28f2000p_v203_us.u33", 0x80000, 0x40000, CRC(b309e9cf) SHA1(2e3f81c9c654c859c0fd4c0953302c9283e7a4d8) ) + ROM_LOAD( "2_mx28f2000p_v203_us.u32", 0x40000, 0x40000, CRC(05048307) SHA1(38d5ba5522a60ae4f34731ea7bd3e2c16683125d) ) + ROM_LOAD( "3_mx28f2000p_v203_us.u31", 0x00000, 0x40000, CRC(beae217b) SHA1(9bfa69954c42ada88bedb7cedaceff841cb88a58) ) + + ROM_REGION( 0x30000, "gfx2", 0 ) + ROM_FILL( 0x0000, 0x30000, 0xff ) /* filling the whole bank */ + + ROM_REGION( 0x40000, "oki", 0 ) /* 4-bit adpcm samples */ + ROM_LOAD( "mx28f2000p_v203_ussp.u34", 0x0000, 0x40000, CRC(33e6089d) SHA1(cd1ad01e92c18bbeab3fe3ea9152f8b0a3eb1b29) ) +ROM_END + +ROM_START( spk200ua ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "27c512_v200_ua.u27", 0x0000, 0x10000, CRC(f4572b88) SHA1(b1f845b5340639eee1464acb8a40241868a21070) ) + + ROM_REGION( 0xc0000, "gfx1", 0 ) + ROM_LOAD( "1_mx28f2000p_v200_ua.u33", 0x80000, 0x40000, CRC(b309e9cf) SHA1(2e3f81c9c654c859c0fd4c0953302c9283e7a4d8) ) + ROM_LOAD( "2_mx28f2000p_v200_ua.u32", 0x40000, 0x40000, CRC(05048307) SHA1(38d5ba5522a60ae4f34731ea7bd3e2c16683125d) ) + ROM_LOAD( "3_mx28f2000p_v200_ua.u31", 0x00000, 0x40000, CRC(beae217b) SHA1(9bfa69954c42ada88bedb7cedaceff841cb88a58) ) + + ROM_REGION( 0x30000, "gfx2", 0 ) + ROM_FILL( 0x0000, 0x30000, 0xff ) /* filling the whole bank */ + + ROM_REGION( 0x40000, "oki", 0 ) /* 4-bit adpcm samples */ + ROM_LOAD( "mx28f2000p_v200_uasp.u34", 0x0000, 0x40000, CRC(33e6089d) SHA1(cd1ad01e92c18bbeab3fe3ea9152f8b0a3eb1b29) ) +ROM_END + +ROM_START( spk102ua ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "27c512_v102_ua.u27", 0x0000, 0x10000, CRC(ec5e9f6d) SHA1(5d7a86f8faef7a4b7a9dde040b00b987ffb09479) ) + + ROM_REGION( 0xc0000, "gfx1", 0 ) + ROM_LOAD( "1_mx28f2000p_v102_ua.u33", 0x80000, 0x40000, CRC(b309e9cf) SHA1(2e3f81c9c654c859c0fd4c0953302c9283e7a4d8) ) + ROM_LOAD( "2_mx28f2000p_v102_ua.u32", 0x40000, 0x40000, CRC(05048307) SHA1(38d5ba5522a60ae4f34731ea7bd3e2c16683125d) ) + ROM_LOAD( "3_mx28f2000p_v102_ua.u31", 0x00000, 0x40000, CRC(beae217b) SHA1(9bfa69954c42ada88bedb7cedaceff841cb88a58) ) + + ROM_REGION( 0x30000, "gfx2", 0 ) + ROM_FILL( 0x0000, 0x30000, 0xff ) /* filling the whole bank */ + + ROM_REGION( 0x40000, "oki", 0 ) /* 4-bit adpcm samples */ + ROM_LOAD( "mx28f2000p_v102_uasp.u34", 0x0000, 0x40000, CRC(33e6089d) SHA1(cd1ad01e92c18bbeab3fe3ea9152f8b0a3eb1b29) ) +ROM_END + + /* Produttore ?Italy? @@ -734,4 +831,9 @@ DRIVER_INIT_MEMBER(spoker_state,3super8) GAME( 1993?, spk116it, 0, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v116IT)", MACHINE_SUPPORTS_SAVE ) GAME( 1993?, spk115it, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v115IT)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk306us, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v306US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk205us, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v205US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk203us, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v203US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk200ua, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v200UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk102ua, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v102UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) GAME( 1993?, 3super8, spk116it, 3super8,3super8, spoker_state, 3super8, ROT0, "", "3 Super 8 (Italy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) //roms are badly dumped diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 310c0325d17..2a4af9dc401 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -33116,6 +33116,11 @@ spss4240 // 3super8 // unknown spk115it // (c) 199? IGS spk116it // (c) 199? IGS +spk306us // (c) 1996 IGS +spk205us // (c) 1996 IGS +spk203us // (c) 1996 IGS +spk200ua // (c) 1996 IGS +spk102ua // (c) 1996 IGS @source:spool99.cpp spool99 // (c) 1998 Electronic Projects -- cgit v1.2.3-70-g09d2 From 675068f30de4e7fd9fae106e1a701437850cdd44 Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Sat, 5 Mar 2016 17:58:22 -0300 Subject: Super Poker (IGS): Added more technical notes... --- src/mame/drivers/spoker.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mame/drivers/spoker.cpp b/src/mame/drivers/spoker.cpp index c8a684968b1..a9b3f3bb533 100644 --- a/src/mame/drivers/spoker.cpp +++ b/src/mame/drivers/spoker.cpp @@ -651,6 +651,8 @@ ROM_END IGS002 (u20) U3567 (u42) + 1x 12.288 MHz Xtal. (next to HD64180RP8) + Programs are encrypted. See the last 0x1000 of each one to see the patterns... -- cgit v1.2.3-70-g09d2 From c049a91f4a534ebc99f715a19a2a6aae151869bb Mon Sep 17 00:00:00 2001 From: cracyc Date: Sat, 5 Mar 2016 15:00:40 -0600 Subject: pcxt: use pc motherboard device and banking (nw) --- scripts/src/machine.lua | 12 + scripts/target/mame/arcade.lua | 1 + scripts/target/mame/mess.lua | 3 +- src/devices/machine/genpc.cpp | 921 ++++++++++++++++++++++++++++++++++++++++ src/devices/machine/genpc.h | 195 +++++++++ src/mame/drivers/amstr_pc.cpp | 2 +- src/mame/drivers/asst128.cpp | 2 +- src/mame/drivers/ec184x.cpp | 3 +- src/mame/drivers/europc.cpp | 2 +- src/mame/drivers/genpc.cpp | 4 +- src/mame/drivers/ibmpc.cpp | 2 +- src/mame/drivers/iskr103x.cpp | 4 +- src/mame/drivers/m24.cpp | 3 +- src/mame/drivers/pasogo.cpp | 3 +- src/mame/drivers/pc.cpp | 4 +- src/mame/drivers/pcxt.cpp | 347 ++++------------ src/mame/drivers/tandy1t.cpp | 2 +- src/mame/includes/ec184x.h | 2 +- src/mame/includes/genpc.h | 195 --------- src/mame/machine/genpc.cpp | 922 ----------------------------------------- 20 files changed, 1216 insertions(+), 1413 deletions(-) create mode 100644 src/devices/machine/genpc.cpp create mode 100644 src/devices/machine/genpc.h delete mode 100644 src/mame/includes/genpc.h delete mode 100644 src/mame/machine/genpc.cpp (limited to 'src') diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua index fbc923b3073..0b38879b20c 100644 --- a/scripts/src/machine.lua +++ b/scripts/src/machine.lua @@ -2724,3 +2724,15 @@ if (MACHINES["PDC"]~=null) then MAME_DIR .. "src/devices/machine/pdc.h", } end + +--------------------------------------------------- +-- +--@src/devices/machine/genpc.h,MACHINES["GENPC"] = true +--------------------------------------------------- + +if (MACHINES["GENPC"]~=null) then + files { + MAME_DIR .. "src/devices/machine/genpc.cpp", + MAME_DIR .. "src/devices/machine/genpc.h", + } +end diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 9f17507c618..6a4157c1bf8 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -563,6 +563,7 @@ MACHINES["STEPPERS"] = true --MACHINES["DIABLO_HD"] = true MACHINES["PCI9050"] = true --MACHINES["TMS1024"] = true +MACHINES["GENPC"] = true -------------------------------------------------- -- specify available bus cores diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index ab2dd075fe5..e6af65ea8ef 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -571,6 +571,7 @@ MACHINES["DIABLO_HD"] = true MACHINES["TMS1024"] = true MACHINES["NSC810"] = true MACHINES["VT82C496"] = true +MACHINES["GENPC"] = true -------------------------------------------------- -- specify available bus cores @@ -2255,8 +2256,6 @@ files { MAME_DIR .. "src/mame/drivers/asst128.cpp", MAME_DIR .. "src/mame/drivers/europc.cpp", MAME_DIR .. "src/mame/drivers/genpc.cpp", - MAME_DIR .. "src/mame/includes/genpc.h", - MAME_DIR .. "src/mame/machine/genpc.cpp", MAME_DIR .. "src/mame/drivers/ibmpc.cpp", MAME_DIR .. "src/mame/drivers/ibmpcjr.cpp", MAME_DIR .. "src/mame/drivers/pc.cpp", diff --git a/src/devices/machine/genpc.cpp b/src/devices/machine/genpc.cpp new file mode 100644 index 00000000000..a363c0d75aa --- /dev/null +++ b/src/devices/machine/genpc.cpp @@ -0,0 +1,921 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol, Miodrag Milanovic +/*************************************************************************** + + machine/genpc.c + + +***************************************************************************/ + +#include "emu.h" +#include "machine/genpc.h" +#include "machine/i8255.h" +#include "machine/pic8259.h" +#include "machine/pit8253.h" +#include "sound/speaker.h" +#include "machine/ram.h" +#include "imagedev/cassette.h" + +#define VERBOSE_PIO 0 /* PIO (keyboard controller) */ + +#define PIO_LOG(N,M,A) \ + do { \ + if(VERBOSE_PIO>=N) \ + { \ + if( M ) \ + logerror("%11.6f: %-24s",machine().time().as_double(),(char*)M ); \ + logerror A; \ + } \ + } while (0) + + +/************************************************************************* + * + * PC DMA stuff + * + *************************************************************************/ + +WRITE8_MEMBER( ibm5160_mb_device::pc_page_w) +{ + switch(offset % 4) + { + case 1: + m_dma_offset[2] = data; + break; + case 2: + m_dma_offset[3] = data; + break; + case 3: + m_dma_offset[0] = m_dma_offset[1] = data; + break; + } +} + + +WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dma_hrq_changed ) +{ + m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); + + /* Assert HLDA */ + m_dma8237->hack_w(state); +} + + +READ8_MEMBER( ibm5160_mb_device::pc_dma_read_byte ) +{ + if(m_dma_channel == -1) + return 0xff; + address_space &spaceio = m_maincpu->space(AS_PROGRAM); + offs_t page_offset = (((offs_t) m_dma_offset[m_dma_channel]) << 16) & 0x0F0000; + return spaceio.read_byte( page_offset + offset); +} + + +WRITE8_MEMBER( ibm5160_mb_device::pc_dma_write_byte ) +{ + if(m_dma_channel == -1) + return; + address_space &spaceio = m_maincpu->space(AS_PROGRAM); + offs_t page_offset = (((offs_t) m_dma_offset[m_dma_channel]) << 16) & 0x0F0000; + + spaceio.write_byte( page_offset + offset, data); +} + + +READ8_MEMBER( ibm5160_mb_device::pc_dma8237_1_dack_r ) +{ + return m_isabus->dack_r(1); +} + +READ8_MEMBER( ibm5160_mb_device::pc_dma8237_2_dack_r ) +{ + return m_isabus->dack_r(2); +} + + +READ8_MEMBER( ibm5160_mb_device::pc_dma8237_3_dack_r ) +{ + return m_isabus->dack_r(3); +} + + +WRITE8_MEMBER( ibm5160_mb_device::pc_dma8237_1_dack_w ) +{ + m_isabus->dack_w(1,data); +} + +WRITE8_MEMBER( ibm5160_mb_device::pc_dma8237_2_dack_w ) +{ + m_isabus->dack_w(2,data); +} + + +WRITE8_MEMBER( ibm5160_mb_device::pc_dma8237_3_dack_w ) +{ + m_isabus->dack_w(3,data); +} + + +WRITE8_MEMBER( ibm5160_mb_device::pc_dma8237_0_dack_w ) +{ + m_u73_q2 = 0; + m_dma8237->dreq0_w( m_u73_q2 ); +} + + +WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dma8237_out_eop ) +{ + m_cur_eop = state == ASSERT_LINE; + if(m_dma_channel != -1 && m_cur_eop) + m_isabus->eop_w(m_dma_channel, m_cur_eop ? ASSERT_LINE : CLEAR_LINE ); +} + +void ibm5160_mb_device::pc_select_dma_channel(int channel, bool state) +{ + if(!state) { + m_dma_channel = channel; + if(m_cur_eop) + m_isabus->eop_w(channel, ASSERT_LINE ); + + } else if(m_dma_channel == channel) { + m_dma_channel = -1; + if(m_cur_eop) + m_isabus->eop_w(channel, CLEAR_LINE ); + } +} + +WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dack0_w ) { pc_select_dma_channel(0, state); } +WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dack1_w ) { pc_select_dma_channel(1, state); } +WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dack2_w ) { pc_select_dma_channel(2, state); } +WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dack3_w ) { pc_select_dma_channel(3, state); } + +/************************************************************* + * + * pic8259 configuration + * + *************************************************************/ + +WRITE_LINE_MEMBER(ibm5160_mb_device::pc_speaker_set_spkrdata) +{ + m_pc_spkrdata = state ? 1 : 0; + m_speaker->level_w(m_pc_spkrdata & m_pit_out2); +} + + +/************************************************************* + * + * pit8253 configuration + * + *************************************************************/ + +WRITE_LINE_MEMBER( ibm5160_mb_device::pc_pit8253_out1_changed ) +{ + /* Trigger DMA channel #0 */ + if ( m_out1 == 0 && state == 1 && m_u73_q2 == 0 ) + { + m_u73_q2 = 1; + m_dma8237->dreq0_w( m_u73_q2 ); + } + m_out1 = state; +} + + +WRITE_LINE_MEMBER( ibm5160_mb_device::pc_pit8253_out2_changed ) +{ + m_pit_out2 = state ? 1 : 0; + m_speaker->level_w(m_pc_spkrdata & m_pit_out2); +} + + +/********************************************************** + * + * PPI8255 interface + * + * + * PORT A (input) + * + * Directly attached to shift register which stores data + * received from the keyboard. + * + * PORT B (output) + * 0 - PB0 - TIM2GATESPK - Enable/disable counting on timer 2 of the 8253 + * 1 - PB1 - SPKRDATA - Speaker data + * 2 - PB2 - - Enable receiving data from the keyboard when keyboard is not locked. + * 3 - PB3 - - Dipsswitch set selector + * 4 - PB4 - ENBRAMPCK - Enable ram parity check + * 5 - PB5 - ENABLEI/OCK - Enable expansion I/O check + * 6 - PB6 - - Connected to keyboard clock signal + * 0 = ignore keyboard signals + * 1 = accept keyboard signals + * 7 - PB7 - - Clear/disable shift register and IRQ1 line + * 0 = normal operation + * 1 = clear and disable shift register and clear IRQ1 flip flop + * + * PORT C + * 0 - PC0 - - Dipswitch 0/4 SW1 + * 1 - PC1 - - Dipswitch 1/5 SW1 + * 2 - PC2 - - Dipswitch 2/6 SW1 + * 3 - PC3 - - Dipswitch 3/7 SW1 + * 4 - PC4 - SPK - Speaker/cassette data + * 5 - PC5 - I/OCHCK - Expansion I/O check result + * 6 - PC6 - T/C2OUT - Output of 8253 timer 2 + * 7 - PC7 - PCK - Parity check result + * + * IBM5150 SW1: + * 0 - OFF - One or more floppy drives + * ON - Diskless operation + * 1 - OFF - 8087 present + * ON - No 8087 present + * 2+3 - Used to determine on board memory configuration + * OFF OFF - 64KB + * ON OFF - 48KB + * OFF ON - 32KB + * ON ON - 16KB + * 4+5 - Used to select display + * OFF OFF - Monochrome + * ON OFF - CGA, 80 column + * OFF ON - CGA, 40 column + * ON ON - EGA/VGA display + * 6+7 - Used to select number of disk drives + * OFF OFF - four disk drives + * ON OFF - three disk drives + * OFF ON - two disk drives + * ON ON - one disk drive + * + **********************************************************/ +WRITE_LINE_MEMBER( ibm5150_mb_device::keyboard_clock_w ) +{ + if (!m_ppi_keyboard_clear && !state && !m_ppi_shift_enable) + { + m_ppi_shift_enable = m_ppi_shift_register & 0x01; + + m_ppi_shift_register >>= 1; + m_ppi_shift_register |= m_ppi_data_signal << 7; + + m_pic8259->ir1_w(m_ppi_shift_enable); + m_pc_kbdc->data_write_from_mb(!m_ppi_shift_enable); + } +} + +WRITE_LINE_MEMBER( ec1841_mb_device::keyboard_clock_w ) +{ + if (!m_ppi_keyboard_clear && !state && !m_ppi_shift_enable) + { + m_ppi_shift_enable = m_ppi_shift_register & 0x01; + + m_ppi_shift_register >>= 1; + m_ppi_shift_register |= m_ppi_data_signal << 7; + + m_pic8259->ir1_w(m_ppi_shift_enable); + m_pc_kbdc->data_write_from_mb(!m_ppi_shift_enable); + } +} + +WRITE_LINE_MEMBER( ibm5160_mb_device::keyboard_clock_w ) +{ + if (!m_ppi_keyboard_clear && !state && !m_ppi_shift_enable) + { + m_ppi_shift_enable = m_ppi_shift_register & 0x01; + + m_ppi_shift_register >>= 1; + m_ppi_shift_register |= m_ppi_data_signal << 7; + + m_pic8259->ir1_w(m_ppi_shift_enable); + m_pc_kbdc->data_write_from_mb(!BIT(m_ppi_portb, 2) && !m_ppi_shift_enable); + } +} + + +WRITE_LINE_MEMBER( ibm5160_mb_device::keyboard_data_w ) +{ + m_ppi_data_signal = state; +} + +READ8_MEMBER (ibm5160_mb_device::pc_ppi_porta_r) +{ + int data = 0xFF; + /* KB port A */ + if (m_ppi_keyboard_clear) + { + /* 0 0 - no floppy drives + * 1 Not used + * 2-3 The number of memory banks on the system board + * 4-5 Display mode + * 11 = monochrome + * 10 - color 80x25 + * 01 - color 40x25 + * 6-7 The number of floppy disk drives + */ + data = ioport("DSW0")->read(); + } + else + { + data = m_ppi_shift_register; + } + PIO_LOG(1,"PIO_A_r",("$%02x\n", data)); + return data; +} + + +READ8_MEMBER ( ibm5160_mb_device::pc_ppi_portc_r ) +{ + int data=0xff; + + data&=~0x80; // no parity error + data&=~0x40; // no error on expansion board + /* KB port C: equipment flags */ + if (m_ppi_portc_switch_high) + { + /* read hi nibble of S2 */ + data = (data & 0xf0) | ((ioport("DSW0")->read() >> 4) & 0x0f); + PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data)); + } + else + { + /* read lo nibble of S2 */ + data = (data & 0xf0) | (ioport("DSW0")->read() & 0x0f); + PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data)); + } + + if ( m_ppi_portb & 0x01 ) + { + data = ( data & ~0x10 ) | ( m_pit_out2 ? 0x10 : 0x00 ); + } + data = ( data & ~0x20 ) | ( m_pit_out2 ? 0x20 : 0x00 ); + + return data; +} + + +WRITE8_MEMBER( ibm5160_mb_device::pc_ppi_portb_w ) +{ + /* PPI controller port B*/ + m_ppi_portb = data; + m_ppi_portc_switch_high = data & 0x08; + m_ppi_keyboard_clear = data & 0x80; + m_ppi_keyb_clock = data & 0x40; + m_pit8253->write_gate2(BIT(data, 0)); + pc_speaker_set_spkrdata( data & 0x02 ); + + /* If PB7 is set clear the shift register and reset the IRQ line */ + if ( m_ppi_keyboard_clear ) + { + m_ppi_shift_register = 0; + m_ppi_shift_enable = 0; + m_pic8259->ir1_w(m_ppi_shift_enable); + } + + m_pc_kbdc->data_write_from_mb(!BIT(m_ppi_portb, 2) && !m_ppi_shift_enable); + m_ppi_clock_signal = ( m_ppi_keyb_clock ) ? 1 : 0; + m_pc_kbdc->clock_write_from_mb(m_ppi_clock_signal); +} + + +/********************************************************** + * + * NMI handling + * + **********************************************************/ + +WRITE8_MEMBER( ibm5160_mb_device::nmi_enable_w ) +{ + m_nmi_enabled = BIT(data,7); + m_isabus->set_nmi_state(m_nmi_enabled); +} +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +const device_type IBM5160_MOTHERBOARD = &device_creator; + +//************************************************************************** +// DEVICE CONFIGURATION +//************************************************************************** + +static MACHINE_CONFIG_FRAGMENT( ibm5160_mb_config ) + MCFG_DEVICE_ADD("pit8253", PIT8253, 0) + MCFG_PIT8253_CLK0(XTAL_14_31818MHz/12) /* heartbeat IRQ */ + MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir0_w)) + MCFG_PIT8253_CLK1(XTAL_14_31818MHz/12) /* dram refresh */ + MCFG_PIT8253_OUT1_HANDLER(WRITELINE(ibm5160_mb_device, pc_pit8253_out1_changed)) + MCFG_PIT8253_CLK2(XTAL_14_31818MHz/12) /* pio port c pin 4, and speaker polling enough */ + MCFG_PIT8253_OUT2_HANDLER(WRITELINE(ibm5160_mb_device, pc_pit8253_out2_changed)) + + MCFG_DEVICE_ADD( "dma8237", AM9517A, XTAL_14_31818MHz/3 ) + MCFG_I8237_OUT_HREQ_CB(WRITELINE(ibm5160_mb_device, pc_dma_hrq_changed)) + MCFG_I8237_OUT_EOP_CB(WRITELINE(ibm5160_mb_device, pc_dma8237_out_eop)) + MCFG_I8237_IN_MEMR_CB(READ8(ibm5160_mb_device, pc_dma_read_byte)) + MCFG_I8237_OUT_MEMW_CB(WRITE8(ibm5160_mb_device, pc_dma_write_byte)) + MCFG_I8237_IN_IOR_1_CB(READ8(ibm5160_mb_device, pc_dma8237_1_dack_r)) + MCFG_I8237_IN_IOR_2_CB(READ8(ibm5160_mb_device, pc_dma8237_2_dack_r)) + MCFG_I8237_IN_IOR_3_CB(READ8(ibm5160_mb_device, pc_dma8237_3_dack_r)) + MCFG_I8237_OUT_IOW_0_CB(WRITE8(ibm5160_mb_device, pc_dma8237_0_dack_w)) + MCFG_I8237_OUT_IOW_1_CB(WRITE8(ibm5160_mb_device, pc_dma8237_1_dack_w)) + MCFG_I8237_OUT_IOW_2_CB(WRITE8(ibm5160_mb_device, pc_dma8237_2_dack_w)) + MCFG_I8237_OUT_IOW_3_CB(WRITE8(ibm5160_mb_device, pc_dma8237_3_dack_w)) + MCFG_I8237_OUT_DACK_0_CB(WRITELINE(ibm5160_mb_device, pc_dack0_w)) + MCFG_I8237_OUT_DACK_1_CB(WRITELINE(ibm5160_mb_device, pc_dack1_w)) + MCFG_I8237_OUT_DACK_2_CB(WRITELINE(ibm5160_mb_device, pc_dack2_w)) + MCFG_I8237_OUT_DACK_3_CB(WRITELINE(ibm5160_mb_device, pc_dack3_w)) + + MCFG_PIC8259_ADD( "pic8259", INPUTLINE(":maincpu", 0), VCC, NULL ) + + MCFG_DEVICE_ADD("ppi8255", I8255A, 0) + MCFG_I8255_IN_PORTA_CB(READ8(ibm5160_mb_device, pc_ppi_porta_r)) + MCFG_I8255_OUT_PORTB_CB(WRITE8(ibm5160_mb_device, pc_ppi_portb_w)) + MCFG_I8255_IN_PORTC_CB(READ8(ibm5160_mb_device, pc_ppi_portc_r)) + + MCFG_DEVICE_ADD("isa", ISA8, 0) + MCFG_ISA8_CPU(":maincpu") + MCFG_ISA_OUT_IRQ2_CB(DEVWRITELINE("pic8259", pic8259_device, ir2_w)) + MCFG_ISA_OUT_IRQ3_CB(DEVWRITELINE("pic8259", pic8259_device, ir3_w)) + MCFG_ISA_OUT_IRQ4_CB(DEVWRITELINE("pic8259", pic8259_device, ir4_w)) + MCFG_ISA_OUT_IRQ5_CB(DEVWRITELINE("pic8259", pic8259_device, ir5_w)) + MCFG_ISA_OUT_IRQ6_CB(DEVWRITELINE("pic8259", pic8259_device, ir6_w)) + MCFG_ISA_OUT_IRQ7_CB(DEVWRITELINE("pic8259", pic8259_device, ir7_w)) + MCFG_ISA_OUT_DRQ1_CB(DEVWRITELINE("dma8237", am9517a_device, dreq1_w)) + MCFG_ISA_OUT_DRQ2_CB(DEVWRITELINE("dma8237", am9517a_device, dreq2_w)) + MCFG_ISA_OUT_DRQ3_CB(DEVWRITELINE("dma8237", am9517a_device, dreq3_w)) + + MCFG_DEVICE_ADD("pc_kbdc", PC_KBDC, 0) + MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ibm5160_mb_device, keyboard_clock_w)) + MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE(ibm5160_mb_device, keyboard_data_w)) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor ibm5160_mb_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( ibm5160_mb_config ); +} + + +static INPUT_PORTS_START( ibm5160_mb ) + PORT_START("DSW0") /* IN1 */ + PORT_DIPNAME( 0xc0, 0x40, "Number of floppy drives") + PORT_DIPSETTING( 0x00, "1" ) + PORT_DIPSETTING( 0x40, "2" ) + PORT_DIPSETTING( 0x80, "3" ) + PORT_DIPSETTING( 0xc0, "4" ) + PORT_DIPNAME( 0x30, 0x30, "Graphics adapter") + PORT_DIPSETTING( 0x00, "EGA/VGA" ) + PORT_DIPSETTING( 0x10, "Color 40x25" ) + PORT_DIPSETTING( 0x20, "Color 80x25" ) + PORT_DIPSETTING( 0x30, "Monochrome" ) + PORT_DIPNAME( 0x0c, 0x0c, "RAM banks") + PORT_DIPSETTING( 0x00, "1 - 16/ 64/256K" ) + PORT_DIPSETTING( 0x04, "2 - 32/128/512K" ) + PORT_DIPSETTING( 0x08, "3 - 48/192/576K" ) + PORT_DIPSETTING( 0x0c, "4 - 64/256/640K" ) + PORT_DIPNAME( 0x02, 0x00, "8087 installed") + PORT_DIPSETTING( 0x00, DEF_STR(No) ) + PORT_DIPSETTING( 0x02, DEF_STR(Yes) ) + PORT_DIPNAME( 0x01, 0x01, "Boot from floppy") + PORT_DIPSETTING( 0x01, DEF_STR(Yes) ) + PORT_DIPSETTING( 0x00, DEF_STR(No) ) +INPUT_PORTS_END +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +ioport_constructor ibm5160_mb_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( ibm5160_mb ); +} + + +void ibm5160_mb_device::static_set_cputag(device_t &device, const char *tag) +{ + ibm5160_mb_device &board = downcast(device); + board.m_cputag = tag; +} + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// ibm5160_mb_device - constructor +//------------------------------------------------- + +ibm5160_mb_device::ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, IBM5160_MOTHERBOARD, "IBM5160_MOTHERBOARD", tag, owner, clock, "ibm5160_mb", __FILE__), + m_maincpu(*owner, "maincpu"), + m_pic8259(*this, "pic8259"), + m_dma8237(*this, "dma8237"), + m_pit8253(*this, "pit8253"), + m_ppi8255(*this, "ppi8255"), + m_speaker(*this, "speaker"), + m_isabus(*this, "isa"), + m_pc_kbdc(*this, "pc_kbdc"), + m_ram(*this, ":" RAM_TAG) +{ +} + +DEVICE_ADDRESS_MAP_START( map, 8, ibm5160_mb_device ) + AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237", am9517a_device, read, write) + AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259", pic8259_device, read, write) + AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("pit8253", pit8253_device, read, write) + AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) + AM_RANGE(0x0080, 0x008f) AM_WRITE(pc_page_w) + AM_RANGE(0x00a0, 0x00a1) AM_WRITE(nmi_enable_w) +ADDRESS_MAP_END + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void ibm5160_mb_device::device_start() +{ + if(!m_ram->started()) + throw device_missing_dependencies(); + m_maincpu->space(AS_PROGRAM).install_ram(0, m_ram->size() - 1, m_ram->pointer()); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void ibm5160_mb_device::device_reset() +{ + m_u73_q2 = 0; + m_out1 = 2; // initial state of pit output is undefined + m_pc_spkrdata = 0; + m_pit_out2 = 1; + m_dma_channel = -1; + m_cur_eop = false; + memset(m_dma_offset,0,sizeof(m_dma_offset)); + m_ppi_portc_switch_high = 0; + m_ppi_speaker = 0; + m_ppi_keyboard_clear = 0; + m_ppi_keyb_clock = 0; + m_ppi_portb = 0; + m_ppi_clock_signal = 0; + m_ppi_data_signal = 0; + m_ppi_shift_register = 0; + m_ppi_shift_enable = 0; + m_nmi_enabled = 0; + m_speaker->level_w(0); +} + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +const device_type IBM5150_MOTHERBOARD = &device_creator; + +//************************************************************************** +// DEVICE CONFIGURATION +//************************************************************************** +static MACHINE_CONFIG_FRAGMENT( ibm5150_mb_config ) + MCFG_FRAGMENT_ADD(ibm5160_mb_config) + + MCFG_DEVICE_MODIFY("pc_kbdc") + MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ibm5150_mb_device, keyboard_clock_w)) + + MCFG_DEVICE_MODIFY("ppi8255") + MCFG_I8255_OUT_PORTB_CB(WRITE8(ibm5150_mb_device, pc_ppi_portb_w)) + MCFG_I8255_IN_PORTC_CB(READ8(ibm5150_mb_device, pc_ppi_portc_r)) + + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor ibm5150_mb_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( ibm5150_mb_config ); +} + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// ibm5150_mb_device - constructor +//------------------------------------------------- + +ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : ibm5160_mb_device(mconfig, tag, owner, clock), + m_cassette(*this, "cassette") +{ +} + +READ8_MEMBER (ibm5150_mb_device::pc_ppi_porta_r) +{ + int data = 0xFF; + /* KB port A */ + if (m_ppi_keyboard_clear) + { + /* 0 0 - no floppy drives + * 1 Not used + * 2-3 The number of memory banks on the system board + * 4-5 Display mode + * 11 = monochrome + * 10 - color 80x25 + * 01 - color 40x25 + * 6-7 The number of floppy disk drives + */ + data = ioport("DSW0")->read() & 0xF3; + switch ( m_ram->size() ) + { + case 16 * 1024: + data |= 0x00; + break; + case 32 * 1024: /* Need to verify if this is correct */ + data |= 0x04; + break; + case 48 * 1024: /* Need to verify if this is correct */ + data |= 0x08; + break; + default: + data |= 0x0C; + break; + } + } + else + { + data = m_ppi_shift_register; + } + PIO_LOG(1,"PIO_A_r",("$%02x\n", data)); + return data; +} + + +READ8_MEMBER ( ibm5150_mb_device::pc_ppi_portc_r ) +{ + int data=0xff; + + data&=~0x80; // no parity error + data&=~0x40; // no error on expansion board + /* KB port C: equipment flags */ + if (m_ppi_portc_switch_high) + { + /* read hi nibble of SW2 */ + data = data & 0xf0; + + switch ( m_ram->size() - 64 * 1024 ) + { + case 64 * 1024: data |= 0x00; break; + case 128 * 1024: data |= 0x02; break; + case 192 * 1024: data |= 0x04; break; + case 256 * 1024: data |= 0x06; break; + case 320 * 1024: data |= 0x08; break; + case 384 * 1024: data |= 0x0A; break; + case 448 * 1024: data |= 0x0C; break; + case 512 * 1024: data |= 0x0E; break; + case 576 * 1024: data |= 0x01; break; + case 640 * 1024: data |= 0x03; break; + case 704 * 1024: data |= 0x05; break; + case 768 * 1024: data |= 0x07; break; + case 832 * 1024: data |= 0x09; break; + case 896 * 1024: data |= 0x0B; break; + case 960 * 1024: data |= 0x0D; break; + } + if ( m_ram->size() > 960 * 1024 ) + data |= 0x0D; + + PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data)); + } + else + { + /* read lo nibble of S2 */ + data = (data & 0xf0) | (ioport("DSW0")->read() & 0x0f); + PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data)); + } + + if ( ! ( m_ppi_portb & 0x08 ) ) + { + double tap_val = m_cassette->input(); + + if ( tap_val < 0 ) + { + data &= ~0x10; + } + else + { + data |= 0x10; + } + } + else + { + if ( m_ppi_portb & 0x01 ) + { + data = ( data & ~0x10 ) | ( m_pit_out2 ? 0x10 : 0x00 ); + } + } + data = ( data & ~0x20 ) | ( m_pit_out2 ? 0x20 : 0x00 ); + + return data; +} + + +WRITE8_MEMBER( ibm5150_mb_device::pc_ppi_portb_w ) +{ + /* KB controller port B */ + m_ppi_portb = data; + m_ppi_portc_switch_high = data & 0x08; + m_ppi_keyboard_clear = data & 0x80; + m_ppi_keyb_clock = data & 0x40; + m_pit8253->write_gate2(BIT(data, 0)); + pc_speaker_set_spkrdata( data & 0x02 ); + + m_cassette->change_state(( data & 0x08 ) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED,CASSETTE_MASK_MOTOR); + + /* If PB7 is set clear the shift register and reset the IRQ line */ + if ( m_ppi_keyboard_clear ) + { + m_ppi_shift_register = 0; + m_ppi_shift_enable = 0; + m_pic8259->ir1_w(m_ppi_shift_enable); + } + + m_pc_kbdc->data_write_from_mb(!m_ppi_shift_enable); + m_ppi_clock_signal = ( m_ppi_keyb_clock ) ? 1 : 0; + m_pc_kbdc->clock_write_from_mb(m_ppi_clock_signal); +} + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +const device_type EC1841_MOTHERBOARD = &device_creator; + +static MACHINE_CONFIG_FRAGMENT( ec1841_mb_config ) + MCFG_FRAGMENT_ADD(ibm5160_mb_config) + + MCFG_DEVICE_MODIFY("ppi8255") + MCFG_I8255_OUT_PORTB_CB(WRITE8(ec1841_mb_device, pc_ppi_portb_w)) + MCFG_I8255_IN_PORTC_CB(READ8(ec1841_mb_device, pc_ppi_portc_r)) + + MCFG_DEVICE_MODIFY("pc_kbdc") + MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ec1841_mb_device, keyboard_clock_w)) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor ec1841_mb_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( ec1841_mb_config ); +} + +static INPUT_PORTS_START( ec1841_mb ) + PORT_START("DSW0") /* SA1 */ + PORT_DIPNAME( 0xc0, 0x40, "Number of floppy drives") + PORT_DIPSETTING( 0x00, "1" ) + PORT_DIPSETTING( 0x40, "2" ) + PORT_DIPSETTING( 0x80, "3" ) + PORT_DIPSETTING( 0xc0, "4" ) + PORT_DIPNAME( 0x30, 0x20, "Graphics adapter") + PORT_DIPSETTING( 0x00, "Reserved" ) + PORT_DIPSETTING( 0x10, "Color 40x25" ) + PORT_DIPSETTING( 0x20, "Color 80x25" ) + PORT_DIPSETTING( 0x30, "Monochrome" ) + PORT_BIT( 0x08, 0x08, IPT_UNUSED ) + /* BIOS does not support booting from QD floppies */ + PORT_DIPNAME( 0x04, 0x04, "Floppy type") + PORT_DIPSETTING( 0x00, "80 tracks" ) + PORT_DIPSETTING( 0x04, "40 tracks" ) + PORT_DIPNAME( 0x02, 0x00, "8087 installed") + PORT_DIPSETTING( 0x00, DEF_STR(No) ) + PORT_DIPSETTING( 0x02, DEF_STR(Yes) ) + PORT_DIPNAME( 0x01, 0x01, "Boot from floppy") + PORT_DIPSETTING( 0x01, DEF_STR(Yes) ) + PORT_DIPSETTING( 0x00, DEF_STR(No) ) + + PORT_START("SA2") + PORT_DIPNAME( 0x04, 0x04, "Speech synthesizer") + PORT_DIPSETTING( 0x00, "Installed" ) + PORT_DIPSETTING( 0x04, "Not installed" ) +INPUT_PORTS_END + +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +ioport_constructor ec1841_mb_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( ec1841_mb ); +} + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// ec1841_mb_device - constructor +//------------------------------------------------- + +ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : ibm5160_mb_device(mconfig, tag, owner, clock) +{ +} + +void ec1841_mb_device::device_start() +{ +} + +// kbd interface is 5150-like but PB2 controls access to second bank of DIP switches (SA2). +WRITE8_MEMBER( ec1841_mb_device::pc_ppi_portb_w ) +{ + /* KB controller port B */ + m_ppi_portb = data; + m_ppi_portc_switch_high = data & 0x04; + m_ppi_keyboard_clear = data & 0x80; + m_ppi_keyb_clock = data & 0x40; + m_pit8253->write_gate2(BIT(data, 0)); + pc_speaker_set_spkrdata( data & 0x02 ); + + /* If PB7 is set clear the shift register and reset the IRQ line */ + if ( m_ppi_keyboard_clear ) + { + m_ppi_shift_register = 0; + m_ppi_shift_enable = 0; + m_pic8259->ir1_w(m_ppi_shift_enable); + } + + m_pc_kbdc->data_write_from_mb(!m_ppi_shift_enable); + m_ppi_clock_signal = ( m_ppi_keyb_clock ) ? 1 : 0; + m_pc_kbdc->clock_write_from_mb(m_ppi_clock_signal); +} + +READ8_MEMBER ( ec1841_mb_device::pc_ppi_portc_r ) +{ + int data=0xff; + + data&=~0x80; // no parity error + data&=~0x40; // no error on expansion board + + if (m_ppi_portc_switch_high) + { + data = (data & 0xf0) | (ioport("SA2")->read() & 0x0f); + } + + data = ( data & ~0x20 ) | ( m_pit_out2 ? 0x20 : 0x00 ); + + return data; +} + +pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : ibm5160_mb_device(mconfig, tag, owner, clock) +{ +} + +//************************************************************************** +// DEVICE CONFIGURATION +//************************************************************************** + +static MACHINE_CONFIG_FRAGMENT( pc_noppi_mb_config ) + MCFG_FRAGMENT_ADD(ibm5160_mb_config) + + MCFG_DEVICE_REMOVE("pc_kbdc") + MCFG_DEVICE_REMOVE("ppi8255") +MACHINE_CONFIG_END + +static INPUT_PORTS_START( pc_noppi_mb ) +INPUT_PORTS_END + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor pc_noppi_mb_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( pc_noppi_mb_config ); +} + +ioport_constructor pc_noppi_mb_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( pc_noppi_mb ); +} + +DEVICE_ADDRESS_MAP_START( map, 8, pc_noppi_mb_device ) + AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237", am9517a_device, read, write) + AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259", pic8259_device, read, write) + AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("pit8253", pit8253_device, read, write) + AM_RANGE(0x0080, 0x008f) AM_WRITE(pc_page_w) + AM_RANGE(0x00a0, 0x00a1) AM_WRITE(nmi_enable_w) +ADDRESS_MAP_END + +const device_type PCNOPPI_MOTHERBOARD = &device_creator; diff --git a/src/devices/machine/genpc.h b/src/devices/machine/genpc.h new file mode 100644 index 00000000000..13f00e8eac2 --- /dev/null +++ b/src/devices/machine/genpc.h @@ -0,0 +1,195 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol, Miodrag Milanovic +/***************************************************************************** + * + * includes/pc.h + * + ****************************************************************************/ + +#ifndef GENPC_H_ +#define GENPC_H_ + +#include "machine/ins8250.h" +#include "machine/i8255.h" +#include "machine/am9517a.h" +#include "bus/isa/isa.h" +#include "bus/isa/isa_cards.h" +#include "bus/pc_kbd/pc_kbdc.h" +#include "machine/pic8259.h" +#include "machine/pit8253.h" +#include "sound/speaker.h" +#include "imagedev/cassette.h" +#include "machine/ram.h" + +#define MCFG_IBM5160_MOTHERBOARD_ADD(_tag, _cputag) \ + MCFG_DEVICE_ADD(_tag, IBM5160_MOTHERBOARD, 0) \ + ibm5160_mb_device::static_set_cputag(*device, _cputag); +// ======================> ibm5160_mb_device +class ibm5160_mb_device : public device_t +{ +public: + // construction/destruction + ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + // inline configuration + static void static_set_cputag(device_t &device, const char *tag); + + // optional information overrides + virtual machine_config_constructor device_mconfig_additions() const override; + virtual ioport_constructor device_input_ports() const override; + + DECLARE_ADDRESS_MAP(map, 8); +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; +public: + required_device m_maincpu; + required_device m_pic8259; + required_device m_dma8237; + required_device m_pit8253; + optional_device m_ppi8255; + required_device m_speaker; + required_device m_isabus; + optional_device m_pc_kbdc; + required_device m_ram; + + /* U73 is an LS74 - dual flip flop */ + /* Q2 is set by OUT1 from the 8253 and goes to DRQ1 on the 8237 */ + UINT8 m_u73_q2; + UINT8 m_out1; + int m_dma_channel; + UINT8 m_dma_offset[4]; + UINT8 m_pc_spkrdata; + UINT8 m_pit_out2; + bool m_cur_eop; + + UINT8 m_nmi_enabled; + + int m_ppi_portc_switch_high; + int m_ppi_speaker; + int m_ppi_keyboard_clear; + UINT8 m_ppi_keyb_clock; + UINT8 m_ppi_portb; + UINT8 m_ppi_clock_signal; + UINT8 m_ppi_data_signal; + UINT8 m_ppi_shift_register; + UINT8 m_ppi_shift_enable; + + // interface to the keyboard + DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); + DECLARE_WRITE_LINE_MEMBER( keyboard_data_w ); + + DECLARE_READ8_MEMBER ( pc_ppi_porta_r ); + DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); + DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); + + DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out1_changed ); + DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out2_changed ); + + DECLARE_WRITE_LINE_MEMBER( pc_dma_hrq_changed ); + DECLARE_WRITE_LINE_MEMBER( pc_dma8237_out_eop ); + DECLARE_READ8_MEMBER( pc_dma_read_byte ); + DECLARE_WRITE8_MEMBER( pc_dma_write_byte ); + DECLARE_READ8_MEMBER( pc_dma8237_1_dack_r ); + DECLARE_READ8_MEMBER( pc_dma8237_2_dack_r ); + DECLARE_READ8_MEMBER( pc_dma8237_3_dack_r ); + DECLARE_WRITE8_MEMBER( pc_dma8237_1_dack_w ); + DECLARE_WRITE8_MEMBER( pc_dma8237_2_dack_w ); + DECLARE_WRITE8_MEMBER( pc_dma8237_3_dack_w ); + DECLARE_WRITE8_MEMBER( pc_dma8237_0_dack_w ); + DECLARE_WRITE_LINE_MEMBER( pc_dack0_w ); + DECLARE_WRITE_LINE_MEMBER( pc_dack1_w ); + DECLARE_WRITE_LINE_MEMBER( pc_dack2_w ); + DECLARE_WRITE_LINE_MEMBER( pc_dack3_w ); + + DECLARE_WRITE_LINE_MEMBER( pc_speaker_set_spkrdata ); + + DECLARE_WRITE8_MEMBER(pc_page_w); + DECLARE_WRITE8_MEMBER(nmi_enable_w); + + const char *m_cputag; + +private: + void pc_select_dma_channel(int channel, bool state); +}; + + +// device type definition +extern const device_type IBM5160_MOTHERBOARD; + + +#define MCFG_IBM5150_MOTHERBOARD_ADD(_tag, _cputag) \ + MCFG_DEVICE_ADD(_tag, IBM5150_MOTHERBOARD, 0) \ + ibm5150_mb_device::static_set_cputag(*device, _cputag); + +// ======================> ibm5150_mb_device +class ibm5150_mb_device : public ibm5160_mb_device +{ +public: + // construction/destruction + ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual machine_config_constructor device_mconfig_additions() const override; + + DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); + +protected: + // device-level overrides + + required_device m_cassette; +public: + DECLARE_READ8_MEMBER ( pc_ppi_porta_r ); + DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); + DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); +}; + + +// device type definition +extern const device_type IBM5150_MOTHERBOARD; + + +#define MCFG_EC1841_MOTHERBOARD_ADD(_tag, _cputag) \ + MCFG_DEVICE_ADD(_tag, EC1841_MOTHERBOARD, 0) \ + ec1841_mb_device::static_set_cputag(*device, _cputag); + +class ec1841_mb_device : public ibm5160_mb_device +{ +public: + // construction/destruction + ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual machine_config_constructor device_mconfig_additions() const override; + virtual ioport_constructor device_input_ports() const override; + virtual void device_start() override; + +public: + DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); + DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); + + DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); +}; + +extern const device_type EC1841_MOTHERBOARD; + +#define MCFG_PCNOPPI_MOTHERBOARD_ADD(_tag, _cputag) \ + MCFG_DEVICE_ADD(_tag, PCNOPPI_MOTHERBOARD, 0) \ + pc_noppi_mb_device::static_set_cputag(*device, _cputag); + +class pc_noppi_mb_device : public ibm5160_mb_device +{ +public: + // construction/destruction + pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + DECLARE_ADDRESS_MAP(map, 8); + + virtual machine_config_constructor device_mconfig_additions() const override; + virtual ioport_constructor device_input_ports() const override; +protected: +}; + +extern const device_type PCNOPPI_MOTHERBOARD; + +#endif /* GENPC_H_ */ diff --git a/src/mame/drivers/amstr_pc.cpp b/src/mame/drivers/amstr_pc.cpp index 8b1558a4575..dd44bc15724 100644 --- a/src/mame/drivers/amstr_pc.cpp +++ b/src/mame/drivers/amstr_pc.cpp @@ -31,7 +31,7 @@ More information can be found at http://www.seasip.info/AmstradXT/1640tech/index #include "cpu/i86/i86.h" #include "machine/mc146818.h" -#include "includes/genpc.h" +#include "machine/genpc.h" #include "bus/isa/isa.h" #include "bus/isa/isa_cards.h" diff --git a/src/mame/drivers/asst128.cpp b/src/mame/drivers/asst128.cpp index 1f246a3fec5..11712e55973 100644 --- a/src/mame/drivers/asst128.cpp +++ b/src/mame/drivers/asst128.cpp @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders:Sergey Svishchev #include "emu.h" -#include "includes/genpc.h" +#include "machine/genpc.h" #include "bus/pc_kbd/keyboards.h" #include "machine/pc_fdc.h" #include "formats/asst128_dsk.h" diff --git a/src/mame/drivers/ec184x.cpp b/src/mame/drivers/ec184x.cpp index bbad68d0c37..8e965534720 100644 --- a/src/mame/drivers/ec184x.cpp +++ b/src/mame/drivers/ec184x.cpp @@ -11,8 +11,7 @@ #include "emu.h" -#include "includes/genpc.h" - +#include "machine/genpc.h" #include "bus/isa/xsu_cards.h" #include "bus/pc_kbd/keyboards.h" #include "cpu/i86/i86.h" diff --git a/src/mame/drivers/europc.cpp b/src/mame/drivers/europc.cpp index 476d1b1fda6..60023095a01 100644 --- a/src/mame/drivers/europc.cpp +++ b/src/mame/drivers/europc.cpp @@ -2,7 +2,7 @@ // copyright-holders:Wilbert Pol #include "emu.h" #include "coreutil.h" -#include "includes/genpc.h" +#include "machine/genpc.h" #include "machine/nvram.h" #include "machine/pckeybrd.h" diff --git a/src/mame/drivers/genpc.cpp b/src/mame/drivers/genpc.cpp index 857bac57eeb..2b8bf334f84 100644 --- a/src/mame/drivers/genpc.cpp +++ b/src/mame/drivers/genpc.cpp @@ -9,10 +9,10 @@ ***************************************************************************/ -#include "emu.h" -#include "includes/genpc.h" +#include "emu.h" +#include "machine/genpc.h" #include "cpu/nec/nec.h" #include "cpu/i86/i86.h" #include "bus/pc_kbd/keyboards.h" diff --git a/src/mame/drivers/ibmpc.cpp b/src/mame/drivers/ibmpc.cpp index 3df1c92edaf..a5b26b88854 100644 --- a/src/mame/drivers/ibmpc.cpp +++ b/src/mame/drivers/ibmpc.cpp @@ -259,7 +259,7 @@ XT U44 IBM.bin: IBM 5160 PC/XT Bank-selection decoding ROM (256x4 bit). Not mapp #include "cpu/i86/i86.h" #include "machine/ram.h" #include "bus/pc_kbd/keyboards.h" -#include "includes/genpc.h" +#include "machine/genpc.h" #include "softlist.h" class ibmpc_state : public driver_device diff --git a/src/mame/drivers/iskr103x.cpp b/src/mame/drivers/iskr103x.cpp index 84273344fb5..75749b27656 100644 --- a/src/mame/drivers/iskr103x.cpp +++ b/src/mame/drivers/iskr103x.cpp @@ -16,9 +16,7 @@ #include "emu.h" - -#include "includes/genpc.h" - +#include "machine/genpc.h" #include "cpu/i86/i86.h" #include "cpu/nec/nec.h" #include "bus/isa/xsu_cards.h" diff --git a/src/mame/drivers/m24.cpp b/src/mame/drivers/m24.cpp index 7e34eeaa16b..f3fd5372efe 100644 --- a/src/mame/drivers/m24.cpp +++ b/src/mame/drivers/m24.cpp @@ -1,5 +1,6 @@ // license:BSD-3-Clause // copyright-holders:Carl + #include "emu.h" #include "cpu/i86/i86.h" @@ -7,7 +8,7 @@ #include "machine/m24_kbd.h" #include "machine/m24_z8000.h" #include "machine/mm58274c.h" -#include "includes/genpc.h" +#include "machine/genpc.h" #include "formats/pc_dsk.h" #include "formats/naslite_dsk.h" #include "formats/m20_dsk.h" diff --git a/src/mame/drivers/pasogo.cpp b/src/mame/drivers/pasogo.cpp index 28e858e5b5b..dad0174a079 100644 --- a/src/mame/drivers/pasogo.cpp +++ b/src/mame/drivers/pasogo.cpp @@ -101,12 +101,13 @@ TODO: ******************************************************************************/ + #include "emu.h" #include "cpu/nec/nec.h" #include "bus/generic/slot.h" #include "bus/generic/carts.h" #include "machine/bankdev.h" -#include "includes/genpc.h" +#include "machine/genpc.h" #include "softlist.h" /* diff --git a/src/mame/drivers/pc.cpp b/src/mame/drivers/pc.cpp index 22f14676a86..0ab59558865 100644 --- a/src/mame/drivers/pc.cpp +++ b/src/mame/drivers/pc.cpp @@ -27,13 +27,13 @@ video HW too. ***************************************************************************/ -#include "emu.h" +#include "emu.h" +#include "machine/genpc.h" #include "cpu/i86/i86.h" #include "bus/isa/isa.h" #include "bus/isa/isa_cards.h" #include "bus/pc_kbd/keyboards.h" -#include "includes/genpc.h" #include "softlist.h" class pc_state : public driver_device diff --git a/src/mame/drivers/pcxt.cpp b/src/mame/drivers/pcxt.cpp index e99040f1991..5fd6f744a21 100644 --- a/src/mame/drivers/pcxt.cpp +++ b/src/mame/drivers/pcxt.cpp @@ -58,28 +58,19 @@ the main program is 9th October 1990. #include "emu.h" #include "cpu/i86/i86.h" -#include "machine/pit8253.h" -#include "machine/i8255.h" -#include "machine/am9517a.h" -#include "machine/pic8259.h" #include "sound/hc55516.h" -#include "sound/speaker.h" -#include "bus/isa/isa.h" -#include "bus/isa/cga.h" - +#include "machine/bankdev.h" +#include "machine/genpc.h" class pcxt_state : public driver_device { public: pcxt_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_pit8253(*this, "pit8253"), - m_pic8259_1(*this, "pic8259_1"), - m_dma8237_1(*this, "dma8237_1") , m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker") { } + m_mb(*this, "mb"), + m_bank(*this, "bank"){ } - int m_bank; int m_lastvalue; UINT8 m_disk_data[2]; UINT8 m_port_b_data; @@ -87,14 +78,6 @@ public: UINT8 m_wss2_data; UINT8 m_status; UINT8 m_clr_status; - int m_dma_channel; - UINT8 m_dma_offset[2][4]; - UINT8 m_at_pages[0x10]; - UINT8 m_pc_spkrdata, m_pit_out2; - - required_device m_pit8253; - required_device m_pic8259_1; - required_device m_dma8237_1; DECLARE_READ8_MEMBER(disk_iobank_r); DECLARE_WRITE8_MEMBER(disk_iobank_w); @@ -102,11 +85,6 @@ public: DECLARE_READ8_MEMBER(fdc765_data_r); DECLARE_WRITE8_MEMBER(fdc765_data_w); DECLARE_WRITE8_MEMBER(fdc_dor_w); - DECLARE_READ8_MEMBER(pc_dma_read_byte); - DECLARE_WRITE8_MEMBER(pc_dma_write_byte); - DECLARE_READ8_MEMBER(dma_page_select_r); - DECLARE_WRITE8_MEMBER(dma_page_select_w); - DECLARE_WRITE_LINE_MEMBER(ibm5150_pit8253_out2_changed); DECLARE_READ8_MEMBER(port_a_r); DECLARE_READ8_MEMBER(port_b_r); DECLARE_READ8_MEMBER(port_c_r); @@ -114,18 +92,11 @@ public: DECLARE_WRITE8_MEMBER(wss_1_w); DECLARE_WRITE8_MEMBER(wss_2_w); DECLARE_WRITE8_MEMBER(sys_reset_w); - DECLARE_WRITE_LINE_MEMBER(pc_dma_hrq_changed); - DECLARE_WRITE_LINE_MEMBER(pc_dack0_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack1_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack2_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack3_w); - DECLARE_DRIVER_INIT(tetriskr); - DECLARE_DRIVER_INIT(filetto); + virtual void machine_reset() override; - UINT8 pcxt_speaker_get_spk(); - void pcxt_speaker_set_spkrdata(UINT8 data); required_device m_maincpu; - required_device m_speaker; + required_device m_mb; + optional_device m_bank; }; @@ -246,7 +217,6 @@ UINT32 isa8_cga_tetriskr_device::screen_update(screen_device &screen, bitmap_rgb return 0; } - ROM_START( tetriskr_cga ) ROM_REGION( 0x2000, "gfx1",ROMREGION_ERASE00 ) /* gfx - 1bpp font*/ ROM_LOAD( "b-3.u36", 0x1800, 0x0800, CRC(1a636f9a) SHA1(a356cc57914d0c9b9127670b55d1f340e64b1ac9) ) @@ -299,63 +269,33 @@ WRITE8_MEMBER(pcxt_state::disk_iobank_w) sets the selected rom that appears in $C0000-$CFFFF */ - int newbank = 0; + int bank = 0; // printf("bank %d set to %02X\n", offset,data); if (data == 0xF0) { - newbank = 0; + bank = 0; } else { if((m_lastvalue == 0xF0) && (data == 0xF2)) - newbank = 0; + bank = 0; else if ((m_lastvalue == 0xF1) && (data == 0xF2)) - newbank = 1; + bank = 1; else if ((m_lastvalue == 0xF0) && (data == 0xF3)) - newbank = 2; + bank = 2; else if ((m_lastvalue == 0xF1) && (data == 0xF3)) - newbank = 3; + bank = 3; } -// printf("newbank = %d\n", newbank); - - if (newbank != m_bank) - { - m_bank = newbank; - membank("bank1")->set_base(memregion("game_prg")->base() + 0x10000 * m_bank ); - } + m_bank->set_bank(bank); m_lastvalue = data; m_disk_data[offset] = data; } -/********************************* -Pit8253 -*********************************/ - -// pc_speaker_get_spk, pc_speaker_set_spkrdata, and pc_speaker_set_input already exists in MESS, can the implementations be merged? -UINT8 pcxt_state::pcxt_speaker_get_spk() -{ - return m_pc_spkrdata & m_pit_out2; -} - -void pcxt_state::pcxt_speaker_set_spkrdata(UINT8 data) -{ - m_pc_spkrdata = data ? 1 : 0; - m_speaker->level_w(pcxt_speaker_get_spk()); -} - - -WRITE_LINE_MEMBER(pcxt_state::ibm5150_pit8253_out2_changed) -{ - m_pit_out2 = state ? 1 : 0; - m_speaker->level_w(pcxt_speaker_get_spk()); -} - - READ8_MEMBER(pcxt_state::port_a_r) { if(!(m_port_b_data & 0x80))//??? @@ -387,9 +327,9 @@ READ8_MEMBER(pcxt_state::port_c_r) { if ( m_port_b_data & 0x01 ) { - m_wss2_data = ( m_wss2_data & ~0x10 ) | ( m_pit_out2 ? 0x10 : 0x00 ); + m_wss2_data = ( m_wss2_data & ~0x10 ) | ( m_mb->m_pit_out2 ? 0x10 : 0x00 ); } - m_wss2_data = ( m_wss2_data & ~0x20 ) | ( m_pit_out2 ? 0x20 : 0x00 ); + m_wss2_data = ( m_wss2_data & ~0x20 ) | ( m_mb->m_pit_out2 ? 0x20 : 0x00 ); return m_wss2_data;//TODO } @@ -399,17 +339,11 @@ READ8_MEMBER(pcxt_state::port_c_r) /* The Korean Tetris uses it as a regular buzzer,probably the sound is all in there...*/ WRITE8_MEMBER(pcxt_state::port_b_w) { - /* PPI controller port B*/ - m_pit8253->write_gate2(BIT(data, 0)); - pcxt_speaker_set_spkrdata( data & 0x02 ); + m_mb->m_pit8253->write_gate2(BIT(data, 0)); + m_mb->pc_speaker_set_spkrdata(BIT(data, 1)); m_port_b_data = data; -// device_t *beep = machine().device("beep"); // device_t *cvsd = machine().device("cvsd"); // hc55516_digit_w(cvsd, data); -// popmessage("%02x\n",data); -// beep->beep_set_state(0); -// beep->beep_set_state(1); -// beep->beep_set_clock(m_port_b_data); } WRITE8_MEMBER(pcxt_state::wss_1_w) @@ -452,7 +386,7 @@ READ8_MEMBER(pcxt_state::fdc765_status_r) READ8_MEMBER(pcxt_state::fdc765_data_r) { m_status = (FDC_READ); - m_pic8259_1->ir6_w(0); + m_mb->m_pic8259->ir6_w(0); return 0xc0; } @@ -464,142 +398,45 @@ WRITE8_MEMBER(pcxt_state::fdc765_data_w) WRITE8_MEMBER(pcxt_state::fdc_dor_w) { - /* TODO: properly hook-up upd765 FDC there */ - m_pic8259_1->ir6_w(1); -} - -/****************** -DMA8237 Controller -******************/ - - -WRITE_LINE_MEMBER(pcxt_state::pc_dma_hrq_changed) -{ - m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); - - /* Assert HLDA */ - m_dma8237_1->hack_w( state ); -} - - -READ8_MEMBER(pcxt_state::pc_dma_read_byte) -{ - offs_t page_offset = (((offs_t) m_dma_offset[0][m_dma_channel]) << 16) - & 0xFF0000; - - return space.read_byte(page_offset + offset); -} - - -WRITE8_MEMBER(pcxt_state::pc_dma_write_byte) -{ - offs_t page_offset = (((offs_t) m_dma_offset[0][m_dma_channel]) << 16) - & 0xFF0000; - - space.write_byte(page_offset + offset, data); -} - -READ8_MEMBER(pcxt_state::dma_page_select_r) -{ - UINT8 data = m_at_pages[offset % 0x10]; - - switch(offset % 8) { - case 1: - data = m_dma_offset[(offset / 8) & 1][2]; - break; - case 2: - data = m_dma_offset[(offset / 8) & 1][3]; - break; - case 3: - data = m_dma_offset[(offset / 8) & 1][1]; - break; - case 7: - data = m_dma_offset[(offset / 8) & 1][0]; - break; - } - return data; -} - - -WRITE8_MEMBER(pcxt_state::dma_page_select_w) -{ - m_at_pages[offset % 0x10] = data; - - switch(offset % 8) { - case 1: - m_dma_offset[(offset / 8) & 1][2] = data; - break; - case 2: - m_dma_offset[(offset / 8) & 1][3] = data; - break; - case 3: - m_dma_offset[(offset / 8) & 1][1] = data; - break; - case 7: - m_dma_offset[(offset / 8) & 1][0] = data; - break; - } -} - -static void set_dma_channel(device_t *device, int channel, int state) -{ - pcxt_state *drvstate = device->machine().driver_data(); - if (!state) drvstate->m_dma_channel = channel; + m_mb->m_pic8259->ir6_w(1); } -WRITE_LINE_MEMBER(pcxt_state::pc_dack0_w){ set_dma_channel(m_dma8237_1, 0, state); } -WRITE_LINE_MEMBER(pcxt_state::pc_dack1_w){ set_dma_channel(m_dma8237_1, 1, state); } -WRITE_LINE_MEMBER(pcxt_state::pc_dack2_w){ set_dma_channel(m_dma8237_1, 2, state); } -WRITE_LINE_MEMBER(pcxt_state::pc_dack3_w){ set_dma_channel(m_dma8237_1, 3, state); } - -/****************** -8259 IRQ controller -******************/ - static ADDRESS_MAP_START( filetto_map, AS_PROGRAM, 8, pcxt_state ) - AM_RANGE(0x00000, 0x9ffff) AM_RAM //work RAM 640KB - AM_RANGE(0xa0000, 0xbffff) AM_RAM //CGA VRAM - AM_RANGE(0xc0000, 0xcffff) AM_ROMBANK("bank1") - AM_RANGE(0xd0000, 0xeffff) AM_NOP - AM_RANGE(0xf0000, 0xfffff) AM_ROM + AM_RANGE(0xc0000, 0xcffff) AM_DEVICE("bank", address_map_bank_device, amap8) + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END -static ADDRESS_MAP_START( pcxt_io_common, AS_IO, 8, pcxt_state ) +static ADDRESS_MAP_START( filetto_io, AS_IO, 8, pcxt_state ) ADDRESS_MAP_GLOBAL_MASK(0x3ff) - AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237_1", am9517a_device, read, write ) //8237 DMA Controller - AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259_1", pic8259_device, read, write ) //8259 Interrupt control - AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE("pit8253", pit8253_device, read, write) //8253 PIT AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) //PPI 8255 AM_RANGE(0x0064, 0x0066) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) //PPI 8255 - AM_RANGE(0x0080, 0x0087) AM_READWRITE(dma_page_select_r,dma_page_select_w) - AM_RANGE(0x0278, 0x027f) AM_RAM //printer (parallel) port latch - AM_RANGE(0x02f8, 0x02ff) AM_RAM //Modem port - AM_RANGE(0x0378, 0x037f) AM_RAM //printer (parallel) port - AM_RANGE(0x03bc, 0x03bf) AM_RAM //printer port + AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", pc_noppi_mb_device, map) +// AM_RANGE(0x0200, 0x020f) AM_RAM //game port + AM_RANGE(0x0201, 0x0201) AM_READ_PORT("COIN") //game port + AM_RANGE(0x0310, 0x0311) AM_READWRITE(disk_iobank_r,disk_iobank_w) //Prototyping card + AM_RANGE(0x0312, 0x0312) AM_READ_PORT("IN0") //Prototyping card,read only AM_RANGE(0x03f2, 0x03f2) AM_WRITE(fdc_dor_w) AM_RANGE(0x03f4, 0x03f4) AM_READ(fdc765_status_r) //765 Floppy Disk Controller (FDC) Status AM_RANGE(0x03f5, 0x03f5) AM_READWRITE(fdc765_data_r,fdc765_data_w)//FDC Data - AM_RANGE(0x03f8, 0x03ff) AM_RAM //rs232c (serial) port ADDRESS_MAP_END -static ADDRESS_MAP_START( filetto_io, AS_IO, 8, pcxt_state ) - ADDRESS_MAP_GLOBAL_MASK(0x3ff) - AM_IMPORT_FROM( pcxt_io_common ) -// AM_RANGE(0x0200, 0x020f) AM_RAM //game port - AM_RANGE(0x0201, 0x0201) AM_READ_PORT("COIN") //game port - AM_RANGE(0x0310, 0x0311) AM_READWRITE(disk_iobank_r,disk_iobank_w) //Prototyping card - AM_RANGE(0x0312, 0x0312) AM_READ_PORT("IN0") //Prototyping card,read only +static ADDRESS_MAP_START( tetriskr_map, AS_PROGRAM, 8, pcxt_state ) + AM_RANGE(0xf0000, 0xfffff) AM_ROM AM_REGION("bios", 0) ADDRESS_MAP_END static ADDRESS_MAP_START( tetriskr_io, AS_IO, 8, pcxt_state ) ADDRESS_MAP_GLOBAL_MASK(0x3ff) - AM_IMPORT_FROM( pcxt_io_common ) + AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", pc_noppi_mb_device, map) AM_RANGE(0x0200, 0x020f) AM_RAM //game port AM_RANGE(0x03c8, 0x03c8) AM_READ_PORT("IN0") AM_RANGE(0x03c9, 0x03c9) AM_READ_PORT("IN1") // AM_RANGE(0x03ce, 0x03ce) AM_READ_PORT("IN1") //read then discarded? ADDRESS_MAP_END +static ADDRESS_MAP_START( bank_map, AS_0, 8, pcxt_state ) + AM_RANGE(0x00000, 0x3ffff) AM_ROM AM_REGION("game_prg", 0) +ADDRESS_MAP_END + static INPUT_PORTS_START( filetto ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) @@ -679,33 +516,24 @@ INPUT_PORTS_END void pcxt_state::machine_reset() { - m_bank = -1; m_lastvalue = -1; - - m_pc_spkrdata = 0; - m_pit_out2 = 1; m_wss2_data = 0; - m_speaker->level_w(0); } -SLOT_INTERFACE_START( filetto_isa8_cards ) +static SLOT_INTERFACE_START( filetto_isa8_cards ) SLOT_INTERFACE_INTERNAL("filetto", ISA8_CGA_FILETTO) SLOT_INTERFACE_INTERNAL("tetriskr", ISA8_CGA_TETRISKR) SLOT_INTERFACE_END -static MACHINE_CONFIG_FRAGMENT(pcxt) +static MACHINE_CONFIG_START( filetto, pcxt_state ) MCFG_CPU_ADD("maincpu", I8088, XTAL_14_31818MHz/3) MCFG_CPU_PROGRAM_MAP(filetto_map) MCFG_CPU_IO_MAP(filetto_io) - MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb) + MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb) + MCFG_PCNOPPI_MOTHERBOARD_ADD("mb","maincpu") + MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", filetto_isa8_cards, "filetto", true) - MCFG_DEVICE_ADD("pit8253", PIT8253, 0) - MCFG_PIT8253_CLK0(XTAL_14_31818MHz/12) /* heartbeat IRQ */ - MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic8259_1", pic8259_device, ir0_w)) - MCFG_PIT8253_CLK1(XTAL_14_31818MHz/12) /* dram refresh */ - MCFG_PIT8253_CLK2(XTAL_14_31818MHz/12) /* pio port c pin 4, and speaker polling enough */ - MCFG_PIT8253_OUT2_HANDLER(WRITELINE(pcxt_state, ibm5150_pit8253_out2_changed)) MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0) MCFG_I8255_IN_PORTA_CB(READ8(pcxt_state, port_a_r)) @@ -718,66 +546,41 @@ static MACHINE_CONFIG_FRAGMENT(pcxt) MCFG_I8255_OUT_PORTA_CB(WRITE8(pcxt_state, wss_2_w)) MCFG_I8255_OUT_PORTA_CB(WRITE8(pcxt_state, sys_reset_w)) - MCFG_DEVICE_ADD("dma8237_1", AM9517A, XTAL_14_31818MHz/3) - MCFG_I8237_OUT_HREQ_CB(WRITELINE(pcxt_state, pc_dma_hrq_changed)) - MCFG_I8237_IN_MEMR_CB(READ8(pcxt_state, pc_dma_read_byte)) - MCFG_I8237_OUT_MEMW_CB(WRITE8(pcxt_state, pc_dma_write_byte)) - MCFG_I8237_OUT_DACK_0_CB(WRITELINE(pcxt_state, pc_dack0_w)) - MCFG_I8237_OUT_DACK_1_CB(WRITELINE(pcxt_state, pc_dack1_w)) - MCFG_I8237_OUT_DACK_2_CB(WRITELINE(pcxt_state, pc_dack2_w)) - MCFG_I8237_OUT_DACK_3_CB(WRITELINE(pcxt_state, pc_dack3_w)) - - MCFG_PIC8259_ADD( "pic8259_1", INPUTLINE("maincpu", 0), VCC, NULL ) - - MCFG_DEVICE_ADD("isa", ISA8, 0) - MCFG_ISA8_CPU(":maincpu") - MCFG_ISA_OUT_IRQ2_CB(DEVWRITELINE("pic8259_1", pic8259_device, ir2_w)) - MCFG_ISA_OUT_IRQ3_CB(DEVWRITELINE("pic8259_1", pic8259_device, ir3_w)) - MCFG_ISA_OUT_IRQ4_CB(DEVWRITELINE("pic8259_1", pic8259_device, ir4_w)) - MCFG_ISA_OUT_IRQ5_CB(DEVWRITELINE("pic8259_1", pic8259_device, ir5_w)) - MCFG_ISA_OUT_IRQ6_CB(DEVWRITELINE("pic8259_1", pic8259_device, ir6_w)) - MCFG_ISA_OUT_IRQ7_CB(DEVWRITELINE("pic8259_1", pic8259_device, ir7_w)) - MCFG_ISA_OUT_DRQ1_CB(DEVWRITELINE("dma8237_1", am9517a_device, dreq1_w)) - MCFG_ISA_OUT_DRQ2_CB(DEVWRITELINE("dma8237_1", am9517a_device, dreq2_w)) - MCFG_ISA_OUT_DRQ3_CB(DEVWRITELINE("dma8237_1", am9517a_device, dreq3_w)) - - /*Sound Hardware*/ - MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("voice", HC55516, 8000000/4)//8923S-UM5100 is a HC55536 with ROM hook-up - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) - -// PC "buzzer" sound - MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) -MACHINE_CONFIG_END - -static MACHINE_CONFIG_START( filetto, pcxt_state ) - MCFG_FRAGMENT_ADD( pcxt ) - MCFG_ISA8_SLOT_ADD("isa", "isa1", filetto_isa8_cards, "filetto", true) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mb:mono", 0.60) + MCFG_RAM_ADD(RAM_TAG) + MCFG_RAM_DEFAULT_SIZE("640K") + + MCFG_DEVICE_ADD("bank", ADDRESS_MAP_BANK, 0) + MCFG_DEVICE_PROGRAM_MAP(bank_map) + MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE) + MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8) + MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(18) + MCFG_ADDRESS_MAP_BANK_STRIDE(0x10000) MACHINE_CONFIG_END static MACHINE_CONFIG_START( tetriskr, pcxt_state ) - MCFG_FRAGMENT_ADD( pcxt ) - - MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_ADD("maincpu", I8088, XTAL_14_31818MHz/3) + MCFG_CPU_PROGRAM_MAP(tetriskr_map) MCFG_CPU_IO_MAP(tetriskr_io) + MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb) + MCFG_PCNOPPI_MOTHERBOARD_ADD("mb","maincpu") - MCFG_ISA8_SLOT_ADD("isa", "isa1", filetto_isa8_cards, "tetriskr", true) - - MCFG_DEVICE_REMOVE("voice") + MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", filetto_isa8_cards, "tetriskr", true) + MCFG_RAM_ADD(RAM_TAG) + MCFG_RAM_DEFAULT_SIZE("640K") MACHINE_CONFIG_END ROM_START( filetto ) - ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD("u49.bin", 0xfc000, 0x2000, CRC(1be6948a) SHA1(9c433f63d347c211ee4663f133e8417221bc4bf0)) - ROM_RELOAD( 0xf8000, 0x2000 ) - ROM_RELOAD( 0xf4000, 0x2000 ) - ROM_RELOAD( 0xf0000, 0x2000 ) - ROM_LOAD("u55.bin", 0xfe000, 0x2000, CRC(1e455ed7) SHA1(786d18ce0ab1af45fc538a2300853e497488f0d4) ) - ROM_RELOAD( 0xfa000, 0x2000 ) - ROM_RELOAD( 0xf6000, 0x2000 ) - ROM_RELOAD( 0xf2000, 0x2000 ) + ROM_REGION( 0x10000, "bios", 0 ) + ROM_LOAD("u49.bin", 0xc000, 0x2000, CRC(1be6948a) SHA1(9c433f63d347c211ee4663f133e8417221bc4bf0)) + ROM_RELOAD( 0x8000, 0x2000 ) + ROM_RELOAD( 0x4000, 0x2000 ) + ROM_RELOAD( 0x0000, 0x2000 ) + ROM_LOAD("u55.bin", 0xe000, 0x2000, CRC(1e455ed7) SHA1(786d18ce0ab1af45fc538a2300853e497488f0d4) ) + ROM_RELOAD( 0xa000, 0x2000 ) + ROM_RELOAD( 0x6000, 0x2000 ) + ROM_RELOAD( 0x2000, 0x2000 ) ROM_REGION( 0x40000, "game_prg", 0 ) // program data ROM_LOAD( "m0.u1", 0x00000, 0x10000, CRC(2408289d) SHA1(eafc144a557a79b58bcb48545cb9c9778e61fcd3) ) @@ -791,19 +594,9 @@ ROM_START( filetto ) ROM_END ROM_START( tetriskr ) - ROM_REGION( 0x100000, "maincpu", 0 ) /* code */ - ROM_LOAD( "b-10.u10", 0xf0000, 0x10000, CRC(efc2a0f6) SHA1(5f0f1e90237bee9b78184035a32055b059a91eb3) ) + ROM_REGION( 0x10000, "bios", 0 ) /* code */ + ROM_LOAD( "b-10.u10", 0x0000, 0x10000, CRC(efc2a0f6) SHA1(5f0f1e90237bee9b78184035a32055b059a91eb3) ) ROM_END -DRIVER_INIT_MEMBER(pcxt_state,filetto) -{ - //... -} - -DRIVER_INIT_MEMBER(pcxt_state,tetriskr) -{ - //... -} - -GAME( 1990, filetto, 0, filetto, filetto, pcxt_state, filetto, ROT0, "Novarmatic", "Filetto (v1.05 901009)",MACHINE_IMPERFECT_SOUND ) -GAME( 1988?,tetriskr, 0, tetriskr, tetriskr, pcxt_state, tetriskr, ROT0, "bootleg", "Tetris (bootleg of Mirrorsoft PC-XT Tetris version)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) +GAME( 1990, filetto, 0, filetto, filetto, driver_device, 0, ROT0, "Novarmatic", "Filetto (v1.05 901009)",MACHINE_IMPERFECT_SOUND ) +GAME( 1988?,tetriskr, 0, tetriskr, tetriskr, driver_device, 0, ROT0, "bootleg", "Tetris (bootleg of Mirrorsoft PC-XT Tetris version)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/tandy1t.cpp b/src/mame/drivers/tandy1t.cpp index cf1aabfc0ed..8696eeff89c 100644 --- a/src/mame/drivers/tandy1t.cpp +++ b/src/mame/drivers/tandy1t.cpp @@ -32,7 +32,7 @@ Tandy 1000 (80386) variations: 1000RSX/1000RSX-HD 1M-9M RAM 25.0/8.0 MHz v01.10.00 */ #include "emu.h" -#include "includes/genpc.h" +#include "machine/genpc.h" #include "machine/pckeybrd.h" #include "machine/nvram.h" #include "machine/pc_fdc.h" diff --git a/src/mame/includes/ec184x.h b/src/mame/includes/ec184x.h index 7921bf5b97e..268fbeffe86 100644 --- a/src/mame/includes/ec184x.h +++ b/src/mame/includes/ec184x.h @@ -9,7 +9,7 @@ #ifndef EC184X_H_ #define EC184X_H_ -#include "includes/genpc.h" +#include "machine/genpc.h" #define MCFG_EC1841_MOTHERBOARD_ADD(_tag, _cputag) \ MCFG_DEVICE_ADD(_tag, EC1841_MOTHERBOARD, 0) \ diff --git a/src/mame/includes/genpc.h b/src/mame/includes/genpc.h deleted file mode 100644 index 13f00e8eac2..00000000000 --- a/src/mame/includes/genpc.h +++ /dev/null @@ -1,195 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol, Miodrag Milanovic -/***************************************************************************** - * - * includes/pc.h - * - ****************************************************************************/ - -#ifndef GENPC_H_ -#define GENPC_H_ - -#include "machine/ins8250.h" -#include "machine/i8255.h" -#include "machine/am9517a.h" -#include "bus/isa/isa.h" -#include "bus/isa/isa_cards.h" -#include "bus/pc_kbd/pc_kbdc.h" -#include "machine/pic8259.h" -#include "machine/pit8253.h" -#include "sound/speaker.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" - -#define MCFG_IBM5160_MOTHERBOARD_ADD(_tag, _cputag) \ - MCFG_DEVICE_ADD(_tag, IBM5160_MOTHERBOARD, 0) \ - ibm5160_mb_device::static_set_cputag(*device, _cputag); -// ======================> ibm5160_mb_device -class ibm5160_mb_device : public device_t -{ -public: - // construction/destruction - ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - // inline configuration - static void static_set_cputag(device_t &device, const char *tag); - - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - virtual ioport_constructor device_input_ports() const override; - - DECLARE_ADDRESS_MAP(map, 8); -protected: - // device-level overrides - virtual void device_start() override; - virtual void device_reset() override; -public: - required_device m_maincpu; - required_device m_pic8259; - required_device m_dma8237; - required_device m_pit8253; - optional_device m_ppi8255; - required_device m_speaker; - required_device m_isabus; - optional_device m_pc_kbdc; - required_device m_ram; - - /* U73 is an LS74 - dual flip flop */ - /* Q2 is set by OUT1 from the 8253 and goes to DRQ1 on the 8237 */ - UINT8 m_u73_q2; - UINT8 m_out1; - int m_dma_channel; - UINT8 m_dma_offset[4]; - UINT8 m_pc_spkrdata; - UINT8 m_pit_out2; - bool m_cur_eop; - - UINT8 m_nmi_enabled; - - int m_ppi_portc_switch_high; - int m_ppi_speaker; - int m_ppi_keyboard_clear; - UINT8 m_ppi_keyb_clock; - UINT8 m_ppi_portb; - UINT8 m_ppi_clock_signal; - UINT8 m_ppi_data_signal; - UINT8 m_ppi_shift_register; - UINT8 m_ppi_shift_enable; - - // interface to the keyboard - DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); - DECLARE_WRITE_LINE_MEMBER( keyboard_data_w ); - - DECLARE_READ8_MEMBER ( pc_ppi_porta_r ); - DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); - DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); - - DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out1_changed ); - DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out2_changed ); - - DECLARE_WRITE_LINE_MEMBER( pc_dma_hrq_changed ); - DECLARE_WRITE_LINE_MEMBER( pc_dma8237_out_eop ); - DECLARE_READ8_MEMBER( pc_dma_read_byte ); - DECLARE_WRITE8_MEMBER( pc_dma_write_byte ); - DECLARE_READ8_MEMBER( pc_dma8237_1_dack_r ); - DECLARE_READ8_MEMBER( pc_dma8237_2_dack_r ); - DECLARE_READ8_MEMBER( pc_dma8237_3_dack_r ); - DECLARE_WRITE8_MEMBER( pc_dma8237_1_dack_w ); - DECLARE_WRITE8_MEMBER( pc_dma8237_2_dack_w ); - DECLARE_WRITE8_MEMBER( pc_dma8237_3_dack_w ); - DECLARE_WRITE8_MEMBER( pc_dma8237_0_dack_w ); - DECLARE_WRITE_LINE_MEMBER( pc_dack0_w ); - DECLARE_WRITE_LINE_MEMBER( pc_dack1_w ); - DECLARE_WRITE_LINE_MEMBER( pc_dack2_w ); - DECLARE_WRITE_LINE_MEMBER( pc_dack3_w ); - - DECLARE_WRITE_LINE_MEMBER( pc_speaker_set_spkrdata ); - - DECLARE_WRITE8_MEMBER(pc_page_w); - DECLARE_WRITE8_MEMBER(nmi_enable_w); - - const char *m_cputag; - -private: - void pc_select_dma_channel(int channel, bool state); -}; - - -// device type definition -extern const device_type IBM5160_MOTHERBOARD; - - -#define MCFG_IBM5150_MOTHERBOARD_ADD(_tag, _cputag) \ - MCFG_DEVICE_ADD(_tag, IBM5150_MOTHERBOARD, 0) \ - ibm5150_mb_device::static_set_cputag(*device, _cputag); - -// ======================> ibm5150_mb_device -class ibm5150_mb_device : public ibm5160_mb_device -{ -public: - // construction/destruction - ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - - DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); - -protected: - // device-level overrides - - required_device m_cassette; -public: - DECLARE_READ8_MEMBER ( pc_ppi_porta_r ); - DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); - DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); -}; - - -// device type definition -extern const device_type IBM5150_MOTHERBOARD; - - -#define MCFG_EC1841_MOTHERBOARD_ADD(_tag, _cputag) \ - MCFG_DEVICE_ADD(_tag, EC1841_MOTHERBOARD, 0) \ - ec1841_mb_device::static_set_cputag(*device, _cputag); - -class ec1841_mb_device : public ibm5160_mb_device -{ -public: - // construction/destruction - ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const override; - virtual ioport_constructor device_input_ports() const override; - virtual void device_start() override; - -public: - DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); - DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); - - DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); -}; - -extern const device_type EC1841_MOTHERBOARD; - -#define MCFG_PCNOPPI_MOTHERBOARD_ADD(_tag, _cputag) \ - MCFG_DEVICE_ADD(_tag, PCNOPPI_MOTHERBOARD, 0) \ - pc_noppi_mb_device::static_set_cputag(*device, _cputag); - -class pc_noppi_mb_device : public ibm5160_mb_device -{ -public: - // construction/destruction - pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - DECLARE_ADDRESS_MAP(map, 8); - - virtual machine_config_constructor device_mconfig_additions() const override; - virtual ioport_constructor device_input_ports() const override; -protected: -}; - -extern const device_type PCNOPPI_MOTHERBOARD; - -#endif /* GENPC_H_ */ diff --git a/src/mame/machine/genpc.cpp b/src/mame/machine/genpc.cpp deleted file mode 100644 index a749180fd3a..00000000000 --- a/src/mame/machine/genpc.cpp +++ /dev/null @@ -1,922 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol, Miodrag Milanovic -/*************************************************************************** - - machine/genpc.c - - -***************************************************************************/ - -#include "emu.h" -#include "includes/genpc.h" - -#include "machine/i8255.h" -#include "machine/pic8259.h" -#include "machine/pit8253.h" -#include "sound/speaker.h" -#include "machine/ram.h" -#include "imagedev/cassette.h" - -#define VERBOSE_PIO 0 /* PIO (keyboard controller) */ - -#define PIO_LOG(N,M,A) \ - do { \ - if(VERBOSE_PIO>=N) \ - { \ - if( M ) \ - logerror("%11.6f: %-24s",machine().time().as_double(),(char*)M ); \ - logerror A; \ - } \ - } while (0) - - -/************************************************************************* - * - * PC DMA stuff - * - *************************************************************************/ - -WRITE8_MEMBER( ibm5160_mb_device::pc_page_w) -{ - switch(offset % 4) - { - case 1: - m_dma_offset[2] = data; - break; - case 2: - m_dma_offset[3] = data; - break; - case 3: - m_dma_offset[0] = m_dma_offset[1] = data; - break; - } -} - - -WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dma_hrq_changed ) -{ - m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); - - /* Assert HLDA */ - m_dma8237->hack_w(state); -} - - -READ8_MEMBER( ibm5160_mb_device::pc_dma_read_byte ) -{ - if(m_dma_channel == -1) - return 0xff; - address_space &spaceio = m_maincpu->space(AS_PROGRAM); - offs_t page_offset = (((offs_t) m_dma_offset[m_dma_channel]) << 16) & 0x0F0000; - return spaceio.read_byte( page_offset + offset); -} - - -WRITE8_MEMBER( ibm5160_mb_device::pc_dma_write_byte ) -{ - if(m_dma_channel == -1) - return; - address_space &spaceio = m_maincpu->space(AS_PROGRAM); - offs_t page_offset = (((offs_t) m_dma_offset[m_dma_channel]) << 16) & 0x0F0000; - - spaceio.write_byte( page_offset + offset, data); -} - - -READ8_MEMBER( ibm5160_mb_device::pc_dma8237_1_dack_r ) -{ - return m_isabus->dack_r(1); -} - -READ8_MEMBER( ibm5160_mb_device::pc_dma8237_2_dack_r ) -{ - return m_isabus->dack_r(2); -} - - -READ8_MEMBER( ibm5160_mb_device::pc_dma8237_3_dack_r ) -{ - return m_isabus->dack_r(3); -} - - -WRITE8_MEMBER( ibm5160_mb_device::pc_dma8237_1_dack_w ) -{ - m_isabus->dack_w(1,data); -} - -WRITE8_MEMBER( ibm5160_mb_device::pc_dma8237_2_dack_w ) -{ - m_isabus->dack_w(2,data); -} - - -WRITE8_MEMBER( ibm5160_mb_device::pc_dma8237_3_dack_w ) -{ - m_isabus->dack_w(3,data); -} - - -WRITE8_MEMBER( ibm5160_mb_device::pc_dma8237_0_dack_w ) -{ - m_u73_q2 = 0; - m_dma8237->dreq0_w( m_u73_q2 ); -} - - -WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dma8237_out_eop ) -{ - m_cur_eop = state == ASSERT_LINE; - if(m_dma_channel != -1 && m_cur_eop) - m_isabus->eop_w(m_dma_channel, m_cur_eop ? ASSERT_LINE : CLEAR_LINE ); -} - -void ibm5160_mb_device::pc_select_dma_channel(int channel, bool state) -{ - if(!state) { - m_dma_channel = channel; - if(m_cur_eop) - m_isabus->eop_w(channel, ASSERT_LINE ); - - } else if(m_dma_channel == channel) { - m_dma_channel = -1; - if(m_cur_eop) - m_isabus->eop_w(channel, CLEAR_LINE ); - } -} - -WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dack0_w ) { pc_select_dma_channel(0, state); } -WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dack1_w ) { pc_select_dma_channel(1, state); } -WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dack2_w ) { pc_select_dma_channel(2, state); } -WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dack3_w ) { pc_select_dma_channel(3, state); } - -/************************************************************* - * - * pic8259 configuration - * - *************************************************************/ - -WRITE_LINE_MEMBER(ibm5160_mb_device::pc_speaker_set_spkrdata) -{ - m_pc_spkrdata = state ? 1 : 0; - m_speaker->level_w(m_pc_spkrdata & m_pit_out2); -} - - -/************************************************************* - * - * pit8253 configuration - * - *************************************************************/ - -WRITE_LINE_MEMBER( ibm5160_mb_device::pc_pit8253_out1_changed ) -{ - /* Trigger DMA channel #0 */ - if ( m_out1 == 0 && state == 1 && m_u73_q2 == 0 ) - { - m_u73_q2 = 1; - m_dma8237->dreq0_w( m_u73_q2 ); - } - m_out1 = state; -} - - -WRITE_LINE_MEMBER( ibm5160_mb_device::pc_pit8253_out2_changed ) -{ - m_pit_out2 = state ? 1 : 0; - m_speaker->level_w(m_pc_spkrdata & m_pit_out2); -} - - -/********************************************************** - * - * PPI8255 interface - * - * - * PORT A (input) - * - * Directly attached to shift register which stores data - * received from the keyboard. - * - * PORT B (output) - * 0 - PB0 - TIM2GATESPK - Enable/disable counting on timer 2 of the 8253 - * 1 - PB1 - SPKRDATA - Speaker data - * 2 - PB2 - - Enable receiving data from the keyboard when keyboard is not locked. - * 3 - PB3 - - Dipsswitch set selector - * 4 - PB4 - ENBRAMPCK - Enable ram parity check - * 5 - PB5 - ENABLEI/OCK - Enable expansion I/O check - * 6 - PB6 - - Connected to keyboard clock signal - * 0 = ignore keyboard signals - * 1 = accept keyboard signals - * 7 - PB7 - - Clear/disable shift register and IRQ1 line - * 0 = normal operation - * 1 = clear and disable shift register and clear IRQ1 flip flop - * - * PORT C - * 0 - PC0 - - Dipswitch 0/4 SW1 - * 1 - PC1 - - Dipswitch 1/5 SW1 - * 2 - PC2 - - Dipswitch 2/6 SW1 - * 3 - PC3 - - Dipswitch 3/7 SW1 - * 4 - PC4 - SPK - Speaker/cassette data - * 5 - PC5 - I/OCHCK - Expansion I/O check result - * 6 - PC6 - T/C2OUT - Output of 8253 timer 2 - * 7 - PC7 - PCK - Parity check result - * - * IBM5150 SW1: - * 0 - OFF - One or more floppy drives - * ON - Diskless operation - * 1 - OFF - 8087 present - * ON - No 8087 present - * 2+3 - Used to determine on board memory configuration - * OFF OFF - 64KB - * ON OFF - 48KB - * OFF ON - 32KB - * ON ON - 16KB - * 4+5 - Used to select display - * OFF OFF - Monochrome - * ON OFF - CGA, 80 column - * OFF ON - CGA, 40 column - * ON ON - EGA/VGA display - * 6+7 - Used to select number of disk drives - * OFF OFF - four disk drives - * ON OFF - three disk drives - * OFF ON - two disk drives - * ON ON - one disk drive - * - **********************************************************/ -WRITE_LINE_MEMBER( ibm5150_mb_device::keyboard_clock_w ) -{ - if (!m_ppi_keyboard_clear && !state && !m_ppi_shift_enable) - { - m_ppi_shift_enable = m_ppi_shift_register & 0x01; - - m_ppi_shift_register >>= 1; - m_ppi_shift_register |= m_ppi_data_signal << 7; - - m_pic8259->ir1_w(m_ppi_shift_enable); - m_pc_kbdc->data_write_from_mb(!m_ppi_shift_enable); - } -} - -WRITE_LINE_MEMBER( ec1841_mb_device::keyboard_clock_w ) -{ - if (!m_ppi_keyboard_clear && !state && !m_ppi_shift_enable) - { - m_ppi_shift_enable = m_ppi_shift_register & 0x01; - - m_ppi_shift_register >>= 1; - m_ppi_shift_register |= m_ppi_data_signal << 7; - - m_pic8259->ir1_w(m_ppi_shift_enable); - m_pc_kbdc->data_write_from_mb(!m_ppi_shift_enable); - } -} - -WRITE_LINE_MEMBER( ibm5160_mb_device::keyboard_clock_w ) -{ - if (!m_ppi_keyboard_clear && !state && !m_ppi_shift_enable) - { - m_ppi_shift_enable = m_ppi_shift_register & 0x01; - - m_ppi_shift_register >>= 1; - m_ppi_shift_register |= m_ppi_data_signal << 7; - - m_pic8259->ir1_w(m_ppi_shift_enable); - m_pc_kbdc->data_write_from_mb(!BIT(m_ppi_portb, 2) && !m_ppi_shift_enable); - } -} - - -WRITE_LINE_MEMBER( ibm5160_mb_device::keyboard_data_w ) -{ - m_ppi_data_signal = state; -} - -READ8_MEMBER (ibm5160_mb_device::pc_ppi_porta_r) -{ - int data = 0xFF; - /* KB port A */ - if (m_ppi_keyboard_clear) - { - /* 0 0 - no floppy drives - * 1 Not used - * 2-3 The number of memory banks on the system board - * 4-5 Display mode - * 11 = monochrome - * 10 - color 80x25 - * 01 - color 40x25 - * 6-7 The number of floppy disk drives - */ - data = ioport("DSW0")->read(); - } - else - { - data = m_ppi_shift_register; - } - PIO_LOG(1,"PIO_A_r",("$%02x\n", data)); - return data; -} - - -READ8_MEMBER ( ibm5160_mb_device::pc_ppi_portc_r ) -{ - int data=0xff; - - data&=~0x80; // no parity error - data&=~0x40; // no error on expansion board - /* KB port C: equipment flags */ - if (m_ppi_portc_switch_high) - { - /* read hi nibble of S2 */ - data = (data & 0xf0) | ((ioport("DSW0")->read() >> 4) & 0x0f); - PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data)); - } - else - { - /* read lo nibble of S2 */ - data = (data & 0xf0) | (ioport("DSW0")->read() & 0x0f); - PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data)); - } - - if ( m_ppi_portb & 0x01 ) - { - data = ( data & ~0x10 ) | ( m_pit_out2 ? 0x10 : 0x00 ); - } - data = ( data & ~0x20 ) | ( m_pit_out2 ? 0x20 : 0x00 ); - - return data; -} - - -WRITE8_MEMBER( ibm5160_mb_device::pc_ppi_portb_w ) -{ - /* PPI controller port B*/ - m_ppi_portb = data; - m_ppi_portc_switch_high = data & 0x08; - m_ppi_keyboard_clear = data & 0x80; - m_ppi_keyb_clock = data & 0x40; - m_pit8253->write_gate2(BIT(data, 0)); - pc_speaker_set_spkrdata( data & 0x02 ); - - /* If PB7 is set clear the shift register and reset the IRQ line */ - if ( m_ppi_keyboard_clear ) - { - m_ppi_shift_register = 0; - m_ppi_shift_enable = 0; - m_pic8259->ir1_w(m_ppi_shift_enable); - } - - m_pc_kbdc->data_write_from_mb(!BIT(m_ppi_portb, 2) && !m_ppi_shift_enable); - m_ppi_clock_signal = ( m_ppi_keyb_clock ) ? 1 : 0; - m_pc_kbdc->clock_write_from_mb(m_ppi_clock_signal); -} - - -/********************************************************** - * - * NMI handling - * - **********************************************************/ - -WRITE8_MEMBER( ibm5160_mb_device::nmi_enable_w ) -{ - m_nmi_enabled = BIT(data,7); - m_isabus->set_nmi_state(m_nmi_enabled); -} -//************************************************************************** -// GLOBAL VARIABLES -//************************************************************************** - -const device_type IBM5160_MOTHERBOARD = &device_creator; - -//************************************************************************** -// DEVICE CONFIGURATION -//************************************************************************** - -static MACHINE_CONFIG_FRAGMENT( ibm5160_mb_config ) - MCFG_DEVICE_ADD("pit8253", PIT8253, 0) - MCFG_PIT8253_CLK0(XTAL_14_31818MHz/12) /* heartbeat IRQ */ - MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir0_w)) - MCFG_PIT8253_CLK1(XTAL_14_31818MHz/12) /* dram refresh */ - MCFG_PIT8253_OUT1_HANDLER(WRITELINE(ibm5160_mb_device, pc_pit8253_out1_changed)) - MCFG_PIT8253_CLK2(XTAL_14_31818MHz/12) /* pio port c pin 4, and speaker polling enough */ - MCFG_PIT8253_OUT2_HANDLER(WRITELINE(ibm5160_mb_device, pc_pit8253_out2_changed)) - - MCFG_DEVICE_ADD( "dma8237", AM9517A, XTAL_14_31818MHz/3 ) - MCFG_I8237_OUT_HREQ_CB(WRITELINE(ibm5160_mb_device, pc_dma_hrq_changed)) - MCFG_I8237_OUT_EOP_CB(WRITELINE(ibm5160_mb_device, pc_dma8237_out_eop)) - MCFG_I8237_IN_MEMR_CB(READ8(ibm5160_mb_device, pc_dma_read_byte)) - MCFG_I8237_OUT_MEMW_CB(WRITE8(ibm5160_mb_device, pc_dma_write_byte)) - MCFG_I8237_IN_IOR_1_CB(READ8(ibm5160_mb_device, pc_dma8237_1_dack_r)) - MCFG_I8237_IN_IOR_2_CB(READ8(ibm5160_mb_device, pc_dma8237_2_dack_r)) - MCFG_I8237_IN_IOR_3_CB(READ8(ibm5160_mb_device, pc_dma8237_3_dack_r)) - MCFG_I8237_OUT_IOW_0_CB(WRITE8(ibm5160_mb_device, pc_dma8237_0_dack_w)) - MCFG_I8237_OUT_IOW_1_CB(WRITE8(ibm5160_mb_device, pc_dma8237_1_dack_w)) - MCFG_I8237_OUT_IOW_2_CB(WRITE8(ibm5160_mb_device, pc_dma8237_2_dack_w)) - MCFG_I8237_OUT_IOW_3_CB(WRITE8(ibm5160_mb_device, pc_dma8237_3_dack_w)) - MCFG_I8237_OUT_DACK_0_CB(WRITELINE(ibm5160_mb_device, pc_dack0_w)) - MCFG_I8237_OUT_DACK_1_CB(WRITELINE(ibm5160_mb_device, pc_dack1_w)) - MCFG_I8237_OUT_DACK_2_CB(WRITELINE(ibm5160_mb_device, pc_dack2_w)) - MCFG_I8237_OUT_DACK_3_CB(WRITELINE(ibm5160_mb_device, pc_dack3_w)) - - MCFG_PIC8259_ADD( "pic8259", INPUTLINE(":maincpu", 0), VCC, NULL ) - - MCFG_DEVICE_ADD("ppi8255", I8255A, 0) - MCFG_I8255_IN_PORTA_CB(READ8(ibm5160_mb_device, pc_ppi_porta_r)) - MCFG_I8255_OUT_PORTB_CB(WRITE8(ibm5160_mb_device, pc_ppi_portb_w)) - MCFG_I8255_IN_PORTC_CB(READ8(ibm5160_mb_device, pc_ppi_portc_r)) - - MCFG_DEVICE_ADD("isa", ISA8, 0) - MCFG_ISA8_CPU(":maincpu") - MCFG_ISA_OUT_IRQ2_CB(DEVWRITELINE("pic8259", pic8259_device, ir2_w)) - MCFG_ISA_OUT_IRQ3_CB(DEVWRITELINE("pic8259", pic8259_device, ir3_w)) - MCFG_ISA_OUT_IRQ4_CB(DEVWRITELINE("pic8259", pic8259_device, ir4_w)) - MCFG_ISA_OUT_IRQ5_CB(DEVWRITELINE("pic8259", pic8259_device, ir5_w)) - MCFG_ISA_OUT_IRQ6_CB(DEVWRITELINE("pic8259", pic8259_device, ir6_w)) - MCFG_ISA_OUT_IRQ7_CB(DEVWRITELINE("pic8259", pic8259_device, ir7_w)) - MCFG_ISA_OUT_DRQ1_CB(DEVWRITELINE("dma8237", am9517a_device, dreq1_w)) - MCFG_ISA_OUT_DRQ2_CB(DEVWRITELINE("dma8237", am9517a_device, dreq2_w)) - MCFG_ISA_OUT_DRQ3_CB(DEVWRITELINE("dma8237", am9517a_device, dreq3_w)) - - MCFG_DEVICE_ADD("pc_kbdc", PC_KBDC, 0) - MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ibm5160_mb_device, keyboard_clock_w)) - MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE(ibm5160_mb_device, keyboard_data_w)) - - /* sound hardware */ - MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) -MACHINE_CONFIG_END - - -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor ibm5160_mb_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( ibm5160_mb_config ); -} - - -static INPUT_PORTS_START( ibm5160_mb ) - PORT_START("DSW0") /* IN1 */ - PORT_DIPNAME( 0xc0, 0x40, "Number of floppy drives") - PORT_DIPSETTING( 0x00, "1" ) - PORT_DIPSETTING( 0x40, "2" ) - PORT_DIPSETTING( 0x80, "3" ) - PORT_DIPSETTING( 0xc0, "4" ) - PORT_DIPNAME( 0x30, 0x30, "Graphics adapter") - PORT_DIPSETTING( 0x00, "EGA/VGA" ) - PORT_DIPSETTING( 0x10, "Color 40x25" ) - PORT_DIPSETTING( 0x20, "Color 80x25" ) - PORT_DIPSETTING( 0x30, "Monochrome" ) - PORT_DIPNAME( 0x0c, 0x0c, "RAM banks") - PORT_DIPSETTING( 0x00, "1 - 16/ 64/256K" ) - PORT_DIPSETTING( 0x04, "2 - 32/128/512K" ) - PORT_DIPSETTING( 0x08, "3 - 48/192/576K" ) - PORT_DIPSETTING( 0x0c, "4 - 64/256/640K" ) - PORT_DIPNAME( 0x02, 0x00, "8087 installed") - PORT_DIPSETTING( 0x00, DEF_STR(No) ) - PORT_DIPSETTING( 0x02, DEF_STR(Yes) ) - PORT_DIPNAME( 0x01, 0x01, "Boot from floppy") - PORT_DIPSETTING( 0x01, DEF_STR(Yes) ) - PORT_DIPSETTING( 0x00, DEF_STR(No) ) -INPUT_PORTS_END -//------------------------------------------------- -// input_ports - device-specific input ports -//------------------------------------------------- - -ioport_constructor ibm5160_mb_device::device_input_ports() const -{ - return INPUT_PORTS_NAME( ibm5160_mb ); -} - - -void ibm5160_mb_device::static_set_cputag(device_t &device, const char *tag) -{ - ibm5160_mb_device &board = downcast(device); - board.m_cputag = tag; -} - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** - -//------------------------------------------------- -// ibm5160_mb_device - constructor -//------------------------------------------------- - -ibm5160_mb_device::ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, IBM5160_MOTHERBOARD, "IBM5160_MOTHERBOARD", tag, owner, clock, "ibm5160_mb", __FILE__), - m_maincpu(*owner, "maincpu"), - m_pic8259(*this, "pic8259"), - m_dma8237(*this, "dma8237"), - m_pit8253(*this, "pit8253"), - m_ppi8255(*this, "ppi8255"), - m_speaker(*this, "speaker"), - m_isabus(*this, "isa"), - m_pc_kbdc(*this, "pc_kbdc"), - m_ram(*this, ":" RAM_TAG) -{ -} - -DEVICE_ADDRESS_MAP_START( map, 8, ibm5160_mb_device ) - AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237", am9517a_device, read, write) - AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259", pic8259_device, read, write) - AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("pit8253", pit8253_device, read, write) - AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) - AM_RANGE(0x0080, 0x008f) AM_WRITE(pc_page_w) - AM_RANGE(0x00a0, 0x00a1) AM_WRITE(nmi_enable_w) -ADDRESS_MAP_END - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void ibm5160_mb_device::device_start() -{ - if(!m_ram->started()) - throw device_missing_dependencies(); - m_maincpu->space(AS_PROGRAM).install_ram(0, m_ram->size() - 1, m_ram->pointer()); -} - - -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void ibm5160_mb_device::device_reset() -{ - m_u73_q2 = 0; - m_out1 = 2; // initial state of pit output is undefined - m_pc_spkrdata = 0; - m_pit_out2 = 1; - m_dma_channel = -1; - m_cur_eop = false; - memset(m_dma_offset,0,sizeof(m_dma_offset)); - m_ppi_portc_switch_high = 0; - m_ppi_speaker = 0; - m_ppi_keyboard_clear = 0; - m_ppi_keyb_clock = 0; - m_ppi_portb = 0; - m_ppi_clock_signal = 0; - m_ppi_data_signal = 0; - m_ppi_shift_register = 0; - m_ppi_shift_enable = 0; - m_nmi_enabled = 0; - m_speaker->level_w(0); -} - - -//************************************************************************** -// GLOBAL VARIABLES -//************************************************************************** - -const device_type IBM5150_MOTHERBOARD = &device_creator; - -//************************************************************************** -// DEVICE CONFIGURATION -//************************************************************************** -static MACHINE_CONFIG_FRAGMENT( ibm5150_mb_config ) - MCFG_FRAGMENT_ADD(ibm5160_mb_config) - - MCFG_DEVICE_MODIFY("pc_kbdc") - MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ibm5150_mb_device, keyboard_clock_w)) - - MCFG_DEVICE_MODIFY("ppi8255") - MCFG_I8255_OUT_PORTB_CB(WRITE8(ibm5150_mb_device, pc_ppi_portb_w)) - MCFG_I8255_IN_PORTC_CB(READ8(ibm5150_mb_device, pc_ppi_portc_r)) - - MCFG_CASSETTE_ADD( "cassette" ) - MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) -MACHINE_CONFIG_END - - -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor ibm5150_mb_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( ibm5150_mb_config ); -} - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** - -//------------------------------------------------- -// ibm5150_mb_device - constructor -//------------------------------------------------- - -ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : ibm5160_mb_device(mconfig, tag, owner, clock), - m_cassette(*this, "cassette") -{ -} - -READ8_MEMBER (ibm5150_mb_device::pc_ppi_porta_r) -{ - int data = 0xFF; - /* KB port A */ - if (m_ppi_keyboard_clear) - { - /* 0 0 - no floppy drives - * 1 Not used - * 2-3 The number of memory banks on the system board - * 4-5 Display mode - * 11 = monochrome - * 10 - color 80x25 - * 01 - color 40x25 - * 6-7 The number of floppy disk drives - */ - data = ioport("DSW0")->read() & 0xF3; - switch ( m_ram->size() ) - { - case 16 * 1024: - data |= 0x00; - break; - case 32 * 1024: /* Need to verify if this is correct */ - data |= 0x04; - break; - case 48 * 1024: /* Need to verify if this is correct */ - data |= 0x08; - break; - default: - data |= 0x0C; - break; - } - } - else - { - data = m_ppi_shift_register; - } - PIO_LOG(1,"PIO_A_r",("$%02x\n", data)); - return data; -} - - -READ8_MEMBER ( ibm5150_mb_device::pc_ppi_portc_r ) -{ - int data=0xff; - - data&=~0x80; // no parity error - data&=~0x40; // no error on expansion board - /* KB port C: equipment flags */ - if (m_ppi_portc_switch_high) - { - /* read hi nibble of SW2 */ - data = data & 0xf0; - - switch ( m_ram->size() - 64 * 1024 ) - { - case 64 * 1024: data |= 0x00; break; - case 128 * 1024: data |= 0x02; break; - case 192 * 1024: data |= 0x04; break; - case 256 * 1024: data |= 0x06; break; - case 320 * 1024: data |= 0x08; break; - case 384 * 1024: data |= 0x0A; break; - case 448 * 1024: data |= 0x0C; break; - case 512 * 1024: data |= 0x0E; break; - case 576 * 1024: data |= 0x01; break; - case 640 * 1024: data |= 0x03; break; - case 704 * 1024: data |= 0x05; break; - case 768 * 1024: data |= 0x07; break; - case 832 * 1024: data |= 0x09; break; - case 896 * 1024: data |= 0x0B; break; - case 960 * 1024: data |= 0x0D; break; - } - if ( m_ram->size() > 960 * 1024 ) - data |= 0x0D; - - PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data)); - } - else - { - /* read lo nibble of S2 */ - data = (data & 0xf0) | (ioport("DSW0")->read() & 0x0f); - PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data)); - } - - if ( ! ( m_ppi_portb & 0x08 ) ) - { - double tap_val = m_cassette->input(); - - if ( tap_val < 0 ) - { - data &= ~0x10; - } - else - { - data |= 0x10; - } - } - else - { - if ( m_ppi_portb & 0x01 ) - { - data = ( data & ~0x10 ) | ( m_pit_out2 ? 0x10 : 0x00 ); - } - } - data = ( data & ~0x20 ) | ( m_pit_out2 ? 0x20 : 0x00 ); - - return data; -} - - -WRITE8_MEMBER( ibm5150_mb_device::pc_ppi_portb_w ) -{ - /* KB controller port B */ - m_ppi_portb = data; - m_ppi_portc_switch_high = data & 0x08; - m_ppi_keyboard_clear = data & 0x80; - m_ppi_keyb_clock = data & 0x40; - m_pit8253->write_gate2(BIT(data, 0)); - pc_speaker_set_spkrdata( data & 0x02 ); - - m_cassette->change_state(( data & 0x08 ) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED,CASSETTE_MASK_MOTOR); - - /* If PB7 is set clear the shift register and reset the IRQ line */ - if ( m_ppi_keyboard_clear ) - { - m_ppi_shift_register = 0; - m_ppi_shift_enable = 0; - m_pic8259->ir1_w(m_ppi_shift_enable); - } - - m_pc_kbdc->data_write_from_mb(!m_ppi_shift_enable); - m_ppi_clock_signal = ( m_ppi_keyb_clock ) ? 1 : 0; - m_pc_kbdc->clock_write_from_mb(m_ppi_clock_signal); -} - -//************************************************************************** -// GLOBAL VARIABLES -//************************************************************************** - -const device_type EC1841_MOTHERBOARD = &device_creator; - -static MACHINE_CONFIG_FRAGMENT( ec1841_mb_config ) - MCFG_FRAGMENT_ADD(ibm5160_mb_config) - - MCFG_DEVICE_MODIFY("ppi8255") - MCFG_I8255_OUT_PORTB_CB(WRITE8(ec1841_mb_device, pc_ppi_portb_w)) - MCFG_I8255_IN_PORTC_CB(READ8(ec1841_mb_device, pc_ppi_portc_r)) - - MCFG_DEVICE_MODIFY("pc_kbdc") - MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ec1841_mb_device, keyboard_clock_w)) -MACHINE_CONFIG_END - - -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor ec1841_mb_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( ec1841_mb_config ); -} - -static INPUT_PORTS_START( ec1841_mb ) - PORT_START("DSW0") /* SA1 */ - PORT_DIPNAME( 0xc0, 0x40, "Number of floppy drives") - PORT_DIPSETTING( 0x00, "1" ) - PORT_DIPSETTING( 0x40, "2" ) - PORT_DIPSETTING( 0x80, "3" ) - PORT_DIPSETTING( 0xc0, "4" ) - PORT_DIPNAME( 0x30, 0x20, "Graphics adapter") - PORT_DIPSETTING( 0x00, "Reserved" ) - PORT_DIPSETTING( 0x10, "Color 40x25" ) - PORT_DIPSETTING( 0x20, "Color 80x25" ) - PORT_DIPSETTING( 0x30, "Monochrome" ) - PORT_BIT( 0x08, 0x08, IPT_UNUSED ) - /* BIOS does not support booting from QD floppies */ - PORT_DIPNAME( 0x04, 0x04, "Floppy type") - PORT_DIPSETTING( 0x00, "80 tracks" ) - PORT_DIPSETTING( 0x04, "40 tracks" ) - PORT_DIPNAME( 0x02, 0x00, "8087 installed") - PORT_DIPSETTING( 0x00, DEF_STR(No) ) - PORT_DIPSETTING( 0x02, DEF_STR(Yes) ) - PORT_DIPNAME( 0x01, 0x01, "Boot from floppy") - PORT_DIPSETTING( 0x01, DEF_STR(Yes) ) - PORT_DIPSETTING( 0x00, DEF_STR(No) ) - - PORT_START("SA2") - PORT_DIPNAME( 0x04, 0x04, "Speech synthesizer") - PORT_DIPSETTING( 0x00, "Installed" ) - PORT_DIPSETTING( 0x04, "Not installed" ) -INPUT_PORTS_END - -//------------------------------------------------- -// input_ports - device-specific input ports -//------------------------------------------------- - -ioport_constructor ec1841_mb_device::device_input_ports() const -{ - return INPUT_PORTS_NAME( ec1841_mb ); -} - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** - -//------------------------------------------------- -// ec1841_mb_device - constructor -//------------------------------------------------- - -ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : ibm5160_mb_device(mconfig, tag, owner, clock) -{ -} - -void ec1841_mb_device::device_start() -{ -} - -// kbd interface is 5150-like but PB2 controls access to second bank of DIP switches (SA2). -WRITE8_MEMBER( ec1841_mb_device::pc_ppi_portb_w ) -{ - /* KB controller port B */ - m_ppi_portb = data; - m_ppi_portc_switch_high = data & 0x04; - m_ppi_keyboard_clear = data & 0x80; - m_ppi_keyb_clock = data & 0x40; - m_pit8253->write_gate2(BIT(data, 0)); - pc_speaker_set_spkrdata( data & 0x02 ); - - /* If PB7 is set clear the shift register and reset the IRQ line */ - if ( m_ppi_keyboard_clear ) - { - m_ppi_shift_register = 0; - m_ppi_shift_enable = 0; - m_pic8259->ir1_w(m_ppi_shift_enable); - } - - m_pc_kbdc->data_write_from_mb(!m_ppi_shift_enable); - m_ppi_clock_signal = ( m_ppi_keyb_clock ) ? 1 : 0; - m_pc_kbdc->clock_write_from_mb(m_ppi_clock_signal); -} - -READ8_MEMBER ( ec1841_mb_device::pc_ppi_portc_r ) -{ - int data=0xff; - - data&=~0x80; // no parity error - data&=~0x40; // no error on expansion board - - if (m_ppi_portc_switch_high) - { - data = (data & 0xf0) | (ioport("SA2")->read() & 0x0f); - } - - data = ( data & ~0x20 ) | ( m_pit_out2 ? 0x20 : 0x00 ); - - return data; -} - -pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : ibm5160_mb_device(mconfig, tag, owner, clock) -{ -} - -//************************************************************************** -// DEVICE CONFIGURATION -//************************************************************************** - -static MACHINE_CONFIG_FRAGMENT( pc_noppi_mb_config ) - MCFG_FRAGMENT_ADD(ibm5160_mb_config) - - MCFG_DEVICE_REMOVE("pc_kbdc") - MCFG_DEVICE_REMOVE("ppi8255") -MACHINE_CONFIG_END - -static INPUT_PORTS_START( pc_noppi_mb ) -INPUT_PORTS_END - -//------------------------------------------------- -// machine_config_additions - device-specific -// machine configurations -//------------------------------------------------- - -machine_config_constructor pc_noppi_mb_device::device_mconfig_additions() const -{ - return MACHINE_CONFIG_NAME( pc_noppi_mb_config ); -} - -ioport_constructor pc_noppi_mb_device::device_input_ports() const -{ - return INPUT_PORTS_NAME( pc_noppi_mb ); -} - -DEVICE_ADDRESS_MAP_START( map, 8, pc_noppi_mb_device ) - AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237", am9517a_device, read, write) - AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE("pic8259", pic8259_device, read, write) - AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("pit8253", pit8253_device, read, write) - AM_RANGE(0x0080, 0x008f) AM_WRITE(pc_page_w) - AM_RANGE(0x00a0, 0x00a1) AM_WRITE(nmi_enable_w) -ADDRESS_MAP_END - -const device_type PCNOPPI_MOTHERBOARD = &device_creator; -- cgit v1.2.3-70-g09d2 From 854fe5592f625b14390da86992274b315ea7721b Mon Sep 17 00:00:00 2001 From: Brad Hughes Date: Sat, 5 Mar 2016 16:08:02 -0500 Subject: Fix Visual Studio build --- scripts/src/osd/modules.lua | 6 +----- src/osd/modules/sound/xaudio2_sound.cpp | 7 ------- 2 files changed, 1 insertion(+), 12 deletions(-) (limited to 'src') diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index 1638cbfd8d0..5cef56772a3 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -86,14 +86,10 @@ function osdmodulesbuild() MAME_DIR .. "src/osd/modules/input/input_xinput.cpp", } - configuration { "mingw*"} - includedirs { - MAME_DIR .. "3rdparty/compat/mingw", - } - if _OPTIONS["targetos"]=="windows" then includedirs { MAME_DIR .. "3rdparty/winpcap/Include", + MAME_DIR .. "3rdparty/compat/mingw", } end diff --git a/src/osd/modules/sound/xaudio2_sound.cpp b/src/osd/modules/sound/xaudio2_sound.cpp index 55293f3b896..4beb2de9da7 100644 --- a/src/osd/modules/sound/xaudio2_sound.cpp +++ b/src/osd/modules/sound/xaudio2_sound.cpp @@ -304,13 +304,6 @@ int sound_xaudio2::init(osd_options const &options) m_sample_bytes = format.nBlockAlign; -#if defined(_DEBUG) - XAUDIO2_DEBUG_CONFIGURATION debugConfig = { 0 }; - debugConfig.TraceMask = XAUDIO2_LOG_WARNINGS | XAUDIO2_LOG_TIMING | XAUDIO2_LOG_STREAMING; - debugConfig.LogFunctionName = TRUE; - m_xAudio2->SetDebugConfiguration(&debugConfig); -#endif - // Create the buffers create_buffers(format); -- cgit v1.2.3-70-g09d2 From af0a67c0f716c529b3f278c3b6ed03e9d0d0bdc9 Mon Sep 17 00:00:00 2001 From: Justin Kerk Date: Sat, 5 Mar 2016 22:22:21 +0000 Subject: Restore uismall.png for now so that Emscripten menus work (nw) --- scripts/src/emu.lua | 11 ++++++++++- src/emu/uismall.png | Bin 0 -> 1488 bytes 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/emu/uismall.png (limited to 'src') diff --git a/scripts/src/emu.lua b/scripts/src/emu.lua index c834c314c77..ac6ed9359aa 100644 --- a/scripts/src/emu.lua +++ b/scripts/src/emu.lua @@ -412,8 +412,17 @@ dependency { } +if (_OPTIONS["targetos"]=="asmjs") then + custombuildtask { + { MAME_DIR .. "src/emu/uismall.png" , GEN_DIR .. "emu/uismall.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uismall.png...", PYTHON .. " $(1) $(<) temp.bdc", PYTHON .. " $(2) temp.bdc $(@) font_uismall UINT8" }}, + } +else + custombuildtask { + { MAME_DIR .. "scripts/font/NotoSans-Bold.bdc", GEN_DIR .. "emu/uismall.fh", { MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting NotoSans-Bold.bdc...", PYTHON .. " $(1) $(<) $(@) font_uismall UINT8" }}, + } +end + custombuildtask { - { MAME_DIR .. "scripts/font/NotoSans-Bold.bdc", GEN_DIR .. "emu/uismall.fh", { MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting NotoSans-Bold.bdc...", PYTHON .. " $(1) $(<) $(@) font_uismall UINT8" }}, { MAME_DIR .. "src/emu/ui/uicmd14.png" , GEN_DIR .. "emu/ui/uicmd14.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uicmd14.png...", PYTHON .. " $(1) $(<) temp_cmd.bdc", PYTHON .. " $(2) temp_cmd.bdc $(@) font_uicmd14 UINT8" }}, layoutbuildtask("emu/layout", "dualhovu"), diff --git a/src/emu/uismall.png b/src/emu/uismall.png new file mode 100644 index 00000000000..5d391640f62 Binary files /dev/null and b/src/emu/uismall.png differ -- cgit v1.2.3-70-g09d2 From e7e26e2b25f4a9a00d0ca2f986b3d47610d42f01 Mon Sep 17 00:00:00 2001 From: cracyc Date: Sat, 5 Mar 2016 17:14:38 -0600 Subject: pcxt: plays music unfortunately (nw) --- src/devices/machine/genpc.h | 2 +- src/mame/drivers/amstr_pc.cpp | 2 +- src/mame/drivers/europc.cpp | 2 +- src/mame/drivers/pcxt.cpp | 69 ++++--------------------------------------- 4 files changed, 8 insertions(+), 67 deletions(-) (limited to 'src') diff --git a/src/devices/machine/genpc.h b/src/devices/machine/genpc.h index 13f00e8eac2..e766ea367da 100644 --- a/src/devices/machine/genpc.h +++ b/src/devices/machine/genpc.h @@ -182,12 +182,12 @@ class pc_noppi_mb_device : public ibm5160_mb_device public: // construction/destruction pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + UINT8 pit_out2() { return m_pit_out2; } // helper for near-clones with multifunction ics instead of 8255s DECLARE_ADDRESS_MAP(map, 8); virtual machine_config_constructor device_mconfig_additions() const override; virtual ioport_constructor device_input_ports() const override; -protected: }; extern const device_type PCNOPPI_MOTHERBOARD; diff --git a/src/mame/drivers/amstr_pc.cpp b/src/mame/drivers/amstr_pc.cpp index dd44bc15724..613b1717bb9 100644 --- a/src/mame/drivers/amstr_pc.cpp +++ b/src/mame/drivers/amstr_pc.cpp @@ -281,7 +281,7 @@ READ8_MEMBER( amstrad_pc_state::pc1640_port60_r ) case 2: data = m_port62; - if (m_mb->m_pit_out2) + if (m_mb->pit_out2()) data |= 0x20; break; } diff --git a/src/mame/drivers/europc.cpp b/src/mame/drivers/europc.cpp index 60023095a01..c2171d44749 100644 --- a/src/mame/drivers/europc.cpp +++ b/src/mame/drivers/europc.cpp @@ -381,7 +381,7 @@ READ8_MEMBER( europc_pc_state::europc_pio_r ) data = m_port61; break; case 2: - if (m_mb->m_pit_out2) + if (m_mb->pit_out2()) data |= 0x20; break; } diff --git a/src/mame/drivers/pcxt.cpp b/src/mame/drivers/pcxt.cpp index 5fd6f744a21..00c618c2f17 100644 --- a/src/mame/drivers/pcxt.cpp +++ b/src/mame/drivers/pcxt.cpp @@ -74,8 +74,6 @@ public: int m_lastvalue; UINT8 m_disk_data[2]; UINT8 m_port_b_data; - UINT8 m_wss1_data; - UINT8 m_wss2_data; UINT8 m_status; UINT8 m_clr_status; @@ -89,9 +87,6 @@ public: DECLARE_READ8_MEMBER(port_b_r); DECLARE_READ8_MEMBER(port_c_r); DECLARE_WRITE8_MEMBER(port_b_w); - DECLARE_WRITE8_MEMBER(wss_1_w); - DECLARE_WRITE8_MEMBER(wss_2_w); - DECLARE_WRITE8_MEMBER(sys_reset_w); virtual void machine_reset() override; required_device m_maincpu; @@ -298,24 +293,7 @@ WRITE8_MEMBER(pcxt_state::disk_iobank_w) READ8_MEMBER(pcxt_state::port_a_r) { - if(!(m_port_b_data & 0x80))//??? - { - /* - x--- ---- Undefined (Always 0) - -x-- ---- B: Floppy disk drive installed. - --xx ---- Default Display Mode - ---- xx-- Undefined (Always 1) - ---- --x- 8087 NDP installed - ---- ---x Undefined (Always 1) - */ - return m_wss1_data; - } - else//keyboard emulation - { - //m_maincpu->set_input_line(1, PULSE_LINE); - return 0x00;//Keyboard is disconnected - //return 0xaa;//Keyboard code - } + return 0xaa;//harmless keyboard error occurs without this } READ8_MEMBER(pcxt_state::port_b_r) @@ -325,13 +303,7 @@ READ8_MEMBER(pcxt_state::port_b_r) READ8_MEMBER(pcxt_state::port_c_r) { - if ( m_port_b_data & 0x01 ) - { - m_wss2_data = ( m_wss2_data & ~0x10 ) | ( m_mb->m_pit_out2 ? 0x10 : 0x00 ); - } - m_wss2_data = ( m_wss2_data & ~0x20 ) | ( m_mb->m_pit_out2 ? 0x20 : 0x00 ); - - return m_wss2_data;//TODO + return 0x00;// DIPS? } /*'buzzer' sound routes here*/ @@ -346,22 +318,6 @@ WRITE8_MEMBER(pcxt_state::port_b_w) // hc55516_digit_w(cvsd, data); } -WRITE8_MEMBER(pcxt_state::wss_1_w) -{ - m_wss1_data = data; -} - -WRITE8_MEMBER(pcxt_state::wss_2_w) -{ - m_wss2_data = data; -} - -WRITE8_MEMBER(pcxt_state::sys_reset_w) -{ - m_maincpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); -} - - /*Floppy Disk Controller 765 device*/ /*Currently we only emulate it at a point that the BIOS will pass the checks*/ @@ -372,7 +328,6 @@ WRITE8_MEMBER(pcxt_state::sys_reset_w) READ8_MEMBER(pcxt_state::fdc765_status_r) { UINT8 tmp; -// popmessage("Read FDC status @ PC=%05x",space.device().safe_pc()); tmp = m_status | 0x80; m_clr_status++; if(m_clr_status == 0x10) @@ -408,10 +363,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( filetto_io, AS_IO, 8, pcxt_state ) ADDRESS_MAP_GLOBAL_MASK(0x3ff) - AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) //PPI 8255 - AM_RANGE(0x0064, 0x0066) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) //PPI 8255 + AM_RANGE(0x0060, 0x0060) AM_READ(port_a_r) //not a real 8255 + AM_RANGE(0x0061, 0x0061) AM_READWRITE(port_b_r, port_b_w) + AM_RANGE(0x0062, 0x0062) AM_READ(port_c_r) AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", pc_noppi_mb_device, map) -// AM_RANGE(0x0200, 0x020f) AM_RAM //game port AM_RANGE(0x0201, 0x0201) AM_READ_PORT("COIN") //game port AM_RANGE(0x0310, 0x0311) AM_READWRITE(disk_iobank_r,disk_iobank_w) //Prototyping card AM_RANGE(0x0312, 0x0312) AM_READ_PORT("IN0") //Prototyping card,read only @@ -427,7 +382,6 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( tetriskr_io, AS_IO, 8, pcxt_state ) ADDRESS_MAP_GLOBAL_MASK(0x3ff) AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", pc_noppi_mb_device, map) - AM_RANGE(0x0200, 0x020f) AM_RAM //game port AM_RANGE(0x03c8, 0x03c8) AM_READ_PORT("IN0") AM_RANGE(0x03c9, 0x03c9) AM_READ_PORT("IN1") // AM_RANGE(0x03ce, 0x03ce) AM_READ_PORT("IN1") //read then discarded? @@ -517,7 +471,6 @@ INPUT_PORTS_END void pcxt_state::machine_reset() { m_lastvalue = -1; - m_wss2_data = 0; } static SLOT_INTERFACE_START( filetto_isa8_cards ) @@ -534,18 +487,6 @@ static MACHINE_CONFIG_START( filetto, pcxt_state ) MCFG_PCNOPPI_MOTHERBOARD_ADD("mb","maincpu") MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", filetto_isa8_cards, "filetto", true) - - MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0) - MCFG_I8255_IN_PORTA_CB(READ8(pcxt_state, port_a_r)) - MCFG_I8255_IN_PORTB_CB(READ8(pcxt_state, port_b_r)) - MCFG_I8255_OUT_PORTB_CB(WRITE8(pcxt_state, port_b_w)) - MCFG_I8255_IN_PORTC_CB(READ8(pcxt_state, port_c_r)) - - MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0) - MCFG_I8255_OUT_PORTA_CB(WRITE8(pcxt_state, wss_1_w)) - MCFG_I8255_OUT_PORTA_CB(WRITE8(pcxt_state, wss_2_w)) - MCFG_I8255_OUT_PORTA_CB(WRITE8(pcxt_state, sys_reset_w)) - MCFG_SOUND_ADD("voice", HC55516, 8000000/4)//8923S-UM5100 is a HC55536 with ROM hook-up MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mb:mono", 0.60) MCFG_RAM_ADD(RAM_TAG) -- cgit v1.2.3-70-g09d2 From 4e25da61c7265ff5174ce0b66ad2188495cde210 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 6 Mar 2016 12:12:25 +1100 Subject: Fix up some bad English, fix more unlocalisable stuff --- src/emu/ui/optsmenu.cpp | 6 +++--- src/emu/ui/selector.cpp | 2 +- src/emu/ui/selgame.cpp | 2 +- src/emu/ui/ui.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/emu/ui/optsmenu.cpp b/src/emu/ui/optsmenu.cpp index 8f421073144..80eb5b5bbf1 100644 --- a/src/emu/ui/optsmenu.cpp +++ b/src/emu/ui/optsmenu.cpp @@ -322,7 +322,7 @@ void save_ui_options(running_machine &machine) file.close(); } else - machine.popmessage(_("**Error to save ui.ini**")); + machine.popmessage(_("**Error saving ui.ini**")); } //------------------------------------------------- @@ -344,7 +344,7 @@ void save_main_option(running_machine &machine) bool result = options.parse_ini_file((core_file&)file, OPTION_PRIORITY_MAME_INI, OPTION_PRIORITY_DRIVER_INI, error); if (!result) { - osd_printf_error(_("**Error to load %s.ini**"), emulator_info::get_configname()); + osd_printf_error(_("**Error loading %s.ini**"), emulator_info::get_configname()); return; } } @@ -369,7 +369,7 @@ void save_main_option(running_machine &machine) file.close(); } else { - machine.popmessage(_("**Error to save %s.ini**"), emulator_info::get_configname()); + machine.popmessage(_("**Error saving %s.ini**"), emulator_info::get_configname()); return; } } diff --git a/src/emu/ui/selector.cpp b/src/emu/ui/selector.cpp index ae786dd1834..330694fd497 100644 --- a/src/emu/ui/selector.cpp +++ b/src/emu/ui/selector.cpp @@ -178,7 +178,7 @@ void ui_menu_selector::custom_render(void *selectedref, float top, float bottom, // bottom text // get the text for 'UI Select' std::string ui_select_text = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD)); - tempbuf.assign(_("Double click or press ")).append(ui_select_text).append(_(" to select")); + tempbuf = string_format(_("Double click or press %1$s to select"), ui_select_text); mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp index c3c724b900c..d0996d65d59 100644 --- a/src/emu/ui/selgame.cpp +++ b/src/emu/ui/selgame.cpp @@ -1558,7 +1558,7 @@ void ui_menu_select_game::general_info(const game_driver *driver, std::string &b util::stream_format(str, _("Support Cocktail: %1$s\n"), ((driver->flags & MACHINE_NO_COCKTAIL) ? _("Yes") : _("No"))); util::stream_format(str, _("Driver is Bios: %1$s\n"), ((driver->flags & MACHINE_IS_BIOS_ROOT) ? _("Yes") : _("No"))); util::stream_format(str, _("Support Save: %1$s\n"), ((driver->flags & MACHINE_SUPPORTS_SAVE) ? _("Yes") : _("No"))); - util::stream_format(str, _("Screen Orentation: %1$s\n"), ((driver->flags & ORIENTATION_SWAP_XY) ? _("Vertical") : _("Horizontal"))); + util::stream_format(str, _("Screen Orientation: %1$s\n"), ((driver->flags & ORIENTATION_SWAP_XY) ? _("Vertical") : _("Horizontal"))); bool found = false; for (const rom_entry *rom = driver->rom; !ROMENTRY_ISEND(rom); ++rom) if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom)) diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp index 4104ff88308..8843675f57e 100644 --- a/src/emu/ui/ui.cpp +++ b/src/emu/ui/ui.cpp @@ -173,7 +173,7 @@ static void load_ui_options(running_machine &machine) { bool result = machine.ui().options().parse_ini_file((core_file&)file, OPTION_PRIORITY_MAME_INI, OPTION_PRIORITY_DRIVER_INI, error); if (!result) - osd_printf_error("**Error to load ui.ini**"); + osd_printf_error(_("**Error loading ui.ini**")); } } -- cgit v1.2.3-70-g09d2 From 078e954270872fd65a7d6d9d7a41c3c73346d526 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 6 Mar 2016 12:51:22 +1100 Subject: This depends on libstdc++ version, not GCC version It's possible to make GCC use older/newer libstdc++ or to use Clang with libstdc++ This is still the wrong place for it - we should have all compiler/library workarounds in one place, not at point of use, to avoid duplication/conflicts --- src/lib/util/strformat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/util/strformat.h b/src/lib/util/strformat.h index dc8061ca944..0b65e942e9f 100644 --- a/src/lib/util/strformat.h +++ b/src/lib/util/strformat.h @@ -185,7 +185,7 @@ #include #include -#if defined(__GNUC__) && ((__GNUC__ == 5 && __GNUC_MINOR__ < 2) || (__GNUC__ == 4 && __GNUC_MINOR__ > 8)) +#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20150413) namespace std { template -- cgit v1.2.3-70-g09d2 From 16aa806e6dc44762525d7b876c5969c224a0dcff Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Sun, 6 Mar 2016 03:06:25 +0100 Subject: fix more unlocalisable stuff and resync translations. nw --- language/Afrikaans/strings.po | 9 +++------ language/Albanian/strings.po | 9 +++------ language/Arabic/strings.po | 9 +++------ language/Basque/strings.po | 9 +++------ language/Belarusian/strings.po | 9 +++------ language/Bosnian/strings.po | 9 +++------ language/Bulgarian/strings.po | 9 +++------ language/Burmese/strings.po | 9 +++------ language/Catalan/strings.po | 9 +++------ language/Chinese_Simplified/strings.po | 17 ++++++++++------- language/Chinese_Traditional/strings.po | 17 ++++++++++------- language/Croatian/strings.po | 9 +++------ language/Czech/strings.po | 9 +++------ language/Danish/strings.po | 9 +++------ language/Dutch/strings.po | 9 +++------ language/English/strings.po | 9 +++------ language/Estonian/strings.po | 9 +++------ language/Finnish/strings.po | 9 +++------ language/French/strings.po | 17 ++++++++++------- language/French_Belgium/strings.po | 17 ++++++++++------- language/French_Canada/strings.po | 9 +++------ language/Georgian/strings.po | 9 +++------ language/German/strings.po | 17 ++++++++++------- language/Greek/strings.po | 17 ++++++++++------- language/Hebrew/strings.po | 9 +++------ language/Hindi/strings.po | 9 +++------ language/Hungarian/strings.po | 9 +++------ language/Indonesian/strings.po | 9 +++------ language/Italian/strings.po | 17 ++++++++++------- language/Japanese/strings.po | 17 ++++++++++------- language/Korean/strings.po | 9 +++------ language/Latvian/strings.po | 9 +++------ language/Lithuanian/strings.po | 9 +++------ language/Macedonian/strings.po | 9 +++------ language/Norwegian/strings.po | 9 +++------ language/Persian/strings.po | 9 +++------ language/Polish/strings.po | 9 +++------ language/Portuguese/strings.po | 9 +++------ language/Portuguese_Brazil/strings.po | 17 ++++++++++------- language/Romanian/strings.po | 9 +++------ language/Russian/strings.po | 17 ++++++++++------- language/Serbian/strings.po | 17 ++++++++++------- language/Serbian_Cyrillic/strings.po | 17 ++++++++++------- language/Slovak/strings.po | 9 +++------ language/Slovenian/strings.po | 9 +++------ language/Spanish/strings.po | 17 ++++++++++------- language/Spanish_Mexico/strings.po | 9 +++------ language/Swedish/strings.po | 9 +++------ language/Thai/strings.po | 9 +++------ language/Turkish/strings.po | 9 +++------ language/Ukrainian/strings.po | 9 +++------ language/Vietnamese/strings.po | 9 +++------ src/emu/ui/custui.cpp | 2 +- src/emu/ui/selsoft.cpp | 2 +- 54 files changed, 249 insertions(+), 327 deletions(-) (limited to 'src') diff --git a/language/Afrikaans/strings.po b/language/Afrikaans/strings.po index b3f9db27a96..080ea694805 100644 --- a/language/Afrikaans/strings.po +++ b/language/Afrikaans/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -317,11 +317,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Albanian/strings.po b/language/Albanian/strings.po index a74cfb58c55..b8e5acd4a13 100644 --- a/language/Albanian/strings.po +++ b/language/Albanian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -317,11 +317,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Arabic/strings.po b/language/Arabic/strings.po index 3bafc8ece9b..b83f8340d3d 100644 --- a/language/Arabic/strings.po +++ b/language/Arabic/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -317,11 +317,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Basque/strings.po b/language/Basque/strings.po index e5c048f9193..066437d34d8 100644 --- a/language/Basque/strings.po +++ b/language/Basque/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -318,11 +318,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Belarusian/strings.po b/language/Belarusian/strings.po index 248e68d18f3..b739ca04aa1 100644 --- a/language/Belarusian/strings.po +++ b/language/Belarusian/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -320,11 +320,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Bosnian/strings.po b/language/Bosnian/strings.po index 75d61ec9b26..c53837d04a9 100644 --- a/language/Bosnian/strings.po +++ b/language/Bosnian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -317,11 +317,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Bulgarian/strings.po b/language/Bulgarian/strings.po index 57a92248b13..270b97f5848 100644 --- a/language/Bulgarian/strings.po +++ b/language/Bulgarian/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Burmese/strings.po b/language/Burmese/strings.po index 2565018f321..97c6f4fcd86 100644 --- a/language/Burmese/strings.po +++ b/language/Burmese/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -317,11 +317,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Catalan/strings.po b/language/Catalan/strings.po index 425d1f02163..953c74bd1a5 100644 --- a/language/Catalan/strings.po +++ b/language/Catalan/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -318,11 +318,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Chinese_Simplified/strings.po b/language/Chinese_Simplified/strings.po index 846f5e9df6d..7e08c4551fe 100644 --- a/language/Chinese_Simplified/strings.po +++ b/language/Chinese_Simplified/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:34+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-03-06 01:10+0800\n" "Last-Translator: YuiFAN\n" "Language-Team: MAME Language Team\n" @@ -320,12 +320,9 @@ msgid "UI Colors Settings" msgstr "UI 色彩设定" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "åŒå‡»æˆ–按下 " - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr " 以改å˜é¢œè‰²å€¼" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2075,6 +2072,12 @@ msgstr " 色彩" msgid " PENS" msgstr " PENS" +#~ msgid "Double click or press " +#~ msgstr "åŒå‡»æˆ–按下 " + +#~ msgid " to change the color value" +#~ msgstr " 以改å˜é¢œè‰²å€¼" + #~ msgid " to select" #~ msgstr " 以选择" diff --git a/language/Chinese_Traditional/strings.po b/language/Chinese_Traditional/strings.po index 9a4ab038568..587ff0327eb 100644 --- a/language/Chinese_Traditional/strings.po +++ b/language/Chinese_Traditional/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:34+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-03-06 01:00+0800\n" "Last-Translator: YuiFAN\n" "Language-Team: MAME Language Team\n" @@ -320,12 +320,9 @@ msgid "UI Colors Settings" msgstr "UI 色彩設定" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "雙擊或按下 " - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr " 以改變é¡è‰²å€¼" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2075,5 +2072,11 @@ msgstr " 色彩" msgid " PENS" msgstr " PENS" +#~ msgid "Double click or press " +#~ msgstr "雙擊或按下 " + +#~ msgid " to change the color value" +#~ msgstr " 以改變é¡è‰²å€¼" + #~ msgid " to select" #~ msgstr " 以鏿“‡" diff --git a/language/Croatian/strings.po b/language/Croatian/strings.po index 9188470f1cd..89a23362687 100644 --- a/language/Croatian/strings.po +++ b/language/Croatian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Czech/strings.po b/language/Czech/strings.po index 5f1c8442b59..51c5de67269 100644 --- a/language/Czech/strings.po +++ b/language/Czech/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -318,11 +318,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Danish/strings.po b/language/Danish/strings.po index e37fae4f1a3..d2a396fa653 100644 --- a/language/Danish/strings.po +++ b/language/Danish/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Dutch/strings.po b/language/Dutch/strings.po index b25e3a4d938..c6e093535c8 100644 --- a/language/Dutch/strings.po +++ b/language/Dutch/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/English/strings.po b/language/English/strings.po index 880c9b5b389..4834d401003 100644 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -318,11 +318,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Estonian/strings.po b/language/Estonian/strings.po index 7b91156d0ff..aefff826185 100644 --- a/language/Estonian/strings.po +++ b/language/Estonian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -318,11 +318,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Finnish/strings.po b/language/Finnish/strings.po index 69cc3dd35fb..850c387caac 100644 --- a/language/Finnish/strings.po +++ b/language/Finnish/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/French/strings.po b/language/French/strings.po index f68c1fae616..5d4d12aa5fe 100644 --- a/language/French/strings.po +++ b/language/French/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:34+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: Benjamin Siskoo\n" @@ -323,12 +323,9 @@ msgid "UI Colors Settings" msgstr "Paramètrage des Couleurs de l'Interface" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "Double cliquer ou presser " - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr " pour changer la valeur de la couleur" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2092,6 +2089,12 @@ msgstr " COULEURS" msgid " PENS" msgstr " PENS" +#~ msgid "Double click or press " +#~ msgstr "Double cliquer ou presser " + +#~ msgid " to change the color value" +#~ msgstr " pour changer la valeur de la couleur" + #~ msgid " to select" #~ msgstr " à sélectionner" diff --git a/language/French_Belgium/strings.po b/language/French_Belgium/strings.po index dbd637fa15f..9b8fcc172cd 100644 --- a/language/French_Belgium/strings.po +++ b/language/French_Belgium/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:34+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-03-02 18:52+0100\n" "Last-Translator: Mevi \n" "Language-Team: MAME Language Team\n" @@ -321,12 +321,9 @@ msgid "UI Colors Settings" msgstr "Paramètres des couleurs de l'interface" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "Double-cliquer ou appuyer sur " - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr " pour changer la valeur de la couleur" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2105,6 +2102,12 @@ msgstr " COULEURS" msgid " PENS" msgstr " MARQUEURS" +#~ msgid "Double click or press " +#~ msgstr "Double-cliquer ou appuyer sur " + +#~ msgid " to change the color value" +#~ msgstr " pour changer la valeur de la couleur" + #~ msgid " to select" #~ msgstr " pour sélectionner" diff --git a/language/French_Canada/strings.po b/language/French_Canada/strings.po index 38624627c8c..56958ca0aad 100644 --- a/language/French_Canada/strings.po +++ b/language/French_Canada/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Georgian/strings.po b/language/Georgian/strings.po index f77c1eed923..3c543a65493 100644 --- a/language/Georgian/strings.po +++ b/language/Georgian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -317,11 +317,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/German/strings.po b/language/German/strings.po index d6e98203ade..eb72ac3e86a 100644 --- a/language/German/strings.po +++ b/language/German/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:34+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-27 14:59+0100\n" "Last-Translator: Lothar Serra Mari \n" "Language-Team: MAME Language Team\n" @@ -323,12 +323,9 @@ msgid "UI Colors Settings" msgstr "Farbeinstellungen für Benutzeroberfläche" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "Doppelklicken Sie oder drücken Sie " - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr " um den Farbwert zu ändern" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2107,6 +2104,12 @@ msgstr " FARBEN" msgid " PENS" msgstr " STIFTE" +#~ msgid "Double click or press " +#~ msgstr "Doppelklicken Sie oder drücken Sie " + +#~ msgid " to change the color value" +#~ msgstr " um den Farbwert zu ändern" + #~ msgid " to select" #~ msgstr " um auszuwählen" diff --git a/language/Greek/strings.po b/language/Greek/strings.po index 4baa3680ecc..ee9469a2ead 100644 --- a/language/Greek/strings.po +++ b/language/Greek/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:34+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-03-01 16:29+0200\n" "Last-Translator: Mame.gr\n" "Language-Team: MAME Language Team\n" @@ -322,12 +322,9 @@ msgid "UI Colors Settings" msgstr "Ρυθμίσεις χÏωμάτων UI" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "Κάντε διπλό κλικ ή πιέστε το πλήκτÏο " - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr " για να αλλάξετε την τιμή του χÏώματος" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2110,6 +2107,12 @@ msgstr " ΧΡΩΜΑΤΑ" msgid " PENS" msgstr " ΓΡΑΦΙΔΕΣ" +#~ msgid "Double click or press " +#~ msgstr "Κάντε διπλό κλικ ή πιέστε το πλήκτÏο " + +#~ msgid " to change the color value" +#~ msgstr " για να αλλάξετε την τιμή του χÏώματος" + #~ msgid " to select" #~ msgstr " για επιλογή" diff --git a/language/Hebrew/strings.po b/language/Hebrew/strings.po index 960b791e837..c9f02575315 100644 --- a/language/Hebrew/strings.po +++ b/language/Hebrew/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -318,11 +318,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Hindi/strings.po b/language/Hindi/strings.po index 557643fe3ac..26b2847ed18 100644 --- a/language/Hindi/strings.po +++ b/language/Hindi/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -317,11 +317,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Hungarian/strings.po b/language/Hungarian/strings.po index 65c0f80c313..ba262bd054a 100644 --- a/language/Hungarian/strings.po +++ b/language/Hungarian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -318,11 +318,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Indonesian/strings.po b/language/Indonesian/strings.po index 8eae6019587..fb71d2c3224 100644 --- a/language/Indonesian/strings.po +++ b/language/Indonesian/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -318,11 +318,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Italian/strings.po b/language/Italian/strings.po index 1da0347cd15..998b92d09df 100644 --- a/language/Italian/strings.po +++ b/language/Italian/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:34+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Angelo Salese,Antonio Paradossi,Fabio Priuli\n" "Language-Team: MAME Language Team\n" @@ -322,12 +322,9 @@ msgid "UI Colors Settings" msgstr "Impostazione Colori UI" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "Doppio click o premi " - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr " per cambiare il colore" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2079,6 +2076,12 @@ msgstr " COLORI" msgid " PENS" msgstr " PEN" +#~ msgid "Double click or press " +#~ msgstr "Doppio click o premi " + +#~ msgid " to change the color value" +#~ msgstr " per cambiare il colore" + #~ msgid " to select" #~ msgstr " per scegliere" diff --git a/language/Japanese/strings.po b/language/Japanese/strings.po index 572976b98e6..5666d3d335d 100644 --- a/language/Japanese/strings.po +++ b/language/Japanese/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-23 01:39+0900\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -322,12 +322,9 @@ msgid "UI Colors Settings" msgstr "UIã®è‰²è¨­å®š" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "値を変更ã™ã‚‹ã«ã¯" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr "を押ã™ã‹ãƒ€ãƒ–ルクリックã—ã¦ãã ã•ã„" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2075,3 +2072,9 @@ msgstr " 色" #: src/emu/ui/viewgfx.cpp:391 msgid " PENS" msgstr " ペン" + +#~ msgid "Double click or press " +#~ msgstr "値を変更ã™ã‚‹ã«ã¯" + +#~ msgid " to change the color value" +#~ msgstr "を押ã™ã‹ãƒ€ãƒ–ルクリックã—ã¦ãã ã•ã„" diff --git a/language/Korean/strings.po b/language/Korean/strings.po index cc0679b8ffd..facda0d7628 100644 --- a/language/Korean/strings.po +++ b/language/Korean/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Latvian/strings.po b/language/Latvian/strings.po index 16527ca8564..ed051074185 100644 --- a/language/Latvian/strings.po +++ b/language/Latvian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Lithuanian/strings.po b/language/Lithuanian/strings.po index 850915034b7..5d11e6d5f59 100644 --- a/language/Lithuanian/strings.po +++ b/language/Lithuanian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Macedonian/strings.po b/language/Macedonian/strings.po index 66c492b246a..68b0b0253be 100644 --- a/language/Macedonian/strings.po +++ b/language/Macedonian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -317,11 +317,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Norwegian/strings.po b/language/Norwegian/strings.po index 288dc55c143..c76ee7110ec 100644 --- a/language/Norwegian/strings.po +++ b/language/Norwegian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -318,11 +318,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Persian/strings.po b/language/Persian/strings.po index 49fbd7e2d4b..be5e3211d53 100644 --- a/language/Persian/strings.po +++ b/language/Persian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -317,11 +317,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Polish/strings.po b/language/Polish/strings.po index d4b30fa3c34..829a9a9cef5 100644 --- a/language/Polish/strings.po +++ b/language/Polish/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -320,11 +320,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Portuguese/strings.po b/language/Portuguese/strings.po index 840850ef4cc..d8424d0e771 100644 --- a/language/Portuguese/strings.po +++ b/language/Portuguese/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -318,11 +318,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Portuguese_Brazil/strings.po b/language/Portuguese_Brazil/strings.po index 0b630edebbb..e9954ace1f3 100644 --- a/language/Portuguese_Brazil/strings.po +++ b/language/Portuguese_Brazil/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:34+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-03-02 14:00+0100\n" "Last-Translator: Ashura-X\n" "Language-Team: MAME Language Team\n" @@ -320,12 +320,9 @@ msgid "UI Colors Settings" msgstr "Configurações de cores do UI" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "Duplo-clique ou pressione" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr "para mudar o valor da cor" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2051,6 +2048,12 @@ msgstr " CORES" msgid " PENS" msgstr " CANETAS" +#~ msgid "Double click or press " +#~ msgstr "Duplo-clique ou pressione" + +#~ msgid " to change the color value" +#~ msgstr "para mudar o valor da cor" + #~ msgid " to select" #~ msgstr " para selecionar" diff --git a/language/Romanian/strings.po b/language/Romanian/strings.po index 10c8e87c42e..379c3480b27 100644 --- a/language/Romanian/strings.po +++ b/language/Romanian/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -320,11 +320,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Russian/strings.po b/language/Russian/strings.po index 263b119024d..29c7fd4e2d8 100644 --- a/language/Russian/strings.po +++ b/language/Russian/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:34+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -322,12 +322,9 @@ msgid "UI Colors Settings" msgstr "ÐаÑтройка цветов интерфейÑа" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "Кликните два раза или нажмите " - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr " Ð´Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñ†Ð²ÐµÑ‚Ð°" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2047,6 +2044,12 @@ msgstr " ЦВЕТÐ" msgid " PENS" msgstr "" +#~ msgid "Double click or press " +#~ msgstr "Кликните два раза или нажмите " + +#~ msgid " to change the color value" +#~ msgstr " Ð´Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñ†Ð²ÐµÑ‚Ð°" + #~ msgid " to select" #~ msgstr " Ð´Ð»Ñ Ð²Ñ‹Ð±Ð¾Ñ€Ð°" diff --git a/language/Serbian/strings.po b/language/Serbian/strings.po index 69b90df74b6..df4f30ef417 100644 --- a/language/Serbian/strings.po +++ b/language/Serbian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:34+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-03-02 21:46+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -323,12 +323,9 @@ msgid "UI Colors Settings" msgstr "PodeÅ¡enje boja korisniÄkog interfejsa" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "Dupli klik ili pritisak tastera" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr " da se promeni vrednost boje" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2097,6 +2094,12 @@ msgstr " BOJE" msgid " PENS" msgstr "" +#~ msgid "Double click or press " +#~ msgstr "Dupli klik ili pritisak tastera" + +#~ msgid " to change the color value" +#~ msgstr " da se promeni vrednost boje" + #~ msgid " to select" #~ msgstr " za izabrati" diff --git a/language/Serbian_Cyrillic/strings.po b/language/Serbian_Cyrillic/strings.po index 1cac4977d2c..756ffbf41c3 100644 --- a/language/Serbian_Cyrillic/strings.po +++ b/language/Serbian_Cyrillic/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:34+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-23 12:43+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -323,12 +323,9 @@ msgid "UI Colors Settings" msgstr "ПодeшeÑše боjа кориÑничког интeрфejÑа" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "Дупли клик или притиÑак таÑÑ‚eра" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr " да Ñe промeни врeдноÑÑ‚ боje" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2095,6 +2092,12 @@ msgstr " БОЈЕ" msgid " PENS" msgstr "" +#~ msgid "Double click or press " +#~ msgstr "Дупли клик или притиÑак таÑÑ‚eра" + +#~ msgid " to change the color value" +#~ msgstr " да Ñe промeни врeдноÑÑ‚ боje" + #~ msgid " to select" #~ msgstr " за изабрати" diff --git a/language/Slovak/strings.po b/language/Slovak/strings.po index a5388df529a..6f1e3d9de55 100644 --- a/language/Slovak/strings.po +++ b/language/Slovak/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Slovenian/strings.po b/language/Slovenian/strings.po index 9450280ed83..a4dc4c625f5 100644 --- a/language/Slovenian/strings.po +++ b/language/Slovenian/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -320,11 +320,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Spanish/strings.po b/language/Spanish/strings.po index b3ca57300a1..ad92f36e041 100644 --- a/language/Spanish/strings.po +++ b/language/Spanish/strings.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:34+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-03-05 13:02+0100\n" "Last-Translator: Ismael Ferreras Morezuelas \n" "Language-Team: Español; Castellano <>\n" @@ -325,12 +325,9 @@ msgid "UI Colors Settings" msgstr "Ajustes de color de interfaz" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "Haz doble clic o pulsa " - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" -msgstr " para cambiar el color" +#, c-format +msgid "Double click or press %1$s to change the color value" +msgstr "" #: src/emu/ui/custui.cpp:617 msgid "Menu Preview" @@ -2100,6 +2097,12 @@ msgstr " COLORES" msgid " PENS" msgstr " PLUMAS" +#~ msgid "Double click or press " +#~ msgstr "Haz doble clic o pulsa " + +#~ msgid " to change the color value" +#~ msgstr " para cambiar el color" + #~ msgid " to select" #~ msgstr " para seleccionar" diff --git a/language/Spanish_Mexico/strings.po b/language/Spanish_Mexico/strings.po index 9c3cdf2f219..525ce308353 100644 --- a/language/Spanish_Mexico/strings.po +++ b/language/Spanish_Mexico/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Swedish/strings.po b/language/Swedish/strings.po index df5d4a79354..6839a024fbd 100644 --- a/language/Swedish/strings.po +++ b/language/Swedish/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -318,11 +318,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Thai/strings.po b/language/Thai/strings.po index b88061ddf41..a2935d32654 100644 --- a/language/Thai/strings.po +++ b/language/Thai/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -317,11 +317,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Turkish/strings.po b/language/Turkish/strings.po index 850f4529b2e..dbc9a79d360 100644 --- a/language/Turkish/strings.po +++ b/language/Turkish/strings.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Ukrainian/strings.po b/language/Ukrainian/strings.po index 00d1e0ff7a2..8ef2a00e2e0 100644 --- a/language/Ukrainian/strings.po +++ b/language/Ukrainian/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -319,11 +319,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/language/Vietnamese/strings.po b/language/Vietnamese/strings.po index 3a4b07a32eb..f099804a296 100644 --- a/language/Vietnamese/strings.po +++ b/language/Vietnamese/strings.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-06 12:23+1100\n" +"POT-Creation-Date: 2016-03-06 03:03+0100\n" "PO-Revision-Date: 2016-02-20 18:03+0100\n" "Last-Translator: Automatically generated\n" "Language-Team: MAME Language Team\n" @@ -318,11 +318,8 @@ msgid "UI Colors Settings" msgstr "" #: src/emu/ui/custui.cpp:591 -msgid "Double click or press " -msgstr "" - -#: src/emu/ui/custui.cpp:591 -msgid " to change the color value" +#, c-format +msgid "Double click or press %1$s to change the color value" msgstr "" #: src/emu/ui/custui.cpp:617 diff --git a/src/emu/ui/custui.cpp b/src/emu/ui/custui.cpp index 1acecd1ba20..a6279ac5b54 100644 --- a/src/emu/ui/custui.cpp +++ b/src/emu/ui/custui.cpp @@ -588,7 +588,7 @@ void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom // bottom text // get the text for 'UI Select' std::string ui_select_text = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD)); - topbuf.assign(_("Double click or press ")).append(ui_select_text.c_str()).append(_(" to change the color value")); + topbuf = string_format(_("Double click or press %1$s to change the color value"), ui_select_text); mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); diff --git a/src/emu/ui/selsoft.cpp b/src/emu/ui/selsoft.cpp index 93be1b636ba..04cfaa375f9 100644 --- a/src/emu/ui/selsoft.cpp +++ b/src/emu/ui/selsoft.cpp @@ -826,7 +826,7 @@ void ui_menu_select_software::custom_render(void *selectedref, float top, float size_t found = copyright.find("\n"); tempbuf[0].clear(); - tempbuf[1].assign(emulator_info::get_appname()).append(" ").append(build_version); + tempbuf[1] = string_format("%s %s", emulator_info::get_appname(), build_version); tempbuf[2] = copyright.substr(0, found); tempbuf[3] = copyright.substr(found + 1); tempbuf[4].clear(); -- cgit v1.2.3-70-g09d2 From 04a6b500c30b47d3925d2f226b209350be7cc431 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 6 Mar 2016 13:18:09 +1100 Subject: Don't bother to localise error log for now --- src/emu/ui/ui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp index 8843675f57e..1933db93bcd 100644 --- a/src/emu/ui/ui.cpp +++ b/src/emu/ui/ui.cpp @@ -173,7 +173,7 @@ static void load_ui_options(running_machine &machine) { bool result = machine.ui().options().parse_ini_file((core_file&)file, OPTION_PRIORITY_MAME_INI, OPTION_PRIORITY_DRIVER_INI, error); if (!result) - osd_printf_error(_("**Error loading ui.ini**")); + osd_printf_error("**Error loading ui.ini**"); } } -- cgit v1.2.3-70-g09d2 From b35ea6e4a6bb965ee62802f214b432d9fe97f3cd Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Sun, 6 Mar 2016 03:42:41 +0100 Subject: Fixed MT06152: "Show mouse pointer" option stays off. (nw) --- src/emu/ui/miscmenu.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/emu/ui/miscmenu.cpp b/src/emu/ui/miscmenu.cpp index 89bf4182ffd..2145069bfab 100644 --- a/src/emu/ui/miscmenu.cpp +++ b/src/emu/ui/miscmenu.cpp @@ -574,7 +574,10 @@ ui_menu_misc_options::misc_option ui_menu_misc_options::m_options[] = { ui_menu_misc_options::ui_menu_misc_options(running_machine &machine, render_container *container) : ui_menu(machine, container) { for (int d = 1; d < ARRAY_LENGTH(m_options); ++d) - m_options[d].status = machine.ui().options().bool_value(m_options[d].option); + if (machine.ui().options().exists(m_options[d].option)) + m_options[d].status = machine.ui().options().bool_value(m_options[d].option); + else + m_options[d].status = machine.options().bool_value(m_options[d].option); } ui_menu_misc_options::~ui_menu_misc_options() @@ -585,7 +588,8 @@ ui_menu_misc_options::~ui_menu_misc_options() { machine().ui().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string); } - else { + else + { if (machine().options().bool_value(m_options[d].option) != m_options[d].status) { machine().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string); -- cgit v1.2.3-70-g09d2 From 7e2777df2a46ac09a030d70ef46e5bac90422b58 Mon Sep 17 00:00:00 2001 From: cracyc Date: Sat, 5 Mar 2016 21:37:26 -0600 Subject: pcat_dyn: "I/O BOARD FAILURE" (nw) --- src/devices/machine/8042kbdc.cpp | 4 ++- src/mame/drivers/pcat_dyn.cpp | 65 ++++++++++++++++++++++++++-------------- src/mame/machine/pcshare.cpp | 14 ++------- src/mame/machine/pcshare.h | 2 -- 4 files changed, 47 insertions(+), 38 deletions(-) (limited to 'src') diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp index a1d36a41b43..28c2855acf7 100644 --- a/src/devices/machine/8042kbdc.cpp +++ b/src/devices/machine/8042kbdc.cpp @@ -287,7 +287,8 @@ void kbdc8042_device::at_8042_receive(UINT8 data) m_input_buffer_full_cb(1); /* Lets 8952's timers do their job before clear the interrupt line, */ /* else Keyboard interrupt never happens. */ - machine().scheduler().timer_set(attotime::from_usec(2), timer_expired_delegate(FUNC(kbdc8042_device::kbdc8042_clr_int),this)); + /* Why was this done? It dies when an extended scan code is received */ + //machine().scheduler().timer_set(attotime::from_usec(2), timer_expired_delegate(FUNC(kbdc8042_device::kbdc8042_clr_int),this)); } } @@ -347,6 +348,7 @@ READ8_MEMBER(kbdc8042_device::data_r) switch (offset) { case 0: data = m_data; + m_input_buffer_full_cb(0); if ((m_status_read_mode != 3) || (data != 0xfa)) { if (m_keybtype != KBDC8042_AT386 || (data != 0x55)) diff --git a/src/mame/drivers/pcat_dyn.cpp b/src/mame/drivers/pcat_dyn.cpp index 25fdff8943e..bf2676a6522 100644 --- a/src/mame/drivers/pcat_dyn.cpp +++ b/src/mame/drivers/pcat_dyn.cpp @@ -33,33 +33,42 @@ keyboard trick; #include "cpu/i386/i386.h" #include "machine/pcshare.h" #include "video/pc_vga.h" - +#include "machine/bankdev.h" class pcat_dyn_state : public pcat_base_state { public: pcat_dyn_state(const machine_config &mconfig, device_type type, const char *tag) - : pcat_base_state(mconfig, type, tag) { } - - DECLARE_DRIVER_INIT(pcat_dyn); - virtual void machine_start() override; + : pcat_base_state(mconfig, type, tag) + , m_bank1(*this, "bank1") + , m_bank2(*this, "bank2"){ } + + required_device m_bank1; + required_device m_bank2; + DECLARE_WRITE8_MEMBER(bank1_w); + DECLARE_WRITE8_MEMBER(bank2_w); }; +WRITE8_MEMBER(pcat_dyn_state::bank1_w) +{ + m_bank1->set_bank(data); +} + +WRITE8_MEMBER(pcat_dyn_state::bank2_w) +{ + m_bank2->set_bank(data); +} -//ce9b8 -/* TODO: understand the proper ROM loading.*/ static ADDRESS_MAP_START( pcat_map, AS_PROGRAM, 32, pcat_dyn_state ) AM_RANGE(0x00000000, 0x0009ffff) AM_RAM AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", vga_device, mem_r, mem_w, 0xffffffff) AM_RANGE(0x000c0000, 0x000c7fff) AM_ROM AM_REGION("video_bios", 0) - AM_RANGE(0x000c8000, 0x000cffff) AM_RAM -// AM_RANGE(0x000d0000, 0x000d7fff) AM_RAM AM_REGION("disk_bios", 0) -// AM_RANGE(0x000d8000, 0x000dffff) AM_RAM AM_REGION("disk_bios", 0) -// AM_RANGE(0x000e0000, 0x000effff) AM_ROM AM_REGION("game_prg", 0) + AM_RANGE(0x000d0000, 0x000d0fff) AM_ROM AM_REGION("game_prg", 0x0000) AM_WRITE8(bank1_w, 0xffffffff) + AM_RANGE(0x000d1000, 0x000d1fff) AM_ROM AM_REGION("game_prg", 0x1000) AM_WRITE8(bank2_w, 0xffffffff) + AM_RANGE(0x000d2000, 0x000d3fff) AM_DEVICE("bank1", address_map_bank_device, amap32) + AM_RANGE(0x000d2000, 0x000d4fff) AM_DEVICE("bank2", address_map_bank_device, amap32) AM_RANGE(0x000f0000, 0x000fffff) AM_ROM AM_REGION("bios", 0 ) - AM_RANGE(0x00100000, 0x001fffff) AM_RAM //AM_REGION("game_prg", 0) -// AM_RANGE(0x00200000, 0x00ffffff) AM_RAM - //AM_RANGE(0x01000000, 0x01ffffff) AM_RAM + AM_RANGE(0x00100000, 0x001fffff) AM_RAM AM_RANGE(0xffff0000, 0xffffffff) AM_ROM AM_REGION("bios", 0 ) ADDRESS_MAP_END @@ -70,6 +79,10 @@ static ADDRESS_MAP_START( pcat_io, AS_IO, 32, pcat_dyn_state ) AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("vga", vga_device, port_03d0_r, port_03d0_w, 0xffffffff) ADDRESS_MAP_END +static ADDRESS_MAP_START( bank_map, AS_0, 32, pcat_dyn_state ) + AM_RANGE(0x00000, 0xfffff) AM_ROM AM_REGION("game_prg", 0) +ADDRESS_MAP_END + #define AT_KEYB_HELPER(bit, text, key1) \ PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1) @@ -104,9 +117,6 @@ static INPUT_PORTS_START( pcat_dyn ) PORT_START("pc_keyboard_7") INPUT_PORTS_END -void pcat_dyn_state::machine_start() -{ -} static MACHINE_CONFIG_START( pcat_dyn, pcat_dyn_state ) /* basic machine hardware */ @@ -119,9 +129,21 @@ static MACHINE_CONFIG_START( pcat_dyn, pcat_dyn_state ) MCFG_FRAGMENT_ADD( pcvideo_vga ) MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_FRAGMENT_ADD( pcat_common ) + + MCFG_DEVICE_ADD("bank1", ADDRESS_MAP_BANK, 0) + MCFG_DEVICE_PROGRAM_MAP(bank_map) + MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE) + MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(32) + MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(20) + MCFG_ADDRESS_MAP_BANK_STRIDE(0x1000) + MCFG_DEVICE_ADD("bank2", ADDRESS_MAP_BANK, 0) + MCFG_DEVICE_PROGRAM_MAP(bank_map) + MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE) + MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(32) + MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(20) + MCFG_ADDRESS_MAP_BANK_STRIDE(0x1000) MACHINE_CONFIG_END /*************************************** @@ -163,9 +185,6 @@ ROM_START(toursol1) ROM_LOAD("prom.7", 0xe0000, 0x02000, CRC(154c8092) SHA1(4439ee82f36d5d5c334494ba7bb4848e839213a7)) ROM_END -DRIVER_INIT_MEMBER(pcat_dyn_state,pcat_dyn) -{ -} -GAME( 1995, toursol, 0, pcat_dyn, pcat_dyn, pcat_dyn_state, pcat_dyn, ROT0, "Dynamo", "Tournament Solitaire (V1.06, 08/03/95)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND ) -GAME( 1995, toursol1, toursol, pcat_dyn, pcat_dyn, pcat_dyn_state, pcat_dyn, ROT0, "Dynamo", "Tournament Solitaire (V1.04, 06/22/95)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND ) +GAME( 1995, toursol, 0, pcat_dyn, pcat_dyn, driver_device, 0, ROT0, "Dynamo", "Tournament Solitaire (V1.06, 08/03/95)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND ) +GAME( 1995, toursol1, toursol, pcat_dyn, pcat_dyn, driver_device, 0, ROT0, "Dynamo", "Tournament Solitaire (V1.04, 06/22/95)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND ) diff --git a/src/mame/machine/pcshare.cpp b/src/mame/machine/pcshare.cpp index 46b53464304..a6701fb9ac4 100644 --- a/src/mame/machine/pcshare.cpp +++ b/src/mame/machine/pcshare.cpp @@ -21,16 +21,6 @@ DMA8237 Controller ******************/ -READ8_MEMBER(pcat_base_state::at_dma8237_2_r) -{ - return m_dma8237_2->read(space, offset / 2); -} - -WRITE8_MEMBER(pcat_base_state::at_dma8237_2_w) -{ - m_dma8237_2->write(space, offset / 2, data); -} - WRITE_LINE_MEMBER( pcat_base_state::pc_dma_hrq_changed ) { m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); @@ -134,7 +124,7 @@ WRITE_LINE_MEMBER( pcat_base_state::at_pit8254_out2_changed ) } - ADDRESS_MAP_START( pcat32_io_common, AS_IO, 32, pcat_base_state ) +ADDRESS_MAP_START( pcat32_io_common, AS_IO, 32, pcat_base_state ) AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", am9517a_device, read, write, 0xffffffff) AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8("pic8259_1", pic8259_device, read, write, 0xffffffff) AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8("pit8254", pit8254_device, read, write, 0xffffffff) @@ -142,7 +132,7 @@ WRITE_LINE_MEMBER( pcat_base_state::at_pit8254_out2_changed ) AM_RANGE(0x0070, 0x007f) AM_DEVREADWRITE8("rtc", mc146818_device, read, write, 0xffffffff) AM_RANGE(0x0080, 0x009f) AM_READWRITE8(dma_page_select_r,dma_page_select_w, 0xffffffff)//TODO AM_RANGE(0x00a0, 0x00bf) AM_DEVREADWRITE8("pic8259_2", pic8259_device, read, write, 0xffffffff) - AM_RANGE(0x00c0, 0x00df) AM_READWRITE8(at_dma8237_2_r, at_dma8237_2_w, 0xffffffff) + AM_RANGE(0x00c0, 0x00df) AM_DEVREADWRITE8("dma8237_2", am9517a_device, read, write, 0x00ff00ff) ADDRESS_MAP_END MACHINE_CONFIG_FRAGMENT(pcat_common) diff --git a/src/mame/machine/pcshare.h b/src/mame/machine/pcshare.h index 81d423ad1d0..b413d2bc42c 100644 --- a/src/mame/machine/pcshare.h +++ b/src/mame/machine/pcshare.h @@ -31,8 +31,6 @@ public: optional_device m_mc146818; required_device m_kbdc; - DECLARE_READ8_MEMBER(at_dma8237_2_r); - DECLARE_WRITE8_MEMBER(at_dma8237_2_w); DECLARE_WRITE_LINE_MEMBER(pc_dma_hrq_changed); DECLARE_READ8_MEMBER(pc_dma_read_byte); DECLARE_WRITE8_MEMBER(pc_dma_write_byte); -- cgit v1.2.3-70-g09d2 From 748fdf2bb6e0399535921e732d8c18aa64a64602 Mon Sep 17 00:00:00 2001 From: Justin Kerk Date: Sun, 6 Mar 2016 00:17:31 -0800 Subject: Fill out mess.flt exceptions (nw) --- src/mame/mess.flt | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mame/mess.flt b/src/mame/mess.flt index 28a2befb2cb..d79069a97f2 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -101,7 +101,6 @@ ccs2810.cpp ccs300.cpp cd2650.cpp cdc721.cpp -cdi.cpp cfx9850.cpp cgc7900.cpp cgenie.cpp @@ -266,7 +265,6 @@ isbc.cpp iskr103x.cpp itt3030.cpp jade.cpp -jaguar.cpp jonos.cpp jr100.cpp jr200.cpp @@ -281,7 +279,6 @@ k8915.cpp kaypro.cpp kc.cpp kim1.cpp -konamim2.cpp konin.cpp kramermc.cpp kyocera.cpp @@ -671,9 +668,24 @@ zorba.cpp zrt80.cpp zsbc3.cpp zx.cpp -//exceptions + to add - to remove form imported list +//exceptions + to add - to remove from imported list +//3do.cpp +-3dobios -orbatak +//cps1.cpp +wofch +sfzch +sfach +sfzbch +//cdi.cpp ++cdimono1 ++cdimono2 ++cdi910 ++cdi490a +//jaguar.cpp ++jaguar ++jaguarcd +//konamim2.cpp ++3do_m2 +//vectrex.cpp +-raaspec -- cgit v1.2.3-70-g09d2 From 73b44c94291c4d086477167a76fd7db239936c3b Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 6 Mar 2016 18:02:37 +1100 Subject: Turn core_file into a proper class that gets cleaned up safely using unique_ptr Subverted somewhat by chd_file class --- src/devices/bus/a7800/a78_slot.cpp | 4 +- src/devices/bus/a800/a800_slot.cpp | 12 +- src/devices/bus/apf/slot.cpp | 2 +- src/devices/bus/astrocde/slot.cpp | 2 +- src/devices/bus/c64/exp.cpp | 6 +- src/devices/bus/chanf/slot.cpp | 2 +- src/devices/bus/coleco/exp.cpp | 2 +- src/devices/bus/crvision/slot.cpp | 2 +- src/devices/bus/gameboy/gb_slot.cpp | 4 +- src/devices/bus/gba/gba_slot.cpp | 4 +- src/devices/bus/intv/slot.cpp | 4 +- src/devices/bus/isa/omti8621.cpp | 2 +- src/devices/bus/isa/sc499.cpp | 2 +- src/devices/bus/megadrive/md_slot.cpp | 4 +- src/devices/bus/msx_slot/cartridge.cpp | 4 +- src/devices/bus/nes/aladdin.cpp | 4 +- src/devices/bus/nes/nes_slot.cpp | 4 +- src/devices/bus/odyssey2/slot.cpp | 2 +- src/devices/bus/pce/pce_slot.cpp | 4 +- src/devices/bus/scv/slot.cpp | 4 +- src/devices/bus/sega8/sega8_slot.cpp | 4 +- src/devices/bus/snes/snes_slot.cpp | 4 +- src/devices/bus/vc4000/slot.cpp | 2 +- src/devices/bus/vcs/vcs_slot.cpp | 4 +- src/devices/bus/vectrex/slot.cpp | 4 +- src/devices/bus/vic10/exp.cpp | 6 +- src/devices/bus/wswan/slot.cpp | 4 +- src/devices/imagedev/chd_cd.cpp | 2 +- src/devices/imagedev/diablo.cpp | 6 +- src/devices/imagedev/floppy.cpp | 15 +- src/devices/imagedev/harddriv.cpp | 6 +- src/devices/machine/serflash.cpp | 2 +- src/devices/sound/samples.cpp | 2 +- src/emu/clifront.cpp | 2 +- src/emu/diimage.cpp | 31 +- src/emu/diimage.h | 23 +- src/emu/emuopts.cpp | 2 +- src/emu/fileio.cpp | 80 +- src/emu/fileio.h | 11 +- src/emu/ui/optsmenu.cpp | 2 +- src/emu/ui/ui.cpp | 2 +- src/lib/formats/cbm_crt.cpp | 28 +- src/lib/formats/cbm_crt.h | 6 +- src/lib/formats/ioprocs.cpp | 21 +- src/lib/util/cdrom.cpp | 12 +- src/lib/util/chd.cpp | 68 +- src/lib/util/chd.h | 10 +- src/lib/util/corefile.cpp | 1631 ++++++++++++++++++-------------- src/lib/util/corefile.h | 122 +-- src/lib/util/flac.cpp | 14 +- src/lib/util/flac.h | 12 +- src/lib/util/options.cpp | 4 +- src/lib/util/options.h | 2 +- src/lib/util/png.cpp | 62 +- src/lib/util/png.h | 12 +- src/lib/util/xmlfile.cpp | 30 +- src/lib/util/xmlfile.h | 4 +- src/lib/util/zippath.cpp | 12 +- src/lib/util/zippath.h | 2 +- src/tools/chdman.cpp | 178 ++-- src/tools/imgtool/stream.cpp | 237 ++--- src/tools/imgtool/stream.h | 2 +- src/tools/ldresample.cpp | 2 +- src/tools/pngcmp.cpp | 20 +- src/tools/regrep.cpp | 140 +-- src/tools/split.cpp | 68 +- src/tools/src2html.cpp | 92 +- src/tools/unidasm.cpp | 2 +- 68 files changed, 1621 insertions(+), 1460 deletions(-) mode change 100755 => 100644 src/devices/bus/vcs/vcs_slot.cpp (limited to 'src') diff --git a/src/devices/bus/a7800/a78_slot.cpp b/src/devices/bus/a7800/a78_slot.cpp index 0509753a1c3..53541560fa4 100644 --- a/src/devices/bus/a7800/a78_slot.cpp +++ b/src/devices/bus/a7800/a78_slot.cpp @@ -537,7 +537,7 @@ std::string a78_cart_slot_device::get_default_card_software() int type = A78_TYPE0, mapper; // Load and check the header - core_fread(m_file, &head[0], 128); + m_file->read(&head[0], 128); // let's try to auto-fix some common errors in the header mapper = validate_header((head[53] << 8) | head[54], FALSE); @@ -558,7 +558,7 @@ std::string a78_cart_slot_device::get_default_card_software() break; case 0x0022: case 0x0026: - if (core_fsize(m_file) > 0x40000) + if (m_file->size() > 0x40000) type = A78_MEGACART; else type = A78_VERSABOARD; diff --git a/src/devices/bus/a800/a800_slot.cpp b/src/devices/bus/a800/a800_slot.cpp index b2e46a421da..8f0f416ab0f 100644 --- a/src/devices/bus/a800/a800_slot.cpp +++ b/src/devices/bus/a800/a800_slot.cpp @@ -412,13 +412,13 @@ std::string a800_cart_slot_device::get_default_card_software() { const char *slot_string; dynamic_buffer head(0x10); - UINT32 len = core_fsize(m_file); + UINT32 len = m_file->size(); int type = A800_8K; // check whether there is an header, to identify the cart type if ((len % 0x1000) == 0x10) { - core_fread(m_file, &head[0], 0x10); + m_file->read(&head[0], 0x10); type = identify_cart_type(&head[0]); } else // otherwise try to guess based on size @@ -449,13 +449,13 @@ std::string a5200_cart_slot_device::get_default_card_software() { const char *slot_string; dynamic_buffer head(0x10); - UINT32 len = core_fsize(m_file); + UINT32 len = m_file->size(); int type = A5200_8K; // check whether there is an header, to identify the cart type if ((len % 0x1000) == 0x10) { - core_fread(m_file, &head[0], 0x10); + m_file->read(&head[0], 0x10); type = identify_cart_type(&head[0]); std::string info; @@ -482,13 +482,13 @@ std::string xegs_cart_slot_device::get_default_card_software() { const char *slot_string; dynamic_buffer head(0x10); - UINT32 len = core_fsize(m_file); + UINT32 len = m_file->size(); int type = A800_8K; // check whether there is an header, to identify the cart type if ((len % 0x1000) == 0x10) { - core_fread(m_file, &head[0], 0x10); + m_file->read(&head[0], 0x10); type = identify_cart_type(&head[0]); } if (type != A800_XEGS) diff --git a/src/devices/bus/apf/slot.cpp b/src/devices/bus/apf/slot.cpp index eb2e17d9f80..af872826ce3 100644 --- a/src/devices/bus/apf/slot.cpp +++ b/src/devices/bus/apf/slot.cpp @@ -226,7 +226,7 @@ std::string apf_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 size = core_fsize(m_file); + UINT32 size = m_file->size(); int type = APF_STD; // attempt to identify Space Destroyer, which needs 1K of additional RAM diff --git a/src/devices/bus/astrocde/slot.cpp b/src/devices/bus/astrocde/slot.cpp index 8ae7bbe8c15..2cab9c3c285 100644 --- a/src/devices/bus/astrocde/slot.cpp +++ b/src/devices/bus/astrocde/slot.cpp @@ -203,7 +203,7 @@ std::string astrocade_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 size = core_fsize(m_file); + UINT32 size = m_file->size(); int type = ASTROCADE_STD; if (size == 0x40000) diff --git a/src/devices/bus/c64/exp.cpp b/src/devices/bus/c64/exp.cpp index 47e2a20cc14..31263c5f927 100644 --- a/src/devices/bus/c64/exp.cpp +++ b/src/devices/bus/c64/exp.cpp @@ -153,7 +153,7 @@ bool c64_expansion_slot_device::call_load() int exrom = 1; int game = 1; - if (cbm_crt_read_header(m_file, &roml_size, &romh_size, &exrom, &game)) + if (cbm_crt_read_header(*m_file, &roml_size, &romh_size, &exrom, &game)) { UINT8 *roml = nullptr; UINT8 *romh = nullptr; @@ -164,7 +164,7 @@ bool c64_expansion_slot_device::call_load() if (roml_size) roml = m_card->m_roml; if (romh_size) romh = m_card->m_roml; - cbm_crt_read_data(m_file, roml, romh); + cbm_crt_read_data(*m_file, roml, romh); } m_card->m_exrom = exrom; @@ -222,7 +222,7 @@ std::string c64_expansion_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { if (!core_stricmp(filetype(), "crt")) - return cbm_crt_get_card(m_file); + return cbm_crt_get_card(*m_file); clear(); } diff --git a/src/devices/bus/chanf/slot.cpp b/src/devices/bus/chanf/slot.cpp index 72045151cca..ea5b00b5348 100644 --- a/src/devices/bus/chanf/slot.cpp +++ b/src/devices/bus/chanf/slot.cpp @@ -222,7 +222,7 @@ std::string channelf_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 len = core_fsize(m_file); + UINT32 len = m_file->size(); int type; if (len == 0x40000) diff --git a/src/devices/bus/coleco/exp.cpp b/src/devices/bus/coleco/exp.cpp index 05a53b584a5..53953f82859 100644 --- a/src/devices/bus/coleco/exp.cpp +++ b/src/devices/bus/coleco/exp.cpp @@ -116,7 +116,7 @@ std::string colecovision_cartridge_slot_device::get_default_card_software() { if (open_image_file(mconfig().options())) { - UINT32 length = core_fsize(m_file); + UINT32 length = m_file->size(); if (length == 0x100000 || length == 0x200000) return software_get_default_slot("xin1"); } diff --git a/src/devices/bus/crvision/slot.cpp b/src/devices/bus/crvision/slot.cpp index 74c9eb28645..22af6ced64c 100644 --- a/src/devices/bus/crvision/slot.cpp +++ b/src/devices/bus/crvision/slot.cpp @@ -234,7 +234,7 @@ std::string crvision_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 size = core_fsize(m_file); + UINT32 size = m_file->size(); int type = CRV_4K; switch (size) diff --git a/src/devices/bus/gameboy/gb_slot.cpp b/src/devices/bus/gameboy/gb_slot.cpp index 55555a8d4b2..47236928fb7 100644 --- a/src/devices/bus/gameboy/gb_slot.cpp +++ b/src/devices/bus/gameboy/gb_slot.cpp @@ -605,11 +605,11 @@ std::string base_gb_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 len = core_fsize(m_file), offset = 0; + UINT32 len = m_file->size(), offset = 0; dynamic_buffer rom(len); int type; - core_fread(m_file, &rom[0], len); + m_file->read(&rom[0], len); if ((len % 0x4000) == 512) offset = 512; diff --git a/src/devices/bus/gba/gba_slot.cpp b/src/devices/bus/gba/gba_slot.cpp index 217f3f9e954..10c5d45a0a8 100644 --- a/src/devices/bus/gba/gba_slot.cpp +++ b/src/devices/bus/gba/gba_slot.cpp @@ -405,11 +405,11 @@ std::string gba_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 len = core_fsize(m_file); + UINT32 len = m_file->size(); dynamic_buffer rom(len); int type; - core_fread(m_file, &rom[0], len); + m_file->read(&rom[0], len); type = get_cart_type(&rom[0], len); slot_string = gba_get_slot(type); diff --git a/src/devices/bus/intv/slot.cpp b/src/devices/bus/intv/slot.cpp index 87f36e14bac..d502016fe76 100644 --- a/src/devices/bus/intv/slot.cpp +++ b/src/devices/bus/intv/slot.cpp @@ -464,11 +464,11 @@ std::string intv_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 len = core_fsize(m_file); + UINT32 len = m_file->size(); dynamic_buffer rom(len); int type = INTV_STD; - core_fread(m_file, &rom[0], len); + m_file->read(&rom[0], len); if (rom[0] == 0xa8 && (rom[1] == (rom[2] ^ 0xff))) { diff --git a/src/devices/bus/isa/omti8621.cpp b/src/devices/bus/isa/omti8621.cpp index c3eb61bf0e8..15255f1f3e5 100644 --- a/src/devices/bus/isa/omti8621.cpp +++ b/src/devices/bus/isa/omti8621.cpp @@ -1370,7 +1370,7 @@ void omti_disk_image_device::device_start() { m_image = this; - if (m_image->image_core_file() == nullptr) + if (!m_image->is_open()) { LOG1(("device_start_omti_disk: no disk")); } diff --git a/src/devices/bus/isa/sc499.cpp b/src/devices/bus/isa/sc499.cpp index 88a0272a9c1..5e044759603 100644 --- a/src/devices/bus/isa/sc499.cpp +++ b/src/devices/bus/isa/sc499.cpp @@ -344,7 +344,7 @@ void sc499_device::device_start() m_installed = false; - if (m_image->image_core_file() == nullptr) + if (!m_image->is_open()) { LOG2(("start sc499: no cartridge tape")); } diff --git a/src/devices/bus/megadrive/md_slot.cpp b/src/devices/bus/megadrive/md_slot.cpp index a2674838914..f44e0597cd4 100644 --- a/src/devices/bus/megadrive/md_slot.cpp +++ b/src/devices/bus/megadrive/md_slot.cpp @@ -905,11 +905,11 @@ std::string base_md_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 len = core_fsize(m_file), offset = 0; + UINT32 len = m_file->size(), offset = 0; dynamic_buffer rom(len); int type; - core_fread(m_file, &rom[0], len); + m_file->read(&rom[0], len); if (genesis_is_SMD(&rom[0x200], len - 0x200)) offset = 0x200; diff --git a/src/devices/bus/msx_slot/cartridge.cpp b/src/devices/bus/msx_slot/cartridge.cpp index c24df3bf1fb..ae806337359 100644 --- a/src/devices/bus/msx_slot/cartridge.cpp +++ b/src/devices/bus/msx_slot/cartridge.cpp @@ -283,7 +283,7 @@ std::string msx_slot_cartridge_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string = "nomapper"; - UINT32 length = core_fsize(m_file); + UINT32 length = m_file->size(); dynamic_buffer rom(length); int type = NOMAPPER; @@ -328,7 +328,7 @@ std::string msx_slot_cartridge_device::get_default_card_software() if (type == NOMAPPER) { // Not identified through hashfile, try automatic detection - core_fread(m_file, &rom[0], length); + m_file->read(&rom[0], length); type = get_cart_type(&rom[0], length); } diff --git a/src/devices/bus/nes/aladdin.cpp b/src/devices/bus/nes/aladdin.cpp index bad863b9255..bded198c5a7 100644 --- a/src/devices/bus/nes/aladdin.cpp +++ b/src/devices/bus/nes/aladdin.cpp @@ -147,11 +147,11 @@ std::string nes_aladdin_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string = "algn"; - UINT32 len = core_fsize(m_file); + UINT32 len = m_file->size(); dynamic_buffer rom(len); UINT8 mapper; - core_fread(m_file, &rom[0], len); + m_file->read(&rom[0], len); mapper = (rom[6] & 0xf0) >> 4; mapper |= rom[7] & 0xf0; diff --git a/src/devices/bus/nes/nes_slot.cpp b/src/devices/bus/nes/nes_slot.cpp index 05adca0f9ae..5eaf22852c9 100644 --- a/src/devices/bus/nes/nes_slot.cpp +++ b/src/devices/bus/nes/nes_slot.cpp @@ -917,10 +917,10 @@ std::string nes_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string = "nrom"; - UINT32 len = core_fsize(m_file); + UINT32 len = m_file->size(); dynamic_buffer rom(len); - core_fread(m_file, &rom[0], len); + m_file->read(&rom[0], len); if ((rom[0] == 'N') && (rom[1] == 'E') && (rom[2] == 'S')) slot_string = get_default_card_ines(&rom[0], len); diff --git a/src/devices/bus/odyssey2/slot.cpp b/src/devices/bus/odyssey2/slot.cpp index 0a6e35028b9..3d0f8714288 100644 --- a/src/devices/bus/odyssey2/slot.cpp +++ b/src/devices/bus/odyssey2/slot.cpp @@ -214,7 +214,7 @@ std::string o2_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 size = core_fsize(m_file); + UINT32 size = m_file->size(); int type = O2_STD; if (size == 12288) diff --git a/src/devices/bus/pce/pce_slot.cpp b/src/devices/bus/pce/pce_slot.cpp index 4fffa5172fc..6a1e5859f1f 100644 --- a/src/devices/bus/pce/pce_slot.cpp +++ b/src/devices/bus/pce/pce_slot.cpp @@ -344,11 +344,11 @@ std::string pce_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 len = core_fsize(m_file); + UINT32 len = m_file->size(); dynamic_buffer rom(len); int type; - core_fread(m_file, &rom[0], len); + m_file->read(&rom[0], len); type = get_cart_type(&rom[0], len); slot_string = pce_get_slot(type); diff --git a/src/devices/bus/scv/slot.cpp b/src/devices/bus/scv/slot.cpp index 15495afe918..daf31a27885 100644 --- a/src/devices/bus/scv/slot.cpp +++ b/src/devices/bus/scv/slot.cpp @@ -264,11 +264,11 @@ std::string scv_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 len = core_fsize(m_file); + UINT32 len = m_file->size(); dynamic_buffer rom(len); int type; - core_fread(m_file, &rom[0], len); + m_file->read(&rom[0], len); type = get_cart_type(&rom[0], len); slot_string = scv_get_slot(type); diff --git a/src/devices/bus/sega8/sega8_slot.cpp b/src/devices/bus/sega8/sega8_slot.cpp index df3c59adc05..a3ebf09c463 100644 --- a/src/devices/bus/sega8/sega8_slot.cpp +++ b/src/devices/bus/sega8/sega8_slot.cpp @@ -608,11 +608,11 @@ std::string sega8_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 len = core_fsize(m_file), offset = 0; + UINT32 len = m_file->size(), offset = 0; dynamic_buffer rom(len); int type; - core_fread(m_file, &rom[0], len); + m_file->read(&rom[0], len); if ((len % 0x4000) == 512) offset = 512; diff --git a/src/devices/bus/snes/snes_slot.cpp b/src/devices/bus/snes/snes_slot.cpp index 65c2fffdb4d..38260a06e84 100644 --- a/src/devices/bus/snes/snes_slot.cpp +++ b/src/devices/bus/snes/snes_slot.cpp @@ -1007,11 +1007,11 @@ std::string base_sns_cart_slot_device::get_default_card_software() { const char *slot_string; UINT32 offset; - UINT32 len = core_fsize(m_file); + UINT32 len = m_file->size(); dynamic_buffer rom(len); int type = 0, addon = 0; - core_fread(m_file, &rom[0], len); + m_file->read(&rom[0], len); offset = snes_skip_header(&rom[0], len); diff --git a/src/devices/bus/vc4000/slot.cpp b/src/devices/bus/vc4000/slot.cpp index 0b67a264c34..ba75cd67267 100644 --- a/src/devices/bus/vc4000/slot.cpp +++ b/src/devices/bus/vc4000/slot.cpp @@ -240,7 +240,7 @@ std::string vc4000_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 size = core_fsize(m_file); + UINT32 size = m_file->size(); int type = VC4000_STD; // attempt to identify the non-standard types diff --git a/src/devices/bus/vcs/vcs_slot.cpp b/src/devices/bus/vcs/vcs_slot.cpp old mode 100755 new mode 100644 index b946c8051e7..b8b25b864d4 --- a/src/devices/bus/vcs/vcs_slot.cpp +++ b/src/devices/bus/vcs/vcs_slot.cpp @@ -786,11 +786,11 @@ std::string vcs_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 len = core_fsize(m_file); + UINT32 len = m_file->size(); dynamic_buffer rom(len); int type; - core_fread(m_file, &rom[0], len); + m_file->read(&rom[0], len); type = identify_cart_type(&rom[0], len); slot_string = vcs_get_slot(type); diff --git a/src/devices/bus/vectrex/slot.cpp b/src/devices/bus/vectrex/slot.cpp index 1a9bbed7d29..14e531b8cd2 100644 --- a/src/devices/bus/vectrex/slot.cpp +++ b/src/devices/bus/vectrex/slot.cpp @@ -222,11 +222,11 @@ std::string vectrex_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 size = core_fsize(m_file); + UINT32 size = m_file->size(); dynamic_buffer rom(size); int type = VECTREX_STD; - core_fread(m_file, &rom[0], size); + m_file->read(&rom[0], size); if (!memcmp(&rom[0x06], "SRAM", 4)) type = VECTREX_SRAM; diff --git a/src/devices/bus/vic10/exp.cpp b/src/devices/bus/vic10/exp.cpp index 1aa6f2e6363..76c55ff7d79 100644 --- a/src/devices/bus/vic10/exp.cpp +++ b/src/devices/bus/vic10/exp.cpp @@ -139,7 +139,7 @@ bool vic10_expansion_slot_device::call_load() int exrom = 1; int game = 1; - if (cbm_crt_read_header(m_file, &roml_size, &romh_size, &exrom, &game)) + if (cbm_crt_read_header(*m_file, &roml_size, &romh_size, &exrom, &game)) { UINT8 *roml = nullptr; UINT8 *romh = nullptr; @@ -150,7 +150,7 @@ bool vic10_expansion_slot_device::call_load() if (roml_size) roml = m_card->m_lorom; if (romh_size) romh = m_card->m_lorom; - cbm_crt_read_data(m_file, roml, romh); + cbm_crt_read_data(*m_file, roml, romh); } } } @@ -187,7 +187,7 @@ std::string vic10_expansion_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { if (!core_stricmp(filetype(), "crt")) - return cbm_crt_get_card(m_file); + return cbm_crt_get_card(*m_file); clear(); } diff --git a/src/devices/bus/wswan/slot.cpp b/src/devices/bus/wswan/slot.cpp index b5b95851f00..256487bc8e1 100644 --- a/src/devices/bus/wswan/slot.cpp +++ b/src/devices/bus/wswan/slot.cpp @@ -311,12 +311,12 @@ std::string ws_cart_slot_device::get_default_card_software() if (open_image_file(mconfig().options())) { const char *slot_string; - UINT32 size = core_fsize(m_file); + UINT32 size = m_file->size(); dynamic_buffer rom(size); int type; UINT32 nvram; - core_fread(m_file, &rom[0], size); + m_file->read(&rom[0], size); // nvram size is not really used here, but we set it up nevertheless type = get_cart_type(&rom[0], size, nvram); diff --git a/src/devices/imagedev/chd_cd.cpp b/src/devices/imagedev/chd_cd.cpp index d9ab295dfad..630403001ff 100644 --- a/src/devices/imagedev/chd_cd.cpp +++ b/src/devices/imagedev/chd_cd.cpp @@ -109,7 +109,7 @@ bool cdrom_image_device::call_load() if (software_entry() == nullptr) { if (strstr(m_image_name.c_str(), ".chd") && is_loaded()) { - err = m_self_chd.open( *image_core_file() ); /* CDs are never writeable */ + err = m_self_chd.open( image_core_file() ); /* CDs are never writeable */ if ( err ) goto error; chd = &m_self_chd; diff --git a/src/devices/imagedev/diablo.cpp b/src/devices/imagedev/diablo.cpp index f9d4218856a..6ba6aad5cf2 100644 --- a/src/devices/imagedev/diablo.cpp +++ b/src/devices/imagedev/diablo.cpp @@ -124,7 +124,7 @@ bool diablo_image_device::call_create(int create_format, option_resolution *crea /* create the CHD file */ chd_codec_type compression[4] = { CHD_CODEC_NONE }; - err = m_origchd.create(*image_core_file(), (UINT64)totalsectors * (UINT64)sectorsize, hunksize, sectorsize, compression); + err = m_origchd.create(image_core_file(), (UINT64)totalsectors * (UINT64)sectorsize, hunksize, sectorsize, compression); if (err != CHDERR_NONE) goto error; @@ -219,14 +219,14 @@ int diablo_image_device::internal_load_dsk() } else { - err = m_origchd.open(*image_core_file(), true); + err = m_origchd.open(image_core_file(), true); if (err == CHDERR_NONE) { m_chd = &m_origchd; } else if (err == CHDERR_FILE_NOT_WRITEABLE) { - err = m_origchd.open(*image_core_file(), false); + err = m_origchd.open(image_core_file(), false); if (err == CHDERR_NONE) { err = open_disk_diff(device().machine().options(), basename_noext(), m_origchd, m_diffchd); diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index cb7e184f811..9a2bd21d764 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -295,7 +295,7 @@ void floppy_image_device::commit_image() io.procs = &image_ioprocs; io.filler = 0xff; - file_error err = core_truncate(image_core_file(), 0); + file_error err = image_core_file().truncate(0); if (err != 0) popmessage("Error, unable to truncate image: %d", err); @@ -362,7 +362,7 @@ void floppy_image_device::device_timer(emu_timer &timer, device_timer_id id, int floppy_image_format_t *floppy_image_device::identify(std::string filename) { - core_file *fd; + util::core_file::ptr fd; std::string revised_path; file_error err = zippath_fopen(filename.c_str(), OPEN_FLAG_READ, fd, revised_path); @@ -372,19 +372,20 @@ floppy_image_format_t *floppy_image_device::identify(std::string filename) } io_generic io; - io.file = fd; + io.file = fd.get(); io.procs = &corefile_ioprocs_noclose; io.filler = 0xff; int best = 0; floppy_image_format_t *best_format = nullptr; - for(floppy_image_format_t *format = fif_list; format; format = format->next) { + for (floppy_image_format_t *format = fif_list; format; format = format->next) + { int score = format->identify(&io, form_factor); if(score > best) { best = score; best_format = format; } } - core_fclose(fd); + fd.reset(); return best_format; } @@ -1001,11 +1002,11 @@ void ui_menu_control_floppy_image::hook_load(std::string filename, bool softlist if(can_in_place) { file_error filerr; std::string tmp_path; - core_file *tmp_file; + util::core_file::ptr tmp_file; /* attempt to open the file for writing but *without* create */ filerr = zippath_fopen(filename.c_str(), OPEN_FLAG_READ | OPEN_FLAG_WRITE, tmp_file, tmp_path); if(!filerr) - core_fclose(tmp_file); + tmp_file.reset(); else can_in_place = false; } diff --git a/src/devices/imagedev/harddriv.cpp b/src/devices/imagedev/harddriv.cpp index c03b0e4075b..d07852e166f 100644 --- a/src/devices/imagedev/harddriv.cpp +++ b/src/devices/imagedev/harddriv.cpp @@ -148,7 +148,7 @@ bool harddisk_image_device::call_create(int create_format, option_resolution *cr /* create the CHD file */ chd_codec_type compression[4] = { CHD_CODEC_NONE }; - err = m_origchd.create(*image_core_file(), (UINT64)totalsectors * (UINT64)sectorsize, hunksize, sectorsize, compression); + err = m_origchd.create(image_core_file(), (UINT64)totalsectors * (UINT64)sectorsize, hunksize, sectorsize, compression); if (err != CHDERR_NONE) goto error; @@ -243,14 +243,14 @@ int harddisk_image_device::internal_load_hd() } else { - err = m_origchd.open(*image_core_file(), true); + err = m_origchd.open(image_core_file(), true); if (err == CHDERR_NONE) { m_chd = &m_origchd; } else if (err == CHDERR_FILE_NOT_WRITEABLE) { - err = m_origchd.open(*image_core_file(), false); + err = m_origchd.open(image_core_file(), false); if (err == CHDERR_NONE) { err = open_disk_diff(device().machine().options(), basename_noext(), m_origchd, m_diffchd); diff --git a/src/devices/machine/serflash.cpp b/src/devices/machine/serflash.cpp index ebdd1dd53a9..f5a002ae929 100644 --- a/src/devices/machine/serflash.cpp +++ b/src/devices/machine/serflash.cpp @@ -77,7 +77,7 @@ void serflash_device::nvram_read(emu_file &file) int size = m_length / FLASH_PAGE_SIZE; - if (file) + if (file.is_open()) { UINT32 page; file.read(&page, 4); diff --git a/src/devices/sound/samples.cpp b/src/devices/sound/samples.cpp index 7a756dbb0fe..62bd8e02657 100644 --- a/src/devices/sound/samples.cpp +++ b/src/devices/sound/samples.cpp @@ -571,7 +571,7 @@ bool samples_device::read_flac_sample(emu_file &file, sample_t &sample) file.seek(0, SEEK_SET); // create the FLAC decoder and fill in the sample data - flac_decoder decoder((core_file&) file); + flac_decoder decoder((util::core_file &)file); sample.frequency = decoder.sample_rate(); // error if more than 1 channel or not 16bpp diff --git a/src/emu/clifront.cpp b/src/emu/clifront.cpp index 4476e4e0151..7c6c974cce7 100644 --- a/src/emu/clifront.cpp +++ b/src/emu/clifront.cpp @@ -1880,7 +1880,7 @@ void media_identifier::identify_file(const char *name) // load the file and process if it opens and has a valid length UINT32 length; void *data; - file_error filerr = core_fload(name, &data, &length); + const file_error filerr = util::core_file::load(name, &data, length); if (filerr == FILERR_NONE && length > 0) { identify_data(name, reinterpret_cast(data), length); diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp index d43cfe02fed..704f7d987e8 100644 --- a/src/emu/diimage.cpp +++ b/src/emu/diimage.cpp @@ -57,8 +57,8 @@ const image_device_type_info device_image_interface::m_device_info_array[] = device_image_interface::device_image_interface(const machine_config &mconfig, device_t &device) : device_interface(device, "image"), m_err(), - m_file(nullptr), - m_mame_file(nullptr), + m_file(), + m_mame_file(), m_software_info_ptr(nullptr), m_software_part_ptr(nullptr), m_supported(0), @@ -611,12 +611,11 @@ bool device_image_interface::is_loaded() image_error_t device_image_interface::load_image_by_path(UINT32 open_flags, const char *path) { - file_error filerr; image_error_t err; std::string revised_path; /* attempt to read the file */ - filerr = zippath_fopen(path, open_flags, m_file, revised_path); + auto const filerr = zippath_fopen(path, open_flags, m_file, revised_path); /* did the open succeed? */ switch(filerr) @@ -662,15 +661,13 @@ image_error_t device_image_interface::load_image_by_path(UINT32 open_flags, cons int device_image_interface::reopen_for_write(const char *path) { - if(m_file) - core_fclose(m_file); + m_file.reset(); - file_error filerr; image_error_t err; std::string revised_path; /* attempt to open the file for writing*/ - filerr = zippath_fopen(path, OPEN_FLAG_READ|OPEN_FLAG_WRITE|OPEN_FLAG_CREATE, m_file, revised_path); + auto const filerr = zippath_fopen(path, OPEN_FLAG_READ|OPEN_FLAG_WRITE|OPEN_FLAG_CREATE, m_file, revised_path); /* did the open succeed? */ switch(filerr) @@ -876,10 +873,9 @@ bool device_image_interface::load_software(software_list_device &swlist, const c warningcount += verify_length_and_hash(m_mame_file.get(),ROM_GETNAME(romp),ROM_GETLENGTH(romp),hash_collection(ROM_GETHASHDATA(romp))); if (filerr == FILERR_NONE) - { - m_file = *m_mame_file; + filerr = util::core_file::open_proxy(*m_mame_file, m_file); + if (filerr == FILERR_NONE) retVal = TRUE; - } break; // load first item for start } @@ -1118,17 +1114,8 @@ bool device_image_interface::create(const char *path, const image_device_format void device_image_interface::clear() { - if (m_mame_file) - { - m_mame_file = nullptr; - m_file = nullptr; - } else { - if (m_file) - { - core_fclose(m_file); - m_file = nullptr; - } - } + m_mame_file.reset(); + m_file.reset(); m_image_name.clear(); m_readonly = false; diff --git a/src/emu/diimage.h b/src/emu/diimage.h index b1a8a16ad70..f15e0e555a9 100644 --- a/src/emu/diimage.h +++ b/src/emu/diimage.h @@ -178,21 +178,22 @@ public: const char *basename() { if (m_basename.empty()) return nullptr; else return m_basename.c_str(); } const char *basename_noext() { if (m_basename_noext.empty()) return nullptr; else return m_basename_noext.c_str(); } const char *filetype() { if (m_filetype.empty()) return nullptr; else return m_filetype.c_str(); } - core_file *image_core_file() { return m_file; } - UINT64 length() { check_for_file(); return core_fsize(m_file); } + bool is_open() const { return bool(m_file); } + util::core_file &image_core_file() { return *m_file; } + UINT64 length() { check_for_file(); return m_file->size(); } bool is_readonly() { return m_readonly; } bool has_been_created() { return m_created; } void make_readonly() { m_readonly = true; } - UINT32 fread(void *buffer, UINT32 length) { check_for_file(); return core_fread(m_file, buffer, length); } + UINT32 fread(void *buffer, UINT32 length) { check_for_file(); return m_file->read(buffer, length); } UINT32 fread(optional_shared_ptr &ptr, UINT32 length) { ptr.allocate(length); return fread(ptr.target(), length); } UINT32 fread(optional_shared_ptr &ptr, UINT32 length, offs_t offset) { ptr.allocate(length); return fread(ptr + offset, length - offset); } - UINT32 fwrite(const void *buffer, UINT32 length) { check_for_file(); return core_fwrite(m_file, buffer, length); } - int fseek(INT64 offset, int whence) { check_for_file(); return core_fseek(m_file, offset, whence); } - UINT64 ftell() { check_for_file(); return core_ftell(m_file); } + UINT32 fwrite(const void *buffer, UINT32 length) { check_for_file(); return m_file->write(buffer, length); } + int fseek(INT64 offset, int whence) { check_for_file(); return m_file->seek(offset, whence); } + UINT64 ftell() { check_for_file(); return m_file->tell(); } int fgetc() { char ch; if (fread(&ch, 1) != 1) ch = '\0'; return ch; } - char *fgets(char *buffer, UINT32 length) { check_for_file(); return core_fgets(buffer, length, m_file); } - int image_feof() { check_for_file(); return core_feof(m_file); } - void *ptr() {check_for_file(); return (void *) core_fbuffer(m_file); } + char *fgets(char *buffer, UINT32 length) { check_for_file(); return m_file->gets(buffer, length); } + int image_feof() { check_for_file(); return m_file->eof(); } + void *ptr() {check_for_file(); return const_cast(m_file->buffer()); } // configuration access void set_init_phase() { m_init_phase = TRUE; } @@ -250,7 +251,7 @@ protected: void clear_error(); - void check_for_file() { assert_always(m_file != nullptr, "Illegal operation on unmounted image"); } + void check_for_file() { assert_always(m_file, "Illegal operation on unmounted image"); } void setup_working_directory(); bool try_change_working_directory(const char *subdir); @@ -274,7 +275,7 @@ protected: std::string m_err_message; /* variables that are only non-zero when an image is mounted */ - core_file *m_file; + util::core_file::ptr m_file; std::unique_ptr m_mame_file; std::string m_image_name; std::string m_basename; diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index 079080c08a3..b9187edea57 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -571,7 +571,7 @@ bool emu_options::parse_one_ini(const char *basename, int priority, std::string // parse the file osd_printf_verbose("Parsing %s.ini\n", basename); std::string error; - bool result = parse_ini_file((core_file&)file, priority, OPTION_PRIORITY_DRIVER_INI, error); + bool result = parse_ini_file((util::core_file&)file, priority, OPTION_PRIORITY_DRIVER_INI, error); // append errors if requested if (!error.empty() && error_string) diff --git a/src/emu/fileio.cpp b/src/emu/fileio.cpp index d13e162f990..23f21f8b9b7 100644 --- a/src/emu/fileio.cpp +++ b/src/emu/fileio.cpp @@ -187,21 +187,11 @@ emu_file::~emu_file() //------------------------------------------------- -// operator core_file - automatically convert -// ourselves to a core_file pointer +// operator util::core_file - automatically +// convert ourselves to a core_file reference //------------------------------------------------- -emu_file::operator core_file *() -{ - // load the ZIP file now if we haven't yet - if (compressed_file_ready()) - return nullptr; - - // return the core file - return m_file; -} - -emu_file::operator core_file &() +emu_file::operator util::core_file &() { // load the ZIP file now if we haven't yet if (compressed_file_ready()) @@ -251,12 +241,12 @@ hash_collection &emu_file::hashes(const char *types) } // read the data if we can - const UINT8 *filedata = (const UINT8 *)core_fbuffer(m_file); + const UINT8 *filedata = (const UINT8 *)m_file->buffer(); if (filedata == nullptr) return m_hashes; // compute the hash - m_hashes.compute(filedata, core_fsize(m_file), needed.c_str()); + m_hashes.compute(filedata, m_file->size(), needed.c_str()); return m_hashes; } @@ -348,7 +338,7 @@ file_error emu_file::open_next() while (m_iterator.next(m_fullpath, m_filename.c_str())) { // attempt to open the file directly - filerr = core_fopen(m_fullpath.c_str(), m_openflags, &m_file); + filerr = util::core_file::open(m_fullpath.c_str(), m_openflags, m_file); if (filerr == FILERR_NONE) break; @@ -384,7 +374,7 @@ file_error emu_file::open_ram(const void *data, UINT32 length) m_crc = 0; // use the core_file's built-in RAM support - return core_fopen_ram(data, length, m_openflags, &m_file); + return util::core_file::open_ram(data, length, m_openflags, m_file); } @@ -404,9 +394,7 @@ void emu_file::close() zip_file_close(m_zipfile); m_zipfile = nullptr; - if (m_file != nullptr) - core_fclose(m_file); - m_file = nullptr; + m_file.reset(); m__7zdata.clear(); m_zipdata.clear(); @@ -429,7 +417,7 @@ void emu_file::close() file_error emu_file::compress(int level) { - return core_fcompress(m_file, level); + return m_file->compress(level); } @@ -461,8 +449,8 @@ int emu_file::seek(INT64 offset, int whence) return 1; // seek if we can - if (m_file != nullptr) - return core_fseek(m_file, offset, whence); + if (m_file) + return m_file->seek(offset, whence); return 1; } @@ -479,8 +467,8 @@ UINT64 emu_file::tell() return 0; // tell if we can - if (m_file != nullptr) - return core_ftell(m_file); + if (m_file) + return m_file->tell(); return 0; } @@ -497,8 +485,8 @@ bool emu_file::eof() return 0; // return EOF if we can - if (m_file != nullptr) - return core_feof(m_file); + if (m_file) + return m_file->eof(); return 0; } @@ -518,8 +506,8 @@ UINT64 emu_file::size() return m_ziplength; // return length if we can - if (m_file != nullptr) - return core_fsize(m_file); + if (m_file) + return m_file->size(); return 0; } @@ -536,8 +524,8 @@ UINT32 emu_file::read(void *buffer, UINT32 length) return 0; // read the data if we can - if (m_file != nullptr) - return core_fread(m_file, buffer, length); + if (m_file) + return m_file->read(buffer, length); return 0; } @@ -554,8 +542,8 @@ int emu_file::getc() return EOF; // read the data if we can - if (m_file != nullptr) - return core_fgetc(m_file); + if (m_file) + return m_file->getc(); return EOF; } @@ -572,8 +560,8 @@ int emu_file::ungetc(int c) return 1; // read the data if we can - if (m_file != nullptr) - return core_ungetc(c, m_file); + if (m_file) + return m_file->ungetc(c); return 1; } @@ -590,8 +578,8 @@ char *emu_file::gets(char *s, int n) return nullptr; // read the data if we can - if (m_file != nullptr) - return core_fgets(s, n, m_file); + if (m_file) + return m_file->gets(s, n); return nullptr; } @@ -604,8 +592,8 @@ char *emu_file::gets(char *s, int n) UINT32 emu_file::write(const void *buffer, UINT32 length) { // write the data if we can - if (m_file != nullptr) - return core_fwrite(m_file, buffer, length); + if (m_file) + return m_file->write(buffer, length); return 0; } @@ -618,8 +606,8 @@ UINT32 emu_file::write(const void *buffer, UINT32 length) int emu_file::puts(const char *s) { // write the data if we can - if (m_file != nullptr) - return core_fputs(m_file, s); + if (m_file) + return m_file->puts(s); return 0; } @@ -632,7 +620,7 @@ int emu_file::puts(const char *s) int emu_file::vprintf(const char *fmt, va_list va) { // write the data if we can - return (m_file != nullptr) ? core_vfprintf(m_file, fmt, va) : 0; + return (m_file) ? m_file->vprintf(fmt, va) : 0; } @@ -658,8 +646,8 @@ int CLIB_DECL emu_file::printf(const char *fmt, ...) void emu_file::flush() { // flush the buffers if we can - if (m_file != nullptr) - core_fflush(m_file); + if (m_file) + m_file->flush(); } @@ -778,7 +766,7 @@ file_error emu_file::load_zipped_file() } // convert to RAM file - file_error filerr = core_fopen_ram(&m_zipdata[0], m_zipdata.size(), m_openflags, &m_file); + file_error filerr = util::core_file::open_ram(&m_zipdata[0], m_zipdata.size(), m_openflags, m_file); if (filerr != FILERR_NONE) { m_zipdata.clear(); @@ -907,7 +895,7 @@ file_error emu_file::load__7zped_file() } // convert to RAM file - file_error filerr = core_fopen_ram(&m__7zdata[0], m__7zdata.size(), m_openflags, &m_file); + file_error filerr = util::core_file::open_ram(&m__7zdata[0], m__7zdata.size(), m_openflags, m_file); if (filerr != FILERR_NONE) { m__7zdata.clear(); diff --git a/src/emu/fileio.h b/src/emu/fileio.h index 60111304abc..9a65349614f 100644 --- a/src/emu/fileio.h +++ b/src/emu/fileio.h @@ -90,9 +90,8 @@ public: virtual ~emu_file(); // getters - operator core_file *(); - operator core_file &(); - bool is_open() const { return (m_file != nullptr); } + operator util::core_file &(); + bool is_open() const { return bool(m_file); } const char *filename() const { return m_filename.c_str(); } const char *fullpath() const { return m_fullpath.c_str(); } UINT32 openflags() const { return m_openflags; } @@ -102,7 +101,7 @@ public: // setters void remove_on_close() { m_remove_on_close = true; } - void set_openflags(UINT32 openflags) { assert(m_file == nullptr); m_openflags = openflags; } + void set_openflags(UINT32 openflags) { assert(!m_file); m_openflags = openflags; } void set_restrict_to_mediapath(bool rtmp = true) { m_restrict_to_mediapath = rtmp; } // open/close @@ -157,9 +156,9 @@ private: // internal state std::string m_filename; // original filename provided std::string m_fullpath; // full filename - core_file * m_file; // core file pointer + util::core_file::ptr m_file; // core file pointer path_iterator m_iterator; // iterator for paths - path_iterator m_mediapaths; // media-path iterator + path_iterator m_mediapaths; // media-path iterator UINT32 m_crc; // file's CRC UINT32 m_openflags; // flags we used for the open hash_collection m_hashes; // collection of hashes diff --git a/src/emu/ui/optsmenu.cpp b/src/emu/ui/optsmenu.cpp index 80eb5b5bbf1..00e108d52bd 100644 --- a/src/emu/ui/optsmenu.cpp +++ b/src/emu/ui/optsmenu.cpp @@ -341,7 +341,7 @@ void save_main_option(running_machine &machine) emu_file file(machine.options().ini_path(), OPEN_FLAG_READ); if (file.open(emulator_info::get_configname(), ".ini") == FILERR_NONE) { - bool result = options.parse_ini_file((core_file&)file, OPTION_PRIORITY_MAME_INI, OPTION_PRIORITY_DRIVER_INI, error); + bool result = options.parse_ini_file((util::core_file&)file, OPTION_PRIORITY_MAME_INI, OPTION_PRIORITY_DRIVER_INI, error); if (!result) { osd_printf_error(_("**Error loading %s.ini**"), emulator_info::get_configname()); diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp index 1933db93bcd..839e7c2d7a2 100644 --- a/src/emu/ui/ui.cpp +++ b/src/emu/ui/ui.cpp @@ -171,7 +171,7 @@ static void load_ui_options(running_machine &machine) emu_file file(machine.options().ini_path(), OPEN_FLAG_READ); if (file.open("ui.ini") == FILERR_NONE) { - bool result = machine.ui().options().parse_ini_file((core_file&)file, OPTION_PRIORITY_MAME_INI, OPTION_PRIORITY_DRIVER_INI, error); + bool result = machine.ui().options().parse_ini_file((util::core_file&)file, OPTION_PRIORITY_MAME_INI, OPTION_PRIORITY_DRIVER_INI, error); if (!result) osd_printf_error("**Error loading ui.ini**"); } diff --git a/src/lib/formats/cbm_crt.cpp b/src/lib/formats/cbm_crt.cpp index 6484dbf108c..43e440e725c 100644 --- a/src/lib/formats/cbm_crt.cpp +++ b/src/lib/formats/cbm_crt.cpp @@ -122,11 +122,11 @@ static const char * CRT_C64_SLOT_NAMES[_CRT_C64_COUNT] = // cbm_crt_get_card - get slot interface card //------------------------------------------------- -std::string cbm_crt_get_card(core_file *file) +std::string cbm_crt_get_card(util::core_file &file) { // read the header cbm_crt_header header; - core_fread(file, &header, CRT_HEADER_LENGTH); + file.read(&header, CRT_HEADER_LENGTH); if (memcmp(header.signature, CRT_SIGNATURE, 16) == 0) { @@ -143,11 +143,11 @@ std::string cbm_crt_get_card(core_file *file) // cbm_crt_read_header - read cartridge header //------------------------------------------------- -bool cbm_crt_read_header(core_file* file, size_t *roml_size, size_t *romh_size, int *exrom, int *game) +bool cbm_crt_read_header(util::core_file &file, size_t *roml_size, size_t *romh_size, int *exrom, int *game) { // read the header cbm_crt_header header; - core_fread(file, &header, CRT_HEADER_LENGTH); + file.read(&header, CRT_HEADER_LENGTH); if (memcmp(header.signature, CRT_SIGNATURE, 16) != 0) return false; @@ -166,10 +166,10 @@ bool cbm_crt_read_header(core_file* file, size_t *roml_size, size_t *romh_size, } // determine ROM region lengths - while (!core_feof(file)) + while (!file.eof()) { cbm_crt_chip chip; - core_fread(file, &chip, CRT_CHIP_LENGTH); + file.read(&chip, CRT_CHIP_LENGTH); UINT16 address = pick_integer_be(chip.start_address, 0, 2); UINT16 size = pick_integer_be(chip.image_size, 0, 2); @@ -190,7 +190,7 @@ bool cbm_crt_read_header(core_file* file, size_t *roml_size, size_t *romh_size, default: osd_printf_verbose("Invalid CHIP loading address!\n"); break; } - core_fseek(file, size, SEEK_CUR); + file.seek(size, SEEK_CUR); } return true; @@ -201,26 +201,26 @@ bool cbm_crt_read_header(core_file* file, size_t *roml_size, size_t *romh_size, // cbm_crt_read_data - read cartridge data //------------------------------------------------- -bool cbm_crt_read_data(core_file* file, UINT8 *roml, UINT8 *romh) +bool cbm_crt_read_data(util::core_file &file, UINT8 *roml, UINT8 *romh) { UINT32 roml_offset = 0; UINT32 romh_offset = 0; - core_fseek(file, CRT_HEADER_LENGTH, SEEK_SET); + file.seek(CRT_HEADER_LENGTH, SEEK_SET); - while (!core_feof(file)) + while (!file.eof()) { cbm_crt_chip chip; - core_fread(file, &chip, CRT_CHIP_LENGTH); + file.read(&chip, CRT_CHIP_LENGTH); UINT16 address = pick_integer_be(chip.start_address, 0, 2); UINT16 size = pick_integer_be(chip.image_size, 0, 2); switch (address) { - case 0x8000: core_fread(file, roml + roml_offset, size); roml_offset += size; break; - case 0xa000: core_fread(file, romh + romh_offset, size); romh_offset += size; break; - case 0xe000: core_fread(file, romh + romh_offset, size); romh_offset += size; break; + case 0x8000: file.read(roml + roml_offset, size); roml_offset += size; break; + case 0xa000: file.read(romh + romh_offset, size); romh_offset += size; break; + case 0xe000: file.read(romh + romh_offset, size); romh_offset += size; break; } } diff --git a/src/lib/formats/cbm_crt.h b/src/lib/formats/cbm_crt.h index f3cfb6bb164..96d04cea2f6 100644 --- a/src/lib/formats/cbm_crt.h +++ b/src/lib/formats/cbm_crt.h @@ -135,9 +135,9 @@ struct cbm_crt_chip // FUNCTION PROTOTYPES //************************************************************************** -std::string cbm_crt_get_card(core_file *file); -bool cbm_crt_read_header(core_file* file, size_t *roml_size, size_t *romh_size, int *exrom, int *game); -bool cbm_crt_read_data(core_file* file, UINT8 *roml, UINT8 *romh); +std::string cbm_crt_get_card(util::core_file &file); +bool cbm_crt_read_header(util::core_file &file, size_t *roml_size, size_t *romh_size, int *exrom, int *game); +bool cbm_crt_read_data(util::core_file &file, UINT8 *roml, UINT8 *romh); #endif diff --git a/src/lib/formats/ioprocs.cpp b/src/lib/formats/ioprocs.cpp index 24f92060a82..9f00e3bb9d5 100644 --- a/src/lib/formats/ioprocs.cpp +++ b/src/lib/formats/ioprocs.cpp @@ -68,34 +68,33 @@ const struct io_procs stdio_ioprocs_noclose = static void corefile_closeproc(void *file) { - core_fclose((core_file*)file); + delete (util::core_file*)file; } static int corefile_seekproc(void *file, INT64 offset, int whence) { - return core_fseek((core_file*)file, (long) offset, whence); + return ((util::core_file*)file)->seek(offset, whence); } static size_t corefile_readproc(void *file, void *buffer, size_t length) { - return core_fread((core_file*)file, buffer, length); + return ((util::core_file*)file)->read(buffer, length); } static size_t corefile_writeproc(void *file, const void *buffer, size_t length) { - return core_fwrite((core_file*)file, buffer, length); + return ((util::core_file*)file)->write(buffer, length); } static UINT64 corefile_filesizeproc(void *file) { - long l, sz; - l = core_ftell((core_file*)file); - if (core_fseek((core_file*)file, 0, SEEK_END)) - return (size_t) -1; - sz = core_ftell((core_file*)file); - if (core_fseek((core_file*)file, l, SEEK_SET)) + const auto l = ((util::core_file*)file)->tell(); + if (((util::core_file*)file)->seek(0, SEEK_END)) return (size_t) -1; - return (size_t) sz; + const auto sz = ((util::core_file*)file)->tell(); + if (((util::core_file*)file)->seek(l, SEEK_SET)) + return UINT64(-1); + return UINT64(sz); } const struct io_procs corefile_ioprocs = diff --git a/src/lib/util/cdrom.cpp b/src/lib/util/cdrom.cpp index 10a1828d5e4..8bdf4af6c0f 100644 --- a/src/lib/util/cdrom.cpp +++ b/src/lib/util/cdrom.cpp @@ -115,7 +115,7 @@ struct cdrom_file /** @brief Information describing the track. */ chdcd_track_input_info track_info; /* track info */ /** @brief The fhandle[ CD maximum tracks]. */ - core_file * fhandle[CD_MAX_TRACKS];/* file handle */ + util::core_file::ptr fhandle[CD_MAX_TRACKS];/* file handle */ }; @@ -244,7 +244,7 @@ cdrom_file *cdrom_open(const char *inputfile) for (i = 0; i < file->cdtoc.numtrks; i++) { - file_error filerr = core_fopen(file->track_info.track[i].fname.c_str(), OPEN_FLAG_READ, &file->fhandle[i]); + file_error filerr = util::core_file::open(file->track_info.track[i].fname.c_str(), OPEN_FLAG_READ, file->fhandle[i]); if (filerr != FILERR_NONE) { fprintf(stderr, "Unable to open file: %s\n", file->track_info.track[i].fname.c_str()); @@ -418,7 +418,7 @@ void cdrom_close(cdrom_file *file) { for (int i = 0; i < file->cdtoc.numtrks; i++) { - core_fclose(file->fhandle[i]); + file->fhandle[i].reset(); } } @@ -474,7 +474,7 @@ chd_error read_partial_sector(cdrom_file *file, void *dest, UINT32 lbasector, UI else { // else read from the appropriate file - core_file *srcfile = file->fhandle[tracknum]; + util::core_file &srcfile = *file->fhandle[tracknum]; UINT64 sourcefileoffset = file->track_info.track[tracknum].offset; int bytespersector = file->cdtoc.tracks[tracknum].datasize + file->cdtoc.tracks[tracknum].subsize; @@ -483,8 +483,8 @@ chd_error read_partial_sector(cdrom_file *file, void *dest, UINT32 lbasector, UI // printf("Reading sector %d from track %d at offset %lld\n", chdsector, tracknum, sourcefileoffset); - core_fseek(srcfile, sourcefileoffset, SEEK_SET); - core_fread(srcfile, dest, length); + srcfile.seek(sourcefileoffset, SEEK_SET); + srcfile.read(dest, length); needswap = file->track_info.track[tracknum].swap; } diff --git a/src/lib/util/chd.cpp b/src/lib/util/chd.cpp index 3419f404c09..93a1b34ba29 100644 --- a/src/lib/util/chd.cpp +++ b/src/lib/util/chd.cpp @@ -190,8 +190,8 @@ inline void chd_file::file_read(UINT64 offset, void *dest, UINT32 length) throw CHDERR_NOT_OPEN; // seek and read - core_fseek(m_file, offset, SEEK_SET); - UINT32 count = core_fread(m_file, dest, length); + m_file->seek(offset, SEEK_SET); + UINT32 count = m_file->read(dest, length); if (count != length) throw CHDERR_READ_ERROR; } @@ -209,8 +209,8 @@ inline void chd_file::file_write(UINT64 offset, const void *source, UINT32 lengt throw CHDERR_NOT_OPEN; // seek and write - core_fseek(m_file, offset, SEEK_SET); - UINT32 count = core_fwrite(m_file, source, length); + m_file->seek(offset, SEEK_SET); + UINT32 count = m_file->write(source, length); if (count != length) throw CHDERR_WRITE_ERROR; } @@ -229,10 +229,10 @@ inline UINT64 chd_file::file_append(const void *source, UINT32 length, UINT32 al throw CHDERR_NOT_OPEN; // seek to the end and align if necessary - core_fseek(m_file, 0, SEEK_END); + m_file->seek(0, SEEK_END); if (alignment != 0) { - UINT64 offset = core_ftell(m_file); + UINT64 offset = m_file->tell(); UINT32 delta = offset % alignment; if (delta != 0) { @@ -243,7 +243,7 @@ inline UINT64 chd_file::file_append(const void *source, UINT32 length, UINT32 al while (delta != 0) { UINT32 bytes_to_write = MIN(sizeof(buffer), delta); - UINT32 count = core_fwrite(m_file, buffer, bytes_to_write); + UINT32 count = m_file->write(buffer, bytes_to_write); if (count != bytes_to_write) throw CHDERR_WRITE_ERROR; delta -= bytes_to_write; @@ -252,8 +252,8 @@ inline UINT64 chd_file::file_append(const void *source, UINT32 length, UINT32 al } // write the real data - UINT64 offset = core_ftell(m_file); - UINT32 count = core_fwrite(m_file, source, length); + UINT64 offset = m_file->tell(); + UINT32 count = m_file->write(source, length); if (count != length) throw CHDERR_READ_ERROR; return offset; @@ -567,7 +567,7 @@ void chd_file::set_parent_sha1(sha1_t parent) } /** - * @fn chd_error chd_file::create(core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 unitbytes, chd_codec_type compression[4]) + * @fn chd_error chd_file::create(util::core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 unitbytes, chd_codec_type compression[4]) * * @brief ------------------------------------------------- * create - create a new file with no parent using an existing opened file handle @@ -582,7 +582,7 @@ void chd_file::set_parent_sha1(sha1_t parent) * @return A chd_error. */ -chd_error chd_file::create(core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 unitbytes, chd_codec_type compression[4]) +chd_error chd_file::create(util::core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 unitbytes, chd_codec_type compression[4]) { // make sure we don't already have a file open if (m_file != nullptr) @@ -602,7 +602,7 @@ chd_error chd_file::create(core_file &file, UINT64 logicalbytes, UINT32 hunkbyte } /** - * @fn chd_error chd_file::create(core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, chd_codec_type compression[4], chd_file &parent) + * @fn chd_error chd_file::create(util::core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, chd_codec_type compression[4], chd_file &parent) * * @brief ------------------------------------------------- * create - create a new file with a parent using an existing opened file handle @@ -617,7 +617,7 @@ chd_error chd_file::create(core_file &file, UINT64 logicalbytes, UINT32 hunkbyte * @return A chd_error. */ -chd_error chd_file::create(core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, chd_codec_type compression[4], chd_file &parent) +chd_error chd_file::create(util::core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, chd_codec_type compression[4], chd_file &parent) { // make sure we don't already have a file open if (m_file != nullptr) @@ -659,21 +659,25 @@ chd_error chd_file::create(const char *filename, UINT64 logicalbytes, UINT32 hun return CHDERR_ALREADY_OPEN; // create the new file - core_file *file = nullptr; - file_error filerr = core_fopen(filename, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &file); + util::core_file::ptr file; + const file_error filerr = util::core_file::open(filename, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, file); if (filerr != FILERR_NONE) return CHDERR_FILE_NOT_FOUND; // create the file normally, then claim the file - chd_error chderr = create(*file, logicalbytes, hunkbytes, unitbytes, compression); + const chd_error chderr = create(*file, logicalbytes, hunkbytes, unitbytes, compression); m_owns_file = true; // if an error happened, close and delete the file if (chderr != CHDERR_NONE) { - core_fclose(file); + file.reset(); osd_rmfile(filename); } + else + { + file.release(); + } return chderr; } @@ -700,21 +704,25 @@ chd_error chd_file::create(const char *filename, UINT64 logicalbytes, UINT32 hun return CHDERR_ALREADY_OPEN; // create the new file - core_file *file = nullptr; - file_error filerr = core_fopen(filename, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &file); + util::core_file::ptr file; + const file_error filerr = util::core_file::open(filename, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, file); if (filerr != FILERR_NONE) return CHDERR_FILE_NOT_FOUND; // create the file normally, then claim the file - chd_error chderr = create(*file, logicalbytes, hunkbytes, compression, parent); + const chd_error chderr = create(*file, logicalbytes, hunkbytes, compression, parent); m_owns_file = true; // if an error happened, close and delete the file if (chderr != CHDERR_NONE) { - core_fclose(file); + file.reset(); osd_rmfile(filename); } + else + { + file.release(); + } return chderr; } @@ -739,27 +747,25 @@ chd_error chd_file::open(const char *filename, bool writeable, chd_file *parent) return CHDERR_ALREADY_OPEN; // open the file - UINT32 openflags = writeable ? (OPEN_FLAG_READ | OPEN_FLAG_WRITE) : OPEN_FLAG_READ; - core_file *file = nullptr; - file_error filerr = core_fopen(filename, openflags, &file); + const UINT32 openflags = writeable ? (OPEN_FLAG_READ | OPEN_FLAG_WRITE) : OPEN_FLAG_READ; + util::core_file::ptr file; + const file_error filerr = util::core_file::open(filename, openflags, file); if (filerr != FILERR_NONE) return CHDERR_FILE_NOT_FOUND; // now open the CHD chd_error err = open(*file, writeable, parent); if (err != CHDERR_NONE) - { - core_fclose(file); return err; - } // we now own this file + file.release(); m_owns_file = true; return err; } /** - * @fn chd_error chd_file::open(core_file &file, bool writeable, chd_file *parent) + * @fn chd_error chd_file::open(util::core_file &file, bool writeable, chd_file *parent) * * @brief ------------------------------------------------- * open - open an existing file for read or read/write @@ -772,7 +778,7 @@ chd_error chd_file::open(const char *filename, bool writeable, chd_file *parent) * @return A chd_error. */ -chd_error chd_file::open(core_file &file, bool writeable, chd_file *parent) +chd_error chd_file::open(util::core_file &file, bool writeable, chd_file *parent) { // make sure we don't already have a file open if (m_file != nullptr) @@ -796,8 +802,8 @@ chd_error chd_file::open(core_file &file, bool writeable, chd_file *parent) void chd_file::close() { // reset file characteristics - if (m_owns_file && m_file != nullptr) - core_fclose(m_file); + if (m_owns_file && m_file) + delete m_file; m_file = nullptr; m_owns_file = false; m_allow_reads = false; diff --git a/src/lib/util/chd.h b/src/lib/util/chd.h index d9a1dd57f51..ee8a03f5d17 100644 --- a/src/lib/util/chd.h +++ b/src/lib/util/chd.h @@ -304,7 +304,7 @@ public: virtual ~chd_file(); // operators - operator core_file *() { return m_file; } + operator util::core_file &() { return *m_file; } // getters bool opened() const { return (m_file != nullptr); } @@ -328,13 +328,13 @@ public: // file create chd_error create(const char *filename, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 unitbytes, chd_codec_type compression[4]); - chd_error create(core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 unitbytes, chd_codec_type compression[4]); + chd_error create(util::core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 unitbytes, chd_codec_type compression[4]); chd_error create(const char *filename, UINT64 logicalbytes, UINT32 hunkbytes, chd_codec_type compression[4], chd_file &parent); - chd_error create(core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, chd_codec_type compression[4], chd_file &parent); + chd_error create(util::core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, chd_codec_type compression[4], chd_file &parent); // file open chd_error open(const char *filename, bool writeable = false, chd_file *parent = nullptr); - chd_error open(core_file &file, bool writeable = false, chd_file *parent = nullptr); + chd_error open(util::core_file &file, bool writeable = false, chd_file *parent = nullptr); // file close void close(); @@ -401,7 +401,7 @@ private: static int CLIB_DECL metadata_hash_compare(const void *elem1, const void *elem2); // file characteristics - core_file * m_file; // handle to the open core file + util::core_file * m_file; // handle to the open core file bool m_owns_file; // flag indicating if this file should be closed on chd_close() bool m_allow_reads; // permit reads from this CHD? bool m_allow_writes; // permit writes to this CHD? diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp index 25978afdb2c..e4eda2477d5 100644 --- a/src/lib/util/corefile.cpp +++ b/src/lib/util/corefile.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:Aaron Giles, Vas Crabb /*************************************************************************** corefile.c @@ -14,11 +14,17 @@ #include "unicode.h" #include -#include +#include +#include +#include #include +namespace util { + +namespace { + /*************************************************************************** VALIDATION ***************************************************************************/ @@ -29,614 +35,511 @@ -/*************************************************************************** - CONSTANTS -***************************************************************************/ - -#define FILE_BUFFER_SIZE 512 - -#define OPEN_FLAG_HAS_CRC 0x10000 - - - /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ -enum text_file_type -{ - TFT_OSD = 0, /* OSD depdendent encoding format used when BOMs missing */ - TFT_UTF8, /* UTF-8 */ - TFT_UTF16BE, /* UTF-16 (big endian) */ - TFT_UTF16LE, /* UTF-16 (little endian) */ - TFT_UTF32BE, /* UTF-32 (UCS-4) (big endian) */ - TFT_UTF32LE /* UTF-32 (UCS-4) (little endian) */ -}; - - -struct zlib_data -{ - z_stream stream; - UINT8 buffer[1024]; - UINT64 realoffset; - UINT64 nextoffset; -}; - - -struct core_file -{ - osd_file * file; /* OSD file handle */ - zlib_data * zdata; /* compression data */ - UINT32 openflags; /* flags we were opened with */ - UINT8 data_allocated; /* was the data allocated by us? */ - UINT8 * data; /* file data, if RAM-based */ - UINT64 offset; /* current file offset */ - UINT64 length; /* total file length */ - text_file_type text_type; /* text output format */ - char back_chars[UTF8_CHAR_MAX]; /* buffer to hold characters for ungetc */ - int back_char_head; /* head of ungetc buffer */ - int back_char_tail; /* tail of ungetc buffer */ - UINT64 bufferbase; /* base offset of internal buffer */ - UINT32 bufferbytes; /* bytes currently loaded into buffer */ - UINT8 buffer[FILE_BUFFER_SIZE]; /* buffer data */ -}; - - - -/*************************************************************************** - FUNCTION PROTOTYPES -***************************************************************************/ - -/* misc helpers */ -static UINT32 safe_buffer_copy(const void *source, UINT32 sourceoffs, UINT32 sourcelen, void *dest, UINT32 destoffs, UINT32 destlen); -static file_error osd_or_zlib_read(core_file *file, void *buffer, UINT64 offset, UINT32 length, UINT32 *actual); -static file_error osd_or_zlib_write(core_file *file, const void *buffer, UINT64 offset, UINT32 length, UINT32 *actual); - - - -/*************************************************************************** - INLINE FUNCTIONS -***************************************************************************/ - -/*------------------------------------------------- - is_directory_separator - is a given character - a directory separator? The following logic - works for most platforms --------------------------------------------------*/ - -static inline int is_directory_separator(char c) +class zlib_data { - return (c == '\\' || c == '/' || c == ':'); -} - +public: + typedef std::unique_ptr ptr; + static int start_compression(int level, std::uint64_t offset, ptr &data) + { + ptr result(new zlib_data(offset)); + result->reset_output(); + auto const zerr = deflateInit(&result->m_stream, level); + result->m_compress = (Z_OK == zerr); + if (result->m_compress) data = std::move(result); + return zerr; + } + static int start_decompression(std::uint64_t offset, ptr &data) + { + ptr result(new zlib_data(offset)); + auto const zerr = inflateInit(&result->m_stream); + result->m_decompress = (Z_OK == zerr); + if (result->m_decompress) data = std::move(result); + return zerr; + } -/*************************************************************************** - FILE OPEN/CLOSE -***************************************************************************/ - -/*------------------------------------------------- - core_fopen - open a file for access and - return an error code --------------------------------------------------*/ + ~zlib_data() + { + if (m_compress) deflateEnd(&m_stream); + else if (m_decompress) inflateEnd(&m_stream); + } -file_error core_fopen(const char *filename, UINT32 openflags, core_file **file) -{ - file_error filerr = FILERR_NOT_FOUND; + std::size_t buffer_size() const { return sizeof(m_buffer); } + void const *buffer_data() const { return m_buffer; } + void *buffer_data() { return m_buffer; } - /* allocate the file itself */ - *file = (core_file *)malloc(sizeof(**file)); - if (*file == nullptr) - return FILERR_OUT_OF_MEMORY; - memset(*file, 0, sizeof(**file)); + // general-purpose output buffer manipulation + bool output_full() const { return 0 == m_stream.avail_out; } + std::size_t output_space() const { return m_stream.avail_out; } + void set_output(void *data, std::uint32_t size) + { + m_stream.next_out = reinterpret_cast(data); + m_stream.avail_out = size; + } - /* attempt to open the file */ - filerr = osd_open(filename, openflags, &(*file)->file, &(*file)->length); - (*file)->openflags = openflags; + // working with output to the internal buffer + bool has_output() const { return m_stream.avail_out != sizeof(m_buffer); } + std::size_t output_size() const { return sizeof(m_buffer) - m_stream.avail_out; } + void reset_output() + { + m_stream.next_out = m_buffer; + m_stream.avail_out = sizeof(m_buffer); + } - /* handle errors and return */ - if (filerr != FILERR_NONE) + // general-purpose input buffer manipulation + bool has_input() const { return 0 != m_stream.avail_in; } + std::size_t input_size() const { return m_stream.avail_in; } + void set_input(void const *data, std::uint32_t size) { - core_fclose(*file); - *file = nullptr; + m_stream.next_in = const_cast(reinterpret_cast(data)); + m_stream.avail_in = size; } - return filerr; -} + // working with input from the internal buffer + void reset_input(std::uint32_t size) + { + m_stream.next_in = m_buffer; + m_stream.avail_in = size; + } -/*------------------------------------------------- - core_fopen_ram_internal - open a RAM-based buffer - for file-like access, possibly copying the data, - and return an error code --------------------------------------------------*/ + int compress() { assert(m_compress); return deflate(&m_stream, Z_NO_FLUSH); } + int finalise() { assert(m_compress); return deflate(&m_stream, Z_FINISH); } + int decompress() { assert(m_decompress); return inflate(&m_stream, Z_SYNC_FLUSH); } -static file_error core_fopen_ram_internal(const void *data, size_t length, int copy_buffer, UINT32 openflags, core_file **file) -{ - /* can only do this for read access */ - if ((openflags & OPEN_FLAG_WRITE) != 0) - return FILERR_INVALID_ACCESS; - if ((openflags & OPEN_FLAG_CREATE) != 0) - return FILERR_INVALID_ACCESS; + std::uint64_t realoffset() const { return m_realoffset; } + void add_realoffset(std::uint32_t increment) { m_realoffset += increment; } - /* allocate the file itself */ - *file = (core_file *)malloc(sizeof(**file) + (copy_buffer ? length : 0)); - if (*file == nullptr) - return FILERR_OUT_OF_MEMORY; - memset(*file, 0, sizeof(**file)); + bool is_nextoffset(std::uint64_t value) const { return m_nextoffset == value; } + void add_nextoffset(std::uint32_t increment) { m_nextoffset += increment; } - /* copy the buffer, if we're asked to */ - if (copy_buffer) +private: + zlib_data(std::uint64_t offset) + : m_compress(false) + , m_decompress(false) + , m_realoffset(offset) + , m_nextoffset(offset) { - void *dest = ((UINT8 *) *file) + sizeof(**file); - memcpy(dest, data, length); - data = dest; + m_stream.zalloc = Z_NULL; + m_stream.zfree = Z_NULL; + m_stream.opaque = Z_NULL; } - /* claim the buffer */ - (*file)->data = (UINT8 *)data; - (*file)->length = length; - (*file)->openflags = openflags; - - return FILERR_NONE; -} - + bool m_compress, m_decompress; + z_stream m_stream; + std::uint8_t m_buffer[1024]; + std::uint64_t m_realoffset; + std::uint64_t m_nextoffset; +}; -/*------------------------------------------------- - core_fopen_ram - open a RAM-based buffer for - file-like access and return an error code --------------------------------------------------*/ -file_error core_fopen_ram(const void *data, size_t length, UINT32 openflags, core_file **file) +class core_proxy_file : public core_file { - return core_fopen_ram_internal(data, length, FALSE, openflags, file); -} - +public: + core_proxy_file(core_file &file) : m_file(file) { } + virtual ~core_proxy_file() override { } + virtual file_error compress(int level) override { return m_file.compress(level); } + + virtual int seek(std::int64_t offset, int whence) override { return m_file.seek(offset, whence); } + virtual std::uint64_t tell() const override { return m_file.tell(); } + virtual bool eof() const override { return m_file.eof(); } + virtual std::uint64_t size() const override { return m_file.size(); } + + virtual std::uint32_t read(void *buffer, std::uint32_t length) override { return m_file.read(buffer, length); } + virtual int getc() override { return m_file.getc(); } + virtual int ungetc(int c) override { return m_file.ungetc(c); } + virtual char *gets(char *s, int n) override { return m_file.gets(s, n); } + virtual const void *buffer() override { return m_file.buffer(); } + + virtual std::uint32_t write(const void *buffer, std::uint32_t length) override { return m_file.write(buffer, length); } + virtual int puts(const char *s) override { return m_file.puts(s); } + virtual int vprintf(const char *fmt, va_list va) override { return m_file.vprintf(fmt, va); } + virtual file_error truncate(std::uint64_t offset) override { return m_file.truncate(offset); } + + virtual file_error flush() override { return m_file.flush(); } + +private: + core_file &m_file; +}; -/*------------------------------------------------- - core_fopen_ram_copy - open a copy of a RAM-based - buffer for file-like access and return an error code --------------------------------------------------*/ -file_error core_fopen_ram_copy(const void *data, size_t length, UINT32 openflags, core_file **file) +class core_text_file : public core_file { - return core_fopen_ram_internal(data, length, TRUE, openflags, file); -} - +public: + enum class text_file_type + { + OSD, // OSD dependent encoding format used when BOMs missing + UTF8, // UTF-8 + UTF16BE, // UTF-16 (big endian) + UTF16LE, // UTF-16 (little endian) + UTF32BE, // UTF-32 (UCS-4) (big endian) + UTF32LE // UTF-32 (UCS-4) (little endian) + }; + + virtual int getc() override; + virtual int ungetc(int c) override; + virtual char *gets(char *s, int n) override; + virtual int puts(char const *s) override; + virtual int vprintf(char const *fmt, va_list va) override; + +protected: + core_text_file(std::uint32_t openflags) + : m_openflags(openflags) + , m_text_type(text_file_type::OSD) + , m_back_char_head(0) + , m_back_char_tail(0) + { + } -/*------------------------------------------------- - core_fclose - closes a file --------------------------------------------------*/ + bool read_access() const { return 0U != (m_openflags & OPEN_FLAG_READ); } + bool write_access() const { return 0U != (m_openflags & OPEN_FLAG_WRITE); } + bool no_bom() const { return 0U != (m_openflags & OPEN_FLAG_NO_BOM); } -void core_fclose(core_file *file) -{ - /* close files and free memory */ - if (file->zdata != nullptr) - core_fcompress(file, FCOMPRESS_NONE); - if (file->file != nullptr) - osd_close(file->file); - if (file->data != nullptr && file->data_allocated) - free(file->data); - free(file); -} + bool has_putback() const { return m_back_char_head != m_back_char_tail; } + void clear_putback() { m_back_char_head = m_back_char_tail = 0; } +private: + std::uint32_t const m_openflags; // flags we were opened with + text_file_type m_text_type; // text output format + char m_back_chars[UTF8_CHAR_MAX]; // buffer to hold characters for ungetc + int m_back_char_head; // head of ungetc buffer + int m_back_char_tail; // tail of ungetc buffer +}; -/*------------------------------------------------- - core_fcompress - enable/disable streaming file - compression via zlib; level is 0 to disable - compression, or up to 9 for max compression --------------------------------------------------*/ -file_error core_fcompress(core_file *file, int level) +class core_in_memory_file : public core_text_file { - file_error result = FILERR_NONE; - - /* can only do this for read-only and write-only cases */ - if ((file->openflags & OPEN_FLAG_WRITE) != 0 && (file->openflags & OPEN_FLAG_READ) != 0) - return FILERR_INVALID_ACCESS; - - /* if we have been compressing, flush and free the data */ - if (file->zdata != nullptr && level == FCOMPRESS_NONE) +public: + core_in_memory_file(std::uint32_t openflags, void const *data, std::size_t length, bool copy) + : core_text_file(openflags) + , m_data_allocated(false) + , m_data(copy ? nullptr : data) + , m_offset(0) + , m_length(length) { - int zerr = Z_OK; - - /* flush any remaining data if we are writing */ - while ((file->openflags & OPEN_FLAG_WRITE) != 0 && zerr != Z_STREAM_END) + if (copy) { - UINT32 actualdata; - file_error filerr; - - /* deflate some more */ - zerr = deflate(&file->zdata->stream, Z_FINISH); - if (zerr != Z_STREAM_END && zerr != Z_OK) - { - result = FILERR_INVALID_DATA; - break; - } - - /* write the data */ - if (file->zdata->stream.avail_out != sizeof(file->zdata->buffer)) - { - filerr = osd_write(file->file, file->zdata->buffer, file->zdata->realoffset, sizeof(file->zdata->buffer) - file->zdata->stream.avail_out, &actualdata); - if (filerr != FILERR_NONE) - break; - file->zdata->realoffset += actualdata; - file->zdata->stream.next_out = file->zdata->buffer; - file->zdata->stream.avail_out = sizeof(file->zdata->buffer); - } + void *const buf = allocate(); + if (buf) std::memcpy(buf, data, length); } + } - /* end the appropriate operation */ - if ((file->openflags & OPEN_FLAG_WRITE) != 0) - deflateEnd(&file->zdata->stream); - else - inflateEnd(&file->zdata->stream); + ~core_in_memory_file() override { purge(); } + virtual file_error compress(int level) override { return FILERR_INVALID_ACCESS; } - /* free memory */ - free(file->zdata); - file->zdata = nullptr; - } + virtual int seek(std::int64_t offset, int whence) override; + virtual std::uint64_t tell() const override { return m_offset; } + virtual bool eof() const override; + virtual std::uint64_t size() const override { return m_length; } - /* if we are just starting to compress, allocate a new buffer */ - if (file->zdata == nullptr && level > FCOMPRESS_NONE) - { - int zerr; + virtual std::uint32_t read(void *buffer, std::uint32_t length) override; + virtual void const *buffer() override { return m_data; } - /* allocate memory */ - file->zdata = (zlib_data *)malloc(sizeof(*file->zdata)); - if (file->zdata == nullptr) - return FILERR_OUT_OF_MEMORY; - memset(file->zdata, 0, sizeof(*file->zdata)); + virtual std::uint32_t write(void const *buffer, std::uint32_t length) override { return 0; } + virtual file_error truncate(std::uint64_t offset) override; + virtual file_error flush() override { clear_putback(); return FILERR_NONE; } - /* initialize the stream and compressor */ - if ((file->openflags & OPEN_FLAG_WRITE) != 0) - { - file->zdata->stream.next_out = file->zdata->buffer; - file->zdata->stream.avail_out = sizeof(file->zdata->buffer); - zerr = deflateInit(&file->zdata->stream, level); - } - else - zerr = inflateInit(&file->zdata->stream); +protected: + core_in_memory_file(std::uint32_t openflags, std::uint64_t length) + : core_text_file(openflags) + , m_data_allocated(false) + , m_data(nullptr) + , m_offset(0) + , m_length(length) + { + } - /* on error, return an error */ - if (zerr != Z_OK) + bool is_loaded() const { return nullptr != m_data; } + void *allocate() + { + if (m_data) return nullptr; + void *data = malloc(m_length); + if (data) { - free(file->zdata); - file->zdata = nullptr; - return FILERR_OUT_OF_MEMORY; + m_data_allocated = true; + m_data = data; } - - /* flush buffers */ - file->bufferbytes = 0; - - /* set the initial offset */ - file->zdata->realoffset = file->offset; - file->zdata->nextoffset = file->offset; + return data; + } + void purge() + { + if (m_data && m_data_allocated) free(const_cast(m_data)); + m_data_allocated = false; + m_data = nullptr; } - return result; -} - + std::uint64_t offset() const { return m_offset; } + void add_offset(std::uint32_t increment) { m_offset += increment; m_length = (std::max)(m_length, m_offset); } + std::uint64_t length() const { return m_length; } + void set_length(std::uint64_t value) { m_length = value; m_offset = (std::min)(m_offset, m_length); } + static std::size_t safe_buffer_copy( + void const *source, std::size_t sourceoffs, std::size_t sourcelen, + void *dest, std::size_t destoffs, std::size_t destlen); -/*************************************************************************** - FILE POSITIONING -***************************************************************************/ +private: + bool m_data_allocated; // was the data allocated by us? + void const * m_data; // file data, if RAM-based + std::uint64_t m_offset; // current file offset + std::uint64_t m_length; // total file length +}; -/*------------------------------------------------- - core_fseek - seek within a file --------------------------------------------------*/ -int core_fseek(core_file *file, INT64 offset, int whence) +class core_osd_file : public core_in_memory_file { - int err = 0; - - /* error if compressing */ - if (file->zdata != nullptr) - return 1; - - /* flush any buffered char */ - file->back_char_head = 0; - file->back_char_tail = 0; - - /* switch off the relative location */ - switch (whence) +public: + core_osd_file(std::uint32_t openmode, osd_file *file, std::uint64_t length) + : core_in_memory_file(openmode, length) + , m_file(file) + , m_zdata() + , m_bufferbase(0) + , m_bufferbytes(0) { - case SEEK_SET: - file->offset = offset; - break; - - case SEEK_CUR: - file->offset += offset; - break; - - case SEEK_END: - file->offset = file->length + offset; - break; } - return err; -} + ~core_osd_file() override; + virtual file_error compress(int level) override; -/*------------------------------------------------- - core_ftell - return the current file position --------------------------------------------------*/ - -UINT64 core_ftell(core_file *file) -{ - /* return the current offset */ - return file->offset; -} + virtual int seek(std::int64_t offset, int whence) override; + virtual std::uint32_t read(void *buffer, std::uint32_t length) override; + virtual void const *buffer() override; -/*------------------------------------------------- - core_feof - return 1 if we're at the end - of file --------------------------------------------------*/ + virtual std::uint32_t write(void const *buffer, std::uint32_t length) override; + virtual file_error truncate(std::uint64_t offset) override; + virtual file_error flush() override; -int core_feof(core_file *file) -{ - /* check for buffered chars */ - if (file->back_char_head != file->back_char_tail) - return 0; +protected: - /* if the offset == length, we're at EOF */ - return (file->offset >= file->length); -} + bool is_buffered() const { return (offset() >= m_bufferbase) && (offset() < (m_bufferbase + m_bufferbytes)); } +private: + static constexpr std::size_t FILE_BUFFER_SIZE = 512; -/*------------------------------------------------- - core_fsize - returns the size of a file --------------------------------------------------*/ + file_error osd_or_zlib_read(void *buffer, std::uint64_t offset, std::uint32_t length, std::uint32_t &actual); + file_error osd_or_zlib_write(void const *buffer, std::uint64_t offset, std::uint32_t length, std::uint32_t &actual); -UINT64 core_fsize(core_file *file) -{ - return file->length; -} + osd_file * m_file; // OSD file handle + zlib_data::ptr m_zdata; // compression data + std::uint64_t m_bufferbase; // base offset of internal buffer + std::uint32_t m_bufferbytes; // bytes currently loaded into buffer + std::uint8_t m_buffer[FILE_BUFFER_SIZE]; // buffer data +}; /*************************************************************************** - FILE READ + INLINE FUNCTIONS ***************************************************************************/ /*------------------------------------------------- - core_fread - read from a file + is_directory_separator - is a given character + a directory separator? The following logic + works for most platforms -------------------------------------------------*/ -UINT32 core_fread(core_file *file, void *buffer, UINT32 length) +static inline int is_directory_separator(char c) { - UINT32 bytes_read = 0; - - /* flush any buffered char */ - file->back_char_head = 0; - file->back_char_tail = 0; - - /* handle real files */ - if (file->file && file->data == nullptr) - { - /* if we're within the buffer, consume that first */ - if (file->offset >= file->bufferbase && file->offset < file->bufferbase + file->bufferbytes) - bytes_read += safe_buffer_copy(file->buffer, file->offset - file->bufferbase, file->bufferbytes, buffer, bytes_read, length); - - /* if we've got a small amount left, read it into the buffer first */ - if (bytes_read < length) - { - if (length - bytes_read < sizeof(file->buffer) / 2) - { - /* read as much as makes sense into the buffer */ - file->bufferbase = file->offset + bytes_read; - file->bufferbytes = 0; - osd_or_zlib_read(file, file->buffer, file->bufferbase, sizeof(file->buffer), &file->bufferbytes); - - /* do a bounded copy from the buffer to the destination */ - bytes_read += safe_buffer_copy(file->buffer, 0, file->bufferbytes, buffer, bytes_read, length); - } - - /* read the remainder directly from the file */ - else - { - UINT32 new_bytes_read = 0; - osd_or_zlib_read(file, (UINT8 *)buffer + bytes_read, file->offset + bytes_read, length - bytes_read, &new_bytes_read); - bytes_read += new_bytes_read; - } - } - } + return (c == '\\' || c == '/' || c == ':'); +} - /* handle RAM-based files */ - else - bytes_read += safe_buffer_copy(file->data, (UINT32)file->offset, file->length, buffer, bytes_read, length); - /* return the number of bytes read */ - file->offset += bytes_read; - return bytes_read; -} +/*************************************************************************** + core_text_file +***************************************************************************/ /*------------------------------------------------- - core_fgetc - read a character from a file + getc - read a character from a file -------------------------------------------------*/ -int core_fgetc(core_file *file) +int core_text_file::getc() { int result; - /* refresh buffer, if necessary */ - if (file->back_char_head == file->back_char_tail) + // refresh buffer, if necessary + if (m_back_char_head == m_back_char_tail) { - utf16_char utf16_buffer[UTF16_CHAR_MAX]; - char utf8_buffer[UTF8_CHAR_MAX]; - char default_buffer[16]; - unicode_char uchar = (unicode_char) ~0; - int readlen, charlen; - - /* do we need to check the byte order marks? */ - if (file->offset == 0) + // do we need to check the byte order marks? + if (tell() == 0) { - UINT8 bom[4]; + std::uint8_t bom[4]; int pos = 0; - if (core_fread(file, bom, 4) == 4) + if (read(bom, 4) == 4) { if (bom[0] == 0xef && bom[1] == 0xbb && bom[2] == 0xbf) { - file->text_type = TFT_UTF8; + m_text_type = text_file_type::UTF8; pos = 3; } else if (bom[0] == 0x00 && bom[1] == 0x00 && bom[2] == 0xfe && bom[3] == 0xff) { - file->text_type = TFT_UTF32BE; + m_text_type = text_file_type::UTF32BE; pos = 4; } else if (bom[0] == 0xff && bom[1] == 0xfe && bom[2] == 0x00 && bom[3] == 0x00) { - file->text_type = TFT_UTF32LE; + m_text_type = text_file_type::UTF32LE; pos = 4; } else if (bom[0] == 0xfe && bom[1] == 0xff) { - file->text_type = TFT_UTF16BE; + m_text_type = text_file_type::UTF16BE; pos = 2; } else if (bom[0] == 0xff && bom[1] == 0xfe) { - file->text_type = TFT_UTF16LE; + m_text_type = text_file_type::UTF16LE; pos = 2; } else { - file->text_type = TFT_OSD; + m_text_type = text_file_type::OSD; pos = 0; } } - core_fseek(file, pos, SEEK_SET); + seek(pos, SEEK_SET); } - /* fetch the next character */ - switch (file->text_type) + // fetch the next character + utf16_char utf16_buffer[UTF16_CHAR_MAX]; + unicode_char uchar = unicode_char(~0); + switch (m_text_type) { - default: - case TFT_OSD: - readlen = core_fread(file, default_buffer, sizeof(default_buffer)); + default: + case text_file_type::OSD: + { + char default_buffer[16]; + auto const readlen = read(default_buffer, sizeof(default_buffer)); if (readlen > 0) { - charlen = osd_uchar_from_osdchar(&uchar, default_buffer, readlen / sizeof(default_buffer[0])); - core_fseek(file, (INT64) (charlen * sizeof(default_buffer[0])) - readlen, SEEK_CUR); + auto const charlen = osd_uchar_from_osdchar(&uchar, default_buffer, readlen / sizeof(default_buffer[0])); + seek(std::int64_t(charlen * sizeof(default_buffer[0])) - readlen, SEEK_CUR); } - break; + } + break; - case TFT_UTF8: - readlen = core_fread(file, utf8_buffer, sizeof(utf8_buffer)); + case text_file_type::UTF8: + { + char utf8_buffer[UTF8_CHAR_MAX]; + auto const readlen = read(utf8_buffer, sizeof(utf8_buffer)); if (readlen > 0) { - charlen = uchar_from_utf8(&uchar, utf8_buffer, readlen / sizeof(utf8_buffer[0])); - core_fseek(file, (INT64) (charlen * sizeof(utf8_buffer[0])) - readlen, SEEK_CUR); + auto const charlen = uchar_from_utf8(&uchar, utf8_buffer, readlen / sizeof(utf8_buffer[0])); + seek(std::int64_t(charlen * sizeof(utf8_buffer[0])) - readlen, SEEK_CUR); } - break; + } + break; - case TFT_UTF16BE: - readlen = core_fread(file, utf16_buffer, sizeof(utf16_buffer)); + case text_file_type::UTF16BE: + { + auto const readlen = read(utf16_buffer, sizeof(utf16_buffer)); if (readlen > 0) { - charlen = uchar_from_utf16be(&uchar, utf16_buffer, readlen / sizeof(utf16_buffer[0])); - core_fseek(file, (INT64) (charlen * sizeof(utf16_buffer[0])) - readlen, SEEK_CUR); + auto const charlen = uchar_from_utf16be(&uchar, utf16_buffer, readlen / sizeof(utf16_buffer[0])); + seek(std::int64_t(charlen * sizeof(utf16_buffer[0])) - readlen, SEEK_CUR); } - break; + } + break; - case TFT_UTF16LE: - readlen = core_fread(file, utf16_buffer, sizeof(utf16_buffer)); + case text_file_type::UTF16LE: + { + auto const readlen = read(utf16_buffer, sizeof(utf16_buffer)); if (readlen > 0) { - charlen = uchar_from_utf16le(&uchar, utf16_buffer, readlen / sizeof(utf16_buffer[0])); - core_fseek(file, (INT64) (charlen * sizeof(utf16_buffer[0])) - readlen, SEEK_CUR); + auto const charlen = uchar_from_utf16le(&uchar, utf16_buffer, readlen / sizeof(utf16_buffer[0])); + seek(std::int64_t(charlen * sizeof(utf16_buffer[0])) - readlen, SEEK_CUR); } - break; + } + break; - case TFT_UTF32BE: - if (core_fread(file, &uchar, sizeof(uchar)) == sizeof(uchar)) - uchar = BIG_ENDIANIZE_INT32(uchar); - break; + case text_file_type::UTF32BE: + if (read(&uchar, sizeof(uchar)) == sizeof(uchar)) + uchar = BIG_ENDIANIZE_INT32(uchar); + break; - case TFT_UTF32LE: - if (core_fread(file, &uchar, sizeof(uchar)) == sizeof(uchar)) - uchar = LITTLE_ENDIANIZE_INT32(uchar); - break; + case text_file_type::UTF32LE: + if (read(&uchar, sizeof(uchar)) == sizeof(uchar)) + uchar = LITTLE_ENDIANIZE_INT32(uchar); + break; } if (uchar != ~0) { - /* place the new character in the ring buffer */ - file->back_char_head = 0; - file->back_char_tail = utf8_from_uchar(file->back_chars, ARRAY_LENGTH(file->back_chars), uchar); -/* assert(file->back_char_tail != -1);*/ + // place the new character in the ring buffer + m_back_char_head = 0; + m_back_char_tail = utf8_from_uchar(m_back_chars, ARRAY_LENGTH(m_back_chars), uchar); + //assert(file->back_char_tail != -1); } } - /* now read from the ring buffer */ - if (file->back_char_head != file->back_char_tail) + // now read from the ring buffer + if (m_back_char_head == m_back_char_tail) + result = EOF; + else { - result = file->back_chars[file->back_char_head++]; - file->back_char_head %= ARRAY_LENGTH(file->back_chars); + result = m_back_chars[m_back_char_head++]; + m_back_char_head %= ARRAY_LENGTH(m_back_chars); } - else - result = EOF; return result; } /*------------------------------------------------- - core_ungetc - put back a character read from - a file + ungetc - put back a character read from a + file -------------------------------------------------*/ -int core_ungetc(int c, core_file *file) +int core_text_file::ungetc(int c) { - file->back_chars[file->back_char_tail++] = (char) c; - file->back_char_tail %= ARRAY_LENGTH(file->back_chars); + m_back_chars[m_back_char_tail++] = char(c); + m_back_char_tail %= ARRAY_LENGTH(m_back_chars); return c; } /*------------------------------------------------- - core_fgets - read a line from a text file + gets - read a line from a text file -------------------------------------------------*/ -char *core_fgets(char *s, int n, core_file *file) +char *core_text_file::gets(char *s, int n) { char *cur = s; - /* loop while we have characters */ + // loop while we have characters while (n > 0) { - int c = core_fgetc(file); + int const c = getc(); if (c == EOF) break; - - /* if there's a CR, look for an LF afterwards */ - if (c == 0x0d) + else if (c == 0x0d) // if there's a CR, look for an LF afterwards { - int c2 = core_fgetc(file); + int const c2 = getc(); if (c2 != 0x0a) - core_ungetc(c2, file); + ungetc(c2); *cur++ = 0x0d; n--; break; } - - /* if there's an LF, reinterp as a CR for consistency */ - else if (c == 0x0a) + else if (c == 0x0a) // if there's an LF, reinterp as a CR for consistency { *cur++ = 0x0d; n--; break; } - - /* otherwise, pop the character in and continue */ - *cur++ = c; - n--; + else // otherwise, pop the character in and continue + { + *cur++ = c; + n--; + } } - /* if we put nothing in, return NULL */ + // if we put nothing in, return NULL if (cur == s) return nullptr; @@ -648,335 +551,412 @@ char *core_fgets(char *s, int n, core_file *file) /*------------------------------------------------- - core_fbuffer - return a pointer to the file - buffer; if it doesn't yet exist, load the - file into RAM first + puts - write a line to a text file -------------------------------------------------*/ -const void *core_fbuffer(core_file *file) +int core_text_file::puts(char const *s) { - file_error filerr; - UINT32 read_length; - - /* if we already have data, just return it */ - if (file->data != nullptr || !file->length) - return file->data; + char convbuf[1024]; + char *pconvbuf = convbuf; + int count = 0; - /* allocate some memory */ - file->data = (UINT8 *)malloc(file->length); - if (file->data == nullptr) - return nullptr; - file->data_allocated = TRUE; + // is this the beginning of the file? if so, write a byte order mark + if (tell() == 0 && !no_bom()) + { + *pconvbuf++ = char(0xef); + *pconvbuf++ = char(0xbb); + *pconvbuf++ = char(0xbf); + } - /* read the file */ - filerr = osd_or_zlib_read(file, file->data, 0, file->length, &read_length); - if (filerr != FILERR_NONE || read_length != file->length) + // convert '\n' to platform dependant line endings + while (*s != '\0') { - free(file->data); - file->data = nullptr; - return nullptr; + if (*s == '\n') + { + if (CRLF == 1) // CR only + *pconvbuf++ = 13; + else if (CRLF == 2) // LF only + *pconvbuf++ = 10; + else if (CRLF == 3) // CR+LF + { + *pconvbuf++ = 13; + *pconvbuf++ = 10; + } + } + else + *pconvbuf++ = *s; + s++; + + // if we overflow, break into chunks + if (pconvbuf >= convbuf + ARRAY_LENGTH(convbuf) - 10) + { + count += write(convbuf, pconvbuf - convbuf); + pconvbuf = convbuf; + } } - /* close the file because we don't need it anymore */ - osd_close(file->file); - file->file = nullptr; - return file->data; + // final flush + if (pconvbuf != convbuf) + count += write(convbuf, pconvbuf - convbuf); + + return count; } /*------------------------------------------------- - core_fload - open a file with the specified - filename, read it into memory, and return a - pointer + vprintf - vfprintf to a text file -------------------------------------------------*/ -file_error core_fload(const char *filename, void **data, UINT32 *length) +int core_text_file::vprintf(char const *fmt, va_list va) { - core_file *file = nullptr; - file_error err; - UINT64 size; + char buf[1024]; + vsnprintf(buf, sizeof(buf), fmt, va); + return puts(buf); +} - /* attempt to open the file */ - err = core_fopen(filename, OPEN_FLAG_READ, &file); - if (err != FILERR_NONE) - return err; - /* get the size */ - size = core_fsize(file); - if ((UINT32)size != size) - { - core_fclose(file); - return FILERR_OUT_OF_MEMORY; - } - /* allocate memory */ - *data = osd_malloc(size); - if (length != nullptr) - *length = (UINT32)size; +/*************************************************************************** + core_in_memory_file +***************************************************************************/ + +/*------------------------------------------------- + seek - seek within a file +-------------------------------------------------*/ - /* read the data */ - if (core_fread(file, *data, size) != size) +int core_in_memory_file::seek(std::int64_t offset, int whence) +{ + // flush any buffered char + clear_putback(); + + // switch off the relative location + switch (whence) { - core_fclose(file); - free(*data); - return FILERR_FAILURE; + case SEEK_SET: + m_offset = offset; + break; + + case SEEK_CUR: + m_offset += offset; + break; + + case SEEK_END: + m_offset = m_length + offset; + break; } + return 0; +} - /* close the file and return data */ - core_fclose(file); - return FILERR_NONE; + +/*------------------------------------------------- + eof - return 1 if we're at the end of file +-------------------------------------------------*/ + +bool core_in_memory_file::eof() const +{ + // check for buffered chars + if (has_putback()) + return 0; + + // if the offset == length, we're at EOF + return (m_offset >= m_length); } -file_error core_fload(const char *filename, dynamic_buffer &data) + +/*------------------------------------------------- + read - read from a file +-------------------------------------------------*/ + +std::uint32_t core_in_memory_file::read(void *buffer, std::uint32_t length) { - core_file *file = nullptr; - file_error err; - UINT64 size; + clear_putback(); - /* attempt to open the file */ - err = core_fopen(filename, OPEN_FLAG_READ, &file); - if (err != FILERR_NONE) - return err; + // handle RAM-based files + auto const bytes_read = safe_buffer_copy(m_data, std::size_t(m_offset), std::size_t(m_length), buffer, 0, length); + m_offset += bytes_read; + return bytes_read; +} - /* get the size */ - size = core_fsize(file); - if ((UINT32)size != size) - { - core_fclose(file); - return FILERR_OUT_OF_MEMORY; - } - /* allocate memory */ - data.resize(size); +/*------------------------------------------------- + truncate - truncate a file +-------------------------------------------------*/ - /* read the data */ - if (core_fread(file, &data[0], size) != size) - { - core_fclose(file); - data.clear(); +file_error core_in_memory_file::truncate(std::uint64_t offset) +{ + if (m_length < offset) return FILERR_FAILURE; - } - /* close the file and return data */ - core_fclose(file); + // adjust to new length and offset + set_length(offset); return FILERR_NONE; } - -/*************************************************************************** - FILE WRITE -***************************************************************************/ - /*------------------------------------------------- - core_fwrite - write to a file + safe_buffer_copy - copy safely from one + bounded buffer to another -------------------------------------------------*/ -UINT32 core_fwrite(core_file *file, const void *buffer, UINT32 length) +std::size_t core_in_memory_file::safe_buffer_copy( + void const *source, std::size_t sourceoffs, std::size_t sourcelen, + void *dest, std::size_t destoffs, std::size_t destlen) { - UINT32 bytes_written = 0; + auto const sourceavail = sourcelen - sourceoffs; + auto const destavail = destlen - destoffs; + auto const bytes_to_copy = (std::min)(sourceavail, destavail); + if (bytes_to_copy > 0) + { + std::memcpy( + reinterpret_cast(dest) + destoffs, + reinterpret_cast(source) + sourceoffs, + bytes_to_copy); + } + return bytes_to_copy; +} - /* can't write to RAM-based stuff */ - if (file->data != nullptr) - return 0; - /* flush any buffered char */ - file->back_char_head = 0; - file->back_char_tail = 0; - /* invalidate any buffered data */ - file->bufferbytes = 0; +/*************************************************************************** + core_osd_file +***************************************************************************/ - /* do the write */ - osd_or_zlib_write(file, buffer, file->offset, length, &bytes_written); +/*------------------------------------------------- + closes a file +-------------------------------------------------*/ - /* return the number of bytes read */ - file->offset += bytes_written; - file->length = MAX(file->length, file->offset); - return bytes_written; +core_osd_file::~core_osd_file() +{ + // close files and free memory + if (m_zdata) + compress(FCOMPRESS_NONE); + if (m_file) + osd_close(m_file); } /*------------------------------------------------- - core_fputs - write a line to a text file + compress - enable/disable streaming file + compression via zlib; level is 0 to disable + compression, or up to 9 for max compression -------------------------------------------------*/ -int core_fputs(core_file *f, const char *s) +file_error core_osd_file::compress(int level) { - char convbuf[1024]; - char *pconvbuf = convbuf; - int count = 0; + file_error result = FILERR_NONE; - /* is this the beginning of the file? if so, write a byte order mark */ - if (f->offset == 0 && !(f->openflags & OPEN_FLAG_NO_BOM)) - { - *pconvbuf++ = (char)0xef; - *pconvbuf++ = (char)0xbb; - *pconvbuf++ = (char)0xbf; - } + // can only do this for read-only and write-only cases + if (read_access() && write_access()) + return FILERR_INVALID_ACCESS; - /* convert '\n' to platform dependant line endings */ - while (*s != 0) + // if we have been compressing, flush and free the data + if (m_zdata && (level == FCOMPRESS_NONE)) { - if (*s == '\n') + int zerr = Z_OK; + + // flush any remaining data if we are writing + while (write_access() != 0 && (zerr != Z_STREAM_END)) { - if (CRLF == 1) /* CR only */ - *pconvbuf++ = 13; - else if (CRLF == 2) /* LF only */ - *pconvbuf++ = 10; - else if (CRLF == 3) /* CR+LF */ + // deflate some more + zerr = m_zdata->finalise(); + if (zerr != Z_STREAM_END && zerr != Z_OK) { - *pconvbuf++ = 13; - *pconvbuf++ = 10; + result = FILERR_INVALID_DATA; + break; } - } - else - *pconvbuf++ = *s; - s++; - /* if we overflow, break into chunks */ - if (pconvbuf >= convbuf + ARRAY_LENGTH(convbuf) - 10) - { - count += core_fwrite(f, convbuf, pconvbuf - convbuf); - pconvbuf = convbuf; + // write the data + if (m_zdata->has_output()) + { + std::uint32_t actualdata; + auto const filerr = osd_write(m_file, m_zdata->buffer_data(), m_zdata->realoffset(), m_zdata->output_size(), &actualdata); + if (filerr != FILERR_NONE) + break; + m_zdata->add_realoffset(actualdata); + m_zdata->reset_output(); + } } + + // free memory + m_zdata.reset(); } - /* final flush */ - if (pconvbuf != convbuf) - count += core_fwrite(f, convbuf, pconvbuf - convbuf); + // if we are just starting to compress, allocate a new buffer + if (!m_zdata && (level > FCOMPRESS_NONE)) + { + int zerr; - return count; -} + // initialize the stream and compressor + if (write_access()) + zerr = zlib_data::start_compression(level, offset(), m_zdata); + else + zerr = zlib_data::start_decompression(offset(), m_zdata); + // on error, return an error + if (zerr != Z_OK) + return FILERR_OUT_OF_MEMORY; -/*------------------------------------------------- - core_vfprintf - vfprintf to a text file --------------------------------------------------*/ + // flush buffers + m_bufferbytes = 0; + } -int core_vfprintf(core_file *f, const char *fmt, va_list va) -{ - char buf[1024]; - vsnprintf(buf, sizeof(buf), fmt, va); - return core_fputs(f, buf); + return result; } /*------------------------------------------------- - core_fprintf - vfprintf to a text file + seek - seek within a file -------------------------------------------------*/ -int CLIB_DECL core_fprintf(core_file *f, const char *fmt, ...) +int core_osd_file::seek(std::int64_t offset, int whence) { - int rc; - va_list va; - va_start(va, fmt); - rc = core_vfprintf(f, fmt, va); - va_end(va); - return rc; + // error if compressing + if (m_zdata) + return 1; + else + return core_in_memory_file::seek(offset, whence); } /*------------------------------------------------- - core_truncate - truncate a file + read - read from a file -------------------------------------------------*/ -file_error core_truncate(core_file *f, UINT64 offset) +std::uint32_t core_osd_file::read(void *buffer, std::uint32_t length) { - file_error err; + if (!m_file || is_loaded()) + return core_in_memory_file::read(buffer, length); - /* truncate file */ - err = osd_truncate(f->file, offset); - if (err != FILERR_NONE) - return err; + // flush any buffered char + clear_putback(); - /* and adjust to new length and offset */ - f->length = offset; - f->offset = MIN(f->offset, f->length); + std::uint32_t bytes_read = 0; - return FILERR_NONE; + // if we're within the buffer, consume that first + if (is_buffered()) + bytes_read += safe_buffer_copy(m_buffer, offset() - m_bufferbase, m_bufferbytes, buffer, bytes_read, length); + + // if we've got a small amount left, read it into the buffer first + if (bytes_read < length) + { + if ((length - bytes_read) < (sizeof(m_buffer) / 2)) + { + // read as much as makes sense into the buffer + m_bufferbase = offset() + bytes_read; + m_bufferbytes = 0; + osd_or_zlib_read(m_buffer, m_bufferbase, sizeof(m_buffer), m_bufferbytes); + + // do a bounded copy from the buffer to the destination + bytes_read += safe_buffer_copy(m_buffer, 0, m_bufferbytes, buffer, bytes_read, length); + } + else + { + // read the remainder directly from the file + std::uint32_t new_bytes_read = 0; + osd_or_zlib_read(reinterpret_cast(buffer) + bytes_read, offset() + bytes_read, length - bytes_read, new_bytes_read); + bytes_read += new_bytes_read; + } + } + + // return the number of bytes read + add_offset(bytes_read); + return bytes_read; } /*------------------------------------------------- - core_truncate - flush write buffer + buffer - return a pointer to the file buffer; + if it doesn't yet exist, load the file into + RAM first -------------------------------------------------*/ -file_error core_fflush(core_file *f) +void const *core_osd_file::buffer() { - return osd_fflush(f->file); + // if we already have data, just return it + if (!is_loaded() && length()) + { + // allocate some memory + void *buf = allocate(); + if (!buf) return nullptr; + + // read the file + std::uint32_t read_length = 0; + auto const filerr = osd_or_zlib_read(buf, 0, length(), read_length); + if ((filerr != FILERR_NONE) || (read_length != length())) + purge(); + else + { + // close the file because we don't need it anymore + osd_close(m_file); + m_file = nullptr; + } + } + return core_in_memory_file::buffer(); } - -/*************************************************************************** - FILENAME UTILITIES -***************************************************************************/ - /*------------------------------------------------- - core_filename_extract_base - extract the base - name from a filename; note that this makes - assumptions about path separators + write - write to a file -------------------------------------------------*/ -std::string core_filename_extract_base(const char *name, bool strip_extension) +std::uint32_t core_osd_file::write(void const *buffer, std::uint32_t length) { - /* find the start of the name */ - const char *start = name + strlen(name); - while (start > name && !is_directory_separator(start[-1])) - start--; + // can't write to RAM-based stuff + if (is_loaded()) + return core_in_memory_file::write(buffer, length); - /* copy the rest into an astring */ - std::string result(start); + // flush any buffered char + clear_putback(); - /* chop the extension if present */ - if (strip_extension) - result = result.substr(0, result.find_last_of('.')); - return result; + // invalidate any buffered data + m_bufferbytes = 0; + + // do the write + std::uint32_t bytes_written = 0; + osd_or_zlib_write(buffer, offset(), length, bytes_written); + + // return the number of bytes written + add_offset(bytes_written); + return bytes_written; } /*------------------------------------------------- - core_filename_ends_with - does the given - filename end with the specified extension? + truncate - truncate a file -------------------------------------------------*/ -int core_filename_ends_with(const char *filename, const char *extension) +file_error core_osd_file::truncate(std::uint64_t offset) { - int namelen = strlen(filename); - int extlen = strlen(extension); - int matches = TRUE; + if (is_loaded()) + return core_in_memory_file::truncate(offset); - /* work backwards checking for a match */ - while (extlen > 0) - if (tolower((UINT8)filename[--namelen]) != tolower((UINT8)extension[--extlen])) - { - matches = FALSE; - break; - } + // truncate file + auto const err = osd_truncate(m_file, offset); + if (err != FILERR_NONE) + return err; - return matches; + // and adjust to new length and offset + set_length(offset); + return FILERR_NONE; } - -/*************************************************************************** - MISC HELPERS -***************************************************************************/ - /*------------------------------------------------- - safe_buffer_copy - copy safely from one - bounded buffer to another + flush - flush file buffers -------------------------------------------------*/ -static UINT32 safe_buffer_copy(const void *source, UINT32 sourceoffs, UINT32 sourcelen, void *dest, UINT32 destoffs, UINT32 destlen) +file_error core_osd_file::flush() { - UINT32 sourceavail = sourcelen - sourceoffs; - UINT32 destavail = destlen - destoffs; - UINT32 bytes_to_copy = MIN(sourceavail, destavail); - if (bytes_to_copy > 0) - memcpy((UINT8 *)dest + destoffs, (const UINT8 *)source + sourceoffs, bytes_to_copy); - return bytes_to_copy; + if (is_loaded()) + return core_in_memory_file::flush(); + + // flush any buffered char + clear_putback(); + + // invalidate any buffered data + m_bufferbytes = 0; + + return osd_fflush(m_file); } @@ -985,50 +965,47 @@ static UINT32 safe_buffer_copy(const void *source, UINT32 sourceoffs, UINT32 sou handles zlib-compressed data -------------------------------------------------*/ -static file_error osd_or_zlib_read(core_file *file, void *buffer, UINT64 offset, UINT32 length, UINT32 *actual) +file_error core_osd_file::osd_or_zlib_read(void *buffer, std::uint64_t offset, std::uint32_t length, std::uint32_t &actual) { - /* if no compression, just pass through */ - if (file->zdata == nullptr) - return osd_read(file->file, buffer, offset, length, actual); + // if no compression, just pass through + if (!m_zdata) + return osd_read(m_file, buffer, offset, length, &actual); - /* if the offset doesn't match the next offset, fail */ - if (offset != file->zdata->nextoffset) + // if the offset doesn't match the next offset, fail + if (m_zdata->is_nextoffset(offset)) return FILERR_INVALID_ACCESS; - /* set up the destination */ - file->zdata->stream.next_out = (Bytef *)buffer; - file->zdata->stream.avail_out = length; - while (file->zdata->stream.avail_out != 0) + // set up the destination + m_zdata->set_output(buffer, length); + while (!m_zdata->output_full()) { - file_error filerr; - UINT32 actualdata; int zerr = Z_OK; - /* if we didn't make progress, report an error or the end */ - if (file->zdata->stream.avail_in != 0) - zerr = inflate(&file->zdata->stream, Z_SYNC_FLUSH); + // if we didn't make progress, report an error or the end + if (m_zdata->has_input()) + zerr = m_zdata->decompress(); if (zerr != Z_OK) { - *actual = length - file->zdata->stream.avail_out; - file->zdata->nextoffset += *actual; + actual = length - m_zdata->output_space(); + m_zdata->add_nextoffset(actual); return (zerr == Z_STREAM_END) ? FILERR_NONE : FILERR_INVALID_DATA; } - /* fetch more data if needed */ - if (file->zdata->stream.avail_in == 0) + // fetch more data if needed + if (!m_zdata->has_input()) { - filerr = osd_read(file->file, file->zdata->buffer, file->zdata->realoffset, sizeof(file->zdata->buffer), &actualdata); + std::uint32_t actualdata; + auto const filerr = osd_read(m_file, m_zdata->buffer_data(), m_zdata->realoffset(), m_zdata->buffer_size(), &actualdata); if (filerr != FILERR_NONE) return filerr; - file->zdata->realoffset += actualdata; - file->zdata->stream.next_in = file->zdata->buffer; - file->zdata->stream.avail_in = sizeof(file->zdata->buffer); + m_zdata->add_realoffset(actual); + m_zdata->reset_input(actualdata); } } - /* we read everything */ - *actual = length; - file->zdata->nextoffset += *actual; + // we read everything + actual = length; + m_zdata->add_nextoffset(actual); return FILERR_NONE; } @@ -1039,61 +1016,307 @@ static file_error osd_or_zlib_read(core_file *file, void *buffer, UINT64 offset, -------------------------------------------------*/ /** - * @fn static file_error osd_or_zlib_write(core_file *file, const void *buffer, UINT64 offset, UINT32 length, UINT32 *actual) + * @fn file_error osd_or_zlib_write(void const *buffer, std::uint64_t offset, std::uint32_t length, std::uint32_t actual) * * @brief OSD or zlib write. * - * @param [in,out] file If non-null, the file. * @param buffer The buffer. * @param offset The offset. * @param length The length. - * @param [in,out] actual If non-null, the actual. + * @param [in,out] actual The actual. * * @return A file_error. */ -static file_error osd_or_zlib_write(core_file *file, const void *buffer, UINT64 offset, UINT32 length, UINT32 *actual) +file_error core_osd_file::osd_or_zlib_write(void const *buffer, std::uint64_t offset, std::uint32_t length, std::uint32_t &actual) { - /* if no compression, just pass through */ - if (file->zdata == nullptr) - return osd_write(file->file, buffer, offset, length, actual); + // if no compression, just pass through + if (!m_zdata) + return osd_write(m_file, buffer, offset, length, &actual); - /* if the offset doesn't match the next offset, fail */ - if (offset != file->zdata->nextoffset) + // if the offset doesn't match the next offset, fail + if (!m_zdata->is_nextoffset(offset)) return FILERR_INVALID_ACCESS; - /* set up the source */ - file->zdata->stream.next_in = (Bytef *)buffer; - file->zdata->stream.avail_in = length; - while (file->zdata->stream.avail_in != 0) + // set up the source + m_zdata->set_input(buffer, length); + while (m_zdata->has_input()) { - file_error filerr; - UINT32 actualdata; - int zerr; - - /* if we didn't make progress, report an error or the end */ - zerr = deflate(&file->zdata->stream, Z_NO_FLUSH); + // if we didn't make progress, report an error or the end + auto const zerr = m_zdata->compress(); if (zerr != Z_OK) { - *actual = length - file->zdata->stream.avail_in; - file->zdata->nextoffset += *actual; + actual = length - m_zdata->input_size(); + m_zdata->add_nextoffset(actual); return FILERR_INVALID_DATA; } - /* write more data if we are full up */ - if (file->zdata->stream.avail_out == 0) + // write more data if we are full up + if (m_zdata->output_full()) { - filerr = osd_write(file->file, file->zdata->buffer, file->zdata->realoffset, sizeof(file->zdata->buffer), &actualdata); + std::uint32_t actualdata; + auto const filerr = osd_write(m_file, m_zdata->buffer_data(), m_zdata->realoffset(), m_zdata->output_size(), &actualdata); if (filerr != FILERR_NONE) return filerr; - file->zdata->realoffset += actualdata; - file->zdata->stream.next_out = file->zdata->buffer; - file->zdata->stream.avail_out = sizeof(file->zdata->buffer); + m_zdata->add_realoffset(actualdata); + m_zdata->reset_output(); } } - /* we read everything */ - *actual = length; - file->zdata->nextoffset += *actual; + // we wrote everything + actual = length; + m_zdata->add_nextoffset(actual); return FILERR_NONE; } + +} // anonymous namespace + + + +/*************************************************************************** + core_file +***************************************************************************/ + +/*------------------------------------------------- + open - open a file for access and + return an error code +-------------------------------------------------*/ + +file_error core_file::open(char const *filename, std::uint32_t openflags, ptr &file) +{ + // attempt to open the file + osd_file *f = nullptr; + std::uint64_t length = 0; + auto const filerr = osd_open(filename, openflags, &f, &length); + if (filerr != FILERR_NONE) + return filerr; + + try + { + file = std::make_unique(openflags, f, length); + return FILERR_NONE; + } + catch (...) + { + osd_close(f); + return FILERR_OUT_OF_MEMORY; + } +} + + +/*------------------------------------------------- + open_ram - open a RAM-based buffer for file- + like access and return an error code +-------------------------------------------------*/ + +file_error core_file::open_ram(void const *data, std::size_t length, std::uint32_t openflags, ptr &file) +{ + // can only do this for read access + if ((openflags & OPEN_FLAG_WRITE) || (openflags & OPEN_FLAG_CREATE)) + return FILERR_INVALID_ACCESS; + + try + { + file.reset(new core_in_memory_file(openflags, data, length, false)); + return FILERR_NONE; + } + catch (...) + { + return FILERR_OUT_OF_MEMORY; + } +} + + +/*------------------------------------------------- + open_ram_copy - open a copy of a RAM-based + buffer for file-like access and return an + error code +-------------------------------------------------*/ + +file_error core_file::open_ram_copy(void const *data, std::size_t length, std::uint32_t openflags, ptr &file) +{ + // can only do this for read access + if ((openflags & OPEN_FLAG_WRITE) || (openflags & OPEN_FLAG_CREATE)) + return FILERR_INVALID_ACCESS; + + try + { + ptr result(new core_in_memory_file(openflags, data, length, true)); + if (!result->buffer()) + return FILERR_OUT_OF_MEMORY; + + return FILERR_NONE; + } + catch (...) + { + return FILERR_OUT_OF_MEMORY; + } +} + + +/*------------------------------------------------- + open_proxy - open a proxy to an existing file + object and return an error code +-------------------------------------------------*/ + +file_error core_file::open_proxy(core_file &file, ptr &proxy) +{ + try + { + proxy = std::make_unique(file); + return FILERR_NONE; + } + catch (...) + { + return FILERR_OUT_OF_MEMORY; + } +} + + +/*------------------------------------------------- + closes a file +-------------------------------------------------*/ + +core_file::~core_file() +{ +} + + +/*------------------------------------------------- + load - open a file with the specified + filename, read it into memory, and return a + pointer +-------------------------------------------------*/ + +file_error core_file::load(char const *filename, void **data, std::uint32_t &length) +{ + ptr file; + + // attempt to open the file + auto const err = open(filename, OPEN_FLAG_READ, file); + if (err != FILERR_NONE) + return err; + + // get the size + auto const size = file->size(); + if (std::uint32_t(size) != size) + return FILERR_OUT_OF_MEMORY; + + // allocate memory + *data = osd_malloc(size); + length = std::uint32_t(size); + + // read the data + if (file->read(*data, size) != size) + { + free(*data); + return FILERR_FAILURE; + } + + // close the file and return data + return FILERR_NONE; +} + +file_error core_file::load(char const *filename, dynamic_buffer &data) +{ + ptr file; + + // attempt to open the file + auto const err = open(filename, OPEN_FLAG_READ, file); + if (err != FILERR_NONE) + return err; + + // get the size + auto const size = file->size(); + if (std::uint32_t(size) != size) + return FILERR_OUT_OF_MEMORY; + + // allocate memory + data.resize(size); + + // read the data + if (file->read(&data[0], size) != size) + { + data.clear(); + return FILERR_FAILURE; + } + + // close the file and return data + return FILERR_NONE; +} + + +/*------------------------------------------------- + printf - printf to a text file +-------------------------------------------------*/ + +int CLIB_DECL core_file::printf(char const *fmt, ...) +{ + va_list va; + va_start(va, fmt); + auto const rc = vprintf(fmt, va); + va_end(va); + return rc; +} + + +/*------------------------------------------------- + protected constructor +-------------------------------------------------*/ + +core_file::core_file() +{ +} + +} // namespace util + + + +/*************************************************************************** + FILENAME UTILITIES +***************************************************************************/ + +/*------------------------------------------------- + core_filename_extract_base - extract the base + name from a filename; note that this makes + assumptions about path separators +-------------------------------------------------*/ + +std::string core_filename_extract_base(const char *name, bool strip_extension) +{ + /* find the start of the name */ + const char *start = name + strlen(name); + while (start > name && !util::is_directory_separator(start[-1])) + start--; + + /* copy the rest into an astring */ + std::string result(start); + + /* chop the extension if present */ + if (strip_extension) + result = result.substr(0, result.find_last_of('.')); + return result; +} + + +/*------------------------------------------------- + core_filename_ends_with - does the given + filename end with the specified extension? +-------------------------------------------------*/ + +int core_filename_ends_with(const char *filename, const char *extension) +{ + int namelen = strlen(filename); + int extlen = strlen(extension); + int matches = TRUE; + + /* work backwards checking for a match */ + while (extlen > 0) + if (tolower((UINT8)filename[--namelen]) != tolower((UINT8)extension[--extlen])) + { + matches = FALSE; + break; + } + + return matches; +} diff --git a/src/lib/util/corefile.h b/src/lib/util/corefile.h index 36060631f35..a5837e6de21 100644 --- a/src/lib/util/corefile.h +++ b/src/lib/util/corefile.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:Aaron Giles, Vas Crabb /*************************************************************************** corefile.h @@ -15,10 +15,14 @@ #include #include "corestr.h" -#include #include "coretmpl.h" +#include +#include +#include + +namespace util { /*************************************************************************** ADDITIONAL OPEN FLAGS @@ -32,98 +36,104 @@ #define FCOMPRESS_MAX 9 /* maximum compression */ - /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ -struct core_file; - - +class core_file +{ +public: + typedef std::unique_ptr ptr; -/*************************************************************************** - FUNCTION PROTOTYPES -***************************************************************************/ + // ----- file open/close ----- -/* ----- file open/close ----- */ + // open a file with the specified filename + static file_error open(const char *filename, std::uint32_t openflags, ptr &file); -/* open a file with the specified filename */ -file_error core_fopen(const char *filename, UINT32 openflags, core_file **file); + // open a RAM-based "file" using the given data and length (read-only) + static file_error open_ram(const void *data, std::size_t length, std::uint32_t openflags, ptr &file); -/* open a RAM-based "file" using the given data and length (read-only) */ -file_error core_fopen_ram(const void *data, size_t length, UINT32 openflags, core_file **file); + // open a RAM-based "file" using the given data and length (read-only), copying the data + static file_error open_ram_copy(const void *data, std::size_t length, std::uint32_t openflags, ptr &file); -/* open a RAM-based "file" using the given data and length (read-only), copying the data */ -file_error core_fopen_ram_copy(const void *data, size_t length, UINT32 openflags, core_file **file); + // open a proxy "file" that forwards requests to another file object + static file_error open_proxy(core_file &file, ptr &proxy); -/* close an open file */ -void core_fclose(core_file *file); + // close an open file + virtual ~core_file(); -/* enable/disable streaming file compression via zlib; level is 0 to disable compression, or up to 9 for max compression */ -file_error core_fcompress(core_file *file, int level); + // enable/disable streaming file compression via zlib; level is 0 to disable compression, or up to 9 for max compression + virtual file_error compress(int level) = 0; + // ----- file positioning ----- -/* ----- file positioning ----- */ + // adjust the file pointer within the file + virtual int seek(std::int64_t offset, int whence) = 0; -/* adjust the file pointer within the file */ -int core_fseek(core_file *file, INT64 offset, int whence); + // return the current file pointer + virtual std::uint64_t tell() const = 0; -/* return the current file pointer */ -UINT64 core_ftell(core_file *file); + // return true if we are at the EOF + virtual bool eof() const = 0; -/* return true if we are at the EOF */ -int core_feof(core_file *file); + // return the total size of the file + virtual std::uint64_t size() const = 0; -/* return the total size of the file */ -UINT64 core_fsize(core_file *file); + // ----- file read ----- + // standard binary read from a file + virtual std::uint32_t read(void *buffer, std::uint32_t length) = 0; -/* ----- file read ----- */ + // read one character from the file + virtual int getc() = 0; -/* standard binary read from a file */ -UINT32 core_fread(core_file *file, void *buffer, UINT32 length); + // put back one character from the file + virtual int ungetc(int c) = 0; -/* read one character from the file */ -int core_fgetc(core_file *file); + // read a full line of text from the file + virtual char *gets(char *s, int n) = 0; -/* put back one character from the file */ -int core_ungetc(int c, core_file *file); + // get a pointer to a buffer that holds the full file data in RAM + // this function may cause the full file data to be read + virtual const void *buffer() = 0; -/* read a full line of text from the file */ -char *core_fgets(char *s, int n, core_file *file); + // open a file with the specified filename, read it into memory, and return a pointer + static file_error load(const char *filename, void **data, std::uint32_t &length); + static file_error load(const char *filename, dynamic_buffer &data); -/* get a pointer to a buffer that holds the full file data in RAM */ -/* this function may cause the full file data to be read */ -const void *core_fbuffer(core_file *file); -/* open a file with the specified filename, read it into memory, and return a pointer */ -file_error core_fload(const char *filename, void **data, UINT32 *length); -file_error core_fload(const char *filename, dynamic_buffer &data); + // ----- file write ----- + // standard binary write to a file + virtual std::uint32_t write(const void *buffer, std::uint32_t length) = 0; + // write a line of text to the file + virtual int puts(const char *s) = 0; -/* ----- file write ----- */ + // printf-style text write to a file + virtual int vprintf(const char *fmt, va_list va) = 0; + int CLIB_DECL printf(const char *fmt, ...) ATTR_PRINTF(2,3); -/* standard binary write to a file */ -UINT32 core_fwrite(core_file *file, const void *buffer, UINT32 length); + // file truncation + virtual file_error truncate(std::uint64_t offset) = 0; -/* write a line of text to the file */ -int core_fputs(core_file *f, const char *s); + // flush file buffers + virtual file_error flush() = 0; -/* printf-style text write to a file */ -int core_vfprintf(core_file *f, const char *fmt, va_list va); -int CLIB_DECL core_fprintf(core_file *f, const char *fmt, ...) ATTR_PRINTF(2,3); -/* file truncation */ -file_error core_truncate(core_file *f, UINT64 offset); +protected: + core_file(); +}; -/* flush file buffers */ -file_error core_fflush(core_file *f); +} // namespace util +/*************************************************************************** + FUNCTION PROTOTYPES +***************************************************************************/ /* ----- filename utilities ----- */ diff --git a/src/lib/util/flac.cpp b/src/lib/util/flac.cpp index f70ae709978..c66cc281931 100644 --- a/src/lib/util/flac.cpp +++ b/src/lib/util/flac.cpp @@ -35,7 +35,7 @@ flac_encoder::flac_encoder(void *buffer, UINT32 buflength) } -flac_encoder::flac_encoder(core_file &file) +flac_encoder::flac_encoder(util::core_file &file) { init_common(); reset(file); @@ -100,7 +100,7 @@ bool flac_encoder::reset(void *buffer, UINT32 buflength) // reset - reset state with new file parameters //------------------------------------------------- -bool flac_encoder::reset(core_file &file) +bool flac_encoder::reset(util::core_file &file) { // configure the output m_compressed_start = nullptr; @@ -185,7 +185,7 @@ UINT32 flac_encoder::finish() { // process the data and return the amount written FLAC__stream_encoder_finish(m_encoder); - return (m_file != nullptr) ? core_ftell(m_file) : m_compressed_offset; + return (m_file != nullptr) ? m_file->tell() : m_compressed_offset; } @@ -252,7 +252,7 @@ FLAC__StreamEncoderWriteStatus flac_encoder::write_callback(const FLAC__byte buf { int count = bytes - offset; if (m_file != nullptr) - core_fwrite(m_file, buffer, count); + m_file->write(buffer, count); else { if (m_compressed_offset + count <= m_compressed_length) @@ -308,7 +308,7 @@ flac_decoder::flac_decoder(const void *buffer, UINT32 length, const void *buffer // flac_decoder - constructor //------------------------------------------------- -flac_decoder::flac_decoder(core_file &file) +flac_decoder::flac_decoder(util::core_file &file) : m_decoder(FLAC__stream_decoder_new()), m_file(&file), m_compressed_offset(0), @@ -414,7 +414,7 @@ bool flac_decoder::reset(UINT32 sample_rate, UINT8 num_channels, UINT32 block_si // reset - reset state with new file parameter //------------------------------------------------- -bool flac_decoder::reset(core_file &file) +bool flac_decoder::reset(util::core_file &file) { m_file = &file; m_compressed_start = nullptr; @@ -511,7 +511,7 @@ FLAC__StreamDecoderReadStatus flac_decoder::read_callback(FLAC__byte buffer[], s // if a file, just read if (m_file != nullptr) - *bytes = core_fread(m_file, buffer, expected); + *bytes = m_file->read(buffer, expected); // otherwise, copy from memory else diff --git a/src/lib/util/flac.h b/src/lib/util/flac.h index 563c40974e0..1f9a49b14bd 100644 --- a/src/lib/util/flac.h +++ b/src/lib/util/flac.h @@ -35,7 +35,7 @@ public: // construction/destruction flac_encoder(); flac_encoder(void *buffer, UINT32 buflength); - flac_encoder(core_file &file); + flac_encoder(util::core_file &file); ~flac_encoder(); // configuration @@ -51,7 +51,7 @@ public: // reset bool reset(); bool reset(void *buffer, UINT32 buflength); - bool reset(core_file &file); + bool reset(util::core_file &file); // encode a buffer bool encode_interleaved(const INT16 *samples, UINT32 samples_per_channel, bool swap_endian = false); @@ -68,7 +68,7 @@ private: // internal state FLAC__StreamEncoder * m_encoder; // actual encoder - core_file * m_file; // output file + util::core_file * m_file; // output file UINT32 m_compressed_offset; // current offset with the compressed stream FLAC__byte * m_compressed_start; // start of compressed data UINT32 m_compressed_length; // length of the compressed stream @@ -93,7 +93,7 @@ public: // construction/destruction flac_decoder(); flac_decoder(const void *buffer, UINT32 length, const void *buffer2 = nullptr, UINT32 length2 = 0); - flac_decoder(core_file &file); + flac_decoder(util::core_file &file); ~flac_decoder(); // getters (valid after reset) @@ -108,7 +108,7 @@ public: bool reset(); bool reset(const void *buffer, UINT32 length, const void *buffer2 = nullptr, UINT32 length2 = 0); bool reset(UINT32 sample_rate, UINT8 num_channels, UINT32 block_size, const void *buffer, UINT32 length); - bool reset(core_file &file); + bool reset(util::core_file &file); // decode to a buffer; num_samples must be a multiple of the block size bool decode_interleaved(INT16 *samples, UINT32 num_samples, bool swap_endian = false); @@ -129,7 +129,7 @@ private: // output state FLAC__StreamDecoder * m_decoder; // actual encoder - core_file * m_file; // output file + util::core_file * m_file; // output file UINT32 m_sample_rate; // decoded sample rate UINT8 m_channels; // decoded number of channels UINT8 m_bits_per_sample; // decoded bits per sample diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp index 56bad147bcb..9890ae46115 100644 --- a/src/lib/util/options.cpp +++ b/src/lib/util/options.cpp @@ -400,11 +400,11 @@ bool core_options::parse_command_line(int argc, char **argv, int priority, std:: // an INI file //------------------------------------------------- -bool core_options::parse_ini_file(core_file &inifile, int priority, int ignore_priority, std::string &error_string) +bool core_options::parse_ini_file(util::core_file &inifile, int priority, int ignore_priority, std::string &error_string) { // loop over lines in the file char buffer[4096]; - while (core_fgets(buffer, ARRAY_LENGTH(buffer), &inifile) != nullptr) + while (inifile.gets(buffer, ARRAY_LENGTH(buffer)) != nullptr) { // find the extent of the name char *optionname; diff --git a/src/lib/util/options.h b/src/lib/util/options.h index cf58bc67222..4ffdf00ae35 100644 --- a/src/lib/util/options.h +++ b/src/lib/util/options.h @@ -142,7 +142,7 @@ public: // parsing/input bool parse_command_line(int argc, char **argv, int priority, std::string &error_string); - bool parse_ini_file(core_file &inifile, int priority, int ignore_priority, std::string &error_string); + bool parse_ini_file(util::core_file &inifile, int priority, int ignore_priority, std::string &error_string); // reverting void revert(int priority = OPTION_PRIORITY_MAXIMUM); diff --git a/src/lib/util/png.cpp b/src/lib/util/png.cpp index a6b269593ef..8023d350cdc 100644 --- a/src/lib/util/png.cpp +++ b/src/lib/util/png.cpp @@ -148,12 +148,12 @@ void png_free(png_info *pnginfo) header at the current file location -------------------------------------------------*/ -static png_error verify_header(core_file *fp) +static png_error verify_header(util::core_file &fp) { UINT8 signature[8]; /* read 8 bytes */ - if (core_fread(fp, signature, 8) != 8) + if (fp.read(signature, 8) != 8) return PNGERR_FILE_TRUNCATED; /* return an error if we don't match */ @@ -168,18 +168,18 @@ static png_error verify_header(core_file *fp) read_chunk - read the next PNG chunk -------------------------------------------------*/ -static png_error read_chunk(core_file *fp, UINT8 **data, UINT32 *type, UINT32 *length) +static png_error read_chunk(util::core_file &fp, UINT8 **data, UINT32 *type, UINT32 *length) { UINT32 crc, chunk_crc; UINT8 tempbuff[4]; /* fetch the length of this chunk */ - if (core_fread(fp, tempbuff, 4) != 4) + if (fp.read(tempbuff, 4) != 4) return PNGERR_FILE_TRUNCATED; *length = fetch_32bit(tempbuff); /* fetch the type of this chunk */ - if (core_fread(fp, tempbuff, 4) != 4) + if (fp.read(tempbuff, 4) != 4) return PNGERR_FILE_TRUNCATED; *type = fetch_32bit(tempbuff); @@ -200,7 +200,7 @@ static png_error read_chunk(core_file *fp, UINT8 **data, UINT32 *type, UINT32 *l return PNGERR_OUT_OF_MEMORY; /* read the data from the file */ - if (core_fread(fp, *data, *length) != *length) + if (fp.read(*data, *length) != *length) { free(*data); *data = nullptr; @@ -212,7 +212,7 @@ static png_error read_chunk(core_file *fp, UINT8 **data, UINT32 *type, UINT32 *l } /* read the CRC */ - if (core_fread(fp, tempbuff, 4) != 4) + if (fp.read(tempbuff, 4) != 4) { free(*data); *data = nullptr; @@ -502,7 +502,7 @@ handle_error: png_read_file - read a PNG from a core stream -------------------------------------------------*/ -png_error png_read_file(core_file *fp, png_info *pnginfo) +png_error png_read_file(util::core_file &fp, png_info *pnginfo) { UINT8 *chunk_data = nullptr; png_private png; @@ -579,7 +579,7 @@ handle_error: bitmap -------------------------------------------------*/ -png_error png_read_bitmap(core_file *fp, bitmap_argb32 &bitmap) +png_error png_read_bitmap(util::core_file &fp, bitmap_argb32 &bitmap) { png_error result; png_info png; @@ -747,7 +747,7 @@ png_error png_add_text(png_info *pnginfo, const char *keyword, const char *text) the given file -------------------------------------------------*/ -static png_error write_chunk(core_file *fp, const UINT8 *data, UINT32 type, UINT32 length) +static png_error write_chunk(util::core_file &fp, const UINT8 *data, UINT32 type, UINT32 length) { UINT8 tempbuff[8]; UINT32 crc; @@ -758,20 +758,20 @@ static png_error write_chunk(core_file *fp, const UINT8 *data, UINT32 type, UINT crc = crc32(0, tempbuff + 4, 4); /* write that data */ - if (core_fwrite(fp, tempbuff, 8) != 8) + if (fp.write(tempbuff, 8) != 8) return PNGERR_FILE_ERROR; /* append the actual data */ if (length > 0) { - if (core_fwrite(fp, data, length) != length) + if (fp.write(data, length) != length) return PNGERR_FILE_ERROR; crc = crc32(crc, data, length); } /* write the CRC */ put_32bit(tempbuff, crc); - if (core_fwrite(fp, tempbuff, 4) != 4) + if (fp.write(tempbuff, 4) != 4) return PNGERR_FILE_ERROR; return PNGERR_NONE; @@ -783,9 +783,9 @@ static png_error write_chunk(core_file *fp, const UINT8 *data, UINT32 type, UINT chunk to the given file by deflating it -------------------------------------------------*/ -static png_error write_deflated_chunk(core_file *fp, UINT8 *data, UINT32 type, UINT32 length) +static png_error write_deflated_chunk(util::core_file &fp, UINT8 *data, UINT32 type, UINT32 length) { - UINT64 lengthpos = core_ftell(fp); + UINT64 lengthpos = fp.tell(); UINT8 tempbuff[8192]; UINT32 zlength = 0; z_stream stream; @@ -798,7 +798,7 @@ static png_error write_deflated_chunk(core_file *fp, UINT8 *data, UINT32 type, U crc = crc32(0, tempbuff + 4, 4); /* write that data */ - if (core_fwrite(fp, tempbuff, 8) != 8) + if (fp.write(tempbuff, 8) != 8) return PNGERR_FILE_ERROR; /* initialize the stream */ @@ -821,7 +821,7 @@ static png_error write_deflated_chunk(core_file *fp, UINT8 *data, UINT32 type, U if (stream.avail_out < sizeof(tempbuff)) { int bytes = sizeof(tempbuff) - stream.avail_out; - if (core_fwrite(fp, tempbuff, bytes) != bytes) + if (fp.write(tempbuff, bytes) != bytes) { deflateEnd(&stream); return PNGERR_FILE_ERROR; @@ -849,17 +849,17 @@ static png_error write_deflated_chunk(core_file *fp, UINT8 *data, UINT32 type, U /* write the CRC */ put_32bit(tempbuff, crc); - if (core_fwrite(fp, tempbuff, 4) != 4) + if (fp.write(tempbuff, 4) != 4) return PNGERR_FILE_ERROR; /* seek back and update the length */ - core_fseek(fp, lengthpos, SEEK_SET); + fp.seek(lengthpos, SEEK_SET); put_32bit(tempbuff + 0, zlength); - if (core_fwrite(fp, tempbuff, 4) != 4) + if (fp.write(tempbuff, 4) != 4) return PNGERR_FILE_ERROR; /* return to the end */ - core_fseek(fp, lengthpos + 8 + zlength + 4, SEEK_SET); + fp.seek(lengthpos + 8 + zlength + 4, SEEK_SET); return PNGERR_NONE; } @@ -1006,7 +1006,7 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t & chunks to the given file -------------------------------------------------*/ -static png_error write_png_stream(core_file *fp, png_info *pnginfo, const bitmap_t &bitmap, int palette_length, const rgb_t *palette) +static png_error write_png_stream(util::core_file &fp, png_info *pnginfo, const bitmap_t &bitmap, int palette_length, const rgb_t *palette) { UINT8 tempbuff[16]; png_text *text; @@ -1061,7 +1061,7 @@ handle_error: } -png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette) +png_error png_write_bitmap(util::core_file &fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette) { png_info pnginfo; png_error error; @@ -1074,7 +1074,7 @@ png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int } /* write the PNG signature */ - if (core_fwrite(fp, PNG_Signature, 8) != 8) + if (fp.write(PNG_Signature, 8) != 8) { if (info == &pnginfo) png_free(&pnginfo); @@ -1097,7 +1097,7 @@ png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int ********************************************************************************/ /** - * @fn png_error mng_capture_start(core_file *fp, bitmap_t &bitmap, double rate) + * @fn png_error mng_capture_start(util::core_file &fp, bitmap_t &bitmap, double rate) * * @brief Mng capture start. * @@ -1108,12 +1108,12 @@ png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int * @return A png_error. */ -png_error mng_capture_start(core_file *fp, bitmap_t &bitmap, double rate) +png_error mng_capture_start(util::core_file &fp, bitmap_t &bitmap, double rate) { UINT8 mhdr[28]; png_error error; - if (core_fwrite(fp, MNG_Signature, 8) != 8) + if (fp.write(MNG_Signature, 8) != 8) return PNGERR_FILE_ERROR; memset(mhdr, 0, 28); @@ -1131,7 +1131,7 @@ png_error mng_capture_start(core_file *fp, bitmap_t &bitmap, double rate) } /** - * @fn png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette) + * @fn png_error mng_capture_frame(util::core_file &fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette) * * @brief Mng capture frame. * @@ -1144,13 +1144,13 @@ png_error mng_capture_start(core_file *fp, bitmap_t &bitmap, double rate) * @return A png_error. */ -png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette) +png_error mng_capture_frame(util::core_file &fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette) { return write_png_stream(fp, info, bitmap, palette_length, palette); } /** - * @fn png_error mng_capture_stop(core_file *fp) + * @fn png_error mng_capture_stop(util::core_file &fp) * * @brief Mng capture stop. * @@ -1159,7 +1159,7 @@ png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int * @return A png_error. */ -png_error mng_capture_stop(core_file *fp) +png_error mng_capture_stop(util::core_file &fp) { return write_chunk(fp, nullptr, MNG_CN_MEND, 0); } diff --git a/src/lib/util/png.h b/src/lib/util/png.h index 52e5111d199..00522f12f5c 100644 --- a/src/lib/util/png.h +++ b/src/lib/util/png.h @@ -119,15 +119,15 @@ struct png_info void png_free(png_info *pnginfo); -png_error png_read_file(core_file *fp, png_info *pnginfo); -png_error png_read_bitmap(core_file *fp, bitmap_argb32 &bitmap); +png_error png_read_file(util::core_file &fp, png_info *pnginfo); +png_error png_read_bitmap(util::core_file &fp, bitmap_argb32 &bitmap); png_error png_expand_buffer_8bit(png_info *p); png_error png_add_text(png_info *pnginfo, const char *keyword, const char *text); -png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette); +png_error png_write_bitmap(util::core_file &fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette); -png_error mng_capture_start(core_file *fp, bitmap_t &bitmap, double rate); -png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette); -png_error mng_capture_stop(core_file *fp); +png_error mng_capture_start(util::core_file &fp, bitmap_t &bitmap, double rate); +png_error mng_capture_frame(util::core_file &fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette); +png_error mng_capture_stop(util::core_file &fp); #endif /* __PNG_H__ */ diff --git a/src/lib/util/xmlfile.cpp b/src/lib/util/xmlfile.cpp index 620f12a66b3..db288b0a807 100644 --- a/src/lib/util/xmlfile.cpp +++ b/src/lib/util/xmlfile.cpp @@ -52,7 +52,7 @@ static xml_data_node *add_child(xml_data_node *parent, const char *name, const c static xml_attribute_node *add_attribute(xml_data_node *node, const char *name, const char *value); /* recursive tree operations */ -static void write_node_recursive(xml_data_node *node, int indent, core_file *file); +static void write_node_recursive(xml_data_node *node, int indent, util::core_file &file); static void free_node_recursive(xml_data_node *node); @@ -139,7 +139,7 @@ xml_data_node *xml_file_create(void) nodes -------------------------------------------------*/ -xml_data_node *xml_file_read(core_file *file, xml_parse_options *opts) +xml_data_node *xml_file_read(util::core_file &file, xml_parse_options *opts) { xml_parse_info parse_info; int done; @@ -154,8 +154,8 @@ xml_data_node *xml_file_read(core_file *file, xml_parse_options *opts) char tempbuf[TEMP_BUFFER_SIZE]; /* read as much as we can */ - int bytes = core_fread(file, tempbuf, sizeof(tempbuf)); - done = core_feof(file); + int bytes = file.read(tempbuf, sizeof(tempbuf)); + done = file.eof(); /* parse the data */ if (XML_Parse(parse_info.parser, tempbuf, bytes, done) == XML_STATUS_ERROR) @@ -223,15 +223,15 @@ xml_data_node *xml_string_read(const char *string, xml_parse_options *opts) xml_file_write - write an XML tree to a file -------------------------------------------------*/ -void xml_file_write(xml_data_node *node, core_file *file) +void xml_file_write(xml_data_node *node, util::core_file &file) { /* ensure this is a root node */ if (node->name != nullptr) return; /* output a simple header */ - core_fprintf(file, "\n"); - core_fprintf(file, "\n"); + file.printf("\n"); + file.printf("\n"); /* loop over children of the root and output */ for (node = node->child; node; node = node->next) @@ -1002,7 +1002,7 @@ static xml_attribute_node *add_attribute(xml_data_node *node, const char *name, -------------------------------------------------*/ /** - * @fn static void write_node_recursive(xml_data_node *node, int indent, core_file *file) + * @fn static void write_node_recursive(xml_data_node *node, int indent, util::core_file &file) * * @brief Writes a node recursive. * @@ -1011,30 +1011,30 @@ static xml_attribute_node *add_attribute(xml_data_node *node, const char *name, * @param [in,out] file If non-null, the file. */ -static void write_node_recursive(xml_data_node *node, int indent, core_file *file) +static void write_node_recursive(xml_data_node *node, int indent, util::core_file &file) { xml_attribute_node *anode; xml_data_node *child; /* output this tag */ - core_fprintf(file, "%*s<%s", indent, "", node->name); + file.printf("%*s<%s", indent, "", node->name); /* output any attributes */ for (anode = node->attribute; anode; anode = anode->next) - core_fprintf(file, " %s=\"%s\"", anode->name, anode->value); + file.printf(" %s=\"%s\"", anode->name, anode->value); /* if there are no children and no value, end the tag here */ if (node->child == nullptr && node->value == nullptr) - core_fprintf(file, " />\n"); + file.printf(" />\n"); /* otherwise, close this tag and output more stuff */ else { - core_fprintf(file, ">\n"); + file.printf(">\n"); /* if there is a value, output that here */ if (node->value != nullptr) - core_fprintf(file, "%*s%s\n", indent + 4, "", node->value); + file.printf("%*s%s\n", indent + 4, "", node->value); /* loop over children and output them as well */ if (node->child != nullptr) @@ -1044,7 +1044,7 @@ static void write_node_recursive(xml_data_node *node, int indent, core_file *fil } /* write a closing tag */ - core_fprintf(file, "%*s\n", indent, "", node->name); + file.printf("%*s\n", indent, "", node->name); } } diff --git a/src/lib/util/xmlfile.h b/src/lib/util/xmlfile.h index 06412abbefe..e116366643f 100644 --- a/src/lib/util/xmlfile.h +++ b/src/lib/util/xmlfile.h @@ -97,13 +97,13 @@ struct xml_parse_options xml_data_node *xml_file_create(void); /* parse an XML file into its nodes */ -xml_data_node *xml_file_read(core_file *file, xml_parse_options *opts); +xml_data_node *xml_file_read(util::core_file &file, xml_parse_options *opts); /* parse an XML string into its nodes */ xml_data_node *xml_string_read(const char *string, xml_parse_options *opts); /* write an XML tree to a file */ -void xml_file_write(xml_data_node *node, core_file *file); +void xml_file_write(xml_data_node *node, util::core_file &file); /* free an XML file object */ void xml_file_free(xml_data_node *node); diff --git a/src/lib/util/zippath.cpp b/src/lib/util/zippath.cpp index 84674eb1fe2..efe7c710481 100644 --- a/src/lib/util/zippath.cpp +++ b/src/lib/util/zippath.cpp @@ -298,7 +298,7 @@ static file_error file_error_from_zip_error(zip_error ziperr) -------------------------------------------------*/ /** - * @fn static file_error create_core_file_from_zip(zip_file *zip, const zip_file_header *header, core_file *&file) + * @fn static file_error create_core_file_from_zip(zip_file *zip, const zip_file_header *header, util::core_file::ptr &file) * * @brief Creates core file from zip. * @@ -309,7 +309,7 @@ static file_error file_error_from_zip_error(zip_error ziperr) * @return The new core file from zip. */ -static file_error create_core_file_from_zip(zip_file *zip, const zip_file_header *header, core_file *&file) +static file_error create_core_file_from_zip(zip_file *zip, const zip_file_header *header, util::core_file::ptr &file) { file_error filerr; zip_error ziperr; @@ -329,7 +329,7 @@ static file_error create_core_file_from_zip(zip_file *zip, const zip_file_header goto done; } - filerr = core_fopen_ram_copy(ptr, header->uncompressed_length, OPEN_FLAG_READ, &file); + filerr = util::core_file::open_ram_copy(ptr, header->uncompressed_length, OPEN_FLAG_READ, file); if (filerr != FILERR_NONE) goto done; @@ -345,7 +345,7 @@ done: -------------------------------------------------*/ /** - * @fn file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&file, std::string &revised_path) + * @fn file_error zippath_fopen(const char *filename, UINT32 openflags, util::core_file::ptr &file, std::string &revised_path) * * @brief Zippath fopen. * @@ -357,7 +357,7 @@ done: * @return A file_error. */ -file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&file, std::string &revised_path) +file_error zippath_fopen(const char *filename, UINT32 openflags, util::core_file::ptr &file, std::string &revised_path) { file_error filerr = FILERR_NOT_FOUND; zip_error ziperr; @@ -421,7 +421,7 @@ file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&fil } if (subpath.length() == 0) - filerr = core_fopen(filename, openflags, &file); + filerr = util::core_file::open(filename, openflags, file); else filerr = FILERR_NOT_FOUND; diff --git a/src/lib/util/zippath.h b/src/lib/util/zippath.h index 960b50851e7..ce40c87ba8d 100644 --- a/src/lib/util/zippath.h +++ b/src/lib/util/zippath.h @@ -45,7 +45,7 @@ std::string &zippath_combine(std::string &dst, const char *path1, const char *pa /* ----- file operations ----- */ /* opens a zip path file */ -file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&file, std::string &revised_path); +file_error zippath_fopen(const char *filename, UINT32 openflags, util::core_file::ptr &file, std::string &revised_path); /* ----- directory operations ----- */ diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp index 94ea358e825..5c7e88c233e 100644 --- a/src/tools/chdman.cpp +++ b/src/tools/chdman.cpp @@ -187,10 +187,10 @@ class chd_rawfile_compressor : public chd_file_compressor { public: // construction/destruction - chd_rawfile_compressor(core_file *file, UINT64 offset = 0, UINT64 maxoffset = ~0) + chd_rawfile_compressor(util::core_file &file, UINT64 offset = 0, UINT64 maxoffset = ~0) : m_file(file), m_offset(offset), - m_maxoffset(MIN(maxoffset, (file != nullptr) ? core_fsize(file) : 0)) { } + m_maxoffset((std::min)(maxoffset, file.size())) { } // read interface virtual UINT32 read_data(void *dest, UINT64 offset, UINT32 length) @@ -200,15 +200,15 @@ public: return 0; if (offset + length > m_maxoffset) length = m_maxoffset - offset; - core_fseek(m_file, offset, SEEK_SET); - return core_fread(m_file, dest, length); + m_file.seek(offset, SEEK_SET); + return m_file.read(dest, length); } private: // internal state - core_file * m_file; - UINT64 m_offset; - UINT64 m_maxoffset; + util::core_file & m_file; + UINT64 m_offset; + UINT64 m_maxoffset; }; @@ -290,14 +290,12 @@ class chd_cd_compressor : public chd_file_compressor public: // construction/destruction chd_cd_compressor(cdrom_toc &toc, chdcd_track_input_info &info) - : m_file(nullptr), + : m_file(), m_toc(toc), m_info(info) { } ~chd_cd_compressor() { - if (m_file != nullptr) - core_fclose(m_file); } // read interface @@ -321,12 +319,11 @@ public: if (offset >= startoffs && offset < endoffs) { // if we don't already have this file open, open it now - if (m_file == nullptr || m_lastfile.compare(m_info.track[tracknum].fname)!=0) + if (!m_file || m_lastfile.compare(m_info.track[tracknum].fname)!=0) { - if (m_file != nullptr) - core_fclose(m_file); + m_file.reset(); m_lastfile = m_info.track[tracknum].fname; - file_error filerr = core_fopen(m_lastfile.c_str(), OPEN_FLAG_READ, &m_file); + file_error filerr = util::core_file::open(m_lastfile.c_str(), OPEN_FLAG_READ, m_file); if (filerr != FILERR_NONE) report_error(1, "Error opening input file (%s)'", m_lastfile.c_str()); } @@ -349,8 +346,8 @@ public: } else { - core_fseek(m_file, src_frame_start, SEEK_SET); - UINT32 count = core_fread(m_file, dest, bytesperframe); + m_file->seek(src_frame_start, SEEK_SET); + UINT32 count = m_file->read(dest, bytesperframe); if (count != bytesperframe) report_error(1, "Error reading input file (%s)'", m_lastfile.c_str()); } @@ -383,7 +380,7 @@ public: private: // internal state std::string m_lastfile; - core_file * m_file; + util::core_file::ptr m_file; cdrom_toc & m_toc; chdcd_track_input_info & m_info; }; @@ -1008,11 +1005,11 @@ static void check_existing_output_file(const parameters_t ¶ms, const char *f { if (params.find(OPTION_OUTPUT_FORCE) == params.end()) { - core_file *file; - file_error filerr = core_fopen(filename, OPEN_FLAG_READ, &file); + util::core_file::ptr file; + file_error filerr = util::core_file::open(filename, OPEN_FLAG_READ, file); if (filerr == FILERR_NONE) { - core_fclose(file); + file.reset(); report_error(1, "Error: file already exists (%s)\nUse --force (or -f) to force overwriting", filename); } } @@ -1185,7 +1182,7 @@ static void compress_common(chd_file_compressor &chd) // to a CUE file //------------------------------------------------- -void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_track_info &info, const char *filename, UINT32 frameoffs, UINT64 discoffs) +void output_track_metadata(int mode, util::core_file &file, int tracknum, const cdrom_track_info &info, const char *filename, UINT32 frameoffs, UINT64 discoffs) { if (mode == MODE_GDI) { @@ -1234,13 +1231,13 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_ break; } bool needquote = strchr(filename, ' ') != nullptr; - core_fprintf(file, "%d %d %d %d %s%s%s %" I64FMT "d\n", tracknum+1, frameoffs, mode, size, needquote?"\"":"", filename, needquote?"\"":"", discoffs); + file.printf("%d %d %d %d %s%s%s %" I64FMT "d\n", tracknum+1, frameoffs, mode, size, needquote?"\"":"", filename, needquote?"\"":"", discoffs); } else if (mode == MODE_CUEBIN) { // first track specifies the file if (tracknum == 0) - core_fprintf(file, "FILE \"%s\" BINARY\n", filename); + file.printf("FILE \"%s\" BINARY\n", filename); // determine submode std::string tempstr; @@ -1265,37 +1262,37 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_ } // output TRACK entry - core_fprintf(file, " TRACK %02d %s\n", tracknum + 1, tempstr.c_str()); + file.printf(" TRACK %02d %s\n", tracknum + 1, tempstr.c_str()); // output PREGAP tag if pregap sectors are not in the file if ((info.pregap > 0) && (info.pgdatasize == 0)) { - core_fprintf(file, " PREGAP %s\n", msf_string_from_frames(tempstr, info.pregap)); - core_fprintf(file, " INDEX 01 %s\n", msf_string_from_frames(tempstr, frameoffs)); + file.printf(" PREGAP %s\n", msf_string_from_frames(tempstr, info.pregap)); + file.printf(" INDEX 01 %s\n", msf_string_from_frames(tempstr, frameoffs)); } else if ((info.pregap > 0) && (info.pgdatasize > 0)) { - core_fprintf(file, " INDEX 00 %s\n", msf_string_from_frames(tempstr, frameoffs)); - core_fprintf(file, " INDEX 01 %s\n", msf_string_from_frames(tempstr, frameoffs+info.pregap)); + file.printf(" INDEX 00 %s\n", msf_string_from_frames(tempstr, frameoffs)); + file.printf(" INDEX 01 %s\n", msf_string_from_frames(tempstr, frameoffs+info.pregap)); } // if no pregap at all, output index 01 only if (info.pregap == 0) { - core_fprintf(file, " INDEX 01 %s\n", msf_string_from_frames(tempstr, frameoffs)); + file.printf(" INDEX 01 %s\n", msf_string_from_frames(tempstr, frameoffs)); } // output POSTGAP if (info.postgap > 0) - core_fprintf(file, " POSTGAP %s\n", msf_string_from_frames(tempstr, info.postgap)); + file.printf(" POSTGAP %s\n", msf_string_from_frames(tempstr, info.postgap)); } // non-CUE mode else if (mode == MODE_NORMAL) { // header on the first track if (tracknum == 0) - core_fprintf(file, "CD_ROM\n\n\n"); - core_fprintf(file, "// Track %d\n", tracknum + 1); + file.printf("CD_ROM\n\n\n"); + file.printf("// Track %d\n", tracknum + 1); // write out the track type std::string modesubmode; @@ -1303,32 +1300,32 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_ modesubmode = string_format("%s %s", cdrom_get_type_string(info.trktype), cdrom_get_subtype_string(info.subtype)); else modesubmode = string_format("%s", cdrom_get_type_string(info.trktype)); - core_fprintf(file, "TRACK %s\n", modesubmode.c_str()); + file.printf("TRACK %s\n", modesubmode.c_str()); // write out the attributes - core_fprintf(file, "NO COPY\n"); + file.printf("NO COPY\n"); if (info.trktype == CD_TRACK_AUDIO) { - core_fprintf(file, "NO PRE_EMPHASIS\n"); - core_fprintf(file, "TWO_CHANNEL_AUDIO\n"); + file.printf("NO PRE_EMPHASIS\n"); + file.printf("TWO_CHANNEL_AUDIO\n"); } // output pregap std::string tempstr; if (info.pregap > 0) - core_fprintf(file, "ZERO %s %s\n", modesubmode.c_str(), msf_string_from_frames(tempstr, info.pregap)); + file.printf("ZERO %s %s\n", modesubmode.c_str(), msf_string_from_frames(tempstr, info.pregap)); // all tracks but the first one have a file offset if (tracknum > 0) - core_fprintf(file, "DATAFILE \"%s\" #%d %s // length in bytes: %d\n", filename, UINT32(discoffs), msf_string_from_frames(tempstr, info.frames), info.frames * (info.datasize + info.subsize)); + file.printf("DATAFILE \"%s\" #%d %s // length in bytes: %d\n", filename, UINT32(discoffs), msf_string_from_frames(tempstr, info.frames), info.frames * (info.datasize + info.subsize)); else - core_fprintf(file, "DATAFILE \"%s\" %s // length in bytes: %d\n", filename, msf_string_from_frames(tempstr, info.frames), info.frames * (info.datasize + info.subsize)); + file.printf("DATAFILE \"%s\" %s // length in bytes: %d\n", filename, msf_string_from_frames(tempstr, info.frames), info.frames * (info.datasize + info.subsize)); // tracks with pregaps get a START marker too if (info.pregap > 0) - core_fprintf(file, "START %s\n", msf_string_from_frames(tempstr, info.pregap)); + file.printf("START %s\n", msf_string_from_frames(tempstr, info.pregap)); - core_fprintf(file, "\n\n"); + file.printf("\n\n"); } } @@ -1361,9 +1358,9 @@ static void do_info(parameters_t ¶ms) printf("Unit Size: %s bytes\n", big_int_string(tempstr, input_chd.unit_bytes())); printf("Total Units: %s\n", big_int_string(tempstr, input_chd.unit_count())); printf("Compression: %s\n", compression_string(tempstr, compression)); - printf("CHD size: %s bytes\n", big_int_string(tempstr, core_fsize(input_chd))); + printf("CHD size: %s bytes\n", big_int_string(tempstr, static_cast(input_chd).size())); if (compression[0] != CHD_CODEC_NONE) - printf("Ratio: %.1f%%\n", 100.0 * double(core_fsize(input_chd)) / double(input_chd.logical_bytes())); + printf("Ratio: %.1f%%\n", 100.0 * double(static_cast(input_chd).size()) / double(input_chd.logical_bytes())); // add SHA1 output sha1_t overall = input_chd.sha1(); @@ -1570,11 +1567,11 @@ static void do_verify(parameters_t ¶ms) static void do_create_raw(parameters_t ¶ms) { // process input file - core_file *input_file = nullptr; + util::core_file::ptr input_file; auto input_file_str = params.find(OPTION_INPUT); if (input_file_str != params.end()) { - file_error filerr = core_fopen(input_file_str->second->c_str(), OPEN_FLAG_READ, &input_file); + file_error filerr = util::core_file::open(input_file_str->second->c_str(), OPEN_FLAG_READ, input_file); if (filerr != FILERR_NONE) report_error(1, "Unable to open file (%s)", input_file_str->second->c_str()); } @@ -1600,7 +1597,7 @@ static void do_create_raw(parameters_t ¶ms) // process input start/end (needs to know hunk_size) UINT64 input_start; UINT64 input_end; - parse_input_start_end(params, core_fsize(input_file), hunk_size, hunk_size, input_start, input_end); + parse_input_start_end(params, input_file->size(), hunk_size, hunk_size, input_start, input_end); // process compression chd_codec_type compression[4]; @@ -1616,7 +1613,7 @@ static void do_create_raw(parameters_t ¶ms) if (output_parent.opened()) printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->second->c_str()); printf("Input file: %s\n", input_file_str->second->c_str()); - if (input_start != 0 || input_end != core_fsize(input_file)) + if (input_start != 0 || input_end != input_file->size()) { printf("Input start: %s\n", big_int_string(tempstr, input_start)); printf("Input length: %s\n", big_int_string(tempstr, input_end - input_start)); @@ -1630,7 +1627,7 @@ static void do_create_raw(parameters_t ¶ms) try { // create the new CHD - chd = new chd_rawfile_compressor(input_file, input_start, input_end); + chd = new chd_rawfile_compressor(*input_file, input_start, input_end); chd_error err; if (output_parent.opened()) err = chd->create(output_chd_str->c_str(), input_end - input_start, hunk_size, compression, output_parent); @@ -1667,11 +1664,11 @@ static void do_create_raw(parameters_t ¶ms) static void do_create_hd(parameters_t ¶ms) { // process input file - core_file *input_file = nullptr; + util::core_file::ptr input_file; auto input_file_str = params.find(OPTION_INPUT); if (input_file_str != params.end()) { - file_error filerr = core_fopen(input_file_str->second->c_str(), OPEN_FLAG_READ, &input_file); + file_error filerr = util::core_file::open(input_file_str->second->c_str(), OPEN_FLAG_READ, input_file); if (filerr != FILERR_NONE) report_error(1, "Unable to open file (%s)", input_file_str->second->c_str()); } @@ -1698,9 +1695,9 @@ static void do_create_hd(parameters_t ¶ms) UINT64 filesize = 0; UINT64 input_start = 0; UINT64 input_end = 0; - if (input_file != nullptr) + if (input_file) { - parse_input_start_end(params, core_fsize(input_file), hunk_size, hunk_size, input_start, input_end); + parse_input_start_end(params, input_file->size(), hunk_size, hunk_size, input_start, input_end); filesize = input_end - input_start; } else @@ -1716,10 +1713,10 @@ static void do_create_hd(parameters_t ¶ms) // process compression chd_codec_type compression[4]; memcpy(compression, s_default_hd_compression, sizeof(compression)); - if (input_file == nullptr) + if (!input_file) compression[0] = compression[1] = compression[2] = compression[3] = CHD_CODEC_NONE; parse_compression(params, compression); - if (input_file == nullptr && compression[0] != CHD_CODEC_NONE) + if (!input_file && compression[0] != CHD_CODEC_NONE) report_error(1, "Blank hard disks must be uncompressed"); // process numprocessors @@ -1746,7 +1743,7 @@ static void do_create_hd(parameters_t ¶ms) if (ident_str != params.end()) { // load the file - file_error filerr = core_fload(ident_str->second->c_str(), identdata); + file_error filerr = util::core_file::load(ident_str->second->c_str(), identdata); if (filerr != FILERR_NONE) report_error(1, "Error reading ident file (%s)", ident_str->second->c_str()); @@ -1775,7 +1772,7 @@ static void do_create_hd(parameters_t ¶ms) // if no CHS values, try to guess them if (cylinders == 0) { - if (input_file == nullptr && filesize == 0) + if (!input_file && filesize == 0) report_error(1, "Blank hard drives must specify either a length or a set of CHS values"); guess_chs((input_file_str != params.end()) ? input_file_str->second : nullptr, filesize, sector_size, cylinders, heads, sectors, sector_size); } @@ -1786,10 +1783,10 @@ static void do_create_hd(parameters_t ¶ms) printf("Output CHD: %s\n", output_chd_str->c_str()); if (output_parent.opened()) printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->second->c_str()); - if (input_file != nullptr) + if (input_file) { printf("Input file: %s\n", input_file_str->second->c_str()); - if (input_start != 0 || input_end != core_fsize(input_file)) + if (input_start != 0 || input_end != input_file->size()) { printf("Input start: %s\n", big_int_string(tempstr, input_start)); printf("Input length: %s\n", big_int_string(tempstr, filesize)); @@ -1808,7 +1805,7 @@ static void do_create_hd(parameters_t ¶ms) try { // create the new hard drive - chd = new chd_rawfile_compressor(input_file, input_start, input_end); + chd = new chd_rawfile_compressor(*input_file, input_start, input_end); chd_error err; if (output_parent.opened()) err = chd->create(output_chd_str->c_str(), UINT64(totalsectors) * UINT64(sector_size), hunk_size, compression, output_parent); @@ -1832,7 +1829,7 @@ static void do_create_hd(parameters_t ¶ms) } // compress it generically - if (input_file != nullptr) + if (input_file) compress_common(*chd); delete chd; } @@ -2236,11 +2233,11 @@ static void do_extract_raw(parameters_t ¶ms) } // catch errors so we can close & delete the output file - core_file *output_file = nullptr; + util::core_file::ptr output_file; try { // process output file - file_error filerr = core_fopen(output_file_str->second->c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &output_file); + file_error filerr = util::core_file::open(output_file_str->second->c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, output_file); if (filerr != FILERR_NONE) report_error(1, "Unable to open file (%s)", output_file_str->second->c_str()); @@ -2257,7 +2254,7 @@ static void do_extract_raw(parameters_t ¶ms) report_error(1, "Error reading CHD file (%s): %s", params.find(OPTION_INPUT)->second->c_str(), chd_file::error_string(err)); // write to the output - UINT32 count = core_fwrite(output_file, &buffer[0], bytes_to_read); + UINT32 count = output_file->write(&buffer[0], bytes_to_read); if (count != bytes_to_read) report_error(1, "Error writing to file; check disk space (%s)", output_file_str->second->c_str()); @@ -2266,7 +2263,7 @@ static void do_extract_raw(parameters_t ¶ms) } // finish up - core_fclose(output_file); + output_file.reset(); printf("Extraction complete \n"); } catch (...) @@ -2274,7 +2271,7 @@ static void do_extract_raw(parameters_t ¶ms) // delete the output file if (output_file != nullptr) { - core_fclose(output_file); + output_file.reset(); osd_rmfile(output_file_str->second->c_str()); } throw; @@ -2329,8 +2326,8 @@ static void do_extract_cd(parameters_t ¶ms) printf("Input CHD: %s\n", params.find(OPTION_INPUT)->second->c_str()); // catch errors so we can close & delete the output file - core_file *output_bin_file = nullptr; - core_file *output_toc_file = nullptr; + util::core_file::ptr output_bin_file; + util::core_file::ptr output_toc_file; try { int mode = MODE_NORMAL; @@ -2345,14 +2342,14 @@ static void do_extract_cd(parameters_t ¶ms) } // process output file - file_error filerr = core_fopen(output_file_str->second->c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_NO_BOM, &output_toc_file); + file_error filerr = util::core_file::open(output_file_str->second->c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_NO_BOM, output_toc_file); if (filerr != FILERR_NONE) report_error(1, "Unable to open file (%s)", output_file_str->second->c_str()); // process output BIN file if (mode != MODE_GDI) { - filerr = core_fopen(output_bin_file_str->c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &output_bin_file); + filerr = util::core_file::open(output_bin_file_str->c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, output_bin_file); if (filerr != FILERR_NONE) report_error(1, "Unable to open file (%s)", output_bin_file_str->c_str()); } @@ -2365,7 +2362,7 @@ static void do_extract_cd(parameters_t ¶ms) // GDI must start with the # of tracks if (mode == MODE_GDI) { - core_fprintf(output_toc_file, "%d\n", toc->numtrks); + output_toc_file->printf("%d\n", toc->numtrks); } // iterate over tracks and copy all data @@ -2386,13 +2383,9 @@ static void do_extract_cd(parameters_t ¶ms) else trackbin_name.append(".bin"); - if (output_bin_file) - { - core_fclose(output_bin_file); - output_bin_file = nullptr; - } + output_bin_file.reset(); - filerr = core_fopen(trackbin_name.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &output_bin_file); + filerr = util::core_file::open(trackbin_name.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, output_bin_file); if (filerr != FILERR_NONE) report_error(1, "Unable to open file (%s)", trackbin_name.c_str()); @@ -2403,11 +2396,11 @@ static void do_extract_cd(parameters_t ¶ms) const cdrom_track_info &trackinfo = toc->tracks[tracknum]; if (mode == MODE_GDI) { - output_track_metadata(mode, output_toc_file, tracknum, trackinfo, core_filename_extract_base(trackbin_name.c_str()).c_str(), discoffs, outputoffs); + output_track_metadata(mode, *output_toc_file, tracknum, trackinfo, core_filename_extract_base(trackbin_name.c_str()).c_str(), discoffs, outputoffs); } else { - output_track_metadata(mode, output_toc_file, tracknum, trackinfo, core_filename_extract_base(output_bin_file_str->c_str()).c_str(), discoffs, outputoffs); + output_track_metadata(mode, *output_toc_file, tracknum, trackinfo, core_filename_extract_base(output_bin_file_str->c_str()).c_str(), discoffs, outputoffs); } // If this is bin/cue output and the CHD contains subdata, warn the user and don't include @@ -2455,8 +2448,8 @@ static void do_extract_cd(parameters_t ¶ms) // write it out if we need to if (bufferoffs == buffer.size() || frame == actualframes - 1) { - core_fseek(output_bin_file, outputoffs, SEEK_SET); - UINT32 byteswritten = core_fwrite(output_bin_file, &buffer[0], bufferoffs); + output_bin_file->seek(outputoffs, SEEK_SET); + UINT32 byteswritten = output_bin_file->write(&buffer[0], bufferoffs); if (byteswritten != bufferoffs) report_error(1, "Error writing frame %d to file (%s): %s\n", frame, output_file_str->second->c_str(), chd_file::error_string(CHDERR_WRITE_ERROR)); outputoffs += bufferoffs; @@ -2468,17 +2461,15 @@ static void do_extract_cd(parameters_t ¶ms) } // finish up - core_fclose(output_bin_file); - core_fclose(output_toc_file); + output_bin_file.reset(); + output_toc_file.reset(); printf("Extraction complete \n"); } catch (...) { // delete the output files - if (output_bin_file != nullptr) - core_fclose(output_bin_file); - if (output_toc_file != nullptr) - core_fclose(output_toc_file); + output_bin_file.reset(); + output_toc_file.reset(); osd_rmfile(output_bin_file_str->c_str()); osd_rmfile(output_file_str->second->c_str()); throw; @@ -2600,7 +2591,7 @@ static void do_extract_ld(parameters_t ¶ms) chd_error err = input_chd.read_hunk(framenum, nullptr); if (err != CHDERR_NONE) { - UINT64 filepos = core_ftell(input_chd); + UINT64 filepos = static_cast(input_chd).tell(); report_error(1, "Error reading hunk %" I64FMT "d at offset %" I64FMT "d from CHD file (%s): %s\n", framenum, filepos, params.find(OPTION_INPUT)->second->c_str(), chd_file::error_string(err)); } @@ -2678,7 +2669,7 @@ static void do_add_metadata(parameters_t ¶ms) dynamic_buffer file; if (file_str != params.end()) { - file_error filerr = core_fload(file_str->second->c_str(), file); + file_error filerr = util::core_file::load(file_str->second->c_str(), file); if (filerr != FILERR_NONE) report_error(1, "Error reading metadata file (%s)", file_str->second->c_str()); } @@ -2796,21 +2787,21 @@ static void do_dump_metadata(parameters_t ¶ms) report_error(1, "Error reading metadata: %s", chd_file::error_string(err)); // catch errors so we can close & delete the output file - core_file *output_file = nullptr; + util::core_file::ptr output_file; try { // create the file if (output_file_str != params.end()) { - file_error filerr = core_fopen(output_file_str->second->c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &output_file); + file_error filerr = util::core_file::open(output_file_str->second->c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, output_file); if (filerr != FILERR_NONE) report_error(1, "Unable to open file (%s)", output_file_str->second->c_str()); // output the metadata - UINT32 count = core_fwrite(output_file, &buffer[0], buffer.size()); + UINT32 count = output_file->write(&buffer[0], buffer.size()); if (count != buffer.size()) report_error(1, "Error writing file (%s)", output_file_str->second->c_str()); - core_fclose(output_file); + output_file.reset(); // provide some feedback std::string tempstr; @@ -2827,8 +2818,7 @@ static void do_dump_metadata(parameters_t ¶ms) catch (...) { // delete the output file - if (output_file != nullptr) - core_fclose(output_file); + output_file.reset(); osd_rmfile(output_file_str->second->c_str()); throw; } diff --git a/src/tools/imgtool/stream.cpp b/src/tools/imgtool/stream.cpp index 461d2fd99bd..4cc4c9ec2db 100644 --- a/src/tools/imgtool/stream.cpp +++ b/src/tools/imgtool/stream.cpp @@ -24,78 +24,112 @@ enum imgtype_t struct imgtool_stream { - imgtype_t imgtype; - int write_protect; - const char *name; // needed for clear - UINT64 position; - UINT64 filesize; + typedef std::unique_ptr ptr; + + imgtool_stream(bool wp) + : imgtype(IMG_FILE) + , write_protect(wp) + , name(nullptr) + , position(0) + , filesize(0) + , file() + , buffer(nullptr) + { + } + + imgtool_stream( + bool wp, + util::core_file::ptr &&f) + : imgtype(IMG_FILE) + , write_protect(wp) + , name(nullptr) + , position(0) + , filesize(f->size()) + , file(std::move(f)) + , buffer(nullptr) + { + } + + imgtool_stream(bool wp, std::size_t size) + : imgtype(IMG_MEM) + , write_protect(wp) + , name(nullptr) + , position(0) + , filesize(size) + , file() + , buffer(reinterpret_cast(malloc(size))) + { + } + + imgtool_stream(bool wp, std::size_t size, void *buf) + : imgtype(IMG_MEM) + , write_protect(wp) + , name(nullptr) + , position(0) + , filesize(size) + , file() + , buffer(reinterpret_cast(buf)) + { + } - union + ~imgtool_stream() { - core_file *file; - UINT8 *buffer; - } u; + free(buffer); + } + + imgtype_t imgtype; + bool write_protect; + const char *name; // needed for clear + std::uint64_t position; + std::uint64_t filesize; + + util::core_file::ptr file; + std::uint8_t *buffer; }; static imgtool_stream *stream_open_zip(const char *zipname, const char *subname, int read_or_write) { - imgtool_stream *imgfile = nullptr; -// zip_error ziperr; - zip_file *z = nullptr; - const zip_file_header *zipent; - FILE *f; - if (read_or_write) - goto error; + return nullptr; /* check to see if the file exists */ - f = fopen(zipname, "r"); + FILE *f = fopen(zipname, "r"); if (!f) - goto error; + return nullptr; fclose(f); - imgfile = (imgtool_stream *)malloc(sizeof(imgtool_stream)); - if (!imgfile) - goto error; + imgtool_stream::ptr imgfile(new imgtool_stream(true)); - memset(imgfile, 0, sizeof(*imgfile)); imgfile->imgtype = IMG_MEM; - imgfile->write_protect = 1; - imgfile->position = 0; -// ziperr = + zip_file *z = nullptr; + const zip_file_header *zipent = nullptr; zip_file_open(zipname, &z); if (!z) goto error; zipent = zip_file_first_file(z); - while(zipent && subname && strcmp(subname, zipent->filename)) + while (zipent && subname && strcmp(subname, zipent->filename)) zipent = zip_file_next_file(z); if (!zipent) goto error; imgfile->filesize = zipent->uncompressed_length; - imgfile->u.buffer = (UINT8*)malloc(zipent->uncompressed_length); - if (!imgfile->u.buffer) + imgfile->buffer = reinterpret_cast(malloc(zipent->uncompressed_length)); + if (!imgfile->buffer) goto error; - if (zip_file_decompress(z, imgfile->u.buffer, zipent->uncompressed_length)) + if (zip_file_decompress(z, imgfile->buffer, zipent->uncompressed_length)) goto error; zip_file_close(z); - return imgfile; + return imgfile.release(); error: if (z) zip_file_close(z); - if (imgfile) - { - if (imgfile->u.buffer) - free(imgfile->u.buffer); - free(imgfile); - } return nullptr; } @@ -103,9 +137,6 @@ error: imgtool_stream *stream_open(const char *fname, int read_or_write) { - file_error filerr; - const char *ext; - imgtool_stream *imgfile = nullptr; static const UINT32 write_modes[] = { OPEN_FLAG_READ, @@ -113,118 +144,70 @@ imgtool_stream *stream_open(const char *fname, int read_or_write) OPEN_FLAG_READ | OPEN_FLAG_WRITE, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE }; - core_file *f = nullptr; - char *buf = nullptr; - int len, i; imgtool_stream *s = nullptr; char c; /* maybe we are just a ZIP? */ - ext = strrchr(fname, '.'); + const char *ext = strrchr(fname, '.'); if (ext && !core_stricmp(ext, ".zip")) return stream_open_zip(fname, nullptr, read_or_write); - filerr = core_fopen(fname, write_modes[read_or_write], &f); + util::core_file::ptr f = nullptr; + auto const filerr = util::core_file::open(fname, write_modes[read_or_write], f); if (filerr != FILERR_NONE) { if (!read_or_write) { - len = strlen(fname); + int const len = strlen(fname); /* can't open the file; try opening ZIP files with other names */ - buf = (char*)malloc(len + 1); - if (!buf) - goto error; - strcpy(buf, fname); + std::vector buf(len + 1); + strcpy(&buf[0], fname); - for(i = len-1; !s && (i >= 0); i--) + for (int i = len-1; !s && (i >= 0); i--) { if ((buf[i] == '\\') || (buf[i] == '/')) { c = buf[i]; buf[i] = '\0'; - s = stream_open_zip(buf, buf + i + 1, read_or_write); + s = stream_open_zip(&buf[0], &buf[i + 1], read_or_write); buf[i] = c; } } - free(buf); - buf = nullptr; if (s) return s; } /* ah well, it was worth a shot */ - goto error; + return nullptr; } - imgfile = (imgtool_stream *)malloc(sizeof(imgtool_stream)); - if (!imgfile) - goto error; + imgtool_stream::ptr imgfile(new imgtool_stream(read_or_write ? false : true, std::move(f))); /* Normal file */ - memset(imgfile, 0, sizeof(*imgfile)); - imgfile->imgtype = IMG_FILE; - imgfile->position = 0; - imgfile->filesize = core_fsize(f); - imgfile->write_protect = read_or_write ? 0 : 1; - imgfile->u.file = f; imgfile->name = fname; - return imgfile; - -error: - if (imgfile != nullptr) - free((void *) imgfile); - if (f != nullptr) - core_fclose(f); - if (buf) - free(buf); - return (imgtool_stream *) nullptr; + return imgfile.release(); } imgtool_stream *stream_open_write_stream(int size) { - imgtool_stream *imgfile; - - imgfile = (imgtool_stream *)malloc(sizeof(imgtool_stream)); - if (!imgfile) - return nullptr; - - imgfile->imgtype = IMG_MEM; - imgfile->write_protect = 0; - imgfile->position = 0; - imgfile->filesize = size; - imgfile->u.buffer = (UINT8*)malloc(size); - - if (!imgfile->u.buffer) - { - free(imgfile); + imgtool_stream::ptr imgfile(new imgtool_stream(false, size)); + if (!imgfile->buffer) return nullptr; - } - return imgfile; + return imgfile.release(); } imgtool_stream *stream_open_mem(void *buf, size_t sz) { - imgtool_stream *imgfile; - - imgfile = (imgtool_stream *)malloc(sizeof(imgtool_stream)); - if (!imgfile) - return nullptr; + imgtool_stream::ptr imgfile(new imgtool_stream(false, sz, buf)); - memset(imgfile, 0, sizeof(*imgfile)); - imgfile->imgtype = IMG_MEM; - imgfile->position = 0; - imgfile->write_protect = 0; - - imgfile->filesize = sz; - imgfile->u.buffer = (UINT8*)buf; - return imgfile; + return imgfile.release(); } @@ -233,36 +216,14 @@ void stream_close(imgtool_stream *s) { assert(s != nullptr); - switch(s->imgtype) - { - case IMG_FILE: - if (s->u.file != nullptr) - { - core_fclose(s->u.file); - s->u.file = nullptr; - } - break; - - case IMG_MEM: - if (s->u.buffer != nullptr) - { - free(s->u.buffer); - s->u.buffer = nullptr; - } - break; - - default: - assert(0); - break; - } - free((void *) s); + delete s; } -core_file *stream_core_file(imgtool_stream *stream) +util::core_file *stream_core_file(imgtool_stream *stream) { - return (stream->imgtype == IMG_FILE) ? stream->u.file : nullptr; + return (stream->imgtype == IMG_FILE) ? stream->file.get() : nullptr; } @@ -275,8 +236,8 @@ UINT32 stream_read(imgtool_stream *stream, void *buf, UINT32 sz) { case IMG_FILE: assert(sz == (UINT32) sz); - core_fseek(stream->u.file, stream->position, SEEK_SET); - result = core_fread(stream->u.file, buf, (UINT32) sz); + stream->file->seek(stream->position, SEEK_SET); + result = stream->file->read(buf, (UINT32) sz); break; case IMG_MEM: @@ -284,7 +245,7 @@ UINT32 stream_read(imgtool_stream *stream, void *buf, UINT32 sz) if (sz > (stream->filesize - stream->position)) sz = (UINT32) (stream->filesize - stream->position); - memcpy(buf, stream->u.buffer + stream->position, sz); + memcpy(buf, stream->buffer + stream->position, sz); result = sz; break; @@ -312,11 +273,11 @@ UINT32 stream_write(imgtool_stream *s, const void *buf, UINT32 sz) if (s->filesize < s->position + sz) { /* try to expand the buffer */ - if (s->u.buffer) free(s->u.buffer); + if (s->buffer) free(s->buffer); new_buffer = malloc(s->position + sz); if (new_buffer) { - s->u.buffer = (UINT8*)new_buffer; + s->buffer = (UINT8*)new_buffer; s->filesize = s->position + sz; } } @@ -325,14 +286,14 @@ UINT32 stream_write(imgtool_stream *s, const void *buf, UINT32 sz) if (sz > (s->filesize - s->position)) sz = (UINT32) (s->filesize - s->position); - memcpy(s->u.buffer + s->position, buf, sz); + memcpy(s->buffer + s->position, buf, sz); result = sz; } break; case IMG_FILE: - core_fseek(s->u.file, s->position, SEEK_SET); - result = core_fwrite(s->u.file, buf, sz); + s->file->seek(s->position, SEEK_SET); + result = s->file->write(buf, sz); break; default: @@ -365,7 +326,7 @@ void *stream_getptr(imgtool_stream *f) switch(f->imgtype) { case IMG_MEM: - ptr = f->u.buffer; + ptr = f->buffer; break; default: @@ -445,7 +406,7 @@ int stream_crc(imgtool_stream *s, unsigned long *result) switch(s->imgtype) { case IMG_MEM: - *result = crc32(0, (unsigned char *) s->u.buffer, (size_t) s->filesize); + *result = crc32(0, (unsigned char *) s->buffer, (size_t) s->filesize); break; default: diff --git a/src/tools/imgtool/stream.h b/src/tools/imgtool/stream.h index 13e6e0d727f..ee362c9c32b 100644 --- a/src/tools/imgtool/stream.h +++ b/src/tools/imgtool/stream.h @@ -20,7 +20,7 @@ imgtool_stream *stream_open(const char *fname, int read_or_write); /* similar p imgtool_stream *stream_open_write_stream(int filesize); imgtool_stream *stream_open_mem(void *buf, size_t sz); void stream_close(imgtool_stream *stream); -core_file *stream_core_file(imgtool_stream *stream); +util::core_file *stream_core_file(imgtool_stream *stream); UINT32 stream_read(imgtool_stream *stream, void *buf, UINT32 sz); UINT32 stream_write(imgtool_stream *stream, const void *buf, UINT32 sz); UINT64 stream_size(imgtool_stream *stream); diff --git a/src/tools/ldresample.cpp b/src/tools/ldresample.cpp index 771c4e94676..1f04edac3f0 100644 --- a/src/tools/ldresample.cpp +++ b/src/tools/ldresample.cpp @@ -554,7 +554,7 @@ int main(int argc, char *argv[]) // open the destination file chd_resample_compressor dstfile(srcfile, info, INT64(offset * 65536.0 * 256.0), INT64(slope * 65536.0 * 256.0)); err = create_chd(dstfile, dstfilename, srcfile, info); - if (dstfile == nullptr) + if (!dstfile.opened()) { fprintf(stderr, "Unable to create file '%s'\n", dstfilename); return 1; diff --git a/src/tools/pngcmp.cpp b/src/tools/pngcmp.cpp index dda54ed7730..5103740389b 100644 --- a/src/tools/pngcmp.cpp +++ b/src/tools/pngcmp.cpp @@ -72,7 +72,7 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img bitmap_argb32 bitmap2; bitmap_argb32 finalbitmap; int width, height, maxwidth; - core_file *file = nullptr; + util::core_file::ptr file; file_error filerr; png_error pngerr; int error = 100; @@ -80,7 +80,7 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img int x, y; /* open the source image */ - filerr = core_fopen(imgfile1.c_str(), OPEN_FLAG_READ, &file); + filerr = util::core_file::open(imgfile1.c_str(), OPEN_FLAG_READ, file); if (filerr != FILERR_NONE) { printf("Could not open %s (%d)\n", imgfile1.c_str(), filerr); @@ -88,8 +88,8 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img } /* load the source image */ - pngerr = png_read_bitmap(file, bitmap1); - core_fclose(file); + pngerr = png_read_bitmap(*file, bitmap1); + file.reset(); if (pngerr != PNGERR_NONE) { printf("Could not read %s (%d)\n", imgfile1.c_str(), pngerr); @@ -97,7 +97,7 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img } /* open the source image */ - filerr = core_fopen(imgfile2.c_str(), OPEN_FLAG_READ, &file); + filerr = util::core_file::open(imgfile2.c_str(), OPEN_FLAG_READ, file); if (filerr != FILERR_NONE) { printf("Could not open %s (%d)\n", imgfile2.c_str(), filerr); @@ -105,8 +105,8 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img } /* load the source image */ - pngerr = png_read_bitmap(file, bitmap2); - core_fclose(file); + pngerr = png_read_bitmap(*file, bitmap2); + file.reset(); if (pngerr != PNGERR_NONE) { printf("Could not read %s (%d)\n", imgfile2.c_str(), pngerr); @@ -170,14 +170,14 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img } /* write the final PNG */ - filerr = core_fopen(outfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &file); + filerr = util::core_file::open(outfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, file); if (filerr != FILERR_NONE) { printf("Could not open %s (%d)\n", outfilename.c_str(), filerr); goto error; } - pngerr = png_write_bitmap(file, nullptr, finalbitmap, 0, nullptr); - core_fclose(file); + pngerr = png_write_bitmap(*file, nullptr, finalbitmap, 0, nullptr); + file.reset(); if (pngerr != PNGERR_NONE) { printf("Could not write %s (%d)\n", outfilename.c_str(), pngerr); diff --git a/src/tools/regrep.cpp b/src/tools/regrep.cpp index 16eaa21f7de..b0cad2497ae 100644 --- a/src/tools/regrep.cpp +++ b/src/tools/regrep.cpp @@ -148,15 +148,15 @@ static int CLIB_DECL compare_file(const void *file0ptr, const void *file1ptr); static summary_file *sort_file_list(void); /* HTML helpers */ -static core_file *create_file_and_output_header(std::string &filename, std::string &templatefile, std::string &title); -static void output_footer_and_close_file(core_file *file, std::string &templatefile, std::string &title); +static util::core_file::ptr create_file_and_output_header(std::string &filename, std::string &templatefile, std::string &title); +static void output_footer_and_close_file(util::core_file::ptr &&file, std::string &templatefile, std::string &title); /* report generators */ static void output_report(std::string &dirname, std::string &tempheader, std::string &tempfooter, summary_file *filelist); static int compare_screenshots(summary_file *curfile); static int generate_png_diff(const summary_file *curfile, std::string &destdir, const char *destname); static void create_linked_file(std::string &dirname, const summary_file *curfile, const summary_file *prevfile, const summary_file *nextfile, const char *pngfile, std::string &tempheader, std::string &tempfooter); -static void append_driver_list_table(const char *header, std::string &dirname, core_file *indexfile, const summary_file *listhead, std::string &tempheader, std::string &tempfooter); +static void append_driver_list_table(const char *header, std::string &dirname, util::core_file &indexfile, const summary_file *listhead, std::string &tempheader, std::string &tempfooter); @@ -235,7 +235,7 @@ int main(int argc, char *argv[]) /* read the template file into an astring */ std::string tempheader; - if (core_fload(tempfilename.c_str(), &buffer, &bufsize) == FILERR_NONE) + if (util::core_file::load(tempfilename.c_str(), &buffer, bufsize) == FILERR_NONE) { tempheader.assign((const char *)buffer, bufsize); osd_free(buffer); @@ -560,18 +560,18 @@ static summary_file *sort_file_list(void) HTML file with a standard header -------------------------------------------------*/ -static core_file *create_file_and_output_header(std::string &filename, std::string &templatefile, std::string &title) +static util::core_file::ptr create_file_and_output_header(std::string &filename, std::string &templatefile, std::string &title) { - core_file *file; + util::core_file::ptr file; /* create the indexfile */ - if (core_fopen(filename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS | OPEN_FLAG_NO_BOM, &file) != FILERR_NONE) - return nullptr; + if (util::core_file::open(filename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS | OPEN_FLAG_NO_BOM, file) != FILERR_NONE) + return util::core_file::ptr(); /* print a header */ std::string modified(templatefile); strreplace(modified, "", title.c_str()); - core_fwrite(file, modified.c_str(), modified.length()); + file->write(modified.c_str(), modified.length()); /* return the file */ return file; @@ -583,12 +583,12 @@ static core_file *create_file_and_output_header(std::string &filename, std::stri standard footer to an HTML file and close it -------------------------------------------------*/ -static void output_footer_and_close_file(core_file *file, std::string &templatefile, std::string &title) +static void output_footer_and_close_file(util::core_file::ptr &&file, std::string &templatefile, std::string &title) { std::string modified(templatefile); strreplace(modified, "", title.c_str()); - core_fwrite(file, modified.c_str(), modified.length()); - core_fclose(file); + file->write(modified.c_str(), modified.length()); + file.reset(); } @@ -609,7 +609,7 @@ static void output_report(std::string &dirname, std::string &tempheader, std::st std::string title("MAME Regressions"); std::string tempname; int listnum, bucknum; - core_file *indexfile; + util::core_file::ptr indexfile; int count = 0, total; /* initialize the lists */ @@ -688,7 +688,7 @@ static void output_report(std::string &dirname, std::string &tempheader, std::st /* output header */ tempname = string_format("%s" PATH_SEPARATOR "%s", dirname.c_str(), "index.html"); indexfile = create_file_and_output_header(tempname, tempheader, title); - if (indexfile == nullptr) + if (!indexfile) { fprintf(stderr, "Error creating file '%s'\n", tempname.c_str()); return; @@ -702,12 +702,12 @@ static void output_report(std::string &dirname, std::string &tempheader, std::st if (buckethead[curbucket] != nullptr) { fprintf(stderr, "Outputting bucket: %s\n", bucket_name[curbucket]); - append_driver_list_table(bucket_name[curbucket], dirname, indexfile, buckethead[curbucket], tempheader, tempfooter); + append_driver_list_table(bucket_name[curbucket], dirname, *indexfile, buckethead[curbucket], tempheader, tempfooter); } } /* output footer */ - output_footer_and_close_file(indexfile, tempfooter, title); + output_footer_and_close_file(std::move(indexfile), tempfooter, title); } @@ -729,13 +729,13 @@ static int compare_screenshots(summary_file *curfile) { std::string fullname; file_error filerr; - core_file *file; + util::core_file::ptr file; /* get the filename for the image */ fullname = string_format("%s" PATH_SEPARATOR "snap" PATH_SEPARATOR "%s" PATH_SEPARATOR "final.png", lists[listnum].dir, curfile->name); /* open the file */ - filerr = core_fopen(fullname.c_str(), OPEN_FLAG_READ, &file); + filerr = util::core_file::open(fullname.c_str(), OPEN_FLAG_READ, file); /* if that failed, look in the old location */ if (filerr != FILERR_NONE) @@ -744,14 +744,14 @@ static int compare_screenshots(summary_file *curfile) fullname = string_format("%s" PATH_SEPARATOR "snap" PATH_SEPARATOR "_%s.png", lists[listnum].dir, curfile->name); /* open the file */ - filerr = core_fopen(fullname.c_str(), OPEN_FLAG_READ, &file); + filerr = util::core_file::open(fullname.c_str(), OPEN_FLAG_READ, file); } /* if that worked, load the file */ if (filerr == FILERR_NONE) { - png_read_bitmap(file, bitmaps[listnum]); - core_fclose(file); + png_read_bitmap(*file, bitmaps[listnum]); + file.reset(); } } @@ -836,7 +836,7 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir, int width, height, maxwidth; int bitmapcount = 0; int listnum, bmnum; - core_file *file = nullptr; + util::core_file::ptr file; file_error filerr; png_error pngerr; int error = -1; @@ -853,13 +853,13 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir, tempname = string_format("%s" PATH_SEPARATOR "%s", lists[listnum].dir, srcimgname.c_str()); /* open the source image */ - filerr = core_fopen(tempname.c_str(), OPEN_FLAG_READ, &file); + filerr = util::core_file::open(tempname.c_str(), OPEN_FLAG_READ, file); if (filerr != FILERR_NONE) goto error; /* load the source image */ - pngerr = png_read_bitmap(file, bitmaps[bitmapcount++]); - core_fclose(file); + pngerr = png_read_bitmap(*file, bitmaps[bitmapcount++]); + file.reset(); if (pngerr != PNGERR_NONE) goto error; } @@ -925,11 +925,11 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir, } /* write the final PNG */ - filerr = core_fopen(dstfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &file); + filerr = util::core_file::open(dstfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, file); if (filerr != FILERR_NONE) goto error; - pngerr = png_write_bitmap(file, nullptr, finalbitmap, 0, nullptr); - core_fclose(file); + pngerr = png_write_bitmap(*file, nullptr, finalbitmap, 0, nullptr); + file.reset(); if (pngerr != PNGERR_NONE) goto error; @@ -953,7 +953,7 @@ static void create_linked_file(std::string &dirname, const summary_file *curfile std::string linkname; std::string filename; std::string title; - core_file *linkfile; + util::core_file::ptr linkfile; int listnum; /* create the filename */ @@ -970,19 +970,19 @@ static void create_linked_file(std::string &dirname, const summary_file *curfile } /* link to the previous/next entries */ - core_fprintf(linkfile, "\t

\n"); - core_fprintf(linkfile, "\t\n"); - core_fprintf(linkfile, "\t\t\n"); + linkfile->printf("\t
"); + linkfile->printf("\t

\n"); + linkfile->printf("\t\n"); + linkfile->printf("\t\t\n"); - core_fprintf(linkfile, "\t\t\n"); - core_fprintf(linkfile, "\t\t\n"); + linkfile->printf("\t\t\n"); + linkfile->printf("\t\t\n"); - core_fprintf(linkfile, "\t
"); if (prevfile != nullptr) - core_fprintf(linkfile, "<< %s (%s)", prevfile->name, prevfile->name, prevfile->source); - core_fprintf(linkfile, "Home"); + linkfile->printf("<< %s (%s)", prevfile->name, prevfile->name, prevfile->source); + linkfile->printf("Home"); if (nextfile != nullptr) - core_fprintf(linkfile, "%s (%s) >>", nextfile->name, nextfile->name, nextfile->source); - core_fprintf(linkfile, "
\n"); - core_fprintf(linkfile, "\t

\n"); + linkfile->printf("%s (%s) >>", nextfile->name, nextfile->name, nextfile->source); + linkfile->printf("
\n"); + linkfile->printf("\t

\n"); /* output data for each one */ for (listnum = 0; listnum < list_count; listnum++) @@ -990,34 +990,34 @@ static void create_linked_file(std::string &dirname, const summary_file *curfile int imageindex = -1; /* generate the HTML */ - core_fprintf(linkfile, "\n\t

%s

\n", lists[listnum].version); - core_fprintf(linkfile, "\t

\n"); - core_fprintf(linkfile, "\tStatus: %s\n", status_text[curfile->status[listnum]]); + linkfile->printf("\n\t

%s

\n", lists[listnum].version); + linkfile->printf("\t

\n"); + linkfile->printf("\tStatus: %s\n", status_text[curfile->status[listnum]]); if (pngfile != nullptr) imageindex = get_unique_index(curfile, listnum); if (imageindex != -1) - core_fprintf(linkfile, " [%d]", imageindex); - core_fprintf(linkfile, "\t

\n"); + linkfile->printf(" [%d]", imageindex); + linkfile->printf("\t

\n"); if (curfile->text[listnum].length() != 0) { - core_fprintf(linkfile, "\t

\n"); - core_fprintf(linkfile, "\tErrors:\n"); - core_fprintf(linkfile, "\t

%s
\n", curfile->text[listnum].c_str()); - core_fprintf(linkfile, "\t

\n"); + linkfile->printf("\t

\n"); + linkfile->printf("\tErrors:\n"); + linkfile->printf("\t

%s
\n", curfile->text[listnum].c_str()); + linkfile->printf("\t

\n"); } } /* output link to the image */ if (pngfile != nullptr) { - core_fprintf(linkfile, "\n\t

Screenshot Comparisons

\n"); - core_fprintf(linkfile, "\t

\n"); - core_fprintf(linkfile, "\t\n", pngfile); - core_fprintf(linkfile, "\t

\n"); + linkfile->printf("\n\t

Screenshot Comparisons

\n"); + linkfile->printf("\t

\n"); + linkfile->printf("\t\n", pngfile); + linkfile->printf("\t

\n"); } /* output footer */ - output_footer_and_close_file(linkfile, tempfooter, title); + output_footer_and_close_file(std::move(linkfile), tempfooter, title); } @@ -1026,28 +1026,28 @@ static void create_linked_file(std::string &dirname, const summary_file *curfile of drivers from a list to an HTML file -------------------------------------------------*/ -static void append_driver_list_table(const char *header, std::string &dirname, core_file *indexfile, const summary_file *listhead, std::string &tempheader, std::string &tempfooter) +static void append_driver_list_table(const char *header, std::string &dirname, util::core_file &indexfile, const summary_file *listhead, std::string &tempheader, std::string &tempfooter) { const summary_file *curfile, *prevfile; int width = 100 / (2 + list_count); int listnum; /* output a header */ - core_fprintf(indexfile, "\t

%s

\n", header); + indexfile.printf("\t

%s

\n", header); /* start the table */ - core_fprintf(indexfile, "\t

\n"); - core_fprintf(indexfile, "\t\t\n\t\t\t", width, width); + indexfile.printf("\t

SourceDriver
\n"); + indexfile.printf("\t\t\n\t\t\t", width, width); for (listnum = 0; listnum < list_count; listnum++) - core_fprintf(indexfile, "", width, lists[listnum].version); - core_fprintf(indexfile, "\n\t\t\n"); + indexfile.printf("", width, lists[listnum].version); + indexfile.printf("\n\t\t\n"); /* if nothing, print a default message */ if (listhead == nullptr) { - core_fprintf(indexfile, "\t\t\n\t\t\t"); - core_fprintf(indexfile, "", list_count + 2); - core_fprintf(indexfile, "\n\t\t\n"); + indexfile.printf("\t\t\n\t\t\t"); + indexfile.printf("", list_count + 2); + indexfile.printf("\n\t\t\n"); } /* iterate over files */ @@ -1083,10 +1083,10 @@ static void append_driver_list_table(const char *header, std::string &dirname, c create_linked_file(dirname, curfile, prevfile, curfile->next, (pngdiffname[0] == 0) ? nullptr : pngdiffname, tempheader, tempfooter); /* create a row */ - core_fprintf(indexfile, "\t\t\n\t\t\t"); + indexfile.printf("\t\t\n\t\t\t"); if (rowspan > 0) - core_fprintf(indexfile, "", rowspan, curfile->source); - core_fprintf(indexfile, "", curfile->name, curfile->name); + indexfile.printf("", rowspan, curfile->source); + indexfile.printf("", curfile->name, curfile->name); for (listnum = 0; listnum < list_count; listnum++) { int unique_index = -1; @@ -1094,16 +1094,16 @@ static void append_driver_list_table(const char *header, std::string &dirname, c if (pngdiffname[0] != 0) unique_index = get_unique_index(curfile, listnum); if (unique_index != -1) - core_fprintf(indexfile, "", status_color[curfile->status[listnum]], status_text[curfile->status[listnum]], pngdiffname, unique_index); + indexfile.printf("", status_color[curfile->status[listnum]], status_text[curfile->status[listnum]], pngdiffname, unique_index); else - core_fprintf(indexfile, "", status_color[curfile->status[listnum]], status_text[curfile->status[listnum]]); + indexfile.printf("", status_color[curfile->status[listnum]], status_text[curfile->status[listnum]]); } - core_fprintf(indexfile, "\n\t\t\n"); + indexfile.printf("\n\t\t\n"); /* also print the name and source file */ printf("%s %s\n", curfile->name, curfile->source); } /* end of table */ - core_fprintf(indexfile, "
SourceDriver%s
%s
(No regressions detected)
(No regressions detected)
%s%s%s%s    %s [%d]    %s [%d]    %s    %s

\n"); + indexfile.printf("

\n"); } diff --git a/src/tools/split.cpp b/src/tools/split.cpp index a6b97e7175d..f942e1481c2 100644 --- a/src/tools/split.cpp +++ b/src/tools/split.cpp @@ -64,7 +64,7 @@ static void compute_hash_as_string(std::string &buffer, void *data, UINT32 lengt static int split_file(const char *filename, const char *basename, UINT32 splitsize) { std::string outfilename, basefilename, splitfilename; - core_file *outfile = nullptr, *infile = nullptr, *splitfile = nullptr; + util::core_file::ptr outfile, infile, splitfile; std::string computedhash; void *splitbuffer = nullptr; int index, partnum; @@ -81,7 +81,7 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi splitsize *= 1024 * 1024; // open the file for read - filerr = core_fopen(filename, OPEN_FLAG_READ, &infile); + filerr = util::core_file::open(filename, OPEN_FLAG_READ, infile); if (filerr != FILERR_NONE) { fprintf(stderr, "Fatal error: unable to open file '%s'\n", filename); @@ -89,7 +89,7 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi } // get the total length - totallength = core_fsize(infile); + totallength = infile->size(); if (totallength < splitsize) { fprintf(stderr, "Fatal error: file is smaller than the split size\n"); @@ -119,7 +119,7 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi splitfilename.assign(basename).append(".split"); // create the split file - filerr = core_fopen(splitfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_NO_BOM, &splitfile); + filerr = util::core_file::open(splitfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_NO_BOM, splitfile); if (filerr != FILERR_NONE) { fprintf(stderr, "Fatal error: unable to create split file '%s'\n", splitfilename.c_str()); @@ -127,8 +127,8 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi } // write the basics out - core_fprintf(splitfile, "splitfile=%s\n", basefilename.c_str()); - core_fprintf(splitfile, "splitsize=%d\n", splitsize); + splitfile->printf("splitfile=%s\n", basefilename.c_str()); + splitfile->printf("splitsize=%d\n", splitsize); printf("Split file is '%s'\n", splitfilename.c_str()); printf("Splitting file %s into chunks of %dMB...\n", basefilename.c_str(), splitsize / (1024 * 1024)); @@ -141,7 +141,7 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi printf("Reading part %d...", partnum); // read as much as we can from the file - length = core_fread(infile, splitbuffer, splitsize); + length = infile->read(splitbuffer, splitsize); if (length == 0) break; @@ -149,13 +149,13 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi compute_hash_as_string(computedhash, splitbuffer, length); // write that info to the split file - core_fprintf(splitfile, "hash=%s file=%s.%03d\n", computedhash.c_str(), basefilename.c_str(), partnum); + splitfile->printf("hash=%s file=%s.%03d\n", computedhash.c_str(), basefilename.c_str(), partnum); // compute the full filename for this guy outfilename = string_format("%s.%03d", basename, partnum); // create it - filerr = core_fopen(outfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &outfile); + filerr = util::core_file::open(outfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, outfile); if (filerr != FILERR_NONE) { printf("\n"); @@ -166,15 +166,14 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi printf(" writing %s.%03d...", basefilename.c_str(), partnum); // write the data - actual = core_fwrite(outfile, splitbuffer, length); + actual = outfile->write(splitbuffer, length); if (actual != length) { printf("\n"); fprintf(stderr, "Fatal error: Error writing output file (out of space?)\n"); goto cleanup; } - core_fclose(outfile); - outfile = nullptr; + outfile.reset(); printf(" done\n"); @@ -188,17 +187,17 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi error = 0; cleanup: - if (splitfile != nullptr) + if (splitfile) { - core_fclose(splitfile); + splitfile.reset(); if (error != 0) remove(splitfilename.c_str()); } - if (infile != nullptr) - core_fclose(infile); - if (outfile != nullptr) + if (infile) + infile.reset(); + if (outfile) { - core_fclose(outfile); + outfile.reset(); if (error != 0) remove(outfilename.c_str()); } @@ -218,7 +217,7 @@ static int join_file(const char *filename, const char *outname, int write_output std::string expectedhash, computedhash; std::string outfilename, infilename; std::string basepath; - core_file *outfile = nullptr, *infile = nullptr, *splitfile = nullptr; + util::core_file::ptr outfile, infile, splitfile; void *splitbuffer = nullptr; file_error filerr; UINT32 splitsize; @@ -227,7 +226,7 @@ static int join_file(const char *filename, const char *outname, int write_output int index; // open the file for read - filerr = core_fopen(filename, OPEN_FLAG_READ, &splitfile); + filerr = util::core_file::open(filename, OPEN_FLAG_READ, splitfile); if (filerr != FILERR_NONE) { fprintf(stderr, "Fatal error: unable to open file '%s'\n", filename); @@ -235,7 +234,7 @@ static int join_file(const char *filename, const char *outname, int write_output } // read the first line and verify this is a split file - if (!core_fgets(buffer, sizeof(buffer), splitfile) || strncmp(buffer, "splitfile=", 10) != 0) + if (!splitfile->gets(buffer, sizeof(buffer)) || strncmp(buffer, "splitfile=", 10) != 0) { fprintf(stderr, "Fatal error: corrupt or incomplete split file at line:\n%s\n", buffer); goto cleanup; @@ -258,7 +257,7 @@ static int join_file(const char *filename, const char *outname, int write_output outfilename.insert(0, basepath); // read the split size - if (!core_fgets(buffer, sizeof(buffer), splitfile) || sscanf(buffer, "splitsize=%d", &splitsize) != 1) + if (!splitfile->gets(buffer, sizeof(buffer)) || sscanf(buffer, "splitsize=%d", &splitsize) != 1) { fprintf(stderr, "Fatal error: corrupt or incomplete split file at line:\n%s\n", buffer); goto cleanup; @@ -268,17 +267,16 @@ static int join_file(const char *filename, const char *outname, int write_output if (write_output) { // don't overwrite the original! - filerr = core_fopen(outfilename.c_str(), OPEN_FLAG_READ, &outfile); + filerr = util::core_file::open(outfilename.c_str(), OPEN_FLAG_READ, outfile); if (filerr == FILERR_NONE) { - core_fclose(outfile); - outfile = nullptr; + outfile.reset(); fprintf(stderr, "Fatal error: output file '%s' already exists\n", outfilename.c_str()); goto cleanup; } // open the output for write - filerr = core_fopen(outfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &outfile); + filerr = util::core_file::open(outfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, outfile); if (filerr != FILERR_NONE) { fprintf(stderr, "Fatal error: unable to create file '%s'\n", outfilename.c_str()); @@ -289,7 +287,7 @@ static int join_file(const char *filename, const char *outname, int write_output printf("%s file '%s'...\n", write_output ? "Joining" : "Verifying", outfilename.c_str()); // now iterate through each file - while (core_fgets(buffer, sizeof(buffer), splitfile)) + while (splitfile->gets(buffer, sizeof(buffer))) { UINT32 length, actual; @@ -307,7 +305,7 @@ static int join_file(const char *filename, const char *outname, int write_output // read the file's contents infilename.insert(0, basepath); - filerr = core_fload(infilename.c_str(), &splitbuffer, &length); + filerr = util::core_file::load(infilename.c_str(), &splitbuffer, length); if (filerr != FILERR_NONE) { printf("\n"); @@ -331,7 +329,7 @@ static int join_file(const char *filename, const char *outname, int write_output { printf(" writing..."); - actual = core_fwrite(outfile, splitbuffer, length); + actual = outfile->write(splitbuffer, length); if (actual != length) { printf("\n"); @@ -357,13 +355,13 @@ static int join_file(const char *filename, const char *outname, int write_output error = 0; cleanup: - if (splitfile != nullptr) - core_fclose(splitfile); - if (infile != nullptr) - core_fclose(infile); - if (outfile != nullptr) + if (splitfile) + splitfile.reset(); + if (infile) + infile.reset(); + if (outfile) { - core_fclose(outfile); + outfile.reset(); if (error != 0) remove(outfilename.c_str()); } diff --git a/src/tools/src2html.cpp b/src/tools/src2html.cpp index 557313f1b3e..e95cbe11764 100644 --- a/src/tools/src2html.cpp +++ b/src/tools/src2html.cpp @@ -206,12 +206,12 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std: static int output_file(file_type type, int srcrootlen, int dstrootlen, std::string &srcfile, std::string &dstfile, bool link_to_file, std::string &tempheader, std::string &tempfooter); // HTML helpers -static core_file *create_file_and_output_header(std::string &filename, std::string &templatefile, std::string &path); -static void output_footer_and_close_file(core_file *file, std::string &templatefile, std::string &path); +static util::core_file::ptr create_file_and_output_header(std::string &filename, std::string &templatefile, std::string &path); +static void output_footer_and_close_file(util::core_file::ptr &&file, std::string &templatefile, std::string &path); // path helpers static std::string &normalized_subpath(std::string &dest, std::string &path, int start); -static void output_path_as_links(core_file *file, std::string &path, bool end_is_directory, bool link_to_file); +static void output_path_as_links(util::core_file &file, std::string &path, bool end_is_directory, bool link_to_file); static bool find_include_file(std::string &srcincpath, int srcrootlen, int dstrootlen, std::string &srcfile, std::string &dstfile, std::string &filename); @@ -279,7 +279,7 @@ int main(int argc, char *argv[]) // read the template file into an std::string UINT32 bufsize; void *buffer; - if (core_fload(tempfilename.c_str(), &buffer, &bufsize) == FILERR_NONE) + if (util::core_file::load(tempfilename.c_str(), &buffer, bufsize) == FILERR_NONE) { tempheader.assign((const char *)buffer, bufsize); osd_free(buffer); @@ -333,12 +333,12 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std: // create an index file std::string indexname; indexname = string_format("%s%c%s", dstdir.c_str(), PATH_SEPARATOR[0], "index.html"); - core_file *indexfile = create_file_and_output_header(indexname, tempheader, srcdir_subpath); + util::core_file::ptr indexfile = create_file_and_output_header(indexname, tempheader, srcdir_subpath); // output the directory navigation - core_fprintf(indexfile, "

Viewing Directory: "); - output_path_as_links(indexfile, srcdir_subpath, true, false); - core_fprintf(indexfile, "

"); + indexfile->printf("

Viewing Directory: "); + output_path_as_links(*indexfile, srcdir_subpath, true, false); + indexfile->printf("

"); // iterate first over directories, then over files int result = 0; @@ -398,7 +398,7 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std: { // add a header if (curlist == list) - core_fprintf(indexfile, "\t

%s

\n\t
    \n", (entry_type == ENTTYPE_DIR) ? "Directories" : "Files"); + indexfile->printf("\t

    %s

    \n\t
      \n", (entry_type == ENTTYPE_DIR) ? "Directories" : "Files"); // build the source filename std::string srcfile; @@ -422,7 +422,7 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std: { dstfile = string_format("%s%c%s.html", dstdir.c_str(), PATH_SEPARATOR[0], curlist->name.c_str()); if (indexfile != nullptr) - core_fprintf(indexfile, "\t
    • %s
    • \n", curlist->name.c_str(), curlist->name.c_str()); + indexfile->printf("\t
    • %s
    • \n", curlist->name.c_str(), curlist->name.c_str()); result = output_file(type, srcrootlen, dstrootlen, srcfile, dstfile, srcdir.compare(dstdir) == 0, tempheader, tempfooter); } } @@ -432,14 +432,14 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std: { dstfile = string_format("%s%c%s", dstdir.c_str(), PATH_SEPARATOR[0], curlist->name.c_str()); if (indexfile != nullptr) - core_fprintf(indexfile, "\t
    • %s/
    • \n", curlist->name.c_str(), curlist->name.c_str()); + indexfile->printf("\t
    • %s/
    • \n", curlist->name.c_str(), curlist->name.c_str()); result = recurse_dir(srcrootlen, dstrootlen, srcfile, dstfile, tempheader, tempfooter); } } // close the list if we found some stuff if (list != nullptr) - core_fprintf(indexfile, "\t
    \n"); + indexfile->printf("\t
\n"); // free all the allocated entries while (list != nullptr) @@ -451,7 +451,7 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std: } if (indexfile != nullptr) - output_footer_and_close_file(indexfile, tempfooter, srcdir_subpath); + output_footer_and_close_file(std::move(indexfile), tempfooter, srcdir_subpath); return result; } @@ -516,36 +516,35 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, std::stri is_token[(UINT8)token_chars[toknum]] = true; // open the source file - core_file *src; - if (core_fopen(srcfile.c_str(), OPEN_FLAG_READ, &src) != FILERR_NONE) + util::core_file::ptr src; + if (util::core_file::open(srcfile.c_str(), OPEN_FLAG_READ, src) != FILERR_NONE) { fprintf(stderr, "Unable to read file '%s'\n", srcfile.c_str()); return 1; } // open the output file - core_file *dst = create_file_and_output_header(dstfile, tempheader, srcfile_subpath); + util::core_file::ptr dst = create_file_and_output_header(dstfile, tempheader, srcfile_subpath); if (dst == nullptr) { fprintf(stderr, "Unable to write file '%s'\n", dstfile.c_str()); - core_fclose(src); return 1; } // output the directory navigation - core_fprintf(dst, "

Viewing File: "); - output_path_as_links(dst, srcfile_subpath, false, link_to_file); - core_fprintf(dst, "

"); + dst->printf("

Viewing File: "); + output_path_as_links(*dst, srcfile_subpath, false, link_to_file); + dst->printf("

"); // start with some tags - core_fprintf(dst, "\t
\n");
+	dst->printf("\t
\n");
 
 	// iterate over lines in the source file
 	int linenum = 1;
 	bool in_comment = false;
 	char srcline[4096];
 	std::ostringstream dstline;
-	while (core_fgets(srcline, ARRAY_LENGTH(srcline), src) != nullptr)
+	while (src->gets(srcline, ARRAY_LENGTH(srcline)) != nullptr)
 	{
 		// start with the line number
 		dstline.str("");
@@ -707,15 +706,14 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, std::stri
 
 		// append a break and move on
 		dstline.put('\n');
-		core_fputs(dst, dstline.str().c_str());
+		dst->puts(dstline.str().c_str());
 	}
 
 	// close tags
-	core_fprintf(dst, "\t
\n"); + dst->printf("\t
\n"); // close the file - output_footer_and_close_file(dst, tempfooter, srcfile_subpath); - core_fclose(src); + output_footer_and_close_file(std::move(dst), tempfooter, srcfile_subpath); return 0; } @@ -730,17 +728,17 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, std::stri HTML file with a standard header -------------------------------------------------*/ -static core_file *create_file_and_output_header(std::string &filename, std::string &templatefile, std::string &path) +static util::core_file::ptr create_file_and_output_header(std::string &filename, std::string &templatefile, std::string &path) { // create the indexfile - core_file *file; - if (core_fopen(filename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS | OPEN_FLAG_NO_BOM, &file) != FILERR_NONE) - return nullptr; + util::core_file::ptr file; + if (util::core_file::open(filename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS | OPEN_FLAG_NO_BOM, file) != FILERR_NONE) + return util::core_file::ptr(); // print a header std::string modified(templatefile); strreplace(modified, "", path.c_str()); - core_fwrite(file, modified.c_str(), modified.length()); + file->write(modified.c_str(), modified.length()); // return the file return file; @@ -752,12 +750,12 @@ static core_file *create_file_and_output_header(std::string &filename, std::stri standard footer to an HTML file and close it -------------------------------------------------*/ -static void output_footer_and_close_file(core_file *file, std::string &templatefile, std::string &path) +static void output_footer_and_close_file(util::core_file::ptr &&file, std::string &templatefile, std::string &path) { std::string modified(templatefile); strreplace(modified, "", path.c_str()); - core_fwrite(file, modified.c_str(), modified.length()); - core_fclose(file); + file->write(modified.c_str(), modified.length()); + file.reset(); } @@ -783,7 +781,7 @@ static std::string &normalized_subpath(std::string &dest, std::string &path, int series of links -------------------------------------------------*/ -static void output_path_as_links(core_file *file, std::string &path, bool end_is_directory, bool link_to_file) +static void output_path_as_links(util::core_file &file, std::string &path, bool end_is_directory, bool link_to_file) { // first count how deep we are int srcdepth = 0; @@ -793,10 +791,10 @@ static void output_path_as_links(core_file *file, std::string &path, bool end_is srcdepth++; // output a link to the root - core_fprintf(file, "<root>/"); + file.printf("../"); + file.printf("index.html\"><root>/"); // now output links to each path up the chain int curdepth = 0; @@ -806,10 +804,10 @@ static void output_path_as_links(core_file *file, std::string &path, bool end_is std::string substr(path, lastslash, slashindex - lastslash); curdepth++; - core_fprintf(file, "%s/", substr.c_str()); + file.printf("../"); + file.printf("index.html\">%s/", substr.c_str()); lastslash = slashindex + 1; } @@ -817,11 +815,11 @@ static void output_path_as_links(core_file *file, std::string &path, bool end_is // and a final link to the current directory std::string substr(path, lastslash, -1); if (end_is_directory) - core_fprintf(file, "%s", substr.c_str()); + file.printf("%s", substr.c_str()); else if (link_to_file) - core_fprintf(file, "%s", substr.c_str(), substr.c_str()); + file.printf("%s", substr.c_str(), substr.c_str()); else - core_fprintf(file, "%s", substr.c_str(), substr.c_str()); + file.printf("%s", substr.c_str(), substr.c_str()); } @@ -866,11 +864,11 @@ static bool find_include_file(std::string &srcincpath, int srcrootlen, int dstro srcincpath.append(PATH_SEPARATOR).append(filename.substr(lastsepindex, -1)); // see if we can open it - core_file *testfile; - if (core_fopen(srcincpath.c_str(), OPEN_FLAG_READ, &testfile) == FILERR_NONE) + util::core_file::ptr testfile; + if (util::core_file::open(srcincpath.c_str(), OPEN_FLAG_READ, testfile) == FILERR_NONE) { // close the file - core_fclose(testfile); + testfile.reset(); // find the longest matching directory substring between the include and source file lastsepindex = 0; diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp index 13eabe31c59..f69de2b0864 100644 --- a/src/tools/unidasm.cpp +++ b/src/tools/unidasm.cpp @@ -512,7 +512,7 @@ int main(int argc, char *argv[]) return 1; // load the file - filerr = core_fload(opts.filename, &data, &length); + filerr = util::core_file::load(opts.filename, &data, length); if (filerr != FILERR_NONE) { fprintf(stderr, "Error opening file '%s'\n", opts.filename); -- cgit v1.2.3-70-g09d2 From 409fbaba89dfe53c58300cf084d23313151ff3fd Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 6 Mar 2016 22:41:27 +1100 Subject: hopefully fix build for everyone --- src/osd/osdcomm.h | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h index 0a94ec0c284..5d0e792130e 100644 --- a/src/osd/osdcomm.h +++ b/src/osd/osdcomm.h @@ -65,27 +65,20 @@ /* 8-bit values */ -using UINT8 = uint8_t; -using INT8 = int8_t; +using UINT8 = std::uint8_t; +using INT8 = std::int8_t; /* 16-bit values */ -using UINT16 = uint16_t; -using INT16 = int16_t; +using UINT16 = std::uint16_t; +using INT16 = std::int16_t; /* 32-bit values */ -using UINT32 = uint32_t; -using INT32 = int32_t; +using UINT32 = std::uint32_t; +using INT32 = std::int32_t; /* 64-bit values */ -#ifndef _WINDOWS_H -#ifdef _MSC_VER -using UINT64 = unsigned __int64; -using INT64 = signed __int64; -#else -using UINT64 = unsigned long long; -using INT64 = signed long long; -#endif -#endif +using UINT64 = std::uint64_t; +using INT64 = std::int64_t; /* pointer-sized values */ using FPTR = uintptr_t; -- cgit v1.2.3-70-g09d2 From c2be38d57d0748467089093d5650c9acbcec9795 Mon Sep 17 00:00:00 2001 From: cracyc Date: Sun, 6 Mar 2016 10:03:43 -0600 Subject: pcat_dyn: proper default nvram (nw) --- src/mame/drivers/pcat_dyn.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mame/drivers/pcat_dyn.cpp b/src/mame/drivers/pcat_dyn.cpp index bf2676a6522..c80bf794174 100644 --- a/src/mame/drivers/pcat_dyn.cpp +++ b/src/mame/drivers/pcat_dyn.cpp @@ -34,6 +34,7 @@ keyboard trick; #include "machine/pcshare.h" #include "video/pc_vga.h" #include "machine/bankdev.h" +#include "machine/ds128x.h" class pcat_dyn_state : public pcat_base_state { @@ -66,7 +67,8 @@ static ADDRESS_MAP_START( pcat_map, AS_PROGRAM, 32, pcat_dyn_state ) AM_RANGE(0x000d0000, 0x000d0fff) AM_ROM AM_REGION("game_prg", 0x0000) AM_WRITE8(bank1_w, 0xffffffff) AM_RANGE(0x000d1000, 0x000d1fff) AM_ROM AM_REGION("game_prg", 0x1000) AM_WRITE8(bank2_w, 0xffffffff) AM_RANGE(0x000d2000, 0x000d3fff) AM_DEVICE("bank1", address_map_bank_device, amap32) - AM_RANGE(0x000d2000, 0x000d4fff) AM_DEVICE("bank2", address_map_bank_device, amap32) + AM_RANGE(0x000d3000, 0x000d4fff) AM_DEVICE("bank2", address_map_bank_device, amap32) + AM_RANGE(0x000df800, 0x000df8ff) AM_RAM //I/O board? AM_RANGE(0x000f0000, 0x000fffff) AM_ROM AM_REGION("bios", 0 ) AM_RANGE(0x00100000, 0x001fffff) AM_RAM AM_RANGE(0xffff0000, 0xffffffff) AM_ROM AM_REGION("bios", 0 ) @@ -132,6 +134,11 @@ static MACHINE_CONFIG_START( pcat_dyn, pcat_dyn_state ) MCFG_FRAGMENT_ADD( pcat_common ) + MCFG_DEVICE_REMOVE("rtc") + MCFG_DS12885_ADD("rtc") + MCFG_MC146818_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir0_w)) + MCFG_MC146818_CENTURY_INDEX(0x32) + MCFG_DEVICE_ADD("bank1", ADDRESS_MAP_BANK, 0) MCFG_DEVICE_PROGRAM_MAP(bank_map) MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE) @@ -166,6 +173,9 @@ ROM_START(toursol) ROM_LOAD("sol.u23", 0x80000, 0x40000, CRC(d1e39bd4) SHA1(39c7ee43cddb53fba0f7c0572ddc40289c4edd07)) ROM_LOAD("sol.u24", 0xa0000, 0x40000, CRC(555341e0) SHA1(81fee576728855e234ff7aae06f54ae9705c3ab5)) ROM_LOAD("sol.u28", 0xe0000, 0x02000, CRC(c9374d50) SHA1(49173bc69f70bb2a7e8af9d03e2538b34aa881d8)) + + ROM_REGION(128, "rtc", 0) + ROM_LOAD("rtc", 0, 128, BAD_DUMP CRC(732f64c8) SHA1(5386eac3afef9b16af8dd7766e577f7ac700d9cc)) ROM_END @@ -183,6 +193,9 @@ ROM_START(toursol1) ROM_LOAD("prom.2", 0x80000, 0x40000, CRC(8b0ac5cf) SHA1(1c2b6a53c9ff4d18a5227d899facbbc719f40205)) ROM_LOAD("prom.3", 0xa0000, 0x40000, CRC(9352e965) SHA1(2bfb647ec27c60a8c821fdf7483199e1a444cea8)) ROM_LOAD("prom.7", 0xe0000, 0x02000, CRC(154c8092) SHA1(4439ee82f36d5d5c334494ba7bb4848e839213a7)) + + ROM_REGION(128, "rtc", 0) + ROM_LOAD("rtc", 0, 128, BAD_DUMP CRC(732f64c8) SHA1(5386eac3afef9b16af8dd7766e577f7ac700d9cc)) ROM_END -- cgit v1.2.3-70-g09d2 From 73f7e9b720363480a4ef5ffecbc2a43513c74bc8 Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Sun, 6 Mar 2016 13:05:57 -0300 Subject: Super Poker: Added the missing PPI's 8255 and routed the involved inputs/outputs through them. 3super8 has PPi's initialization routines, but seems to be a leftover since it lacks of them. Also cleaned up the driver and added technical notes. [Roberto Fresca] --- src/mame/drivers/spoker.cpp | 290 ++++++++++++++++++++++++-------------------- 1 file changed, 159 insertions(+), 131 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/spoker.cpp b/src/mame/drivers/spoker.cpp index a9b3f3bb533..2814ba39bd3 100644 --- a/src/mame/drivers/spoker.cpp +++ b/src/mame/drivers/spoker.cpp @@ -1,29 +1,34 @@ // license:BSD-3-Clause -// copyright-holders:Mirko Buffoni +// copyright-holders:Mirko Buffoni, Roberto Fresca /*************************************************************************** -Super Poker (IGS) -Driver by Mirko Buffoni - -TODO: -- Understand how to reset NVRAM -- Map DSW (Operator mode doesn't help) -- Map Leds and Coin counters -- 3super8 randomly crashes -- 3super8 doesn't have the 8x32 tilemap, change the video emulation accordingly + + Super Poker (IGS) + Driver by Mirko Buffoni + Additional work by Roberto Fresca. + + TODO: + - Understand how to reset NVRAM + - Map DSW (Operator mode doesn't help) + - Map Leds and Coin counters + - 3super8 randomly crashes + - 3super8 doesn't have the 8x32 tilemap, change the video emulation accordingly + +**************************************************************************** + + Very similar to IGS009 driver, but without the reels stuff. + Maybe both drivers can be merged at some point. + ***************************************************************************/ #include "emu.h" #include "cpu/z180/z180.h" #include "cpu/z80/z80.h" +#include "machine/i8255.h" #include "sound/2413intf.h" #include "sound/okim6295.h" #include "machine/nvram.h" -/*************************************************************************** - Video Hardware -***************************************************************************/ - class spoker_state : public driver_device { public: @@ -84,6 +89,11 @@ public: UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; + +/*************************************************************************** + Video Hardware +***************************************************************************/ + WRITE8_MEMBER(spoker_state::bg_tile_w) { m_bg_tile_ram[offset] = data; @@ -129,8 +139,9 @@ UINT32 spoker_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, return 0; } + /*************************************************************************** - Memory Maps + Misc Handlers ***************************************************************************/ CUSTOM_INPUT_MEMBER(spoker_state::hopper_r) @@ -154,12 +165,12 @@ WRITE8_MEMBER(spoker_state::nmi_and_coins_w) // popmessage("%02x",data); } - machine().bookkeeping().coin_counter_w(0, data & 0x01); // coin_a - machine().bookkeeping().coin_counter_w(1, data & 0x04); // coin_c - machine().bookkeeping().coin_counter_w(2, data & 0x08); // key in - machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin out mech + machine().bookkeeping().coin_counter_w(0, data & 0x01); // coin_a + machine().bookkeeping().coin_counter_w(1, data & 0x04); // coin_c + machine().bookkeeping().coin_counter_w(2, data & 0x08); // key in + machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin out mech - output().set_led_value(6, data & 0x40); // led for coin out / hopper active + output().set_led_value(6, data & 0x40); // led for coin out / hopper active if(((m_nmi_ack & 0x80) == 0) && data & 0x80) m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); @@ -172,11 +183,11 @@ WRITE8_MEMBER(spoker_state::nmi_and_coins_w) WRITE8_MEMBER(spoker_state::video_and_leds_w) { - output().set_led_value(4, data & 0x01); // start? - output().set_led_value(5, data & 0x04); // l_bet? + output().set_led_value(4, data & 0x01); // start? + output().set_led_value(5, data & 0x04); // l_bet? - m_video_enable = data & 0x40; - m_hopper = (~data)& 0x80; + m_video_enable = data & 0x40; + m_hopper = (~data)& 0x80; m_out[1] = data; show_out(machine(), m_out); @@ -233,72 +244,55 @@ READ8_MEMBER(spoker_state::magic_r) } - +/*************************************************************************** + Memory Maps +***************************************************************************/ static ADDRESS_MAP_START( spoker_map, AS_PROGRAM, 8, spoker_state ) - AM_RANGE( 0x00000, 0x0f3ff ) AM_ROM - AM_RANGE( 0x0f400, 0x0ffff ) AM_RAM AM_SHARE("nvram") + AM_RANGE(0x00000, 0x0f3ff) AM_ROM + AM_RANGE(0x0f400, 0x0ffff) AM_RAM AM_SHARE("nvram") ADDRESS_MAP_END static ADDRESS_MAP_START( spoker_portmap, AS_IO, 8, spoker_state ) - AM_RANGE( 0x0000, 0x003f ) AM_RAM // Z180 internal regs - - AM_RANGE( 0x2000, 0x23ff ) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") - AM_RANGE( 0x2400, 0x27ff ) AM_RAM_DEVWRITE("palette", palette_device, write_ext) AM_SHARE("palette_ext") - - AM_RANGE( 0x3000, 0x33ff ) AM_RAM_WRITE(bg_tile_w ) AM_SHARE("bg_tile_ram") - - AM_RANGE( 0x5000, 0x5fff ) AM_RAM_WRITE(fg_tile_w ) AM_SHARE("fg_tile_ram") - - /* TODO: ppi #1 */ - AM_RANGE( 0x6480, 0x6480 ) AM_WRITE(nmi_and_coins_w ) - AM_RANGE( 0x6481, 0x6481 ) AM_READ_PORT( "SERVICE" ) - AM_RANGE( 0x6482, 0x6482 ) AM_READ_PORT( "COINS" ) - - /* TODO: ppi #2 */ - AM_RANGE( 0x6490, 0x6490 ) AM_READ_PORT( "BUTTONS1" ) - AM_RANGE( 0x6491, 0x6491 ) AM_WRITE(video_and_leds_w ) - AM_RANGE( 0x6492, 0x6492 ) AM_WRITE(leds_w ) - - AM_RANGE( 0x64a0, 0x64a0 ) AM_READ_PORT( "BUTTONS2" ) - - AM_RANGE( 0x64b0, 0x64b1 ) AM_DEVWRITE("ymsnd", ym2413_device, write) - - AM_RANGE( 0x64c0, 0x64c0 ) AM_DEVREADWRITE("oki", okim6295_device, read, write) - - AM_RANGE( 0x64d0, 0x64d1 ) AM_READWRITE(magic_r, magic_w ) // DSW1-5 - - AM_RANGE( 0x7000, 0x7fff ) AM_RAM_WRITE(fg_color_w ) AM_SHARE("fg_color_ram") + AM_RANGE(0x0000, 0x003f) AM_RAM // Z180 internal regs + AM_RANGE(0x2000, 0x23ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") + AM_RANGE(0x2400, 0x27ff) AM_RAM_DEVWRITE("palette", palette_device, write_ext) AM_SHARE("palette_ext") + AM_RANGE(0x3000, 0x33ff) AM_RAM_WRITE(bg_tile_w ) AM_SHARE("bg_tile_ram") + AM_RANGE(0x5000, 0x5fff) AM_RAM_WRITE(fg_tile_w ) AM_SHARE("fg_tile_ram") + AM_RANGE(0x6480, 0x6483) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* NMI and coins (w), service (r), coins (r) */ + AM_RANGE(0x6490, 0x6493) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* buttons 1 (r), video and leds (w), leds (w) */ + AM_RANGE(0x64a0, 0x64a0) AM_READ_PORT( "BUTTONS2" ) + AM_RANGE(0x64b0, 0x64b1) AM_DEVWRITE("ymsnd", ym2413_device, write) + AM_RANGE(0x64c0, 0x64c0) AM_DEVREADWRITE("oki", okim6295_device, read, write) + AM_RANGE(0x64d0, 0x64d1) AM_READWRITE(magic_r, magic_w ) // DSW1-5 + AM_RANGE(0x7000, 0x7fff) AM_RAM_WRITE(fg_color_w ) AM_SHARE("fg_color_ram") ADDRESS_MAP_END static ADDRESS_MAP_START( 3super8_portmap, AS_IO, 8, spoker_state ) -// AM_RANGE( 0x1000, 0x1fff ) AM_WRITENOP - - AM_RANGE( 0x2000, 0x27ff ) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") - AM_RANGE( 0x2800, 0x2fff ) AM_RAM_DEVWRITE("palette", palette_device, write_ext) AM_SHARE("palette_ext") - - AM_RANGE( 0x3000, 0x33ff ) AM_RAM_WRITE(bg_tile_w ) AM_SHARE("bg_tile_ram") - - AM_RANGE( 0x4000, 0x4000 ) AM_READ_PORT( "DSW1" ) - AM_RANGE( 0x4001, 0x4001 ) AM_READ_PORT( "DSW2" ) - AM_RANGE( 0x4002, 0x4002 ) AM_READ_PORT( "DSW3" ) - AM_RANGE( 0x4003, 0x4003 ) AM_READ_PORT( "DSW4" ) - AM_RANGE( 0x4004, 0x4004 ) AM_READ_PORT( "DSW5" ) - -// AM_RANGE( 0x4000, 0x40ff ) AM_WRITENOP - - AM_RANGE( 0x5000, 0x5fff ) AM_RAM_WRITE(fg_tile_w ) AM_SHARE("fg_tile_ram") - - AM_RANGE( 0x6480, 0x6480 ) AM_READ_PORT( "IN0" ) - AM_RANGE( 0x6490, 0x6490 ) AM_READ_PORT( "IN1" ) - AM_RANGE( 0x6491, 0x6491 ) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE( 0x64a0, 0x64a0 ) AM_READ_PORT( "IN2" ) - AM_RANGE( 0x64b0, 0x64b0 ) AM_WRITE(leds_w ) - AM_RANGE( 0x64c0, 0x64c0 ) AM_READNOP //irq ack? - - AM_RANGE( 0x64f0, 0x64f0 ) AM_WRITE(nmi_and_coins_w ) - - AM_RANGE( 0x7000, 0x7fff ) AM_RAM_WRITE(fg_color_w ) AM_SHARE("fg_color_ram") +// AM_RANGE(0x1000, 0x1fff) AM_WRITENOP + AM_RANGE(0x2000, 0x27ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") + AM_RANGE(0x2800, 0x2fff) AM_RAM_DEVWRITE("palette", palette_device, write_ext) AM_SHARE("palette_ext") + AM_RANGE(0x3000, 0x33ff) AM_RAM_WRITE(bg_tile_w ) AM_SHARE("bg_tile_ram") + AM_RANGE(0x4000, 0x4000) AM_READ_PORT( "DSW1" ) + AM_RANGE(0x4001, 0x4001) AM_READ_PORT( "DSW2" ) + AM_RANGE(0x4002, 0x4002) AM_READ_PORT( "DSW3" ) + AM_RANGE(0x4003, 0x4003) AM_READ_PORT( "DSW4" ) + AM_RANGE(0x4004, 0x4004) AM_READ_PORT( "DSW5" ) +// AM_RANGE(0x4000, 0x40ff) AM_WRITENOP + AM_RANGE(0x5000, 0x5fff) AM_RAM_WRITE(fg_tile_w ) AM_SHARE("fg_tile_ram") + +// The following one (0x6480) should be output. At begining of code, there is a PPI initialization +// setting O-I-I for ports ABC. Except these routines are just a leftover from the original game, +// and now the I/O is handled by a CPLD or FPGA (as seen in goldstar and gp98). + AM_RANGE(0x6480, 0x6480) AM_READ_PORT( "IN0" ) + AM_RANGE(0x6490, 0x6490) AM_READ_PORT( "IN1" ) + + AM_RANGE(0x6491, 0x6491) AM_DEVREADWRITE("oki", okim6295_device, read, write) + AM_RANGE(0x64a0, 0x64a0) AM_READ_PORT( "IN2" ) + AM_RANGE(0x64b0, 0x64b0) AM_WRITE(leds_w ) + AM_RANGE(0x64c0, 0x64c0) AM_READNOP //irq ack? + AM_RANGE(0x64f0, 0x64f0) AM_WRITE(nmi_and_coins_w ) + AM_RANGE(0x7000, 0x7fff) AM_RAM_WRITE(fg_color_w ) AM_SHARE("fg_color_ram") ADDRESS_MAP_END @@ -462,8 +456,9 @@ static INPUT_PORTS_START( 3super8 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END + /*************************************************************************** - Graphics Layout + Graphics Layout & Graphics Decode ***************************************************************************/ static const gfx_layout layout_8x8x6 = @@ -471,9 +466,9 @@ static const gfx_layout layout_8x8x6 = 8, 8, RGN_FRAC(1, 3), 6, - { RGN_FRAC(0,3)+8,RGN_FRAC(0,3)+0, - RGN_FRAC(1,3)+8,RGN_FRAC(1,3)+0, - RGN_FRAC(2,3)+8,RGN_FRAC(2,3)+0 }, + { RGN_FRAC(0,3)+8, RGN_FRAC(0,3)+0, + RGN_FRAC(1,3)+8, RGN_FRAC(1,3)+0, + RGN_FRAC(2,3)+8, RGN_FRAC(2,3)+0 }, { STEP8(0,1) }, { STEP8(0,2*8) }, 8*8*2 @@ -484,9 +479,9 @@ static const gfx_layout layout_8x32x6 = 8, 32, RGN_FRAC(1, 3), 6, - { RGN_FRAC(0,3)+8,RGN_FRAC(0,3)+0, - RGN_FRAC(1,3)+8,RGN_FRAC(1,3)+0, - RGN_FRAC(2,3)+8,RGN_FRAC(2,3)+0 }, + { RGN_FRAC(0,3)+8, RGN_FRAC(0,3)+0, + RGN_FRAC(1,3)+8, RGN_FRAC(1,3)+0, + RGN_FRAC(2,3)+8, RGN_FRAC(2,3)+0 }, { STEP8(0,1) }, { STEP32(0,2*8) }, 8*32*2 @@ -498,30 +493,30 @@ static const gfx_layout layout3s8_8x8x6 = RGN_FRAC(1,3), 6, { RGN_FRAC(0,3)+2*8, RGN_FRAC(0,3)+0, RGN_FRAC(1,3)+2*8, RGN_FRAC(1,3)+0,RGN_FRAC(2,3)+2*8, RGN_FRAC(2,3)+0 }, - { 0, 1,2,3,4,5,6,7 }, - { 0*8, 1*8, 4*8, 5*8, 8*8, 9*8, 12*8, 13*8 }, + { 0, 1, 2, 3, 4, 5, 6, 7 }, + { 0*8, 1*8, 4*8, 5*8, 8*8, 9*8, 12*8, 13*8 }, 16*8 }; static GFXDECODE_START( spoker ) - GFXDECODE_ENTRY( "gfx1", 0x00000, layout_8x8x6, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0x04000, layout_8x32x6, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0x08000, layout_8x32x6, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0x0c000, layout_8x32x6, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0x00000, layout_8x32x6, 0, 16 ) + GFXDECODE_ENTRY( "gfx1", 0x00000, layout_8x8x6, 0, 16 ) + GFXDECODE_ENTRY( "gfx2", 0x04000, layout_8x32x6, 0, 16 ) + GFXDECODE_ENTRY( "gfx2", 0x08000, layout_8x32x6, 0, 16 ) + GFXDECODE_ENTRY( "gfx2", 0x0c000, layout_8x32x6, 0, 16 ) + GFXDECODE_ENTRY( "gfx2", 0x00000, layout_8x32x6, 0, 16 ) GFXDECODE_END static GFXDECODE_START( 3super8 ) - GFXDECODE_ENTRY( "gfx1", 0x00000, layout3s8_8x8x6, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0x04000, layout_8x32x6, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0x08000, layout_8x32x6, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0x0c000, layout_8x32x6, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0x00000, layout_8x32x6, 0, 16 ) + GFXDECODE_ENTRY( "gfx1", 0x00000, layout3s8_8x8x6, 0, 16 ) + GFXDECODE_ENTRY( "gfx2", 0x04000, layout_8x32x6, 0, 16 ) + GFXDECODE_ENTRY( "gfx2", 0x08000, layout_8x32x6, 0, 16 ) + GFXDECODE_ENTRY( "gfx2", 0x0c000, layout_8x32x6, 0, 16 ) + GFXDECODE_ENTRY( "gfx2", 0x00000, layout_8x32x6, 0, 16 ) GFXDECODE_END /*************************************************************************** - Machine Drivers + Machine Start & Reset ***************************************************************************/ void spoker_state::machine_start() @@ -535,11 +530,16 @@ void spoker_state::machine_start() void spoker_state::machine_reset() { - m_nmi_ack = 0; - m_hopper = 0; - m_video_enable = 1; + m_nmi_ack = 0; + m_hopper = 0; + m_video_enable = 1; } + +/*************************************************************************** + Machine Drivers +***************************************************************************/ + static MACHINE_CONFIG_START( spoker, spoker_state ) /* basic machine hardware */ @@ -548,9 +548,18 @@ static MACHINE_CONFIG_START( spoker, spoker_state ) MCFG_CPU_IO_MAP(spoker_portmap) MCFG_CPU_VBLANK_INT_DRIVER("screen", spoker_state, nmi_line_assert) - MCFG_NVRAM_ADD_0FILL("nvram") + MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0) // Control 0x8b --> A:out; B:input; C:input. + MCFG_I8255_OUT_PORTA_CB(WRITE8(spoker_state, nmi_and_coins_w)) + MCFG_I8255_IN_PORTB_CB(IOPORT("SERVICE")) + MCFG_I8255_IN_PORTC_CB(IOPORT("COINS")) + + MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0) // Control 0x90 --> A:input; B:out; C:out. + MCFG_I8255_IN_PORTA_CB(IOPORT("BUTTONS1")) + MCFG_I8255_OUT_PORTB_CB(WRITE8(spoker_state, video_and_leds_w)) + MCFG_I8255_OUT_PORTC_CB(WRITE8(spoker_state, leds_w)) + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -567,12 +576,13 @@ static MACHINE_CONFIG_START( spoker, spoker_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("ymsnd", YM2413, XTAL_3_579545MHz) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.4) MCFG_OKIM6295_ADD("oki", XTAL_12MHz / 12, OKIM6295_PIN7_HIGH) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END + static MACHINE_CONFIG_DERIVED( 3super8, spoker ) MCFG_CPU_REPLACE("maincpu", Z80, XTAL_24MHz / 4) /* z840006, 24/4 MHz? */ @@ -582,26 +592,18 @@ static MACHINE_CONFIG_DERIVED( 3super8, spoker ) MCFG_CPU_VBLANK_INT_DRIVER("screen", spoker_state, nmi_line_assert) MCFG_CPU_PERIODIC_INT_DRIVER(spoker_state, irq0_line_hold, 120) // this signal comes from the PIC + MCFG_DEVICE_REMOVE("ppi8255_0") + MCFG_DEVICE_REMOVE("ppi8255_1") + MCFG_GFXDECODE_MODIFY("gfxdecode", 3super8) MCFG_DEVICE_REMOVE("ymsnd") MACHINE_CONFIG_END -DRIVER_INIT_MEMBER(spoker_state,spk116it) -{ - int A; - UINT8 *rom = memregion("maincpu")->base(); - - for (A = 0;A < 0x10000;A++) - { - rom[A] ^= 0x02; - if ((A & 0x0208) == 0x0208) rom[A] ^= 0x20; - if ((A & 0x0228) == 0x0008) rom[A] ^= 0x20; - if ((A & 0x04A0) == 0x04A0) rom[A] ^= 0x02; - if ((A & 0x1208) == 0x1208) rom[A] ^= 0x01; - } -} +/*************************************************************************** + ROMs load +***************************************************************************/ ROM_START( spk116it ) ROM_REGION( 0x10000, "maincpu", 0 ) @@ -767,7 +769,6 @@ Note //3.bin 1ST AND 2ND HALF IDENTICAL //sound.bin 1ST AND 2ND HALF IDENTICAL - ROM_START( 3super8 ) ROM_REGION( 0x20000, "maincpu", 0 ) ROM_LOAD( "prgrom.bin", 0x00000, 0x20000, CRC(37c85dfe) SHA1(56bd2fb859b17dda1e675a385b6bcd6867ecceb0) ) @@ -794,7 +795,28 @@ ROM_START( 3super8 ) ROM_LOAD( "sound.bin", 0x00000, 0x40000, BAD_DUMP CRC(230b31c3) SHA1(38c107325d3a4e9781912078b1317dc9ba3e1ced) ) ROM_END -DRIVER_INIT_MEMBER(spoker_state,3super8) + +/*************************************************************************** + Driver Init +***************************************************************************/ + +DRIVER_INIT_MEMBER(spoker_state, spk116it) +{ + int A; + UINT8 *rom = memregion("maincpu")->base(); + + + for (A = 0;A < 0x10000;A++) + { + rom[A] ^= 0x02; + if ((A & 0x0208) == 0x0208) rom[A] ^= 0x20; + if ((A & 0x0228) == 0x0008) rom[A] ^= 0x20; + if ((A & 0x04A0) == 0x04A0) rom[A] ^= 0x02; + if ((A & 0x1208) == 0x1208) rom[A] ^= 0x01; + } +} + +DRIVER_INIT_MEMBER(spoker_state, 3super8) { UINT8 *ROM = memregion("maincpu")->base(); int i; @@ -831,11 +853,17 @@ DRIVER_INIT_MEMBER(spoker_state,3super8) } } -GAME( 1993?, spk116it, 0, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v116IT)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, spk115it, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v115IT)", MACHINE_SUPPORTS_SAVE ) -GAME( 1996, spk306us, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v306US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, spk205us, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v205US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, spk203us, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v203US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, spk200ua, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v200UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, spk102ua, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v102UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, 3super8, spk116it, 3super8,3super8, spoker_state, 3super8, ROT0, "", "3 Super 8 (Italy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) //roms are badly dumped + +/*************************************************************************** + Game Drivers +***************************************************************************/ + +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ +GAME( 1993?, spk116it, 0, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v116IT)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993?, spk115it, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v115IT)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk306us, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v306US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk205us, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v205US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk203us, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v203US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk200ua, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v200UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk102ua, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v102UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1993?, 3super8, spk116it, 3super8, 3super8, spoker_state, 3super8, ROT0, "", "3 Super 8 (Italy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) //roms are badly dumped -- cgit v1.2.3-70-g09d2 From 0ece3b9ca54f6bfb8c8e65562a8b1e637fad7c21 Mon Sep 17 00:00:00 2001 From: cracyc Date: Sun, 6 Mar 2016 11:57:53 -0600 Subject: pcat_dyn: notes (nw) --- src/mame/drivers/pcat_dyn.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/pcat_dyn.cpp b/src/mame/drivers/pcat_dyn.cpp index c80bf794174..2e473734ef8 100644 --- a/src/mame/drivers/pcat_dyn.cpp +++ b/src/mame/drivers/pcat_dyn.cpp @@ -9,23 +9,13 @@ Unmodified 486 PC-AT HW. Input uses a trackball device that isn't PC standard af Jet Way Information Co. OP495SLC motherboard - AMD Am486-DX40 CPU - Trident TVGA9000i video card + - Breve Technologies audio adapter preliminary driver by Angelo Salese -TODO: -- Returns CMOS checksum error, can't enter into BIOS setup screens to set that up ... it's certainly a MESS-to-MAME - conversion bug or a keyboard device issue, since it works fine in MESS. (Update: it's the keyboard device) - -keyboard trick; -- Set 0x41c to zero then set the scancode accordingly: -- bp f1699 ah = 0x3b -- bp f53b9 al = scancode -- bp f08d9 ah = scancode - -0x48 is up 0x4d is down 0x50 is right 0x4b is left -0x3c/0x3d is pageup/pagedown -0x01 is esc -0x0d is enter +Notes: +Data from the 99378275.SN file on the rom filesystem is scrambled and written to DF80:0000-0100 then read back. +If the output isn't satisfactory, it prints "I/O BOARD FAILURE". ********************************************************************************************************************/ -- cgit v1.2.3-70-g09d2 From ff1a88213972960427b41f5bfe491337b09dfce6 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 6 Mar 2016 19:17:56 +0100 Subject: nw --- src/mame/drivers/hh_cop400.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index 3aca96c8a13..f4af0a890db 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -251,7 +251,8 @@ UINT8 hh_cop400_state::read_inputs(int columns) * COP421 MCU label ~/927 COP421-NEZ/N * 4 lamps, 1-bit sound - This is a Simon clone, the tones are not harmonic. + This is a Simon clone, the tones are not harmonic. Two models exist, each + with a different batteries setup, assume for now they're same otherwise. ***************************************************************************/ @@ -321,7 +322,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( ctstein, ctstein_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", COP421, 850000) // approximation - RC osc. R=12K to +6V, C=100pf to GND + MCFG_CPU_ADD("maincpu", COP421, 860000) // approximation - RC osc. R=12K to +6V, C=100pf to GND MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed MCFG_COP400_WRITE_G_CB(WRITE8(ctstein_state, write_g)) MCFG_COP400_WRITE_L_CB(WRITE8(ctstein_state, write_l)) @@ -347,6 +348,8 @@ MACHINE_CONFIG_END * COP420 MCU label COP420L-NEZ/N * 2-digit 7seg display, 41 other leds, 1-bit sound + This is the COP400 version, there is one for TMS1000 too. + ***************************************************************************/ class h2hbaskb_state : public hh_cop400_state -- cgit v1.2.3-70-g09d2 From 68fa73ad77257a14290ace6cdd9766b18974d273 Mon Sep 17 00:00:00 2001 From: cracyc Date: Sun, 6 Mar 2016 13:52:06 -0600 Subject: pcat_dyn: skip io board check and connect currently nonworking mouse (nw) --- src/mame/drivers/pcat_dyn.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/pcat_dyn.cpp b/src/mame/drivers/pcat_dyn.cpp index 2e473734ef8..2cc311d5fad 100644 --- a/src/mame/drivers/pcat_dyn.cpp +++ b/src/mame/drivers/pcat_dyn.cpp @@ -4,12 +4,13 @@ Tournament Solitaire (c) 1995 Dynamo -Unmodified 486 PC-AT HW. Input uses a trackball device that isn't PC standard afaik. +Unmodified 486 PC-AT HW. Jet Way Information Co. OP495SLC motherboard - AMD Am486-DX40 CPU - Trident TVGA9000i video card - Breve Technologies audio adapter + - CH Products RollerMouse serial trackball preliminary driver by Angelo Salese @@ -25,6 +26,9 @@ If the output isn't satisfactory, it prints "I/O BOARD FAILURE". #include "video/pc_vga.h" #include "machine/bankdev.h" #include "machine/ds128x.h" +#include "machine/ins8250.h" +#include "bus/rs232/rs232.h" +#include "bus/rs232/ser_mouse.h" class pcat_dyn_state : public pcat_base_state { @@ -58,7 +62,7 @@ static ADDRESS_MAP_START( pcat_map, AS_PROGRAM, 32, pcat_dyn_state ) AM_RANGE(0x000d1000, 0x000d1fff) AM_ROM AM_REGION("game_prg", 0x1000) AM_WRITE8(bank2_w, 0xffffffff) AM_RANGE(0x000d2000, 0x000d3fff) AM_DEVICE("bank1", address_map_bank_device, amap32) AM_RANGE(0x000d3000, 0x000d4fff) AM_DEVICE("bank2", address_map_bank_device, amap32) - AM_RANGE(0x000df800, 0x000df8ff) AM_RAM //I/O board? + AM_RANGE(0x000df400, 0x000df8ff) AM_RAM //I/O board? AM_RANGE(0x000f0000, 0x000fffff) AM_ROM AM_REGION("bios", 0 ) AM_RANGE(0x00100000, 0x001fffff) AM_RAM AM_RANGE(0xffff0000, 0xffffffff) AM_ROM AM_REGION("bios", 0 ) @@ -69,6 +73,7 @@ static ADDRESS_MAP_START( pcat_io, AS_IO, 32, pcat_dyn_state ) AM_RANGE(0x03b0, 0x03bf) AM_DEVREADWRITE8("vga", vga_device, port_03b0_r, port_03b0_w, 0xffffffff) AM_RANGE(0x03c0, 0x03cf) AM_DEVREADWRITE8("vga", vga_device, port_03c0_r, port_03c0_w, 0xffffffff) AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("vga", vga_device, port_03d0_r, port_03d0_w, 0xffffffff) + AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE8("ns16550", ns16550_device, ins8250_r, ins8250_w, 0xffffffff) ADDRESS_MAP_END static ADDRESS_MAP_START( bank_map, AS_0, 32, pcat_dyn_state ) @@ -109,6 +114,9 @@ static INPUT_PORTS_START( pcat_dyn ) PORT_START("pc_keyboard_7") INPUT_PORTS_END +static SLOT_INTERFACE_START(pcat_dyn_com) + SLOT_INTERFACE("msmouse", MSFT_SERIAL_MOUSE) +SLOT_INTERFACE_END static MACHINE_CONFIG_START( pcat_dyn, pcat_dyn_state ) /* basic machine hardware */ @@ -141,6 +149,19 @@ static MACHINE_CONFIG_START( pcat_dyn, pcat_dyn_state ) MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(32) MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(20) MCFG_ADDRESS_MAP_BANK_STRIDE(0x1000) + + MCFG_DEVICE_ADD( "ns16550", NS16550, XTAL_1_8432MHz ) + MCFG_INS8250_OUT_TX_CB(DEVWRITELINE("serport", rs232_port_device, write_txd)) + MCFG_INS8250_OUT_DTR_CB(DEVWRITELINE("serport", rs232_port_device, write_dtr)) + MCFG_INS8250_OUT_RTS_CB(DEVWRITELINE("serport", rs232_port_device, write_rts)) + MCFG_INS8250_OUT_INT_CB(DEVWRITELINE("pic8259_2", pic8259_device, ir4_w)) + MCFG_RS232_PORT_ADD( "serport", pcat_dyn_com, "msmouse" ) + MCFG_SLOT_FIXED(true) + MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, rx_w)) + MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, dcd_w)) + MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, dsr_w)) + MCFG_RS232_RI_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, ri_w)) + MCFG_RS232_CTS_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, cts_w)) MACHINE_CONFIG_END /*************************************** @@ -163,6 +184,7 @@ ROM_START(toursol) ROM_LOAD("sol.u23", 0x80000, 0x40000, CRC(d1e39bd4) SHA1(39c7ee43cddb53fba0f7c0572ddc40289c4edd07)) ROM_LOAD("sol.u24", 0xa0000, 0x40000, CRC(555341e0) SHA1(81fee576728855e234ff7aae06f54ae9705c3ab5)) ROM_LOAD("sol.u28", 0xe0000, 0x02000, CRC(c9374d50) SHA1(49173bc69f70bb2a7e8af9d03e2538b34aa881d8)) + ROM_FILL(0x2a3e6, 1, 0xeb) // skip prot(?) check ROM_REGION(128, "rtc", 0) ROM_LOAD("rtc", 0, 128, BAD_DUMP CRC(732f64c8) SHA1(5386eac3afef9b16af8dd7766e577f7ac700d9cc)) -- cgit v1.2.3-70-g09d2 From 49b0a34f1eec181c90428efe743dade4b91a0250 Mon Sep 17 00:00:00 2001 From: cracyc Date: Sun, 6 Mar 2016 14:05:31 -0600 Subject: pcat_dyn: that works better, protocol isn't ms mouse compatible though (nw) --- src/mame/drivers/pcat_dyn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mame/drivers/pcat_dyn.cpp b/src/mame/drivers/pcat_dyn.cpp index 2cc311d5fad..00b1a7df54d 100644 --- a/src/mame/drivers/pcat_dyn.cpp +++ b/src/mame/drivers/pcat_dyn.cpp @@ -154,7 +154,7 @@ static MACHINE_CONFIG_START( pcat_dyn, pcat_dyn_state ) MCFG_INS8250_OUT_TX_CB(DEVWRITELINE("serport", rs232_port_device, write_txd)) MCFG_INS8250_OUT_DTR_CB(DEVWRITELINE("serport", rs232_port_device, write_dtr)) MCFG_INS8250_OUT_RTS_CB(DEVWRITELINE("serport", rs232_port_device, write_rts)) - MCFG_INS8250_OUT_INT_CB(DEVWRITELINE("pic8259_2", pic8259_device, ir4_w)) + MCFG_INS8250_OUT_INT_CB(DEVWRITELINE("pic8259_1", pic8259_device, ir4_w)) MCFG_RS232_PORT_ADD( "serport", pcat_dyn_com, "msmouse" ) MCFG_SLOT_FIXED(true) MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, rx_w)) -- cgit v1.2.3-70-g09d2 From 8aa4f6476f5531a97f3e63daf0a4da983b18674c Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Sun, 6 Mar 2016 15:05:45 -0500 Subject: Fixed MT#6153 - http://mametesters.org/view.php?id=6153 (nw) --- src/mame/drivers/suna8.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/suna8.cpp b/src/mame/drivers/suna8.cpp index a09ed61babc..a6a6d91293f 100644 --- a/src/mame/drivers/suna8.cpp +++ b/src/mame/drivers/suna8.cpp @@ -1694,8 +1694,8 @@ static INPUT_PORTS_START( starfigh ) PORT_DIPSETTING( 0x38, DEF_STR( Easiest ) ) PORT_DIPSETTING( 0x30, DEF_STR( Very_Easy) ) PORT_DIPSETTING( 0x28, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x20, "Moderate" ) - PORT_DIPSETTING( 0x18, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x18, "Moderate" ) PORT_DIPSETTING( 0x10, DEF_STR( Harder ) ) PORT_DIPSETTING( 0x08, DEF_STR( Very_Hard ) ) PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) @@ -1714,7 +1714,7 @@ static INPUT_PORTS_START( starfigh ) PORT_DIPNAME( 0x04, 0x04, "Play Together" ) PORT_DIPLOCATION("SW2:3") PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x38, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:4,5,6") + PORT_DIPNAME( 0x38, 0x18, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:4,5,6") PORT_DIPSETTING( 0x30, "10K" ) PORT_DIPSETTING( 0x28, "30K" ) PORT_DIPSETTING( 0x18, "50K, Every 50K" ) -- cgit v1.2.3-70-g09d2 From d13aba424f7200ea68c5621ff5833d621f7f372d Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Sun, 6 Mar 2016 21:37:53 +0100 Subject: fixed crash when displaying external DATs file in some circumstances. (nw) --- src/emu/ui/datfile.h | 5 ++-- src/emu/ui/datmenu.cpp | 14 ++-------- src/emu/ui/mainmenu.cpp | 2 +- src/emu/ui/selgame.cpp | 68 ++++++++++++++++++++++++++++++++++++++++--------- src/emu/ui/selsoft.cpp | 12 ++++----- 5 files changed, 67 insertions(+), 34 deletions(-) (limited to 'src') diff --git a/src/emu/ui/datfile.h b/src/emu/ui/datfile.h index 66d76d17501..7b38599ba21 100644 --- a/src/emu/ui/datfile.h +++ b/src/emu/ui/datfile.h @@ -31,7 +31,6 @@ public: void load_software_info(std::string &softlist, std::string &buffer, std::string &softname, std::string &parentname); void command_sub_menu(const game_driver *drv, std::vector &menuitems); void reset_run() { first_run = true; } - bool has_software(std::string &softlist, std::string &softname, std::string &parentname); std::string rev_history() const { return m_history_rev; } std::string rev_mameinfo() const { return m_mame_rev; } @@ -45,9 +44,11 @@ public: bool has_command(const game_driver *driver) { return (m_cmdidx.find(driver) != m_cmdidx.end()); } bool has_sysinfo(const game_driver *driver) { return (m_sysidx.find(driver) != m_sysidx.end()); } bool has_story(const game_driver *driver) { return (m_storyidx.find(driver) != m_storyidx.end()); } + bool has_software(std::string &softlist, std::string &softname, std::string &parentname); - bool has_data(const game_driver *d) + bool has_data(const game_driver *a = nullptr) { + const game_driver *d = (a != nullptr) ? a : &machine().system(); return (has_history(d) || has_mameinfo(d) || has_messinfo(d) || has_command(d) || has_sysinfo(d) || has_story(d)); } private: diff --git a/src/emu/ui/datmenu.cpp b/src/emu/ui/datmenu.cpp index 6c240311c62..93c776f3e51 100644 --- a/src/emu/ui/datmenu.cpp +++ b/src/emu/ui/datmenu.cpp @@ -99,10 +99,7 @@ void ui_menu_dats_view::handle() void ui_menu_dats_view::populate() { machine().pause(); - if (!issoft) - get_data(); - else - get_data_sw(); + (issoft == true) ? get_data_sw() : get_data(); item_append(MENU_SEPARATOR_ITEM, nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW), nullptr); customtop = 2.0f * machine().ui().get_line_height() + 4.0f * UI_BOX_TB_BORDER; @@ -119,12 +116,7 @@ void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom ui_manager &mui = machine().ui(); float maxwidth = origx2 - origx1; float width; - std::string driver; - - if (issoft) - driver = m_swinfo->longname; - else - driver = m_driver->description; + std::string driver = (issoft == true) ? m_swinfo->longname : m_driver->description; mui.draw_text_full(container, driver.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); @@ -251,7 +243,6 @@ void ui_menu_dats_view::get_data() { std::string tempbuf(buffer.substr(xstart[x], xend[x] - xstart[x])); item_append(tempbuf.c_str(), nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_DISABLE), (void *)(FPTR)(x + 1)); - } } @@ -276,7 +267,6 @@ void ui_menu_dats_view::get_data_sw() { std::string tempbuf(buffer.substr(xstart[x], xend[x] - xstart[x])); item_append(tempbuf.c_str(), nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_DISABLE), (void *)(FPTR)(x + 1)); - } } diff --git a/src/emu/ui/mainmenu.cpp b/src/emu/ui/mainmenu.cpp index 66381a3df1f..0cf449e8f84 100644 --- a/src/emu/ui/mainmenu.cpp +++ b/src/emu/ui/mainmenu.cpp @@ -132,7 +132,7 @@ void ui_menu_main::populate() item_append(_("Cheat"), nullptr, 0, (void *)CHEAT); // add dats menu - if (machine().ui().options().enabled_dats() && machine().datfile().has_data(&machine().system())) + if (machine().ui().options().enabled_dats() && machine().datfile().has_data()) item_append(_("External DAT View"), nullptr, 0, (void *)EXTERNAL_DATS); item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp index d0996d65d59..dcc9e1d2d68 100644 --- a/src/emu/ui/selgame.cpp +++ b/src/emu/ui/selgame.cpp @@ -299,10 +299,31 @@ void ui_menu_select_game::handle() } // Infos - else if (ui_globals::rpanel == RP_INFOS && ui_globals::curdats_view > UI_FIRST_LOAD) + else if (ui_globals::rpanel == RP_INFOS) { - ui_globals::curdats_view--; - topline_datsview = 0; + if (!isfavorite()) + { + const game_driver *drv = (const game_driver *)m_event->itemref; + if ((FPTR)drv > skip_main_items && ui_globals::curdats_view > UI_FIRST_LOAD) + { + ui_globals::curdats_view--; + topline_datsview = 0; + } + } + else + { + ui_software_info *drv = (ui_software_info *)m_event->itemref; + if (drv->startempty == 1 && ui_globals::curdats_view > UI_FIRST_LOAD) + { + ui_globals::curdats_view--; + topline_datsview = 0; + } + else if ((FPTR)drv > skip_main_items && ui_globals::cur_sw_dats_view > 0) + { + ui_globals::cur_sw_dats_view--; + topline_datsview = 0; + } + } } } @@ -318,10 +339,31 @@ void ui_menu_select_game::handle() } // Infos - else if (ui_globals::rpanel == RP_INFOS && ui_globals::curdats_view < UI_LAST_LOAD) + else if (ui_globals::rpanel == RP_INFOS) { - ui_globals::curdats_view++; - topline_datsview = 0; + if (!isfavorite()) + { + const game_driver *drv = (const game_driver *)m_event->itemref; + if ((FPTR)drv > skip_main_items && ui_globals::curdats_view < UI_LAST_LOAD) + { + ui_globals::curdats_view++; + topline_datsview = 0; + } + } + else + { + ui_software_info *drv = (ui_software_info *)m_event->itemref; + if (drv->startempty == 1 && ui_globals::curdats_view < UI_LAST_LOAD) + { + ui_globals::curdats_view++; + topline_datsview = 0; + } + else if ((FPTR)drv > skip_main_items && ui_globals::cur_sw_dats_view < 1) + { + ui_globals::cur_sw_dats_view++; + topline_datsview = 0; + } + } } } @@ -363,13 +405,15 @@ void ui_menu_select_game::handle() } else { - ui_software_info *swinfo = (ui_software_info *)m_event->itemref; - if ((FPTR)swinfo > skip_main_items && machine().datfile().has_data(swinfo->driver)) + ui_software_info *ui_swinfo = (ui_software_info *)m_event->itemref; + datfile_manager &mdat = machine().datfile(); + + if ((FPTR)ui_swinfo > skip_main_items) { - if (swinfo->startempty == 1) - ui_menu::stack_push(global_alloc_clear(machine(), container, swinfo->driver)); - else - ui_menu::stack_push(global_alloc_clear(machine(), container, swinfo)); + if (ui_swinfo->startempty == 1 && mdat.has_history(ui_swinfo->driver)) + ui_menu::stack_push(global_alloc_clear(machine(), container, ui_swinfo->driver)); + else if (mdat.has_software(ui_swinfo->listname, ui_swinfo->shortname, ui_swinfo->parentname) || !ui_swinfo->usage.empty()) + ui_menu::stack_push(global_alloc_clear(machine(), container, ui_swinfo)); } } } diff --git a/src/emu/ui/selsoft.cpp b/src/emu/ui/selsoft.cpp index 04cfaa375f9..3bf2e237553 100644 --- a/src/emu/ui/selsoft.cpp +++ b/src/emu/ui/selsoft.cpp @@ -242,14 +242,12 @@ void ui_menu_select_software::handle() else if (m_event->iptkey == IPT_UI_DATS && machine().ui().options().enabled_dats()) { ui_software_info *ui_swinfo = (ui_software_info *)m_event->itemref; + datfile_manager &mdat = machine().datfile(); - if ((FPTR)ui_swinfo > 1 && machine().datfile().has_data(ui_swinfo->driver)) - { - if (ui_swinfo->startempty == 1) - ui_menu::stack_push(global_alloc_clear(machine(), container, ui_swinfo->driver)); - else - ui_menu::stack_push(global_alloc_clear(machine(), container, ui_swinfo)); - } + if (ui_swinfo->startempty == 1 && mdat.has_history(ui_swinfo->driver)) + ui_menu::stack_push(global_alloc_clear(machine(), container, ui_swinfo->driver)); + else if (mdat.has_software(ui_swinfo->listname, ui_swinfo->shortname, ui_swinfo->parentname) || !ui_swinfo->usage.empty()) + ui_menu::stack_push(global_alloc_clear(machine(), container, ui_swinfo)); } // handle UI_LEFT_PANEL -- cgit v1.2.3-70-g09d2 From f0ca76cdf129ebbffd897e8e0782c5e454471a47 Mon Sep 17 00:00:00 2001 From: johnparker007 Date: Sat, 5 Mar 2016 16:59:22 +0000 Subject: Added layout for Frankie Dettori's 7th Heaven [John Parker] Added layout for Frankie Dettori's 7th Heaven [John Parker] --- src/mame/drivers/bfm_sc4.cpp | 21 +- src/mame/layout/sc4fd7tha.lay | 6388 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 6399 insertions(+), 10 deletions(-) create mode 100644 src/mame/layout/sc4fd7tha.lay (limited to 'src') diff --git a/src/mame/drivers/bfm_sc4.cpp b/src/mame/drivers/bfm_sc4.cpp index 1d1d2a783fe..77db9437149 100644 --- a/src/mame/drivers/bfm_sc4.cpp +++ b/src/mame/drivers/bfm_sc4.cpp @@ -40,6 +40,7 @@ #include "includes/bfm_sc45.h" #include "bfm_sc45_helper.h" +#include "sc4fd7tha.lh" #include "sc4dnd.lh" #include "sc4dndtp.lh" #include "sc4dnddw.lh" @@ -48053,17 +48054,17 @@ DRIVER_INIT_MEMBER(sc4_state,sc4fd7th) // PR6804 FRANKIE DETTORI PR6804 FRANKIE SOUNDS -GAMEL( 200?, sc4fd7th ,0, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven (Bellfruit) (Scorpion 4) (set 1)", MACHINE_FLAGS, layout_bfm_sc4 ) -GAMEL( 200?, sc4fd7tha ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven (Bellfruit) (Scorpion 4) (set 2)", MACHINE_FLAGS, layout_bfm_sc4 ) -GAMEL( 200?, sc4fd7thb ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven (Bellfruit) (Scorpion 4) (set 3)", MACHINE_FLAGS, layout_bfm_sc4 ) -GAMEL( 200?, sc4fd7the ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven (Bellfruit) (Scorpion 4) (set 4)", MACHINE_FLAGS, layout_bfm_sc4 ) -GAMEL( 200?, sc4fd7thf ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven (Bellfruit) (Scorpion 4) (set 5)", MACHINE_FLAGS, layout_bfm_sc4 ) -GAMEL( 200?, sc4fd7thg ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven (Bellfruit) (Scorpion 4) (set 6)", MACHINE_FLAGS, layout_bfm_sc4 ) +GAMEL( 200?, sc4fd7th ,0, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven (Bellfruit) (Scorpion 4) (set 1)", MACHINE_FLAGS, layout_sc4fd7tha ) +GAMEL( 200?, sc4fd7tha ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven (Bellfruit) (Scorpion 4) (set 2)", MACHINE_FLAGS, layout_sc4fd7tha ) +GAMEL( 200?, sc4fd7thb ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven (Bellfruit) (Scorpion 4) (set 3)", MACHINE_FLAGS, layout_sc4fd7tha ) +GAMEL( 200?, sc4fd7the ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven (Bellfruit) (Scorpion 4) (set 4)", MACHINE_FLAGS, layout_sc4fd7tha ) +GAMEL( 200?, sc4fd7thf ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven (Bellfruit) (Scorpion 4) (set 5)", MACHINE_FLAGS, layout_sc4fd7tha ) +GAMEL( 200?, sc4fd7thg ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven (Bellfruit) (Scorpion 4) (set 6)", MACHINE_FLAGS, layout_sc4fd7tha ) // PR6804 FRANKIE DETTORI SP98 PR6804 FRANKIE SOUNDS -GAMEL( 200?, sc4fd7thc ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven SP98 (Bellfruit) (Scorpion 4) (set 1)", MACHINE_FLAGS, layout_bfm_sc4 ) -GAMEL( 200?, sc4fd7thd ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven SP98 (Bellfruit) (Scorpion 4) (set 2)", MACHINE_FLAGS, layout_bfm_sc4 ) -GAMEL( 200?, sc4fd7thh ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven SP98 (Bellfruit) (Scorpion 4) (set 3)", MACHINE_FLAGS, layout_bfm_sc4 ) -GAMEL( 200?, sc4fd7thi ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven SP98 (Bellfruit) (Scorpion 4) (set 4)", MACHINE_FLAGS, layout_bfm_sc4 ) +GAMEL( 200?, sc4fd7thc ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven SP98 (Bellfruit) (Scorpion 4) (set 1)", MACHINE_FLAGS, layout_sc4fd7tha ) +GAMEL( 200?, sc4fd7thd ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven SP98 (Bellfruit) (Scorpion 4) (set 2)", MACHINE_FLAGS, layout_sc4fd7tha ) +GAMEL( 200?, sc4fd7thh ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven SP98 (Bellfruit) (Scorpion 4) (set 3)", MACHINE_FLAGS, layout_sc4fd7tha ) +GAMEL( 200?, sc4fd7thi ,sc4fd7th, sc4_4reel, sc4, sc4_state, sc4fd7th, ROT0, "BFM","Frankie Dettori's 7th Heaven SP98 (Bellfruit) (Scorpion 4) (set 4)", MACHINE_FLAGS, layout_sc4fd7tha ) DRIVER_INIT_MEMBER(sc4_state,sc4frsu) diff --git a/src/mame/layout/sc4fd7tha.lay b/src/mame/layout/sc4fd7tha.lay new file mode 100644 index 00000000000..0332f60c43d --- /dev/null +++ b/src/mame/layout/sc4fd7tha.lay @@ -0,0 +1,6388 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 92508442131b510bc589dd81f75e8c79bae18ac8 Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Mon, 7 Mar 2016 00:30:10 -0300 Subject: Goldstar driver: Some technical notes and minor cleanup. --- src/mame/drivers/goldstar.cpp | 123 ++++++++++++++++++++++++++++-------------- 1 file changed, 84 insertions(+), 39 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp index 584767696c6..ffb6089d3b4 100644 --- a/src/mame/drivers/goldstar.cpp +++ b/src/mame/drivers/goldstar.cpp @@ -33,7 +33,7 @@ upgrades/conversions/hacks. Are any of them legit? W-4 New Lucky 8 Lines - Bingo - supposed to be a W-4 but unverified + Bingo F-5 New Lucky 8 Lines w/ Witch Bonus - bootleg/hack?? W-6 Fever Chance W-7 Skill Chance @@ -183,6 +183,12 @@ Seems to be sooo slow.... (interrupts?) + * Bingo (Wing) + + It has a different machine driver to support the different pos of gfx + layers. I strogly suspect there is a register to adjust the layer position. + + ***************************************************************************/ @@ -8091,6 +8097,35 @@ MACHINE_CONFIG_END ***************************************************************************/ +/* + Golden Star (bootleg of Cherry 1 Gold) + Processor: ZILOG Z0840006PSC Z80 CPU 9745 RN + + EPROM: + + Name: 1 + File: gs1.bin + Type: TMS JL 27C010A-12 LX78AC96P + + Name: 2 + File: gs2.bin + Type: TMS JL 27C010A-10 LX73A5J4P + + Nome: 3 + File: gs3.bin + Type: TMS JL 29C010A-12 LX78AC96P + + Nome: 4 + File: gs4.bin + Type: TMS JL 27C010A-10 LX73A5J4P + + Other IC's on MB + + - ACTEL A1020B PL84C 9713 + - 9703R MS6264L-70PC + - HOLTEK HT 6116-70 9806K0625 + +*/ ROM_START( goldstar ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "gs4-cpu.bin", 0x0000, 0x10000, CRC(73e47d4d) SHA1(df2d8233572dc12e8a4b56e5d4f6c566e4ababc9) ) @@ -8105,7 +8140,17 @@ ROM_START( goldstar ) ROM_LOAD( "gs1-snd.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) ) ROM_END +/* + Golden Star (blue version) + + This is the blue PCB version. EPROMs are marked with colored stickers. + + The red and yellow EPROMs are for graphics. The red is identical to the one found in normal golden star, + while yellow match only 90% (probably the logo) + The blue one match the golden star ROM 1 and contains ADCPM audio. + +*/ ROM_START( goldstbl ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "gsb-cpu.bin", 0x0000, 0x10000, CRC(82b238c3) SHA1(1306e700e213f423bdd79b182aa11335796f7f38) ) @@ -8182,44 +8227,6 @@ ROM_END /* - -Cherry I Gold - -Anno 1998 -Produttore -N.revisione W4BON (rev.1) - - -CPU - -1x TMPZ84C00AP-6 (u12)(main) -2x D8255AC-2 (u45,u46) (missing) -1x D71055C (u40) (missing) -1x YM2149 (u39) -1x SN76489AN (u38) -1x oscillator 12.0C45 - -ROMs - -1x I27256 (u3) -1x I27C010 (u1) -1x PROM N82S147AN (u2) -1x M27C512 (u20) -1x GAL20V8 (pl1)(read protected) -1x PALCE20V8H (pl2)(read protected) -1x ispLSI1024-60LJ (pl3)(read protected) -3x PALCE16V8H (pl4,pl6,pl7)(read protected) -1x PEEL22CV10 (pl5)(read protected) - -Note - -1x 36x2 edge connector -1x 10x2 edge connector -2x trimmer (volume) -5x 8x2 switches dip (sw1-5) -1x push lever (TS) - - Cherry Gold (Cherry 10) Anno 1997 @@ -8282,6 +8289,44 @@ ROM_START( chry10 ) ROM_END +/* +Cherry I Gold + +Anno 1998 +Produttore +N.revisione W4BON (rev.1) + + +CPU + +1x TMPZ84C00AP-6 (u12)(main) +2x D8255AC-2 (u45,u46) (missing) +1x D71055C (u40) (missing) +1x YM2149 (u39) +1x SN76489AN (u38) +1x oscillator 12.0C45 + +ROMs + +1x I27256 (u3) +1x I27C010 (u1) +1x PROM N82S147AN (u2) +1x M27C512 (u20) +1x GAL20V8 (pl1)(read protected) +1x PALCE20V8H (pl2)(read protected) +1x ispLSI1024-60LJ (pl3)(read protected) +3x PALCE16V8H (pl4,pl6,pl7)(read protected) +1x PEEL22CV10 (pl5)(read protected) + +Note + +1x 36x2 edge connector +1x 10x2 edge connector +2x trimmer (volume) +5x 8x2 switches dip (sw1-5) +1x push lever (TS) + +*/ ROM_START( chrygld ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "ol-v9.u20", 0x00000, 0x10000, CRC(b61c0695) SHA1(63c44b20fd7f76bdb33331273d2610e8cfd31add) ) -- cgit v1.2.3-70-g09d2 From 65b93c95c154d5399e5cb635c97dcc03653d2e5c Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Mon, 7 Mar 2016 00:19:15 -0500 Subject: Notetaker: hooked up more of the IOCPU I/O registers. Separated reset functions for IOCPU and EmulatorCPU. [Lord Nightmare] --- src/mame/drivers/notetaker.cpp | 96 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 84 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index ff8ce2072e8..ce80cf1fb41 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -98,6 +98,7 @@ public: UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); // basic io DECLARE_WRITE16_MEMBER(IPConReg_w); + DECLARE_WRITE16_MEMBER(FIFOReg_w); // uarts DECLARE_READ16_MEMBER(ReadKeyData_r); @@ -116,9 +117,29 @@ public: DECLARE_READ16_MEMBER(iocpu_r); DECLARE_WRITE16_MEMBER(iocpu_w); DECLARE_DRIVER_INIT(notetakr); -//variables + //variables + // IPConReg UINT8 m_BootSeqDone; + UINT8 m_ProcLock; + UINT8 m_CharCtr; UINT8 m_DisableROM; + UINT8 m_CorrOn_q; + UINT8 m_LedInd6; + UINT8 m_LedInd7; + UINT8 m_LedInd8; + // FIFOReg + UINT8 m_TabletYOn; + UINT8 m_TabletXOn; + UINT8 m_FrSel2; + UINT8 m_FrSel1; + UINT8 m_FrSel0; + UINT8 m_SHConB; + UINT8 m_SHConA; + UINT8 m_SetSH; + +// resets + void ip_reset(); + void ep_reset(); // overrides virtual void machine_reset() override; @@ -133,13 +154,13 @@ UINT32 notetaker_state::screen_update(screen_device &screen, bitmap_ind16 &bitma WRITE16_MEMBER(notetaker_state::IPConReg_w) { m_BootSeqDone = (data&0x80)?1:0; - //m_ProcLock = (data&0x40)?1:0; // bus lock for this processor (hold other processor in wait state) - //m_CharCtr = (data&0x20)?1:0; // battery charge control + m_ProcLock = (data&0x40)?1:0; // bus lock for this processor (hold other processor in wait state) + m_CharCtr = (data&0x20)?1:0; // battery charge control m_DisableROM = (data&0x10)?1:0; // disable rom at 0000-0fff - //m_CorrOn = (data&0x08)?1:0; // CorrectionOn (ECC correction enabled); also LedInd5 - //m_LedInd6 = (data&0x04)?1:0; - //m_LedInd7 = (data&0x02)?1:0; - //m_LedInd8 = (data&0x01)?1:0; + m_CorrOn_q = (data&0x08)?1:0; // CorrectionOn (ECC correction enabled); also LedInd5 + m_LedInd6 = (data&0x04)?1:0; + m_LedInd7 = (data&0x02)?1:0; + m_LedInd8 = (data&0x01)?1:0; popmessage("LEDS: CR1: %d, CR2: %d, CR3: %d, CR4: %d", (data&0x04)>>2, (data&0x08)>>3, (data&0x02)>>1, (data&0x01)); // cr1 and 2 are in the reverse order as expected, according to the schematic } @@ -193,6 +214,19 @@ WRITE16_MEMBER( notetaker_state::KeyChipReset_w ) m_kbduart->set_input_pin(AY31015_XR, 1); // '' } +/* FIFO (DAC) Stuff and ADC stuff */ +WRITE16_MEMBER(notetaker_state::FIFOReg_w) +{ + m_TabletYOn = (data&0x80)?1:0; + m_TabletXOn = (data&0x40)?1:0; + m_FrSel2 = (data&0x20)?1:0; + m_FrSel1 = (data&0x10)?1:0; + m_FrSel0 = (data&0x08)?1:0; + m_SHConB = (data&0x04)?1:0; + m_SHConA = (data&0x02)?1:0; + m_SetSH = (data&0x01)?1:0; +} + /* EIA hd6402 */ READ16_MEMBER( notetaker_state::ReadEIAData_r ) { @@ -363,7 +397,7 @@ static ADDRESS_MAP_START(notetaker_iocpu_io, AS_IO, 16, notetaker_state) AM_RANGE(0x4a, 0x4b) AM_MIRROR(0x7E10) AM_WRITE(LoadKeyData_w) // kbd uart data register AM_RANGE(0x4c, 0x4d) AM_MIRROR(0x7E10) AM_WRITE(KeyDataReset_w) // kbd uart ddr switch (data reset) AM_RANGE(0x4e, 0x4f) AM_MIRROR(0x7E10) AM_WRITE(KeyChipReset_w) // kbd uart reset - //AM_RANGE(0x60, 0x61) AM_MIRROR(0x7E1E) AM_WRITE(FIFOReg_w) // DAC sample and hold and frequency setup + AM_RANGE(0x60, 0x61) AM_MIRROR(0x7E1E) AM_WRITE(FIFOReg_w) // DAC sample and hold and frequency setup //AM_RANGE(0xa0, 0xa1) AM_MIRROR(0x7E18) AM_DEVREADWRITE("debug8255", 8255_device, read, write) // debugger board 8255 //AM_RANGE(0xc0, 0xc1) AM_MIRROR(0x7E1E) AM_WRITE(FIFOBus_w) // DAC data write to FIFO //AM_RANGE(0x100, 0x101) AM_MIRROR(0x7E1E) AM_WRITE(SelDiskReg_w) I/O register (adc speed, crtc pixel clock enable, +5 and +12v relays for floppy, etc) @@ -424,20 +458,58 @@ read from 0x44 (byte wide) in a loop forever (read keyboard fifo status) /* Emulator CPU */ /* static ADDRESS_MAP_START(notetaker_emulatorcpu_mem, AS_PROGRAM, 16, notetaker_state) - AM_RANGE(0x00000, 0x00fff) AM_RAM // actually a banked block of ram - AM_RANGE(0x01000, 0x3ffff) AM_MIRROR(0xC0000) AM_RAM AM_BASE("mainram") // 256k of ram (less 4k), shared between both processors, mirrored 4 times + AM_RANGE(0x00000, 0x01fff) AM_MIRROR(0xC0000) AM_RAM // actually a banked block of ram, 8k (4k words) + AM_RANGE(0x02000, 0x3ffff) AM_MIRROR(0xC0000) AM_RAM AM_BASE("mainram") // 256k of ram (less 8k), shared between both processors, mirrored 4 times + AM_RANGE(0xFFFC0, 0xFFFDF) AM_READWRITE(proc_illinst_r, proc_illinst_w) AM_RANGE(0xFFFE0, 0xFFFEF) AM_READWRITE(proc_control_r, proc_control_w) ADDRESS_MAP_END */ -/* Machine Reset */ +/* Machine Reset; this emulates the full system reset, triggered by ExtReset' (cardcage pin <50>) or the PowerOnReset' circuit */ void notetaker_state::machine_reset() { + ip_reset(); + ep_reset(); +} + +/* IP Reset; this emulates the IPReset' signal */ +void notetaker_state::ip_reset() +{ + // not-really-reset related, set line on Keybaord UART + m_kbduart->set_input_pin(AY31015_SWE, 0); // status word outputs are permanently enabled (pin 16 SFD(SWE) tied low, active) + // reset the Keyboard UART + m_kbduart->set_input_pin(AY31015_XR, 0); // MR - pin 21 + m_kbduart->set_input_pin(AY31015_XR, 1); // '' + // reset the IPConReg latch at #f1 m_BootSeqDone = 0; + m_ProcLock = 0; + m_CharCtr = 0; m_DisableROM = 0; - m_kbduart->set_input_pin(AY31015_SWE, 0); // status word outputs are permanently enabled (pin 16 SFD(SWE) tied low, active) + m_CorrOn_q = 0; + m_LedInd6 = 0; + m_LedInd7 = 0; + m_LedInd8 = 0; + // reset the FIFOReg latch at #h9 + m_TabletYOn = 0; + m_TabletXOn = 0; + m_FrSel2 = 0; + m_FrSel1 = 0; + m_FrSel0 = 0; + m_SHConB = 0; + m_SHConA = 0; + m_SetSH = 0; + // Clear the DAC FIFO + // write me! + // stuff to reset on the display/eia board + // write me! } +/* EP Reset; this emulats the EPReset' signal */ +void notetaker_state::ep_reset() +{ +} + + /* Input ports */ static INPUT_PORTS_START( notetakr ) INPUT_PORTS_END -- cgit v1.2.3-70-g09d2 From 228c6c85d374f23d42b3df5ce1e0d16acc313cd8 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Mon, 7 Mar 2016 00:19:53 -0500 Subject: whitespace fix (nw) --- src/mame/drivers/vk100.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mame/drivers/vk100.cpp b/src/mame/drivers/vk100.cpp index abe616047a8..ac757f3380b 100644 --- a/src/mame/drivers/vk100.cpp +++ b/src/mame/drivers/vk100.cpp @@ -694,7 +694,7 @@ ADDRESS_MAP_END x 0 x x x x x 1 RW CRTC register r/w x 1 * * * ** ** ** read area (rightmost 74ls138): x 1 0 0 0 * * * R SYSTAT_A (a0-a3 chooses the bit of the dipswitches read via d3) - x 1 0 0 1 x x x R SYSTAT_B + x 1 0 0 1 x x x R SYSTAT_B x 1 0 1 0 x x 0 R i8251 UART data x 1 0 1 0 x x 1 R i8251 UART status x 1 0 1 1 x x x R unused -- cgit v1.2.3-70-g09d2 From 2161dd1554124e37cfeda9575cbe44713c92a676 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Mon, 7 Mar 2016 03:23:08 -0500 Subject: Notetaker: further documentation updates. Added commented out i/o map for the EmulatorCPU [Lord Nightmare] --- src/mame/drivers/notetaker.cpp | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index ce80cf1fb41..4cdff5f3272 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -338,9 +338,9 @@ x x * * * * * * * * * * * * * * * * * 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 x x x x x x RW FFFC0-FFFDF (trigger ILLINST interrupt on EP, data ignored?) And the following, decoded by the memory address logic board: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 x x . Open Bus -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 x x W FFFEA (Multiprocessor Control (reset/int/boot for each proc; data bits 3,2,1,0 = 0010 means IP, bits 3210 = 0111 means EP; all others ignored.)) -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 x x R FFFEC (Syndrome bits (gnd bit 15, parity bit 14, exp bits 13-8, bits 7-0 are 'other', maybe highest address bits) -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 x x R FFFEE (Parity Error Address: row bits 15-8, column bits 7-0; reading this acknowledges a parity interrupt) +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 x x W FFFEA (Multiprocessor Control (reset(bit 6)/int(bit 5)/boot(bit 4) for each processor; data bits 3,2,1,0 are 'processor address'; 0010 means IP, 0111 means EP; all others ignored.)) +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 x x R FFFEC (Syndrome bits (gnd bit 15, parity bit 14, exp(syndrome) bits 13-8, bits 7-0 are the highest address bits) +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 x x R FFFEE (Parity Error Address: row bits 15-8, column bits 7-0; reading this also acknowledges a parity interrupt) */ static ADDRESS_MAP_START(notetaker_iocpu_mem, AS_PROGRAM, 16, notetaker_state) @@ -400,7 +400,7 @@ static ADDRESS_MAP_START(notetaker_iocpu_io, AS_IO, 16, notetaker_state) AM_RANGE(0x60, 0x61) AM_MIRROR(0x7E1E) AM_WRITE(FIFOReg_w) // DAC sample and hold and frequency setup //AM_RANGE(0xa0, 0xa1) AM_MIRROR(0x7E18) AM_DEVREADWRITE("debug8255", 8255_device, read, write) // debugger board 8255 //AM_RANGE(0xc0, 0xc1) AM_MIRROR(0x7E1E) AM_WRITE(FIFOBus_w) // DAC data write to FIFO - //AM_RANGE(0x100, 0x101) AM_MIRROR(0x7E1E) AM_WRITE(SelDiskReg_w) I/O register (adc speed, crtc pixel clock enable, +5 and +12v relays for floppy, etc) + //AM_RANGE(0x100, 0x101) AM_MIRROR(0x7E1E) AM_WRITE(DiskReg_w) I/O register (adc speed, crtc pixel clock enable, +5 and +12v relays for floppy, etc) //AM_RANGE(0x120, 0x121) AM_MIRROR(0x7E18) AM_DEVREADWRITE("wd1791", fd1971_device) // floppy controller AM_RANGE(0x140, 0x15f) AM_MIRROR(0x7E00) AM_DEVREADWRITE8("crt5027", crt5027_device, read, write, 0x00FF) // crt controller //AM_RANGE(0x160, 0x161) AM_MIRROR(0x7E1E) AM_WRITE(LoadDispAddr_w) // loads the start address for the display framebuffer @@ -463,6 +463,15 @@ static ADDRESS_MAP_START(notetaker_emulatorcpu_mem, AS_PROGRAM, 16, notetaker_st AM_RANGE(0xFFFC0, 0xFFFDF) AM_READWRITE(proc_illinst_r, proc_illinst_w) AM_RANGE(0xFFFE0, 0xFFFEF) AM_READWRITE(proc_control_r, proc_control_w) ADDRESS_MAP_END + +// note everything in the emulatorcpu's io range is incompletely decoded; so if 0x1800 is accessed it will write to both the debug 8255 AND the pic8259! I'm not sure the code abuses this or not, but it might do so to both write registers and clear parity at once, or something similar. +static ADDRESS_MAP_START(notetaker_emulatorcpu_io, AS_IO, 16, notetaker_state) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x800, 0x803) AM_MIRROR(0x07FC) AM_DEVREADWRITE8("emupic8259", pic8259_device, read, write, 0x00ff) + AM_RANGE(0x1000, 0x1001) AM_MIRROR(0x07FE) AM_DEVREADWRITE("debug8255", 8255_device, read, write) // debugger board 8255, is this the same one as the iocpu accesses? or are these two 8255s on separate cards? + AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x07FE) AM_WRITE(EPConReg_w) // emu processor control reg & leds + AM_RANGE(0x4000, 0x4001) AM_MIRROR(0x07FE) AM_WRITE(EmuClearParity_w) // writes here clear the local 8k-ram parity error register +ADDRESS_MAP_END */ /* Machine Reset; this emulates the full system reset, triggered by ExtReset' (cardcage pin <50>) or the PowerOnReset' circuit */ @@ -500,11 +509,14 @@ void notetaker_state::ip_reset() m_SetSH = 0; // Clear the DAC FIFO // write me! - // stuff to reset on the display/eia board + // reset the EIA UART + m_eiauart->set_input_pin(AY31015_XR, 0); // MR - pin 21 + m_eiauart->set_input_pin(AY31015_XR, 1); // '' + // reset the DiskReg latches at #c4 and #b4 on the disk/display/eia board // write me! } -/* EP Reset; this emulats the EPReset' signal */ +/* EP Reset; this emulates the EPReset' signal */ void notetaker_state::ep_reset() { } @@ -542,10 +554,10 @@ static MACHINE_CONFIG_START( notetakr, notetaker_state ) MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") - MCFG_DEVICE_ADD( "crt5027", CRT5027, (XTAL_36MHz/4)/8) // the clock for the crt5027 is configurable rate; 36MHz xtal divided by 1*,2,4,6,8,10,12, or 14 (* because this is a 74s163 this setting probably means divide by 1) and secondarily divided by 8 (again by two to load the 16 bit output shifters after this) - // on reset, bitclk is 000 so divider is (36mhz/14)/8; during boot it is written with 101, changing the divider to (36mhz/4)/8 - // for now, we just hack it to the latter setting from start - // TODO: actually do this correctly. + MCFG_DEVICE_ADD( "crt5027", CRT5027, (XTAL_36MHz/4)/8) // the clock for the crt5027 is configurable rate; 36MHz xtal divided by 1*, 2, 3, 4, 5, 6, 7, or 8 (* because this is a 74s163 this setting probably means divide by 1; documentation at http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790605_Definition_of_8086_Ports.pdf claims it is 1.5, which makes no sense) and secondarily divided by 8 (again by two to load the 16 bit output shifters after this) + // on reset, bitclk is 000 so divider is (36mhz/8)/8; during boot it is written with 101, changing the divider to (36mhz/4)/8 + // TODO: for now, we just hack it to the latter setting from start; this should be handled correctly in ip_reset(); + MCFG_TMS9927_CHAR_WIDTH(8) //(8 pixels per column/halfword, 16 pixels per fullword) MCFG_VIDEO_SET_SCREEN("screen") @@ -596,7 +608,7 @@ ROM_START( notetakr ) ROM_REGION( 0x100000, "mainram", ROMREGION_ERASEFF ) // main ram, on 2 cards with parity/ecc/syndrome/timing/bus arbitration on another 2 cards ROM_REGION( 0x1000, "proms", ROMREGION_ERASEFF ) ROM_LOAD( "disksep.prom.82s147.a4", 0x000, 0x200, NO_DUMP ) // disk data separator prom from the disk/display module board - ROM_LOAD( "memcasraswrite.prom.82s147.b1", 0x200, 0x200, NO_DUMP ) // memory cas/ras/write prom from the memory address logic board + ROM_LOAD( "memcasraswrite.prom.82s147.b1", 0x200, 0x200, NO_DUMP ) // memory cas/ras/write state machine prom from the memory address logic board; the equations for this are listed in one of the documents on bitsavers ROM_LOAD( "setmemrq.prom.82s126.d9", 0x400, 0x100, NO_DUMP ) // SETMEMRQ memory timing prom from the disk/display module board; The equations for this one are actually listed on the schematic and the prom dump can be generated from these: /* SetMemRq: -- cgit v1.2.3-70-g09d2 From efc37ee29768093e8f356c8b6313572d66311a4c Mon Sep 17 00:00:00 2001 From: mahlemiut Date: Mon, 7 Mar 2016 21:29:06 +1300 Subject: Linux compile fix. --- src/emu/luaengine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/emu/luaengine.cpp b/src/emu/luaengine.cpp index d35a10d9167..4ffee509693 100644 --- a/src/emu/luaengine.cpp +++ b/src/emu/luaengine.cpp @@ -1709,13 +1709,13 @@ void lua_engine::start() namespace luabridge { template <> - struct Stack { - static inline void push (lua_State* L, UINT64 value) { + struct Stack { + static inline void push (lua_State* L, unsigned long long value) { lua_pushunsigned(L, static_cast (value)); } - static inline UINT64 get (lua_State* L, int index) { - return static_cast (luaL_checkunsigned (L, index)); + static inline unsigned long long get (lua_State* L, int index) { + return static_cast (luaL_checkunsigned (L, index)); } }; } -- cgit v1.2.3-70-g09d2 From 4e3ca74170905e651cfff374bcfc6d58977fc515 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 7 Mar 2016 20:31:52 +1100 Subject: Fix loading zipped image --- src/lib/util/corefile.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp index e4eda2477d5..51819809f93 100644 --- a/src/lib/util/corefile.cpp +++ b/src/lib/util/corefile.cpp @@ -1145,6 +1145,7 @@ file_error core_file::open_ram_copy(void const *data, std::size_t length, std::u if (!result->buffer()) return FILERR_OUT_OF_MEMORY; + file = std::move(result); return FILERR_NONE; } catch (...) -- cgit v1.2.3-70-g09d2 From fea09343fb83663225a5099f2fb857e264588be9 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Mon, 7 Mar 2016 04:54:45 -0500 Subject: nuke some tag lookups in prose2k (nw) --- src/mame/drivers/tsispch.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/tsispch.cpp b/src/mame/drivers/tsispch.cpp index 7617c1fb7ef..54bd3e0d04d 100644 --- a/src/mame/drivers/tsispch.cpp +++ b/src/mame/drivers/tsispch.cpp @@ -132,23 +132,22 @@ *****************************************************************************/ WRITE_LINE_MEMBER(tsispch_state::i8251_rxrdy_int) { - machine().device("pic8259")->ir1_w(state); + m_pic->ir1_w(state); } WRITE_LINE_MEMBER(tsispch_state::i8251_txempty_int) { - machine().device("pic8259")->ir2_w(state); + m_pic->ir2_w(state); } WRITE_LINE_MEMBER(tsispch_state::i8251_txrdy_int) { - machine().device("pic8259")->ir3_w(state); + m_pic->ir3_w(state); } WRITE8_MEMBER( tsispch_state::i8251_rxd ) { - i8251_device *uart = machine().device("i8251a_u15"); - uart->receive_character(data); + m_uart->receive_character(data); } /***************************************************************************** -- cgit v1.2.3-70-g09d2 From 8ea9ff6a7afdcc5ca5e48351feee06e43d7fc4ee Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 7 Mar 2016 14:45:58 +0100 Subject: TIMER_CALLBACK to TIMER_CALLBACK_MEMBER (nw) --- src/devices/cpu/m68000/m68000.h | 3 + src/devices/cpu/m68000/m68kcpu.cpp | 20 +++--- src/devices/cpu/sh4/sh4dmac.h | 2 - src/devices/machine/68307tmu.cpp | 15 ++--- src/devices/machine/68307tmu.h | 4 ++ src/devices/machine/74123.cpp | 4 +- src/devices/machine/f3853.cpp | 10 +-- src/devices/machine/f3853.h | 5 +- src/devices/machine/k056230.cpp | 9 +-- src/devices/machine/k056230.h | 3 +- src/devices/machine/rtc65271.cpp | 32 ++------- src/devices/machine/rtc65271.h | 10 +-- src/devices/machine/rtc9701.cpp | 9 +-- src/devices/machine/rtc9701.h | 4 +- src/devices/machine/s3520cf.cpp | 8 +-- src/devices/machine/s3520cf.h | 4 +- src/devices/machine/v3021.cpp | 9 +-- src/devices/machine/v3021.h | 4 +- src/devices/machine/z80ctc.cpp | 6 +- src/devices/machine/z80ctc.h | 5 +- src/devices/machine/z80dma.cpp | 10 +-- src/devices/machine/z80dma.h | 6 +- src/devices/video/315_5313.cpp | 32 ++------- src/devices/video/315_5313.h | 6 +- src/emu/diexec.cpp | 29 +++----- src/emu/diexec.h | 13 ++-- src/emu/schedule.h | 2 - src/emu/tilemap.cpp | 46 ++++++------- src/emu/tilemap.h | 16 ++--- src/mame/includes/kaypro.h | 12 ++-- src/mame/includes/mac.h | 2 + src/mame/machine/apollo_kbd.cpp | 9 +-- src/mame/machine/apollo_kbd.h | 3 +- src/mame/machine/kay_kbd.cpp | 39 +++++------ src/mame/machine/kaypro.cpp | 6 +- src/mame/machine/mac.cpp | 7 +- src/mame/machine/macadb.cpp | 132 ++++++++++++++++++------------------- src/mame/machine/mega32x.cpp | 13 +--- src/mame/machine/mega32x.h | 2 +- src/mame/machine/rx01.cpp | 6 +- src/mame/machine/rx01.h | 3 +- 41 files changed, 215 insertions(+), 345 deletions(-) (limited to 'src') diff --git a/src/devices/cpu/m68000/m68000.h b/src/devices/cpu/m68000/m68000.h index 013627ac6c0..6dc0c37489c 100644 --- a/src/devices/cpu/m68000/m68000.h +++ b/src/devices/cpu/m68000/m68000.h @@ -141,6 +141,9 @@ public: DECLARE_WRITE_LINE_MEMBER( write_irq6 ); DECLARE_WRITE_LINE_MEMBER( write_irq7 ); + void presave(); + void postload(); + void clear_all(void); virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }; diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp index 02809436472..38ff81d57f3 100644 --- a/src/devices/cpu/m68000/m68kcpu.cpp +++ b/src/devices/cpu/m68000/m68kcpu.cpp @@ -659,19 +659,19 @@ static void set_irq_line(m68000_base_device *m68k, int irqline, int state) m68k->nmi_pending = TRUE; } -static void m68k_presave(m68000_base_device *m68k) +void m68000_base_device::presave() { - m68k->save_sr = m68ki_get_sr(m68k); - m68k->save_stopped = (m68k->stopped & STOP_LEVEL_STOP) != 0; - m68k->save_halted = (m68k->stopped & STOP_LEVEL_HALT) != 0; + save_sr = m68ki_get_sr(this); + save_stopped = (stopped & STOP_LEVEL_STOP) != 0; + save_halted = (stopped & STOP_LEVEL_HALT) != 0; } -static void m68k_postload(m68000_base_device *m68k) +void m68000_base_device::postload() { - m68ki_set_sr_noint_nosp(m68k, m68k->save_sr); + m68ki_set_sr_noint_nosp(this, save_sr); //fprintf(stderr, "Reloaded, pc=%x\n", REG_PC(m68k)); - m68k->stopped = (m68k->save_stopped ? STOP_LEVEL_STOP : 0) | (m68k->save_halted ? STOP_LEVEL_HALT : 0); - m68ki_jump(m68k, REG_PC(m68k)); + stopped = (save_stopped ? STOP_LEVEL_STOP : 0) | (save_halted ? STOP_LEVEL_HALT : 0); + m68ki_jump(this, REG_PC(this)); } static void m68k_cause_bus_error(m68000_base_device *m68k) @@ -1025,8 +1025,8 @@ void m68000_base_device::init_cpu_common(void) save_item(NAME(mmu_atc_data[i]), i); } - machine().save().register_presave(save_prepost_delegate(FUNC(m68k_presave), this)); - machine().save().register_postload(save_prepost_delegate(FUNC(m68k_postload), this)); + machine().save().register_presave(save_prepost_delegate(FUNC(m68000_base_device::presave), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(m68000_base_device::postload), this)); m_icountptr = &remaining_cycles; remaining_cycles = 0; diff --git a/src/devices/cpu/sh4/sh4dmac.h b/src/devices/cpu/sh4/sh4dmac.h index 60148653c2b..fe0bbc84514 100644 --- a/src/devices/cpu/sh4/sh4dmac.h +++ b/src/devices/cpu/sh4/sh4dmac.h @@ -27,8 +27,6 @@ #define DMAOR_NMIF 0x0002 #define DMAOR_DME 0x0001 -TIMER_CALLBACK( sh4_dmac_callback ); - void sh4_handle_sar0_addr_w(UINT32 data, UINT32 mem_mask); void sh4_handle_sar1_addr_w(UINT32 data, UINT32 mem_mask); void sh4_handle_sar2_addr_w(UINT32 data, UINT32 mem_mask); diff --git a/src/devices/machine/68307tmu.cpp b/src/devices/machine/68307tmu.cpp index 6f5c33687cd..e3c8e595f7c 100644 --- a/src/devices/machine/68307tmu.cpp +++ b/src/devices/machine/68307tmu.cpp @@ -99,7 +99,7 @@ WRITE16_MEMBER( m68307cpu_device::m68307_internal_timer_w ) } } -static TIMER_CALLBACK( m68307_timer0_callback ) +TIMER_CALLBACK_MEMBER(m68307_timer::timer0_callback ) { m68307cpu_device* m68k = (m68307cpu_device *)ptr; m68307_single_timer* tptr = &m68k->m68307TIMER->singletimer[0]; @@ -110,7 +110,7 @@ static TIMER_CALLBACK( m68307_timer0_callback ) tptr->mametimer->adjust(m68k->cycles_to_attotime(20000)); } -static TIMER_CALLBACK( m68307_timer1_callback ) +TIMER_CALLBACK_MEMBER(m68307_timer::timer1_callback ) { m68307cpu_device* m68k = (m68307cpu_device *)ptr; m68307_single_timer* tptr = &m68k->m68307TIMER->singletimer[1]; @@ -122,7 +122,7 @@ static TIMER_CALLBACK( m68307_timer1_callback ) } -static TIMER_CALLBACK( m68307_wd_timer_callback ) +TIMER_CALLBACK_MEMBER(m68307_timer::wd_timer_callback ) { printf("wd timer\n"); } @@ -134,15 +134,12 @@ void m68307_timer::init(m68307cpu_device *device) m68307_single_timer* tptr; tptr = &singletimer[0]; - tptr->mametimer = device->machine().scheduler().timer_alloc(FUNC(m68307_timer0_callback), parent); + tptr->mametimer = device->machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(m68307_timer::timer0_callback),this), parent); tptr = &singletimer[1]; - tptr->mametimer = device->machine().scheduler().timer_alloc(FUNC(m68307_timer1_callback), parent); - - - wd_mametimer = device->machine().scheduler().timer_alloc(FUNC(m68307_wd_timer_callback), parent); - + tptr->mametimer = device->machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(m68307_timer::timer1_callback),this), parent); + wd_mametimer = device->machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(m68307_timer::wd_timer_callback),this), parent); } UINT16 m68307_timer::read_tcn(UINT16 mem_mask, int which) diff --git a/src/devices/machine/68307tmu.h b/src/devices/machine/68307tmu.h index 2c62858b66d..660bdaeeb41 100644 --- a/src/devices/machine/68307tmu.h +++ b/src/devices/machine/68307tmu.h @@ -38,4 +38,8 @@ class m68307_timer void init(m68307cpu_device *device); void reset(void); + + TIMER_CALLBACK_MEMBER(timer0_callback); + TIMER_CALLBACK_MEMBER(timer1_callback); + TIMER_CALLBACK_MEMBER(wd_timer_callback); }; diff --git a/src/devices/machine/74123.cpp b/src/devices/machine/74123.cpp index d5eddbe91a3..0263ad0eb4b 100644 --- a/src/devices/machine/74123.cpp +++ b/src/devices/machine/74123.cpp @@ -116,7 +116,7 @@ int ttl74123_device::timer_running() /*------------------------------------------------- - TIMER_CALLBACK( output_callback ) + TIMER_CALLBACK_MEMBER( output_callback ) -------------------------------------------------*/ TIMER_CALLBACK_MEMBER( ttl74123_device::output_callback ) @@ -140,7 +140,7 @@ void ttl74123_device::set_output() /*------------------------------------------------- - TIMER_CALLBACK( clear_callback ) + TIMER_CALLBACK_MEMBER( clear_callback ) -------------------------------------------------*/ TIMER_CALLBACK_MEMBER( ttl74123_device::clear_callback ) diff --git a/src/devices/machine/f3853.cpp b/src/devices/machine/f3853.cpp index a37e1b7e59b..49deb99f073 100644 --- a/src/devices/machine/f3853.cpp +++ b/src/devices/machine/f3853.cpp @@ -77,7 +77,7 @@ void f3853_device::device_start() m_interrupt_req_cb.bind_relative_to(*owner()); - m_timer = machine().scheduler().timer_alloc(FUNC(f3853_timer_callback), (void *)this ); + m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(f3853_device::timer_callback),this)); save_item(NAME(m_high) ); save_item(NAME(m_low) ); @@ -128,13 +128,7 @@ void f3853_device::timer_start(UINT8 value) m_timer->adjust(period); } - -TIMER_CALLBACK( f3853_device::f3853_timer_callback ) -{ - reinterpret_cast(ptr)->timer(); -} - -void f3853_device::timer() +TIMER_CALLBACK_MEMBER(f3853_device::timer_callback) { if(m_timer_enable) { diff --git a/src/devices/machine/f3853.h b/src/devices/machine/f3853.h index 82e9610c174..b080b982fc2 100644 --- a/src/devices/machine/f3853.h +++ b/src/devices/machine/f3853.h @@ -72,20 +72,17 @@ public: void set_external_interrupt_in_line(int level); void set_priority_in_line(int level); + TIMER_CALLBACK_MEMBER(timer_callback); protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; virtual void device_post_load() override { } virtual void device_clock_changed() override { } - - static TIMER_CALLBACK( f3853_timer_callback ); - private: void set_interrupt_request_line(); void timer_start(UINT8 value); - void timer(); f3853_interrupt_req_delegate m_interrupt_req_cb; UINT8 m_high; diff --git a/src/devices/machine/k056230.cpp b/src/devices/machine/k056230.cpp index 8d750b66a8a..f641b799147 100644 --- a/src/devices/machine/k056230.cpp +++ b/src/devices/machine/k056230.cpp @@ -54,12 +54,7 @@ READ8_MEMBER(k056230_device::read) return 0; } -TIMER_CALLBACK( k056230_device::network_irq_clear_callback ) -{ - reinterpret_cast(ptr)->network_irq_clear(); -} - -void k056230_device::network_irq_clear() +TIMER_CALLBACK_MEMBER(k056230_device::network_irq_clear) { if (m_cpu) m_cpu->set_input_line(INPUT_LINE_IRQ2, CLEAR_LINE); @@ -84,7 +79,7 @@ WRITE8_MEMBER(k056230_device::write) if (m_cpu) m_cpu->set_input_line(INPUT_LINE_IRQ2, ASSERT_LINE); - machine().scheduler().timer_set(attotime::from_usec(10), FUNC(network_irq_clear_callback), 0, (void*)this); + machine().scheduler().timer_set(attotime::from_usec(10), timer_expired_delegate(FUNC(k056230_device::network_irq_clear), this)); } } // else diff --git a/src/devices/machine/k056230.h b/src/devices/machine/k056230.h index 5695261f4c2..4fa8d165fd1 100644 --- a/src/devices/machine/k056230.h +++ b/src/devices/machine/k056230.h @@ -47,7 +47,7 @@ public: DECLARE_READ8_MEMBER(read); DECLARE_WRITE8_MEMBER(write); - static TIMER_CALLBACK( network_irq_clear_callback ); + TIMER_CALLBACK_MEMBER(network_irq_clear); protected: // device-level overrides @@ -58,7 +58,6 @@ protected: private: - void network_irq_clear(); int m_is_thunderh; required_device m_cpu; diff --git a/src/devices/machine/rtc65271.cpp b/src/devices/machine/rtc65271.cpp index 074b8d87f48..0c02e4fb176 100644 --- a/src/devices/machine/rtc65271.cpp +++ b/src/devices/machine/rtc65271.cpp @@ -463,31 +463,11 @@ void rtc65271_device::field_interrupts() } -/* - Timer handlers -*/ -TIMER_CALLBACK( rtc65271_device::rtc_SQW_callback ) -{ - rtc65271_device *rtc = reinterpret_cast(ptr); - rtc->rtc_SQW_cb(); -} - -TIMER_CALLBACK( rtc65271_device::rtc_begin_update_callback ) -{ - rtc65271_device *rtc = reinterpret_cast(ptr); - rtc->rtc_begin_update_cb(); -} - -TIMER_CALLBACK( rtc65271_device::rtc_end_update_callback ) -{ - rtc65271_device *rtc = reinterpret_cast(ptr); - rtc->rtc_end_update_cb(); -} /* Update SQW output state each half-period and assert periodic interrupt each period. */ -void rtc65271_device::rtc_SQW_cb() +TIMER_CALLBACK_MEMBER(rtc65271_device::rtc_SQW_cb) { attotime half_period; @@ -506,14 +486,14 @@ void rtc65271_device::rtc_SQW_cb() /* Begin update cycle (called every second) */ -void rtc65271_device::rtc_begin_update_cb() +TIMER_CALLBACK_MEMBER(rtc65271_device::rtc_begin_update_cb) { if (((m_regs[reg_A] & reg_A_DV) == 0x20) && ! (m_regs[reg_B] & reg_B_SET)) { m_regs[reg_A] |= reg_A_UIP; /* schedule end of update cycle */ - machine().scheduler().timer_set(UPDATE_CYCLE_TIME, FUNC(rtc_end_update_callback), 0, (void *)this); + machine().scheduler().timer_set(UPDATE_CYCLE_TIME, timer_expired_delegate(FUNC(rtc65271_device::rtc_end_update_cb), this)); } } @@ -521,7 +501,7 @@ void rtc65271_device::rtc_begin_update_cb() End update cycle (called UPDATE_CYCLE_TIME = 1948us after start of update cycle) */ -void rtc65271_device::rtc_end_update_cb() +TIMER_CALLBACK_MEMBER(rtc65271_device::rtc_end_update_cb) { static const int days_in_month_table[12] = { @@ -684,9 +664,9 @@ rtc65271_device::rtc65271_device(const machine_config &mconfig, const char *tag, //------------------------------------------------- void rtc65271_device::device_start() { - m_update_timer = machine().scheduler().timer_alloc(FUNC(rtc_begin_update_callback), (void *)this); + m_update_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(rtc65271_device::rtc_begin_update_cb), this)); m_update_timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1)); - m_SQW_timer = machine().scheduler().timer_alloc(FUNC(rtc_SQW_callback), (void *)this); + m_SQW_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(rtc65271_device::rtc_SQW_cb), this)); m_interrupt_cb.resolve(); save_item(NAME(m_regs)); diff --git a/src/devices/machine/rtc65271.h b/src/devices/machine/rtc65271.h index c5d554e75fd..903f5fe9a28 100644 --- a/src/devices/machine/rtc65271.h +++ b/src/devices/machine/rtc65271.h @@ -43,13 +43,9 @@ private: void write(int xramsel, offs_t offset, UINT8 data); void field_interrupts(); - static TIMER_CALLBACK( rtc_SQW_callback ); - static TIMER_CALLBACK( rtc_begin_update_callback ); - static TIMER_CALLBACK( rtc_end_update_callback ); - - void rtc_SQW_cb(); - void rtc_begin_update_cb(); - void rtc_end_update_cb(); + TIMER_CALLBACK_MEMBER(rtc_SQW_cb); + TIMER_CALLBACK_MEMBER(rtc_begin_update_cb); + TIMER_CALLBACK_MEMBER(rtc_end_update_cb); /* 64 8-bit registers (10 clock registers, 4 control/status registers, and 50 bytes of user RAM) */ UINT8 m_regs[64]; diff --git a/src/devices/machine/rtc9701.cpp b/src/devices/machine/rtc9701.cpp index 7c92ddc53e7..fc72c76c900 100644 --- a/src/devices/machine/rtc9701.cpp +++ b/src/devices/machine/rtc9701.cpp @@ -41,7 +41,7 @@ rtc9701_device::rtc9701_device(const machine_config &mconfig, const char *tag, d { } -void rtc9701_device::timer_callback() +TIMER_CALLBACK_MEMBER(rtc9701_device::timer_callback) { static const UINT8 dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 }; int dpm_count; @@ -72,11 +72,6 @@ void rtc9701_device::timer_callback() if((m_rtc.year & 0xf0) >= 0xa0) { m_rtc.year = 0; } //2000-2099 possible timeframe } -TIMER_CALLBACK( rtc9701_device::rtc_inc_callback ) -{ - reinterpret_cast(ptr)->timer_callback(); -} - //------------------------------------------------- // device_validity_check - perform validity checks // on this device @@ -93,7 +88,7 @@ void rtc9701_device::device_validity_check(validity_checker &valid) const void rtc9701_device::device_start() { /* let's call the timer callback every second */ - machine().scheduler().timer_pulse(attotime::from_hz(clock() / XTAL_32_768kHz), FUNC(rtc_inc_callback), 0, (void *)this); + machine().scheduler().timer_pulse(attotime::from_hz(clock() / XTAL_32_768kHz), timer_expired_delegate(FUNC(rtc9701_device::timer_callback), this)); system_time systime; machine().base_datetime(systime); diff --git a/src/devices/machine/rtc9701.h b/src/devices/machine/rtc9701.h index 14407f157ec..c294cb5d9f1 100644 --- a/src/devices/machine/rtc9701.h +++ b/src/devices/machine/rtc9701.h @@ -59,7 +59,7 @@ public: DECLARE_READ_LINE_MEMBER( read_bit ); DECLARE_WRITE_LINE_MEMBER( set_cs_line ); DECLARE_WRITE_LINE_MEMBER( set_clock_line ); - void timer_callback(); + TIMER_CALLBACK_MEMBER(timer_callback); protected: // device-level overrides @@ -74,8 +74,6 @@ protected: inline UINT8 rtc_read(UINT8 offset); inline void rtc_write(UINT8 offset,UINT8 data); - static TIMER_CALLBACK( rtc_inc_callback ); - int m_latch; int m_reset_line; int m_clock_line; diff --git a/src/devices/machine/s3520cf.cpp b/src/devices/machine/s3520cf.cpp index d37a6b2a542..e504e5b9022 100644 --- a/src/devices/machine/s3520cf.cpp +++ b/src/devices/machine/s3520cf.cpp @@ -40,7 +40,7 @@ s3520cf_device::s3520cf_device(const machine_config &mconfig, const char *tag, d { } -void s3520cf_device::timer_callback() +TIMER_CALLBACK_MEMBER(s3520cf_device::timer_callback) { static const UINT8 dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 }; int dpm_count; @@ -71,10 +71,6 @@ void s3520cf_device::timer_callback() if((m_rtc.year & 0xf0) >= 0xa0) { m_rtc.year = 0; } //1901-2000 possible timeframe } -TIMER_CALLBACK( s3520cf_device::rtc_inc_callback ) -{ - reinterpret_cast(ptr)->timer_callback(); -} //------------------------------------------------- // device_validity_check - perform validity checks @@ -93,7 +89,7 @@ void s3520cf_device::device_validity_check(validity_checker &valid) const void s3520cf_device::device_start() { /* let's call the timer callback every second for now */ - machine().scheduler().timer_pulse(attotime::from_hz(clock() / XTAL_32_768kHz), FUNC(rtc_inc_callback), 0, (void *)this); + machine().scheduler().timer_pulse(attotime::from_hz(clock() / XTAL_32_768kHz), timer_expired_delegate(FUNC(s3520cf_device::timer_callback), this)); system_time systime; machine().base_datetime(systime); diff --git a/src/devices/machine/s3520cf.h b/src/devices/machine/s3520cf.h index c277c69142a..b2b3fa452a6 100644 --- a/src/devices/machine/s3520cf.h +++ b/src/devices/machine/s3520cf.h @@ -50,7 +50,7 @@ public: DECLARE_WRITE_LINE_MEMBER( set_cs_line ); DECLARE_WRITE_LINE_MEMBER( set_clock_line ); DECLARE_WRITE_LINE_MEMBER( write_bit ); - void timer_callback(); + TIMER_CALLBACK_MEMBER(timer_callback); protected: // device-level overrides @@ -60,8 +60,6 @@ protected: inline UINT8 rtc_read(UINT8 offset); inline void rtc_write(UINT8 offset,UINT8 data); - static TIMER_CALLBACK( rtc_inc_callback ); - int m_dir; int m_latch; int m_reset_line; diff --git a/src/devices/machine/v3021.cpp b/src/devices/machine/v3021.cpp index ab0057d9951..d7caf681c70 100644 --- a/src/devices/machine/v3021.cpp +++ b/src/devices/machine/v3021.cpp @@ -38,7 +38,7 @@ v3021_device::v3021_device(const machine_config &mconfig, const char *tag, devic { } -void v3021_device::timer_callback() +TIMER_CALLBACK_MEMBER(v3021_device::timer_callback) { static const UINT8 dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 }; int dpm_count; @@ -69,11 +69,6 @@ void v3021_device::timer_callback() if((m_rtc.year & 0xf0) >= 0xa0) { m_rtc.year = 0; } //2000-2099 possible timeframe } -TIMER_CALLBACK( v3021_device::rtc_inc_callback ) -{ - reinterpret_cast(ptr)->timer_callback(); -} - //------------------------------------------------- // device_validity_check - perform validity checks // on this device @@ -90,7 +85,7 @@ void v3021_device::device_validity_check(validity_checker &valid) const void v3021_device::device_start() { /* let's call the timer callback every second */ - machine().scheduler().timer_pulse(attotime::from_hz(clock() / XTAL_32_768kHz), FUNC(rtc_inc_callback), 0, (void *)this); + machine().scheduler().timer_pulse(attotime::from_hz(clock() / XTAL_32_768kHz), timer_expired_delegate(FUNC(v3021_device::timer_callback),this)); system_time systime; machine().base_datetime(systime); diff --git a/src/devices/machine/v3021.h b/src/devices/machine/v3021.h index 7e4844216c4..ed13501e949 100644 --- a/src/devices/machine/v3021.h +++ b/src/devices/machine/v3021.h @@ -45,7 +45,7 @@ public: // I/O operations DECLARE_WRITE8_MEMBER( write ); DECLARE_READ8_MEMBER( read ); - void timer_callback(); + TIMER_CALLBACK_MEMBER(timer_callback); protected: // device-level overrides @@ -53,8 +53,6 @@ protected: virtual void device_start() override; virtual void device_reset() override; - static TIMER_CALLBACK( rtc_inc_callback ); - UINT8 m_cal_mask,m_cal_com,m_cal_cnt,m_cal_val; rtc_regs_t m_rtc; diff --git a/src/devices/machine/z80ctc.cpp b/src/devices/machine/z80ctc.cpp index 276254d96f1..a6cb090e30b 100644 --- a/src/devices/machine/z80ctc.cpp +++ b/src/devices/machine/z80ctc.cpp @@ -303,7 +303,7 @@ void z80ctc_device::ctc_channel::start(z80ctc_device *device, int index) // initialize state m_device = device; m_index = index; - m_timer = m_device->machine().scheduler().timer_alloc(FUNC(static_timer_callback), this); + m_timer = m_device->machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(z80ctc_device::ctc_channel::timer_callback), this)); // register for save states m_device->save_item(NAME(m_mode), m_index); @@ -478,7 +478,7 @@ void z80ctc_device::ctc_channel::trigger(UINT8 data) { // if we hit zero, do the same thing as for a timer interrupt if (--m_down == 0) - timer_callback(); + timer_callback(nullptr,0); } } } @@ -490,7 +490,7 @@ void z80ctc_device::ctc_channel::trigger(UINT8 data) // side-effects //------------------------------------------------- -void z80ctc_device::ctc_channel::timer_callback() +TIMER_CALLBACK_MEMBER(z80ctc_device::ctc_channel::timer_callback) { // down counter has reached zero - see if we should interrupt if ((m_mode & INTERRUPT) == INTERRUPT_ON) diff --git a/src/devices/machine/z80ctc.h b/src/devices/machine/z80ctc.h index 2c3002e1166..a144ff013d4 100644 --- a/src/devices/machine/z80ctc.h +++ b/src/devices/machine/z80ctc.h @@ -103,7 +103,7 @@ private: attotime period() const; void trigger(UINT8 data); - void timer_callback(); + TIMER_CALLBACK_MEMBER(timer_callback); z80ctc_device * m_device; // pointer back to our device int m_index; // our channel index @@ -113,9 +113,6 @@ private: UINT8 m_extclk; // current signal from the external clock emu_timer * m_timer; // array of active timers UINT8 m_int_state; // interrupt status (for daisy chain) - - private: - static TIMER_CALLBACK( static_timer_callback ) { reinterpret_cast(ptr)->timer_callback(); } }; // internal state diff --git a/src/devices/machine/z80dma.cpp b/src/devices/machine/z80dma.cpp index c1f3162bebd..bf5c4585234 100644 --- a/src/devices/machine/z80dma.cpp +++ b/src/devices/machine/z80dma.cpp @@ -176,7 +176,7 @@ void z80dma_device::device_start() m_out_iorq_cb.resolve_safe(); // allocate timer - m_timer = machine().scheduler().timer_alloc(FUNC(static_timerproc), (void *)this); + m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(z80dma_device::timerproc), this)); // register for state saving save_item(NAME(m_regs)); @@ -488,7 +488,7 @@ int z80dma_device::do_write() // timerproc //------------------------------------------------- -void z80dma_device::timerproc() +TIMER_CALLBACK_MEMBER(z80dma_device::timerproc) { int done; @@ -837,10 +837,10 @@ void z80dma_device::write(UINT8 data) // rdy_write_callback - deferred RDY signal write //------------------------------------------------- -void z80dma_device::rdy_write_callback(int state) +TIMER_CALLBACK_MEMBER(z80dma_device::rdy_write_callback) { // normalize state - m_rdy = state; + m_rdy = param; m_status = (m_status & 0xFD) | (!is_ready() << 1); update_status(); @@ -859,7 +859,7 @@ void z80dma_device::rdy_write_callback(int state) WRITE_LINE_MEMBER(z80dma_device::rdy_w) { if (LOG) logerror("Z80DMA '%s' RDY: %d Active High: %d\n", tag(), state, READY_ACTIVE_HIGH); - machine().scheduler().synchronize(FUNC(static_rdy_write_callback), state, (void *)this); + machine().scheduler().synchronize(timer_expired_delegate(FUNC(z80dma_device::rdy_write_callback),this), state); } diff --git a/src/devices/machine/z80dma.h b/src/devices/machine/z80dma.h index fc1c3c1175c..0b1916c5d5f 100644 --- a/src/devices/machine/z80dma.h +++ b/src/devices/machine/z80dma.h @@ -111,13 +111,11 @@ private: void do_transfer_write(); void do_search(); - static TIMER_CALLBACK( static_timerproc ) { reinterpret_cast(ptr)->timerproc(); } - void timerproc(); + TIMER_CALLBACK_MEMBER(timerproc); void update_status(); - static TIMER_CALLBACK( static_rdy_write_callback ) { reinterpret_cast(ptr)->rdy_write_callback(param); } - void rdy_write_callback(int state); + TIMER_CALLBACK_MEMBER(rdy_write_callback); // internal state devcb_write_line m_out_busreq_cb; diff --git a/src/devices/video/315_5313.cpp b/src/devices/video/315_5313.cpp index 22b63f36d5b..f82e63f60b6 100644 --- a/src/devices/video/315_5313.cpp +++ b/src/devices/video/315_5313.cpp @@ -56,38 +56,18 @@ machine_config_constructor sega315_5313_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( sega_genesis_vdp ); } -static TIMER_CALLBACK( render_timer_callback ) -{ - sega315_5313_device* vdp = (sega315_5313_device*)ptr; - vdp->render_scanline(); -} - -void sega315_5313_device::vdp_handle_irq6_on_timer_callback(int param) +TIMER_CALLBACK_MEMBER(sega315_5313_device::irq6_on_timer_callback) { // m_irq6_pending = 1; if (MEGADRIVE_REG01_IRQ6_ENABLE) m_lv6irqline_callback(true); } -static TIMER_CALLBACK( irq6_on_timer_callback ) -{ - sega315_5313_device* vdp = (sega315_5313_device*)ptr; - vdp->vdp_handle_irq6_on_timer_callback(param); -} - -void sega315_5313_device::vdp_handle_irq4_on_timer_callback(int param) +TIMER_CALLBACK_MEMBER(sega315_5313_device::irq4_on_timer_callback) { m_lv4irqline_callback(true); } -static TIMER_CALLBACK( irq4_on_timer_callback ) -{ - sega315_5313_device* vdp = (sega315_5313_device*)ptr; - vdp->vdp_handle_irq4_on_timer_callback(param); -} - - - void sega315_5313_device::set_alt_timing(device_t &device, int use_alt_timing) { sega315_5313_device &dev = downcast(device); @@ -189,9 +169,9 @@ void sega315_5313_device::device_start() if (m_use_alt_timing) save_pointer(NAME(m_render_line.get()), 320/2); - m_irq6_on_timer = machine().scheduler().timer_alloc(FUNC(irq6_on_timer_callback), (void*)this); - m_irq4_on_timer = machine().scheduler().timer_alloc(FUNC(irq4_on_timer_callback), (void*)this); - m_render_timer = machine().scheduler().timer_alloc(FUNC(render_timer_callback), (void*)this); + m_irq6_on_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sega315_5313_device::irq6_on_timer_callback), this)); + m_irq4_on_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sega315_5313_device::irq4_on_timer_callback), this)); + m_render_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sega315_5313_device::render_scanline), this)); m_space68k = &machine().device(":maincpu")->space(); m_cpu68k = machine().device(":maincpu"); @@ -2598,7 +2578,7 @@ void sega315_5313_device::render_videobuffer_to_screenbuffer(int scanline) } } -void sega315_5313_device::render_scanline() +TIMER_CALLBACK_MEMBER(sega315_5313_device::render_scanline) { int scanline = get_scanline_counter(); diff --git a/src/devices/video/315_5313.h b/src/devices/video/315_5313.h index d7ca05ee2e6..dc897265009 100644 --- a/src/devices/video/315_5313.h +++ b/src/devices/video/315_5313.h @@ -214,10 +214,10 @@ public: int get_scanline_counter(); - void render_scanline(); + TIMER_CALLBACK_MEMBER(render_scanline); void vdp_handle_scanline_callback(int scanline); - void vdp_handle_irq6_on_timer_callback(int param); - void vdp_handle_irq4_on_timer_callback(int param); + TIMER_CALLBACK_MEMBER(irq6_on_timer_callback); + TIMER_CALLBACK_MEMBER(irq4_on_timer_callback); void vdp_handle_eof(); void device_reset_old(); void vdp_clear_irq6_pending(void) { m_irq6_pending = 0; }; diff --git a/src/emu/diexec.cpp b/src/emu/diexec.cpp index ac72ce768d7..02684095b04 100644 --- a/src/emu/diexec.cpp +++ b/src/emu/diexec.cpp @@ -272,7 +272,7 @@ void device_execute_interface::spin_until_time(const attotime &duration) suspend_until_trigger(TRIGGER_SUSPENDTIME + timetrig, true); // then set a timer for it - m_scheduler->timer_set(duration, FUNC(static_timed_trigger_callback), TRIGGER_SUSPENDTIME + timetrig, this); + m_scheduler->timer_set(duration, timer_expired_delegate(FUNC(device_execute_interface::timed_trigger_callback),this), TRIGGER_SUSPENDTIME + timetrig, this); timetrig = (timetrig + 1) % 256; } @@ -484,7 +484,7 @@ void device_execute_interface::interface_pre_start() // allocate timers if we need them if (m_timed_interrupt_period != attotime::zero) - m_timedint_timer = m_scheduler->timer_alloc(FUNC(static_trigger_periodic_interrupt), (void *)this); + m_timedint_timer = m_scheduler->timer_alloc(timer_expired_delegate(FUNC(device_execute_interface::trigger_periodic_interrupt), this)); } @@ -653,10 +653,9 @@ attoseconds_t device_execute_interface::minimum_quantum() const // trigger //------------------------------------------------- -TIMER_CALLBACK( device_execute_interface::static_timed_trigger_callback ) +TIMER_CALLBACK_MEMBER( device_execute_interface::timed_trigger_callback ) { - device_execute_interface *device = reinterpret_cast(ptr); - device->trigger(param); + trigger(param); } @@ -681,16 +680,11 @@ void device_execute_interface::on_vblank(screen_device &screen, bool vblank_stat //------------------------------------------------- -// static_trigger_periodic_interrupt - timer +// trigger_periodic_interrupt - timer // callback for timed interrupts //------------------------------------------------- -TIMER_CALLBACK( device_execute_interface::static_trigger_periodic_interrupt ) -{ - reinterpret_cast(ptr)->trigger_periodic_interrupt(); -} - -void device_execute_interface::trigger_periodic_interrupt() +TIMER_CALLBACK_MEMBER(device_execute_interface::trigger_periodic_interrupt) { // bail if there is no routine if (!suspended(SUSPEND_REASON_HALT | SUSPEND_REASON_RESET | SUSPEND_REASON_DISABLE | SUSPEND_REASON_CLOCK)) @@ -781,7 +775,7 @@ if (TEMPLOG) printf("setline(%s,%d,%d,%d)\n", m_execute->device().tag(), m_linen if (event_index >= ARRAY_LENGTH(m_queue)) { m_qindex--; - empty_event_queue(); + empty_event_queue(nullptr,0); event_index = m_qindex++; m_execute->device().logerror("Exceeded pending input line event queue on device '%s'!\n", m_execute->device().tag()); } @@ -795,7 +789,7 @@ if (TEMPLOG) printf("setline(%s,%d,%d,%d)\n", m_execute->device().tag(), m_linen // if this is the first one, set the timer if (event_index == 0) - m_execute->scheduler().synchronize(FUNC(static_empty_event_queue), 0, (void *)this); + m_execute->scheduler().synchronize(timer_expired_delegate(FUNC(device_execute_interface::device_input::empty_event_queue),this), 0, this); } } @@ -804,12 +798,7 @@ if (TEMPLOG) printf("setline(%s,%d,%d,%d)\n", m_execute->device().tag(), m_linen // empty_event_queue - empty our event queue //------------------------------------------------- -TIMER_CALLBACK( device_execute_interface::device_input::static_empty_event_queue ) -{ - reinterpret_cast(ptr)->empty_event_queue(); -} - -void device_execute_interface::device_input::empty_event_queue() +TIMER_CALLBACK_MEMBER(device_execute_interface::device_input::empty_event_queue) { if (TEMPLOG) printf("empty_queue(%s,%d,%d)\n", m_execute->device().tag(), m_linenum, m_qindex); // loop over all events diff --git a/src/emu/diexec.h b/src/emu/diexec.h index 3a5cc0405f9..4fd379b5dae 100644 --- a/src/emu/diexec.h +++ b/src/emu/diexec.h @@ -71,12 +71,13 @@ enum // MACROS //************************************************************************** +#define TIMER_CALLBACK(name) void name(running_machine &machine, void *ptr, int param) +#define TIMER_CALLBACK_MEMBER(name) void name(void *ptr, INT32 param) + // IRQ callback to be called by device implementations when an IRQ is actually taken -#define IRQ_CALLBACK(func) int func(device_t *device, int irqline) #define IRQ_CALLBACK_MEMBER(func) int func(device_t &device, int irqline) // interrupt generator callback called as a VBLANK or periodic interrupt -#define INTERRUPT_GEN(func) void func(device_t *device) #define INTERRUPT_GEN_MEMBER(func) void func(device_t &device) @@ -246,8 +247,7 @@ protected: int m_qindex; // index within the queue private: - static void static_empty_event_queue(running_machine &machine, void *ptr, int param); - void empty_event_queue(); + TIMER_CALLBACK_MEMBER(empty_event_queue); }; // scheduler @@ -292,12 +292,11 @@ protected: private: // callbacks - static void static_timed_trigger_callback(running_machine &machine, void *ptr, int param); + TIMER_CALLBACK_MEMBER(timed_trigger_callback); void on_vblank(screen_device &screen, bool vblank_state); - static void static_trigger_periodic_interrupt(running_machine &machine, void *ptr, int param); - void trigger_periodic_interrupt(); + TIMER_CALLBACK_MEMBER(trigger_periodic_interrupt); void suspend_resume_changed(); attoseconds_t minimum_quantum() const; diff --git a/src/emu/schedule.h b/src/emu/schedule.h index 2f3a7f8a23a..5ed0c049bdb 100644 --- a/src/emu/schedule.h +++ b/src/emu/schedule.h @@ -33,8 +33,6 @@ #define PERIOD_OF_555_MONOSTABLE(r,c) attotime::from_nsec(PERIOD_OF_555_MONOSTABLE_NSEC(r,c)) #define PERIOD_OF_555_ASTABLE(r1,r2,c) attotime::from_nsec(PERIOD_OF_555_ASTABLE_NSEC(r1,r2,c)) -#define TIMER_CALLBACK(name) void name(running_machine &machine, void *ptr, int param) -#define TIMER_CALLBACK_MEMBER(name) void name(void *ptr, INT32 param) //************************************************************************** // TYPE DEFINITIONS diff --git a/src/emu/tilemap.cpp b/src/emu/tilemap.cpp index 8df29a29e09..807c1b30cf8 100644 --- a/src/emu/tilemap.cpp +++ b/src/emu/tilemap.cpp @@ -558,22 +558,22 @@ void tilemap_t::configure_groups(gfx_element &gfx, int transcolor) // order with optional flipping //------------------------------------------------- -tilemap_memory_index tilemap_t::scan_rows(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) +tilemap_memory_index tilemap_t::scan_rows(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) { return row * num_cols + col; } -tilemap_memory_index tilemap_t::scan_rows_flip_x(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) +tilemap_memory_index tilemap_t::scan_rows_flip_x(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) { return row * num_cols + (num_cols - 1 - col); } -tilemap_memory_index tilemap_t::scan_rows_flip_y(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) +tilemap_memory_index tilemap_t::scan_rows_flip_y(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) { return (num_rows - 1 - row) * num_cols + col; } -tilemap_memory_index tilemap_t::scan_rows_flip_xy(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) +tilemap_memory_index tilemap_t::scan_rows_flip_xy(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) { return (num_rows - 1 - row) * num_cols + (num_cols - 1 - col); } @@ -587,22 +587,22 @@ tilemap_memory_index tilemap_t::scan_rows_flip_xy(driver_device &device, UINT32 // major order with optional flipping //------------------------------------------------- -tilemap_memory_index tilemap_t::scan_cols(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) +tilemap_memory_index tilemap_t::scan_cols(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) { return col * num_rows + row; } -tilemap_memory_index tilemap_t::scan_cols_flip_x(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) +tilemap_memory_index tilemap_t::scan_cols_flip_x(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) { return (num_cols - 1 - col) * num_rows + row; } -tilemap_memory_index tilemap_t::scan_cols_flip_y(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) +tilemap_memory_index tilemap_t::scan_cols_flip_y(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) { return col * num_rows + (num_rows - 1 - row); } -tilemap_memory_index tilemap_t::scan_cols_flip_xy(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) +tilemap_memory_index tilemap_t::scan_cols_flip_xy(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows) { return (num_cols - 1 - col) * num_rows + (num_rows - 1 - row); } @@ -1519,22 +1519,6 @@ tilemap_manager::~tilemap_manager() // tilemaps //------------------------------------------------- -static const struct -{ - tilemap_memory_index (*func)(driver_device &, UINT32, UINT32, UINT32, UINT32); - const char *name; -} s_standard_mappers[TILEMAP_STANDARD_COUNT] = -{ - { FUNC(tilemap_t::scan_rows) }, - { FUNC(tilemap_t::scan_rows_flip_x) }, - { FUNC(tilemap_t::scan_rows_flip_y) }, - { FUNC(tilemap_t::scan_rows_flip_xy) }, - { FUNC(tilemap_t::scan_cols) }, - { FUNC(tilemap_t::scan_cols_flip_x) }, - { FUNC(tilemap_t::scan_cols_flip_y) }, - { FUNC(tilemap_t::scan_cols_flip_xy) } -}; - tilemap_t &tilemap_manager::create(device_gfx_interface &decoder, tilemap_get_info_delegate tile_get_info, tilemap_mapper_delegate mapper, int tilewidth, int tileheight, int cols, int rows, tilemap_t *allocated) { if (allocated == nullptr) @@ -1546,7 +1530,19 @@ tilemap_t &tilemap_manager::create(device_gfx_interface &decoder, tilemap_get_in { if (allocated == nullptr) allocated = global_alloc(tilemap_t); - return m_tilemap_list.append(allocated->init(*this, decoder, tile_get_info, tilemap_mapper_delegate(s_standard_mappers[mapper].func, s_standard_mappers[mapper].name, machine().driver_data()), tilewidth, tileheight, cols, rows)); + + switch (mapper) + { + case TILEMAP_SCAN_ROWS :return m_tilemap_list.append(allocated->init(*this, decoder, tile_get_info, tilemap_mapper_delegate(FUNC(tilemap_t::scan_rows), allocated), tilewidth, tileheight, cols, rows)); + case TILEMAP_SCAN_ROWS_FLIP_X:return m_tilemap_list.append(allocated->init(*this, decoder, tile_get_info, tilemap_mapper_delegate(FUNC(tilemap_t::scan_rows_flip_x), allocated), tilewidth, tileheight, cols, rows)); + case TILEMAP_SCAN_ROWS_FLIP_Y:return m_tilemap_list.append(allocated->init(*this, decoder, tile_get_info, tilemap_mapper_delegate(FUNC(tilemap_t::scan_rows_flip_y), allocated), tilewidth, tileheight, cols, rows)); + case TILEMAP_SCAN_ROWS_FLIP_XY:return m_tilemap_list.append(allocated->init(*this, decoder, tile_get_info, tilemap_mapper_delegate(FUNC(tilemap_t::scan_rows_flip_xy),allocated), tilewidth, tileheight, cols, rows)); + case TILEMAP_SCAN_COLS:return m_tilemap_list.append(allocated->init(*this, decoder, tile_get_info, tilemap_mapper_delegate(FUNC(tilemap_t::scan_cols),allocated), tilewidth, tileheight, cols, rows)); + case TILEMAP_SCAN_COLS_FLIP_X:return m_tilemap_list.append(allocated->init(*this, decoder, tile_get_info, tilemap_mapper_delegate(FUNC(tilemap_t::scan_cols_flip_x),allocated), tilewidth, tileheight, cols, rows)); + case TILEMAP_SCAN_COLS_FLIP_Y:return m_tilemap_list.append(allocated->init(*this, decoder, tile_get_info, tilemap_mapper_delegate(FUNC(tilemap_t::scan_cols_flip_y),allocated), tilewidth, tileheight, cols, rows)); + case TILEMAP_SCAN_COLS_FLIP_XY:return m_tilemap_list.append(allocated->init(*this, decoder, tile_get_info, tilemap_mapper_delegate(FUNC(tilemap_t::scan_cols_flip_xy),allocated), tilewidth, tileheight, cols, rows)); + default: throw emu_fatalerror("Tilemap manager create unknown mapper %d", mapper); + } } diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h index 0f7dcf93c1b..6e4308d6052 100644 --- a/src/emu/tilemap.h +++ b/src/emu/tilemap.h @@ -550,16 +550,16 @@ public: // mappers // scan in row-major order with optional flipping - static tilemap_memory_index scan_rows(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); - static tilemap_memory_index scan_rows_flip_x(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); - static tilemap_memory_index scan_rows_flip_y(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); - static tilemap_memory_index scan_rows_flip_xy(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); + tilemap_memory_index scan_rows(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); + tilemap_memory_index scan_rows_flip_x(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); + tilemap_memory_index scan_rows_flip_y(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); + tilemap_memory_index scan_rows_flip_xy(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); // scan in column-major order with optional flipping - static tilemap_memory_index scan_cols(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); - static tilemap_memory_index scan_cols_flip_x(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); - static tilemap_memory_index scan_cols_flip_y(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); - static tilemap_memory_index scan_cols_flip_xy(driver_device &device, UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); + tilemap_memory_index scan_cols(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); + tilemap_memory_index scan_cols_flip_x(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); + tilemap_memory_index scan_cols_flip_y(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); + tilemap_memory_index scan_cols_flip_xy(UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows); // optional memory accessors UINT32 basemem_read(int index) { return m_basemem.read(index); } diff --git a/src/mame/includes/kaypro.h b/src/mame/includes/kaypro.h index f2b5cc3df29..1560c96f9d8 100644 --- a/src/mame/includes/kaypro.h +++ b/src/mame/includes/kaypro.h @@ -79,6 +79,11 @@ public: kay_kbd_t *m_kbd; int m_centronics_busy; required_device m_palette; + void kay_kbd_in(UINT8 data ); + UINT8 kay_kbd_c_r(); + UINT8 kay_kbd_d_r(); + TIMER_CALLBACK_MEMBER( kay_kbd_beepoff ); + void kay_kbd_d_w( UINT8 data ); private: bool m_is_motor_off; @@ -102,11 +107,4 @@ private: required_device m_beep; }; - -/*----------- defined in machine/kay_kbd.c -----------*/ - -UINT8 kay_kbd_c_r( running_machine &machine ); -UINT8 kay_kbd_d_r( running_machine &machine ); -void kay_kbd_d_w( running_machine &machine, UINT8 data ); - INPUT_PORTS_EXTERN( kay_kbd ); diff --git a/src/mame/includes/mac.h b/src/mame/includes/mac.h index 8b093993abc..c8d2e16d05b 100644 --- a/src/mame/includes/mac.h +++ b/src/mame/includes/mac.h @@ -520,6 +520,8 @@ public: TIMER_CALLBACK_MEMBER(mac_scanline_tick); TIMER_CALLBACK_MEMBER(dafb_vbl_tick); TIMER_CALLBACK_MEMBER(dafb_cursor_tick); + TIMER_CALLBACK_MEMBER(mac_adb_tick); // macadb.c + TIMER_CALLBACK_MEMBER(mac_pmu_tick); // macadb.c DECLARE_WRITE_LINE_MEMBER(mac_via_out_cb2); DECLARE_WRITE_LINE_MEMBER(mac_adb_via_out_cb2); DECLARE_READ8_MEMBER(mac_via_in_a); diff --git a/src/mame/machine/apollo_kbd.cpp b/src/mame/machine/apollo_kbd.cpp index fbfbe18b94a..a88204a3071 100644 --- a/src/mame/machine/apollo_kbd.cpp +++ b/src/mame/machine/apollo_kbd.cpp @@ -174,7 +174,7 @@ void apollo_kbd_device::beeper::start(apollo_kbd_device *device) m_device = device; LOG2(("start apollo_kbd::beeper")); m_beeper = m_device->machine().device("beep"); - m_timer = m_device->machine().scheduler().timer_alloc(FUNC(static_beeper_callback), this); + m_timer = m_device->machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(apollo_kbd_device::beeper::beeper_callback), this)); } void apollo_kbd_device::beeper::reset() @@ -202,16 +202,11 @@ int apollo_kbd_device::beeper::keyboard_has_beeper() return true; // driver has no facility to return false here, so go with it } -void apollo_kbd_device::beeper::beeper_callback() +TIMER_CALLBACK_MEMBER(apollo_kbd_device::beeper::beeper_callback) { off(); } -TIMER_CALLBACK( apollo_kbd_device::beeper::static_beeper_callback ) -{ - reinterpret_cast(ptr)->beeper_callback(); -} - //************************************************************************** // Mouse //************************************************************************** diff --git a/src/mame/machine/apollo_kbd.h b/src/mame/machine/apollo_kbd.h index 4b5cc91a9af..c593af06c85 100644 --- a/src/mame/machine/apollo_kbd.h +++ b/src/mame/machine/apollo_kbd.h @@ -93,8 +93,7 @@ private: void on(); private: int keyboard_has_beeper(); - void beeper_callback(); - static TIMER_CALLBACK( static_beeper_callback ); + TIMER_CALLBACK_MEMBER(beeper_callback); apollo_kbd_device *m_device; // pointer back to our device beep_device *m_beeper; // the keyboard beeper device diff --git a/src/mame/machine/kay_kbd.cpp b/src/mame/machine/kay_kbd.cpp index 736d39d5fd8..617d7636365 100644 --- a/src/mame/machine/kay_kbd.cpp +++ b/src/mame/machine/kay_kbd.cpp @@ -181,8 +181,6 @@ INPUT_PORTS_START( kay_kbd ) PORT_BIT(0xf0, 0x00, IPT_UNUSED) INPUT_PORTS_END -static void kay_kbd_in( running_machine &machine, UINT8 data ); - static const UINT8 keyboard[8][10][8] = { { /* normal */ { 27,'1','2','3','4','5','6','7'}, @@ -376,11 +374,11 @@ INTERRUPT_GEN_MEMBER(kaypro_state::kay_kbd_interrupt) if( kbd->key ) /* normal key */ { kbd->repeater = 30; - kay_kbd_in(machine(), kbd->key); + kay_kbd_in(kbd->key); } else if( (row == 0) && (chg == 0x04) ) /* Ctrl-@ (NUL) */ - kay_kbd_in(machine(), 0); + kay_kbd_in(0); keyrows[row] |= newval; } else @@ -391,7 +389,7 @@ INTERRUPT_GEN_MEMBER(kaypro_state::kay_kbd_interrupt) } else if ( kbd->key && (keyrows[kbd->lastrow] & kbd->mask) && kbd->repeat == 0 ) { - kay_kbd_in(machine(), kbd->key); + kay_kbd_in(kbd->key); } } @@ -415,10 +413,9 @@ static WRITE8_HANDLER ( kaypro2_const_w ) * releases CPU if it was waiting for a key * sounds bell if buffer would overflow ******************************************************/ -static void kay_kbd_in( running_machine &machine, UINT8 data ) +void kaypro_state::kay_kbd_in(UINT8 data ) { - kaypro_state *state = machine.driver_data(); - kay_kbd_t *kbd = state->m_kbd; + kay_kbd_t *kbd = m_kbd; UINT8 kbd_head_old; kbd_head_old = kbd->head; @@ -428,21 +425,20 @@ static void kay_kbd_in( running_machine &machine, UINT8 data ) if (kbd->head == kbd->tail) { kbd->head = kbd_head_old; - kay_kbd_d_w(machine, 4); + kay_kbd_d_w(4); } else - kay_kbd_d_w(machine, 1); + kay_kbd_d_w(1); } -UINT8 kay_kbd_c_r( running_machine &machine ) +UINT8 kaypro_state::kay_kbd_c_r() { /* d4 transmit buffer empty - 1=ok to send d2 appears to be receive buffer empty - 1=ok to receive d0 keyboard buffer empty - 1=key waiting to be used */ - kaypro_state *state = machine.driver_data(); - kay_kbd_t *kbd = state->m_kbd; + kay_kbd_t *kbd = m_kbd; UINT8 data = kbd->control_status; if( kbd->head != kbd->tail ) @@ -451,12 +447,11 @@ UINT8 kay_kbd_c_r( running_machine &machine ) return data; } -UINT8 kay_kbd_d_r( running_machine &machine ) +UINT8 kaypro_state::kay_kbd_d_r() { /* return next key in buffer */ - kaypro_state *state = machine.driver_data(); - kay_kbd_t *kbd = state->m_kbd; + kay_kbd_t *kbd = m_kbd; UINT8 data = 0; if (kbd->tail != kbd->head) @@ -468,15 +463,14 @@ UINT8 kay_kbd_d_r( running_machine &machine ) return data; } -static TIMER_CALLBACK( kay_kbd_beepoff ) +TIMER_CALLBACK_MEMBER( kaypro_state::kay_kbd_beepoff ) { - kaypro_state *state = machine.driver_data(); - kay_kbd_t *kbd = state->m_kbd; + kay_kbd_t *kbd = m_kbd; kbd->beeper->set_state(0); kbd->control_status |= 4; } -void kay_kbd_d_w( running_machine &machine, UINT8 data ) +void kaypro_state::kay_kbd_d_w( UINT8 data ) { /* Beeper control - lengths need verifying 01 - keyclick @@ -485,8 +479,7 @@ void kay_kbd_d_w( running_machine &machine, UINT8 data ) 08 - mute 16 - unmute */ - kaypro_state *state = machine.driver_data(); - kay_kbd_t *kbd = state->m_kbd; + kay_kbd_t *kbd = m_kbd; UINT16 length = 0; if (data & 0x10) @@ -509,7 +502,7 @@ void kay_kbd_d_w( running_machine &machine, UINT8 data ) if (length) { kbd->control_status &= 0xfb; - machine.scheduler().timer_set(attotime::from_msec(length), FUNC(kay_kbd_beepoff)); + machine().scheduler().timer_set(attotime::from_msec(length), timer_expired_delegate(FUNC(kaypro_state::kay_kbd_beepoff),this)); kbd->beeper->set_state(1); } } diff --git a/src/mame/machine/kaypro.cpp b/src/mame/machine/kaypro.cpp index 2339e770307..8c914d01750 100644 --- a/src/mame/machine/kaypro.cpp +++ b/src/mame/machine/kaypro.cpp @@ -165,10 +165,10 @@ WRITE8_MEMBER( kaypro_state::kaypro2x_system_port_w ) READ8_MEMBER(kaypro_state::kaypro_sio_r) { if (offset == 1) - return kay_kbd_d_r(machine()); + return kay_kbd_d_r(); else if (offset == 3) - return kay_kbd_c_r(machine()); + return kay_kbd_c_r(); else return m_sio->cd_ba_r(space, offset); } @@ -176,7 +176,7 @@ READ8_MEMBER(kaypro_state::kaypro_sio_r) WRITE8_MEMBER(kaypro_state::kaypro_sio_w) { if (offset == 1) - kay_kbd_d_w(machine(), data); + kay_kbd_d_w(data); else m_sio->cd_ba_w(space, offset, data); } diff --git a/src/mame/machine/mac.cpp b/src/mame/machine/mac.cpp index e62ecd96cc9..bbc0ded1b14 100644 --- a/src/mame/machine/mac.cpp +++ b/src/mame/machine/mac.cpp @@ -118,9 +118,6 @@ #define LOG_MEMORY 0 #endif -extern TIMER_CALLBACK(mac_adb_tick); // macadb.c -extern TIMER_CALLBACK(mac_pmu_tick); // macadb.c - static offs_t mac_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options); // returns non-zero if this Mac has ADB @@ -1837,13 +1834,13 @@ void mac_state::machine_start() { if (has_adb()) { - this->m_adb_timer = machine().scheduler().timer_alloc(FUNC(mac_adb_tick)); + this->m_adb_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mac_state::mac_adb_tick),this)); this->m_adb_timer->adjust(attotime::never); // also allocate PMU timer if (ADB_IS_PM_CLASS) { - m_pmu_send_timer = machine().scheduler().timer_alloc(FUNC(mac_pmu_tick)); + m_pmu_send_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mac_state::mac_pmu_tick),this)); this->m_adb_timer->adjust(attotime::never); m_pmu_int_status = 0; } diff --git a/src/mame/machine/macadb.cpp b/src/mame/machine/macadb.cpp index 76a8a010b57..22f0acabf27 100644 --- a/src/mame/machine/macadb.cpp +++ b/src/mame/machine/macadb.cpp @@ -528,35 +528,33 @@ void mac_state::adb_talk() } } -TIMER_CALLBACK(mac_adb_tick) +TIMER_CALLBACK_MEMBER(mac_state::mac_adb_tick) { - mac_state *mac = machine.driver_data(); - - if ((ADB_IS_EGRET_NONCLASS) || (ADB_IS_CUDA_NONCLASS)) + if ((ADB_IS_EGRET) || (ADB_IS_CUDA)) { - switch (mac->m_adb_linestate) + switch (m_adb_linestate) { case LST_SRQNODATA: - mac->set_adb_line(ASSERT_LINE); - mac->m_adb_linestate = LST_IDLE; + set_adb_line(ASSERT_LINE); + m_adb_linestate = LST_IDLE; break; case LST_TSTOPSTART: - mac->set_adb_line(ASSERT_LINE); - mac->m_adb_timer->adjust(attotime::from_ticks(57, 1000000)); - mac->m_adb_linestate++; + set_adb_line(ASSERT_LINE); + m_adb_timer->adjust(attotime::from_ticks(57, 1000000)); + m_adb_linestate++; break; case LST_TSTOPSTARTa: - mac->set_adb_line(CLEAR_LINE); - mac->m_adb_timer->adjust(attotime::from_ticks(57, 1000000)); - mac->m_adb_linestate++; + set_adb_line(CLEAR_LINE); + m_adb_timer->adjust(attotime::from_ticks(57, 1000000)); + m_adb_linestate++; break; case LST_STARTBIT: - mac->set_adb_line(ASSERT_LINE); - mac->m_adb_timer->adjust(attotime::from_ticks(105, 1000000)); - mac->m_adb_linestate++; + set_adb_line(ASSERT_LINE); + m_adb_timer->adjust(attotime::from_ticks(105, 1000000)); + m_adb_linestate++; break; case LST_SENDBIT0: @@ -567,18 +565,18 @@ TIMER_CALLBACK(mac_adb_tick) case LST_SENDBIT5: case LST_SENDBIT6: case LST_SENDBIT7: - mac->set_adb_line(CLEAR_LINE); - if (mac->m_adb_buffer[mac->m_adb_stream_ptr] & 0x80) + set_adb_line(CLEAR_LINE); + if (m_adb_buffer[m_adb_stream_ptr] & 0x80) { // printf("1 "); - mac->m_adb_timer->adjust(attotime::from_ticks(57, 1000000)); + m_adb_timer->adjust(attotime::from_ticks(57, 1000000)); } else { // printf("0 "); - mac->m_adb_timer->adjust(attotime::from_ticks(105, 1000000)); + m_adb_timer->adjust(attotime::from_ticks(105, 1000000)); } - mac->m_adb_linestate++; + m_adb_linestate++; break; case LST_SENDBIT0a: @@ -588,92 +586,92 @@ TIMER_CALLBACK(mac_adb_tick) case LST_SENDBIT4a: case LST_SENDBIT5a: case LST_SENDBIT6a: - mac->set_adb_line(ASSERT_LINE); - if (mac->m_adb_buffer[mac->m_adb_stream_ptr] & 0x80) + set_adb_line(ASSERT_LINE); + if (m_adb_buffer[m_adb_stream_ptr] & 0x80) { - mac->m_adb_timer->adjust(attotime::from_ticks(105, 1000000)); + m_adb_timer->adjust(attotime::from_ticks(105, 1000000)); } else { - mac->m_adb_timer->adjust(attotime::from_ticks(57, 1000000)); + m_adb_timer->adjust(attotime::from_ticks(57, 1000000)); } - mac->m_adb_buffer[mac->m_adb_stream_ptr] <<= 1; - mac->m_adb_linestate++; + m_adb_buffer[m_adb_stream_ptr] <<= 1; + m_adb_linestate++; break; case LST_SENDBIT7a: - mac->set_adb_line(ASSERT_LINE); - if (mac->m_adb_buffer[mac->m_adb_stream_ptr] & 0x80) + set_adb_line(ASSERT_LINE); + if (m_adb_buffer[m_adb_stream_ptr] & 0x80) { // printf(" "); - mac->m_adb_timer->adjust(attotime::from_ticks(105, 1000000)); + m_adb_timer->adjust(attotime::from_ticks(105, 1000000)); } else { // printf(" "); - mac->m_adb_timer->adjust(attotime::from_ticks(57, 1000000)); + m_adb_timer->adjust(attotime::from_ticks(57, 1000000)); } - mac->m_adb_stream_ptr++; - if (mac->m_adb_stream_ptr == mac->m_adb_datasize) + m_adb_stream_ptr++; + if (m_adb_stream_ptr == m_adb_datasize) { - mac->m_adb_linestate++; + m_adb_linestate++; } else { - mac->m_adb_linestate = LST_SENDBIT0; + m_adb_linestate = LST_SENDBIT0; } break; case LST_SENDSTOP: - mac->set_adb_line(CLEAR_LINE); - mac->m_adb_timer->adjust(attotime::from_ticks((57*2), 1000000)); - mac->m_adb_linestate++; + set_adb_line(CLEAR_LINE); + m_adb_timer->adjust(attotime::from_ticks((57*2), 1000000)); + m_adb_linestate++; break; case LST_SENDSTOPa: - mac->set_adb_line(ASSERT_LINE); - mac->m_adb_timer->adjust(attotime::never); - mac->m_adb_linestate = LST_IDLE; + set_adb_line(ASSERT_LINE); + m_adb_timer->adjust(attotime::never); + m_adb_linestate = LST_IDLE; break; } } else { // do one clock transition on CB1 to advance the VIA shifter - mac->m_adb_extclock ^= 1; - mac->m_via1->write_cb1(mac->m_adb_extclock); + m_adb_extclock ^= 1; + m_via1->write_cb1(m_adb_extclock); - if (mac->m_adb_direction) + if (m_adb_direction) { - mac->m_adb_command <<= 1; + m_adb_command <<= 1; } else { - mac->m_via1->write_cb2((mac->m_adb_send & 0x80)>>7); - mac->m_adb_send <<= 1; + m_via1->write_cb2((m_adb_send & 0x80)>>7); + m_adb_send <<= 1; } - mac->m_adb_extclock ^= 1; - mac->m_via1->write_cb1(mac->m_adb_extclock); + m_adb_extclock ^= 1; + m_via1->write_cb1(m_adb_extclock); - mac->m_adb_timer_ticks--; - if (!mac->m_adb_timer_ticks) + m_adb_timer_ticks--; + if (!m_adb_timer_ticks) { - mac->m_adb_timer->adjust(attotime::never); + m_adb_timer->adjust(attotime::never); - if ((mac->m_adb_direction) && (ADB_IS_BITBANG)) + if ((m_adb_direction) && (ADB_IS_BITBANG_CLASS)) { - mac->adb_talk(); - if((mac->m_adb_last_talk == 2) && mac->m_adb_datasize) { - mac->m_adb_timer_ticks = 8; - mac->m_adb_timer->adjust(attotime(0, ATTOSECONDS_IN_USEC(100))); + adb_talk(); + if((m_adb_last_talk == 2) && m_adb_datasize) { + m_adb_timer_ticks = 8; + m_adb_timer->adjust(attotime(0, ATTOSECONDS_IN_USEC(100))); } } } else { - mac->m_adb_timer->adjust(attotime(0, ATTOSECONDS_IN_USEC(200))); + m_adb_timer->adjust(attotime(0, ATTOSECONDS_IN_USEC(200))); } } } @@ -736,30 +734,28 @@ void mac_state::mac_adb_newaction(int state) } } -TIMER_CALLBACK(mac_pmu_tick) +TIMER_CALLBACK_MEMBER(mac_state::mac_pmu_tick) { - mac_state *mac = machine.driver_data(); - // state 10 means this is in response to an ADB command - if (mac->m_pm_state == 10) + if (m_pm_state == 10) { #if LOG_ADB printf("PM: was state 10, chunk-chunking CB1\n"); #endif - mac->m_pm_state = 0; + m_pm_state = 0; // tick CB1, which should cause a PMU interrupt on PMU machines - mac->m_adb_extclock ^= 1; - mac->m_via1->write_cb1(mac->m_adb_extclock); - mac->m_adb_extclock ^= 1; - mac->m_via1->write_cb1(mac->m_adb_extclock); + m_adb_extclock ^= 1; + m_via1->write_cb1(m_adb_extclock); + m_adb_extclock ^= 1; + m_via1->write_cb1(m_adb_extclock); } else { #if LOG_ADB printf("PM: timer tick, lowering ACK\n"); #endif - mac->m_pm_ack &= ~2; // lower ACK to handshake next step + m_pm_ack &= ~2; // lower ACK to handshake next step } } diff --git a/src/mame/machine/mega32x.cpp b/src/mame/machine/mega32x.cpp index 864e3d00b0b..d4658b3a662 100644 --- a/src/mame/machine/mega32x.cpp +++ b/src/mame/machine/mega32x.cpp @@ -235,9 +235,6 @@ void sega_32x_device::static_set_palette_tag(device_t &device, const char *tag) downcast(device).m_palette.set_tag(tag); } -TIMER_CALLBACK( _32x_pwm_callback ); - - READ16_MEMBER( sega_32x_device::_32x_68k_palette_r ) { @@ -817,7 +814,7 @@ void sega_32x_device::calculate_pwm_timer() } -void sega_32x_device::handle_pwm_callback() +TIMER_CALLBACK_MEMBER(sega_32x_device::handle_pwm_callback) { if(m_lch_index_r < PWM_FIFO_SIZE) { @@ -861,12 +858,6 @@ void sega_32x_device::handle_pwm_callback() m_32x_pwm_timer->adjust(attotime::from_hz((PWM_CLOCK) / (m_pwm_cycle - 1))); } -TIMER_CALLBACK( _32x_pwm_callback ) -{ - sega_32x_device* _32xdev = (sega_32x_device*)ptr; - _32xdev->handle_pwm_callback(); -} - READ16_MEMBER( sega_32x_device::_32x_pwm_r ) { switch(offset) @@ -1832,7 +1823,7 @@ machine_config_constructor sega_32x_pal_device::device_mconfig_additions() const void sega_32x_device::device_start() { - m_32x_pwm_timer = machine().scheduler().timer_alloc(FUNC(_32x_pwm_callback), (void*)this); + m_32x_pwm_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sega_32x_device::handle_pwm_callback), this)); m_32x_pwm_timer->adjust(attotime::never); m_32x_dram0 = std::make_unique(0x40000/2); diff --git a/src/mame/machine/mega32x.h b/src/mame/machine/mega32x.h index f076b0f7a71..80940755726 100644 --- a/src/mame/machine/mega32x.h +++ b/src/mame/machine/mega32x.h @@ -133,7 +133,7 @@ public: int m_32x_240mode; UINT16 m_32x_a1518a_reg; - void handle_pwm_callback(); + TIMER_CALLBACK_MEMBER(handle_pwm_callback); void calculate_pwm_timer(); UINT16 m_pwm_ctrl, m_pwm_cycle, m_pwm_tm_reg; UINT16 m_cur_lch[0x10],m_cur_rch[0x10]; diff --git a/src/mame/machine/rx01.cpp b/src/mame/machine/rx01.cpp index b4cb85869ea..75b4edb0eab 100644 --- a/src/mame/machine/rx01.cpp +++ b/src/mame/machine/rx01.cpp @@ -163,7 +163,7 @@ void rx01_device::command_write(UINT16 data) break; } } - machine().scheduler().timer_set(attotime::from_msec(100), FUNC(command_execution_callback), 0, this); + machine().scheduler().timer_set(attotime::from_msec(100), timer_expired_delegate(FUNC(rx01_device::service_command),this)); } UINT16 rx01_device::status_read() @@ -177,7 +177,7 @@ void rx01_device::data_write(UINT16 data) // printf("data_write %04x\n",data); // data can be written only if TR is set if (BIT(m_rxcs,7)) m_rxdb = data; - machine().scheduler().timer_set(attotime::from_msec(100), FUNC(command_execution_callback), 0, this); + machine().scheduler().timer_set(attotime::from_msec(100), timer_expired_delegate(FUNC(rx01_device::service_command),this)); } UINT16 rx01_device::data_read() @@ -187,7 +187,7 @@ UINT16 rx01_device::data_read() return m_rxdb; } -void rx01_device::service_command() +TIMER_CALLBACK_MEMBER(rx01_device::service_command) { printf("service_command %d\n",m_state); m_rxes |= m_image[m_unit]->floppy_drive_get_flag_state(FLOPPY_DRIVE_READY) << 7; diff --git a/src/mame/machine/rx01.h b/src/mame/machine/rx01.h index ad55511be41..386a7d983fd 100644 --- a/src/mame/machine/rx01.h +++ b/src/mame/machine/rx01.h @@ -48,8 +48,7 @@ protected: void data_write(UINT16 data); UINT16 data_read(); - void service_command(); - static TIMER_CALLBACK( command_execution_callback ) { reinterpret_cast(ptr)->service_command(); } + TIMER_CALLBACK_MEMBER(service_command); void position_head(); void read_sector(); -- cgit v1.2.3-70-g09d2 From 18362c87ed37d67f14bfcdd1123e418ff4d48a05 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 7 Mar 2016 15:35:20 +0100 Subject: Machine promoted to WORKING ------------- Coleco Head to Head Basketball/Hockey/Soccer [hap, Sean Riddle] --- src/mame/drivers/hh_cop400.cpp | 86 ++++++++-------- src/mame/layout/h2hbaskb.lay | 222 +++++++++++++++++++++-------------------- 2 files changed, 161 insertions(+), 147 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index f4af0a890db..da4539a9094 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -252,7 +252,7 @@ UINT8 hh_cop400_state::read_inputs(int columns) * 4 lamps, 1-bit sound This is a Simon clone, the tones are not harmonic. Two models exist, each - with a different batteries setup, assume for now they're same otherwise. + with a different batteries setup, assume they're same otherwise. ***************************************************************************/ @@ -344,11 +344,14 @@ MACHINE_CONFIG_END /*************************************************************************** - Coleco Head to Head Basketball + Coleco Head to Head Basketball/Hockey/Soccer * COP420 MCU label COP420L-NEZ/N * 2-digit 7seg display, 41 other leds, 1-bit sound - This is the COP400 version, there is one for TMS1000 too. + 3 Head to Head games were released using this MCU/ROM. They play very much + the same, only differing on game time. + + An earlier revision of this game runs on TMS1000. ***************************************************************************/ @@ -359,7 +362,6 @@ public: : hh_cop400_state(mconfig, type, tag) { } - void prepare_display(); DECLARE_WRITE8_MEMBER(write_d); DECLARE_WRITE8_MEMBER(write_g); DECLARE_WRITE8_MEMBER(write_l); @@ -369,44 +371,38 @@ public: // handlers -void h2hbaskb_state::prepare_display() -{ - // D2,D3 double as multiplexer - UINT16 mask = ((m_d >> 2 & 1) * 0xf) | ((m_d << 1 & 0x10) * 0xf); - UINT16 sel = (m_g | m_d << 4 | m_g << 8 | m_d << 12) & mask; - - // D2+G0,G1 are 7segs - set_display_segmask(3, 0x7f); - display_matrix(7, 16, m_l, sel); -} - WRITE8_MEMBER(h2hbaskb_state::write_d) { // D: led select m_d = data & 0xf; - prepare_display(); } WRITE8_MEMBER(h2hbaskb_state::write_g) { // G: led select, input mux - m_inp_mux = data; + m_inp_mux = ~data; m_g = data & 0xf; - prepare_display(); } WRITE8_MEMBER(h2hbaskb_state::write_l) { - // L0-L6: digit segments A-G - // L0-L4: led data - m_l = data; - prepare_display(); + // D2,D3 double as multiplexer + UINT16 mask = ((m_d >> 2 & 1) * 0x00ff) | ((m_d >> 3 & 1) * 0xff00); + UINT16 sel = (m_g | m_d << 4 | m_g << 8 | m_d << 12) & mask; + + // D2+G0,G1 are 7segs + set_display_segmask(3, 0x7f); + + // L0-L6: digit segments A-G, L0-L4: led data + // strobe display + display_matrix(7, 16, data, sel); + display_matrix(7, 16, 0, sel); } READ8_MEMBER(h2hbaskb_state::read_in) { // IN: multiplexed inputs - return read_inputs(4); + return (read_inputs(4) & 7) | (m_inp_matrix[4]->read() & 8); } WRITE_LINE_MEMBER(h2hbaskb_state::write_so) @@ -420,34 +416,42 @@ WRITE_LINE_MEMBER(h2hbaskb_state::write_so) static INPUT_PORTS_START( h2hbaskb ) PORT_START("IN.0") // G0 port IN - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_4) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("P1 Pass CW") // clockwise + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_NAME("P1 Pass CCW") // counter-clockwise + PORT_CONFNAME( 0x04, 0x04, "Players" ) + PORT_CONFSETTING( 0x04, "1" ) + PORT_CONFSETTING( 0x00, "2" ) PORT_START("IN.1") // G1 port IN - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_5) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_6) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_CODE(KEYCODE_7) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_CODE(KEYCODE_8) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Shoot") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("Start/Display") + PORT_BIT( 0x04, 0x04, IPT_SPECIAL ) PORT_CONDITION("IN.4", 0x04, EQUALS, 0x04) PORT_START("IN.2") // G2 port IN - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_CODE(KEYCODE_Q) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_CODE(KEYCODE_W) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_CODE(KEYCODE_E) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_CODE(KEYCODE_R) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Defense Right") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Defense Left") + PORT_CONFNAME( 0x04, 0x04, "Skill Level" ) + PORT_CONFSETTING( 0x04, "1" ) + PORT_CONFSETTING( 0x00, "2" ) PORT_START("IN.3") // G3 port IN - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_CODE(KEYCODE_T) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_CODE(KEYCODE_Y) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_CODE(KEYCODE_U) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON16 ) PORT_CODE(KEYCODE_I) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Goalie Right") // only for hockey/soccer + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Goalie Left") // " + PORT_CONFNAME( 0x04, 0x04, "Factory Test" ) + PORT_CONFSETTING( 0x04, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("IN.4") // G1+IN2, IN3 (factory set) + PORT_CONFNAME( 0x0c, 0x00, "Game" ) + PORT_CONFSETTING( 0x00, "Basketball" ) + PORT_CONFSETTING( 0x08, "Hockey" ) + PORT_CONFSETTING( 0x0c, "Soccer" ) INPUT_PORTS_END static MACHINE_CONFIG_START( h2hbaskb, h2hbaskb_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", COP420, 1000000) // approximation - RC osc. R=43K to +9V, C=101pf to GND + MCFG_CPU_ADD("maincpu", COP420, 1600000) // approximation - RC osc. R=43K to +9V, C=101pf to GND MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed MCFG_COP400_WRITE_D_CB(WRITE8(h2hbaskb_state, write_d)) MCFG_COP400_WRITE_G_CB(WRITE8(h2hbaskb_state, write_g)) @@ -1040,7 +1044,7 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ CONS( 1979, ctstein, 0, 0, ctstein, ctstein, driver_device, 0, "Castle Toy", "Einstein (Castle Toy)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1979, h2hbaskb, 0, 0, h2hbaskb, h2hbaskb, driver_device, 0, "Coleco", "Head to Head Basketball (COP420L)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +CONS( 1980, h2hbaskb, 0, 0, h2hbaskb, h2hbaskb, driver_device, 0, "Coleco", "Head to Head Basketball/Hockey/Soccer (COP420L)", MACHINE_SUPPORTS_SAVE ) CONS( 1981, einvaderc, einvader, 0, einvaderc, einvaderc, driver_device, 0, "Entex", "Space Invader (Entex, COP444)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING ) diff --git a/src/mame/layout/h2hbaskb.lay b/src/mame/layout/h2hbaskb.lay index 7bf05409154..1ddaff0b0ce 100644 --- a/src/mame/layout/h2hbaskb.lay +++ b/src/mame/layout/h2hbaskb.lay @@ -4,124 +4,134 @@ + + + + - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-70-g09d2 From a0aafea67ff49ee4dbc2bd66be848d3fd76e5030 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 7 Mar 2016 16:13:45 +0100 Subject: removed not used declarations (nw) --- src/emu/ioport.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src') diff --git a/src/emu/ioport.h b/src/emu/ioport.h index bc8dab543be..bd3e04e5f7f 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -1580,7 +1580,6 @@ private: #define DECLARE_INPUT_CHANGED_MEMBER(name) void name(ioport_field &field, void *param, ioport_value oldval, ioport_value newval) // macro for port changed callback functions (PORT_CROSSHAIR_MAPPER) -#define CROSSHAIR_MAPPER(name) float name(device_t &device, ioport_field &field, float linear_value) #define CROSSHAIR_MAPPER_MEMBER(name) float name(ioport_field &field, float linear_value) #define DECLARE_CROSSHAIR_MAPPER_MEMBER(name) float name(ioport_field &field, float linear_value) @@ -1727,9 +1726,6 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s configurer.field_set_analog_invert(); // read callbacks -#define PORT_CUSTOM(_callback, _param) \ - configurer.field_set_dynamic_read(ioport_field_read_delegate(_callback, #_callback, DEVICE_SELF, (device_t *)NULL), (void *)(_param)); - #define PORT_CUSTOM_MEMBER(_device, _class, _member, _param) \ configurer.field_set_dynamic_read(ioport_field_read_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)NULL), (void *)(_param)); @@ -1738,16 +1734,10 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s configurer.field_set_dynamic_write(ioport_field_write_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)NULL), (void *)(_param)); // input device handler -#define PORT_READ_LINE_DEVICE(_device, _read_line_device) \ - configurer.field_set_dynamic_read(ioport_field_read_delegate(&ioport_read_line_wrapper<_read_line_device>, #_read_line_device, _device, (device_t *)NULL)); - #define PORT_READ_LINE_DEVICE_MEMBER(_device, _class, _member) \ configurer.field_set_dynamic_read(ioport_field_read_delegate(&ioport_read_line_wrapper<_class, &_class::_member>, #_class "::" #_member, _device, (_class *)NULL)); // output device handler -#define PORT_WRITE_LINE_DEVICE(_device, _write_line_device) \ - configurer.field_set_dynamic_write(ioport_field_write_delegate(&ioport_write_line_wrapper<_write_line_device>, #_write_line_device, _device, (device_t *)NULL)); - #define PORT_WRITE_LINE_DEVICE_MEMBER(_device, _class, _member) \ configurer.field_set_dynamic_write(ioport_field_write_delegate(&ioport_write_line_wrapper<_class, &_class::_member>, #_class "::" #_member, _device, (_class *)NULL)); -- cgit v1.2.3-70-g09d2 From 4bdfc10c50a5673488309bd183a523b9b149bc1a Mon Sep 17 00:00:00 2001 From: angelosa Date: Mon, 7 Mar 2016 18:58:23 +0100 Subject: Fixed opaque tiles for foreground. Game can be marked working again, next is log, nw --- src/mame/drivers/sprcros2.cpp | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/sprcros2.cpp b/src/mame/drivers/sprcros2.cpp index ad7c67dccef..379eb2b1b8c 100644 --- a/src/mame/drivers/sprcros2.cpp +++ b/src/mame/drivers/sprcros2.cpp @@ -2,11 +2,15 @@ // copyright-holders:Angelo Salese /*************************************************************************** -TODO: -- complete rewrite; -- scanline renderer; -- understand irq 0 source; -- output bit 0 might be watchdog armed bit/sprite start DMA instead of irq enable; + Super Cross II (c) 1987 GM Shoji + + driver by Angelo Salese, based off "wiped off due of not anymore licenseable" driver by insideoutboy. + + TODO: + - complete rewrite; + - scanline renderer; + - understand irq 0 source; + - output bit 0 might be watchdog armed bit/sprite start DMA instead of irq enable; =================================== @@ -159,7 +163,7 @@ void sprcros2_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &clipre { gfx_element *gfx_2 = m_gfxdecode->gfx(2); int count = 0; - + for (int y=0;y<32;y++) { for (int x=0;x<32;x++) @@ -167,8 +171,13 @@ void sprcros2_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &clipre UINT16 tile = m_fgvram[count]; tile |= (m_fgattr[count] & 3) << 8; UINT8 color = (m_fgattr[count] & 0xfc) >> 2; - - gfx_2->transpen(bitmap,cliprect,tile,color,0,0,x*8,y*8,0); + + // TODO: was using tileinfo.group, which I don't know what's for at all. + // This guess seems as good as the original one for all I know. + if((color & 0x30) != 0x30) + gfx_2->opaque(bitmap,cliprect,tile,color,0,0,x*8,y*8); + else + gfx_2->transpen(bitmap,cliprect,tile,color,0,0,x*8,y*8,0); count++; } @@ -183,15 +192,14 @@ UINT32 sprcros2_state::screen_update( screen_device &screen, bitmap_ind16 &bitma legacy_bg_draw(bitmap,cliprect); legacy_obj_draw(bitmap,cliprect); legacy_fg_draw(bitmap,cliprect); - return 0; } WRITE8_MEMBER(sprcros2_state::master_output_w) { - popmessage("%02x",data); - if(data & 0xbe) - printf("master 07 -> %02x\n",data); + //popmessage("%02x",data); + //if(data & 0xbe) + // printf("master 07 -> %02x\n",data); membank("master_rombank")->set_entry((data&0x40)>>6); m_master_nmi_enable = bool(data & 1); @@ -202,8 +210,8 @@ WRITE8_MEMBER(sprcros2_state::master_output_w) WRITE8_MEMBER(sprcros2_state::slave_output_w) { - if(data & 0xf6) - printf("slave 03 -> %02x\n",data); + //if(data & 0xf6) + // printf("slave 03 -> %02x\n",data); m_slave_nmi_enable = bool(data & 1); membank("slave_rombank")->set_entry((data&8)>>3); -- cgit v1.2.3-70-g09d2 From 39b00d4993c2be4416af8350481a4375c455ce16 Mon Sep 17 00:00:00 2001 From: angelosa Date: Mon, 7 Mar 2016 19:11:53 +0100 Subject: Rewritten Super Cross II driver due of relicensing [Angelo Salese] --- src/mame/drivers/sprcros2.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/sprcros2.cpp b/src/mame/drivers/sprcros2.cpp index 379eb2b1b8c..594cd20d33a 100644 --- a/src/mame/drivers/sprcros2.cpp +++ b/src/mame/drivers/sprcros2.cpp @@ -11,6 +11,8 @@ - scanline renderer; - understand irq 0 source; - output bit 0 might be watchdog armed bit/sprite start DMA instead of irq enable; + - weird visible area resolution, 224 or 240 x 224? Maybe it's really just 256 x 224 and then it's supposed + to show garbage/nothing on the edges? =================================== @@ -450,11 +452,7 @@ static MACHINE_CONFIG_START( sprcros2, sprcros2_state ) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_UPDATE_DRIVER(sprcros2_state, screen_update) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(32*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1) -// MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK/2, 343, 0, 256, 262, 0, 256) // TODO: Wrong screen parameters + MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK/2, 343, 8, 256-8, 262, 16, 240) // TODO: Wrong screen parameters MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", sprcros2) @@ -507,7 +505,7 @@ ROM_START( sprcros2 ) ROM_LOAD( "scs-24.4e", 0x0000, 0x4000, CRC(87783c36) SHA1(7102be795afcddd76b4d41823e95c65fe1ffbca0) ) ROM_REGION( 0xc000, "gfx2", 0 ) - ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) //sprites + ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) ROM_LOAD( "scm-22.5e", 0x4000, 0x4000, CRC(0cad254c) SHA1(36e30e30b652b3a388a3c4a82251196f79368f59) ) ROM_LOAD( "scm-21.5g", 0x8000, 0x4000, CRC(b6b68998) SHA1(cc3c6d996beeedcc7e5199f10d65c5b1d3c6e666) ) @@ -537,7 +535,7 @@ ROM_START( sprcros2a ) ROM_LOAD( "scs-28.5j", 0x08000, 0x4000, CRC(480d351f) SHA1(d1b86f441ae0e58b30e0f089ab25de219d5f30e3) ) ROM_REGION( 0x4000, "slave_bank", 0) - ROM_LOAD( "scs-27.5k", 0x00000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) //banked into c000-dfff + ROM_LOAD( "scs-27.5k", 0x00000, 0x4000, CRC(2cf720cb) SHA1(a95c5b8c88371cf597bb7d80afeca6a48c7b74e6) ) ROM_REGION( 0xc000, "gfx1", 0 ) //bg ROM_LOAD( "scs-26.4b", 0x8000, 0x4000, CRC(f958b56d) SHA1(a1973179d336d2ba57294155550515f2b8a33a09) ) @@ -545,7 +543,7 @@ ROM_START( sprcros2a ) ROM_LOAD( "scs-24.4e", 0x0000, 0x4000, CRC(87783c36) SHA1(7102be795afcddd76b4d41823e95c65fe1ffbca0) ) ROM_REGION( 0xc000, "gfx2", 0 ) - ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) //sprites + ROM_LOAD( "scm-23.5b", 0x0000, 0x4000, CRC(ab42f8e3) SHA1(8c2213b7c47a48e223fc3f7d323d16c0e4cd0457) ) ROM_LOAD( "scm-22.5e", 0x4000, 0x4000, CRC(0cad254c) SHA1(36e30e30b652b3a388a3c4a82251196f79368f59) ) ROM_LOAD( "scm-21.5g", 0x8000, 0x4000, CRC(b6b68998) SHA1(cc3c6d996beeedcc7e5199f10d65c5b1d3c6e666) ) @@ -560,5 +558,5 @@ ROM_START( sprcros2a ) ROM_LOAD( "sc-60.4k", 0x0320, 0x0100, CRC(d7a4e57d) SHA1(6db02ec6aa55b05422cb505e63c71e36b4b11b4a) ) //fg clut ROM_END -GAME( 1986, sprcros2, 0, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) -GAME( 1986, sprcros2a,sprcros2, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +GAME( 1986, sprcros2, 0, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, sprcros2a,sprcros2, sprcros2, sprcros2, driver_device, 0, ROT0, "GM Shoji", "Super Cross II (Japan, set 2)", MACHINE_SUPPORTS_SAVE ) -- cgit v1.2.3-70-g09d2 From 63b07040e5ddec8f9b600159c0f7a060eaffd465 Mon Sep 17 00:00:00 2001 From: MetalliC <0vetal0@gmail.com> Date: Mon, 7 Mar 2016 20:15:59 +0200 Subject: notes about Atomiswave AW-NET cartridges --- src/mame/drivers/naomi.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp index f7554e290b2..c891f679f8e 100644 --- a/src/mame/drivers/naomi.cpp +++ b/src/mame/drivers/naomi.cpp @@ -1894,7 +1894,7 @@ WRITE64_MEMBER(naomi_state::aw_modem_w ) cc/dd - set type of Maple devices at ports 2/3 (EX. IO board) 0 - regular Atomiswave controller 1 - DC lightgun - 2 - DC mouse/trackball + 2,3 - DC mouse/trackball TODO: hook this then MAME have such devices emulated 0x00600288 rw 0000dcba @@ -8844,6 +8844,10 @@ ROM_END * *********************************************/ +// note: games with AW-NET features, i.e. NGBC or KOF NW, have "CUSTOMER ID" data (shown in NETWORK SETTINGS) in ROM @ 7FE000 (not encrypted, 8 bytes of data followed by 2 bytes of bytesumm) +// EN cartridges have this area empty (FF-filled), i.e. AW-NET features not used. +// JP cartridges have it filled with unique ID, which also means dumps of several JP cartridges will differ by this few bytes. + DRIVER_INIT_MEMBER(naomi_state,atomiswave) { UINT64 *ROM = (UINT64 *)memregion("awflash")->base(); @@ -9069,7 +9073,7 @@ ROM_START( ngbc ) ROM_LOAD( "ax3301f01.bin", 0, 4, CRC(9afe949b) SHA1(4f7b039f3287da61a53a2d012993bfb57e1459bd) ) ROM_END -// JP cartridge have only few bytes difference - "CUSTOMER ID" field filled, probably used in online features for machine identification. +// same as above EN-dump, but CustomerID not FF-filled // Build:Jun 25 2005 17:00:38 ROM_START( ngbcj ) AW_BIOS -- cgit v1.2.3-70-g09d2 From 113563182c07036350dc1e978d8f3479d4d92a94 Mon Sep 17 00:00:00 2001 From: angelosa Date: Mon, 7 Mar 2016 19:26:49 +0100 Subject: Added screen enable bit, nw --- src/mame/drivers/sprcros2.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/mame/drivers/sprcros2.cpp b/src/mame/drivers/sprcros2.cpp index 594cd20d33a..886e3e7b9d9 100644 --- a/src/mame/drivers/sprcros2.cpp +++ b/src/mame/drivers/sprcros2.cpp @@ -100,6 +100,7 @@ public: bool m_master_nmi_enable; bool m_master_irq_enable; bool m_slave_nmi_enable; + bool m_screen_enable; UINT8 m_bg_scrollx, m_bg_scrolly; protected: // driver_device overrides @@ -191,6 +192,11 @@ void sprcros2_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &clipre UINT32 sprcros2_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) { + if(m_screen_enable == false) + { + bitmap.fill(0,cliprect); + return 0; + } legacy_bg_draw(bitmap,cliprect); legacy_obj_draw(bitmap,cliprect); legacy_fg_draw(bitmap,cliprect); @@ -205,6 +211,7 @@ WRITE8_MEMBER(sprcros2_state::master_output_w) membank("master_rombank")->set_entry((data&0x40)>>6); m_master_nmi_enable = bool(data & 1); + m_screen_enable = bool(data & 4); m_master_irq_enable = bool(data & 8); // if(data & 0x80) // m_master_cpu->set_input_line(0,HOLD_LINE); -- cgit v1.2.3-70-g09d2 From e76d30243e48cc99cb5e5a92667a66617e2c6f4c Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 7 Mar 2016 19:34:44 +0100 Subject: Removed I64FMT and SIZETFMT, one usage left in chdman.cpp (nw) --- src/devices/cpu/es5510/es5510.cpp | 22 +++++++++++----------- src/devices/machine/nvram.cpp | 2 +- src/devices/sound/disc_sys.inc | 2 +- src/devices/sound/discrete.cpp | 4 ++-- src/devices/sound/esqpump.cpp | 4 ++-- src/emu/emu.h | 1 - src/mame/drivers/naomi.cpp | 2 +- src/mame/drivers/ssem.cpp | 2 +- src/mame/machine/dc.cpp | 12 ++++++------ src/mame/machine/dccons.cpp | 2 +- src/mame/machine/xbox.cpp | 2 +- src/mame/video/powervr2.cpp | 2 +- src/osd/osdcomm.h | 19 ------------------- src/osd/sdl/window.cpp | 2 +- src/osd/windows/window.cpp | 5 ++--- src/tools/chdman.cpp | 14 ++++++++++---- 16 files changed, 41 insertions(+), 56 deletions(-) (limited to 'src') diff --git a/src/devices/cpu/es5510/es5510.cpp b/src/devices/cpu/es5510/es5510.cpp index 17a73204f09..28be6e56f8b 100644 --- a/src/devices/cpu/es5510/es5510.cpp +++ b/src/devices/cpu/es5510/es5510.cpp @@ -422,12 +422,12 @@ WRITE8_MEMBER(es5510_device::host_w) break; /* 0x03 to 0x08 INSTR Register */ - case 0x03: instr_latch = ((instr_latch&U64(0x00ffffffffff)) | ((INT64)data&0xff)<<40); LOG(("ES5510: Host Write INSTR latch[5] = %02x -> %012" I64FMT "x\n", data, instr_latch)); break; - case 0x04: instr_latch = ((instr_latch&U64(0xff00ffffffff)) | ((INT64)data&0xff)<<32); LOG(("ES5510: Host Write INSTR latch[4] = %02x -> %012" I64FMT "x\n", data, instr_latch)); break; - case 0x05: instr_latch = ((instr_latch&U64(0xffff00ffffff)) | ((INT64)data&0xff)<<24); LOG(("ES5510: Host Write INSTR latch[3] = %02x -> %012" I64FMT "x\n", data, instr_latch)); break; - case 0x06: instr_latch = ((instr_latch&U64(0xffffff00ffff)) | ((INT64)data&0xff)<<16); LOG(("ES5510: Host Write INSTR latch[2] = %02x -> %012" I64FMT "x\n", data, instr_latch)); break; - case 0x07: instr_latch = ((instr_latch&U64(0xffffffff00ff)) | ((INT64)data&0xff)<< 8); LOG(("ES5510: Host Write INSTR latch[1] = %02x -> %012" I64FMT "x\n", data, instr_latch)); break; - case 0x08: instr_latch = ((instr_latch&U64(0xffffffffff00)) | ((INT64)data&0xff)<< 0); LOG(("ES5510: Host Write INSTR latch[0] = %02x -> %012" I64FMT "x\n", data, instr_latch)); break; + case 0x03: instr_latch = ((instr_latch&U64(0x00ffffffffff)) | ((INT64)data&0xff)<<40); LOG(("%s",string_format("ES5510: Host Write INSTR latch[5] = %02x -> %012I64x\n", data, instr_latch).c_str())); break; + case 0x04: instr_latch = ((instr_latch&U64(0xff00ffffffff)) | ((INT64)data&0xff)<<32); LOG(("%s",string_format("ES5510: Host Write INSTR latch[4] = %02x -> %012I64x\n", data, instr_latch).c_str())); break; + case 0x05: instr_latch = ((instr_latch&U64(0xffff00ffffff)) | ((INT64)data&0xff)<<24); LOG(("%s",string_format("ES5510: Host Write INSTR latch[3] = %02x -> %012I64x\n", data, instr_latch).c_str())); break; + case 0x06: instr_latch = ((instr_latch&U64(0xffffff00ffff)) | ((INT64)data&0xff)<<16); LOG(("%s",string_format("ES5510: Host Write INSTR latch[2] = %02x -> %012I64x\n", data, instr_latch).c_str())); break; + case 0x07: instr_latch = ((instr_latch&U64(0xffffffff00ff)) | ((INT64)data&0xff)<< 8); LOG(("%s",string_format("ES5510: Host Write INSTR latch[1] = %02x -> %012I64x\n", data, instr_latch).c_str())); break; + case 0x08: instr_latch = ((instr_latch&U64(0xffffffffff00)) | ((INT64)data&0xff)<< 0); LOG(("%s",string_format("ES5510: Host Write INSTR latch[0] = %02x -> %012I64x\n", data, instr_latch).c_str())); break; /* 0x09 to 0x0b DIL Register (r/o) */ @@ -477,7 +477,7 @@ WRITE8_MEMBER(es5510_device::host_w) break; case 0x80: /* Read select - GPR + INSTR */ - LOG(("ES5510: Host Read INSTR+GPR %02x (%s): %012" I64FMT "x %06x (%d)\n", data, REGNAME(data & 0xff), instr[data] & U64(0xffffffffffff), gpr[data] & 0xffffff, gpr[data])); + LOG(("%s",string_format("ES5510: Host Read INSTR+GPR %02x (%s): %012I64x %06x (%d)\n", data, REGNAME(data & 0xff), instr[data] & U64(0xffffffffffff), gpr[data] & 0xffffff, gpr[data]).c_str())); /* Check if an INSTR address is selected */ if (data < 0xa0) { @@ -498,7 +498,7 @@ WRITE8_MEMBER(es5510_device::host_w) case 0xc0: /* Write select - INSTR */ #if VERBOSE DESCRIBE_INSTR(buf, instr_latch, gpr[data], NULL, NULL, NULL, NULL); - LOG(("ES5510: Host Write INSTR %02x %012" I64FMT "x: %s\n", data, instr_latch&U64(0xffffffffffff), buf)); + LOG(("%s",string_format("ES5510: Host Write INSTR %02x %012I64x: %s\n", data, instr_latch&U64(0xffffffffffff), buf).c_str())); #endif if (data < 0xa0) { instr[data] = instr_latch&U64(0xffffffffffff); @@ -508,7 +508,7 @@ WRITE8_MEMBER(es5510_device::host_w) case 0xe0: /* Write select - GPR + INSTR */ #if VERBOSE DESCRIBE_INSTR(buf, instr_latch, gpr_latch, NULL, NULL, NULL, NULL); - LOG(("ES5510: Host Write INSTR+GPR %02x (%s): %012" I64FMT "x %06x (%d): %s\n", data, REGNAME(data&0xff), instr_latch, gpr_latch, SX(gpr_latch), buf)); + LOG(("%s",string_format("ES5510: Host Write INSTR+GPR %02x (%s): %012I64x %06x (%d): %s\n", data, REGNAME(data&0xff), instr_latch, gpr_latch, SX(gpr_latch), buf).c_str())); #endif if (data < 0xa0) { instr[data] = instr_latch; @@ -675,7 +675,7 @@ void es5510_device::list_program(void(p)(const char *, ...)) { UINT8 cReg = (UINT8)((instr[addr] >> 32) & 0xff); UINT8 dReg = (UINT8)((instr[addr] >> 40) & 0xff); DESCRIBE_INSTR(buf, instr[addr], gpr[addr], name[aReg], name[bReg], name[cReg], name[dReg]); - p("%02x: %012" I64FMT "x %06x (%8d) %s\n", addr, instr[addr], gpr[addr]&0xffffff, SX(gpr[addr]&0xffffff), buf); + p("%s",string_format("%02x: %012I64x %06x (%8d) %s\n", addr, instr[addr], gpr[addr]&0xffffff, SX(gpr[addr]&0xffffff), buf).c_str()); } for (; addr < 0xc0; addr++) { p("%02x: %06x (%d)\n", addr, gpr[addr]&0xffffff, SX(gpr[addr]&0xffffff)); @@ -701,7 +701,7 @@ void es5510_device::execute_run() { #if VERBOSE_EXEC char buf[1024]; DESCRIBE_INSTR(buf, instr[pc], gpr[pc], NULL, NULL, NULL, NULL); - LOG_EXEC(("EXECUTING %02x: %012" I64FMT "x %06x %s\n", pc, instr[pc], gpr[pc]&0xffffff, buf)); + LOG_EXEC(("%s",string_format("EXECUTING %02x: %012I64x %06x %s\n", pc, instr[pc], gpr[pc]&0xffffff, buf).c_str())); #endif ram_pp = ram_p; diff --git a/src/devices/machine/nvram.cpp b/src/devices/machine/nvram.cpp index d1e99ceb98b..88d1191187a 100644 --- a/src/devices/machine/nvram.cpp +++ b/src/devices/machine/nvram.cpp @@ -165,5 +165,5 @@ void nvram_device::determine_final_base() // if we are region-backed for the default, find it now and make sure it's the right size if (m_region != nullptr && m_region->bytes() != m_length) - throw emu_fatalerror("NVRAM device '%s' has a default region, but it should be 0x%" SIZETFMT "X bytes", tag(), m_length); + throw emu_fatalerror("%s",string_format("NVRAM device '%s' has a default region, but it should be 0x%I64uX bytes", tag(), m_length).c_str()); } diff --git a/src/devices/sound/disc_sys.inc b/src/devices/sound/disc_sys.inc index 92b00c30383..a166f71ce49 100644 --- a/src/devices/sound/disc_sys.inc +++ b/src/devices/sound/disc_sys.inc @@ -61,7 +61,7 @@ DISCRETE_STEP( dso_csvlog ) int nodenum; /* Dump any csv logs */ - fprintf(m_csv_file, "%" I64FMT "d", ++m_sample_num); + fprintf(m_csv_file, "%s", string_format("%I64d", ++m_sample_num).c_str()); for (nodenum = 0; nodenum < this->active_inputs(); nodenum++) { fprintf(m_csv_file, ", %f", *this->m_input[nodenum]); diff --git a/src/devices/sound/discrete.cpp b/src/devices/sound/discrete.cpp index 926db3a4a40..dc66910707f 100644 --- a/src/devices/sound/discrete.cpp +++ b/src/devices/sound/discrete.cpp @@ -647,9 +647,9 @@ void discrete_device::display_profiling(void) total = list_run_time(m_node_list); count = m_node_list.count(); /* print statistics */ - printf("Total Samples : %16" I64FMT "d\n", m_total_samples); + printf("%s",string_format("Total Samples : %16I64d\n", m_total_samples).c_str()); tresh = total / count; - printf("Threshold (mean): %16" I64FMT "d\n", tresh / m_total_samples ); + printf("%s",string_format("Threshold (mean): %16I64d\n", tresh / m_total_samples).c_str()); for_each(discrete_base_node **, node, &m_node_list) { discrete_step_interface *step; diff --git a/src/devices/sound/esqpump.cpp b/src/devices/sound/esqpump.cpp index 496cc5c832a..e9ad6cedf85 100644 --- a/src/devices/sound/esqpump.cpp +++ b/src/devices/sound/esqpump.cpp @@ -148,7 +148,7 @@ void esq_5505_5510_pump::sound_stream_update(sound_stream &stream, stream_sample { osd_ticks_t elapsed = now - last_ticks; osd_ticks_t tps = osd_ticks_per_second(); - fprintf(stderr, "Pump: %d samples in %" I64FMT "d ticks for %f Hz\n", last_samples, elapsed, last_samples * (double)tps / (double)elapsed); + fprintf(stderr, "%s",string_format("Pump: %d samples in %I64d ticks for %f Hz\n", last_samples, elapsed, last_samples * (double)tps / (double)elapsed).c_str()); last_ticks = now; while (next_report_ticks <= now) { next_report_ticks += tps; @@ -156,7 +156,7 @@ void esq_5505_5510_pump::sound_stream_update(sound_stream &stream, stream_sample last_samples = 0; #if !PUMP_FAKE_ESP_PROCESSING - fprintf(stderr, " ESP spent %" I64FMT "d ticks on %d samples, %f ticks per sample\n", ticks_spent_processing, samples_processed, (double)ticks_spent_processing / (double)samples_processed); + fprintf(stderr, "%s",string_format(" ESP spent %I64d ticks on %d samples, %f ticks per sample\n", ticks_spent_processing, samples_processed, (double)ticks_spent_processing / (double)samples_processed).c_str()); ticks_spent_processing = 0; samples_processed = 0; #endif diff --git a/src/emu/emu.h b/src/emu/emu.h index 0cf7b7c1384..e978bbe44d5 100644 --- a/src/emu/emu.h +++ b/src/emu/emu.h @@ -18,7 +18,6 @@ #ifndef __EMU_H__ #define __EMU_H__ -#include // must be here otherwise issues with I64FMT in MINGW #include #include #include diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp index f7554e290b2..5e433324027 100644 --- a/src/mame/drivers/naomi.cpp +++ b/src/mame/drivers/naomi.cpp @@ -1906,7 +1906,7 @@ WRITE64_MEMBER(naomi_state::aw_modem_w ) 0x0060028C rw POUT CN304 (EX. IO board) */ - osd_printf_verbose("MODEM: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x600000+reg*4, dat, data, offset, mem_mask); + osd_printf_verbose("%s",string_format("MODEM: [%08x=%x] write %I64x to %x, mask %I64x\n", 0x600000+reg*4, dat, data, offset, mem_mask).c_str()); } static ADDRESS_MAP_START( aw_map, AS_PROGRAM, 64, naomi_state ) diff --git a/src/mame/drivers/ssem.cpp b/src/mame/drivers/ssem.cpp index 56090713130..2fdc6eefebe 100644 --- a/src/mame/drivers/ssem.cpp +++ b/src/mame/drivers/ssem.cpp @@ -493,7 +493,7 @@ UINT32 ssem_state::screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitma (m_store[(m_store_line << 2) | 1] << 16) | (m_store[(m_store_line << 2) | 2] << 8) | (m_store[(m_store_line << 2) | 3] << 0)); - glyph_print(bitmap, 0, 272, "LINE:%02d VALUE:%08x HALT:%" I64FMT "d", m_store_line, word, m_maincpu->state_int(SSEM_HALT)); + glyph_print(bitmap, 0, 272, "%s",string_format("LINE:%02d VALUE:%08x HALT:%I64d", m_store_line, word, m_maincpu->state_int(SSEM_HALT)).c_str()); return 0; } diff --git a/src/mame/machine/dc.cpp b/src/mame/machine/dc.cpp index 324a1a1dfe6..59141504bdb 100644 --- a/src/mame/machine/dc.cpp +++ b/src/mame/machine/dc.cpp @@ -374,7 +374,7 @@ READ64_MEMBER(dc_state::dc_sysctrl_r ) #if DEBUG_SYSCTRL if ((reg != 0x40) && (reg != 0x41) && (reg != 0x42) && (reg != 0x23) && (reg > 2)) // filter out IRQ status reads { - osd_printf_verbose("SYSCTRL: [%08x] read %x @ %x (reg %x: %s), mask %" I64FMT "x (PC=%x)\n", 0x5f6800+reg*4, dc_sysctrl_regs[reg], offset, reg, sysctrl_names[reg], mem_mask, space.device().safe_pc()); + osd_printf_verbose("%s",string_format("SYSCTRL: [%08x] read %x @ %x (reg %x: %s), mask %I64x (PC=%x)\n", 0x5f6800+reg*4, dc_sysctrl_regs[reg], offset, reg, sysctrl_names[reg], mem_mask, space.device().safe_pc()).c_str()); } #endif @@ -472,7 +472,7 @@ WRITE64_MEMBER(dc_state::dc_sysctrl_w ) #if DEBUG_SYSCTRL if ((reg != 0x40) && (reg != 0x42) && (reg > 2)) // filter out IRQ acks and ch2 dma { - osd_printf_verbose("SYSCTRL: write %" I64FMT "x to %x (reg %x), mask %" I64FMT "x\n", data>>shift, offset, reg, /*sysctrl_names[reg],*/ mem_mask); + osd_printf_verbose("%s",string_format("SYSCTRL: write %I64x to %x (reg %x), mask %I64x\n", data>>shift, offset, reg, /*sysctrl_names[reg],*/ mem_mask).c_str()); } #endif } @@ -513,7 +513,7 @@ WRITE64_MEMBER(dc_state::dc_gdrom_w ) off=offset << 1; } - osd_printf_verbose("GDROM: [%08x=%x]write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x5f7000+off*4, dat, data, offset, mem_mask); + osd_printf_verbose("%s",string_format("GDROM: [%08x=%x]write %I64x to %x, mask %I64x\n", 0x5f7000+off*4, dat, data, offset, mem_mask).c_str()); } READ64_MEMBER(dc_state::dc_g2_ctrl_r ) @@ -632,7 +632,7 @@ WRITE64_MEMBER(dc_state::dc_modem_w ) reg = decode_reg32_64(offset, mem_mask, &shift); dat = (UINT32)(data >> shift); - osd_printf_verbose("MODEM: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x600000+reg*4, dat, data, offset, mem_mask); + osd_printf_verbose("%s",string_format("MODEM: [%08x=%x] write %I64x to %x, mask %I64x\n", 0x600000+reg*4, dat, data, offset, mem_mask).c_str()); } #define SAVE_G2DMA(x) \ @@ -674,7 +674,7 @@ void dc_state::machine_reset() READ32_MEMBER(dc_state::dc_aica_reg_r) { -// osd_printf_verbose("AICA REG: [%08x] read %" I64FMT "x, mask %" I64FMT "x\n", 0x700000+reg*4, (UINT64)offset, mem_mask); +// osd_printf_verbose("%s",string_format("AICA REG: [%08x] read %I64x, mask %I64x\n", 0x700000+reg*4, (UINT64)offset, mem_mask).c_str()); if(offset == 0x2c00/4) return m_armrst; @@ -705,7 +705,7 @@ WRITE32_MEMBER(dc_state::dc_aica_reg_w) m_aica->write(space, offset*2, data, 0xffff); -// osd_printf_verbose("AICA REG: [%08x=%x] write %x to %x, mask %" I64FMT "x\n", 0x700000+reg*4, data, offset, mem_mask); +// osd_printf_verbose("%s",string_format("AICA REG: [%08x=%x] write %x to %x, mask %I64x\n", 0x700000+reg*4, data, offset, mem_mask).c_str()); } READ32_MEMBER(dc_state::dc_arm_aica_r) diff --git a/src/mame/machine/dccons.cpp b/src/mame/machine/dccons.cpp index 48f4bd372a6..2f1b553e9fb 100644 --- a/src/mame/machine/dccons.cpp +++ b/src/mame/machine/dccons.cpp @@ -136,7 +136,7 @@ READ32_MEMBER(dc_cons_state::dc_mess_g1_ctrl_r ) WRITE32_MEMBER(dc_cons_state::dc_mess_g1_ctrl_w ) { g1bus_regs[offset] = data; // 5f7400+reg*4=dat -// osd_printf_verbose("G1CTRL: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x5f7400+reg*4, dat, data, offset, mem_mask); +// osd_printf_verbose("%s",string_format("G1CTRL: [%08x=%x] write %I64x to %x, mask %I64x\n", 0x5f7400+reg*4, dat, data, offset, mem_mask).c_str()); switch (offset) { case SB_GDST: diff --git a/src/mame/machine/xbox.cpp b/src/mame/machine/xbox.cpp index b006c9d83b5..5748e09d469 100644 --- a/src/mame/machine/xbox.cpp +++ b/src/mame/machine/xbox.cpp @@ -185,7 +185,7 @@ static void dump_timer_command(running_machine &machine, int ref, int params, co debug_console_printf(machine, "Header.Inserted %d byte\n", space.read_byte(address + 3)); debug_console_printf(machine, "Header.SignalState %08X dword\n", space.read_dword_unaligned(address + 4)); debug_console_printf(machine, "Header.WaitListEntry {%08X,%08X} _LIST_ENTRY\n", space.read_dword_unaligned(address + 8), space.read_dword_unaligned(address + 12)); - debug_console_printf(machine, "DueTime %" I64FMT "x qword\n", (INT64)space.read_qword_unaligned(address + 16)); + debug_console_printf(machine, "%s", string_format("DueTime %I64x qword\n", (INT64)space.read_qword_unaligned(address + 16)).c_str()); debug_console_printf(machine, "TimerListEntry {%08X,%08X} _LIST_ENTRY\n", space.read_dword_unaligned(address + 24), space.read_dword_unaligned(address + 28)); debug_console_printf(machine, "Dpc %08X dword\n", space.read_dword_unaligned(address + 32)); debug_console_printf(machine, "Period %d dword\n", space.read_dword_unaligned(address + 36)); diff --git a/src/mame/video/powervr2.cpp b/src/mame/video/powervr2.cpp index 4907b985f86..1b68402c493 100644 --- a/src/mame/video/powervr2.cpp +++ b/src/mame/video/powervr2.cpp @@ -2010,7 +2010,7 @@ WRITE64_MEMBER( powervr2_device::ta_fifo_poly_w ) tafifo_buff[tafifo_pos]=(UINT32)data; tafifo_buff[tafifo_pos+1]=(UINT32)(data >> 32); #if DEBUG_FIFO_POLY - osd_printf_debug("ta_fifo_poly_w: Unmapped write64 %08x = %" I64FMT "x -> %08x %08x\n", 0x10000000+offset*8, data, tafifo_buff[tafifo_pos], tafifo_buff[tafifo_pos+1]); + osd_printf_debug("%s",string_format("ta_fifo_poly_w: Unmapped write64 %08x = %I64x -> %08x %08x\n", 0x10000000+offset*8, data, tafifo_buff[tafifo_pos], tafifo_buff[tafifo_pos+1]).c_str()); #endif tafifo_pos += 2; } diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h index 5d0e792130e..ee040498cf0 100644 --- a/src/osd/osdcomm.h +++ b/src/osd/osdcomm.h @@ -128,25 +128,6 @@ using FPTR = uintptr_t; #define EXTRACT_64HI(val) ((UINT32)((val) >> 32)) #define EXTRACT_64LO(val) ((UINT32)(val)) - -/* MINGW has adopted the MSVC formatting for 64-bit ints as of gcc 4.4 */ -#if defined(__MINGW32__) || defined(_MSC_VER) -#define I64FMT "I64" -#else -#define I64FMT "ll" -#endif - -#if defined(_MSC_VER) || defined(__MINGW32__) -#ifdef PTR64 -#define SIZETFMT "I64u" -#else -#define SIZETFMT "u" -#endif -#else -#define SIZETFMT "zu" -#endif - - /* Highly useful macro for compile-time knowledge of an array size */ #define ARRAY_LENGTH(x) (sizeof(x) / sizeof(x[0])) diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp index 483ad426186..1ca6e9605a6 100644 --- a/src/osd/sdl/window.cpp +++ b/src/osd/sdl/window.cpp @@ -203,7 +203,7 @@ bool sdl_osd_interface::window_init() { osd_printf_verbose("Enter sdlwindow_init\n"); // determine if we are using multithreading or not - multithreading_enabled = options().multithreading(); + multithreading_enabled = false;//options().multithreading(); // get the main thread ID before anything else main_threadid = SDL_ThreadID(); diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp index 52d0a898df7..326e8248bab 100644 --- a/src/osd/windows/window.cpp +++ b/src/osd/windows/window.cpp @@ -12,7 +12,6 @@ // Needed for RAW Input #define WM_INPUT 0x00FF -#include // must be here otherwise issues with I64FMT in MINGW // standard C headers #include @@ -152,7 +151,7 @@ static void mtlog_dump(void) for (i = 0; i < mtlogindex; i++) { osd_ticks_t curr = mtlog[i].timestamp * 1000000 / cps; - fprintf(f, "%20" I64FMT "d %10" I64FMT "d %s\n", (UINT64)curr, (UINT64)(curr - last), mtlog[i].event); + fprintf(f, "%s",string_format("%20I64d %10I64d %s\n", (UINT64)curr, (UINT64)(curr - last), mtlog[i].event).c_str()); last = curr; } fclose(f); @@ -174,7 +173,7 @@ bool windows_osd_interface::window_init() size_t temp; // determine if we are using multithreading or not - multithreading_enabled = downcast(machine().options()).multithreading(); + multithreading_enabled = false;//downcast(machine().options()).multithreading(); // get the main thread ID before anything else main_threadid = GetCurrentThreadId(); diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp index 5c7e88c233e..0358a4c5620 100644 --- a/src/tools/chdman.cpp +++ b/src/tools/chdman.cpp @@ -31,6 +31,12 @@ //************************************************************************** // CONSTANTS & DEFINES //************************************************************************** +/* MINGW has adopted the MSVC formatting for 64-bit ints as of gcc 4.4 */ +#if defined(__MINGW32__) || defined(_MSC_VER) +#define I64FMT "I64" +#else +#define I64FMT "ll" +#endif // default hard disk sector size const UINT32 IDE_SECTOR_SIZE = 512; @@ -1231,7 +1237,7 @@ void output_track_metadata(int mode, util::core_file &file, int tracknum, const break; } bool needquote = strchr(filename, ' ') != nullptr; - file.printf("%d %d %d %d %s%s%s %" I64FMT "d\n", tracknum+1, frameoffs, mode, size, needquote?"\"":"", filename, needquote?"\"":"", discoffs); + file.printf("%s",string_format("%d %d %d %d %s%s%s %I64d\n", tracknum+1, frameoffs, mode, size, needquote?"\"":"", filename, needquote?"\"":"", discoffs).c_str()); } else if (mode == MODE_CUEBIN) { @@ -2592,7 +2598,7 @@ static void do_extract_ld(parameters_t ¶ms) if (err != CHDERR_NONE) { UINT64 filepos = static_cast(input_chd).tell(); - report_error(1, "Error reading hunk %" I64FMT "d at offset %" I64FMT "d from CHD file (%s): %s\n", framenum, filepos, params.find(OPTION_INPUT)->second->c_str(), chd_file::error_string(err)); + report_error(1, "%s",string_format("Error reading hunk %I64d at offset %I64d from CHD file (%s): %s\n", framenum, filepos, params.find(OPTION_INPUT)->second->c_str(), chd_file::error_string(err)).c_str()); } // write audio @@ -2600,7 +2606,7 @@ static void do_extract_ld(parameters_t ¶ms) { avi_error avierr = avi_append_sound_samples(output_file, chnum, avconfig.audio[chnum], actsamples, 0); if (avierr != AVIERR_NONE) - report_error(1, "Error writing samples for hunk %" I64FMT "d to file (%s): %s\n", framenum, output_file_str->second->c_str(), avi_error_string(avierr)); + report_error(1, "%s",string_format("Error writing samples for hunk %I64d to file (%s): %s\n", framenum, output_file_str->second->c_str(), avi_error_string(avierr)).c_str()); } // write video @@ -2608,7 +2614,7 @@ static void do_extract_ld(parameters_t ¶ms) { avi_error avierr = avi_append_video_frame(output_file, fullbitmap); if (avierr != AVIERR_NONE) - report_error(1, "Error writing video for hunk %" I64FMT "d to file (%s): %s\n", framenum, output_file_str->second->c_str(), avi_error_string(avierr)); + report_error(1, "%s",string_format("Error writing video for hunk %I64d to file (%s): %s\n", framenum, output_file_str->second->c_str(), avi_error_string(avierr)).c_str()); } } -- cgit v1.2.3-70-g09d2 From 3b9bf1d98d74936d98002b26c59a6a3c670b445c Mon Sep 17 00:00:00 2001 From: angelosa Date: Mon, 7 Mar 2016 20:58:25 +0100 Subject: Base work, nw --- src/emu/drivers/xtal.h | 2 +- src/mame/drivers/toypop.cpp | 207 ++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 193 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/emu/drivers/xtal.h b/src/emu/drivers/xtal.h index 6cc8cbe32c0..476db5e99ab 100644 --- a/src/emu/drivers/xtal.h +++ b/src/emu/drivers/xtal.h @@ -80,7 +80,7 @@ enum XTAL_5_911MHz = 5911000, /* Philips Videopac Plus G7400 */ XTAL_5_9904MHz = 5990400, /* Luxor ABC 800 keyboard (Keytronic custom part #48-300-008 is equivalent) */ XTAL_6MHz = 6000000, /* American Poker II */ - XTAL_6_144MHz = 6144000, /* Used on Alpha Denshi early 80's games sound board and Casio FP-200 main CPU */ + XTAL_6_144MHz = 6144000, /* Used on Alpha Denshi early 80's games sound board, Casio FP-200 and Namco System 16 */ XTAL_6_5MHz = 6500000, /* Jupiter Ace */ XTAL_6_9MHz = 6900000, /* BBN BitGraph CPU */ XTAL_7MHz = 7000000, /* Jaleco Mega System PCBs */ diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp index 4ad1c35182e..a0774a2e7e2 100644 --- a/src/mame/drivers/toypop.cpp +++ b/src/mame/drivers/toypop.cpp @@ -1,10 +1,12 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:Angelo Salese /**************************************** Libble Rabble (c) 1983 Namco Toypop (c) 1986 Namco +Namco "Universal System 16" Hardware + Notes: ------ - Libble Rabble Easter egg: @@ -18,17 +20,121 @@ Notes: ****************************************/ #include "emu.h" +#include "cpu/m6809/m6809.h" +#include "cpu/m68000/m68000.h" - +#define MASTER_CLOCK XTAL_6_144MHz class toypop_state : public driver_device { public: toypop_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) + : driver_device(mconfig, type, tag), + m_master_cpu(*this,"maincpu"), + m_gfxdecode(*this, "gfxdecode"), + m_fgvram(*this, "fgvram"), + m_fgattr(*this, "fgattr") { } + + required_device m_master_cpu; + + required_device m_gfxdecode; + + required_shared_ptr m_fgvram; + required_shared_ptr m_fgattr; + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + DECLARE_READ8_MEMBER(irq_enable_r); + INTERRUPT_GEN_MEMBER(master_vblank_irq); +protected: + // driver_device overrides +// virtual void machine_start() override; + virtual void machine_reset() override; + +// virtual void video_start() override; +private: + bool m_master_irq_enable; + + void legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect); + }; +void toypop_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect) +{ + gfx_element *gfx_0 = m_gfxdecode->gfx(0); + static int test = 1; + int count; + + if(machine().input().code_pressed_once(KEYCODE_Z)) + test++; + + if(machine().input().code_pressed_once(KEYCODE_X)) + test--; + + popmessage("%d",test); + + for(count=0;count<32;count++) + { + int x = count % 2; + int y = count / 2; + + UINT16 tile = m_fgvram[count]; + UINT8 color = 0;//(m_fgattr[count] & 0xfc) >> 2; + + gfx_0->opaque(bitmap,cliprect,tile,color,0,0,x*8,y*8); + } + + for(;count<64;count++) + { + int x = 34 + (count % 2); + int y = count / 2; + + UINT16 tile = m_fgvram[count]; + UINT8 color = 0;//(m_fgattr[count] & 0xfc) >> 2; + + gfx_0->opaque(bitmap,cliprect,tile,color,0,0,x*8,y*8); + } + + for (;count<32*28;count++) + { + int x = 2 + (count % 32); + int y = count / 32; + + UINT16 tile = m_fgvram[count]; + UINT8 color = 0;//(m_fgattr[count] & 0xfc) >> 2; + + //if((color & 0x30) != 0x30) + gfx_0->opaque(bitmap,cliprect,tile,color,0,0,x*8,y*8); + + } +} + +UINT32 toypop_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) +{ + legacy_fg_draw(bitmap,cliprect); + return 0; +} + +READ8_MEMBER(toypop_state::irq_enable_r) +{ + m_master_irq_enable = true; + return 0; +} + +static ADDRESS_MAP_START( master_map, AS_PROGRAM, 8, toypop_state ) + AM_RANGE(0x0000, 0x03ff) AM_RAM AM_SHARE("fgvram") + AM_RANGE(0x0400, 0x07ff) AM_RAM AM_SHARE("fgattr") + AM_RANGE(0x0800, 0x1fff) AM_RAM + AM_RANGE(0x2800, 0x2fff) AM_RAM + // 0x6000 - 0x603f namco i/o + AM_RANGE(0x6800, 0x6bff) AM_RAM // shared ram device + AM_RANGE(0x7000, 0x7000) AM_READ(irq_enable_r) + // 0x8000 m68k irq + // 0x9000 sound irq + // 0xa000 paletteram + AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION("master_rom",0) +ADDRESS_MAP_END static INPUT_PORTS_START( liblrabl ) INPUT_PORTS_END @@ -37,7 +143,78 @@ static INPUT_PORTS_START( toypop ) INPUT_PORTS_END +static const gfx_layout charlayout = +{ + 8,8, + RGN_FRAC(1,1), + 2, + { 0, 4 }, + { 8*8+0, 8*8+1, 8*8+2, 8*8+3, 0, 1, 2, 3 }, + { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, + 16*8 +}; + +static const gfx_layout spritelayout = +{ + 16,16, + RGN_FRAC(1,1), + 2, + { 0, 4 }, + { 0, 1, 2, 3, 8*8, 8*8+1, 8*8+2, 8*8+3, 16*8+0, 16*8+1, 16*8+2, 16*8+3, + 24*8+0, 24*8+1, 24*8+2, 24*8+3 }, + { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, + 32 * 8, 33 * 8, 34 * 8, 35 * 8, 36 * 8, 37 * 8, 38 * 8, 39 * 8 }, + 64*8 +}; + +static GFXDECODE_START( toypop ) + GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 128 ) + GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 128*4, 64 ) +GFXDECODE_END + +void toypop_state::machine_reset() +{ + m_master_irq_enable = false; +} + +INTERRUPT_GEN_MEMBER(toypop_state::master_vblank_irq) +{ + if(m_master_irq_enable == true) + device.execute().set_input_line(M6809_IRQ_LINE,HOLD_LINE); +} + static MACHINE_CONFIG_START( liblrabl, toypop_state ) + MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4) + MCFG_CPU_PROGRAM_MAP(master_map) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, master_vblank_irq) + +#if 0 + MCFG_CPU_ADD("slave", M68000, MASTER_CLOCK) + MCFG_CPU_PROGRAM_MAP(slave_map) + + MCFG_CPU_ADD("audiocpu", M6809, MASTER_CLOCK/4) + MCFG_CPU_PROGRAM_MAP(sound_map) + + + +#endif + + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_REFRESH_RATE(60.606060) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) + MCFG_SCREEN_SIZE(36*8, 28*8) + MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) + MCFG_SCREEN_UPDATE_DRIVER(toypop_state, screen_update) + MCFG_SCREEN_PALETTE("palette") + + MCFG_GFXDECODE_ADD("gfxdecode", "palette", toypop) + MCFG_PALETTE_ADD("palette", 128*4+64*4+16*2) + //MCFG_PALETTE_INDIRECT_ENTRIES(256) + //MCFG_PALETTE_INIT_OWNER(toypop_state, toypop) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( toypop, liblrabl ) @@ -45,14 +222,14 @@ MACHINE_CONFIG_END ROM_START( liblrabl ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "5b.rom", 0x8000, 0x4000, CRC(da7a93c2) SHA1(fe4a02cdab66722eb7b8cf58825f899b1949a6a2) ) - ROM_LOAD( "5c.rom", 0xc000, 0x4000, CRC(6cae25dc) SHA1(de74317a7d5de1865d096c377923a764be5e6879) ) + ROM_REGION( 0x8000, "master_rom", 0 ) + ROM_LOAD( "5b.rom", 0x0000, 0x4000, CRC(da7a93c2) SHA1(fe4a02cdab66722eb7b8cf58825f899b1949a6a2) ) + ROM_LOAD( "5c.rom", 0x4000, 0x4000, CRC(6cae25dc) SHA1(de74317a7d5de1865d096c377923a764be5e6879) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) - ROM_LOAD( "2c.rom", 0xe000, 0x2000, CRC(7c09e50a) SHA1(5f004d60bbb7355e008a9cda137b28bc2192b8ef) ) + ROM_REGION( 0x2000, "sound_rom", 0 ) + ROM_LOAD( "2c.rom", 0x0000, 0x2000, CRC(7c09e50a) SHA1(5f004d60bbb7355e008a9cda137b28bc2192b8ef) ) - ROM_REGION( 0x8000, "sub", 0 ) + ROM_REGION( 0x8000, "slave_rom", 0 ) ROM_LOAD16_BYTE( "8c.rom", 0x0000, 0x4000, CRC(a00cd959) SHA1(cc5621103c31cfbc65941615cab391db0f74e6ce) ) ROM_LOAD16_BYTE("10c.rom", 0x0001, 0x4000, CRC(09ce209b) SHA1(2ed46d6592f8227bac8ab54963d9a300706ade47) ) @@ -74,14 +251,14 @@ ROM_START( liblrabl ) ROM_END ROM_START( toypop ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "tp1-2.5b", 0x8000, 0x4000, CRC(87469620) SHA1(2ee257486c9c044386ac7d0cd4a90583eaeb3e97) ) - ROM_LOAD( "tp1-1.5c", 0xc000, 0x4000, CRC(dee2fd6e) SHA1(b2c12008d6d3e7544ba3c12a52a6abf9181842c8) ) + ROM_REGION( 0x8000, "master_rom", 0 ) + ROM_LOAD( "tp1-2.5b", 0x0000, 0x4000, CRC(87469620) SHA1(2ee257486c9c044386ac7d0cd4a90583eaeb3e97) ) + ROM_LOAD( "tp1-1.5c", 0x4000, 0x4000, CRC(dee2fd6e) SHA1(b2c12008d6d3e7544ba3c12a52a6abf9181842c8) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) - ROM_LOAD( "tp1-3.2c", 0xe000, 0x2000, CRC(5f3bf6e2) SHA1(d1b3335661b9b23cb10001416c515b77b5e783e9) ) + ROM_REGION( 0x2000, "sound_rom", 0 ) + ROM_LOAD( "tp1-3.2c", 0x0000, 0x2000, CRC(5f3bf6e2) SHA1(d1b3335661b9b23cb10001416c515b77b5e783e9) ) - ROM_REGION( 0x8000, "sub", 0 ) + ROM_REGION( 0x8000, "slave_rom", 0 ) ROM_LOAD16_BYTE( "tp1-4.8c", 0x0000, 0x4000, CRC(76997db3) SHA1(5023a2f20a5f2c9baff130f6832583493c71f883) ) ROM_LOAD16_BYTE("tp1-5.10c", 0x0001, 0x4000, CRC(37de8786) SHA1(710365e34c05d01815844c414518f93234b6160b) ) -- cgit v1.2.3-70-g09d2 From 590b0615eada547c67523ae350dc96a2df1d53da Mon Sep 17 00:00:00 2001 From: angelosa Date: Mon, 7 Mar 2016 21:44:42 +0100 Subject: Fixed fg mapper layout, nw --- src/mame/drivers/toypop.cpp | 108 +++++++++++++++++++++++++++++--------------- 1 file changed, 72 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp index a0774a2e7e2..148ec231f2c 100644 --- a/src/mame/drivers/toypop.cpp +++ b/src/mame/drivers/toypop.cpp @@ -47,6 +47,8 @@ public: DECLARE_READ8_MEMBER(irq_enable_r); INTERRUPT_GEN_MEMBER(master_vblank_irq); + DECLARE_PALETTE_INIT(toypop); + protected: // driver_device overrides // virtual void machine_start() override; @@ -60,49 +62,83 @@ private: }; -void toypop_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect) +PALETTE_INIT_MEMBER(toypop_state, toypop) { - gfx_element *gfx_0 = m_gfxdecode->gfx(0); - static int test = 1; - int count; - - if(machine().input().code_pressed_once(KEYCODE_Z)) - test++; + const UINT8 *color_prom = memregion("proms")->base(); - if(machine().input().code_pressed_once(KEYCODE_X)) - test--; - - popmessage("%d",test); - - for(count=0;count<32;count++) + for (int i = 0;i < 256;i++) { - int x = count % 2; - int y = count / 2; - - UINT16 tile = m_fgvram[count]; - UINT8 color = 0;//(m_fgattr[count] & 0xfc) >> 2; - - gfx_0->opaque(bitmap,cliprect,tile,color,0,0,x*8,y*8); + int bit0,bit1,bit2,bit3,r,g,b; + + // red component + bit0 = (color_prom[i] >> 0) & 0x01; + bit1 = (color_prom[i] >> 1) & 0x01; + bit2 = (color_prom[i] >> 2) & 0x01; + bit3 = (color_prom[i] >> 3) & 0x01; + r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; + // green component + bit0 = (color_prom[i+0x100] >> 0) & 0x01; + bit1 = (color_prom[i+0x100] >> 1) & 0x01; + bit2 = (color_prom[i+0x100] >> 2) & 0x01; + bit3 = (color_prom[i+0x100] >> 3) & 0x01; + g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; + // blue component + bit0 = (color_prom[i+0x200] >> 0) & 0x01; + bit1 = (color_prom[i+0x200] >> 1) & 0x01; + bit2 = (color_prom[i+0x200] >> 2) & 0x01; + bit3 = (color_prom[i+0x200] >> 3) & 0x01; + b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; + + palette.set_indirect_color(i, rgb_t(r,g,b)); } - for(;count<64;count++) + for (int i = 0;i < 256;i++) { - int x = 34 + (count % 2); - int y = count / 2; - - UINT16 tile = m_fgvram[count]; - UINT8 color = 0;//(m_fgattr[count] & 0xfc) >> 2; - - gfx_0->opaque(bitmap,cliprect,tile,color,0,0,x*8,y*8); + UINT8 entry; + + // characters + palette.set_pen_indirect(i + 0*256, (color_prom[i + 0x300] & 0x0f) | 0x70); + palette.set_pen_indirect(i + 1*256, (color_prom[i + 0x300] & 0x0f) | 0xf0); + // sprites + entry = color_prom[i + 0x500]; + palette.set_pen_indirect(i + 2*256, entry); } + for (int i = 0;i < 16;i++) + { + // background + palette.set_pen_indirect(i + 3*256 + 0*16, 0x60 + i); + palette.set_pen_indirect(i + 3*256 + 1*16, 0xe0 + i); + } +} + +void toypop_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect) +{ + gfx_element *gfx_0 = m_gfxdecode->gfx(0); + int count; - for (;count<32*28;count++) + for (count=0;count<32*32;count++) { - int x = 2 + (count % 32); - int y = count / 32; + int x;// = (count % 32); + int y; //= count / 32; + + if(count < 64) + { + x = 34 + (count / 32); + y = (count % 32) - 2; + } + else if(count >= 32*30) + { + x = (count / 32) - 30; + y = (count % 32) - 2; + } + else + { + x = 2 + (count % 32); + y = (count / 32) - 2; + } UINT16 tile = m_fgvram[count]; - UINT8 color = 0;//(m_fgattr[count] & 0xfc) >> 2; + UINT8 color = m_fgattr[count] & 0x3f; //if((color & 0x30) != 0x30) gfx_0->opaque(bitmap,cliprect,tile,color,0,0,x*8,y*8); @@ -202,15 +238,15 @@ static MACHINE_CONFIG_START( liblrabl, toypop_state ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60.606060) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(36*8, 28*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) + MCFG_SCREEN_SIZE(36*8, 32*8) + MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 32*8-1) MCFG_SCREEN_UPDATE_DRIVER(toypop_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", toypop) MCFG_PALETTE_ADD("palette", 128*4+64*4+16*2) - //MCFG_PALETTE_INDIRECT_ENTRIES(256) - //MCFG_PALETTE_INIT_OWNER(toypop_state, toypop) + MCFG_PALETTE_INDIRECT_ENTRIES(256) + MCFG_PALETTE_INIT_OWNER(toypop_state, toypop) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") -- cgit v1.2.3-70-g09d2 From b61b025eab66d07488f10ba3b932d92d1476ba37 Mon Sep 17 00:00:00 2001 From: yz70s Date: Sat, 27 Feb 2016 09:51:54 +0100 Subject: chihiro.cpp: add region "mediaboard" and put media board rom in it (nw) also a few litte changes --- src/mame/drivers/chihiro.cpp | 48 ++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/chihiro.cpp b/src/mame/drivers/chihiro.cpp index 0b81164dd90..be4ec8ea3c2 100644 --- a/src/mame/drivers/chihiro.cpp +++ b/src/mame/drivers/chihiro.cpp @@ -609,6 +609,7 @@ protected: UINT8 read_buffer[0x20]; UINT8 write_buffer[0x20]; chihiro_state *chihirosystem; + static const int size_factor = 2; }; //************************************************************************** @@ -665,10 +666,12 @@ int ide_baseboard_device::read_sector(UINT32 lba, void *buffer) /* It assumes there are 4 "partitions", the size of the first one depends on bits 3-0 of io port 40f4: - Value Size lba - 0 0x40000-0x8000 - ... - 4 0x400000-0x8000 + Value Size lba + 0 0x40000-0x8000 + 1 0x80000-0x8000 + 2 0x100000-0x8000 + 3 0x200000-0x8000 + 4 0x400000-0x8000 The size of the second one is always 0x8000 sectors, and is used as a special communication area This is a list of the partitions in the minimum size case: Name Start lba Size lba Size @@ -686,13 +689,13 @@ int ide_baseboard_device::read_sector(UINT32 lba, void *buffer) logerror("baseboard: read sector lba %08x\n", lba); if (lba >= 0x08000000) { off = (lba & 0x7ff) * 512; - data = memregion(":others")->base(); + data = memregion(":mediaboard")->base(); memcpy(buffer, data + off, 512); return 1; } - if (lba >= 0xf8000) { + if (lba >= ((0x40000 << size_factor) - 0x8000)) { memset(buffer, 0, 512); - lba = lba - 0xf8000; + lba = lba - ((0x40000 << size_factor) - 0x8000); if (lba == 0x4800) memcpy(buffer, read_buffer, 0x20); else if (lba == 0x4801) @@ -709,8 +712,8 @@ int ide_baseboard_device::read_sector(UINT32 lba, void *buffer) int ide_baseboard_device::write_sector(UINT32 lba, const void *buffer) { logerror("baseboard: write sector lba %08x\n", lba); - if (lba >= 0xf8000) { - lba = lba - 0xf8000; + if (lba >= ((0x40000 << size_factor) - 0x8000)) { + lba = lba - ((0x40000 << size_factor) - 0x8000); if (lba == 0x4800) memcpy(read_buffer, buffer, 0x20); else if (lba == 0x4801) { @@ -804,18 +807,18 @@ READ32_MEMBER(chihiro_state::mediaboard_r) logerror("I/O port read %04x mask %08X\n", offset * 4 + 0x4000, mem_mask); r = 0; - if ((offset == 7) && ACCESSING_BITS_16_31) + if ((offset == 0x1c/4) && ACCESSING_BITS_16_31) r = 0x10000000; - if ((offset == 8) && ACCESSING_BITS_0_15) + if ((offset == 0x20/4) && ACCESSING_BITS_0_15) r = 0x000000a0; - if ((offset == 8) && ACCESSING_BITS_16_31) + if ((offset == 0x20/4) && ACCESSING_BITS_16_31) r = 0x42580000; - if ((offset == 9) && ACCESSING_BITS_0_15) + if ((offset == 0x24/4) && ACCESSING_BITS_0_15) r = 0x00004d41; - if ((offset == 0x3c) && ACCESSING_BITS_0_15) + if ((offset == 0xf0/4) && ACCESSING_BITS_0_15) r = 0x00000000; // bits 15-0 0 if media board present - if ((offset == 0x3d) && ACCESSING_BITS_0_15) - r = 0x00000002; // bits 3-0 size of dimm board memory. Must be 2 + if ((offset == 0xf4/4) && ACCESSING_BITS_0_15) + r = 2; // bits 3-0 size of dimm board memory. 0=128 1=256 2=512 3=1024 Must be 2 return r; } @@ -823,7 +826,7 @@ WRITE32_MEMBER(chihiro_state::mediaboard_w) { logerror("I/O port write %04x mask %08X value %08X\n", offset * 4 + 0x4000, mem_mask, data); // irq 10 - if ((offset == 0x38) && ACCESSING_BITS_8_15) + if ((offset == 0xe0/4) && ACCESSING_BITS_8_15) xbox_base_devs.pic8259_2->ir2_w(0); } @@ -890,12 +893,13 @@ MACHINE_CONFIG_END ROM_REGION( 0x100000, "bios", 0) \ ROM_SYSTEM_BIOS( 0, "bios0", "Chihiro Bios" ) \ ROM_LOAD_BIOS( 0, "chihiro_xbox_bios.bin", 0x000000, 0x80000, CRC(66232714) SHA1(b700b0041af8f84835e45d1d1250247bf7077188) ) \ - ROM_REGION( 0x404080, "others", 0) \ + ROM_REGION( 0x200000, "mediaboard", 0) \ ROM_LOAD16_WORD_SWAP_BIOS( 0, "fpr21042_m29w160et.bin", 0x000000, 0x200000, CRC(a4fcab0b) SHA1(a13cf9c5cdfe8605d82150b7573652f419b30197) ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 0, "ic10_g24lc64.bin", 0x200000, 0x2000, CRC(cfc5e06f) SHA1(3ababd4334d8d57abb22dd98bd2d347df39648d9) ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 0, "ic11_24lc024.bin", 0x202000, 0x80, CRC(8dc8374e) SHA1(cc03a0650bfac4bf6cb66e414bbef121cba53efe) ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 0, "pc20_g24lc64.bin", 0x202080, 0x2000, CRC(7742ab62) SHA1(82dad6e2a75bab4a4840dc6939462f1fb9b95101) ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 0, "ver1305.bin", 0x204080, 0x200000, CRC(a738ea1c) SHA1(45d94d0c39be1cb3db9fab6610a88a550adda4e9) ) + ROM_REGION( 0x204080, "others", 0) \ + ROM_LOAD16_WORD_SWAP_BIOS( 0, "ic10_g24lc64.bin", 0x0000, 0x2000, CRC(cfc5e06f) SHA1(3ababd4334d8d57abb22dd98bd2d347df39648d9) ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 0, "ic11_24lc024.bin", 0x2000, 0x80, CRC(8dc8374e) SHA1(cc03a0650bfac4bf6cb66e414bbef121cba53efe) ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 0, "pc20_g24lc64.bin", 0x2080, 0x2000, CRC(7742ab62) SHA1(82dad6e2a75bab4a4840dc6939462f1fb9b95101) ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 0, "ver1305.bin", 0x4080, 0x200000, CRC(a738ea1c) SHA1(45d94d0c39be1cb3db9fab6610a88a550adda4e9) ) ROM_START( chihiro ) CHIHIRO_BIOS -- cgit v1.2.3-70-g09d2 From d9a00119f4df57e7845524dfcbd3408ab58d9173 Mon Sep 17 00:00:00 2001 From: yz70s Date: Sat, 27 Feb 2016 09:59:40 +0100 Subject: xbox.cpp: more usb (nw) --- src/mame/includes/xbox.h | 68 ++++++++-- src/mame/machine/xbox.cpp | 313 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 310 insertions(+), 71 deletions(-) (limited to 'src') diff --git a/src/mame/includes/xbox.h b/src/mame/includes/xbox.h index 8094ac33100..045d7504700 100644 --- a/src/mame/includes/xbox.h +++ b/src/mame/includes/xbox.h @@ -1,6 +1,8 @@ // license:BSD-3-Clause // copyright-holders:Samuele Zannoli +#include + struct OHCIEndpointDescriptor { int mps; // MaximumPacketSize int f; // Format @@ -211,29 +213,79 @@ enum USBDeviceState ConfiguredState }; +enum USBControlDirection +{ + HostToDevice=0, + DeviceToHost=1 +}; + +enum USBEndpointType +{ + ControlEndpoint=0, + IsochronousEndpoint, + BulkEndpoint, + InterruptEndpoint +}; + +struct usb_device_interface_alternate +{ + USBStandardInterfaceDescriptor interface_descriptor; + std::forward_list endpoint_descriptors; +}; + +struct usb_device_interface +{ + std::forward_list alternate_settings; + int selected_alternate; +}; + +struct usb_device_configuration +{ + USBStandardConfigurationDescriptor configuration_descriptor; + std::forward_list interfaces; +}; + class ohci_function_device { public: ohci_function_device(running_machine &machine); void execute_reset(); int execute_transfer(int address, int endpoint, int pid, UINT8 *buffer, int size); +protected: + int handle_nonstandard_request(int endpoint, USBSetupPacket *setup); + virtual int handle_get_status_request(int endpoint, USBSetupPacket *setup) = 0; + virtual int handle_clear_feature_request(int endpoint, USBSetupPacket *setup) = 0; + virtual int handle_set_feature_request(int endpoint, USBSetupPacket *setup) = 0; + virtual int handle_set_descriptor_request(int endpoint, USBSetupPacket *setup) = 0; + virtual int handle_synch_frame_request(int endpoint, USBSetupPacket *setup) = 0; private: void add_device_descriptor(USBStandardDeviceDescriptor &descriptor); void add_configuration_descriptor(USBStandardConfigurationDescriptor &descriptor); void add_interface_descriptor(USBStandardInterfaceDescriptor &descriptor); void add_endpoint_descriptor(USBStandardEndpointDescriptor &descriptor); - int handle_nonstandard_request(USBSetupPacket *setup); + void select_configuration(int index); + void select_alternate(int interfacei, int index); + int find_alternate(int interfacei); + struct { + int type; + int controldirection; + int controltype; + int controlrecipient; + int remain; + UINT8 *position; + UINT8 buffer[4]; + } endpoints[256]; int state; - int address; + bool settingaddress; int newaddress; - int controldirection; - int controltype; - int controlrecipient; + int address; int configurationvalue; - bool settingaddress; - int remain; - UINT8 *position; UINT8 *descriptors; int descriptors_pos; + USBStandardDeviceDescriptor device_descriptor; + std::forward_list configurations; + usb_device_configuration *latest_configuration; + usb_device_interface_alternate *latest_alternate; + usb_device_configuration *selected_configuration; }; class xbox_base_state : public driver_device diff --git a/src/mame/machine/xbox.cpp b/src/mame/machine/xbox.cpp index 5748e09d469..2f8de78b4b4 100644 --- a/src/mame/machine/xbox.cpp +++ b/src/mame/machine/xbox.cpp @@ -846,13 +846,19 @@ ohci_function_device::ohci_function_device(running_machine &machine) descriptors_pos = 0; address = 0; newaddress = 0; - controldirection = 0; - controltype = 0; - controlrecipient = 0; - configurationvalue = 0; - remain = 0; - position = nullptr; + for (int e = 0; e < 256;e++) { + endpoints[e].type = -1; + endpoints[e].controldirection = 0; + endpoints[e].controltype = 0; + endpoints[e].controlrecipient = 0; + endpoints[e].remain = 0; + endpoints[e].position = nullptr; + } + endpoints[0].type = ControlEndpoint; settingaddress = false; + configurationvalue = 0; + latest_configuration = nullptr; + latest_alternate = nullptr; add_device_descriptor(devdesc); add_configuration_descriptor(condesc); add_interface_descriptor(intdesc); @@ -862,26 +868,175 @@ ohci_function_device::ohci_function_device(running_machine &machine) void ohci_function_device::add_device_descriptor(USBStandardDeviceDescriptor &descriptor) { - memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor)); + UINT8 *p = descriptors + descriptors_pos; + + p[0] = descriptor.bLength; + p[1] = descriptor.bDescriptorType; + p[2] = descriptor.bcdUSB & 255; + p[3] = descriptor.bcdUSB >> 8; + p[4] = descriptor.bDeviceClass; + p[5] = descriptor.bDeviceSubClass; + p[6] = descriptor.bDeviceProtocol; + p[7] = descriptor.bMaxPacketSize0; + p[8] = descriptor.idVendor & 255; + p[9] = descriptor.idVendor >> 8; + p[10] = descriptor.idProduct & 255; + p[11] = descriptor.idProduct >> 8; + p[12] = descriptor.bcdDevice & 255; + p[13] = descriptor.bcdDevice >> 8; + p[14] = descriptor.iManufacturer; + p[15] = descriptor.iProduct; + p[16] = descriptor.iSerialNumber; + p[17] = descriptor.bNumConfigurations; descriptors_pos += descriptor.bLength; + memcpy(&device_descriptor, &descriptor, sizeof(USBStandardDeviceDescriptor)); } void ohci_function_device::add_configuration_descriptor(USBStandardConfigurationDescriptor &descriptor) { - memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor)); + usb_device_configuration *c = new usb_device_configuration; + UINT8 *p = descriptors + descriptors_pos; + + p[0] = descriptor.bLength; + p[1] = descriptor.bDescriptorType; + p[2] = descriptor.wTotalLength & 255; + p[3] = descriptor.wTotalLength >> 8; + p[4] = descriptor.bNumInterfaces; + p[5] = descriptor.bConfigurationValue; + p[6] = descriptor.iConfiguration; + p[7] = descriptor.bmAttributes; + p[8] = descriptor.MaxPower; descriptors_pos += descriptor.bLength; + memcpy(&c->configuration_descriptor, &descriptor, sizeof(USBStandardConfigurationDescriptor)); + configurations.push_front(*c); + latest_configuration = c; + latest_alternate = nullptr; } void ohci_function_device::add_interface_descriptor(USBStandardInterfaceDescriptor &descriptor) { - memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor)); + usb_device_interface *ii; + usb_device_interface_alternate *aa; + UINT8 *p = descriptors + descriptors_pos; + + if (latest_configuration == nullptr) + return; + p[0] = descriptor.bLength; + p[1] = descriptor.bDescriptorType; + p[2] = descriptor.bInterfaceNumber; + p[3] = descriptor.bAlternateSetting; + p[4] = descriptor.bNumEndpoints; + p[5] = descriptor.bInterfaceClass; + p[6] = descriptor.bInterfaceSubClass; + p[7] = descriptor.bInterfaceProtocol; + p[8] = descriptor.iInterface; descriptors_pos += descriptor.bLength; + for (auto i = latest_configuration->interfaces.begin(); i != latest_configuration->interfaces.end(); ++i) + { + if (i->alternate_settings.front().interface_descriptor.bInterfaceNumber == descriptor.bInterfaceNumber) + { + aa = new usb_device_interface_alternate; + memcpy(&aa->interface_descriptor, &descriptor, sizeof(USBStandardInterfaceDescriptor)); + i->alternate_settings.push_front(*aa); + latest_alternate = aa; + return; + } + } + ii = new usb_device_interface; + aa = new usb_device_interface_alternate; + memcpy(&aa->interface_descriptor, &descriptor, sizeof(USBStandardInterfaceDescriptor)); + ii->selected_alternate = -1; + ii->alternate_settings.push_front(*aa); + latest_alternate = aa; + latest_configuration->interfaces.push_front(*ii); } void ohci_function_device::add_endpoint_descriptor(USBStandardEndpointDescriptor &descriptor) { - memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor)); + UINT8 *p = descriptors + descriptors_pos; + + if (latest_alternate == nullptr) + return; + p[0] = descriptor.bLength; + p[1] = descriptor.bDescriptorType; + p[2] = descriptor.bEndpointAddress; + p[3] = descriptor.bmAttributes; + p[4] = descriptor.wMaxPacketSize & 255; + p[5] = descriptor.wMaxPacketSize >> 8; + p[6] = descriptor.bInterval; descriptors_pos += descriptor.bLength; + latest_alternate->endpoint_descriptors.push_front(descriptor); +} + +void ohci_function_device::select_configuration(int index) +{ + configurationvalue = index; + for (auto c = configurations.begin(); c != configurations.end(); ++c) + { + if (c->configuration_descriptor.bConfigurationValue == index) + { + selected_configuration = &(*c); + for (auto i = c->interfaces.begin(); i != c->interfaces.end(); ++i) + { + i->selected_alternate = 0; + for (auto a = i->alternate_settings.begin(); a != i->alternate_settings.end(); ++a) + { + if (a->interface_descriptor.bAlternateSetting == 0) + { + for (auto e = a->endpoint_descriptors.begin(); e != a->endpoint_descriptors.end(); ++e) + { + endpoints[e->bEndpointAddress].type = e->bmAttributes & 3; + endpoints[e->bEndpointAddress].remain = 0; + } + } + } + } + } + } +} + +void ohci_function_device::select_alternate(int interfacei, int index) +{ + for (auto i = selected_configuration->interfaces.begin(); i != selected_configuration->interfaces.end(); ++i) + { + for (auto a = i->alternate_settings.begin(); a != i->alternate_settings.end(); ++a) + { + if ((a->interface_descriptor.bInterfaceNumber == interfacei) && (a->interface_descriptor.bAlternateSetting == i->selected_alternate)) + { + for (auto e = a->endpoint_descriptors.begin(); e != a->endpoint_descriptors.end(); ++e) + { + endpoints[e->bEndpointAddress].type = -1; + } + } + } + for (auto a = i->alternate_settings.begin(); a != i->alternate_settings.end(); ++a) + { + if ((a->interface_descriptor.bInterfaceNumber == interfacei) && (a->interface_descriptor.bAlternateSetting == index)) + { + i->selected_alternate = index; + for (auto e = a->endpoint_descriptors.begin(); e != a->endpoint_descriptors.end(); ++e) + { + endpoints[e->bEndpointAddress].type = e->bmAttributes & 3; + endpoints[e->bEndpointAddress].remain = 0; + } + } + } + } +} + +int ohci_function_device::find_alternate(int interfacei) +{ + for (auto i = selected_configuration->interfaces.begin(); i != selected_configuration->interfaces.end(); ++i) + { + for (auto a = i->alternate_settings.begin(); a != i->alternate_settings.end(); ++a) + { + if (a->interface_descriptor.bInterfaceNumber == interfacei) + { + return i->selected_alternate; + } + } + } + return 0; } void ohci_function_device::execute_reset() @@ -894,25 +1049,30 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U { int descriptortype;// descriptorindex; - if (endpoint == 0) { - if (pid == SetupPid) { - USBSetupPacket *p=(USBSetupPacket *)buffer; - // define direction 0:host->device 1:device->host - controldirection = (p->bmRequestType & 128) >> 7; - // case ==1, IN data stage and OUT status stage - // case ==0, OUT data stage and IN status stage - // data stage is optional, IN status stage - controltype = (p->bmRequestType & 0x60) >> 5; - controlrecipient = p->bmRequestType & 0x1f; - position = nullptr; + if (pid == SetupPid) { + USBSetupPacket *p=(USBSetupPacket *)buffer; + // define direction 0:host->device 1:device->host + // case == 1, IN data stage and OUT status stage + // case == 0, OUT data stage and IN status stage + // data stage is optional, IN status stage + endpoints[endpoint].controldirection = (p->bmRequestType & 128) >> 7; + endpoints[endpoint].controltype = (p->bmRequestType & 0x60) >> 5; + endpoints[endpoint].controlrecipient = p->bmRequestType & 0x1f; + if (endpoint == 0) { + endpoints[endpoint].position = nullptr; // number of byte to transfer in data stage (0 no data stage) - remain = p->wLength; + endpoints[endpoint].remain = p->wLength; // if standard device request - if ((controltype == StandardType) && (controlrecipient == DeviceRecipient)) { + if ((endpoints[endpoint].controltype == StandardType) && (endpoints[endpoint].controlrecipient == DeviceRecipient)) { switch (p->bRequest) { case GET_STATUS: + return handle_get_status_request(endpoint, p); + break; case CLEAR_FEATURE: + return handle_clear_feature_request(endpoint, p); + break; case SET_FEATURE: + return handle_set_feature_request(endpoint, p); break; case SET_ADDRESS: newaddress = p->wValue; @@ -922,52 +1082,74 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U descriptortype = p->wValue >> 8; //descriptorindex = p->wValue & 255; if (descriptortype == DEVICE) { // device descriptor - position = descriptors; - remain = descriptors[0]; + endpoints[endpoint].position = descriptors; + endpoints[endpoint].remain = descriptors[0]; } else if (descriptortype == CONFIGURATION) { // configuration descriptor - position = descriptors + 18; - remain = descriptors[18+2]; + endpoints[endpoint].position = descriptors + 18; + endpoints[endpoint].remain = descriptors[18 + 2]; } else if (descriptortype == INTERFACE) { // interface descriptor - position = descriptors + 18 + 9; - remain = descriptors[18 + 9]; + endpoints[endpoint].position = descriptors + 18 + 9; + endpoints[endpoint].remain = descriptors[18 + 9]; } else if (descriptortype == ENDPOINT) { // endpoint descriptor - position = descriptors + 18 + 9 + 9; - remain = descriptors[18 + 9 + 9]; + endpoints[endpoint].position = descriptors + 18 + 9 + 9; + endpoints[endpoint].remain = descriptors[18 + 9 + 9]; } else - remain = 0; - if (remain > p->wLength) - remain = p->wLength; + endpoints[endpoint].remain = 0; + if (endpoints[endpoint].remain > p->wLength) + endpoints[endpoint].remain = p->wLength; break; case SET_CONFIGURATION: if (p->wValue == 0) state = AddressState; else { - configurationvalue = p->wValue; + select_configuration(p->wValue); state = ConfiguredState; } break; + case SET_INTERFACE: + select_alternate(p->wIndex, p->wValue); + break; case SET_DESCRIPTOR: + return handle_set_descriptor_request(endpoint, p); + break; case GET_CONFIGURATION: + endpoints[endpoint].buffer[0] = (UINT8)configurationvalue; + endpoints[endpoint].position = endpoints[endpoint].buffer; + endpoints[endpoint].remain = 1; + if (p->wLength == 0) + endpoints[endpoint].remain = 0; + break; case GET_INTERFACE: - case SET_INTERFACE: + endpoints[endpoint].buffer[0] = (UINT8)find_alternate(p->wIndex); + endpoints[endpoint].position = endpoints[endpoint].buffer; + endpoints[endpoint].remain = 1; + if (p->wLength == 0) + endpoints[endpoint].remain = 0; + break; case SYNCH_FRAME: + return handle_synch_frame_request(endpoint, p); default: + return handle_nonstandard_request(endpoint, p); break; } } else - return handle_nonstandard_request(p); + return handle_nonstandard_request(endpoint, p); size = 0; } - else if (pid == InPid) { + else + return handle_nonstandard_request(endpoint, p); + } + else if (pid == InPid) { + if (endpoint == 0) { // if no data has been transferred (except for the setup stage) // and the lenght of this IN transaction is 0 // assume this is the status stage - if ((size == 0) && (remain == 0)) { + if ((size == 0) && (endpoints[endpoint].remain == 0)) { if (settingaddress == true) { // set of address is active at end of status stage @@ -980,53 +1162,58 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U // case ==1, give data // case ==0, nothing // if device->host - if (controldirection == 1) { + if (endpoints[endpoint].controldirection == DeviceToHost) { // data stage - if (size > remain) - size = remain; - if (position != nullptr) - memcpy(buffer, position, size); - position = position + size; - remain = remain - size; + if (size > endpoints[endpoint].remain) + size = endpoints[endpoint].remain; + if (endpoints[endpoint].position != nullptr) + memcpy(buffer, endpoints[endpoint].position, size); + endpoints[endpoint].position = endpoints[endpoint].position + size; + endpoints[endpoint].remain = endpoints[endpoint].remain - size; } } - else if (pid == OutPid) { + else + return -1; + } + else if (pid == OutPid) { + if (endpoint == 0) { // case ==1, nothing // case ==0, give data // if host->device - if (controldirection == 0) { + if (endpoints[endpoint].controldirection == HostToDevice) { // data stage - if (size > remain) - size = remain; - if (position != nullptr) - memcpy(position, buffer, size); - position = position + size; - remain = remain - size; + if (size > endpoints[endpoint].remain) + size = endpoints[endpoint].remain; + if (endpoints[endpoint].position != nullptr) + memcpy(endpoints[endpoint].position, buffer, size); + endpoints[endpoint].position = endpoints[endpoint].position + size; + endpoints[endpoint].remain = endpoints[endpoint].remain - size; } } + else + return -1; } - else - return -1; return size; } -int ohci_function_device::handle_nonstandard_request(USBSetupPacket *setup) +int ohci_function_device::handle_nonstandard_request(int endpoint, USBSetupPacket *setup) { // >=8 ==42 !=0 !=0 1,3 2<20 <=20 static UINT8 mytestdata[16] = { 0x10,0x42 ,0x32,0x43,1 ,0x65,0x18,0x20,0x98,0xa9,0xba,0xcb,0xdc,0xed,0xfe }; - if ((controltype == VendorType) && (controlrecipient == InterfaceRecipient)) + if ((endpoints[endpoint].controltype == VendorType) && (endpoints[endpoint].controlrecipient == InterfaceRecipient)) { if (setup->bRequest == GET_DESCRIPTOR) { if (setup->wValue == 0x4200) { - position = mytestdata; - remain = 16; + endpoints[endpoint].position = mytestdata; + endpoints[endpoint].remain = 16; + return 0; } } } - return 0; + return -1; } void xbox_base_state::usb_ohci_interrupts() @@ -1232,8 +1419,8 @@ WRITE32_MEMBER(xbox_base_state::audio_apu_w) return; } if (offset == 0x2037c / 4) { // value related to sample rate - INT16 v = (INT16)(data >> 16); // upper 16 bits as a signed 16 bit value - float vv = ((float)v) / 4096.0f; // divide by 4096 + INT16 v0 = (INT16)(data >> 16); // upper 16 bits as a signed 16 bit value + float vv = ((float)v0) / 4096.0f; // divide by 4096 float vvv = powf(2, vv); // two to the vv int f = vvv*48000.0f; // sample rate apust.voices_frequency[apust.voice_number] = f; -- cgit v1.2.3-70-g09d2 From c84be35802242a12026561551d4b6c666382ccb5 Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Mon, 7 Mar 2016 16:52:19 -0500 Subject: Uppercase hash fixes (nw) --- src/mame/drivers/goupil.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/goupil.cpp b/src/mame/drivers/goupil.cpp index 8269dfdb8ae..72164e13d92 100644 --- a/src/mame/drivers/goupil.cpp +++ b/src/mame/drivers/goupil.cpp @@ -486,23 +486,23 @@ ROM_START( goupilg1 ) ROM_DEFAULT_BIOS("v1_0") ROM_SYSTEM_BIOS(0, "v1_0", "Version 1.0") - ROMX_LOAD( "SMT_Goupil_G1_MON_1.bin", 0x0000, 0x0400, CRC(98B7BE69) SHA1(69E83FE78A43FCF2B08FB0BCEFB0D217A57B1ECB), ROM_BIOS(1) ) - ROM_LOAD ( "SMT_Goupil_G1_MON_2.bin", 0x0400, 0x0400, CRC(19386B81) SHA1(E52F63FD29D374319781E9677DE6D3FD61A3684C) ) + ROMX_LOAD( "SMT_Goupil_G1_MON_1.bin", 0x0000, 0x0400, CRC(98b7be69) SHA1(69e83fe78a43fcf2b08fb0bcefb0d217a57b1ecb), ROM_BIOS(1) ) + ROM_LOAD ( "SMT_Goupil_G1_MON_2.bin", 0x0400, 0x0400, CRC(19386b81) SHA1(e52f63fd29d374319781e9677de6d3fd61a3684c) ) - ROM_LOAD( "SMT_Goupil_G1_MOD_3.bin", 0x0800, 0x0400, CRC(E662F152) SHA1(11B91C5737E7572A2C18472B66BBD16B485132D5) ) + ROM_LOAD( "SMT_Goupil_G1_MOD_3.bin", 0x0800, 0x0400, CRC(e662f152) SHA1(11b91c5737e7572a2c18472b66bbd16b485132d5) ) - ROMX_LOAD( "SMT_Goupil_G1_Basic_1.bin", 0x1000, 0x0400, CRC(AD105B12) SHA1(631CD4B997F76B57BF2509E4BFF30B1595C8BD13), ROM_BIOS(1) ) - ROMX_LOAD( "SMT_Goupil_G1_Basic_2.bin", 0x1400, 0x0400, CRC(0C5C309C) SHA1(F1CAB4B0F9191E53113790A95F1AB7108F9406A1), ROM_BIOS(1) ) - ROMX_LOAD( "SMT_Goupil_G1_Basic_3.bin", 0x1800, 0x0400, CRC(1F1EB127) SHA1(DBBB880C79D515ACBFCB2BE9A4C96962F3E4EDEA), ROM_BIOS(1) ) - ROMX_LOAD( "SMT_Goupil_G1_Basic_4.bin", 0x1C00, 0x0400, CRC(09BE48E4) SHA1(86CAE0D159583C1D572A5754F3BB6B4A2E479359), ROM_BIOS(1) ) - ROMX_LOAD( "SMT_Goupil_G1_Basic_5.bin", 0x2000, 0x0400, CRC(BDEB395C) SHA1(32A50468F1CA772EE45A1F5C61C66F3ECC774074), ROM_BIOS(1) ) - ROMX_LOAD( "SMT_Goupil_G1_Basic_6.bin", 0x2400, 0x0400, CRC(850A4000) SHA1(720F0BB3E45877835219B7E1D943EF4F19B9977D), ROM_BIOS(1) ) - ROMX_LOAD( "SMT_Goupil_G1_Basic_7.bin", 0x2800, 0x0400, CRC(586C7670) SHA1(13E2E96B9F1A53555CE0D55F657CF3C6B96F10A0), ROM_BIOS(1) ) - ROMX_LOAD( "SMT_Goupil_G1_Basic_8.bin", 0x2C00, 0x0400, CRC(33281300) SHA1(CE631FA8157A3F8869C5FEFE24B7F40E06696DF9), ROM_BIOS(1) ) - ROMX_LOAD( "SMT_Goupil_G1_Basic_9.bin", 0x3000, 0x0400, CRC(A3911201) SHA1(8623A0A2D83EB3A27A795030643C5C05A4350A9F), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_1.bin", 0x1000, 0x0400, CRC(ad105b12) SHA1(631cd4b997f76b57bf2509e4bff30b1595c8bd13), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_2.bin", 0x1400, 0x0400, CRC(0c5c309c) SHA1(f1cab4b0f9191e53113790a95f1ab7108f9406a1), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_3.bin", 0x1800, 0x0400, CRC(1f1eb127) SHA1(dbbb880c79d515acbfcb2be9a4c96962f3e4edea), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_4.bin", 0x1C00, 0x0400, CRC(09be48e4) SHA1(86cae0d159583c1d572a5754f3bb6b4a2e479359), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_5.bin", 0x2000, 0x0400, CRC(bdeb395c) SHA1(32a50468f1ca772ee45a1f5c61c66f3ecc774074), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_6.bin", 0x2400, 0x0400, CRC(850a4000) SHA1(720f0bb3e45877835219b7e1d943ef4f19b9977d), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_7.bin", 0x2800, 0x0400, CRC(586c7670) SHA1(13e2e96b9f1a53555ce0d55f657cf3c6b96f10a0), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_8.bin", 0x2C00, 0x0400, CRC(33281300) SHA1(ce631fa8157a3f8869c5fefe24b7f40e06696df9), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_9.bin", 0x3000, 0x0400, CRC(a3911201) SHA1(8623a0a2d83eb3a27a795030643c5c05a4350a9f), ROM_BIOS(1) ) ROM_REGION( 0x400, "ef9364", 0 ) - ROM_LOAD( "SMT_Goupil_G1_Charset.bin", 0x0000, 0x0400, CRC(8B6DA54B) SHA1(AC2204600F45C6DD0DF1E759B62ED25928F02A12) ) + ROM_LOAD( "SMT_Goupil_G1_Charset.bin", 0x0000, 0x0400, CRC(8b6da54b) SHA1(ac2204600f45c6dd0df1e759b62ed25928f02a12) ) ROM_END /* Driver */ -- cgit v1.2.3-70-g09d2 From e9a233d02efdbe817214eda709a547e5b9143879 Mon Sep 17 00:00:00 2001 From: cracyc Date: Mon, 7 Mar 2016 16:51:00 -0600 Subject: 8042kbdc: safer (nw) --- src/devices/machine/8042kbdc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp index 28c2855acf7..509a5952890 100644 --- a/src/devices/machine/8042kbdc.cpp +++ b/src/devices/machine/8042kbdc.cpp @@ -224,10 +224,10 @@ void kbdc8042_device::device_start() { // resolve callbacks m_system_reset_cb.resolve_safe(); - m_gate_a20_cb.resolve(); - m_input_buffer_full_cb.resolve(); + m_gate_a20_cb.resolve_safe(); + m_input_buffer_full_cb.resolve_safe(); m_output_buffer_empty_cb.resolve_safe(); - m_speaker_cb.resolve(); + m_speaker_cb.resolve_safe(); m_operation_write_state = 0; /* first write to 0x60 might occur before anything can set this */ memset(&m_keyboard, 0x00, sizeof(m_keyboard)); memset(&m_mouse, 0x00, sizeof(m_mouse)); -- cgit v1.2.3-70-g09d2 From 65495eea988dc637bf7c9dd5808757c6db683377 Mon Sep 17 00:00:00 2001 From: johnparker007 Date: Mon, 7 Mar 2016 23:18:49 +0000 Subject: Update Frankie Detorri layout to dark style --- src/mame/layout/sc4fd7tha.lay | 962 +++++++++++++++++++++--------------------- 1 file changed, 481 insertions(+), 481 deletions(-) (limited to 'src') diff --git a/src/mame/layout/sc4fd7tha.lay b/src/mame/layout/sc4fd7tha.lay index 0332f60c43d..5fdf86c0d3a 100644 --- a/src/mame/layout/sc4fd7tha.lay +++ b/src/mame/layout/sc4fd7tha.lay @@ -8,17 +8,17 @@ - + - + - + @@ -28,7 +28,7 @@ - + @@ -40,11 +40,11 @@
- + - + @@ -54,7 +54,7 @@ - + @@ -66,11 +66,11 @@ - + - + @@ -80,7 +80,7 @@ - + @@ -92,11 +92,11 @@ - + - + @@ -106,7 +106,7 @@ - + @@ -118,11 +118,11 @@ - + - + @@ -132,7 +132,7 @@ - + @@ -162,11 +162,11 @@ - + - + @@ -176,7 +176,7 @@ - + @@ -188,11 +188,11 @@ - + - + @@ -202,7 +202,7 @@ - + @@ -214,11 +214,11 @@ - + - + @@ -228,7 +228,7 @@ - + @@ -240,11 +240,11 @@ - + - + @@ -254,7 +254,7 @@ - + @@ -266,11 +266,11 @@ - + - + @@ -280,7 +280,7 @@ - + @@ -292,11 +292,11 @@ - + - + @@ -306,7 +306,7 @@ - + @@ -318,11 +318,11 @@ - + - + @@ -332,7 +332,7 @@ - + @@ -350,11 +350,11 @@ - + - + @@ -364,7 +364,7 @@ - + @@ -382,11 +382,11 @@ - + - + @@ -396,7 +396,7 @@ - + @@ -414,11 +414,11 @@ - + - + @@ -428,7 +428,7 @@ - + @@ -446,11 +446,11 @@ - + - + @@ -460,7 +460,7 @@ - + @@ -478,11 +478,11 @@ - + - + @@ -492,7 +492,7 @@ - + @@ -510,11 +510,11 @@ - + - + @@ -524,7 +524,7 @@ - + @@ -542,11 +542,11 @@ - + - + @@ -556,7 +556,7 @@ - + @@ -574,11 +574,11 @@ - + - + @@ -588,7 +588,7 @@ - + @@ -606,11 +606,11 @@ - + - + @@ -620,7 +620,7 @@ - + @@ -638,11 +638,11 @@ - + - + @@ -652,7 +652,7 @@ - + @@ -670,11 +670,11 @@ - + - + @@ -684,7 +684,7 @@ - + @@ -702,11 +702,11 @@ - + - + @@ -716,7 +716,7 @@ - + @@ -734,11 +734,11 @@ - + - + @@ -748,7 +748,7 @@ - + @@ -766,11 +766,11 @@ - + - + @@ -780,7 +780,7 @@ - + @@ -798,11 +798,11 @@ - + - + @@ -812,7 +812,7 @@ - + @@ -830,11 +830,11 @@ - + - + @@ -844,7 +844,7 @@ - + @@ -862,11 +862,11 @@ - + - + @@ -876,7 +876,7 @@ - + @@ -894,11 +894,11 @@ - + - + @@ -908,7 +908,7 @@ - + @@ -926,11 +926,11 @@ - + - + @@ -940,7 +940,7 @@ - + @@ -958,11 +958,11 @@ - + - + @@ -972,7 +972,7 @@ - + @@ -984,11 +984,11 @@ - + - + @@ -998,7 +998,7 @@ - + @@ -1010,11 +1010,11 @@ - + - + @@ -1024,7 +1024,7 @@ - + @@ -1036,11 +1036,11 @@ - + - + @@ -1050,7 +1050,7 @@ - + @@ -1062,11 +1062,11 @@ - + - + @@ -1076,7 +1076,7 @@ - + @@ -1088,11 +1088,11 @@ - + - + @@ -1102,7 +1102,7 @@ - + @@ -1114,11 +1114,11 @@ - + - + @@ -1128,7 +1128,7 @@ - + @@ -1140,11 +1140,11 @@ - + - + @@ -1154,7 +1154,7 @@ - + @@ -1166,11 +1166,11 @@ - + - + @@ -1180,7 +1180,7 @@ - + @@ -1192,11 +1192,11 @@ - + - + @@ -1206,7 +1206,7 @@ - + @@ -1224,11 +1224,11 @@ - + - + @@ -1238,7 +1238,7 @@ - + @@ -1256,11 +1256,11 @@ - + - + @@ -1270,7 +1270,7 @@ - + @@ -1288,11 +1288,11 @@ - + - + @@ -1302,7 +1302,7 @@ - + @@ -1320,11 +1320,11 @@ - + - + @@ -1334,7 +1334,7 @@ - + @@ -1352,11 +1352,11 @@ - + - + @@ -1366,7 +1366,7 @@ - + @@ -1384,11 +1384,11 @@ - + - + @@ -1398,7 +1398,7 @@ - + @@ -1416,11 +1416,11 @@ - + - + @@ -1430,7 +1430,7 @@ - + @@ -1448,11 +1448,11 @@ - + - + @@ -1462,7 +1462,7 @@ - + @@ -1480,11 +1480,11 @@ - + - + @@ -1494,7 +1494,7 @@ - + @@ -1512,11 +1512,11 @@ - + - + @@ -1526,7 +1526,7 @@ - + @@ -1544,11 +1544,11 @@ - + - + @@ -1558,7 +1558,7 @@ - + @@ -1570,11 +1570,11 @@ - + - + @@ -1584,7 +1584,7 @@ - + @@ -1596,11 +1596,11 @@ - + - + @@ -1610,7 +1610,7 @@ - + @@ -1622,11 +1622,11 @@ - + - + @@ -1636,7 +1636,7 @@ - + @@ -1648,11 +1648,11 @@ - + - + @@ -1662,7 +1662,7 @@ - + @@ -1674,11 +1674,11 @@ - + - + @@ -1688,7 +1688,7 @@ - + @@ -1706,11 +1706,11 @@ - + - + @@ -1720,7 +1720,7 @@ - + @@ -1732,11 +1732,11 @@ - + - + @@ -1746,7 +1746,7 @@ - + @@ -1758,11 +1758,11 @@ - + - + @@ -1772,7 +1772,7 @@ - + @@ -1784,11 +1784,11 @@ - + - + @@ -1798,7 +1798,7 @@ - + @@ -1816,11 +1816,11 @@ - + - + @@ -1830,7 +1830,7 @@ - + @@ -1842,11 +1842,11 @@ - + - + @@ -1856,7 +1856,7 @@ - + @@ -1868,11 +1868,11 @@ - + - + @@ -1882,7 +1882,7 @@ - + @@ -1894,11 +1894,11 @@ - + - + @@ -1908,7 +1908,7 @@ - + @@ -1920,11 +1920,11 @@ - + - + @@ -1934,7 +1934,7 @@ - + @@ -1946,11 +1946,11 @@ - + - + @@ -1960,7 +1960,7 @@ - + @@ -1978,11 +1978,11 @@ - + - + @@ -1992,7 +1992,7 @@ - + @@ -2004,11 +2004,11 @@ - + - + @@ -2018,7 +2018,7 @@ - + @@ -2036,11 +2036,11 @@ - + - + @@ -2050,7 +2050,7 @@ - + @@ -2062,11 +2062,11 @@ - + - + @@ -2076,7 +2076,7 @@ - + @@ -2088,11 +2088,11 @@ - + - + @@ -2102,7 +2102,7 @@ - + @@ -2114,11 +2114,11 @@ - + - + @@ -2128,7 +2128,7 @@ - + @@ -2146,11 +2146,11 @@ - + - + @@ -2160,7 +2160,7 @@ - + @@ -2178,11 +2178,11 @@ - + - + @@ -2192,7 +2192,7 @@ - + @@ -2204,11 +2204,11 @@ - + - + @@ -2218,7 +2218,7 @@ - + @@ -2236,11 +2236,11 @@ - + - + @@ -2250,7 +2250,7 @@ - + @@ -2268,11 +2268,11 @@ - + - + @@ -2282,7 +2282,7 @@ - + @@ -2294,11 +2294,11 @@ - + - + @@ -2308,7 +2308,7 @@ - + @@ -2320,11 +2320,11 @@ - + - + @@ -2334,7 +2334,7 @@ - + @@ -2346,11 +2346,11 @@ - + - + @@ -2360,7 +2360,7 @@ - + @@ -2372,11 +2372,11 @@ - + - + @@ -2386,7 +2386,7 @@ - + @@ -2404,11 +2404,11 @@ - + - + @@ -2418,7 +2418,7 @@ - + @@ -2430,11 +2430,11 @@ - + - + @@ -2444,7 +2444,7 @@ - + @@ -2456,11 +2456,11 @@ - + - + @@ -2470,7 +2470,7 @@ - + @@ -2482,11 +2482,11 @@ - + - + @@ -2496,7 +2496,7 @@ - + @@ -2508,11 +2508,11 @@ - + - + @@ -2522,7 +2522,7 @@ - + @@ -2534,11 +2534,11 @@ - + - + @@ -2548,7 +2548,7 @@ - + @@ -2560,11 +2560,11 @@ - + - + @@ -2574,7 +2574,7 @@ - + @@ -2586,11 +2586,11 @@ - + - + @@ -2600,7 +2600,7 @@ - + @@ -2612,11 +2612,11 @@ - + - + @@ -2626,7 +2626,7 @@ - + @@ -2638,11 +2638,11 @@ - + - + @@ -2652,7 +2652,7 @@ - + @@ -2664,11 +2664,11 @@ - + - + @@ -2678,7 +2678,7 @@ - + @@ -2696,11 +2696,11 @@ - + - + @@ -2710,7 +2710,7 @@ - + @@ -2728,11 +2728,11 @@ - + - + @@ -2742,7 +2742,7 @@ - + @@ -2772,11 +2772,11 @@ - + - + @@ -2786,7 +2786,7 @@ - + @@ -2804,11 +2804,11 @@ - + - + @@ -2818,7 +2818,7 @@ - + @@ -2836,11 +2836,11 @@ - + - + @@ -2850,7 +2850,7 @@ - + @@ -2868,11 +2868,11 @@ - + - + @@ -2882,7 +2882,7 @@ - + @@ -2900,11 +2900,11 @@ - + - + @@ -2914,7 +2914,7 @@ - + @@ -2932,11 +2932,11 @@ - + - + @@ -2946,7 +2946,7 @@ - + @@ -2964,11 +2964,11 @@ - + - + @@ -2978,7 +2978,7 @@ - + @@ -2996,11 +2996,11 @@ - + - + @@ -3010,7 +3010,7 @@ - + @@ -3028,11 +3028,11 @@ - + - + @@ -3042,7 +3042,7 @@ - + @@ -3060,11 +3060,11 @@ - + - + @@ -3074,7 +3074,7 @@ - + @@ -3092,11 +3092,11 @@ - + - + @@ -3106,7 +3106,7 @@ - + @@ -3118,11 +3118,11 @@ - + - + @@ -3132,7 +3132,7 @@ - + @@ -3150,11 +3150,11 @@ - + - + @@ -3164,7 +3164,7 @@ - + @@ -3182,11 +3182,11 @@ - + - + @@ -3196,7 +3196,7 @@ - + @@ -3214,11 +3214,11 @@ - + - + @@ -3228,7 +3228,7 @@ - + @@ -3246,11 +3246,11 @@ - + - + @@ -3260,7 +3260,7 @@ - + @@ -3278,11 +3278,11 @@ - + - + @@ -3292,7 +3292,7 @@ - + @@ -3304,11 +3304,11 @@ - + - + @@ -3318,7 +3318,7 @@ - + @@ -3336,11 +3336,11 @@ - + - + @@ -3350,7 +3350,7 @@ - + @@ -3368,11 +3368,11 @@ - + - + @@ -3382,7 +3382,7 @@ - + @@ -3400,11 +3400,11 @@ - + - + @@ -3414,7 +3414,7 @@ - + @@ -3432,11 +3432,11 @@ - + - + @@ -3446,7 +3446,7 @@ - + @@ -3464,11 +3464,11 @@ - + - + @@ -3478,7 +3478,7 @@ - + @@ -3496,11 +3496,11 @@ - + - + @@ -3510,7 +3510,7 @@ - + @@ -3528,11 +3528,11 @@ - + - + @@ -3542,7 +3542,7 @@ - + @@ -3560,11 +3560,11 @@ - + - + @@ -3574,7 +3574,7 @@ - + @@ -3592,11 +3592,11 @@ - + - + @@ -3606,7 +3606,7 @@ - + @@ -3624,11 +3624,11 @@ - + - + @@ -3638,7 +3638,7 @@ - + @@ -3650,11 +3650,11 @@ - + - + @@ -3664,7 +3664,7 @@ - + @@ -3676,11 +3676,11 @@ - + - + @@ -3690,7 +3690,7 @@ - + @@ -3702,11 +3702,11 @@ - + - + @@ -3716,7 +3716,7 @@ - + @@ -3728,11 +3728,11 @@ - + - + @@ -3742,7 +3742,7 @@ - + @@ -3754,11 +3754,11 @@ - + - + @@ -3768,7 +3768,7 @@ - + @@ -3780,11 +3780,11 @@ - + - + @@ -3794,7 +3794,7 @@ - + @@ -3806,11 +3806,11 @@ - + - + @@ -3820,7 +3820,7 @@ - + @@ -3832,11 +3832,11 @@ - + - + @@ -3846,7 +3846,7 @@ - + @@ -3858,11 +3858,11 @@ - + - + @@ -3872,7 +3872,7 @@ - + @@ -3884,11 +3884,11 @@ - + - + @@ -3898,7 +3898,7 @@ - + @@ -3910,11 +3910,11 @@ - + - + @@ -3924,7 +3924,7 @@ - + @@ -3936,11 +3936,11 @@ - + - + @@ -3950,7 +3950,7 @@ - + @@ -3962,11 +3962,11 @@ - + - + @@ -3976,7 +3976,7 @@ - + @@ -3988,11 +3988,11 @@ - + - + @@ -4002,7 +4002,7 @@ - + @@ -4014,11 +4014,11 @@ - + - + @@ -4028,7 +4028,7 @@ - + @@ -4040,11 +4040,11 @@ - + - + @@ -4054,7 +4054,7 @@ - + @@ -4066,11 +4066,11 @@ - + - + @@ -4080,7 +4080,7 @@ - + @@ -4092,11 +4092,11 @@ - + - + @@ -4106,7 +4106,7 @@ - + @@ -4118,11 +4118,11 @@ - + - + @@ -4132,7 +4132,7 @@ - + @@ -4144,11 +4144,11 @@ - + - + @@ -4158,7 +4158,7 @@ - + @@ -4170,11 +4170,11 @@ - + - + @@ -4184,7 +4184,7 @@ - + @@ -4196,11 +4196,11 @@ - + - + @@ -4210,7 +4210,7 @@ - + @@ -4222,11 +4222,11 @@ - + - + @@ -4236,7 +4236,7 @@ - + @@ -4248,11 +4248,11 @@ - + - + @@ -4262,7 +4262,7 @@ - + @@ -4280,11 +4280,11 @@ - + - + @@ -4294,7 +4294,7 @@ - + @@ -4306,11 +4306,11 @@ - + - + @@ -4320,7 +4320,7 @@ - + @@ -4332,11 +4332,11 @@ - + - + @@ -4346,7 +4346,7 @@ - + @@ -4364,11 +4364,11 @@ - + - + @@ -4378,7 +4378,7 @@ - + @@ -4396,11 +4396,11 @@ - + - + @@ -4410,7 +4410,7 @@ - + @@ -4428,11 +4428,11 @@ - + - + @@ -4442,7 +4442,7 @@ - + @@ -4460,11 +4460,11 @@ - + - + @@ -4474,7 +4474,7 @@ - + @@ -4486,11 +4486,11 @@ - + - + @@ -4500,7 +4500,7 @@ - + @@ -4512,11 +4512,11 @@ - + - + @@ -4526,7 +4526,7 @@ - + @@ -4538,11 +4538,11 @@ - + - + @@ -4552,7 +4552,7 @@ - + @@ -4564,11 +4564,11 @@ - + - + @@ -4578,7 +4578,7 @@ - + @@ -4590,11 +4590,11 @@ - + - + @@ -4604,7 +4604,7 @@ - + @@ -4616,11 +4616,11 @@ - + - + @@ -4630,7 +4630,7 @@ - + -- cgit v1.2.3-70-g09d2 From d69da8fef941a000dd2f96a681ef8f84e6ced177 Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Tue, 8 Mar 2016 01:19:26 +0100 Subject: Removed localized error log. (nw) --- src/emu/ui/optsmenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/emu/ui/optsmenu.cpp b/src/emu/ui/optsmenu.cpp index 00e108d52bd..f93bdbf4652 100644 --- a/src/emu/ui/optsmenu.cpp +++ b/src/emu/ui/optsmenu.cpp @@ -344,7 +344,7 @@ void save_main_option(running_machine &machine) bool result = options.parse_ini_file((util::core_file&)file, OPTION_PRIORITY_MAME_INI, OPTION_PRIORITY_DRIVER_INI, error); if (!result) { - osd_printf_error(_("**Error loading %s.ini**"), emulator_info::get_configname()); + osd_printf_error("**Error loading %s.ini**", emulator_info::get_configname()); return; } } -- cgit v1.2.3-70-g09d2 From 5890f1ef7d5a90210e4f0a1868f1be25dc4c824a Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Tue, 8 Mar 2016 03:17:20 -0500 Subject: NoteTaker: Implement the DAC, DAC Timer, and DAC FIFO, the BIOS now beeps on boot. Fixed several wrong polarity status bits. Documented where the framebuffer lives. Better documented the boot process. Hooked up the VSync Interrupt. [Lord Nightmare] --- src/mame/drivers/notetaker.cpp | 174 +++++++++++++++++++++++++++++++---------- 1 file changed, 131 insertions(+), 43 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index 4cdff5f3272..5032badb162 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -52,18 +52,20 @@ TODO: everything below. * Get smalltalk-78 loaded as a rom and forced into ram on startup, since no boot disks have survived (or if any survived, they are not dumped) * Harris 6402 keyboard UART (within keyboard, next to MCU) -* The harris 6402 UART is pin compatible with WD TR1865 and TR1602 UARTs, as well as the AY-3-1015A/D +* The harris 6402 UART is pin compatible with WD TR1865 UART, as well as the AY-3-1015A/D + (These are 5v-only versions of the older WD TR1602 and AY-5-1013 parts which used 5v and 12v) * HLE for the missing i8748[5] MCU in the keyboard which reads the mouse quadratures and buttons and talks serially to the Keyboard UART -* floppy controller wd1791 +* floppy controller wd1791 and its interrupt According to [3] and [5] the format is double density/MFM, 128 bytes per sector, 16 sectors per track, 1 or 2 sided, for 170K or 340K per disk. Drive spins at 300RPM. * According to the schematics, we're missing an 82s147 DISKSEP.PROM used as a data separator WIP: * crt5027 video controller - the iocpu side is hooked up, but crashes due to a bug in the crt5027/tms9927 code. the actual drawing to screen part is not connected anywhere yet. -* pic8259 interrupt controller - this is attached as a device, but the interrupts are not hooked to it yet. -* Harris 6402 serial/EIA UART - connected to iocpu, other end isn't connected anywhere -* Harris 6402 keyboard UART (within notetaker) - connected to iocpu, other end isn't connected anywhere +* pic8259 interrupt controller - this is attached as a device, but only the vblank interrupt is hooked to it yet. +* Harris 6402 serial/EIA UART - connected to iocpu, other end isn't connected anywhere, interrupt is not connected +* Harris 6402 keyboard UART (within notetaker) - connected to iocpu, other end isn't connected anywhere, interrupt is not connected * we're missing a dump of the 82s126 SETMEMRQ PROM used to handle memory arbitration between the crtc and the rest of the system, but the equations are on the schematic and I'm planning to regenerate the prom contents from that, see ROM_LOAD section +* The DAC, its FIFO and its timer are hooked up and the v2.0 bios beeps, but the stereo latches are not hooked up at all, DAC is treated as mono for now DONE: * i/o cpu i/o area needs the memory map worked out per the schematics - done @@ -73,17 +75,24 @@ DONE: #include "machine/pic8259.h" #include "machine/ay31015.h" #include "video/tms9927.h" +#include "sound/dac.h" class notetaker_state : public driver_device { public: + enum + { + TIMER_FIFOCLK, + }; + notetaker_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_iocpu(*this, "iocpu"), m_iopic(*this, "iopic8259"), m_kbduart(*this, "kbduart"), m_eiauart(*this, "eiauart"), - m_crtc(*this, "crt5027") + m_crtc(*this, "crt5027"), + m_dac(*this, "dac") { } // devices @@ -92,6 +101,7 @@ public: required_device m_kbduart; required_device m_eiauart; required_device m_crtc; + required_device m_dac; //declarations // screen @@ -99,6 +109,7 @@ public: // basic io DECLARE_WRITE16_MEMBER(IPConReg_w); DECLARE_WRITE16_MEMBER(FIFOReg_w); + DECLARE_WRITE16_MEMBER(FIFOBus_w); // uarts DECLARE_READ16_MEMBER(ReadKeyData_r); @@ -136,15 +147,58 @@ public: UINT8 m_SHConB; UINT8 m_SHConA; UINT8 m_SetSH; - -// resets + // output fifo, for DAC + UINT16 m_outfifo[16]; // technically three 74LS225 5bit*16stage FIFO chips, arranged as a 16 stage, 12-bit wide fifo (one bit unused per chip) + UINT8 m_outfifo_count; + UINT8 m_outfifo_tail_ptr; + UINT8 m_outfifo_head_ptr; + // fifo timer + emu_timer *m_FIFO_timer; + TIMER_CALLBACK_MEMBER(timer_fifoclk); + +// separate cpu resets void ip_reset(); void ep_reset(); // overrides + virtual void machine_start() override; virtual void machine_reset() override; + +protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; +void notetaker_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + switch (id) + { + case TIMER_FIFOCLK: + timer_fifoclk(ptr, param); + break; + default: + assert_always(FALSE, "Unknown id in notetaker_state::device_timer"); + } +} + +TIMER_CALLBACK_MEMBER(notetaker_state::timer_fifoclk) +{ + UINT16 data; + //pop a value off the fifo and send it to the dac. +#ifdef FIFO_VERBOSE + if (m_outfifo_count == 0) logerror("output fifo is EMPTY! repeating previous sample!\n"); +#endif + data = m_outfifo[m_outfifo_tail_ptr]; + // if fifo is empty (tail ptr == head ptr), do not increment the tail ptr, otherwise do. + if (m_outfifo_count > 0) + { + m_outfifo_tail_ptr++; + m_outfifo_count--; + } + m_outfifo_tail_ptr&=0xF; + m_dac->write_unsigned16(data); + m_FIFO_timer->adjust(attotime::from_hz(((XTAL_960kHz/10)/4)/((m_FrSel0<<3)+(m_FrSel1<<2)+(m_FrSel2<<1)+1))); // FIFO timer is clocked by 960khz divided by 10 (74ls162 decade counter), divided by 4 (mc14568B with divider 1 pins set to 4), divided by 1,3,5,7,9,11,13,15 (or 0,2,4,6,8,10,12,14?) +} + UINT32 notetaker_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { // have to figure out what resolution we're drawing to here and draw appropriately to screen @@ -171,18 +225,17 @@ READ16_MEMBER( notetaker_state::ReadKeyData_r ) return 0xFF00||m_kbduart->get_received_data(); } -READ16_MEMBER( notetaker_state::ReadOPStatus_r ) +READ16_MEMBER( notetaker_state::ReadOPStatus_r ) // 74ls368 hex inverter at #l7 provides 4 bits, inverted { UINT16 data = 0xFFF0; - // TODO: FIX HACK: set FIFOInRDY and FIFOOutRdy both to 1 - data |= 0x0C; - /* - data |= (m_FIFOOutRdy) ? 0x08 : 0; - data |= (m_FIFOInRdy) ? 0x04 : 0; - */ + data |= (m_outfifo_count >= 1) ? 0 : 0x08; // m_FIFOOutRdy is true if the fifo has at least 1 word in it, false otherwise + data |= (m_outfifo_count < 16) ? 0 : 0x04; // m_FIFOInRdy is true if the fifo has less than 16 words in it, false otherwise // note /SWE is permanently enabled, so we don't enable it here for HD6402 reading - data |= m_kbduart->get_output_pin(AY31015_DAV ) ? 0x02 : 0; // DR - pin 19 - data |= m_kbduart->get_output_pin(AY31015_TBMT) ? 0x01 : 0; // TBRE - pin 22 + data |= m_kbduart->get_output_pin(AY31015_DAV ) ? 0 : 0x02; // DR - pin 19 + data |= m_kbduart->get_output_pin(AY31015_TBMT) ? 0 : 0x01; // TBRE - pin 22 +#ifdef DEBUG_READOPSTATUS + logerror("ReadOPStatus read, returning %04x\n", data); +#endif return data; } @@ -217,14 +270,31 @@ WRITE16_MEMBER( notetaker_state::KeyChipReset_w ) /* FIFO (DAC) Stuff and ADC stuff */ WRITE16_MEMBER(notetaker_state::FIFOReg_w) { - m_TabletYOn = (data&0x80)?1:0; - m_TabletXOn = (data&0x40)?1:0; - m_FrSel2 = (data&0x20)?1:0; - m_FrSel1 = (data&0x10)?1:0; - m_FrSel0 = (data&0x08)?1:0; - m_SHConB = (data&0x04)?1:0; - m_SHConA = (data&0x02)?1:0; - m_SetSH = (data&0x01)?1:0; + m_SetSH = (data&0x8000)?1:0; + m_SHConA = (data&0x4000)?1:0; + m_SHConB = (data&0x2000)?1:0; + m_FrSel0 = (data&0x1000)?1:0; + m_FrSel1 = (data&0x0800)?1:0; + m_FrSel2 = (data&0x0400)?1:0; + m_TabletXOn = (data&0x0200)?1:0; + m_TabletYOn = (data&0x0100)?1:0; + m_FIFO_timer->adjust(attotime::from_hz(((XTAL_960kHz/10)/4)/((m_FrSel0<<3)+(m_FrSel1<<2)+(m_FrSel2<<1)+1))); // FIFO timer is clocked by 960khz divided by 10 (74ls162 decade counter), divided by 4 (mc14568B with divider 1 pins set to 4), divided by 1,3,5,7,9,11,13,15 (or off,2,4,6,8,10,12,14?) + logerror("Write to 0x60 FIFOReg_w of %04x; fifo timer set to %d hz\n", data, (((XTAL_960kHz/10)/4)/((m_FrSel0<<3)+(m_FrSel1<<2)+(m_FrSel2<<1)+1))); +} + +WRITE16_MEMBER(notetaker_state::FIFOBus_w) +{ + if (m_outfifo_count == 16) + { +#ifdef SPC_LOG_DSP + logerror("outfifo was full, write ignored!\n"); +#endif + return; + } + m_outfifo[m_outfifo_head_ptr] = data; + m_outfifo_head_ptr++; + m_outfifo_count++; + m_outfifo_head_ptr&=0xF; } /* EIA hd6402 */ @@ -233,12 +303,12 @@ READ16_MEMBER( notetaker_state::ReadEIAData_r ) return 0xFF00||m_eiauart->get_received_data(); } -READ16_MEMBER( notetaker_state::ReadEIAStatus_r ) +READ16_MEMBER( notetaker_state::ReadEIAStatus_r ) // 74ls368 hex inverter at #f1 provides 2 bits, inverted { UINT16 data = 0xFFFC; // note /SWE is permanently enabled, so we don't enable it here for HD6402 reading - data |= m_eiauart->get_output_pin(AY31015_DAV ) ? 0x02 : 0; // DR - pin 19 - data |= m_eiauart->get_output_pin(AY31015_TBMT) ? 0x01 : 0; // TBRE - pin 22 + data |= m_eiauart->get_output_pin(AY31015_DAV ) ? 0 : 0x02; // DR - pin 19 + data |= m_eiauart->get_output_pin(AY31015_TBMT) ? 0 : 0x01; // TBRE - pin 22 return data; } @@ -399,7 +469,7 @@ static ADDRESS_MAP_START(notetaker_iocpu_io, AS_IO, 16, notetaker_state) AM_RANGE(0x4e, 0x4f) AM_MIRROR(0x7E10) AM_WRITE(KeyChipReset_w) // kbd uart reset AM_RANGE(0x60, 0x61) AM_MIRROR(0x7E1E) AM_WRITE(FIFOReg_w) // DAC sample and hold and frequency setup //AM_RANGE(0xa0, 0xa1) AM_MIRROR(0x7E18) AM_DEVREADWRITE("debug8255", 8255_device, read, write) // debugger board 8255 - //AM_RANGE(0xc0, 0xc1) AM_MIRROR(0x7E1E) AM_WRITE(FIFOBus_w) // DAC data write to FIFO + AM_RANGE(0xc0, 0xc1) AM_MIRROR(0x7E1E) AM_WRITE(FIFOBus_w) // DAC data write to FIFO //AM_RANGE(0x100, 0x101) AM_MIRROR(0x7E1E) AM_WRITE(DiskReg_w) I/O register (adc speed, crtc pixel clock enable, +5 and +12v relays for floppy, etc) //AM_RANGE(0x120, 0x121) AM_MIRROR(0x7E18) AM_DEVREADWRITE("wd1791", fd1971_device) // floppy controller AM_RANGE(0x140, 0x15f) AM_MIRROR(0x7E00) AM_DEVREADWRITE8("crt5027", crt5027_device, read, write, 0x00FF) // crt controller @@ -430,10 +500,10 @@ irq7 VSync (interrupt from the VSYN VSync pin from the crt5027) 0x02 to port 0x100 (IOR write: enable 5v only relay control) 0x03 to port 0x100 (IOR write: in addition to above, enable 12v relay control) -0x13 to port 0x000 PIC (?????) -0x08 to port 0x002 PIC (UART int enabled) -0x0D to port 0x002 PIC (UART, wd1791, and parity error int enabled) -0xff to port 0x002 PIC (all ints enabled) +0x13 to port 0x000 PIC (ICW1, 8085 vector 0b000[ignored], edge trigger mode, interval of 8, single mode (no cascade/ICW3), ICW4 needed ) +0x08 to port 0x002 PIC (ICW2, T7-T3 = 0b00001) +0x0D to port 0x002 PIC (ICW4, SFNM OFF, Buffered Mode MASTER, Normal EOI, 8086 mode) +0xff to port 0x002 PIC (OCW1, All Ints Masked (disabled/suppressed)) 0x0000 to port 0x04e (reset keyboard fifo/controller) 0x0000 to port 0x1ae (reset UART) 0x0016 to port 0x048 (kbd control reg write) @@ -449,8 +519,8 @@ irq7 VSync (interrupt from the VSYN VSync pin from the crt5027) 0x0a03 to port 0x100 (IOR write: set bit clock to 12Mhz) 0x2a03 to port 0x100 (IOR write: enable crtc clock chain) 0x00 to port 0x15c (fire off crtc timing chain) -read from 0x0002 (byte wide) (check interrupts) -0xaf to port 0x002 PIC (mask out kb int and 30hz display int) +read from 0x0002 (byte wide) (IMR, read interrupt mask, will be 0xFF from above) +0xaf to port 0x002 PIC (mask out with 0xEF and 0xBF to unnmask interrupts IR4(OddInt) and IR6(KbdInt), and write back to IMR) 0x0400 to 0x060 (select DAC fifo frequency 2) read from 0x44 (byte wide) in a loop forever (read keyboard fifo status) */ @@ -474,6 +544,16 @@ static ADDRESS_MAP_START(notetaker_emulatorcpu_io, AS_IO, 16, notetaker_state) ADDRESS_MAP_END */ +/* Machine Start; allocate timers and savestate stuff */ +void notetaker_state::machine_start() +{ + // allocate the DAC timer, and set it to fire NEVER. We'll set it up properly in IPReset. + m_FIFO_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(notetaker_state::timer_fifoclk),this)); + m_FIFO_timer->adjust(attotime::never); + // savestate stuff + // TODO: add me! +} + /* Machine Reset; this emulates the full system reset, triggered by ExtReset' (cardcage pin <50>) or the PowerOnReset' circuit */ void notetaker_state::machine_reset() { @@ -508,7 +588,10 @@ void notetaker_state::ip_reset() m_SHConA = 0; m_SetSH = 0; // Clear the DAC FIFO - // write me! + for (int i=0; i<16; i++) m_outfifo[i] = 0; + m_outfifo_count = m_outfifo_tail_ptr = m_outfifo_head_ptr = 0; + // Reset the DAC Timer + m_FIFO_timer->adjust(attotime::from_hz(((XTAL_960kHz/10)/4)/((m_FrSel0<<3)+(m_FrSel1<<2)+(m_FrSel2<<1)+1))); // FIFO timer is clocked by 960khz divided by 10 (74ls162 decade counter), divided by 4 (mc14568B with divider 1 pins set to 4), divided by 1,3,5,7,9,11,13,15 (or 0,2,4,6,8,10,12,14?) // reset the EIA UART m_eiauart->set_input_pin(AY31015_XR, 0); // MR - pin 21 m_eiauart->set_input_pin(AY31015_XR, 1); // '' @@ -557,19 +640,24 @@ static MACHINE_CONFIG_START( notetakr, notetaker_state ) MCFG_DEVICE_ADD( "crt5027", CRT5027, (XTAL_36MHz/4)/8) // the clock for the crt5027 is configurable rate; 36MHz xtal divided by 1*, 2, 3, 4, 5, 6, 7, or 8 (* because this is a 74s163 this setting probably means divide by 1; documentation at http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790605_Definition_of_8086_Ports.pdf claims it is 1.5, which makes no sense) and secondarily divided by 8 (again by two to load the 16 bit output shifters after this) // on reset, bitclk is 000 so divider is (36mhz/8)/8; during boot it is written with 101, changing the divider to (36mhz/4)/8 // TODO: for now, we just hack it to the latter setting from start; this should be handled correctly in ip_reset(); - MCFG_TMS9927_CHAR_WIDTH(8) //(8 pixels per column/halfword, 16 pixels per fullword) + MCFG_TMS9927_VSYN_CALLBACK(DEVWRITELINE("iopic8259", pic8259_device, ir7_w)) // note this triggers interrupts on both the iocpu (int7) and emulatorcpu (int4) MCFG_VIDEO_SET_SCREEN("screen") - MCFG_DEVICE_ADD( "kbduart", AY31015, 0 ) + MCFG_DEVICE_ADD( "kbduart", AY31015, 0 ) // HD6402, == AY-3-1015D MCFG_AY31015_RX_CLOCK(XTAL_960kHz) // hard-wired to 960KHz xtal #f11 (60000 baud, 16 clocks per baud) MCFG_AY31015_TX_CLOCK(XTAL_960kHz) // hard-wired to 960KHz xtal #f11 (60000 baud, 16 clocks per baud) - MCFG_DEVICE_ADD( "eiauart", AY31015, 0 ) - MCFG_AY31015_RX_CLOCK((96000/4)/5) // hard-wired through an mc14568b divider set to divide by 4, the result set to divide by 5; this resulting 4800hz signal being 300 baud (16 clocks per baud) - MCFG_AY31015_TX_CLOCK((96000/4)/5) // hard-wired through an mc14568b divider set to divide by 4, the result set to divide by 5; this resulting 4800hz signal being 300 baud (16 clocks per baud) + MCFG_DEVICE_ADD( "eiauart", AY31015, 0 ) // HD6402, == AY-3-1015D + MCFG_AY31015_RX_CLOCK(((XTAL_960kHz/10)/4)/5) // hard-wired through an mc14568b divider set to divide by 4, the result set to divide by 5; this resulting 4800hz signal being 300 baud (16 clocks per baud) + MCFG_AY31015_TX_CLOCK(((XTAL_960kHz/10)/4)/5) // hard-wired through an mc14568b divider set to divide by 4, the result set to divide by 5; this resulting 4800hz signal being 300 baud (16 clocks per baud) /* Devices */ + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") // TODO: should be stereo + MCFG_SOUND_ADD("dac", DAC, 0) /* DAC1200, set up with two sample and hold HA2425 chips outside it to do stereo */ + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MACHINE_CONFIG_END DRIVER_INIT_MEMBER(notetaker_state,notetakr) @@ -641,5 +729,5 @@ ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */ -COMP( 1978, notetakr, 0, 0, notetakr, notetakr, notetaker_state, notetakr, "Xerox", "Notetaker", MACHINE_IS_SKELETON) -//COMP( 1978, notetakr, 0, 0, notetakr, notetakr, driver_device, notetakr, "Xerox", "Notetaker", MACHINE_IS_SKELETON) \ No newline at end of file +COMP( 1978, notetakr, 0, 0, notetakr, notetakr, notetaker_state, notetakr, "Xerox", "NoteTaker", MACHINE_IS_SKELETON) +//COMP( 1978, notetakr, 0, 0, notetakr, notetakr, driver_device, notetakr, "Xerox", "NoteTaker", MACHINE_IS_SKELETON) \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 69eebc199eac86f7eca6e1380edab66a0a956323 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Tue, 8 Mar 2016 03:20:39 -0500 Subject: forgot to hit save, just comment changes (nw) --- src/mame/drivers/notetaker.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index 5032badb162..c8a25536315 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -47,8 +47,6 @@ * [5] http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790118_NoteTaker_System_Manual.pdf TODO: everything below. -* figure out the correct memory maps for the 256kB of shared ram, and what part of ram constitutes the framebuffer -* figure out how the emulation-cpu boots and where its 4k of local ram maps to * Get smalltalk-78 loaded as a rom and forced into ram on startup, since no boot disks have survived (or if any survived, they are not dumped) * Harris 6402 keyboard UART (within keyboard, next to MCU) @@ -69,6 +67,11 @@ WIP: DONE: * i/o cpu i/o area needs the memory map worked out per the schematics - done +* figure out the correct memory maps for the 256kB of shared ram, and what part of ram constitutes the framebuffer - done + - 256k of shared ram maps at 00000-3ffff for both cpus with special mem regs at fffec,fffee. the ram mirrors 4 times on the emulatorcpu only, iocpu the 40000-fffff area is open bus. + - frambuffer, at least for bios 1.5, lives from 0x4000-0xd5ff, exactly 640x480 pixels 1bpp, interlaced (even? plane is at 4000-8aff, odd? plane is at 8b00-d5ff); however the starting address of the framebuffer is configurable to any address within the 0x0000-0x1ffff range? (this exact range is unclear) +* figure out how the emulation-cpu boots and where its 8k of local ram maps to - done + - both cpus boot, reset and system int controls are accessed at fffea from either cpu; emulatorcpu's 8k of ram lives at the beginning of its address space, but can be disabled in favor of mainram at the same addressses */ #include "cpu/i86/i86.h" -- cgit v1.2.3-70-g09d2 From a5072bfd810ee0f841a644475fd2e811a37a592e Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 8 Mar 2016 19:37:57 +1100 Subject: Fix complete failure to read zlib compressed data, handle EOF better in compressed files (nw) Fix bug causing crash in pathological case of zero-frame INP file [Vas Crabb] --- src/emu/ioport.cpp | 3 ++- src/lib/util/corefile.cpp | 41 +++++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp index a9ac5682b04..9ae33a85a1e 100644 --- a/src/emu/ioport.cpp +++ b/src/emu/ioport.cpp @@ -3447,7 +3447,8 @@ void ioport_manager::playback_end(const char *message) machine().popmessage("Playback Ended\nReason: %s", message); // display speed stats - m_playback_accumulated_speed /= m_playback_accumulated_frames; + if (m_playback_accumulated_speed > 0) + m_playback_accumulated_speed /= m_playback_accumulated_frames; osd_printf_info("Total playback frames: %d\n", UINT32(m_playback_accumulated_frames)); osd_printf_info("Average recorded speed: %d%%\n", UINT32((m_playback_accumulated_speed * 200 + 1) >> 21)); diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp index 51819809f93..b4a246d81f6 100644 --- a/src/lib/util/corefile.cpp +++ b/src/lib/util/corefile.cpp @@ -126,6 +126,7 @@ private: m_stream.zalloc = Z_NULL; m_stream.zfree = Z_NULL; m_stream.opaque = Z_NULL; + m_stream.avail_in = m_stream.avail_out = 0; } bool m_compress, m_decompress; @@ -341,7 +342,7 @@ private: works for most platforms -------------------------------------------------*/ -static inline int is_directory_separator(char c) +inline int is_directory_separator(char c) { return (c == '\\' || c == '/' || c == ':'); } @@ -755,11 +756,11 @@ file_error core_osd_file::compress(int level) int zerr = Z_OK; // flush any remaining data if we are writing - while (write_access() != 0 && (zerr != Z_STREAM_END)) + while (write_access() && (zerr != Z_STREAM_END)) { // deflate some more zerr = m_zdata->finalise(); - if (zerr != Z_STREAM_END && zerr != Z_OK) + if ((zerr != Z_STREAM_END) && (zerr != Z_OK)) { result = FILERR_INVALID_DATA; break; @@ -972,41 +973,41 @@ file_error core_osd_file::osd_or_zlib_read(void *buffer, std::uint64_t offset, s return osd_read(m_file, buffer, offset, length, &actual); // if the offset doesn't match the next offset, fail - if (m_zdata->is_nextoffset(offset)) + if (!m_zdata->is_nextoffset(offset)) return FILERR_INVALID_ACCESS; // set up the destination + file_error filerr = FILERR_NONE; m_zdata->set_output(buffer, length); while (!m_zdata->output_full()) { - int zerr = Z_OK; - // if we didn't make progress, report an error or the end if (m_zdata->has_input()) - zerr = m_zdata->decompress(); - if (zerr != Z_OK) { - actual = length - m_zdata->output_space(); - m_zdata->add_nextoffset(actual); - return (zerr == Z_STREAM_END) ? FILERR_NONE : FILERR_INVALID_DATA; + auto const zerr = m_zdata->decompress(); + if (Z_OK != zerr) + { + if (Z_STREAM_END != zerr) filerr = FILERR_INVALID_DATA; + break; + } } // fetch more data if needed if (!m_zdata->has_input()) { - std::uint32_t actualdata; - auto const filerr = osd_read(m_file, m_zdata->buffer_data(), m_zdata->realoffset(), m_zdata->buffer_size(), &actualdata); - if (filerr != FILERR_NONE) - return filerr; - m_zdata->add_realoffset(actual); + std::uint32_t actualdata = 0; + filerr = osd_read(m_file, m_zdata->buffer_data(), m_zdata->realoffset(), m_zdata->buffer_size(), &actualdata); + if (filerr != FILERR_NONE) break; + m_zdata->add_realoffset(actualdata); m_zdata->reset_input(actualdata); + if (!m_zdata->has_input()) break; } } - // we read everything - actual = length; + // adjust everything + actual = length - m_zdata->output_space(); m_zdata->add_nextoffset(actual); - return FILERR_NONE; + return filerr; } @@ -1054,7 +1055,7 @@ file_error core_osd_file::osd_or_zlib_write(void const *buffer, std::uint64_t of // write more data if we are full up if (m_zdata->output_full()) { - std::uint32_t actualdata; + std::uint32_t actualdata = 0; auto const filerr = osd_write(m_file, m_zdata->buffer_data(), m_zdata->realoffset(), m_zdata->output_size(), &actualdata); if (filerr != FILERR_NONE) return filerr; -- cgit v1.2.3-70-g09d2 From 7aa780177ac7a7e639ad4a72841a6a0db2047e72 Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Tue, 8 Mar 2016 04:25:44 -0500 Subject: Fixed required object fatalerror for all sets in svi318.cpp (nw) --- src/mame/drivers/svi318.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/svi318.cpp b/src/mame/drivers/svi318.cpp index 4a6396cb80a..c13f0a56d59 100644 --- a/src/mame/drivers/svi318.cpp +++ b/src/mame/drivers/svi318.cpp @@ -92,9 +92,9 @@ protected: optional_device m_palette; private: - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; + optional_memory_bank m_bank1; + optional_memory_bank m_bank2; + optional_memory_bank m_bank3; optional_memory_bank m_bank4; }; -- cgit v1.2.3-70-g09d2 From 2d805167c79176e2dbd0278fe4f2ca2c83bad0e3 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 8 Mar 2016 10:42:44 +0100 Subject: use lambdas instead of wrappers (nw) --- src/emu/ioport.h | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) (limited to 'src') diff --git a/src/emu/ioport.h b/src/emu/ioport.h index bd3e04e5f7f..382ca99f823 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -1735,11 +1735,11 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s // input device handler #define PORT_READ_LINE_DEVICE_MEMBER(_device, _class, _member) \ - configurer.field_set_dynamic_read(ioport_field_read_delegate(&ioport_read_line_wrapper<_class, &_class::_member>, #_class "::" #_member, _device, (_class *)NULL)); + configurer.field_set_dynamic_read(ioport_field_read_delegate([](_class &device, ioport_field &field, void *param)->ioport_value { return device._member() ? ~ioport_value(0) : 0; } , #_class "::" #_member, _device, (_class *)NULL)); // output device handler #define PORT_WRITE_LINE_DEVICE_MEMBER(_device, _class, _member) \ - configurer.field_set_dynamic_write(ioport_field_write_delegate(&ioport_write_line_wrapper<_class, &_class::_member>, #_class "::" #_member, _device, (_class *)NULL)); + configurer.field_set_dynamic_write(ioport_field_write_delegate([](_class &device, ioport_field &field, void *param, ioport_value oldval, ioport_value newval) { device._member(newval); }, #_class "::" #_member, _device, (_class *)NULL)); // dip switch definition #define PORT_DIPNAME(_mask, _default, _name) \ @@ -1819,38 +1819,6 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s #define PORT_HBLANK(_screen) \ PORT_READ_LINE_DEVICE_MEMBER(_screen, screen_device, hblank) - - -//************************************************************************** -// INLINE TEMPLATES -//************************************************************************** - -template -ioport_value ioport_read_line_wrapper(device_t &device, ioport_field &field, void *param) -{ - return ((*_FunctionPointer)(&device) & 1) ? ~ioport_value(0) : 0; -} - -template -ioport_value ioport_read_line_wrapper(_FunctionClass &device, ioport_field &field, void *param) -{ - return ((device.*_FunctionPointer)() & 1) ? ~ioport_value(0) : 0; -} - -template -void ioport_write_line_wrapper(device_t &device, ioport_field &field, void *param, ioport_value oldval, ioport_value newval) -{ - return (*_FunctionPointer)(&device, newval); -} - -template -void ioport_write_line_wrapper(_FunctionClass &device, ioport_field &field, void *param, ioport_value oldval, ioport_value newval) -{ - return (device.*_FunctionPointer)(newval); -} - - - //************************************************************************** // INLINE FUNCTIONS //************************************************************************** -- cgit v1.2.3-70-g09d2 From 0490d5c5b7a41ed43e52a158dcb9d2e9152c2f9c Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 8 Mar 2016 10:48:04 +0100 Subject: make it same as before (nw) --- src/emu/ioport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 382ca99f823..57faa51bc8d 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -1735,7 +1735,7 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s // input device handler #define PORT_READ_LINE_DEVICE_MEMBER(_device, _class, _member) \ - configurer.field_set_dynamic_read(ioport_field_read_delegate([](_class &device, ioport_field &field, void *param)->ioport_value { return device._member() ? ~ioport_value(0) : 0; } , #_class "::" #_member, _device, (_class *)NULL)); + configurer.field_set_dynamic_read(ioport_field_read_delegate([](_class &device, ioport_field &field, void *param)->ioport_value { return (device._member() & 1) ? ~ioport_value(0) : 0; } , #_class "::" #_member, _device, (_class *)NULL)); // output device handler #define PORT_WRITE_LINE_DEVICE_MEMBER(_device, _class, _member) \ -- cgit v1.2.3-70-g09d2 From 962125c249c7e3c9c55f7f40391a3ed33b4f5753 Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Tue, 8 Mar 2016 04:53:12 -0500 Subject: Fix for ioport exception for berlinp, bpl32, milano in mmodular.cpp (nw) --- src/mame/drivers/mmodular.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/mmodular.cpp b/src/mame/drivers/mmodular.cpp index 16d469baa25..70040314b91 100644 --- a/src/mame/drivers/mmodular.cpp +++ b/src/mame/drivers/mmodular.cpp @@ -1130,7 +1130,7 @@ static ADDRESS_MAP_START(gen32_mem, AS_PROGRAM, 32, polgar_state ) static ADDRESS_MAP_START(bpl32_mem, AS_PROGRAM, 32, polgar_state ) AM_RANGE( 0x000000, 0x03ffff ) AM_ROM - AM_RANGE( 0x800000 , 0x800003 ) AM_READ(read_keys_BPL32 ) +// AM_RANGE( 0x800000 , 0x800003 ) AM_READ(read_keys_BPL32 ) AM_RANGE( 0x900000 , 0x900003 ) AM_WRITE(write_board_BPL32 ) AM_RANGE( 0xa00000 , 0xa00003 ) AM_WRITE(write_LED_BPL32 ) AM_RANGE( 0xc00000 , 0xc00003 ) AM_WRITE(write_LCD_data_32 ) @@ -1230,7 +1230,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START(milano_mem , AS_PROGRAM, 8, polgar_state ) AM_RANGE( 0x0000, 0x1f9f ) AM_RAM AM_RANGE( 0x1fd0, 0x1fd0 ) AM_WRITE(milano_write_board ) // Chessboard - AM_RANGE( 0x1fe0, 0x1fe0 ) AM_READ(milano_read_board ) // Chessboard +// AM_RANGE( 0x1fe0, 0x1fe0 ) AM_READ(milano_read_board ) // Chessboard AM_RANGE( 0x1fe8, 0x1fed ) AM_WRITE(milano_write_LED ) // Function LEDs AM_RANGE( 0x1fd8, 0x1fdf ) AM_READ(read_keys) AM_RANGE( 0x1ff0, 0x1ff0 ) AM_WRITE(write_polgar_IO) // IO control -- cgit v1.2.3-70-g09d2 From 46bb97d9b4b85055beb7235b821b1395e22cb2b9 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 8 Mar 2016 22:41:57 +1100 Subject: Wrap up INP header I/O --- src/emu/ioport.cpp | 57 +++++++++++++------------- src/emu/ioport.h | 118 +++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 133 insertions(+), 42 deletions(-) (limited to 'src') diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp index 9ae33a85a1e..2b00cabb94b 100644 --- a/src/emu/ioport.cpp +++ b/src/emu/ioport.cpp @@ -103,6 +103,9 @@ #include #include + +namespace { + // temporary: set this to 1 to enable the originally defined behavior that // a field specified via PORT_MODIFY which intersects a previously-defined // field completely wipes out the previous definition @@ -142,7 +145,6 @@ struct char_info }; - //************************************************************************** // INLINE FUNCTIONS //************************************************************************** @@ -186,10 +188,10 @@ inline INT32 apply_scale(INT32 value, INT64 scale) //************************************************************************** // XML attributes for the different types -static const char *const seqtypestrings[] = { "standard", "increment", "decrement" }; +const char *const seqtypestrings[] = { "standard", "increment", "decrement" }; // master character info table -static const char_info charinfo[] = +const char_info charinfo[] = { { 0x0008, "Backspace", nullptr }, // Backspace { 0x0009, "Tab", " " }, // Tab @@ -489,7 +491,7 @@ static const char_info charinfo[] = // COMMON SHARED STRINGS //************************************************************************** -static const struct +const struct { UINT32 id; const char *string; @@ -616,6 +618,11 @@ static const struct { INPUT_STRING_None, "None" }, }; +} // anonymous namespace + + +std::uint8_t const inp_header::MAGIC[inp_header::OFFS_BASETIME - inp_header::OFFS_MAGIC] = { 'M', 'A', 'M', 'E', 'I', 'N', 'P', 0 }; + //************************************************************************** @@ -3404,25 +3411,25 @@ time_t ioport_manager::playback_init() assert_always(filerr == FILERR_NONE, "Failed to open file for playback"); // read the header and verify that it is a modern version; if not, print an error - UINT8 header[INP_HEADER_SIZE]; - if (m_playback_file.read(header, sizeof(header)) != sizeof(header)) + inp_header header; + if (!header.read(m_playback_file)) fatalerror("Input file is corrupt or invalid (missing header)\n"); - if (memcmp(header, "MAMEINP\0", 8) != 0) + if (!header.check_magic()) fatalerror("Input file invalid or in an older, unsupported format\n"); - if (header[0x10] != INP_HEADER_MAJVERSION) + if (header.get_majversion() != inp_header::MAJVERSION) fatalerror("Input file format version mismatch\n"); // output info to console osd_printf_info("Input file: %s\n", filename); - osd_printf_info("INP version %d.%d\n", header[0x10], header[0x11]); - time_t basetime = header[0x08] | (header[0x09] << 8) | (header[0x0a] << 16) | (header[0x0b] << 24) | - ((UINT64)header[0x0c] << 32) | ((UINT64)header[0x0d] << 40) | ((UINT64)header[0x0e] << 48) | ((UINT64)header[0x0f] << 56); + osd_printf_info("INP version %u.%u\n", header.get_majversion(), header.get_minversion()); + time_t basetime = header.get_basetime(); osd_printf_info("Created %s\n", ctime(&basetime)); - osd_printf_info("Recorded using %s\n", header + 0x20); + osd_printf_info("Recorded using %s\n", header.get_appdesc().c_str()); // verify the header against the current game - if (memcmp(machine().system().name, header + 0x14, strlen(machine().system().name) + 1) != 0) - osd_printf_info("Input file is for machine '%s', not for current machine '%s'\n", header + 0x14, machine().system().name); + std::string const sysname = header.get_sysname(); + if (sysname != machine().system().name) + osd_printf_info("Input file is for machine '%s', not for current machine '%s'\n", sysname.c_str(), machine().system().name); // enable compression m_playback_file.compress(FCOMPRESS_MEDIUM); @@ -3583,23 +3590,15 @@ void ioport_manager::record_init() machine().base_datetime(systime); // fill in the header - UINT8 header[INP_HEADER_SIZE] = { 0 }; - memcpy(header, "MAMEINP\0", 8); - header[0x08] = systime.time >> 0; - header[0x09] = systime.time >> 8; - header[0x0a] = systime.time >> 16; - header[0x0b] = systime.time >> 24; - header[0x0c] = systime.time >> 32; - header[0x0d] = systime.time >> 40; - header[0x0e] = systime.time >> 48; - header[0x0f] = systime.time >> 56; - header[0x10] = INP_HEADER_MAJVERSION; - header[0x11] = INP_HEADER_MINVERSION; - strcpy((char *)header + 0x14, machine().system().name); - sprintf((char *)header + 0x20, "%s %s", emulator_info::get_appname(), build_version); + inp_header header; + header.set_magic(); + header.set_basetime(systime.time); + header.set_version(); + header.set_sysname(machine().system().name); + header.set_appdesc(util::string_format("%s %s", emulator_info::get_appname(), build_version)); // write it - m_record_file.write(header, sizeof(header)); + header.write(m_record_file); // enable compression m_record_file.compress(FCOMPRESS_MEDIUM); diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 57faa51bc8d..8d16f7e4fa8 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -17,6 +17,8 @@ #ifndef __INPTPORT_H__ #define __INPTPORT_H__ +#include +#include #include @@ -34,11 +36,6 @@ const ioport_value IP_ACTIVE_LOW = 0xffffffff; // maximum number of players supported const int MAX_PLAYERS = 8; -// INP file parameters -const UINT32 INP_HEADER_SIZE = 64; -const UINT32 INP_HEADER_MAJVERSION = 3; -const UINT32 INP_HEADER_MINVERSION = 0; - // unicode constants const unicode_char UCHAR_PRIVATE = 0x100000; const unicode_char UCHAR_SHIFT_1 = UCHAR_PRIVATE + 0; @@ -697,15 +694,110 @@ typedef delegate ioport_charqueue_empty_delegate; // ======================> inp_header // header at the front of INP files -struct inp_header +class inp_header { - char header[8]; // +00: 8 byte header - must be "MAMEINP\0" - UINT64 basetime; // +08: base time of recording - UINT8 majversion; // +10: major INP version - UINT8 minversion; // +11: minor INP version - UINT8 reserved[2]; // +12: must be zero - char gamename[12]; // +14: game name string, NULL-terminated - char version[32]; // +20: system version string, NULL-terminated +public: + // parameters + static constexpr unsigned MAJVERSION = 3; + static constexpr unsigned MINVERSION = 0; + + bool read(emu_file &f) + { + return f.read(m_data, sizeof(m_data)) == sizeof(m_data); + } + bool write(emu_file &f) const + { + return f.write(m_data, sizeof(m_data)) == sizeof(m_data); + } + + bool check_magic() const + { + return 0 == std::memcmp(MAGIC, m_data + OFFS_MAGIC, OFFS_BASETIME - OFFS_MAGIC); + } + std::uint64_t get_basetime() const + { + return + (std::uint64_t(m_data[OFFS_BASETIME + 0]) << (0 * 8)) | + (std::uint64_t(m_data[OFFS_BASETIME + 1]) << (1 * 8)) | + (std::uint64_t(m_data[OFFS_BASETIME + 2]) << (2 * 8)) | + (std::uint64_t(m_data[OFFS_BASETIME + 3]) << (3 * 8)) | + (std::uint64_t(m_data[OFFS_BASETIME + 4]) << (4 * 8)) | + (std::uint64_t(m_data[OFFS_BASETIME + 5]) << (5 * 8)) | + (std::uint64_t(m_data[OFFS_BASETIME + 6]) << (6 * 8)) | + (std::uint64_t(m_data[OFFS_BASETIME + 7]) << (7 * 8)); + } + unsigned get_majversion() const + { + return m_data[OFFS_MAJVERSION]; + } + unsigned get_minversion() const + { + return m_data[OFFS_MINVERSION]; + } + std::string get_sysname() const + { + return get_string(); + } + std::string get_appdesc() const + { + return get_string(); + } + + void set_magic() + { + std::memcpy(m_data + OFFS_MAGIC, MAGIC, OFFS_BASETIME - OFFS_MAGIC); + } + void set_basetime(std::uint64_t time) + { + m_data[OFFS_BASETIME + 0] = std::uint8_t((time >> (0 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 1] = std::uint8_t((time >> (1 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 2] = std::uint8_t((time >> (2 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 3] = std::uint8_t((time >> (3 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 4] = std::uint8_t((time >> (4 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 5] = std::uint8_t((time >> (5 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 6] = std::uint8_t((time >> (6 * 8)) & 0x00ff); + m_data[OFFS_BASETIME + 7] = std::uint8_t((time >> (7 * 8)) & 0x00ff); + } + void set_version() + { + m_data[OFFS_MAJVERSION] = MAJVERSION; + m_data[OFFS_MINVERSION] = MINVERSION; + } + void set_sysname(std::string const &name) + { + set_string(name); + } + void set_appdesc(std::string const &desc) + { + set_string(desc); + } + +private: + template void set_string(std::string const &str) + { + std::size_t const used = (std::min)(str.size() + 1, END - BEGIN); + std::memcpy(m_data + BEGIN, str.c_str(), used); + if ((END - BEGIN) > used) + std::memset(m_data + BEGIN + used, 0, (END - BEGIN) - used); + } + template std::string get_string() const + { + char const *const begin = reinterpret_cast(m_data + BEGIN); + return std::string(begin, std::find(begin, reinterpret_cast(m_data + END), '\0')); + } + + static constexpr std::size_t OFFS_MAGIC = 0x00; // 0x08 bytes + static constexpr std::size_t OFFS_BASETIME = 0x08; // 0x08 bytes (little-endian binary integer) + static constexpr std::size_t OFFS_MAJVERSION = 0x10; // 0x01 bytes (binary integer) + static constexpr std::size_t OFFS_MINVERSION = 0x11; // 0x01 bytes (binary integer) + // 0x02 bytes reserved + static constexpr std::size_t OFFS_SYSNAME = 0x14; // 0x0c bytes (ASCII) + static constexpr std::size_t OFFS_APPDESC = 0x20; // 0x20 bytes (ASCII) + static constexpr std::size_t OFFS_END = 0x40; + + static std::uint8_t const MAGIC[OFFS_BASETIME - OFFS_MAGIC]; + + std::uint8_t m_data[OFFS_END]; }; -- cgit v1.2.3-70-g09d2 From efb7a27b1862cb713f1441258b48a9072b18d679 Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 8 Mar 2016 12:51:38 +0100 Subject: supercon: start driver rewrite --- src/mame/drivers/hh_tms1k.cpp | 2 +- src/mame/drivers/supercon.cpp | 59 ++++++++++++++++++++----------------------- src/mame/layout/supercon.lay | 20 +++++++++++++++ 3 files changed, 48 insertions(+), 33 deletions(-) create mode 100644 src/mame/layout/supercon.lay (limited to 'src') diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index afc5cafe475..ac0a8783843 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -5470,7 +5470,7 @@ CONS( 1979, bigtrak, 0, 0, bigtrak, bigtrak, driver_device, 0, "Mil CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) // *** CONS( 1978, merlin, 0, 0, merlin, merlin, driver_device, 0, "Parker Brothers", "Merlin - The Electronic Wizard", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1979, stopthie, 0, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner)", MACHINE_SUPPORTS_SAVE ) // *** -CONS( 1979, stopthiep, stopthie, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner) (patent)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +CONS( 1979, stopthiep, stopthie, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner) (patent)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // *** CONS( 1980, bankshot, 0, 0, bankshot, bankshot, driver_device, 0, "Parker Brothers", "Bank Shot - Electronic Pool", MACHINE_SUPPORTS_SAVE ) CONS( 1980, splitsec, 0, 0, splitsec, splitsec, driver_device, 0, "Parker Brothers", "Split Second", MACHINE_SUPPORTS_SAVE ) CONS( 1982, mmerlin, 0, 0, mmerlin, mmerlin, driver_device, 0, "Parker Brothers", "Master Merlin", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/drivers/supercon.cpp b/src/mame/drivers/supercon.cpp index cfdabc21650..f61d30f0bfb 100644 --- a/src/mame/drivers/supercon.cpp +++ b/src/mame/drivers/supercon.cpp @@ -1,25 +1,22 @@ // license:BSD-3-Clause -// copyright-holders:Robbbert +// copyright-holders:hap /****************************************************************************** - Novag SuperConstellation Chess Computer - CPU 6502 - Clock 4 MHz - IRQ CLK 600 Hz - - RAM 0x0000, 0x0fff) - ROM 0x2000, 0xffff) - I/O 0x1c00 Unknown - 0x1d00 Unknown - 0x1e00 LED's and buttons - 0x1f00 LED's, buttons and buzzer + Novag Super Constellation Chess Computer (model 844) +- UMC UM6502C @ 4 MHz (8MHz XTAL), 600Hz IRQ(source unknown?) +- 2*2KB RAM TC5516APL-2 battery-backed, 2*32KB ROM custom label +- TTL, 24 LEDs, 8*8 chessboard buttons +- external port for clock and printer, not emulated here ******************************************************************************/ #include "emu.h" #include "cpu/m6502/m6502.h" -#include "sound/beep.h" +#include "machine/nvram.h" + +// internal artwork +#include "supercon.lh" class supercon_state : public driver_device @@ -27,21 +24,18 @@ class supercon_state : public driver_device public: supercon_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_beep(*this, "beeper") - { } + m_maincpu(*this, "maincpu") + { } required_device m_maincpu; - required_device m_beep; }; -#define MAIN_CLOCK 4000000 /* 4 MHz */ + /* Address maps */ static ADDRESS_MAP_START(supercon_mem, AS_PROGRAM, 8, supercon_state) - AM_RANGE( 0x0000, 0x0fff) AM_RAM - AM_RANGE( 0x2000, 0x7fff) AM_ROM - AM_RANGE( 0x8000, 0xffff) AM_ROM + AM_RANGE( 0x0000, 0x0fff) AM_RAM AM_SHARE("nvram") + AM_RANGE( 0x2000, 0xffff) AM_ROM ADDRESS_MAP_END /* Input ports */ @@ -50,27 +44,28 @@ static INPUT_PORTS_START( supercon ) INPUT_PORTS_END /* Machine driver */ + static MACHINE_CONFIG_START( supercon, supercon_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu",M6502,MAIN_CLOCK) + MCFG_CPU_ADD("maincpu", M6502, XTAL_8MHz/2) + MCFG_CPU_PERIODIC_INT_DRIVER(supercon_state, irq0_line_hold, 600) // ? MCFG_CPU_PROGRAM_MAP(supercon_mem) - - /* sound hardware */ - MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("beeper", BEEP, 3250) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + + MCFG_NVRAM_ADD_0FILL("nvram") + + MCFG_DEFAULT_LAYOUT(layout_supercon) MACHINE_CONFIG_END /* ROM definition */ ROM_START(supercon) - ROM_REGION(0x10000,"maincpu",0) - ROM_LOAD("supercon_low.bin", 0x0000, 0x8000, CRC(b853cf6e) SHA1(1a759072a5023b92c07f1fac01b7a21f7b5b45d0 )) - ROM_LOAD("supercon_high.bin", 0x8000, 0x8000, CRC(c8f82331) SHA1(f7fd039f9a3344db9749931490ded9e9e309cfbe )) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("novag_8441", 0x0000, 0x8000, CRC(b853cf6e) SHA1(1a759072a5023b92c07f1fac01b7a21f7b5b45d0) ) // label obscured by Q.C. sticker + ROM_LOAD("novag_8442", 0x8000, 0x8000, CRC(c8f82331) SHA1(f7fd039f9a3344db9749931490ded9e9e309cfbe) ) ROM_END /* Driver */ -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -CONS( 1983, supercon, 0, 0, supercon, supercon, driver_device, 0, "Novag", "SuperConstellation", MACHINE_IS_SKELETON ) +/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ +CONS( 1984, supercon, 0, 0, supercon, supercon, driver_device, 0, "Novag", "Super Constellation", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW ) diff --git a/src/mame/layout/supercon.lay b/src/mame/layout/supercon.lay new file mode 100644 index 00000000000..9d3e4d2766a --- /dev/null +++ b/src/mame/layout/supercon.lay @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-70-g09d2 From facd2b7ddabf14064d92881efd5f31573ff28a25 Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 8 Mar 2016 12:55:49 +0100 Subject: fidel*: changed COMP to CONS --- src/mame/drivers/fidel6502.cpp | 14 +++++++------- src/mame/drivers/fidel68k.cpp | 8 ++++---- src/mame/drivers/fidelz80.cpp | 40 ++++++++++++++++++++-------------------- 3 files changed, 31 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp index 45b4181c393..0f4f0c66900 100644 --- a/src/mame/drivers/fidel6502.cpp +++ b/src/mame/drivers/fidel6502.cpp @@ -960,12 +960,12 @@ ROM_END ******************************************************************************/ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ -COMP( 1981, csc, 0, 0, csc, csc, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (English)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1981, cscsp, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1981, cscg, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (German)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1981, cscfr, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (French)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1981, csc, 0, 0, csc, csc, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (English)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1981, cscsp, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1981, cscg, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (German)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1981, cscfr, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (French)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1984, fscc12, 0, 0, sc12, sc12, driver_device, 0, "Fidelity Electronics", "Sensory Chess Challenger 12-B", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1984, fscc12, 0, 0, sc12, sc12, driver_device, 0, "Fidelity Electronics", "Sensory Chess Challenger 12-B", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1987, fexcel, 0, 0, fexcel, fexcel, driver_device, 0, "Fidelity Electronics", "Excellence (model 6080/6093)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1987, fexcelv, 0, 0, fexcelv, fexcelv, driver_device, 0, "Fidelity Electronics", "Voice Excellence", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1987, fexcel, 0, 0, fexcel, fexcel, driver_device, 0, "Fidelity Electronics", "Excellence (model 6080/6093)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1987, fexcelv, 0, 0, fexcelv, fexcelv, driver_device, 0, "Fidelity Electronics", "Voice Excellence", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/drivers/fidel68k.cpp b/src/mame/drivers/fidel68k.cpp index 00cb94cc985..463b92f8638 100644 --- a/src/mame/drivers/fidel68k.cpp +++ b/src/mame/drivers/fidel68k.cpp @@ -467,7 +467,7 @@ ROM_END ******************************************************************************/ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ -COMP( 1989, feagv2, 0, 0, eag, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde (model 6114-2/3/4)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1990, feagv7, 0, 0, eagv7, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde (model 6117-7)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1990, feagv10, 0, 0, eagv10, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde (model 6117-10)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 2002, feagv11, feagv10, 0, eagv11, eag, driver_device, 0, "hack (Wilfried Bucke)", "Elite Avant Garde (model 6117-11)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1989, feagv2, 0, 0, eag, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde (model 6114-2/3/4)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, feagv7, 0, 0, eagv7, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde (model 6117-7)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, feagv10, 0, 0, eagv10, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde (model 6117-10)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 2002, feagv11, feagv10, 0, eagv11, eag, driver_device, 0, "hack (Wilfried Bucke)", "Elite Avant Garde (model 6117-11)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/drivers/fidelz80.cpp b/src/mame/drivers/fidelz80.cpp index 197b2845d5a..31568a6f601 100644 --- a/src/mame/drivers/fidelz80.cpp +++ b/src/mame/drivers/fidelz80.cpp @@ -1707,23 +1707,23 @@ ROM_END ******************************************************************************/ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ -COMP( 1978, cc10, 0, 0, cc10, cc10, driver_device, 0, "Fidelity Electronics", "Chess Challenger 10 (rev. B)", MACHINE_SUPPORTS_SAVE ) -COMP( 1979, cc7, 0, 0, bcc, bcc, driver_device, 0, "Fidelity Electronics", "Chess Challenger 7 (rev. B)", MACHINE_SUPPORTS_SAVE ) - -COMP( 1979, vcc, 0, 0, vcc, vcc, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (English)", MACHINE_SUPPORTS_SAVE ) -COMP( 1979, vccsp, vcc, 0, vcc, vccsp, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE ) -COMP( 1979, vccg, vcc, 0, vcc, vccg, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (German)", MACHINE_SUPPORTS_SAVE ) -COMP( 1979, vccfr, vcc, 0, vcc, vccfr, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (French)", MACHINE_SUPPORTS_SAVE ) - -COMP( 1980, uvc, vcc, 0, vcc, vcc, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (English)", MACHINE_SUPPORTS_SAVE ) -COMP( 1980, uvcsp, vcc, 0, vcc, vccsp, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE ) -COMP( 1980, uvcg, vcc, 0, vcc, vccg, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (German)", MACHINE_SUPPORTS_SAVE ) -COMP( 1980, uvcfr, vcc, 0, vcc, vccfr, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (French)", MACHINE_SUPPORTS_SAVE ) - -COMP( 1980, vsc, 0, 0, vsc, vsc, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (English)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1980, vscsp, vsc, 0, vsc, vscg, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1980, vscg, vsc, 0, vsc, vscg, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (German)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1980, vscfr, vsc, 0, vsc, vscg, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (French)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) - -COMP( 1979, vbrc, 0, 0, vbrc, vbrc, driver_device, 0, "Fidelity Electronics", "Voice Bridge Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) -COMP( 1980, bridgec3, vbrc, 0, vbrc, vbrc, driver_device, 0, "Fidelity Electronics", "Voice Bridge Challenger III", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +CONS( 1978, cc10, 0, 0, cc10, cc10, driver_device, 0, "Fidelity Electronics", "Chess Challenger 10 (rev. B)", MACHINE_SUPPORTS_SAVE ) +CONS( 1979, cc7, 0, 0, bcc, bcc, driver_device, 0, "Fidelity Electronics", "Chess Challenger 7 (rev. B)", MACHINE_SUPPORTS_SAVE ) + +CONS( 1979, vcc, 0, 0, vcc, vcc, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (English)", MACHINE_SUPPORTS_SAVE ) +CONS( 1979, vccsp, vcc, 0, vcc, vccsp, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE ) +CONS( 1979, vccg, vcc, 0, vcc, vccg, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (German)", MACHINE_SUPPORTS_SAVE ) +CONS( 1979, vccfr, vcc, 0, vcc, vccfr, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (French)", MACHINE_SUPPORTS_SAVE ) + +CONS( 1980, uvc, vcc, 0, vcc, vcc, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (English)", MACHINE_SUPPORTS_SAVE ) +CONS( 1980, uvcsp, vcc, 0, vcc, vccsp, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE ) +CONS( 1980, uvcg, vcc, 0, vcc, vccg, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (German)", MACHINE_SUPPORTS_SAVE ) +CONS( 1980, uvcfr, vcc, 0, vcc, vccfr, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (French)", MACHINE_SUPPORTS_SAVE ) + +CONS( 1980, vsc, 0, 0, vsc, vsc, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (English)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1980, vscsp, vsc, 0, vsc, vscg, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1980, vscg, vsc, 0, vsc, vscg, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (German)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1980, vscfr, vsc, 0, vsc, vscg, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (French)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) + +CONS( 1979, vbrc, 0, 0, vbrc, vbrc, driver_device, 0, "Fidelity Electronics", "Voice Bridge Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +CONS( 1980, bridgec3, vbrc, 0, vbrc, vbrc, driver_device, 0, "Fidelity Electronics", "Voice Bridge Challenger III", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) -- cgit v1.2.3-70-g09d2 From 858c1002d105eba0d97ef544f68e185bc0c68285 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 8 Mar 2016 12:56:21 +0100 Subject: compile with latest bgfx,bx (nw) --- 3rdparty/compat/mingw/alloca.h | 6 ++++++ scripts/src/3rdparty.lua | 1 + src/osd/modules/render/bgfx/chainmanager.cpp | 1 + src/osd/modules/render/bgfx/effectmanager.cpp | 1 + src/osd/modules/render/bgfx/shadermanager.cpp | 1 + 5 files changed, 10 insertions(+) create mode 100644 3rdparty/compat/mingw/alloca.h (limited to 'src') diff --git a/3rdparty/compat/mingw/alloca.h b/3rdparty/compat/mingw/alloca.h new file mode 100644 index 00000000000..2cc6e9a5a4e --- /dev/null +++ b/3rdparty/compat/mingw/alloca.h @@ -0,0 +1,6 @@ +#ifndef MINGW32_ALLOCA_H_HEADER_GUARD +#define MINGW32_ALLOCA_H_HEADER_GUARD + +#include + +#endif // MINGW32_ALLOCA_H_HEADER_GUARD diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 330a31221ee..80e4b575b80 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -772,6 +772,7 @@ end MAME_DIR .. "3rdparty/bgfx/src/shader_dxbc.cpp", MAME_DIR .. "3rdparty/bgfx/src/shader_dx9bc.cpp", MAME_DIR .. "3rdparty/bgfx/src/shader_spirv.cpp", + MAME_DIR .. "3rdparty/bgfx/src/topology.cpp", MAME_DIR .. "3rdparty/bgfx/src/vertexdecl.cpp", MAME_DIR .. "3rdparty/bgfx/examples/common/bgfx_utils.cpp", MAME_DIR .. "3rdparty/bgfx/examples/common/bounds.cpp", diff --git a/src/osd/modules/render/bgfx/chainmanager.cpp b/src/osd/modules/render/bgfx/chainmanager.cpp index 547694bd1f8..4a14bc47b86 100644 --- a/src/osd/modules/render/bgfx/chainmanager.cpp +++ b/src/osd/modules/render/bgfx/chainmanager.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include "chainmanager.h" #include "chainreader.h" diff --git a/src/osd/modules/render/bgfx/effectmanager.cpp b/src/osd/modules/render/bgfx/effectmanager.cpp index dc2550354f2..c7410406f13 100644 --- a/src/osd/modules/render/bgfx/effectmanager.cpp +++ b/src/osd/modules/render/bgfx/effectmanager.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include "effectmanager.h" #include "effectreader.h" diff --git a/src/osd/modules/render/bgfx/shadermanager.cpp b/src/osd/modules/render/bgfx/shadermanager.cpp index f7e7b30e7ec..93a7205b93c 100644 --- a/src/osd/modules/render/bgfx/shadermanager.cpp +++ b/src/osd/modules/render/bgfx/shadermanager.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include "shadermanager.h" -- cgit v1.2.3-70-g09d2 From de04399afa83f51d16e2ae497f87a8d885282254 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 8 Mar 2016 15:46:20 +0100 Subject: Fixed osdmini building for android and pnacl (nw) --- scripts/src/emu.lua | 2 +- scripts/src/osd/osdmini.lua | 1 + src/osd/modules/input/input_common.cpp | 12 +++++++++++- 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/scripts/src/emu.lua b/scripts/src/emu.lua index ac6ed9359aa..e71103a26b6 100644 --- a/scripts/src/emu.lua +++ b/scripts/src/emu.lua @@ -40,7 +40,7 @@ if _OPTIONS["with-bundled-lua"] then } end -if (_OPTIONS["targetos"] == "windows") then +if (_OPTIONS["targetos"] == "windows" and _OPTIONS["osd"] ~= "osdmini") then defines { "UI_WINDOWS", } diff --git a/scripts/src/osd/osdmini.lua b/scripts/src/osd/osdmini.lua index cc794ae88df..52a28147c32 100644 --- a/scripts/src/osd/osdmini.lua +++ b/scripts/src/osd/osdmini.lua @@ -65,6 +65,7 @@ project ("osd_" .. _OPTIONS["osd"]) MAME_DIR .. "src/osd/modules/lib/osdobj_common.h", MAME_DIR .. "src/osd/modules/font/font_sdl.cpp", MAME_DIR .. "src/osd/modules/font/font_windows.cpp", + MAME_DIR .. "src/osd/modules/font/font_dwrite.cpp", MAME_DIR .. "src/osd/modules/font/font_osx.cpp", MAME_DIR .. "src/osd/modules/font/font_none.cpp", MAME_DIR .. "src/osd/modules/netdev/taptun.cpp", diff --git a/src/osd/modules/input/input_common.cpp b/src/osd/modules/input/input_common.cpp index c3d6367da5f..eea2d52696e 100644 --- a/src/osd/modules/input/input_common.cpp +++ b/src/osd/modules/input/input_common.cpp @@ -33,13 +33,16 @@ #include #define KEY_TRANS_ENTRY0(mame, sdlsc, sdlkey, disc, virtual, ascii, UI) { ITEM_ID_##mame, KEY_ ## disc, virtual, ascii, "ITEM_ID_"#mame, (char *) UI } #define KEY_TRANS_ENTRY1(mame, sdlsc, sdlkey, disc, virtual, ascii) { ITEM_ID_##mame, KEY_ ## disc, virtual, ascii, "ITEM_ID_"#mame, (char*) #mame } -#else +#elseif defined(OSD_SDL) // SDL include #include #define KEY_TRANS_ENTRY0(mame, sdlsc, sdlkey, disc, virtual, ascii, UI) { ITEM_ID_##mame, SDL_SCANCODE_ ## sdlsc, SDLK_ ## sdlkey, ascii, "ITEM_ID_"#mame, (char *) UI } #define KEY_TRANS_ENTRY1(mame, sdlsc, sdlkey, disc, virtual, ascii) { ITEM_ID_##mame, SDL_SCANCODE_ ## sdlsc, SDLK_ ## sdlkey, ascii, "ITEM_ID_"#mame, (char*) #mame } +#else +// osd mini #endif +#if defined(OSD_WINDOWS) || defined(OSD_SDL) key_trans_entry keyboard_trans_table::s_default_table[] = { // MAME key sdl scancode sdl key di scancode virtual key ascii ui @@ -181,7 +184,14 @@ keyboard_trans_table::keyboard_trans_table() m_table = s_default_table; m_table_size = ARRAY_LENGTH(s_default_table); } +#else +keyboard_trans_table::keyboard_trans_table() +{ + m_table = nullptr; + m_table_size = 0; +} +#endif // public constructor to allow creation of non-default instances keyboard_trans_table::keyboard_trans_table(std::unique_ptr entries, unsigned int size) { -- cgit v1.2.3-70-g09d2 From 2d3c0abaefce5456e9bb7600157eba3e0589ebc2 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 8 Mar 2016 16:13:07 +0100 Subject: compile fix (nw) --- src/osd/modules/input/input_common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/osd/modules/input/input_common.cpp b/src/osd/modules/input/input_common.cpp index eea2d52696e..72a0261c99a 100644 --- a/src/osd/modules/input/input_common.cpp +++ b/src/osd/modules/input/input_common.cpp @@ -33,7 +33,7 @@ #include #define KEY_TRANS_ENTRY0(mame, sdlsc, sdlkey, disc, virtual, ascii, UI) { ITEM_ID_##mame, KEY_ ## disc, virtual, ascii, "ITEM_ID_"#mame, (char *) UI } #define KEY_TRANS_ENTRY1(mame, sdlsc, sdlkey, disc, virtual, ascii) { ITEM_ID_##mame, KEY_ ## disc, virtual, ascii, "ITEM_ID_"#mame, (char*) #mame } -#elseif defined(OSD_SDL) +#elif defined(OSD_SDL) // SDL include #include #define KEY_TRANS_ENTRY0(mame, sdlsc, sdlkey, disc, virtual, ascii, UI) { ITEM_ID_##mame, SDL_SCANCODE_ ## sdlsc, SDLK_ ## sdlkey, ascii, "ITEM_ID_"#mame, (char *) UI } -- cgit v1.2.3-70-g09d2 From ee93853ac6aa8a17183d1d9b528aeee327fc165f Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Tue, 8 Mar 2016 18:57:35 +0100 Subject: various atari drivers: soundcpu rom loading cleanups (nw) --- src/mame/audio/atarijsa.cpp | 4 +-- src/mame/audio/cyberbal.cpp | 5 ++- src/mame/drivers/atarig1.cpp | 55 +++++++++++++------------------ src/mame/drivers/atarig42.cpp | 15 ++++----- src/mame/drivers/atarigx2.cpp | 70 ++++++++++++++++------------------------ src/mame/drivers/batman.cpp | 5 ++- src/mame/drivers/beathead.cpp | 5 ++- src/mame/drivers/blstroid.cpp | 25 ++++++--------- src/mame/drivers/cyberbal.cpp | 56 ++++++++++++++++---------------- src/mame/drivers/eprom.cpp | 25 ++++++--------- src/mame/drivers/harddriv.cpp | 75 +++++++++++++++++-------------------------- src/mame/drivers/offtwall.cpp | 10 +++--- src/mame/drivers/skullxbo.cpp | 25 ++++++--------- src/mame/drivers/thunderj.cpp | 10 +++--- src/mame/drivers/toobin.cpp | 30 +++++++---------- src/mame/drivers/vindictr.cpp | 40 +++++++++-------------- src/mame/drivers/xybots.cpp | 25 ++++++--------- src/mame/includes/cyberbal.h | 2 +- 18 files changed, 198 insertions(+), 284 deletions(-) (limited to 'src') diff --git a/src/mame/audio/atarijsa.cpp b/src/mame/audio/atarijsa.cpp index 6b9781c9e49..26581c21550 100644 --- a/src/mame/audio/atarijsa.cpp +++ b/src/mame/audio/atarijsa.cpp @@ -308,7 +308,7 @@ atari_jsa_base_device::atari_jsa_base_device(const machine_config &mconfig, devi void atari_jsa_base_device::device_start() { // configure CPU bank - m_cpu_bank->configure_entries(0, 4, m_jsacpu->region()->base() + 0x10000, 0x1000); + m_cpu_bank->configure_entries(0, 4, m_jsacpu->region()->base(), 0x1000); // resolve devices m_test_read_cb.resolve_safe(0); @@ -580,7 +580,7 @@ void atari_jsa_oki_base_device::device_start() { m_oki2_banklo->configure_entries(0, 2, m_oki2->region()->base() + 0x00000, 0x00000); m_oki2_banklo->configure_entries(2, 2, m_oki2->region()->base() + 0x20000, 0x20000); - m_oki2_bankhi->set_base(m_oki1->region()->base() + 0x60000); + m_oki2_bankhi->set_base(m_oki2->region()->base() + 0x60000); } } diff --git a/src/mame/audio/cyberbal.cpp b/src/mame/audio/cyberbal.cpp index 60383a64503..249a220efc8 100644 --- a/src/mame/audio/cyberbal.cpp +++ b/src/mame/audio/cyberbal.cpp @@ -15,8 +15,7 @@ void cyberbal_state::cyberbal_sound_reset() { /* reset the sound system */ - m_bank_base = &memregion("audiocpu")->base()[0x10000]; - membank("soundbank")->set_base(&m_bank_base[0x0000]); + membank("soundbank")->set_entry(0); m_fast_68k_int = m_io_68k_int = 0; m_sound_data_from_68k = m_sound_data_from_6502 = 0; m_sound_data_from_68k_ready = m_sound_data_from_6502_ready = 0; @@ -51,7 +50,7 @@ READ8_MEMBER(cyberbal_state::sound_6502_stat_r) WRITE8_MEMBER(cyberbal_state::sound_bank_select_w) { - membank("soundbank")->set_base(&m_bank_base[0x1000 * ((data >> 6) & 3)]); + membank("soundbank")->set_entry((data >> 6) & 3); machine().bookkeeping().coin_counter_w(1, (data >> 5) & 1); machine().bookkeeping().coin_counter_w(0, (data >> 4) & 1); m_daccpu->set_input_line(INPUT_LINE_RESET, (data & 0x08) ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/drivers/atarig1.cpp b/src/mame/drivers/atarig1.cpp index b060c183f77..b4633e6ef69 100644 --- a/src/mame/drivers/atarig1.cpp +++ b/src/mame/drivers/atarig1.cpp @@ -517,9 +517,8 @@ ROM_START( hydra ) ROM_LOAD16_BYTE( "136079-1030.bin", 0x60000, 0x10000, CRC(b31fd41f) SHA1(1738d31b3262b32f89ce64fe262682b6bb544e79) ) ROM_LOAD16_BYTE( "136079-1031.bin", 0x60001, 0x10000, CRC(453d076f) SHA1(a7fd8e5efebf56c22e0a7e0b224597b4dba4692a) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "hydraa0.bin", 0x10000, 0x4000, CRC(619d7319) SHA1(3c58f18ca5c93ae049bfca91043718fff43e674c) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "hydraa0.bin", 0x00000, 0x10000, CRC(619d7319) SHA1(3c58f18ca5c93ae049bfca91043718fff43e674c) ) ROM_REGION( 0x0a0000, "gfx1", 0 ) ROM_LOAD( "136079-1017.bin", 0x000000, 0x10000, CRC(bd77b747) SHA1(da57e305468c159ca3d2cfae807a85e643bbf053) ) /* playfield, planes 0-3 odd */ @@ -577,9 +576,8 @@ ROM_START( hydrap ) ROM_LOAD16_BYTE( "hydhi3.bin", 0x60000, 0x10000, CRC(29e9e03e) SHA1(0b03482834c1c8fcdd902d513c23c0cc04900f5f) ) ROM_LOAD16_BYTE( "hydlo3.bin", 0x60001, 0x10000, CRC(7b5047f0) SHA1(99b59dfebc0df0b876e69a885a3e3b07ef958fd4) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "hydraa0.bin", 0x10000, 0x4000, BAD_DUMP CRC(619d7319) SHA1(3c58f18ca5c93ae049bfca91043718fff43e674c) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "hydraa0.bin", 0x00000, 0x10000, BAD_DUMP CRC(619d7319) SHA1(3c58f18ca5c93ae049bfca91043718fff43e674c) ) ROM_REGION( 0x0a0000, "gfx1", 0 ) ROM_LOAD( "136079-1017.bin", 0x000000, 0x10000, CRC(bd77b747) SHA1(da57e305468c159ca3d2cfae807a85e643bbf053) ) /* playfield, planes 0-3 odd */ @@ -637,9 +635,8 @@ ROM_START( hydrap2 ) ROM_LOAD16_BYTE( "30c", 0x60001, 0x10000, CRC(89604306) SHA1(ccac6eabb174903f4ee144fce53a169daa734e07) ) ROM_LOAD16_BYTE( "30e", 0x60000, 0x10000, CRC(25221b17) SHA1(bb14117f256c3db6881bb91cace297d4c636e684) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "aud.1b", 0x10000, 0x4000, CRC(e1b5188a) SHA1(e9f2a78df49fa085a9363ca194e2ceb5fa5409c4) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "aud.1b", 0x00000, 0x10000, CRC(e1b5188a) SHA1(e9f2a78df49fa085a9363ca194e2ceb5fa5409c4) ) ROM_REGION( 0x0a0000, "gfx1", 0 ) ROM_LOAD( "136079-1017.bin", 0x000000, 0x10000, CRC(bd77b747) SHA1(da57e305468c159ca3d2cfae807a85e643bbf053) ) /* playfield, planes 0-3 odd */ @@ -726,9 +723,8 @@ ROM_START( pitfight ) ROM_LOAD16_BYTE( "136081-9030.15d", 0x20000, 0x10000, CRC(3bace9ef) SHA1(29072871b268f343fa1e7fcc9682674df2b2e34f) ) ROM_LOAD16_BYTE( "136081-9031.15b", 0x20001, 0x10000, CRC(c717f011) SHA1(3c5d6c12b85285422345a1aba3f8c497f74c6889) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136081-1060.1b", 0x10000, 0x4000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136081-1060.1b", 0x00000, 0x10000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) ROM_REGION( 0x0a0000, "gfx1", 0 ) ROM_LOAD( "136081-1017.130m", 0x000000, 0x10000, CRC(ad3cfea5) SHA1(7b6fec131230e84ab87b7fc95f08989916f30e02) ) /* playfield, planes 0-3 odd */ @@ -822,9 +818,8 @@ ROM_START( pitfight7 ) ROM_LOAD16_BYTE( "136081-7030.15d", 0x20000, 0x10000, CRC(5fd5a0b1) SHA1(5d4711e8d10176b6989c4db012dbb4e29860590c) ) ROM_LOAD16_BYTE( "136081-7031.15b", 0x20001, 0x10000, CRC(e14a1d0c) SHA1(734fa1cd5ad835fa77c686006993ea9358e3b072) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136081-1060.1b", 0x10000, 0x4000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136081-1060.1b", 0x00000, 0x10000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) ROM_REGION( 0x0a0000, "gfx1", 0 ) ROM_LOAD( "136081-1017.130m", 0x000000, 0x10000, CRC(ad3cfea5) SHA1(7b6fec131230e84ab87b7fc95f08989916f30e02) ) /* playfield, planes 0-3 odd */ @@ -885,9 +880,8 @@ ROM_START( pitfight6 ) ROM_LOAD16_BYTE( "136081-6030.15d", 0x20000, 0x10000, CRC(72b4b249) SHA1(295c707783ca40d6b68eb36b4511774e889bf447) ) ROM_LOAD16_BYTE( "136081-6031.15b", 0x20001, 0x10000, CRC(f0c5d03b) SHA1(53aed44930ebaad98d833bc86837c57ac623937d) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136081-1060.1b", 0x10000, 0x4000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136081-1060.1b", 0x00000, 0x10000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) ROM_REGION( 0x0a0000, "gfx1", 0 ) ROM_LOAD( "136081-1017.130m", 0x000000, 0x10000, CRC(ad3cfea5) SHA1(7b6fec131230e84ab87b7fc95f08989916f30e02) ) /* playfield, planes 0-3 odd */ @@ -936,9 +930,8 @@ ROM_START( pitfight5 ) ROM_LOAD16_BYTE( "136081-5030.15d", 0x20000, 0x10000, CRC(6a094723) SHA1(a77046a8c5fab81cf0207122e494c32aab3b220d) ) ROM_LOAD16_BYTE( "136081-5031.15b", 0x20001, 0x10000, CRC(47400d94) SHA1(07ba297a9b3ae574bc501a24fb6e46db7a5b3de5) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136081-1060.1b", 0x10000, 0x4000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136081-1060.1b", 0x00000, 0x10000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) ROM_REGION( 0x0a0000, "gfx1", 0 ) ROM_LOAD( "136081-1017.130m", 0x000000, 0x10000, CRC(ad3cfea5) SHA1(7b6fec131230e84ab87b7fc95f08989916f30e02) ) /* playfield, planes 0-3 odd */ @@ -987,9 +980,8 @@ ROM_START( pitfight4 ) ROM_LOAD16_BYTE( "136081-3030.15d", 0x20000, 0x10000, CRC(b053e779) SHA1(f143f0e16850ad98366db208e956f7402d1ca848) ) ROM_LOAD16_BYTE( "136081-3031.15b", 0x20001, 0x10000, CRC(2b8c4d13) SHA1(6f1679ef5974bf44848bfa6db0b9b05f71f6e7d6) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136081-1060.1b", 0x10000, 0x4000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136081-1060.1b", 0x00000, 0x10000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) ROM_REGION( 0x0a0000, "gfx1", 0 ) ROM_LOAD( "136081-1017.130m", 0x000000, 0x10000, CRC(ad3cfea5) SHA1(7b6fec131230e84ab87b7fc95f08989916f30e02) ) /* playfield, planes 0-3 odd */ @@ -1050,9 +1042,8 @@ ROM_START( pitfight3 ) ROM_LOAD16_BYTE( "136081-3030.15d", 0x20000, 0x10000, CRC(b053e779) SHA1(f143f0e16850ad98366db208e956f7402d1ca848) ) ROM_LOAD16_BYTE( "136081-3031.15b", 0x20001, 0x10000, CRC(2b8c4d13) SHA1(6f1679ef5974bf44848bfa6db0b9b05f71f6e7d6) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136081-1060.1b", 0x10000, 0x4000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136081-1060.1b", 0x00000, 0x10000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) ROM_REGION( 0x0a0000, "gfx1", 0 ) ROM_LOAD( "136081-1017.130m", 0x000000, 0x10000, CRC(ad3cfea5) SHA1(7b6fec131230e84ab87b7fc95f08989916f30e02) ) /* playfield, planes 0-3 odd */ @@ -1113,9 +1104,8 @@ ROM_START( pitfightj ) ROM_LOAD16_BYTE( "136081-3430.15d", 0x20000, 0x10000, CRC(80707ac0) SHA1(39ddd228bb630bbdf32c76c7906e54f6a62c06ad) ) ROM_LOAD16_BYTE( "136081-3431.15b", 0x20001, 0x10000, CRC(9bf43aa6) SHA1(b41c30118a0c0032303d1b1de471aac292a4968a) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136081-2060.1b", 0x10000, 0x4000, CRC(4317a9f3) SHA1(310154be47fd16b417699338e04e08f3ed973198) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136081-2060.1b", 0x00000, 0x10000, CRC(4317a9f3) SHA1(310154be47fd16b417699338e04e08f3ed973198) ) ROM_REGION( 0x0a0000, "gfx1", 0 ) ROM_LOAD( "136081-1017.130m", 0x000000, 0x10000, CRC(ad3cfea5) SHA1(7b6fec131230e84ab87b7fc95f08989916f30e02) ) /* playfield, planes 0-3 odd */ @@ -1176,9 +1166,8 @@ ROM_START( pitfightb ) ROM_LOAD16_BYTE( "pit8.bin", 0x20000, 0x10000, CRC(b74a8258) SHA1(779990ed95c25dd0a8e9f30c4d9a8d69162d14fc) ) ROM_LOAD16_BYTE( "pit6.bin", 0x20001, 0x10000, CRC(40204ecd) SHA1(73d827e119cc1408356e28c1e67f6c8e287eeb15) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136081-1060.1b", 0x10000, 0x4000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136081-1060.1b", 0x00000, 0x10000, CRC(231d71d7) SHA1(24622eee5fe873ef81e1df2691bd7a1d3ea7ef6b) ) ROM_REGION( 0x0a0000, "gfx1", 0 ) ROM_LOAD( "136081-1017.130m", 0x000000, 0x10000, CRC(ad3cfea5) SHA1(7b6fec131230e84ab87b7fc95f08989916f30e02) ) /* playfield, planes 0-3 odd */ diff --git a/src/mame/drivers/atarig42.cpp b/src/mame/drivers/atarig42.cpp index b44f1f901dd..2a3ed72b35e 100644 --- a/src/mame/drivers/atarig42.cpp +++ b/src/mame/drivers/atarig42.cpp @@ -602,9 +602,8 @@ ROM_START( roadriot ) ROM_REGION( 0x2000, "asic65:asic65cpu", 0 ) /* ASIC65 TMS32015 code */ ROM_LOAD( "136089-1012.3f", 0x00000, 0x0a80, CRC(7c5498e7) SHA1(9d8b235baf7b75bef8ef9b168647c5b2b80b2cb3) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 6502 code */ - ROM_LOAD( "136089-1047.12c", 0x10000, 0x4000, CRC(849dd26c) SHA1(05a0b2a5f7ee4437448b5f076d3066d96dec2320) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 6502 code */ + ROM_LOAD( "136089-1047.12c", 0x00000, 0x10000, CRC(849dd26c) SHA1(05a0b2a5f7ee4437448b5f076d3066d96dec2320) ) ROM_REGION( 0xc0000, "gfx1", 0 ) ROM_LOAD( "136089-1041.22d", 0x000000, 0x20000, CRC(b7451f92) SHA1(9fd17913630e457e406e596f2d86afff98787750) ) /* playfield, planes 0-1 */ @@ -660,9 +659,8 @@ ROM_START( roadrioto ) ROM_REGION( 0x2000, "asic65:asic65cpu", 0 ) /* ASIC65 TMS32015 code */ ROM_LOAD( "136089-1012.3f", 0x00000, 0x0a80, CRC(7c5498e7) SHA1(9d8b235baf7b75bef8ef9b168647c5b2b80b2cb3) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 6502 code */ - ROM_LOAD( "136089-1047.12c", 0x10000, 0x4000, CRC(849dd26c) SHA1(05a0b2a5f7ee4437448b5f076d3066d96dec2320) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 6502 code */ + ROM_LOAD( "136089-1047.12c", 0x00000, 0x10000, CRC(849dd26c) SHA1(05a0b2a5f7ee4437448b5f076d3066d96dec2320) ) ROM_REGION( 0xc0000, "gfx1", 0 ) ROM_LOAD( "136089-1041.22d", 0x000000, 0x20000, CRC(b7451f92) SHA1(9fd17913630e457e406e596f2d86afff98787750) ) /* playfield, planes 0-1 */ @@ -719,9 +717,8 @@ ROM_START( guardian ) ROM_REGION( 0x2000, "asic65:asic65cpu", 0 ) /* ASIC65 TMS32015 code */ ROM_LOAD( "136089-1012.3f", 0x00000, 0x0a80, NO_DUMP ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 6502 code */ - ROM_LOAD( "136092-0080-snd.12c", 0x10000, 0x4000, CRC(0388f805) SHA1(49c11313bc4192dbe294cf68b652cb19047889fd) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 6502 code */ + ROM_LOAD( "136092-0080-snd.12c", 0x00000, 0x10000, CRC(0388f805) SHA1(49c11313bc4192dbe294cf68b652cb19047889fd) ) ROM_REGION( 0x180000, "gfx1", 0 ) ROM_LOAD( "136092-0037a.23e", 0x000000, 0x80000, CRC(ca10b63e) SHA1(243a2a440e1bc9135d3dbe6553d39c54b9bdcd13) ) /* playfield, planes 0-1 */ diff --git a/src/mame/drivers/atarigx2.cpp b/src/mame/drivers/atarigx2.cpp index 157e3e4f708..5f73dfd9434 100644 --- a/src/mame/drivers/atarigx2.cpp +++ b/src/mame/drivers/atarigx2.cpp @@ -1512,9 +1512,8 @@ ROM_START( spclords ) ROM_LOAD32_BYTE( "main2rc.095", 0x000002, 0x020000, CRC(49d30630) SHA1(2d0f2abe5d17b4cf575f80687502fac33c7f3206) ) ROM_LOAD32_BYTE( "main3rc.095", 0x000003, 0x020000, CRC(3872424c) SHA1(db08ad9386dfe8fa4e2a83a2505118a636247279) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136095.80a", 0x10000, 0x4000, CRC(33bc0ede) SHA1(2ee30d9125057cdfbdb83e4dbf28306c35a9c233) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136095.80a", 0x00000, 0x10000, CRC(33bc0ede) SHA1(2ee30d9125057cdfbdb83e4dbf28306c35a9c233) ) ROM_REGION( 0x60000, "gfx1", 0 ) ROM_LOAD( "136095.30a", 0x00000, 0x20000, CRC(27e0cfec) SHA1(03df57757d091f9a0b8c8d98d091dd759f570788) ) /* playfield, planes 0-1 */ @@ -1558,9 +1557,8 @@ ROM_START( spclordsb ) ROM_LOAD32_BYTE( "136095.23b", 0x00002, 0x20000, CRC(bc64ab63) SHA1(999851a39123f6a01cb83d97ea744e12590b6e7e) ) ROM_LOAD32_BYTE( "136095.24b", 0x00003, 0x20000, CRC(7284a01a) SHA1(afa866c97b4c3df7fda3c196072231096beaa0db) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136095.80a", 0x10000, 0x4000, CRC(33bc0ede) SHA1(2ee30d9125057cdfbdb83e4dbf28306c35a9c233) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136095.80a", 0x00000, 0x10000, CRC(33bc0ede) SHA1(2ee30d9125057cdfbdb83e4dbf28306c35a9c233) ) ROM_REGION( 0x60000, "gfx1", 0 ) ROM_LOAD( "136095.30a", 0x00000, 0x20000, CRC(27e0cfec) SHA1(03df57757d091f9a0b8c8d98d091dd759f570788) ) /* playfield, planes 0-1 */ @@ -1604,9 +1602,8 @@ ROM_START( spclordsg ) ROM_LOAD32_BYTE( "german2.095", 0x000002, 0x020000, CRC(9527df10) SHA1(c18434c1f40fa23a6cc78df7104c7e2e6888d189) ) ROM_LOAD32_BYTE( "german3.095", 0x000003, 0x020000, CRC(0aaaad66) SHA1(382b859be652d7d83319907d354d294643cef2b4) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136095.80a", 0x10000, 0x4000, CRC(33bc0ede) SHA1(2ee30d9125057cdfbdb83e4dbf28306c35a9c233) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136095.80a", 0x00000, 0x10000, CRC(33bc0ede) SHA1(2ee30d9125057cdfbdb83e4dbf28306c35a9c233) ) ROM_REGION( 0x60000, "gfx1", 0 ) ROM_LOAD( "136095.30a", 0x00000, 0x20000, CRC(27e0cfec) SHA1(03df57757d091f9a0b8c8d98d091dd759f570788) ) /* playfield, planes 0-1 */ @@ -1650,9 +1647,8 @@ ROM_START( spclordsa ) ROM_LOAD32_BYTE( "136095.23a", 0x00002, 0x20000, CRC(20a0e443) SHA1(54597342901d6b38dddbe754f41ceeddcc4e5289) ) ROM_LOAD32_BYTE( "136095.24a", 0x00003, 0x20000, CRC(d3f0439c) SHA1(f9245f448b77187b4cd5d9436b5caebd2800be5d)) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136095.80a", 0x10000, 0x4000, CRC(33bc0ede) SHA1(2ee30d9125057cdfbdb83e4dbf28306c35a9c233) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136095.80a", 0x00000, 0x10000, CRC(33bc0ede) SHA1(2ee30d9125057cdfbdb83e4dbf28306c35a9c233) ) ROM_REGION( 0x60000, "gfx1", 0 ) ROM_LOAD( "136095.30a", 0x00000, 0x20000, CRC(27e0cfec) SHA1(03df57757d091f9a0b8c8d98d091dd759f570788) ) /* playfield, planes 0-1 */ @@ -1696,9 +1692,8 @@ ROM_START( motofren ) ROM_LOAD32_BYTE( "136094-moto2.37e", 0x000002, 0x020000, CRC(6b1c7626) SHA1(b318a5856bcbd6a8fc7eb92e4b9a576b8c16cbf3) ) ROM_LOAD32_BYTE( "136094-moto3.37j", 0x000003, 0x020000, CRC(44c3cd2a) SHA1(a16046586cbaa000e056115c92b5f22bf49869ad) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136094-0080a.12c", 0x10000, 0x4000, CRC(0b1e565c) SHA1(03bdeafd8cf680f76bbd1f9aba6efac27f19a93c) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136094-0080a.12c", 0x00000, 0x10000, CRC(0b1e565c) SHA1(03bdeafd8cf680f76bbd1f9aba6efac27f19a93c) ) ROM_REGION( 0x180000, "gfx1", 0 ) ROM_LOAD( "136094-0036a.2d", 0x000000, 0x80000, CRC(1b63b493) SHA1(980141fec011fa2b5cb020eeecb4784d31679dba) ) /* playfield, planes 0-1 */ @@ -1744,9 +1739,8 @@ ROM_START( motofrenmd ) ROM_LOAD32_BYTE( "136094-0223a.37e", 0x00002, 0x20000, CRC(cdb04a4a) SHA1(ee342bdb5654e8b841b1f60e46d1bcae7c4e5cd2) ) ROM_LOAD32_BYTE( "136094-0224a.37j", 0x00003, 0x20000, CRC(f3a9949f) SHA1(d3fa68fc63c505dd4c9d0e0c7f0625cc24ac9571) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136094-0080b.12c", 0x10000, 0x4000, CRC(5e542608) SHA1(8a10b5fac6ac120c7aae2edaa12413c9b8345d87) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136094-0080b.12c", 0x00000, 0x10000, CRC(5e542608) SHA1(8a10b5fac6ac120c7aae2edaa12413c9b8345d87) ) ROM_REGION( 0x180000, "gfx1", 0 ) /* Although verified, the manual states the label codes as 136094-0030 through 136094-0032 */ ROM_LOAD( "136094-0036a.2d", 0x000000, 0x80000, CRC(1b63b493) SHA1(980141fec011fa2b5cb020eeecb4784d31679dba) ) /* playfield, planes 0-1 */ @@ -1796,9 +1790,8 @@ ROM_START( motofrei ) ROM_LOAD32_BYTE( "136094-motoi2.37e", 0x000002, 0x020000, CRC(7a26217f) SHA1(1271a000e2976480a3b959609a5597498886be4f) ) ROM_LOAD32_BYTE( "136094-motoi3.37j", 0x000003, 0x020000, CRC(ff5ca6ad) SHA1(1e26db56940ce1db819d2179f4ce3962e0b5b732) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136094-0080a.12c", 0x10000, 0x4000, CRC(0b1e565c) SHA1(03bdeafd8cf680f76bbd1f9aba6efac27f19a93c) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136094-0080a.12c", 0x00000, 0x10000, CRC(0b1e565c) SHA1(03bdeafd8cf680f76bbd1f9aba6efac27f19a93c) ) ROM_REGION( 0x180000, "gfx1", 0 ) ROM_LOAD( "136094-0036a.2d", 0x000000, 0x80000, CRC(1b63b493) SHA1(980141fec011fa2b5cb020eeecb4784d31679dba) ) /* playfield, planes 0-1 */ @@ -1845,9 +1838,8 @@ ROM_START( motofreg ) ROM_LOAD32_BYTE( "136094-motog2.37e", 0x000002, 0x020000, CRC(01400d54) SHA1(cd539497465857a804b5bc228bb0c93afd1e684e) ) ROM_LOAD32_BYTE( "136094-motog3.37j", 0x000003, 0x020000, CRC(c467c136) SHA1(9407bdf65ee6261e30227e6b87e2a35da8ee124e) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136094-0080a.12c", 0x10000, 0x4000, CRC(0b1e565c) SHA1(03bdeafd8cf680f76bbd1f9aba6efac27f19a93c) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136094-0080a.12c", 0x00000, 0x10000, CRC(0b1e565c) SHA1(03bdeafd8cf680f76bbd1f9aba6efac27f19a93c) ) ROM_REGION( 0x180000, "gfx1", 0 ) ROM_LOAD( "136094-0036a.2d", 0x000000, 0x80000, CRC(1b63b493) SHA1(980141fec011fa2b5cb020eeecb4784d31679dba) ) /* playfield, planes 0-1 */ @@ -1894,9 +1886,8 @@ ROM_START( motofmdg ) ROM_LOAD32_BYTE( "136094-mdg2.37e", 0x000002, 0x020000, CRC(0b8bfe6e) SHA1(7220032a07928fd8a887c63ffcab4ec526733cae) ) ROM_LOAD32_BYTE( "136094-mdg3.37j", 0x000003, 0x020000, CRC(1dcd0d09) SHA1(0f6801694498688ed94588ac4b828ac56f3a16ec) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136094-0080a.12c", 0x10000, 0x4000, CRC(0b1e565c) SHA1(03bdeafd8cf680f76bbd1f9aba6efac27f19a93c) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136094-0080a.12c", 0x00000, 0x10000, CRC(0b1e565c) SHA1(03bdeafd8cf680f76bbd1f9aba6efac27f19a93c) ) ROM_REGION( 0x180000, "gfx1", 0 ) ROM_LOAD( "136094-0036a.2d", 0x000000, 0x80000, CRC(1b63b493) SHA1(980141fec011fa2b5cb020eeecb4784d31679dba) ) /* playfield, planes 0-1 */ @@ -1942,9 +1933,8 @@ ROM_START( motofrenft ) ROM_LOAD32_BYTE( "136094-ft2.37e", 0x000002, 0x020000, CRC(30eb94bb) SHA1(b7a2b41570d2110aaedea8a3b9d120af31671bbd) ) ROM_LOAD32_BYTE( "136094-ft3.37j", 0x000003, 0x020000, CRC(a92e05e3) SHA1(354b6bbb058d10c4da55cb58bf05eae83350ba08) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136094-0080a.12c", 0x10000, 0x4000, CRC(0b1e565c) SHA1(03bdeafd8cf680f76bbd1f9aba6efac27f19a93c) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136094-0080a.12c", 0x00000, 0x10000, CRC(0b1e565c) SHA1(03bdeafd8cf680f76bbd1f9aba6efac27f19a93c) ) ROM_REGION( 0x180000, "gfx1", 0 ) ROM_LOAD( "136094-0036a.2d", 0x000000, 0x80000, CRC(1b63b493) SHA1(980141fec011fa2b5cb020eeecb4784d31679dba) ) /* playfield, planes 0-1 */ @@ -1990,9 +1980,8 @@ ROM_START( motofrenmf ) ROM_LOAD32_BYTE( "136094-ftmd2.37e", 0x000002, 0x020000, CRC(769223fc) SHA1(acfafae3d81a6a3a4ff82c6381590ac31ad80f23) ) ROM_LOAD32_BYTE( "136094-ftmd3.37j", 0x000003, 0x020000, CRC(96382cc0) SHA1(ba2b6b105c552077767d1185886761fce3ec2885) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136094-0080a.12c", 0x10000, 0x4000, CRC(0b1e565c) SHA1(03bdeafd8cf680f76bbd1f9aba6efac27f19a93c) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136094-0080a.12c", 0x00000, 0x10000, CRC(0b1e565c) SHA1(03bdeafd8cf680f76bbd1f9aba6efac27f19a93c) ) ROM_REGION( 0x180000, "gfx1", 0 ) ROM_LOAD( "136094-0036a.2d", 0x000000, 0x80000, CRC(1b63b493) SHA1(980141fec011fa2b5cb020eeecb4784d31679dba) ) /* playfield, planes 0-1 */ @@ -2081,9 +2070,8 @@ ROM_START( rrreveng ) /* all roms above are from this PCB however the sound board was missing - assumed to be the same */ - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "rr65snd.bin", 0x10000, 0x4000, CRC(d78429da) SHA1(a4d36d74986f08c793f15f2e67cb97a8c91c5e90) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "rr65snd.bin", 0x00000, 0x10000, CRC(d78429da) SHA1(a4d36d74986f08c793f15f2e67cb97a8c91c5e90) ) ROM_REGION( 0x80000, "jsa:oki1", 0 ) ROM_LOAD( "rralpc0.bin", 0x00000, 0x80000, CRC(1f7b6ecf) SHA1(1787a2e89618e1338d70a54684dbc7d44c5f5559) ) @@ -2100,9 +2088,8 @@ ROM_START( rrrevenga ) /* Same program roms as the set below, but shares more ro ROM_LOAD32_BYTE( "rrprglh.37e", 0x00002, 0x20000, CRC(2b03a6fc) SHA1(7c95a0307b854bd37fd327ff1af1b69aa60fb2fd) ) ROM_LOAD32_BYTE( "rrprgll.37j", 0x00003, 0x20000, CRC(acf078da) SHA1(3506e105d3b208864ce12ab20e6250cb3a0005d6) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "rr65snd.bin", 0x10000, 0x4000, CRC(d78429da) SHA1(a4d36d74986f08c793f15f2e67cb97a8c91c5e90) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "rr65snd.bin", 0x00000, 0x10000, CRC(d78429da) SHA1(a4d36d74986f08c793f15f2e67cb97a8c91c5e90) ) ROM_REGION( 0x180000, "gfx1", 0 ) ROM_LOAD( "rralpl.2d", 0x000000, 0x80000, CRC(00488dad) SHA1(604f08a219db0438dcbf21337ebd497f353bd812) ) /* playfield, planes 0-1 */ @@ -2160,9 +2147,8 @@ ROM_START( rrrevengb ) ROM_LOAD32_BYTE( "rrprglh.37e", 0x00002, 0x20000, CRC(2b03a6fc) SHA1(7c95a0307b854bd37fd327ff1af1b69aa60fb2fd) ) ROM_LOAD32_BYTE( "rrprgll.37j", 0x00003, 0x20000, CRC(acf078da) SHA1(3506e105d3b208864ce12ab20e6250cb3a0005d6) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "rr65snd.bin", 0x10000, 0x4000, CRC(d78429da) SHA1(a4d36d74986f08c793f15f2e67cb97a8c91c5e90) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "rr65snd.bin", 0x00000, 0x10000, CRC(d78429da) SHA1(a4d36d74986f08c793f15f2e67cb97a8c91c5e90) ) ROM_REGION( 0x180000, "gfx1", 0 ) ROM_LOAD( "rralpl.2d", 0x000000, 0x80000, CRC(00488dad) SHA1(604f08a219db0438dcbf21337ebd497f353bd812) ) /* playfield, planes 0-1 */ diff --git a/src/mame/drivers/batman.cpp b/src/mame/drivers/batman.cpp index 69b0aae9e7a..bde69a49251 100644 --- a/src/mame/drivers/batman.cpp +++ b/src/mame/drivers/batman.cpp @@ -251,9 +251,8 @@ ROM_START( batman ) ROM_LOAD16_BYTE( "136085-2034.9r", 0x80000, 0x20000, CRC(05388c62) SHA1(de037203d94e72e2922c89256da080ae023ca0e7) ) ROM_LOAD16_BYTE( "136085-2035.5r", 0x80001, 0x20000, CRC(e77c92dd) SHA1(6d475092f7628114960d26b8ec1c5eae5e61ce25) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136085-1040.12c", 0x10000, 0x4000, CRC(080db83c) SHA1(ec084b7c1dc5878acd6d081e2e8b8d1e8b3d8a45) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136085-1040.12c", 0x00000, 0x10000, CRC(080db83c) SHA1(ec084b7c1dc5878acd6d081e2e8b8d1e8b3d8a45) ) ROM_REGION( 0x20000, "gfx1", 0 ) ROM_LOAD( "136085-2009.10m", 0x00000, 0x20000, CRC(a82d4923) SHA1(38e03eebd95347a383f3d7357462252961bd3c7f) ) /* alphanumerics */ diff --git a/src/mame/drivers/beathead.cpp b/src/mame/drivers/beathead.cpp index 79221b41aa4..59de21205b5 100644 --- a/src/mame/drivers/beathead.cpp +++ b/src/mame/drivers/beathead.cpp @@ -400,9 +400,8 @@ MACHINE_CONFIG_END *************************************/ ROM_START( beathead ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "bhsnd.bin", 0x10000, 0x4000, CRC(dfd33f02) SHA1(479a4838c89691d5a4654a4cd84b6433a9e86109) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "bhsnd.bin", 0x00000, 0x10000, CRC(dfd33f02) SHA1(479a4838c89691d5a4654a4cd84b6433a9e86109) ) ROM_REGION32_LE( 0x400000, "user1", 0 ) /* 4MB for ASAP code */ ROM_LOAD32_BYTE( "bhprog0.bin", 0x000000, 0x80000, CRC(87975721) SHA1(862cb3a290c829aedea26ee7100c50a12e9517e7) ) diff --git a/src/mame/drivers/blstroid.cpp b/src/mame/drivers/blstroid.cpp index f3931a93e5e..f208e11cb69 100644 --- a/src/mame/drivers/blstroid.cpp +++ b/src/mame/drivers/blstroid.cpp @@ -227,9 +227,8 @@ ROM_START( blstroid ) ROM_LOAD16_BYTE( "136057-4124.4c", 0x020000, 0x010000, CRC(fd2365df) SHA1(63ed3f9a92fed985f9ddb93687f11a24c8309f56) ) ROM_LOAD16_BYTE( "136057-4122.4b", 0x020001, 0x010000, CRC(c364706e) SHA1(e03cd60d139000607d83240b0b48865eafb1188b) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136057-1135.2k", 0x010000, 0x004000, CRC(baa8b5fe) SHA1(4af1f9bec3ffa856016a89bc20041d572305ba3a) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136057-1135.2k", 0x00000, 0x10000, CRC(baa8b5fe) SHA1(4af1f9bec3ffa856016a89bc20041d572305ba3a) ) ROM_REGION( 0x040000, "gfx1", 0 ) ROM_LOAD( "136057-1101.1l", 0x000000, 0x010000, CRC(3c2daa5b) SHA1(2710a05e95afd8452104c4f4a9250a3b7d728a42) ) @@ -264,9 +263,8 @@ ROM_START( blstroid3 ) ROM_LOAD16_BYTE( "136057-3124.4c", 0x020000, 0x010000, CRC(a9140c31) SHA1(02518bf998c0c74dff66f3192dcb1f91b1812cf8) ) ROM_LOAD16_BYTE( "136057-3122.4b", 0x020001, 0x010000, CRC(137fbb17) SHA1(3dda03ecdb2dc9a9cd78aeaa502497662496a26d) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136057-1135.2k", 0x010000, 0x004000, CRC(baa8b5fe) SHA1(4af1f9bec3ffa856016a89bc20041d572305ba3a) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136057-1135.2k", 0x00000, 0x10000, CRC(baa8b5fe) SHA1(4af1f9bec3ffa856016a89bc20041d572305ba3a) ) ROM_REGION( 0x040000, "gfx1", 0 ) ROM_LOAD( "136057-1101.1l", 0x000000, 0x010000, CRC(3c2daa5b) SHA1(2710a05e95afd8452104c4f4a9250a3b7d728a42) ) @@ -301,9 +299,8 @@ ROM_START( blstroid2 ) ROM_LOAD16_BYTE( "136057-2124.4c", 0x020000, 0x010000, CRC(d0fa38fe) SHA1(8aeae50dff6bcd14ac5faf10f15724b7f7430f5c) ) ROM_LOAD16_BYTE( "136057-2122.4b", 0x020001, 0x010000, CRC(744bf921) SHA1(bb9118bfc04745df2eb78e1d1e70f7fc2e0509d4) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136057-1135.2k", 0x010000, 0x004000, CRC(baa8b5fe) SHA1(4af1f9bec3ffa856016a89bc20041d572305ba3a) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136057-1135.2k", 0x00000, 0x10000, CRC(baa8b5fe) SHA1(4af1f9bec3ffa856016a89bc20041d572305ba3a) ) ROM_REGION( 0x040000, "gfx1", 0 ) ROM_LOAD( "136057-1101.1l", 0x000000, 0x010000, CRC(3c2daa5b) SHA1(2710a05e95afd8452104c4f4a9250a3b7d728a42) ) @@ -338,9 +335,8 @@ ROM_START( blstroidg ) ROM_LOAD16_BYTE( "136057-2224.4c", 0x020000, 0x010000, CRC(849249d4) SHA1(61d6eaff7df54f0353639e192eb6074a80916e29) ) ROM_LOAD16_BYTE( "136057-2222.4b", 0x020001, 0x010000, CRC(bdeaba0d) SHA1(f479514b5d9543f9e12aa1ac48e20bf054cb18d0) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136057-1135.2k", 0x010000, 0x004000, CRC(baa8b5fe) SHA1(4af1f9bec3ffa856016a89bc20041d572305ba3a) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136057-1135.2k", 0x00000, 0x10000, CRC(baa8b5fe) SHA1(4af1f9bec3ffa856016a89bc20041d572305ba3a) ) ROM_REGION( 0x040000, "gfx1", 0 ) ROM_LOAD( "136057-1101.1l", 0x000000, 0x010000, CRC(3c2daa5b) SHA1(2710a05e95afd8452104c4f4a9250a3b7d728a42) ) @@ -375,9 +371,8 @@ ROM_START( blstroidh ) ROM_LOAD16_BYTE( "eheadh1.c5", 0x20000, 0x10000, CRC(0b7a3cb6) SHA1(7dc585ff536055e85b0849aa075f2fdab34a8e1c) ) ROM_LOAD16_BYTE( "eheadl1.b5", 0x20001, 0x10000, CRC(43971694) SHA1(a39a8da244645bb56081fd71609a33d8b7d78478) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136057-1135.2k", 0x010000, 0x004000, CRC(baa8b5fe) SHA1(4af1f9bec3ffa856016a89bc20041d572305ba3a) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136057-1135.2k", 0x00000, 0x10000, CRC(baa8b5fe) SHA1(4af1f9bec3ffa856016a89bc20041d572305ba3a) ) ROM_REGION( 0x040000, "gfx1", 0 ) ROM_LOAD( "136057-1101.1l", 0x000000, 0x010000, CRC(3c2daa5b) SHA1(2710a05e95afd8452104c4f4a9250a3b7d728a42) ) diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp index f7d8d0a0466..3b911cf0efc 100644 --- a/src/mame/drivers/cyberbal.cpp +++ b/src/mame/drivers/cyberbal.cpp @@ -48,7 +48,7 @@ void cyberbal_state::update_interrupts() } -MACHINE_START_MEMBER(cyberbal_state,cyberbal) +MACHINE_START_MEMBER(cyberbal_state,cyberbal2p) { atarigen_state::machine_start(); @@ -60,6 +60,13 @@ MACHINE_START_MEMBER(cyberbal_state,cyberbal) save_item(NAME(m_sound_data_from_6502_ready)); } +MACHINE_START_MEMBER(cyberbal_state,cyberbal) +{ + MACHINE_START_CALL_MEMBER(cyberbal2p); + + membank("soundbank")->configure_entries(0, 4, memregion("audiocpu")->base(), 0x1000); +} + MACHINE_RESET_MEMBER(cyberbal_state,cyberbal) { @@ -476,7 +483,7 @@ static MACHINE_CONFIG_START( cyberbal2p, cyberbal_state ) MCFG_CPU_PROGRAM_MAP(cyberbal2p_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen) - MCFG_MACHINE_START_OVERRIDE(cyberbal_state,cyberbal) + MCFG_MACHINE_START_OVERRIDE(cyberbal_state,cyberbal2p) MCFG_MACHINE_RESET_OVERRIDE(cyberbal_state,cyberbal2p) MCFG_ATARI_EEPROM_2816_ADD("eeprom") @@ -522,9 +529,8 @@ ROM_START( cyberbal ) ROM_LOAD16_BYTE( "136064-4123.1m", 0x000000, 0x010000, CRC(fb872740) SHA1(15e6721d466fe56d7c97c6801e214b32803a0a0d) ) ROM_LOAD16_BYTE( "136064-4124.1kl", 0x000001, 0x010000, CRC(87babad9) SHA1(acdc6b5976445e203de19eb03697e307fe6da77d) ) - ROM_REGION( 0x14000, "audiocpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136064-2131.2f", 0x010000, 0x004000, CRC(bd7e3d84) SHA1(f87878042fc79fa3883136b31ac15ddc22c6023c) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136064-2131.2f", 0x000000, 0x010000, CRC(bd7e3d84) SHA1(f87878042fc79fa3883136b31ac15ddc22c6023c) ) ROM_REGION( 0x40000, "extra", 0 ) /* 4*64k for 68000 code */ ROM_LOAD16_BYTE( "136064-2127.3cd", 0x000000, 0x010000, CRC(3e5feb1f) SHA1(9f92f496adbdf74e394e0d710d6471b9666ba5e5) ) @@ -583,9 +589,8 @@ ROM_START( cyberbal2 ) ROM_LOAD16_BYTE( "136064-2123.1m", 0x000000, 0x010000, CRC(502676e8) SHA1(c0f1f1ce50d3df21cb81244268faef6c303cdfab) ) ROM_LOAD16_BYTE( "136064-2124.1kl", 0x000001, 0x010000, CRC(30f55915) SHA1(ab93ec46f282ab9a0cd47c989537a7e036975e3f) ) - ROM_REGION( 0x14000, "audiocpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136064-2131.2f", 0x010000, 0x004000, CRC(bd7e3d84) SHA1(f87878042fc79fa3883136b31ac15ddc22c6023c) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136064-2131.2f", 0x000000, 0x010000, CRC(bd7e3d84) SHA1(f87878042fc79fa3883136b31ac15ddc22c6023c) ) ROM_REGION( 0x40000, "extra", 0 ) /* 4*64k for 68000 code */ ROM_LOAD16_BYTE( "136064-2127.3cd", 0x000000, 0x010000, CRC(3e5feb1f) SHA1(9f92f496adbdf74e394e0d710d6471b9666ba5e5) ) @@ -637,9 +642,8 @@ ROM_START( cyberbalp ) ROM_LOAD16_BYTE( "136064-0123.1m", 0x000000, 0x010000, CRC(59bac810) SHA1(d4742b2b554c2ad62a2ea7152db3f06a06cddd67) ) ROM_LOAD16_BYTE( "136064-0124.1kl", 0x000001, 0x010000, CRC(e48e6dd3) SHA1(4d45bc66c0a3eb1174db7f19c5dee54dabad68f3) ) - ROM_REGION( 0x14000, "audiocpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136064-0131.2f", 0x010000, 0x004000, CRC(c72b71ce) SHA1(6d3d8f437cf55ccaaa4490daa69f402902944686) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136064-0131.2f", 0x000000, 0x010000, CRC(c72b71ce) SHA1(6d3d8f437cf55ccaaa4490daa69f402902944686) ) ROM_REGION( 0x40000, "extra", 0 ) /* 4*64k for 68000 code */ ROM_LOAD16_BYTE( "136064-0127.3cd", 0x000000, 0x010000, CRC(37ad3420) SHA1(e9c1ea59f5f9a133822a49027b4abf02af855ca2) ) @@ -697,9 +701,8 @@ ROM_START( cyberbal2p ) ROM_LOAD16_BYTE( "136071-1025.27c", 0x060000, 0x010000, CRC(95ff68c6) SHA1(43f716a4c44fe1a38fcc6e2600bac948bb603504) ) ROM_LOAD16_BYTE( "136071-1026.27d", 0x060001, 0x010000, CRC(f61c4898) SHA1(9e4a14eac6d197f63c3392af3d804e81c034cb09) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136071-1042.1b", 0x010000, 0x004000, CRC(e63cf125) SHA1(449880f561660ba67ac2d7f8ce6333768e0ae0be) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136071-1042.1b", 0x00000, 0x10000, CRC(e63cf125) SHA1(449880f561660ba67ac2d7f8ce6333768e0ae0be) ) ROM_REGION( 0x140000, "gfx1", 0 ) ROM_LOAD( "136071-1001.55l", 0x000000, 0x020000, CRC(586ba107) SHA1(f15d4489f5834ea5fe695f43cb9d1c2401179870) ) @@ -747,9 +750,8 @@ ROM_START( cyberbal2p3 ) ROM_LOAD16_BYTE( "136071-1025.27c", 0x060000, 0x010000, CRC(95ff68c6) SHA1(43f716a4c44fe1a38fcc6e2600bac948bb603504) ) ROM_LOAD16_BYTE( "136071-1026.27d", 0x060001, 0x010000, CRC(f61c4898) SHA1(9e4a14eac6d197f63c3392af3d804e81c034cb09) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136071-1042.1b", 0x010000, 0x004000, CRC(e63cf125) SHA1(449880f561660ba67ac2d7f8ce6333768e0ae0be) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136071-1042.1b", 0x00000, 0x10000, CRC(e63cf125) SHA1(449880f561660ba67ac2d7f8ce6333768e0ae0be) ) ROM_REGION( 0x140000, "gfx1", 0 ) ROM_LOAD( "136071-1001.55l", 0x000000, 0x020000, CRC(586ba107) SHA1(f15d4489f5834ea5fe695f43cb9d1c2401179870) ) @@ -797,9 +799,8 @@ ROM_START( cyberbal2p2 ) ROM_LOAD16_BYTE( "136071-1025.27c", 0x060000, 0x010000, CRC(95ff68c6) SHA1(43f716a4c44fe1a38fcc6e2600bac948bb603504) ) ROM_LOAD16_BYTE( "136071-1026.27d", 0x060001, 0x010000, CRC(f61c4898) SHA1(9e4a14eac6d197f63c3392af3d804e81c034cb09) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136071-1042.1b", 0x010000, 0x004000, CRC(e63cf125) SHA1(449880f561660ba67ac2d7f8ce6333768e0ae0be) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136071-1042.1b", 0x00000, 0x10000, CRC(e63cf125) SHA1(449880f561660ba67ac2d7f8ce6333768e0ae0be) ) ROM_REGION( 0x140000, "gfx1", 0 ) ROM_LOAD( "136071-1001.55l", 0x000000, 0x020000, CRC(586ba107) SHA1(f15d4489f5834ea5fe695f43cb9d1c2401179870) ) @@ -847,9 +848,8 @@ ROM_START( cyberbal2p1 ) ROM_LOAD16_BYTE( "136071-1025.27c", 0x060000, 0x010000, CRC(95ff68c6) SHA1(43f716a4c44fe1a38fcc6e2600bac948bb603504) ) ROM_LOAD16_BYTE( "136071-1026.27d", 0x060001, 0x010000, CRC(f61c4898) SHA1(9e4a14eac6d197f63c3392af3d804e81c034cb09) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136071-1042.1b", 0x010000, 0x004000, CRC(e63cf125) SHA1(449880f561660ba67ac2d7f8ce6333768e0ae0be) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136071-1042.1b", 0x00000, 0x10000, CRC(e63cf125) SHA1(449880f561660ba67ac2d7f8ce6333768e0ae0be) ) ROM_REGION( 0x140000, "gfx1", 0 ) ROM_LOAD( "136071-1001.55l", 0x000000, 0x020000, CRC(586ba107) SHA1(f15d4489f5834ea5fe695f43cb9d1c2401179870) ) @@ -893,9 +893,8 @@ ROM_START( cyberbalt ) ROM_LOAD16_BYTE( "136073-2009.3m", 0x020000, 0x010000, CRC(88bfc6dd) SHA1(ac2a67c8b4dbae62497236d624d333992195c218) ) ROM_LOAD16_BYTE( "136073-2010.3kl", 0x020001, 0x010000, CRC(3a121f29) SHA1(ebd088187abb863f2a632812811479dca7e31802) ) - ROM_REGION( 0x14000, "audiocpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136073-1029.2f", 0x010000, 0x004000, CRC(afee87e1) SHA1(da5e91167c68eecd2cb4436ac64cda14e5f6eae7) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136073-1029.2f", 0x000000, 0x010000, CRC(afee87e1) SHA1(da5e91167c68eecd2cb4436ac64cda14e5f6eae7) ) ROM_REGION( 0x40000, "extra", 0 ) ROM_LOAD16_BYTE( "136073-2011.3cd", 0x000000, 0x010000, CRC(bb5c5926) SHA1(6f7424418559841053d0c874ac8bb72c793d0d62) ) @@ -945,9 +944,8 @@ ROM_START( cyberbalt1 ) ROM_LOAD16_BYTE( "136073-1009.3m", 0x020000, 0x010000, CRC(3933e089) SHA1(4bd453bddabeafd07d193a1bc8ac0792e7aa99c3) ) ROM_LOAD16_BYTE( "136073-1010.3kl", 0x020001, 0x010000, CRC(e7a7cae8) SHA1(91e0c6a1b0c138a0e6a599011518fe10df44e76e) ) - ROM_REGION( 0x14000, "audiocpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136073-1029.2f", 0x010000, 0x004000, CRC(afee87e1) SHA1(da5e91167c68eecd2cb4436ac64cda14e5f6eae7) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136073-1029.2f", 0x000000, 0x010000, CRC(afee87e1) SHA1(da5e91167c68eecd2cb4436ac64cda14e5f6eae7) ) ROM_REGION( 0x40000, "extra", 0 ) ROM_LOAD16_BYTE( "136073-1011.3cd", 0x000000, 0x010000, CRC(22d3e09c) SHA1(18298951659badef39f839341c4d66958fcc86aa) ) diff --git a/src/mame/drivers/eprom.cpp b/src/mame/drivers/eprom.cpp index 6a5644ea313..575689aca8a 100644 --- a/src/mame/drivers/eprom.cpp +++ b/src/mame/drivers/eprom.cpp @@ -529,9 +529,8 @@ ROM_START( eprom ) ROM_LOAD16_BYTE( "136069-2034.10u", 0x00001, 0x10000, CRC(5d7afca2) SHA1(a37ecd2909049dd0b3ddbe602f0173c44b065f6f) ) ROM_COPY( "maincpu", 0x60000, 0x60000, 0x20000 ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136069-1040.7b", 0x10000, 0x4000, CRC(86e93695) SHA1(63ddab02df139dd41a8260c303798b2a550b9fe6) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136069-1040.7b", 0x00000, 0x10000, CRC(86e93695) SHA1(63ddab02df139dd41a8260c303798b2a550b9fe6) ) ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136069-1020.47s", 0x00000, 0x10000, CRC(0de9d98d) SHA1(c2f963a8a4573e135a2825929cbc5535ce3b0215) ) @@ -582,9 +581,8 @@ ROM_START( eprom2 ) ROM_LOAD16_BYTE( "136069-1034.10u", 0x00001, 0x10000, CRC(c68f58dd) SHA1(0ec300f32e67b710ac33efb60b8eccceb43faca6) ) ROM_COPY( "maincpu", 0x60000, 0x60000, 0x20000 ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136069-1040.7b", 0x10000, 0x4000, CRC(86e93695) SHA1(63ddab02df139dd41a8260c303798b2a550b9fe6) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136069-1040.7b", 0x00000, 0x10000, CRC(86e93695) SHA1(63ddab02df139dd41a8260c303798b2a550b9fe6) ) ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136069-1020.47s", 0x00000, 0x10000, CRC(0de9d98d) SHA1(c2f963a8a4573e135a2825929cbc5535ce3b0215) ) @@ -622,9 +620,8 @@ ROM_START( klaxp1 ) ROM_LOAD16_BYTE( "klax_ft1.50a", 0x00000, 0x10000, CRC(87ee72d1) SHA1(39ae6f8406f0768480bcc80d395a14d9c2c65dca) ) ROM_LOAD16_BYTE( "klax_ft1.40a", 0x00001, 0x10000, CRC(ba139fdb) SHA1(98a8ac5e0349b934f55d0d9de85abacd3fd0d77d) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "klaxsnd.10c", 0x10000, 0x4000, CRC(744734cb) SHA1(3630428d69ddd2a4d5dd76bb4ee9485c943129e9) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "klaxsnd.10c", 0x00000, 0x10000, CRC(744734cb) SHA1(3630428d69ddd2a4d5dd76bb4ee9485c943129e9) ) ROM_REGION( 0x40000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "klaxprot.43s", 0x00000, 0x10000, CRC(a523c966) SHA1(8e284901cd1c68b25aa9dec1c87374b93cceeb40) ) @@ -646,9 +643,8 @@ ROM_START( klaxp2 ) ROM_LOAD16_BYTE( "klax_ft2.50a", 0x00000, 0x10000, CRC(7d401937) SHA1(8db0560528a86b9cb01c4598a49694bd44b00dba) ) ROM_LOAD16_BYTE( "klax_ft2.40a", 0x00001, 0x10000, CRC(c5ca33a9) SHA1(c2e2948f987ba43f61c043baed06ffea8787be43) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "klaxsnd.10c", 0x10000, 0x4000, CRC(744734cb) SHA1(3630428d69ddd2a4d5dd76bb4ee9485c943129e9) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "klaxsnd.10c", 0x00000, 0x10000, CRC(744734cb) SHA1(3630428d69ddd2a4d5dd76bb4ee9485c943129e9) ) ROM_REGION( 0x40000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "klaxprot.43s", 0x00000, 0x10000, CRC(a523c966) SHA1(8e284901cd1c68b25aa9dec1c87374b93cceeb40) ) @@ -672,9 +668,8 @@ ROM_START( guts ) ROM_LOAD16_BYTE( "guts-hi1.50b", 0x20000, 0x10000, CRC(a231f65d) SHA1(9c8ccd265ed0e9f6d7181d216ed41a0c5cc0cd5f) ) ROM_LOAD16_BYTE( "guts-lo1.40b", 0x20001, 0x10000, CRC(dbdd4910) SHA1(9ca22321398b6397902aa99a3ef46f1a78ccc438) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "guts-snd.10c", 0x10000, 0x4000, CRC(9fe065d7) SHA1(0d202af3d6c62fdcfc3bb2ea95bbf4e37c0d43cf) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "guts-snd.10c", 0x00000, 0x10000, CRC(9fe065d7) SHA1(0d202af3d6c62fdcfc3bb2ea95bbf4e37c0d43cf) ) ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "guts-mo0.bin", 0x00000, 0x10000, CRC(b8d8d8da) SHA1(6426607402aa9f1c872290910eefc57a8dd60e17) ) diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp index e5eb4267425..7b47dc59c7c 100644 --- a/src/mame/drivers/harddriv.cpp +++ b/src/mame/drivers/harddriv.cpp @@ -2598,9 +2598,8 @@ ROM_START( stunrun ) ROM_LOAD16_BYTE( "136070-2112.200w", 0x0a0000, 0x010000, CRC(3f896aaf) SHA1(817136ddc37566108de15f6bfedc6e0da13a2df2) ) ROM_LOAD16_BYTE( "136070-2111.210w", 0x0a0001, 0x010000, CRC(47f010ad) SHA1(a2587ce1d01c78f1d757fb3e4512be9655d17f9c) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136070-2123.10c", 0x010000, 0x004000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136070-2123.10c", 0x00000, 0x10000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for ADSP object ROM */ ROM_LOAD16_BYTE( "136070-2121.90h", 0x000000, 0x010000, CRC(0ebf8e58) SHA1(b6bf3e020b29a34ef3eaca6b5e1f17bb89fdc476) ) @@ -2639,9 +2638,8 @@ ROM_START( stunrunj ) ROM_LOAD16_BYTE( "136070-2112.200w", 0x0a0000, 0x010000, CRC(3f896aaf) SHA1(817136ddc37566108de15f6bfedc6e0da13a2df2) ) ROM_LOAD16_BYTE( "136070-2111.210w", 0x0a0001, 0x010000, CRC(47f010ad) SHA1(a2587ce1d01c78f1d757fb3e4512be9655d17f9c) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136070-2123.10c", 0x010000, 0x004000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136070-2123.10c", 0x00000, 0x10000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for ADSP object ROM */ ROM_LOAD16_BYTE( "136070-2121.90h", 0x000000, 0x010000, CRC(0ebf8e58) SHA1(b6bf3e020b29a34ef3eaca6b5e1f17bb89fdc476) ) @@ -2680,9 +2678,8 @@ ROM_START( stunrun5 ) ROM_LOAD16_BYTE( "136070-2112.200w", 0x0a0000, 0x010000, CRC(3f896aaf) SHA1(817136ddc37566108de15f6bfedc6e0da13a2df2) ) ROM_LOAD16_BYTE( "136070-2111.210w", 0x0a0001, 0x010000, CRC(47f010ad) SHA1(a2587ce1d01c78f1d757fb3e4512be9655d17f9c) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136070-2123.10c", 0x010000, 0x004000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136070-2123.10c", 0x00000, 0x10000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for ADSP object ROM */ ROM_LOAD16_BYTE( "136070-2121.90h", 0x000000, 0x010000, CRC(0ebf8e58) SHA1(b6bf3e020b29a34ef3eaca6b5e1f17bb89fdc476) ) @@ -2721,9 +2718,8 @@ ROM_START( stunrune ) ROM_LOAD16_BYTE( "136070-2112.200w", 0x0a0000, 0x010000, CRC(3f896aaf) SHA1(817136ddc37566108de15f6bfedc6e0da13a2df2) ) ROM_LOAD16_BYTE( "136070-2111.210w", 0x0a0001, 0x010000, CRC(47f010ad) SHA1(a2587ce1d01c78f1d757fb3e4512be9655d17f9c) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136070-2123.10c", 0x010000, 0x004000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136070-2123.10c", 0x00000, 0x10000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for ADSP object ROM */ ROM_LOAD16_BYTE( "136070-2121.90h", 0x000000, 0x010000, CRC(0ebf8e58) SHA1(b6bf3e020b29a34ef3eaca6b5e1f17bb89fdc476) ) @@ -2762,9 +2758,8 @@ ROM_START( stunrun4 ) ROM_LOAD16_BYTE( "136070-2112.200w", 0x0a0000, 0x010000, CRC(3f896aaf) SHA1(817136ddc37566108de15f6bfedc6e0da13a2df2) ) ROM_LOAD16_BYTE( "136070-2111.210w", 0x0a0001, 0x010000, CRC(47f010ad) SHA1(a2587ce1d01c78f1d757fb3e4512be9655d17f9c) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136070-2123.10c", 0x010000, 0x004000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136070-2123.10c", 0x00000, 0x10000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for ADSP object ROM */ ROM_LOAD16_BYTE( "136070-2121.90h", 0x000000, 0x010000, CRC(0ebf8e58) SHA1(b6bf3e020b29a34ef3eaca6b5e1f17bb89fdc476) ) @@ -2803,9 +2798,8 @@ ROM_START( stunrun3 ) ROM_LOAD16_BYTE( "136070-2112.200w", 0x0a0000, 0x010000, CRC(3f896aaf) SHA1(817136ddc37566108de15f6bfedc6e0da13a2df2) ) ROM_LOAD16_BYTE( "136070-2111.210w", 0x0a0001, 0x010000, CRC(47f010ad) SHA1(a2587ce1d01c78f1d757fb3e4512be9655d17f9c) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136070-2123.10c", 0x010000, 0x004000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136070-2123.10c", 0x00000, 0x10000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for ADSP object ROM */ ROM_LOAD16_BYTE( "136070-2121.90h", 0x000000, 0x010000, CRC(0ebf8e58) SHA1(b6bf3e020b29a34ef3eaca6b5e1f17bb89fdc476) ) @@ -2844,9 +2838,8 @@ ROM_START( stunrun3e ) ROM_LOAD16_BYTE( "136070-2112.200w", 0x0a0000, 0x010000, CRC(3f896aaf) SHA1(817136ddc37566108de15f6bfedc6e0da13a2df2) ) ROM_LOAD16_BYTE( "136070-2111.210w", 0x0a0001, 0x010000, CRC(47f010ad) SHA1(a2587ce1d01c78f1d757fb3e4512be9655d17f9c) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136070-2123.10c", 0x010000, 0x004000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136070-2123.10c", 0x00000, 0x10000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for ADSP object ROM */ ROM_LOAD16_BYTE( "136070-2121.90h", 0x000000, 0x010000, CRC(0ebf8e58) SHA1(b6bf3e020b29a34ef3eaca6b5e1f17bb89fdc476) ) @@ -2885,9 +2878,8 @@ ROM_START( stunrun2 ) ROM_LOAD16_BYTE( "136070-2112.200w", 0x0a0000, 0x010000, CRC(3f896aaf) SHA1(817136ddc37566108de15f6bfedc6e0da13a2df2) ) ROM_LOAD16_BYTE( "136070-2111.210w", 0x0a0001, 0x010000, CRC(47f010ad) SHA1(a2587ce1d01c78f1d757fb3e4512be9655d17f9c) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136070-2123.10c", 0x010000, 0x004000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136070-2123.10c", 0x00000, 0x10000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for ADSP object ROM */ ROM_LOAD16_BYTE( "136070-2121.90h", 0x000000, 0x010000, CRC(0ebf8e58) SHA1(b6bf3e020b29a34ef3eaca6b5e1f17bb89fdc476) ) @@ -2926,9 +2918,8 @@ ROM_START( stunrun2e ) ROM_LOAD16_BYTE( "136070-2112.200w", 0x0a0000, 0x010000, CRC(3f896aaf) SHA1(817136ddc37566108de15f6bfedc6e0da13a2df2) ) ROM_LOAD16_BYTE( "136070-2111.210w", 0x0a0001, 0x010000, CRC(47f010ad) SHA1(a2587ce1d01c78f1d757fb3e4512be9655d17f9c) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136070-2123.10c", 0x010000, 0x004000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136070-2123.10c", 0x00000, 0x10000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for ADSP object ROM */ ROM_LOAD16_BYTE( "136070-2121.90h", 0x000000, 0x010000, CRC(0ebf8e58) SHA1(b6bf3e020b29a34ef3eaca6b5e1f17bb89fdc476) ) @@ -2967,9 +2958,8 @@ ROM_START( stunrun0 ) ROM_LOAD16_BYTE( "136070-2112.200w", 0x0a0000, 0x010000, CRC(3f896aaf) SHA1(817136ddc37566108de15f6bfedc6e0da13a2df2) ) ROM_LOAD16_BYTE( "136070-2111.210w", 0x0a0001, 0x010000, CRC(47f010ad) SHA1(a2587ce1d01c78f1d757fb3e4512be9655d17f9c) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136070-2123.10c", 0x010000, 0x004000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136070-2123.10c", 0x00000, 0x10000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for ADSP object ROM */ ROM_LOAD16_BYTE( "136070-2121.90h", 0x000000, 0x010000, CRC(0ebf8e58) SHA1(b6bf3e020b29a34ef3eaca6b5e1f17bb89fdc476) ) @@ -3008,9 +2998,8 @@ ROM_START( stunrunp ) ROM_LOAD16_BYTE( "136070-2112.200w", 0x0a0000, 0x010000, CRC(3f896aaf) SHA1(817136ddc37566108de15f6bfedc6e0da13a2df2) ) ROM_LOAD16_BYTE( "136070-2111.210w", 0x0a0001, 0x010000, CRC(47f010ad) SHA1(a2587ce1d01c78f1d757fb3e4512be9655d17f9c) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136070-2123.10c", 0x010000, 0x004000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136070-2123.10c", 0x00000, 0x10000, CRC(121ab09a) SHA1(c26b8ddbcb011416e6ab695980d2cf37e672e973) ) ROM_REGION16_BE( 0x60000, "mainpcb:user1", 0 ) /* 384k for ADSP object ROM */ ROM_LOAD16_BYTE( "136070-2121.90h", 0x000000, 0x010000, CRC(0ebf8e58) SHA1(b6bf3e020b29a34ef3eaca6b5e1f17bb89fdc476) ) @@ -4218,9 +4207,8 @@ ROM_START( steeltal ) ROM_LOAD16_BYTE( "136087-1016.200y", 0x0e0000, 0x010000, CRC(db62362e) SHA1(e1d392aa00ac36296728257fa26c6aa68a4ebe5f) ) ROM_LOAD16_BYTE( "136087-1015.210y", 0x0e0001, 0x010000, CRC(ef517db7) SHA1(16e7e351326391480bf36c58d6b34ef4128b6627) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136087-5001.1f", 0x010000, 0x004000, CRC(c52d8218) SHA1(3511c8c65583c7e44242f4cc48d7cc46fc748868) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136087-5001.1f", 0x00000, 0x10000, CRC(c52d8218) SHA1(3511c8c65583c7e44242f4cc48d7cc46fc748868) ) ROM_REGION( 0x2000, "mainpcb:asic65:asic65cpu", 0 ) /* 64k for ASIC65 */ ROM_LOAD( "136087-9007.10c", 0x000000, 0x002000, CRC(2956984f) SHA1(63c9a99b00c3cbb63aca908b076c2c4d3f70f386) ) @@ -4282,9 +4270,8 @@ ROM_START( steeltalg ) ROM_LOAD16_BYTE( "136087-1016.200y", 0x0e0000, 0x010000, CRC(db62362e) SHA1(e1d392aa00ac36296728257fa26c6aa68a4ebe5f) ) ROM_LOAD16_BYTE( "136087-1015.210y", 0x0e0001, 0x010000, CRC(ef517db7) SHA1(16e7e351326391480bf36c58d6b34ef4128b6627) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136087-5001.1f", 0x010000, 0x004000, CRC(c52d8218) SHA1(3511c8c65583c7e44242f4cc48d7cc46fc748868) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136087-5001.1f", 0x00000, 0x10000, CRC(c52d8218) SHA1(3511c8c65583c7e44242f4cc48d7cc46fc748868) ) ROM_REGION( 0x2000, "mainpcb:asic65:asic65cpu", 0 ) /* 64k for ASIC65 */ ROM_LOAD( "136087-9007.10c", 0x000000, 0x002000, CRC(2956984f) SHA1(63c9a99b00c3cbb63aca908b076c2c4d3f70f386) ) @@ -4346,9 +4333,8 @@ ROM_START( steeltal1 ) ROM_LOAD16_BYTE( "136087-1016.200y", 0x0e0000, 0x010000, CRC(db62362e) SHA1(e1d392aa00ac36296728257fa26c6aa68a4ebe5f) ) ROM_LOAD16_BYTE( "136087-1015.210y", 0x0e0001, 0x010000, CRC(ef517db7) SHA1(16e7e351326391480bf36c58d6b34ef4128b6627) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136087-5001.1f", 0x010000, 0x004000, CRC(c52d8218) SHA1(3511c8c65583c7e44242f4cc48d7cc46fc748868) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136087-5001.1f", 0x00000, 0x10000, CRC(c52d8218) SHA1(3511c8c65583c7e44242f4cc48d7cc46fc748868) ) ROM_REGION( 0x2000, "mainpcb:asic65:asic65cpu", 0 ) /* 64k for ASIC65 */ ROM_LOAD( "136087-9007.10c", 0x000000, 0x002000, CRC(2956984f) SHA1(63c9a99b00c3cbb63aca908b076c2c4d3f70f386) ) @@ -4410,9 +4396,8 @@ ROM_START( steeltalp ) ROM_LOAD16_BYTE( "rom-200y.bin", 0xe0000, 0x10000, CRC(b568e1be) SHA1(5d62037892e040515e4262db43057f33436fa12d) ) ROM_LOAD16_BYTE( "rom-210y.bin", 0xe0001, 0x10000, CRC(3f5cdd3e) SHA1(c33c155158a5c69a7f2e61cd88b297dc14ecd479) ) - ROM_REGION( 0x14000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136087-5001.1f", 0x010000, 0x004000, CRC(c52d8218) SHA1(3511c8c65583c7e44242f4cc48d7cc46fc748868) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "mainpcb:jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136087-5001.1f", 0x00000, 0x10000, CRC(c52d8218) SHA1(3511c8c65583c7e44242f4cc48d7cc46fc748868) ) ROM_REGION( 0x2000, "mainpcb:asic65:asic65cpu", 0 ) /* 64k for ASIC65 */ ROM_LOAD( "136087-9007.10c", 0x000000, 0x002000, CRC(2956984f) SHA1(63c9a99b00c3cbb63aca908b076c2c4d3f70f386) ) diff --git a/src/mame/drivers/offtwall.cpp b/src/mame/drivers/offtwall.cpp index 0e6446d7d1f..bc5d0c0b015 100644 --- a/src/mame/drivers/offtwall.cpp +++ b/src/mame/drivers/offtwall.cpp @@ -408,9 +408,8 @@ ROM_START( offtwall ) ROM_LOAD16_BYTE( "136090-2012.17e", 0x00000, 0x20000, CRC(d08d81eb) SHA1(5a72aa2e4fc6455b94aa59a7719d0ddc8bcc80f2) ) ROM_LOAD16_BYTE( "136090-2013.17j", 0x00001, 0x20000, CRC(61c2553d) SHA1(343d39f9b75fd236e9769ec21ab65310f85e31ca) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136090-1020.12c", 0x10000, 0x4000, CRC(488112a5) SHA1(55e84855daacfa303d1031de8c9adb992a846e21) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136090-1020.12c", 0x00000, 0x10000, CRC(488112a5) SHA1(55e84855daacfa303d1031de8c9adb992a846e21) ) ROM_REGION( 0xc0000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136090-1014.14s", 0x000000, 0x20000, CRC(4d64507e) SHA1(cb2ac41aecd2702cd57c746a6f5986cd753bc29e) ) @@ -442,9 +441,8 @@ ROM_START( offtwallc ) ROM_LOAD16_BYTE( "090-2612.rom", 0x00000, 0x20000, CRC(fc891a3f) SHA1(027815a20fbc6c0c9242768581b97362b39941c2) ) ROM_LOAD16_BYTE( "090-2613.rom", 0x00001, 0x20000, CRC(805d79d4) SHA1(943ec9f408ba875bdf1794ce7d24803043480401) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136090-1020.12c", 0x10000, 0x4000, CRC(488112a5) SHA1(55e84855daacfa303d1031de8c9adb992a846e21) ) - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136090-1020.12c", 0x00000, 0x10000, CRC(488112a5) SHA1(55e84855daacfa303d1031de8c9adb992a846e21) ) ROM_REGION( 0xc0000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "090-1614.rom", 0x000000, 0x20000, CRC(307ed447) SHA1(acee15e58cd8def8e52a7586aa14240e1f8be319) ) diff --git a/src/mame/drivers/skullxbo.cpp b/src/mame/drivers/skullxbo.cpp index 348c6306723..faef66d7ab4 100644 --- a/src/mame/drivers/skullxbo.cpp +++ b/src/mame/drivers/skullxbo.cpp @@ -280,9 +280,8 @@ ROM_START( skullxbo ) ROM_LOAD16_BYTE( "136072-1156.185a", 0x070000, 0x008000, CRC(cde16b55) SHA1(bf5059f0f73a8819551fb3ded3cb6a3123841481) ) ROM_LOAD16_BYTE( "136072-1157.185c", 0x070001, 0x008000, CRC(31c77376) SHA1(19eb54d73edb25fda6803df896e182d05c5bad7e) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136072-1149.1b", 0x010000, 0x004000, CRC(8d730e7a) SHA1(b89fb9cadcf813ea5cba55f1efcdcdd2517944c7) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136072-1149.1b", 0x00000, 0x10000, CRC(8d730e7a) SHA1(b89fb9cadcf813ea5cba55f1efcdcdd2517944c7) ) ROM_REGION( 0x190000, "gfx1", 0 ) ROM_LOAD( "136072-1102.13r", 0x000000, 0x010000, CRC(90becdfa) SHA1(aa5aaeda70e137518a9e58906daed66fa563b27e) ) @@ -344,9 +343,8 @@ ROM_START( skullxbo4 ) ROM_LOAD16_BYTE( "136072-1156.185a", 0x070000, 0x008000, CRC(cde16b55) SHA1(bf5059f0f73a8819551fb3ded3cb6a3123841481) ) ROM_LOAD16_BYTE( "136072-1157.185c", 0x070001, 0x008000, CRC(31c77376) SHA1(19eb54d73edb25fda6803df896e182d05c5bad7e) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136072-1149.1b", 0x010000, 0x004000, CRC(8d730e7a) SHA1(b89fb9cadcf813ea5cba55f1efcdcdd2517944c7) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136072-1149.1b", 0x00000, 0x10000, CRC(8d730e7a) SHA1(b89fb9cadcf813ea5cba55f1efcdcdd2517944c7) ) ROM_REGION( 0x190000, "gfx1", 0 ) ROM_LOAD( "136072-1102.13r", 0x000000, 0x010000, CRC(90becdfa) SHA1(aa5aaeda70e137518a9e58906daed66fa563b27e) ) @@ -408,9 +406,8 @@ ROM_START( skullxbo3 ) ROM_LOAD16_BYTE( "136072-1156.185a", 0x070000, 0x008000, CRC(cde16b55) SHA1(bf5059f0f73a8819551fb3ded3cb6a3123841481) ) ROM_LOAD16_BYTE( "136072-1157.185c", 0x070001, 0x008000, CRC(31c77376) SHA1(19eb54d73edb25fda6803df896e182d05c5bad7e) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136072-1149.1b", 0x010000, 0x004000, CRC(8d730e7a) SHA1(b89fb9cadcf813ea5cba55f1efcdcdd2517944c7) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136072-1149.1b", 0x00000, 0x10000, CRC(8d730e7a) SHA1(b89fb9cadcf813ea5cba55f1efcdcdd2517944c7) ) ROM_REGION( 0x190000, "gfx1", 0 ) ROM_LOAD( "136072-1102.13r", 0x000000, 0x010000, CRC(90becdfa) SHA1(aa5aaeda70e137518a9e58906daed66fa563b27e) ) @@ -472,9 +469,8 @@ ROM_START( skullxbo2 ) ROM_LOAD16_BYTE( "136072-1156.185a", 0x070000, 0x008000, CRC(cde16b55) SHA1(bf5059f0f73a8819551fb3ded3cb6a3123841481) ) ROM_LOAD16_BYTE( "136072-1157.185c", 0x070001, 0x008000, CRC(31c77376) SHA1(19eb54d73edb25fda6803df896e182d05c5bad7e) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136072-1149.1b", 0x010000, 0x004000, CRC(8d730e7a) SHA1(b89fb9cadcf813ea5cba55f1efcdcdd2517944c7) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136072-1149.1b", 0x00000, 0x10000, CRC(8d730e7a) SHA1(b89fb9cadcf813ea5cba55f1efcdcdd2517944c7) ) ROM_REGION( 0x190000, "gfx1", 0 ) ROM_LOAD( "136072-1102.13r", 0x000000, 0x010000, CRC(90becdfa) SHA1(aa5aaeda70e137518a9e58906daed66fa563b27e) ) @@ -536,9 +532,8 @@ ROM_START( skullxbo1 ) ROM_LOAD16_BYTE( "136072-1156.185a", 0x070000, 0x008000, CRC(cde16b55) SHA1(bf5059f0f73a8819551fb3ded3cb6a3123841481) ) ROM_LOAD16_BYTE( "136072-1157.185c", 0x070001, 0x008000, CRC(31c77376) SHA1(19eb54d73edb25fda6803df896e182d05c5bad7e) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136072-1149.1b", 0x010000, 0x004000, CRC(8d730e7a) SHA1(b89fb9cadcf813ea5cba55f1efcdcdd2517944c7) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136072-1149.1b", 0x00000, 0x10000, CRC(8d730e7a) SHA1(b89fb9cadcf813ea5cba55f1efcdcdd2517944c7) ) ROM_REGION( 0x190000, "gfx1", 0 ) ROM_LOAD( "136072-1102.13r", 0x000000, 0x010000, CRC(90becdfa) SHA1(aa5aaeda70e137518a9e58906daed66fa563b27e) ) diff --git a/src/mame/drivers/thunderj.cpp b/src/mame/drivers/thunderj.cpp index 0f4f00105f0..cc8733ed986 100644 --- a/src/mame/drivers/thunderj.cpp +++ b/src/mame/drivers/thunderj.cpp @@ -317,9 +317,8 @@ ROM_START( thunderj ) ROM_LOAD16_BYTE( "136076-1012.17n", 0x00001, 0x10000, CRC(53e5e638) SHA1(75593e5d328ede105b8db64005dd5d1c5cae11ed) ) ROM_COPY( "maincpu", 0x60000, 0x60000, 0x20000 ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136076-2015.1b", 0x10000, 0x4000, CRC(d8feb7fb) SHA1(684ebf2f0c0df742c98e7f45f74de86a11c8d6e8) ) /* Rev 2 program rom */ - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136076-2015.1b", 0x00000, 0x10000, CRC(d8feb7fb) SHA1(684ebf2f0c0df742c98e7f45f74de86a11c8d6e8) ) /* Rev 2 program rom */ ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136076-1021.5s", 0x000000, 0x10000, CRC(d8432766) SHA1(04e7d820974c0890fde1257b4710cf7b520d7d48) ) /* graphics, plane 0 */ @@ -394,9 +393,8 @@ ROM_START( thunderja ) ROM_LOAD16_BYTE( "136076-1012.17n", 0x00001, 0x10000, CRC(53e5e638) SHA1(75593e5d328ede105b8db64005dd5d1c5cae11ed) ) ROM_COPY( "maincpu", 0x60000, 0x60000, 0x20000 ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136076-2015.1b", 0x10000, 0x4000, CRC(d8feb7fb) SHA1(684ebf2f0c0df742c98e7f45f74de86a11c8d6e8) ) /* Rev 2 program rom */ - ROM_CONTINUE( 0x04000, 0xc000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136076-2015.1b", 0x00000, 0x10000, CRC(d8feb7fb) SHA1(684ebf2f0c0df742c98e7f45f74de86a11c8d6e8) ) /* Rev 2 program rom */ ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136076-1021.5s", 0x000000, 0x10000, CRC(d8432766) SHA1(04e7d820974c0890fde1257b4710cf7b520d7d48) ) /* graphics, plane 0 */ diff --git a/src/mame/drivers/toobin.cpp b/src/mame/drivers/toobin.cpp index 90d36d79ccd..8a3bc6d3872 100644 --- a/src/mame/drivers/toobin.cpp +++ b/src/mame/drivers/toobin.cpp @@ -250,9 +250,8 @@ ROM_START( toobin ) ROM_LOAD16_BYTE( "1136-5j.061", 0x060000, 0x010000, CRC(5ae3eeac) SHA1(583b6c3f61e8ad4d98449205fedecf3e21ee993c) ) ROM_LOAD16_BYTE( "1140-5f.061", 0x060001, 0x010000, CRC(dacbbd94) SHA1(0e3a93f439ff9f3dd57ee13604be02e9c74c8eec) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "1141-2k.061", 0x010000, 0x004000, CRC(c0dcce1a) SHA1(285c13f08020cf5827eca2afcc2fa8a3a0a073e0) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "1141-2k.061", 0x00000, 0x10000, CRC(c0dcce1a) SHA1(285c13f08020cf5827eca2afcc2fa8a3a0a073e0) ) ROM_REGION( 0x080000, "gfx1", 0 ) ROM_LOAD( "1101-1a.061", 0x000000, 0x010000, CRC(02696f15) SHA1(51856c331c45d287e574e2e4013b62a6472ad720) ) @@ -306,9 +305,8 @@ ROM_START( toobine ) ROM_LOAD16_BYTE( "1136-5j.061", 0x060000, 0x010000, CRC(5ae3eeac) SHA1(583b6c3f61e8ad4d98449205fedecf3e21ee993c) ) ROM_LOAD16_BYTE( "1140-5f.061", 0x060001, 0x010000, CRC(dacbbd94) SHA1(0e3a93f439ff9f3dd57ee13604be02e9c74c8eec) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "1141-2k.061", 0x010000, 0x004000, CRC(c0dcce1a) SHA1(285c13f08020cf5827eca2afcc2fa8a3a0a073e0) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "1141-2k.061", 0x00000, 0x10000, CRC(c0dcce1a) SHA1(285c13f08020cf5827eca2afcc2fa8a3a0a073e0) ) ROM_REGION( 0x080000, "gfx1", 0 ) ROM_LOAD( "1101-1a.061", 0x000000, 0x010000, CRC(02696f15) SHA1(51856c331c45d287e574e2e4013b62a6472ad720) ) @@ -362,9 +360,8 @@ ROM_START( toobing ) ROM_LOAD16_BYTE( "1136-5j.061", 0x060000, 0x010000, CRC(5ae3eeac) SHA1(583b6c3f61e8ad4d98449205fedecf3e21ee993c) ) ROM_LOAD16_BYTE( "1140-5f.061", 0x060001, 0x010000, CRC(dacbbd94) SHA1(0e3a93f439ff9f3dd57ee13604be02e9c74c8eec) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "1141-2k.061", 0x010000, 0x004000, CRC(c0dcce1a) SHA1(285c13f08020cf5827eca2afcc2fa8a3a0a073e0) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "1141-2k.061", 0x00000, 0x10000, CRC(c0dcce1a) SHA1(285c13f08020cf5827eca2afcc2fa8a3a0a073e0) ) ROM_REGION( 0x080000, "gfx1", 0 ) ROM_LOAD( "1101-1a.061", 0x000000, 0x010000, CRC(02696f15) SHA1(51856c331c45d287e574e2e4013b62a6472ad720) ) @@ -418,9 +415,8 @@ ROM_START( toobin2e ) ROM_LOAD16_BYTE( "1136-5j.061", 0x060000, 0x010000, CRC(5ae3eeac) SHA1(583b6c3f61e8ad4d98449205fedecf3e21ee993c) ) ROM_LOAD16_BYTE( "1140-5f.061", 0x060001, 0x010000, CRC(dacbbd94) SHA1(0e3a93f439ff9f3dd57ee13604be02e9c74c8eec) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "1141-2k.061", 0x010000, 0x004000, CRC(c0dcce1a) SHA1(285c13f08020cf5827eca2afcc2fa8a3a0a073e0) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "1141-2k.061", 0x00000, 0x10000, CRC(c0dcce1a) SHA1(285c13f08020cf5827eca2afcc2fa8a3a0a073e0) ) ROM_REGION( 0x080000, "gfx1", 0 ) ROM_LOAD( "1101-1a.061", 0x000000, 0x010000, CRC(02696f15) SHA1(51856c331c45d287e574e2e4013b62a6472ad720) ) @@ -474,9 +470,8 @@ ROM_START( toobin2 ) ROM_LOAD16_BYTE( "1136-5j.061", 0x060000, 0x010000, CRC(5ae3eeac) SHA1(583b6c3f61e8ad4d98449205fedecf3e21ee993c) ) ROM_LOAD16_BYTE( "1140-5f.061", 0x060001, 0x010000, CRC(dacbbd94) SHA1(0e3a93f439ff9f3dd57ee13604be02e9c74c8eec) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "1141-2k.061", 0x010000, 0x004000, CRC(c0dcce1a) SHA1(285c13f08020cf5827eca2afcc2fa8a3a0a073e0) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "1141-2k.061", 0x00000, 0x10000, CRC(c0dcce1a) SHA1(285c13f08020cf5827eca2afcc2fa8a3a0a073e0) ) ROM_REGION( 0x080000, "gfx1", 0 ) ROM_LOAD( "1101-1a.061", 0x000000, 0x010000, CRC(02696f15) SHA1(51856c331c45d287e574e2e4013b62a6472ad720) ) @@ -530,9 +525,8 @@ ROM_START( toobin1 ) ROM_LOAD16_BYTE( "1136-5j.061", 0x060000, 0x010000, CRC(5ae3eeac) SHA1(583b6c3f61e8ad4d98449205fedecf3e21ee993c) ) ROM_LOAD16_BYTE( "1140-5f.061", 0x060001, 0x010000, CRC(dacbbd94) SHA1(0e3a93f439ff9f3dd57ee13604be02e9c74c8eec) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "1141-2k.061", 0x010000, 0x004000, CRC(c0dcce1a) SHA1(285c13f08020cf5827eca2afcc2fa8a3a0a073e0) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "1141-2k.061", 0x00000, 0x10000, CRC(c0dcce1a) SHA1(285c13f08020cf5827eca2afcc2fa8a3a0a073e0) ) ROM_REGION( 0x080000, "gfx1", 0 ) ROM_LOAD( "1101-1a.061", 0x000000, 0x010000, CRC(02696f15) SHA1(51856c331c45d287e574e2e4013b62a6472ad720) ) diff --git a/src/mame/drivers/vindictr.cpp b/src/mame/drivers/vindictr.cpp index ade2ce54585..be840d5bd59 100644 --- a/src/mame/drivers/vindictr.cpp +++ b/src/mame/drivers/vindictr.cpp @@ -234,9 +234,8 @@ ROM_START( vindictr ) ROM_LOAD16_BYTE( "136059-5121.k1", 0x040000, 0x010000, CRC(96b150c5) SHA1(405c848f7990c981fefd355ca635bfb0ac24eb26) ) ROM_LOAD16_BYTE( "136059-5122.k3", 0x040001, 0x010000, CRC(6415d312) SHA1(0115e32c1c42421cb3d978cc8642f7f88d492043) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136059-1124.2k", 0x010000, 0x004000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136059-1124.2k", 0x00000, 0x10000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136059-1104.12p", 0x000000, 0x020000, CRC(062f8e52) SHA1(0968b8c822d8fee1cf7ddcf9c3b1bf059e446417) ) @@ -272,9 +271,8 @@ ROM_START( vindictre ) ROM_LOAD16_BYTE( "136059-5721.k1", 0x040000, 0x010000, CRC(96b150c5) SHA1(405c848f7990c981fefd355ca635bfb0ac24eb26) ) ROM_LOAD16_BYTE( "136059-5722.k3", 0x040001, 0x010000, CRC(6415d312) SHA1(0115e32c1c42421cb3d978cc8642f7f88d492043) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136059-1124.2k", 0x010000, 0x004000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136059-1124.2k", 0x00000, 0x10000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136059-1104.12p", 0x000000, 0x020000, CRC(062f8e52) SHA1(0968b8c822d8fee1cf7ddcf9c3b1bf059e446417) ) @@ -310,9 +308,8 @@ ROM_START( vindictrg ) ROM_LOAD16_BYTE( "136059-1221.k1", 0x040000, 0x010000, CRC(ee1b1014) SHA1(ddfe01cdec4654a42c9e49660e3532e5c865a9b7) ) ROM_LOAD16_BYTE( "136059-1222.k3", 0x040001, 0x010000, CRC(517b33f0) SHA1(f6430862bb00e11a68e964c89adcad1f05bc021b) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136059-1124.2k", 0x010000, 0x004000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136059-1124.2k", 0x00000, 0x10000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136059-1104.12p", 0x000000, 0x020000, CRC(062f8e52) SHA1(0968b8c822d8fee1cf7ddcf9c3b1bf059e446417) ) @@ -348,9 +345,8 @@ ROM_START( vindictre4 ) ROM_LOAD16_BYTE( "136059-4121.k1", 0x040000, 0x010000, CRC(9a0444ee) SHA1(211be931a8b6ca42dd140baf3e165ce23f75431f) ) ROM_LOAD16_BYTE( "136059-4122.k3", 0x040001, 0x010000, CRC(d5022d78) SHA1(eeb6876ee6994f5736114a786c5c4ba97f26ef01) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136059-1124.2k", 0x010000, 0x004000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136059-1124.2k", 0x00000, 0x10000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136059-1104.12p", 0x000000, 0x020000, CRC(062f8e52) SHA1(0968b8c822d8fee1cf7ddcf9c3b1bf059e446417) ) @@ -386,9 +382,8 @@ ROM_START( vindictr4 ) ROM_LOAD16_BYTE( "136059-4121.k1", 0x040000, 0x010000, CRC(9a0444ee) SHA1(211be931a8b6ca42dd140baf3e165ce23f75431f) ) ROM_LOAD16_BYTE( "136059-4122.k3", 0x040001, 0x010000, CRC(d5022d78) SHA1(eeb6876ee6994f5736114a786c5c4ba97f26ef01) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136059-1124.2k", 0x010000, 0x004000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136059-1124.2k", 0x00000, 0x10000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136059-1104.12p", 0x000000, 0x020000, CRC(062f8e52) SHA1(0968b8c822d8fee1cf7ddcf9c3b1bf059e446417) ) @@ -424,9 +419,8 @@ ROM_START( vindictre3 ) ROM_LOAD16_BYTE( "136059-2121.k1", 0x040000, 0x010000, CRC(9b6111e0) SHA1(427197b21a5db2a06751ab281fde7a2f63818db8) ) ROM_LOAD16_BYTE( "136059-2122.k3", 0x040001, 0x010000, CRC(8d029a28) SHA1(a166d2a767f70050397f0f12add44ad1f5bc9fde) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136059-1124.2k", 0x010000, 0x004000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136059-1124.2k", 0x00000, 0x10000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136059-1104.12p", 0x000000, 0x020000, CRC(062f8e52) SHA1(0968b8c822d8fee1cf7ddcf9c3b1bf059e446417) ) @@ -462,9 +456,8 @@ ROM_START( vindictr2 ) ROM_LOAD16_BYTE( "136059-2121.k1", 0x040000, 0x010000, CRC(9b6111e0) SHA1(427197b21a5db2a06751ab281fde7a2f63818db8) ) ROM_LOAD16_BYTE( "136059-2122.k3", 0x040001, 0x010000, CRC(8d029a28) SHA1(a166d2a767f70050397f0f12add44ad1f5bc9fde) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136059-1124.2k", 0x010000, 0x004000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136059-1124.2k", 0x00000, 0x10000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136059-1104.12p", 0x000000, 0x020000, CRC(062f8e52) SHA1(0968b8c822d8fee1cf7ddcf9c3b1bf059e446417) ) @@ -500,9 +493,8 @@ ROM_START( vindictr1 ) ROM_LOAD16_BYTE( "136059-1121.k1", 0x040000, 0x010000, CRC(9b6111e0) SHA1(427197b21a5db2a06751ab281fde7a2f63818db8) ) ROM_LOAD16_BYTE( "136059-1122.k3", 0x040001, 0x010000, CRC(a94773f1) SHA1(2be841ab755d4ce319f3d562e9990918923384ee) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */ - ROM_LOAD( "136059-1124.2k", 0x010000, 0x004000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136059-1124.2k", 0x00000, 0x10000, CRC(d2212c0a) SHA1(df11fe76d74abc0cea23f18264cef4b0f33b1ffd) ) ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT ) ROM_LOAD( "136059-1104.12p", 0x000000, 0x020000, CRC(062f8e52) SHA1(0968b8c822d8fee1cf7ddcf9c3b1bf059e446417) ) diff --git a/src/mame/drivers/xybots.cpp b/src/mame/drivers/xybots.cpp index 9cb32712bd2..59641033576 100644 --- a/src/mame/drivers/xybots.cpp +++ b/src/mame/drivers/xybots.cpp @@ -237,9 +237,8 @@ ROM_START( xybots ) ROM_LOAD16_BYTE( "136054-2114.17b", 0x020000, 0x008000, CRC(d31890cb) SHA1(b58722a4dcc79e97484c2f5e35b8dbf8c3520bd9) ) ROM_LOAD16_BYTE( "136054-2115.19b", 0x020001, 0x008000, CRC(750ab1b0) SHA1(0638de738bd804bde4b93cd23190ee0465887cf8) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136054-1116.2k", 0x010000, 0x004000, CRC(3b9f155d) SHA1(7080681a7eab282023034379825ca88adc6b300f) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136054-1116.2k", 0x00000, 0x10000, CRC(3b9f155d) SHA1(7080681a7eab282023034379825ca88adc6b300f) ) ROM_REGION( 0x40000, "gfx1", 0 ) ROM_LOAD( "136054-2102.12l", 0x000000, 0x008000, CRC(c1309674) SHA1(5a163c894142c8d662557c8322dc04fded637227) ) @@ -268,9 +267,8 @@ ROM_START( xybotsg ) ROM_LOAD16_BYTE( "136054-3214.17b", 0x020000, 0x008000, CRC(4ad35093) SHA1(6d2d82fb481c68819ec6c87d483eed17d4ae5d1a) ) ROM_LOAD16_BYTE( "136054-3215.19b", 0x020001, 0x008000, CRC(3a2afbaf) SHA1(61b88d15d95681eb24559d0696203cd4ee63d11f) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136054-1116.2k", 0x010000, 0x004000, CRC(3b9f155d) SHA1(7080681a7eab282023034379825ca88adc6b300f) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136054-1116.2k", 0x00000, 0x10000, CRC(3b9f155d) SHA1(7080681a7eab282023034379825ca88adc6b300f) ) ROM_REGION( 0x40000, "gfx1", 0 ) ROM_LOAD( "136054-2102.12l", 0x000000, 0x008000, CRC(c1309674) SHA1(5a163c894142c8d662557c8322dc04fded637227) ) @@ -299,9 +297,8 @@ ROM_START( xybotsf ) ROM_LOAD16_BYTE( "136054-3614.17b", 0x020000, 0x008000, CRC(7385e0b6) SHA1(98a69901069872b14413c1bfe48783fdb43c1c37) ) ROM_LOAD16_BYTE( "136054-3615.19b", 0x020001, 0x008000, CRC(8e37b812) SHA1(40f973a49c4b40f3a5d982d332995e792f718dcc) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136054-1116.2k", 0x010000, 0x004000, CRC(3b9f155d) SHA1(7080681a7eab282023034379825ca88adc6b300f) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136054-1116.2k", 0x00000, 0x10000, CRC(3b9f155d) SHA1(7080681a7eab282023034379825ca88adc6b300f) ) ROM_REGION( 0x40000, "gfx1", 0 ) ROM_LOAD( "136054-2102.12l", 0x000000, 0x008000, CRC(c1309674) SHA1(5a163c894142c8d662557c8322dc04fded637227) ) @@ -330,9 +327,8 @@ ROM_START( xybots1 ) ROM_LOAD16_BYTE( "136054-1114.17b", 0x020000, 0x008000, CRC(7444f88f) SHA1(e2a27754a57a809398ee639fe5d0920b564d4c0b) ) ROM_LOAD16_BYTE( "136054-1115.19b", 0x020001, 0x008000, CRC(848d072d) SHA1(c4d1181f0227200e60d99a99c1a83897275b055f) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136054-1116.2k", 0x010000, 0x004000, CRC(3b9f155d) SHA1(7080681a7eab282023034379825ca88adc6b300f) ) - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136054-1116.2k", 0x00000, 0x10000, CRC(3b9f155d) SHA1(7080681a7eab282023034379825ca88adc6b300f) ) ROM_REGION( 0x40000, "gfx1", 0 ) ROM_LOAD( "136054-2102.12l", 0x000000, 0x008000, CRC(c1309674) SHA1(5a163c894142c8d662557c8322dc04fded637227) ) @@ -361,9 +357,8 @@ ROM_START( xybots0 ) ROM_LOAD16_BYTE( "136054-0114.17b", 0x020000, 0x008000, CRC(18b875f7) SHA1(aa78553bd3556d0b209513ba80b782cfb0e3bb8b) ) ROM_LOAD16_BYTE( "136054-0115.19b", 0x020001, 0x008000, CRC(7f116360) SHA1(d12c339ce973bd74be4a4ac9e9d293f6a6e358d6) ) - ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k for 6502 code */ - ROM_LOAD( "136054-0116.2k", 0x010000, 0x004000, BAD_DUMP CRC(3b9f155d) SHA1(7080681a7eab282023034379825ca88adc6b300f) ) // not dumped from this pcb, rom taken from another set instead - ROM_CONTINUE( 0x004000, 0x00c000 ) + ROM_REGION( 0x10000, "jsa:cpu", 0 ) /* 64k for 6502 code */ + ROM_LOAD( "136054-0116.2k", 0x00000, 0x10000, BAD_DUMP CRC(3b9f155d) SHA1(7080681a7eab282023034379825ca88adc6b300f) ) // not dumped from this pcb, rom taken from another set instead ROM_REGION( 0x40000, "gfx1", 0 ) ROM_LOAD( "136054-1102.12l", 0x000000, 0x008000, CRC(0d304e5b) SHA1(203c86c865667b1538f61c0950682fb17ebd9abb) ) diff --git a/src/mame/includes/cyberbal.h b/src/mame/includes/cyberbal.h index aca6711a0ae..1ad764daba9 100644 --- a/src/mame/includes/cyberbal.h +++ b/src/mame/includes/cyberbal.h @@ -57,7 +57,6 @@ public: UINT16 m_playfield_xscroll[2]; UINT16 m_playfield_yscroll[2]; - UINT8 * m_bank_base; UINT8 m_fast_68k_int; UINT8 m_io_68k_int; UINT8 m_sound_data_from_68k; @@ -81,6 +80,7 @@ public: TILE_GET_INFO_MEMBER(get_alpha_tile_info); TILE_GET_INFO_MEMBER(get_playfield_tile_info); DECLARE_MACHINE_START(cyberbal); + DECLARE_MACHINE_START(cyberbal2p); DECLARE_MACHINE_RESET(cyberbal); DECLARE_VIDEO_START(cyberbal); DECLARE_MACHINE_RESET(cyberbal2p); -- cgit v1.2.3-70-g09d2 From 9420cf631abf42aedd0ec6a86041ff36826c495f Mon Sep 17 00:00:00 2001 From: Happy Date: Tue, 8 Mar 2016 17:18:03 -0700 Subject: Non-interlaced field index should be fixed at zero. --- src/mame/video/n64.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mame/video/n64.cpp b/src/mame/video/n64.cpp index b80d22785ad..85033978fca 100644 --- a/src/mame/video/n64.cpp +++ b/src/mame/video/n64.cpp @@ -174,7 +174,7 @@ void n64_periphs::video_update(bitmap_rgb32 &bitmap) } else { - field = 1; + field = 0; } switch(vi_control & 0x3) -- cgit v1.2.3-70-g09d2 From fb09bf8cfbb8cf1c4bb75f63bb263a060183d953 Mon Sep 17 00:00:00 2001 From: briantro Date: Tue, 8 Mar 2016 19:58:30 -0600 Subject: model2.cpp: Minor documentation correction - NW The Sega ID# given for Dynamite Baseball '97 is actually for the original Dynamite Baseball but was on the romboard for DB97 because it was a chipswap upgrade. DB97 has it's own unique Sega ID# but it's currently unknown. --- src/mame/drivers/model2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp index 6f5f5ca2c56..c2ba16a164b 100644 --- a/src/mame/drivers/model2.cpp +++ b/src/mame/drivers/model2.cpp @@ -5188,7 +5188,7 @@ ROM_START( vstrikero ) /* Virtua Striker, Model 2B */ ROM_LOAD("mpr-18065.34", 0x400000, 0x200000, CRC(046b55fe) SHA1(2db7eabf4318881a67b10dba24f6f0cd68940ace) ) ROM_END -ROM_START( dynabb ) /* Dynamite Baseball, Model 2B */ +ROM_START( dynabb ) /* Dynamite Baseball, Model 2B. Sega game ID# 833-12803 DYNAMITE BASEBALL */ ROM_REGION( 0x200000, "maincpu", 0 ) // i960 program ROM_LOAD32_WORD("epr-19170.15", 0x000000, 0x080000, CRC(e00eb49e) SHA1(20975d892cf1c9f50605238d6ab41d79ece39f69) ) ROM_LOAD32_WORD("epr-19171.16", 0x000002, 0x080000, CRC(9878d67d) SHA1(d3350546b7e0e6fe8bb2f9d1a91475655f931b8b) ) @@ -5224,7 +5224,7 @@ ROM_START( dynabb ) /* Dynamite Baseball, Model 2B */ ROM_LOAD("mpr-19187.34", 0x400000, 0x200000, CRC(20918769) SHA1(90951bd61654d39537c54325b6e157a019edcda8) ) ROM_END -ROM_START( dynabb97 ) /* Dynamite Baseball 97 Revision A, Model 2B. Sega game ID# 833-12803 */ +ROM_START( dynabb97 ) /* Dynamite Baseball 97 Revision A, Model 2B */ ROM_REGION( 0x200000, "maincpu", 0 ) // i960 program ROM_LOAD32_WORD("epr-19833a.15", 0x000000, 0x080000, CRC(d99ed1b2) SHA1(b04613d564c04c35feafccad56ed85810d894185) ) ROM_LOAD32_WORD("epr-19834a.16", 0x000002, 0x080000, CRC(24192bb1) SHA1(c535ab4b38ffd42f03eed6a5a1706e867eaccd67) ) -- cgit v1.2.3-70-g09d2 From 91bec063af115ea18e34bc5293a2e46db262af44 Mon Sep 17 00:00:00 2001 From: Dirk Best Date: Wed, 9 Mar 2016 05:08:41 +0100 Subject: svi318: initial version of driver rewrite --- src/mame/drivers/svi318.cpp | 922 +++++++++++++++++++------------------------- src/mame/mame.lst | 2 - 2 files changed, 400 insertions(+), 524 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/svi318.cpp b/src/mame/drivers/svi318.cpp index c13f0a56d59..2529508e2b3 100644 --- a/src/mame/drivers/svi318.cpp +++ b/src/mame/drivers/svi318.cpp @@ -1,620 +1,498 @@ -// license:BSD-3-Clause -// copyright-holders:Sean Young -/* -** svi318.c : driver for Spectravideo SVI-318 and SVI-328 -** -** Information taken from: http://www.samdal.com/sv318.htm -** -** SV-318 : 16KB Video RAM, 16KB RAM -** SV-328 : 16KB Video RAM, 64KB RAM -*/ +// license: GPL-2.0+ +// copyright-holders: Dirk Best +// thanks-to: Tomas Karlsson, Sean Young +/*************************************************************************** + + Spectravideo SVI-318/328 + + TODO: + - Expansion port (and all attached peripherals) + +***************************************************************************/ #include "emu.h" #include "cpu/z80/z80.h" -#include "machine/i8255.h" -#include "machine/ins8250.h" -#include "machine/wd_fdc.h" #include "machine/ram.h" -#include "machine/buffer.h" -#include "imagedev/cassette.h" -#include "sound/dac.h" +#include "machine/i8255.h" +#include "video/tms9928a.h" #include "sound/ay8910.h" +#include "sound/speaker.h" #include "sound/wave.h" -#include "video/mc6845.h" -#include "video/tms9928a.h" -#include "bus/centronics/ctronics.h" +#include "imagedev/cassette.h" +#include "formats/svi_cas.h" #include "bus/generic/slot.h" #include "bus/generic/carts.h" -#include "imagedev/flopdrv.h" -#include "formats/svi_dsk.h" -#include "formats/svi_cas.h" #include "softlist.h" -#include "rendlay.h" -class svi318_state : public driver_device +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class svi3x8_state : public driver_device { public: - svi318_state(const machine_config &mconfig, device_type type, const char *tag) + svi3x8_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_dac(*this, "dac"), - m_ppi(*this, "ppi8255"), m_ram(*this, RAM_TAG), - m_centronics(*this, "centronics"), - m_cent_data_out(*this, "cent_data_out"), - m_ins8250_0(*this, "ins8250_0"), - m_ins8250_1(*this, "ins8250_1"), + m_basic(*this, "basic"), + m_speaker(*this, "speaker"), + m_cassette(*this, "cassette"), m_cart(*this, "cartslot"), - m_fd1793(*this, "wd179x"), - m_floppy0(*this, "wd179x:0"), - m_floppy1(*this, "wd179x:1"), -// m_crtc(*this, "crtc"), - m_line(*this, "LINE"), - m_joysticks(*this, "JOYSTICKS"), + m_keyboard(*this, "KEY"), m_buttons(*this, "BUTTONS"), - m_palette(*this, "palette"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4") - { } - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - DECLARE_WRITE_LINE_MEMBER(vdp_interrupt); - // FDC - int m_drq; - int m_irq; - - memory_region *m_cart_rom; - memory_region *m_bios_rom; + m_keyboard_row(0) + {} + + DECLARE_READ8_MEMBER( ppi_port_a_r ); + DECLARE_READ8_MEMBER( ppi_port_b_r ); + DECLARE_WRITE8_MEMBER( ppi_port_c_w ); + DECLARE_WRITE8_MEMBER( psg_port_b_w ); + DECLARE_WRITE_LINE_MEMBER( intvdp_w ); + + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge); protected: - required_device m_maincpu; - required_device m_cassette; - required_device m_dac; - required_device m_ppi; + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + void reset_memory_configuration(); + + required_device m_maincpu; required_device m_ram; - required_device m_centronics; - required_device m_cent_data_out; - required_device m_ins8250_0; - required_device m_ins8250_1; + required_memory_region m_basic; + required_device m_speaker; + required_device m_cassette; required_device m_cart; - required_device m_fd1793; - required_device m_floppy0; - required_device m_floppy1; - //optional_device m_crtc; - required_ioport_array<11> m_line; - required_ioport m_joysticks; + required_ioport_array<16> m_keyboard; required_ioport m_buttons; - optional_device m_palette; -private: - optional_memory_bank m_bank1; - optional_memory_bank m_bank2; - optional_memory_bank m_bank3; - optional_memory_bank m_bank4; + UINT8 m_keyboard_row; }; -static ADDRESS_MAP_START( svi318_mem, AS_PROGRAM, 8, svi318_state ) - //AM_RANGE(0x0000, 0x7fff) AM_READ_BANK("bank1") AM_WRITE(writemem1) - //AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank2") AM_WRITE(writemem2) - //AM_RANGE(0xc000, 0xffff) AM_READ_BANK("bank3") AM_WRITE(writemem3) -ADDRESS_MAP_END -static ADDRESS_MAP_START( svi328_806_mem, AS_PROGRAM, 8, svi318_state ) - //AM_RANGE(0x0000, 0x7fff) AM_READ_BANK("bank1") AM_WRITE(writemem1) - //AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank2") AM_WRITE(writemem2) - //AM_RANGE(0xc000, 0xefff) AM_READ_BANK("bank3") AM_WRITE(writemem3) - //AM_RANGE(0xf000, 0xffff) AM_READ_BANK("bank4") AM_WRITE(writemem4) -ADDRESS_MAP_END +//************************************************************************** +// ADDRESS MAPS +//************************************************************************** -static ADDRESS_MAP_START( svi318_io, AS_IO, 8, svi318_state ) +static ADDRESS_MAP_START( svi3x8_mem, AS_PROGRAM, 8, svi3x8_state ) ADDRESS_MAP_UNMAP_HIGH - ADDRESS_MAP_GLOBAL_MASK(0xff) - //AM_RANGE(0x00, 0x38) AM_READWRITE(io_ext_r, io_ext_w ) - //AM_RANGE(0x80, 0x80) AM_DEVWRITE("tms9928a", tms9928a_device, vram_write) - //AM_RANGE(0x81, 0x81) AM_DEVWRITE("tms9928a", tms9928a_device, register_write) - //AM_RANGE(0x84, 0x84) AM_DEVREAD("tms9928a", tms9928a_device, vram_read) - //AM_RANGE(0x85, 0x85) AM_DEVREAD("tms9928a", tms9928a_device, register_read) - AM_RANGE(0x88, 0x88) AM_DEVWRITE("ay8910", ay8910_device, address_w) - AM_RANGE(0x8c, 0x8c) AM_DEVWRITE("ay8910", ay8910_device, data_w) - AM_RANGE(0x90, 0x90) AM_DEVREAD("ay8910", ay8910_device, data_r) - //AM_RANGE(0x96, 0x97) AM_WRITE(ppi_w) - AM_RANGE(0x98, 0x9a) AM_DEVREAD("ppi8255", i8255_device, read) ADDRESS_MAP_END -static ADDRESS_MAP_START( svi328_806_io, AS_IO, 8, svi318_state ) - ADDRESS_MAP_UNMAP_HIGH +static ADDRESS_MAP_START( svi3x8_io, AS_IO, 8, svi3x8_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - //AM_RANGE(0x00, 0x58) AM_READWRITE(io_ext_r, io_ext_w ) - //AM_RANGE(0x80, 0x80) AM_DEVWRITE("tms9928a", tms9928a_device, vram_write) - //AM_RANGE(0x81, 0x81) AM_DEVWRITE("tms9928a", tms9928a_device, register_write) - //AM_RANGE(0x84, 0x84) AM_DEVREAD("tms9928a", tms9928a_device, vram_read) - //AM_RANGE(0x85, 0x85) AM_DEVREAD("tms9928a", tms9928a_device, register_read) - AM_RANGE(0x88, 0x88) AM_DEVWRITE("ay8910", ay8910_device, address_w) - AM_RANGE(0x8c, 0x8c) AM_DEVWRITE("ay8910", ay8910_device, data_w) - AM_RANGE(0x90, 0x90) AM_DEVREAD("ay8910", ay8910_device, data_r) - //AM_RANGE(0x96, 0x97) AM_WRITE(ppi_w) - AM_RANGE(0x98, 0x9a) AM_DEVREAD("ppi8255", i8255_device, read) + AM_RANGE(0x80, 0x80) AM_MIRROR(0x22) AM_DEVWRITE("vdp", tms9928a_device, vram_write) + AM_RANGE(0x81, 0x81) AM_MIRROR(0x22) AM_DEVWRITE("vdp", tms9928a_device, register_write) + AM_RANGE(0x84, 0x84) AM_MIRROR(0x22) AM_DEVREAD("vdp", tms9928a_device, vram_read) + AM_RANGE(0x85, 0x85) AM_MIRROR(0x22) AM_DEVREAD("vdp", tms9928a_device, register_read) + AM_RANGE(0x88, 0x88) AM_MIRROR(0x23) AM_DEVWRITE("psg", ay8910_device, address_w) + AM_RANGE(0x8c, 0x8c) AM_MIRROR(0x23) AM_DEVWRITE("psg", ay8910_device, data_w) + AM_RANGE(0x90, 0x90) AM_MIRROR(0x23) AM_DEVREAD("psg", ay8910_device, data_r) + AM_RANGE(0x94, 0x97) AM_DEVWRITE("ppi", i8255_device, write) + AM_RANGE(0x98, 0x9a) AM_DEVREAD("ppi", i8255_device, read) ADDRESS_MAP_END -/* - Keyboard status table - Bit#:| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | - | | | | | | | | | - Line: | | | | | | | | | - ---------+-----+-----+-----+-----+-----+-----+-----+-----| - 0 | "7" | "6" | "5" | "4" | "3" | "2" | "1" | "0" | - ---------+-----+-----+-----+-----+-----+-----+-----+-----| - 1 | "/" | "." | "=" | "," | "'" | ":" | "9" | "8" | - ---------+-----+-----+-----+-----+-----+-----+-----+-----| - 2 | "G" | "F" | "E" | "D" | "C" | "B" | "A" | "-" | - ---------+-----+-----+-----+-----+-----+-----+-----+-----| - 3 | "O" | "N" | "M" | "L" | "K" | "J" | "I" | "H" | - ---------+-----+-----+-----+-----+-----+-----+-----+-----| - 4 | "W" | "V" | "U" | "T" | "S" | "R" | "Q" | "P" | - ---------+-----+-----+-----+-----+-----+-----+-----+-----| - 5 | UP | BS | "]" | "\" | "[" | "Z" | "Y" | "X" | - ---------+-----+-----+-----+-----+-----+-----+-----+-----| - 6 |LEFT |ENTER|STOP | ESC |RGRAP|LGRAP|CTRL |SHIFT| - ---------+-----+-----+-----+-----+-----+-----+-----+-----| - 7 |DOWN | INS | CLS | F5 | F4 | F3 | F2 | F1 | - ---------+-----+-----+-----+-----+-----+-----+-----+-----| - 8 |RIGHT| |PRINT| SEL |CAPS | DEL | TAB |SPACE| - ---------+-----+-----+-----+-----+-----+-----+-----+-----| - 9* | "7" | "6" | "5" | "4" | "3" | "2" | "1" | "0" | - ---------+-----+-----+-----+-----+-----+-----+-----+-----| - 10* | "," | "." | "/" | "*" | "-" | "+" | "9" | "8" | - ---------------------------------------------------------- - * Numcerical keypad (SVI-328 only) - -2008-05 FP: -Small note about natural keyboard: currently, -- "Keypad ," is not mapped -- "Left Grph" and "Right Grph" are mapped to 'Page Up' and 'Page Down' -- "Stop" is mapped to 'End' -- "Select" is mapped to 'F11' -- "CLS/HM" is mapped to 'Home' -TODO: How are multiple keys (Copy, Cut, Paste, CLS/HM) expected to -behave? Do they need multiple mapping in natural keyboard? -*/ + +//************************************************************************** +// INPUTS +//************************************************************************** static INPUT_PORTS_START( svi318 ) - PORT_START("LINE.0") - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') - - PORT_START("LINE.1") - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR(';') - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') - - PORT_START("LINE.2") - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') - - PORT_START("LINE.3") - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('0') PORT_CHAR('J') - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') - - PORT_START("LINE.4") - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') - - PORT_START("LINE.5") - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('~') - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) - - PORT_START("LINE.6") - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left Grph") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(PGUP)) - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right Grph") PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_MAMEKEY(PGDN)) - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Stop") PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END)) - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) - - PORT_START("LINE.7") - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1 F6") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CHAR(UCHAR_MAMEKEY(F6)) - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2 F7") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CHAR(UCHAR_MAMEKEY(F7)) - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3 F8") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CHAR(UCHAR_MAMEKEY(F8)) - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4 F9") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CHAR(UCHAR_MAMEKEY(F9)) - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5 F10") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CHAR(UCHAR_MAMEKEY(F10)) - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLS/HM Copy") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins Paste") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) - - PORT_START("LINE.8") - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del Cut") PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL)) - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Select") PORT_CODE(KEYCODE_PAUSE) PORT_CHAR(UCHAR_MAMEKEY(F11)) - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Print") PORT_CODE(KEYCODE_PRTSCR) PORT_CHAR(UCHAR_MAMEKEY(PRTSCR)) - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_UNUSED) - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) - - PORT_START("LINE.9") - PORT_BIT (0xff, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_START("LINE.10") - PORT_BIT (0xff, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_START("JOYSTICKS") - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2) - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) + PORT_START("KEY.0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') + + PORT_START("KEY.1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR(';') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + + PORT_START("KEY.2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') + + PORT_START("KEY.3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('0') PORT_CHAR('J') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') + + PORT_START("KEY.4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') + + PORT_START("KEY.5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('~') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_NAME(UTF8_UP) + + PORT_START("KEY.6") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) PORT_NAME("Ctrl") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(PGUP)) PORT_NAME("Left Grph") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_MAMEKEY(PGDN)) PORT_NAME("Right Grph") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END)) PORT_NAME("Stop") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_NAME(UTF8_LEFT) + + PORT_START("KEY.7") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CHAR(UCHAR_MAMEKEY(F6)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CHAR(UCHAR_MAMEKEY(F7)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CHAR(UCHAR_MAMEKEY(F8)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CHAR(UCHAR_MAMEKEY(F9)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CHAR(UCHAR_MAMEKEY(F10)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_NAME("CLS/HM Copy") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) PORT_NAME("Ins Paste") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_NAME(UTF8_DOWN) + + PORT_START("KEY.8") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL)) PORT_NAME("Del Cut") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_NAME("Caps Lock") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PAUSE) PORT_CHAR(UCHAR_MAMEKEY(F11)) PORT_NAME("Select") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PRTSCR) PORT_CHAR(UCHAR_MAMEKEY(PRTSCR)) PORT_NAME("Print") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_NAME(UTF8_RIGHT) + + PORT_START("KEY.9") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("KEY.10") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("KEY.11") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("KEY.12") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("KEY.13") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("KEY.14") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("KEY.15") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("JOY") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) PORT_START("BUTTONS") - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_BUTTON1) - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2) + PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2) + PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END - static INPUT_PORTS_START( svi328 ) - - PORT_INCLUDE( svi318 ) - - PORT_MODIFY("LINE.9") - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) - - PORT_MODIFY("LINE.10") - PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) - PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) - PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) - PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) - PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) - PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) - PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad ,") PORT_CODE(KEYCODE_DEL_PAD) + PORT_INCLUDE(svi318) + + PORT_MODIFY("KEY.9") + PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) + PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) + PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) + PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) + PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) + PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) + PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) + PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) + + PORT_MODIFY("KEY.10") + PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) + PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) + PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) + PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) + PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) + PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) + PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) + PORT_BIT (0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("Keypad ,") INPUT_PORTS_END -WRITE_LINE_MEMBER(svi318_state::vdp_interrupt) + +//************************************************************************** +// VIDEO EMULATION +//************************************************************************** + +WRITE_LINE_MEMBER( svi3x8_state::intvdp_w ) { - m_maincpu->set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE)); + // note: schematics show a CNTRL line that allows switching between + // IRQ and NMI for the interrupt + m_maincpu->set_input_line(INPUT_LINE_IRQ0, state); } -FLOPPY_FORMATS_MEMBER( svi318_state::floppy_formats ) - FLOPPY_SVI_FORMAT -FLOPPY_FORMATS_END -static SLOT_INTERFACE_START( svi_floppies ) - SLOT_INTERFACE("dd", FLOPPY_525_DD) -SLOT_INTERFACE_END +//************************************************************************** +// MACHINE EMULATION +//************************************************************************** -static MACHINE_CONFIG_FRAGMENT( svi318_cartslot ) - MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "svi318_cart") - MCFG_GENERIC_EXTENSIONS("bin,rom") - //MCFG_GENERIC_LOAD(svi318_state, svi318_cart) +void svi3x8_state::reset_memory_configuration() +{ + m_maincpu->space(AS_PROGRAM).install_rom(0x0000, 0x7fff, m_basic->base()); + + if (m_ram->size() == 64 * 1024) + { + // SVI-328 + m_maincpu->space(AS_PROGRAM).install_ram(0x8000, 0xffff, m_ram->pointer()); + } + else + { + // SVI-318 + m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x8000, 0xbfff); + m_maincpu->space(AS_PROGRAM).install_ram(0xc000, 0xffff, m_ram->pointer()); + } +} - /* Software lists */ - MCFG_SOFTWARE_LIST_ADD("cart_list","svi318_cart") -MACHINE_CONFIG_END +void svi3x8_state::machine_start() +{ + // register for save states + save_item(NAME(m_keyboard_row)); +} -static MACHINE_CONFIG_START( svi318, svi318_state ) - /* Basic machine hardware */ - MCFG_CPU_ADD("maincpu", Z80, 3579545) /* 3.579545 MHz */ - MCFG_CPU_PROGRAM_MAP(svi318_mem) - MCFG_CPU_IO_MAP(svi318_io) - MCFG_QUANTUM_TIME(attotime::from_hz(60)) - - MCFG_DEVICE_ADD("ppi8255", I8255, 0) - //MCFG_I8255_IN_PORTA_CB(READ8(svi318_state, ppi_port_a_r)) - //MCFG_I8255_IN_PORTB_CB(READ8(svi318_state, ppi_port_b_r)) - //MCFG_I8255_OUT_PORTC_CB(WRITE8(svi318_state, ppi_port_c_w)) - - MCFG_DEVICE_ADD("ins8250_0", INS8250, 1000000) - //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) - MCFG_DEVICE_ADD("ins8250_1", INS8250, 3072000) - //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) - - /* Video hardware */ - //MCFG_DEVICE_ADD("tms9928a", TMS9929A, XTAL_10_738635MHz / 2) - //MCFG_TMS9928A_VRAM_SIZE(0x4000) - //MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt)) - //MCFG_TMS9928A_SCREEN_ADD_PAL("screen") - //MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9929a_device, screen_update) - - /* Sound hardware */ - MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("dac", DAC, 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_SOUND_ADD("ay8910", AY8910, 1789773) - //MCFG_AY8910_PORT_A_READ_CB(READ8(svi318_state, psg_port_a_r)) - //MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi318_state, psg_port_b_w)) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) +void svi3x8_state::machine_reset() +{ + reset_memory_configuration(); +} - /* printer */ - MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") - //MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(svi318_state, write_centronics_busy)) +WRITE8_MEMBER( svi3x8_state::psg_port_b_w ) +{ + reset_memory_configuration(); + + // CART + if (BIT(data, 0) == 0) + { + if (m_cart->exists()) + m_maincpu->space(AS_PROGRAM).install_rom(0x0000, 0x7fff, m_cart->get_rom_base()); + else + m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x0000, 0x7fff); + } + else + { + // BK21 (SV-328) + if (BIT(data, 1) == 0) + { + if (m_ram->size() == 64 * 1024) + m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x7fff, m_ram->pointer() + 0x8000); + else + m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x0000, 0x7fff); + } + + // BK22 (SV-807) + if (BIT(data, 2) == 0) + m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x8000, 0xffff); + + // BK31 (SV-807) + if (BIT(data, 3) == 0) + m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x0000, 0x7fff); + + // BK32 (SV-807) + if (BIT(data, 4) == 0) + m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x8000, 0xffff); + } + + output().set_value("led_caps_lock", BIT(data, 5)); +} - MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") +READ8_MEMBER( svi3x8_state::ppi_port_a_r ) +{ + UINT8 data = 0x3f; - MCFG_CASSETTE_ADD("cassette") - MCFG_CASSETTE_FORMATS(svi_cassette_formats) - MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) - MCFG_CASSETTE_INTERFACE("svi318_cass") + // bit 0-3, paddle or tablet input - MCFG_SOFTWARE_LIST_ADD("cass_list", "svi318_cass") + // bit 4-5, joystick buttons + data &= m_buttons->read(); - MCFG_FD1793_ADD("wd179x", XTAL_1MHz) - //MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(svi318_state, fdc_intrq_w)) - //MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(svi318_state, fdc_drq_w)) + // bit 6-7, cassette + data |= m_cassette->exists() ? 0x00 : 0x40; + data |= (m_cassette->input() > 0.0038) ? 0x80 : 0x00; - MCFG_FLOPPY_DRIVE_ADD("wd179x:0", svi_floppies, "dd", svi318_state::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("wd179x:1", svi_floppies, "dd", svi318_state::floppy_formats) + return data; +} - MCFG_SOFTWARE_LIST_ADD("disk_list", "svi318_flop") +READ8_MEMBER( svi3x8_state::ppi_port_b_r ) +{ + // bit 0-7, keyboard data + return m_keyboard[m_keyboard_row]->read(); +} - MCFG_FRAGMENT_ADD(svi318_cartslot) +WRITE8_MEMBER( svi3x8_state::ppi_port_c_w ) +{ + // bit 0-3, keyboard row + m_keyboard_row = data & 0x0f; - /* internal ram */ - MCFG_RAM_ADD(RAM_TAG) - MCFG_RAM_DEFAULT_SIZE("16K") - MCFG_RAM_EXTRA_OPTIONS("32K,96K,160K") -MACHINE_CONFIG_END + // bit 4-6, cassette + m_cassette->change_state(BIT(data, 4) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); + m_cassette->output(BIT(data, 5) ? -1.0 : +1.0); + m_cassette->change_state(BIT(data, 6) ? CASSETTE_SPEAKER_ENABLED : CASSETTE_SPEAKER_MUTED, CASSETTE_MASK_SPEAKER); -static MACHINE_CONFIG_DERIVED( svi318n, svi318 ) + // bit 7, mix psg sound (keyboard click) + m_speaker->level_w(BIT(data, 7)); +} - //MCFG_DEVICE_REMOVE("tms9928a") - //MCFG_DEVICE_REMOVE("screen") - //MCFG_DEVICE_ADD("tms9928a", TMS9928A, XTAL_10_738635MHz / 2) - //MCFG_TMS9928A_VRAM_SIZE(0x4000) - //MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt)) - //MCFG_TMS9928A_SCREEN_ADD_NTSC("screen") - //MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9928a_device, screen_update) -MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( svi328, svi318 ) +//************************************************************************** +// CARTRIDGE +//************************************************************************** - /* internal ram */ - MCFG_RAM_MODIFY(RAM_TAG) - MCFG_RAM_DEFAULT_SIZE("64K") - MCFG_RAM_EXTRA_OPTIONS("96K,160K") -MACHINE_CONFIG_END +DEVICE_IMAGE_LOAD_MEMBER( svi3x8_state, cartridge ) +{ + UINT32 size = m_cart->common_get_size("rom"); -static MACHINE_CONFIG_DERIVED( svi328n, svi318n ) + if (size != 0x8000) + { + popmessage("Cartridge image '%s' invalid size: %u bytes", image.filename(), size); + return IMAGE_INIT_FAIL; + } - /* internal ram */ - MCFG_RAM_MODIFY(RAM_TAG) - MCFG_RAM_DEFAULT_SIZE("64K") - MCFG_RAM_EXTRA_OPTIONS("96K,160K") -MACHINE_CONFIG_END + m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); + m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); + return IMAGE_INIT_PASS; +} -/* F4 Character Displayer */ -static const gfx_layout svi328_charlayout = -{ - 8, 8, /* 8 x 16 characters */ - 256, /* 128 characters */ - 1, /* 1 bits per pixel */ - { 0 }, /* no bitplanes */ - /* x offsets */ - { 0, 1, 2, 3, 4, 5, 6, 7 }, - /* y offsets */ - { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 }, - 8*16 /* every char takes 16 bytes */ -}; -static GFXDECODE_START( svi328 ) - GFXDECODE_ENTRY( "gfx1", 0x0000, svi328_charlayout, 0, 9 ) -GFXDECODE_END - -static MACHINE_CONFIG_START( svi328_806, svi318_state ) - /* Basic machine hardware */ - MCFG_CPU_ADD("maincpu", Z80, 3579545) /* 3.579545 MHz */ - MCFG_CPU_PROGRAM_MAP(svi328_806_mem) - MCFG_CPU_IO_MAP(svi328_806_io) - MCFG_QUANTUM_TIME(attotime::from_hz(60)) - - MCFG_DEVICE_ADD("ppi8255", I8255, 0) - //MCFG_I8255_IN_PORTA_CB(READ8(svi318_state, ppi_port_a_r)) - //MCFG_I8255_IN_PORTB_CB(READ8(svi318_state, ppi_port_b_r)) - //MCFG_I8255_OUT_PORTC_CB(WRITE8(svi318_state, ppi_port_c_w)) - - MCFG_DEVICE_ADD("ins8250_0", INS8250, 1000000) - //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) - MCFG_DEVICE_ADD("ins8250_1", INS8250, 3072000) - //MCFG_INS8250_OUT_INT_CB(WRITELINE(svi318_state, ins8250_interrupt)) - - /* Video hardware */ - MCFG_DEFAULT_LAYOUT(layout_dualhsxs) - - //MCFG_DEVICE_ADD("tms9928a", TMS9929A, XTAL_10_738635MHz / 2) - //MCFG_TMS9928A_VRAM_SIZE(0x4000) - //MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi318_state, vdp_interrupt)) - //MCFG_TMS9928A_SET_SCREEN("screen") - //MCFG_TMS9928A_SCREEN_ADD_PAL("screen") - //MCFG_SCREEN_UPDATE_DEVICE("tms9928a", tms9929a_device, screen_update) - MCFG_PALETTE_ADD("palette", TMS9928A_PALETTE_SIZE + 2) /* 2 additional entries for monochrome svi806 output */ - - //MCFG_SCREEN_ADD("svi806", RASTER) - //MCFG_SCREEN_REFRESH_RATE(50) - //MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) - //MCFG_SCREEN_SIZE(640, 400) - //MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1) - //MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) - - MCFG_GFXDECODE_ADD("gfxdecode", "palette", svi328) - - //MCFG_MC6845_ADD("crtc", MC6845, "svi806", XTAL_12MHz / 8) - //MCFG_MC6845_SHOW_BORDER_AREA(false) - //MCFG_MC6845_CHAR_WIDTH(8) /* ? */ - //MCFG_MC6845_UPDATE_ROW_CB(svi318_state, crtc_update_row) - - /* Sound hardware */ +//************************************************************************** +// MACHINE DEFINTIONS +//************************************************************************** + +static MACHINE_CONFIG_START( svi318, svi3x8_state ) + // basic machine hardware + MCFG_CPU_ADD("maincpu", Z80, XTAL_10_738635MHz / 3) + MCFG_CPU_PROGRAM_MAP(svi3x8_mem) + MCFG_CPU_IO_MAP(svi3x8_io) + + MCFG_RAM_ADD(RAM_TAG) + MCFG_RAM_DEFAULT_SIZE("16K") + + MCFG_DEVICE_ADD("ppi", I8255, 0) + MCFG_I8255_IN_PORTA_CB(READ8(svi3x8_state, ppi_port_a_r)) + MCFG_I8255_IN_PORTB_CB(READ8(svi3x8_state, ppi_port_b_r)) + MCFG_I8255_OUT_PORTC_CB(WRITE8(svi3x8_state, ppi_port_c_w)) + + // video hardware + MCFG_DEVICE_ADD("vdp", TMS9929A, XTAL_10_738635MHz / 2) + MCFG_TMS9928A_VRAM_SIZE(0x4000) + MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi3x8_state, intvdp_w)) + MCFG_TMS9928A_SCREEN_ADD_PAL("screen") + MCFG_SCREEN_UPDATE_DEVICE("vdp", tms9929a_device, screen_update) + + // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("dac", DAC, 0) + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_SOUND_ADD("ay8910", AY8910, 1789773) - //MCFG_AY8910_PORT_A_READ_CB(READ8(svi318_state, psg_port_a_r)) - //MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi318_state, psg_port_b_w)) + MCFG_SOUND_ADD("psg", AY8910, XTAL_10_738635MHz / 6) + MCFG_AY8910_PORT_A_READ_CB(IOPORT("JOY")) + MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(svi3x8_state, psg_port_b_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - /* printer */ - MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") - //MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(svi318_state, write_centronics_busy)) - - MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") - + // cassette MCFG_CASSETTE_ADD("cassette") MCFG_CASSETTE_FORMATS(svi_cassette_formats) - MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) MCFG_CASSETTE_INTERFACE("svi318_cass") - MCFG_SOFTWARE_LIST_ADD("cass_list", "svi318_cass") - MCFG_FD1793_ADD("wd179x", XTAL_1MHz) - //MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(svi318_state, fdc_intrq_w)) - //MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(svi318_state, fdc_drq_w)) - - MCFG_FLOPPY_DRIVE_ADD("wd179x:0", svi_floppies, "dd", svi318_state::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("wd179x:1", svi_floppies, "dd", svi318_state::floppy_formats) - - MCFG_SOFTWARE_LIST_ADD("disk_list", "svi318_flop") + // cartridge slot + MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "svi318_cart") + MCFG_GENERIC_EXTENSIONS("bin,rom") + MCFG_GENERIC_LOAD(svi3x8_state, cartridge) + MCFG_SOFTWARE_LIST_ADD("cart_list", "svi318_cart") +MACHINE_CONFIG_END - MCFG_FRAGMENT_ADD(svi318_cartslot) +static MACHINE_CONFIG_DERIVED( svi318n, svi318 ) + MCFG_DEVICE_REMOVE("vdp") + MCFG_DEVICE_REMOVE("screen") + MCFG_DEVICE_ADD("vdp", TMS9928A, XTAL_10_738635MHz / 2) + MCFG_TMS9928A_VRAM_SIZE(0x4000) + MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(svi3x8_state, intvdp_w)) + MCFG_TMS9928A_SCREEN_ADD_NTSC("screen") + MCFG_SCREEN_UPDATE_DEVICE("vdp", tms9928a_device, screen_update) +MACHINE_CONFIG_END - /* internal ram */ +static MACHINE_CONFIG_DERIVED( svi328, svi318 ) + MCFG_DEVICE_REMOVE(RAM_TAG) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("64K") - MCFG_RAM_EXTRA_OPTIONS("96K,160K") MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( svi328n_806, svi328_806 ) - - //MCFG_SCREEN_MODIFY("screen") - //MCFG_SCREEN_REFRESH_RATE(60) +static MACHINE_CONFIG_DERIVED( svi328n, svi318n ) + MCFG_DEVICE_REMOVE(RAM_TAG) + MCFG_RAM_ADD(RAM_TAG) + MCFG_RAM_DEFAULT_SIZE("64K") MACHINE_CONFIG_END -/*************************************************************************** - Game driver(s) - -***************************************************************************/ +//************************************************************************** +// ROM DEFINITIONS +//************************************************************************** +// note: should be split into two 16k chips, document differenes ROM_START( svi318 ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_SYSTEM_BIOS(0, "111", "SV BASIC v1.11") + ROM_REGION(0x8000, "basic", 0) + ROM_SYSTEM_BIOS(0, "v111", "SV BASIC v1.11") ROMX_LOAD("svi111.rom", 0x0000, 0x8000, CRC(bc433df6) SHA1(10349ce675f6d6d47f0976e39cb7188eba858d89), ROM_BIOS(1)) - ROM_SYSTEM_BIOS(1, "110", "SV BASIC v1.1") + ROM_SYSTEM_BIOS(1, "v11", "SV BASIC v1.1") ROMX_LOAD("svi110.rom", 0x0000, 0x8000, CRC(709904e9) SHA1(7d8daf52f78371ca2c9443e04827c8e1f98c8f2c), ROM_BIOS(2)) - ROM_SYSTEM_BIOS(2, "100", "SV BASIC v1.0") + ROM_SYSTEM_BIOS(2, "v10", "SV BASIC v1.0") ROMX_LOAD("svi100.rom", 0x0000, 0x8000, CRC(98d48655) SHA1(07758272df475e5e06187aa3574241df1b14035b), ROM_BIOS(3)) ROM_END -ROM_START( svi318n ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_SYSTEM_BIOS(0, "111", "SV BASIC v1.11") - ROMX_LOAD("svi111.rom", 0x0000, 0x8000, CRC(bc433df6) SHA1(10349ce675f6d6d47f0976e39cb7188eba858d89), ROM_BIOS(1)) - ROM_SYSTEM_BIOS(1, "110", "SV BASIC v1.1") - ROMX_LOAD("svi110.rom", 0x0000, 0x8000, CRC(709904e9) SHA1(7d8daf52f78371ca2c9443e04827c8e1f98c8f2c), ROM_BIOS(2)) - ROM_SYSTEM_BIOS(2, "100", "SV BASIC v1.0") - ROMX_LOAD("svi100.rom", 0x0000, 0x8000, CRC(98d48655) SHA1(07758272df475e5e06187aa3574241df1b14035b), ROM_BIOS(3)) -ROM_END +#define rom_svi318n rom_svi318 +#define rom_svi328 rom_svi318 +#define rom_svi328n rom_svi318 -ROM_START( svi328 ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_SYSTEM_BIOS(0, "111", "SV BASIC v1.11") - ROMX_LOAD("svi111.rom", 0x0000, 0x8000, CRC(bc433df6) SHA1(10349ce675f6d6d47f0976e39cb7188eba858d89), ROM_BIOS(1)) - ROM_SYSTEM_BIOS(1, "110", "SV BASIC v1.1") - ROMX_LOAD("svi110.rom", 0x0000, 0x8000, CRC(709904e9) SHA1(7d8daf52f78371ca2c9443e04827c8e1f98c8f2c), ROM_BIOS(2)) - ROM_SYSTEM_BIOS(2, "100", "SV BASIC v1.0") - ROMX_LOAD("svi100.rom", 0x0000, 0x8000, CRC(98d48655) SHA1(07758272df475e5e06187aa3574241df1b14035b), ROM_BIOS(3)) -ROM_END - -ROM_START( svi328n ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_SYSTEM_BIOS(0, "111", "SV BASIC v1.11") - ROMX_LOAD("svi111.rom", 0x0000, 0x8000, CRC(bc433df6) SHA1(10349ce675f6d6d47f0976e39cb7188eba858d89), ROM_BIOS(1)) - ROM_SYSTEM_BIOS(1, "110", "SV BASIC v1.1") - ROMX_LOAD("svi110.rom", 0x0000, 0x8000, CRC(709904e9) SHA1(7d8daf52f78371ca2c9443e04827c8e1f98c8f2c), ROM_BIOS(2)) - ROM_SYSTEM_BIOS(2, "100", "SV BASIC v1.0") - ROMX_LOAD("svi100.rom", 0x0000, 0x8000, CRC(98d48655) SHA1(07758272df475e5e06187aa3574241df1b14035b), ROM_BIOS(3)) -ROM_END - -ROM_START( sv328p80 ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("svi111.rom", 0x0000, 0x8000, CRC(bc433df6) SHA1(10349ce675f6d6d47f0976e39cb7188eba858d89)) - - ROM_REGION( 0x1000, "gfx1", 0 ) - ROM_SYSTEM_BIOS(0, "english", "English Character Set") - ROMX_LOAD("svi806.rom", 0x0000, 0x1000, CRC(850bc232) SHA1(ed45cb0e9bd18a9d7bd74f87e620f016a7ae840f), ROM_BIOS(1)) - ROM_SYSTEM_BIOS(1, "swedish", "Swedish Character Set") - ROMX_LOAD("svi806se.rom", 0x0000, 0x1000, CRC(daea8956) SHA1(3f16d5513ad35692488ae7d864f660e76c6e8ed3), ROM_BIOS(2)) -ROM_END - -ROM_START( sv328n80 ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("svi111.rom", 0x0000, 0x8000, CRC(bc433df6) SHA1(10349ce675f6d6d47f0976e39cb7188eba858d89)) - - ROM_REGION( 0x1000, "gfx1", 0 ) - ROM_SYSTEM_BIOS(0, "english", "English Character Set") - ROMX_LOAD("svi806.rom", 0x0000, 0x1000, CRC(850bc232) SHA1(ed45cb0e9bd18a9d7bd74f87e620f016a7ae840f), ROM_BIOS(1)) - ROM_SYSTEM_BIOS(1, "swedish", "Swedish Character Set") - ROMX_LOAD("svi806se.rom", 0x0000, 0x1000, CRC(daea8956) SHA1(3f16d5513ad35692488ae7d864f660e76c6e8ed3), ROM_BIOS(2)) -ROM_END +//************************************************************************** +// SYSTEM DRIVERS +//************************************************************************** -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1983, svi318, 0, 0, svi318, svi318, driver_device, 0, "Spectravideo", "SVI-318 (PAL)", MACHINE_NOT_WORKING ) -COMP( 1983, svi318n, svi318, 0, svi318n, svi318, driver_device, 0, "Spectravideo", "SVI-318 (NTSC)", MACHINE_NOT_WORKING ) -COMP( 1983, svi328, svi318, 0, svi328, svi328, driver_device, 0, "Spectravideo", "SVI-328 (PAL)", MACHINE_NOT_WORKING ) -COMP( 1983, svi328n, svi318, 0, svi328n, svi328, driver_device, 0, "Spectravideo", "SVI-328 (NTSC)", MACHINE_NOT_WORKING ) -COMP( 1983, sv328p80, svi318, 0, svi328_806, svi328, driver_device, 0, "Spectravideo", "SVI-328 (PAL) + SVI-806 80 column card", MACHINE_NOT_WORKING ) -COMP( 1983, sv328n80, svi318, 0, svi328n_806, svi328, driver_device, 0, "Spectravideo", "SVI-328 (NTSC) + SVI-806 80 column card", MACHINE_NOT_WORKING ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1983, svi318, 0, 0, svi318, svi318, driver_device, 0, "Spectravideo", "SVI-318 (PAL)", MACHINE_SUPPORTS_SAVE) +COMP( 1983, svi318n, svi318, 0, svi318n, svi318, driver_device, 0, "Spectravideo", "SVI-318 (NTSC)", MACHINE_SUPPORTS_SAVE) +COMP( 1983, svi328, 0, 0, svi328, svi328, driver_device, 0, "Spectravideo", "SVI-328 (PAL)", MACHINE_SUPPORTS_SAVE) +COMP( 1983, svi328n, svi328, 0, svi328n, svi328, driver_device, 0, "Spectravideo", "SVI-328 (NTSC)", MACHINE_SUPPORTS_SAVE) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 2a4af9dc401..94ae3cf2bd7 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -33696,8 +33696,6 @@ suratkj // GX911 (c) 1990 (Japan) sv8000 // Super Vision 8000 @source:svi318.cpp -sv328n80 // SVI-328 (NTSC) + SVI-806 80 column card -sv328p80 // SVI-328 (PAL) + SVI-806 80 column card svi318 // SVI-318 (PAL) svi318n // SVI-318 (NTSC) svi328 // SVI-328 (PAL) -- cgit v1.2.3-70-g09d2 From b4bad6cfaabba77ef126cc4fc3ada5804ddf2806 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Wed, 9 Mar 2016 03:20:39 -0500 Subject: NoteTaker: Hooked up screen framebuffer. Hacked the Odd/Even interrupt so screen drawing happens. [Lord Nightmare] --- src/mame/drivers/notetaker.cpp | 68 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index c8a25536315..4a3f8018d00 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -69,7 +69,7 @@ DONE: * i/o cpu i/o area needs the memory map worked out per the schematics - done * figure out the correct memory maps for the 256kB of shared ram, and what part of ram constitutes the framebuffer - done - 256k of shared ram maps at 00000-3ffff for both cpus with special mem regs at fffec,fffee. the ram mirrors 4 times on the emulatorcpu only, iocpu the 40000-fffff area is open bus. - - frambuffer, at least for bios 1.5, lives from 0x4000-0xd5ff, exactly 640x480 pixels 1bpp, interlaced (even? plane is at 4000-8aff, odd? plane is at 8b00-d5ff); however the starting address of the framebuffer is configurable to any address within the 0x0000-0x1ffff range? (this exact range is unclear) + - framebuffer, at least for bios 1.5, lives from 0x4000-0xd5ff, exactly 640x480 pixels 1bpp, interlaced (even? plane is at 4000-8aff, odd? plane is at 8b00-d5ff); however the starting address of the framebuffer is configurable to any address within the 0x0000-0x1ffff range? (this exact range is unclear) * figure out how the emulation-cpu boots and where its 8k of local ram maps to - done - both cpus boot, reset and system int controls are accessed at fffea from either cpu; emulatorcpu's 8k of ram lives at the beginning of its address space, but can be disabled in favor of mainram at the same addressses */ @@ -113,6 +113,7 @@ public: DECLARE_WRITE16_MEMBER(IPConReg_w); DECLARE_WRITE16_MEMBER(FIFOReg_w); DECLARE_WRITE16_MEMBER(FIFOBus_w); + DECLARE_WRITE16_MEMBER(LoadDispAddr_w); // uarts DECLARE_READ16_MEMBER(ReadKeyData_r); @@ -158,6 +159,8 @@ public: // fifo timer emu_timer *m_FIFO_timer; TIMER_CALLBACK_MEMBER(timer_fifoclk); + // framebuffer display starting address + UINT16 m_DispAddr; // separate cpu resets void ip_reset(); @@ -205,6 +208,32 @@ TIMER_CALLBACK_MEMBER(notetaker_state::timer_fifoclk) UINT32 notetaker_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { // have to figure out what resolution we're drawing to here and draw appropriately to screen + // code borrowed/stolen from video/mac.cpp + UINT32 video_base; + UINT16 word; + UINT16 *line; + int y, x, b; + + video_base = (m_DispAddr << 3)&0x1FFFF; +#ifdef DEBUG_VIDEO + logerror("Video Base = 0x%05x\n", video_base); +#endif + const UINT16 *video_ram_field1 = (UINT16 *)(memregion("mainram")->base()+video_base); + const UINT16 *video_ram_field2 = (UINT16 *)(memregion("mainram")->base()+video_base+0x4B00); + + for (y = 0; y < 480; y++) + { + line = &bitmap.pix16(y); + + for (x = 0; x < 640; x += 16) + { + if ((y&1)==0) word = *(video_ram_field1++); else word = *(video_ram_field2++); + for (b = 0; b < 16; b++) + { + line[x + b] = (word >> (15 - b)) & 0x0001; + } + } + } return 0; } @@ -300,6 +329,12 @@ WRITE16_MEMBER(notetaker_state::FIFOBus_w) m_outfifo_head_ptr&=0xF; } +WRITE16_MEMBER( notetaker_state::LoadDispAddr_w ) +{ + m_DispAddr = data; + // for future low level emulation: clear the current counter position here as well, as well as empty/reset the display fifo, and the setmemrq state. +} + /* EIA hd6402 */ READ16_MEMBER( notetaker_state::ReadEIAData_r ) { @@ -345,6 +380,7 @@ WRITE16_MEMBER( notetaker_state::EIAChipReset_w ) /* These next two members are memory map related for the iocpu */ +/* TODO: not only are these extremely slow, they don't work properly as they do not respect byte writes vs word writes to addresses */ READ16_MEMBER(notetaker_state::iocpu_r) { UINT16 *rom = (UINT16 *)(memregion("iocpu")->base()); @@ -366,6 +402,7 @@ READ16_MEMBER(notetaker_state::iocpu_r) WRITE16_MEMBER(notetaker_state::iocpu_w) { + //UINT16 tempword; UINT16 *ram = (UINT16 *)(memregion("mainram")->base()); if ( (m_BootSeqDone == 0) || ((m_DisableROM == 0) && ((offset&0x7F800) == 0)) ) { @@ -374,8 +411,7 @@ WRITE16_MEMBER(notetaker_state::iocpu_w) } // are we in the FFFE8-FFFEF area where the parity/int/reset/etc stuff lives? if (offset >= 0x7fff4) { logerror("attempt to write processor control regs at %d with %02X ignored\n", offset<<1, data); } - ram += offset; - *ram = data; + COMBINE_DATA(&ram[offset]); } /* Address map comes from http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/schematics/19790423_Notetaker_IO_Processor.pdf @@ -418,10 +454,14 @@ x x * * * * * * * * * * * * * * * * * static ADDRESS_MAP_START(notetaker_iocpu_mem, AS_PROGRAM, 16, notetaker_state) /* - AM_RANGE(0x00000, 0x00fff) AM_ROM AM_REGION("iocpu", 0xFF000) // rom is here if either BootSeqDone OR DisableROM are zero. the 1.5 source code and the schematics implies writes here are ignored while rom is enabled; if disablerom is 1 this goes to mainram - AM_RANGE(0x01000, 0x3ffff) AM_RAM AM_BASE("mainram") // 256k of ram (less 4k), shared between both processors. rom goes here if bootseqdone is 0 - // note 4000-8fff? is the framebuffer for the screen? - AM_RANGE(0xff000, 0xfffff) AM_ROM // rom is only banked in here if bootseqdone is 0, so the reset vector is in the proper place. otherwise the memory control regs live at fffe8-fffef + AM_RANGE(0x00000, 0x00fff) AM_ROM AM_REGION("iocpu", 0xff000) // rom is here if either BootSeqDone OR DisableROM are zero. the 1.5 source code and the schematics implies writes here are ignored while rom is enabled; if disablerom is 1 this goes to mainram + AM_RANGE(0x01000, 0x3ffff) AM_RAM AM_REGION("mainram", 0) // 256k of ram (less 4k), shared between both processors. rom goes here if bootseqdone is 0 + // note 4000-d5ff is the framebuffer for the screen, in two sets of fields for odd/even interlace? + AM_RANGE(0xff000, 0xfffe7) AM_ROM AM_REGION("iocpu", 0xff000) // rom is only banked in here if bootseqdone is 0, so the reset vector is in the proper place. otherwise the memory control regs live at fffe8-fffef + //AM_RANGE(0xfffea, 0xfffeb) AM_WRITE(cpuCtl_w); + //AM_RANGE(0xfffec, 0xfffed) AM_READ(parityErrHi_r); + //AM_RANGE(0xfffee, 0xfffef) AM_READ(parityErrLo_r); + AM_RANGE(0xffff0, 0xfffff) AM_ROM AM_REGION("iocpu", 0xffff0) */ AM_RANGE(0x00000, 0xfffff) AM_READWRITE(iocpu_r, iocpu_w) // bypass MAME's memory map system as we need finer grained control ADDRESS_MAP_END @@ -474,9 +514,9 @@ static ADDRESS_MAP_START(notetaker_iocpu_io, AS_IO, 16, notetaker_state) //AM_RANGE(0xa0, 0xa1) AM_MIRROR(0x7E18) AM_DEVREADWRITE("debug8255", 8255_device, read, write) // debugger board 8255 AM_RANGE(0xc0, 0xc1) AM_MIRROR(0x7E1E) AM_WRITE(FIFOBus_w) // DAC data write to FIFO //AM_RANGE(0x100, 0x101) AM_MIRROR(0x7E1E) AM_WRITE(DiskReg_w) I/O register (adc speed, crtc pixel clock enable, +5 and +12v relays for floppy, etc) - //AM_RANGE(0x120, 0x121) AM_MIRROR(0x7E18) AM_DEVREADWRITE("wd1791", fd1971_device) // floppy controller + //AM_RANGE(0x120, 0x127) AM_MIRROR(0x7E18) AM_DEVREADWRITE("wd1791", fd1971_device) // floppy controller AM_RANGE(0x140, 0x15f) AM_MIRROR(0x7E00) AM_DEVREADWRITE8("crt5027", crt5027_device, read, write, 0x00FF) // crt controller - //AM_RANGE(0x160, 0x161) AM_MIRROR(0x7E1E) AM_WRITE(LoadDispAddr_w) // loads the start address for the display framebuffer + AM_RANGE(0x160, 0x161) AM_MIRROR(0x7E1E) AM_WRITE(LoadDispAddr_w) // loads the start address for the display framebuffer AM_RANGE(0x1a0, 0x1a1) AM_MIRROR(0x7E10) AM_READ(ReadEIAStatus_r) // read keyboard fifo state AM_RANGE(0x1a2, 0x1a3) AM_MIRROR(0x7E10) AM_READ(ReadEIAData_r) // read keyboard data AM_RANGE(0x1a8, 0x1a9) AM_MIRROR(0x7E10) AM_WRITE(LoadEIACtlReg_w) // kbd uart control register @@ -595,6 +635,9 @@ void notetaker_state::ip_reset() m_outfifo_count = m_outfifo_tail_ptr = m_outfifo_head_ptr = 0; // Reset the DAC Timer m_FIFO_timer->adjust(attotime::from_hz(((XTAL_960kHz/10)/4)/((m_FrSel0<<3)+(m_FrSel1<<2)+(m_FrSel2<<1)+1))); // FIFO timer is clocked by 960khz divided by 10 (74ls162 decade counter), divided by 4 (mc14568B with divider 1 pins set to 4), divided by 1,3,5,7,9,11,13,15 (or 0,2,4,6,8,10,12,14?) + // stuff on display/eia board also reset by IPReset: + // reset the Framebuffer Display Address: + m_DispAddr = 0; // reset the EIA UART m_eiauart->set_input_pin(AY31015_XR, 0); // MR - pin 21 m_eiauart->set_input_pin(AY31015_XR, 1); // '' @@ -634,8 +677,8 @@ static MACHINE_CONFIG_START( notetakr, notetaker_state ) MCFG_SCREEN_REFRESH_RATE(60.975) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(250)) MCFG_SCREEN_UPDATE_DRIVER(notetaker_state, screen_update) - MCFG_SCREEN_SIZE(64*6, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0, 64*6-1, 0, 32*8-1) + MCFG_SCREEN_SIZE(640, 480) + MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") @@ -644,7 +687,8 @@ static MACHINE_CONFIG_START( notetakr, notetaker_state ) // on reset, bitclk is 000 so divider is (36mhz/8)/8; during boot it is written with 101, changing the divider to (36mhz/4)/8 // TODO: for now, we just hack it to the latter setting from start; this should be handled correctly in ip_reset(); MCFG_TMS9927_CHAR_WIDTH(8) //(8 pixels per column/halfword, 16 pixels per fullword) - MCFG_TMS9927_VSYN_CALLBACK(DEVWRITELINE("iopic8259", pic8259_device, ir7_w)) // note this triggers interrupts on both the iocpu (int7) and emulatorcpu (int4) + // TODO: below is HACKED to trigger the odd/even int ir4 instead of vblank int ir7 since ir4 is required for anything to be drawn to screen! hence with the hack this interrupt triggers twice as often as it should + MCFG_TMS9927_VSYN_CALLBACK(DEVWRITELINE("iopic8259", pic8259_device, ir4_w)) // note this triggers interrupts on both the iocpu (ir7) and emulatorcpu (ir4) MCFG_VIDEO_SET_SCREEN("screen") MCFG_DEVICE_ADD( "kbduart", AY31015, 0 ) // HD6402, == AY-3-1015D -- cgit v1.2.3-70-g09d2 From 92473ff3c1cc9dd856e42ffa18179409052680fa Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Wed, 9 Mar 2016 03:27:08 -0500 Subject: remove outdated comment (nw) --- src/mame/drivers/notetaker.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index 4a3f8018d00..af0feddd964 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -380,7 +380,6 @@ WRITE16_MEMBER( notetaker_state::EIAChipReset_w ) /* These next two members are memory map related for the iocpu */ -/* TODO: not only are these extremely slow, they don't work properly as they do not respect byte writes vs word writes to addresses */ READ16_MEMBER(notetaker_state::iocpu_r) { UINT16 *rom = (UINT16 *)(memregion("iocpu")->base()); -- cgit v1.2.3-70-g09d2 From 62fb91d39eb48057317fb844d1c78ec64e30a7fb Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 9 Mar 2016 12:02:32 +0100 Subject: supercon: WIP, don't mind the mess --- src/mame/drivers/supercon.cpp | 375 +++++++++++++++++++++++++++++++++++++++++- src/mame/layout/supercon.lay | 28 +++- 2 files changed, 394 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/supercon.cpp b/src/mame/drivers/supercon.cpp index f61d30f0bfb..9ee51150fe8 100644 --- a/src/mame/drivers/supercon.cpp +++ b/src/mame/drivers/supercon.cpp @@ -6,14 +6,15 @@ - UMC UM6502C @ 4 MHz (8MHz XTAL), 600Hz IRQ(source unknown?) - 2*2KB RAM TC5516APL-2 battery-backed, 2*32KB ROM custom label -- TTL, 24 LEDs, 8*8 chessboard buttons -- external port for clock and printer, not emulated here +- TTL, buzzer, 24 LEDs, 8*8 chessboard buttons +- external ports for clock and printer, not emulated here ******************************************************************************/ #include "emu.h" #include "cpu/m6502/m6502.h" #include "machine/nvram.h" +#include "sound/beep.h" // internal artwork #include "supercon.lh" @@ -24,23 +25,375 @@ class supercon_state : public driver_device public: supercon_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") + m_maincpu(*this, "maincpu"), + m_beeper(*this, "beeper"), + m_inp_matrix(*this, "IN"), + m_display_wait(33), + m_display_maxy(1), + m_display_maxx(0) { } + // devices/pointers required_device m_maincpu; + optional_device m_beeper; + optional_ioport_array<8> m_inp_matrix; + + DECLARE_WRITE8_MEMBER(supercon_1c_w); + DECLARE_WRITE8_MEMBER(supercon_1d_w); + DECLARE_WRITE8_MEMBER(supercon_1e_w); + DECLARE_WRITE8_MEMBER(supercon_1f_w); + DECLARE_READ8_MEMBER(supercon_1c_r); + DECLARE_READ8_MEMBER(supercon_1d_r); + DECLARE_READ8_MEMBER(supercon_1e_r); + DECLARE_READ8_MEMBER(supercon_1f_r); + + // misc common + UINT16 m_inp_mux; // multiplexed keypad mask + UINT16 m_led_select; + UINT16 m_led_data; + + UINT16 read_inputs(int columns); + + // display common + int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) + int m_display_maxy; // display matrix number of rows + int m_display_maxx; // display matrix number of columns (max 31 for now) + + UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on) + UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments + UINT32 m_display_cache[0x20]; // (internal use) + UINT8 m_display_decay[0x20][0x20]; // (internal use) + + TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); + void display_update(); + void set_display_size(int maxx, int maxy); + void set_display_segmask(UINT32 digits, UINT32 mask); + void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; }; + +// machine start/reset + +void supercon_state::machine_start() +{ + // zerofill + memset(m_display_state, 0, sizeof(m_display_state)); + memset(m_display_cache, ~0, sizeof(m_display_cache)); + memset(m_display_decay, 0, sizeof(m_display_decay)); + memset(m_display_segmask, 0, sizeof(m_display_segmask)); + + m_inp_mux = 0; + m_led_select = 0; + m_led_data = 0; + + // register for savestates + save_item(NAME(m_display_maxy)); + save_item(NAME(m_display_maxx)); + save_item(NAME(m_display_wait)); + + save_item(NAME(m_display_state)); + /* save_item(NAME(m_display_cache)); */ // don't save! + save_item(NAME(m_display_decay)); + save_item(NAME(m_display_segmask)); + + save_item(NAME(m_inp_mux)); + save_item(NAME(m_led_select)); + save_item(NAME(m_led_data)); +} + +void supercon_state::machine_reset() +{ +} + + + +/*************************************************************************** + + Helper Functions + +***************************************************************************/ + +// The device may strobe the outputs very fast, it is unnoticeable to the user. +// To prevent flickering here, we need to simulate a decay. + +void supercon_state::display_update() +{ + UINT32 active_state[0x20]; + + for (int y = 0; y < m_display_maxy; y++) + { + active_state[y] = 0; + + for (int x = 0; x <= m_display_maxx; x++) + { + // turn on powered segments + if (m_display_state[y] >> x & 1) + m_display_decay[y][x] = m_display_wait; + + // determine active state + UINT32 ds = (m_display_decay[y][x] != 0) ? 1 : 0; + active_state[y] |= (ds << x); + } + } + + // on difference, send to output + for (int y = 0; y < m_display_maxy; y++) + if (m_display_cache[y] != active_state[y]) + { + if (m_display_segmask[y] != 0) + output().set_digit_value(y, active_state[y] & m_display_segmask[y]); + + const int mul = (m_display_maxx <= 10) ? 10 : 100; + for (int x = 0; x <= m_display_maxx; x++) + { + int state = active_state[y] >> x & 1; + char buf1[0x10]; // lampyx + char buf2[0x10]; // y.x + + if (x == m_display_maxx) + { + // always-on if selected + sprintf(buf1, "lamp%da", y); + sprintf(buf2, "%d.a", y); + } + else + { + sprintf(buf1, "lamp%d", y * mul + x); + sprintf(buf2, "%d.%d", y, x); + } + output().set_value(buf1, state); + output().set_value(buf2, state); + } + } + + memcpy(m_display_cache, active_state, sizeof(m_display_cache)); +} + +TIMER_DEVICE_CALLBACK_MEMBER(supercon_state::display_decay_tick) +{ + // slowly turn off unpowered segments + for (int y = 0; y < m_display_maxy; y++) + for (int x = 0; x <= m_display_maxx; x++) + if (m_display_decay[y][x] != 0) + m_display_decay[y][x]--; + + display_update(); +} + +void supercon_state::set_display_size(int maxx, int maxy) +{ + m_display_maxx = maxx; + m_display_maxy = maxy; +} + +void supercon_state::set_display_segmask(UINT32 digits, UINT32 mask) +{ + // set a segment mask per selected digit, but leave unselected ones alone + for (int i = 0; i < 0x20; i++) + { + if (digits & 1) + m_display_segmask[i] = mask; + digits >>= 1; + } +} + +void supercon_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update) +{ + set_display_size(maxx, maxy); + + // update current state + UINT32 mask = (1 << maxx) - 1; + for (int y = 0; y < maxy; y++) + m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0; + + if (update) + display_update(); +} + +// generic input handlers + +UINT16 supercon_state::read_inputs(int columns) +{ + UINT16 ret = 0; + + // read selected input rows + for (int i = 0; i < columns; i++) + if (m_inp_mux >> i & 1) + ret |= m_inp_matrix[i]->read(); + + return ret; +} + + /* Address maps */ -static ADDRESS_MAP_START(supercon_mem, AS_PROGRAM, 8, supercon_state) - AM_RANGE( 0x0000, 0x0fff) AM_RAM AM_SHARE("nvram") - AM_RANGE( 0x2000, 0xffff) AM_ROM + +WRITE8_MEMBER(supercon_state::supercon_1c_w) +{ +} + +WRITE8_MEMBER(supercon_state::supercon_1d_w) +{ +} + +WRITE8_MEMBER(supercon_state::supercon_1e_w) +{ + // d0-d7: input mux, led data + m_inp_mux = m_led_data = data; + display_matrix(8, 3, m_led_data, m_led_select); +} + +WRITE8_MEMBER(supercon_state::supercon_1f_w) +{ + // d4-d6: select led row + m_led_select = data >> 4 & 7; + display_matrix(8, 3, m_led_data, m_led_select); + + // d7: enable beeper + m_beeper->set_state(data >> 7 & 1); +} + + +READ8_MEMBER(supercon_state::supercon_1c_r) +{ + return 0xff; +} + +READ8_MEMBER(supercon_state::supercon_1d_r) +{ + return 0xff; +} + +READ8_MEMBER(supercon_state::supercon_1e_r) +{ + // d6,d7: multiplexed inputs (side panel) + return (read_inputs(8) >> 2 & 0xc0) ^ 0xff; +} + +READ8_MEMBER(supercon_state::supercon_1f_r) +{ + // d0-d7: multiplexed inputs (chessboard squares) + return ~read_inputs(8) & 0xff; +} + + + + +static ADDRESS_MAP_START( supercon_mem, AS_PROGRAM, 8, supercon_state ) + AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("nvram") + AM_RANGE(0x1c00, 0x1c00) AM_READWRITE(supercon_1c_r, supercon_1c_w) + AM_RANGE(0x1d00, 0x1d00) AM_READWRITE(supercon_1d_r, supercon_1d_w) + AM_RANGE(0x1e00, 0x1e00) AM_READWRITE(supercon_1e_r, supercon_1e_w) + AM_RANGE(0x1f00, 0x1f00) AM_READWRITE(supercon_1f_r, supercon_1f_w) + AM_RANGE(0x2000, 0xffff) AM_ROM ADDRESS_MAP_END /* Input ports */ static INPUT_PORTS_START( supercon ) + PORT_START("IN.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) // newgame + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) + + PORT_START("IN.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) + + PORT_START("IN.2") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) + + PORT_START("IN.3") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) + + PORT_START("IN.4") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) + + PORT_START("IN.5") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) + + PORT_START("IN.6") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) + + PORT_START("IN.7") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) + + + INPUT_PORTS_END /* Machine driver */ @@ -49,12 +402,18 @@ static MACHINE_CONFIG_START( supercon, supercon_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, XTAL_8MHz/2) - MCFG_CPU_PERIODIC_INT_DRIVER(supercon_state, irq0_line_hold, 600) // ? + MCFG_CPU_PERIODIC_INT_DRIVER(supercon_state, irq0_line_hold, 600) // guessed MCFG_CPU_PROGRAM_MAP(supercon_mem) MCFG_NVRAM_ADD_0FILL("nvram") + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", supercon_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_supercon) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("beeper", BEEP, 2000) // guessed + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END /* ROM definition */ @@ -68,4 +427,4 @@ ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ -CONS( 1984, supercon, 0, 0, supercon, supercon, driver_device, 0, "Novag", "Super Constellation", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW ) +CONS( 1984, supercon, 0, 0, supercon, supercon, driver_device, 0, "Novag", "Super Constellation", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) diff --git a/src/mame/layout/supercon.lay b/src/mame/layout/supercon.lay index 9d3e4d2766a..5047e4df72b 100644 --- a/src/mame/layout/supercon.lay +++ b/src/mame/layout/supercon.lay @@ -14,7 +14,33 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-70-g09d2 From 262fc7035a2f5328b97adea11cae1a7d58cd8653 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 9 Mar 2016 12:21:05 +0100 Subject: renamed supercon.cpp to novag6502.cpp --- scripts/target/mame/mess.lua | 2 +- src/mame/drivers/novag6502.cpp | 436 +++++++++++++++++++++++++++++++++++++++++ src/mame/drivers/supercon.cpp | 430 ---------------------------------------- src/mame/mame.lst | 6 +- src/mame/mess.flt | 2 +- 5 files changed, 441 insertions(+), 435 deletions(-) create mode 100644 src/mame/drivers/novag6502.cpp delete mode 100644 src/mame/drivers/supercon.cpp (limited to 'src') diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index e6af65ea8ef..829c82af577 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -2171,10 +2171,10 @@ createMESSProjects(_target, _subtarget, "novag") files { MAME_DIR .. "src/mame/drivers/mk1.cpp", MAME_DIR .. "src/mame/drivers/mk2.cpp", + MAME_DIR .. "src/mame/drivers/novag6502.cpp", MAME_DIR .. "src/mame/drivers/ssystem3.cpp", MAME_DIR .. "src/mame/includes/ssystem3.h", MAME_DIR .. "src/mame/video/ssystem3.cpp", - MAME_DIR .. "src/mame/drivers/supercon.cpp", } createMESSProjects(_target, _subtarget, "olivetti") diff --git a/src/mame/drivers/novag6502.cpp b/src/mame/drivers/novag6502.cpp new file mode 100644 index 00000000000..6bb71e2e24d --- /dev/null +++ b/src/mame/drivers/novag6502.cpp @@ -0,0 +1,436 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/****************************************************************************** + + Novag generic 6502 based chess computer driver + + TODO: + - move other Novag sets here when applicable + +------------------------------------------------------------------------------- + +Super Constellation Chess Computer (model 844): +- UMC UM6502C @ 4 MHz (8MHz XTAL), 600Hz IRQ(source unknown?) +- 2*2KB RAM TC5516APL-2 battery-backed, 2*32KB ROM custom label +- TTL, buzzer, 24 LEDs, 8*8 chessboard buttons +- external ports for clock and printer, not emulated here + +******************************************************************************/ + +#include "emu.h" +#include "cpu/m6502/m6502.h" +#include "machine/nvram.h" +#include "sound/beep.h" + +// internal artwork +#include "supercon.lh" + + +class novag6502_state : public driver_device +{ +public: + novag6502_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_beeper(*this, "beeper"), + m_inp_matrix(*this, "IN"), + m_display_wait(33), + m_display_maxy(1), + m_display_maxx(0) + { } + + // devices/pointers + required_device m_maincpu; + optional_device m_beeper; + optional_ioport_array<8> m_inp_matrix; + + DECLARE_WRITE8_MEMBER(supercon_1c_w); + DECLARE_WRITE8_MEMBER(supercon_1d_w); + DECLARE_WRITE8_MEMBER(supercon_1e_w); + DECLARE_WRITE8_MEMBER(supercon_1f_w); + DECLARE_READ8_MEMBER(supercon_1c_r); + DECLARE_READ8_MEMBER(supercon_1d_r); + DECLARE_READ8_MEMBER(supercon_1e_r); + DECLARE_READ8_MEMBER(supercon_1f_r); + + // misc common + UINT16 m_inp_mux; // multiplexed keypad mask + UINT16 m_led_select; + UINT16 m_led_data; + + UINT16 read_inputs(int columns); + + // display common + int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) + int m_display_maxy; // display matrix number of rows + int m_display_maxx; // display matrix number of columns (max 31 for now) + + UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on) + UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments + UINT32 m_display_cache[0x20]; // (internal use) + UINT8 m_display_decay[0x20][0x20]; // (internal use) + + TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); + void display_update(); + void set_display_size(int maxx, int maxy); + void set_display_segmask(UINT32 digits, UINT32 mask); + void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; +}; + + + +// machine start/reset + +void novag6502_state::machine_start() +{ + // zerofill + memset(m_display_state, 0, sizeof(m_display_state)); + memset(m_display_cache, ~0, sizeof(m_display_cache)); + memset(m_display_decay, 0, sizeof(m_display_decay)); + memset(m_display_segmask, 0, sizeof(m_display_segmask)); + + m_inp_mux = 0; + m_led_select = 0; + m_led_data = 0; + + // register for savestates + save_item(NAME(m_display_maxy)); + save_item(NAME(m_display_maxx)); + save_item(NAME(m_display_wait)); + + save_item(NAME(m_display_state)); + /* save_item(NAME(m_display_cache)); */ // don't save! + save_item(NAME(m_display_decay)); + save_item(NAME(m_display_segmask)); + + save_item(NAME(m_inp_mux)); + save_item(NAME(m_led_select)); + save_item(NAME(m_led_data)); +} + +void novag6502_state::machine_reset() +{ +} + + + +/*************************************************************************** + + Helper Functions + +***************************************************************************/ + +// The device may strobe the outputs very fast, it is unnoticeable to the user. +// To prevent flickering here, we need to simulate a decay. + +void novag6502_state::display_update() +{ + UINT32 active_state[0x20]; + + for (int y = 0; y < m_display_maxy; y++) + { + active_state[y] = 0; + + for (int x = 0; x <= m_display_maxx; x++) + { + // turn on powered segments + if (m_display_state[y] >> x & 1) + m_display_decay[y][x] = m_display_wait; + + // determine active state + UINT32 ds = (m_display_decay[y][x] != 0) ? 1 : 0; + active_state[y] |= (ds << x); + } + } + + // on difference, send to output + for (int y = 0; y < m_display_maxy; y++) + if (m_display_cache[y] != active_state[y]) + { + if (m_display_segmask[y] != 0) + output().set_digit_value(y, active_state[y] & m_display_segmask[y]); + + const int mul = (m_display_maxx <= 10) ? 10 : 100; + for (int x = 0; x <= m_display_maxx; x++) + { + int state = active_state[y] >> x & 1; + char buf1[0x10]; // lampyx + char buf2[0x10]; // y.x + + if (x == m_display_maxx) + { + // always-on if selected + sprintf(buf1, "lamp%da", y); + sprintf(buf2, "%d.a", y); + } + else + { + sprintf(buf1, "lamp%d", y * mul + x); + sprintf(buf2, "%d.%d", y, x); + } + output().set_value(buf1, state); + output().set_value(buf2, state); + } + } + + memcpy(m_display_cache, active_state, sizeof(m_display_cache)); +} + +TIMER_DEVICE_CALLBACK_MEMBER(novag6502_state::display_decay_tick) +{ + // slowly turn off unpowered segments + for (int y = 0; y < m_display_maxy; y++) + for (int x = 0; x <= m_display_maxx; x++) + if (m_display_decay[y][x] != 0) + m_display_decay[y][x]--; + + display_update(); +} + +void novag6502_state::set_display_size(int maxx, int maxy) +{ + m_display_maxx = maxx; + m_display_maxy = maxy; +} + +void novag6502_state::set_display_segmask(UINT32 digits, UINT32 mask) +{ + // set a segment mask per selected digit, but leave unselected ones alone + for (int i = 0; i < 0x20; i++) + { + if (digits & 1) + m_display_segmask[i] = mask; + digits >>= 1; + } +} + +void novag6502_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update) +{ + set_display_size(maxx, maxy); + + // update current state + UINT32 mask = (1 << maxx) - 1; + for (int y = 0; y < maxy; y++) + m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0; + + if (update) + display_update(); +} + +// generic input handlers + +UINT16 novag6502_state::read_inputs(int columns) +{ + UINT16 ret = 0; + + // read selected input rows + for (int i = 0; i < columns; i++) + if (m_inp_mux >> i & 1) + ret |= m_inp_matrix[i]->read(); + + return ret; +} + + +/* Address maps */ + + +WRITE8_MEMBER(novag6502_state::supercon_1c_w) +{ +} + +WRITE8_MEMBER(novag6502_state::supercon_1d_w) +{ +} + +WRITE8_MEMBER(novag6502_state::supercon_1e_w) +{ + // d0-d7: input mux, led data + m_inp_mux = m_led_data = data; + display_matrix(8, 3, m_led_data, m_led_select); +} + +WRITE8_MEMBER(novag6502_state::supercon_1f_w) +{ + // d4-d6: select led row + m_led_select = data >> 4 & 7; + display_matrix(8, 3, m_led_data, m_led_select); + + // d7: enable beeper + m_beeper->set_state(data >> 7 & 1); +} + + +READ8_MEMBER(novag6502_state::supercon_1c_r) +{ + return 0xff; +} + +READ8_MEMBER(novag6502_state::supercon_1d_r) +{ + return 0xff; +} + +READ8_MEMBER(novag6502_state::supercon_1e_r) +{ + // d6,d7: multiplexed inputs (side panel) + return (read_inputs(8) >> 2 & 0xc0) ^ 0xff; +} + +READ8_MEMBER(novag6502_state::supercon_1f_r) +{ + // d0-d7: multiplexed inputs (chessboard squares) + return ~read_inputs(8) & 0xff; +} + + + + +static ADDRESS_MAP_START( supercon_mem, AS_PROGRAM, 8, novag6502_state ) + AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("nvram") + AM_RANGE(0x1c00, 0x1c00) AM_READWRITE(supercon_1c_r, supercon_1c_w) + AM_RANGE(0x1d00, 0x1d00) AM_READWRITE(supercon_1d_r, supercon_1d_w) + AM_RANGE(0x1e00, 0x1e00) AM_READWRITE(supercon_1e_r, supercon_1e_w) + AM_RANGE(0x1f00, 0x1f00) AM_READWRITE(supercon_1f_r, supercon_1f_w) + AM_RANGE(0x2000, 0xffff) AM_ROM +ADDRESS_MAP_END + +/* Input ports */ + +static INPUT_PORTS_START( supercon ) + PORT_START("IN.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) // newgame + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) + + PORT_START("IN.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) + + PORT_START("IN.2") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) + + PORT_START("IN.3") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) + + PORT_START("IN.4") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) + + PORT_START("IN.5") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) + + PORT_START("IN.6") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) + + PORT_START("IN.7") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) + + + +INPUT_PORTS_END + +/* Machine driver */ + +static MACHINE_CONFIG_START( supercon, novag6502_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", M6502, XTAL_8MHz/2) + MCFG_CPU_PERIODIC_INT_DRIVER(novag6502_state, irq0_line_hold, 600) // guessed + MCFG_CPU_PROGRAM_MAP(supercon_mem) + + MCFG_NVRAM_ADD_0FILL("nvram") + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", novag6502_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_supercon) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("beeper", BEEP, 2000) // guessed + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + +/* ROM definition */ + +ROM_START(supercon) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("novag_8441", 0x0000, 0x8000, CRC(b853cf6e) SHA1(1a759072a5023b92c07f1fac01b7a21f7b5b45d0) ) // label obscured by Q.C. sticker + ROM_LOAD("novag_8442", 0x8000, 0x8000, CRC(c8f82331) SHA1(f7fd039f9a3344db9749931490ded9e9e309cfbe) ) +ROM_END + +/* Driver */ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ +CONS( 1984, supercon, 0, 0, supercon, supercon, driver_device, 0, "Novag", "Super Constellation", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/supercon.cpp b/src/mame/drivers/supercon.cpp deleted file mode 100644 index 9ee51150fe8..00000000000 --- a/src/mame/drivers/supercon.cpp +++ /dev/null @@ -1,430 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:hap -/****************************************************************************** - - Novag Super Constellation Chess Computer (model 844) - -- UMC UM6502C @ 4 MHz (8MHz XTAL), 600Hz IRQ(source unknown?) -- 2*2KB RAM TC5516APL-2 battery-backed, 2*32KB ROM custom label -- TTL, buzzer, 24 LEDs, 8*8 chessboard buttons -- external ports for clock and printer, not emulated here - -******************************************************************************/ - -#include "emu.h" -#include "cpu/m6502/m6502.h" -#include "machine/nvram.h" -#include "sound/beep.h" - -// internal artwork -#include "supercon.lh" - - -class supercon_state : public driver_device -{ -public: - supercon_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_beeper(*this, "beeper"), - m_inp_matrix(*this, "IN"), - m_display_wait(33), - m_display_maxy(1), - m_display_maxx(0) - { } - - // devices/pointers - required_device m_maincpu; - optional_device m_beeper; - optional_ioport_array<8> m_inp_matrix; - - DECLARE_WRITE8_MEMBER(supercon_1c_w); - DECLARE_WRITE8_MEMBER(supercon_1d_w); - DECLARE_WRITE8_MEMBER(supercon_1e_w); - DECLARE_WRITE8_MEMBER(supercon_1f_w); - DECLARE_READ8_MEMBER(supercon_1c_r); - DECLARE_READ8_MEMBER(supercon_1d_r); - DECLARE_READ8_MEMBER(supercon_1e_r); - DECLARE_READ8_MEMBER(supercon_1f_r); - - // misc common - UINT16 m_inp_mux; // multiplexed keypad mask - UINT16 m_led_select; - UINT16 m_led_data; - - UINT16 read_inputs(int columns); - - // display common - int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) - int m_display_maxy; // display matrix number of rows - int m_display_maxx; // display matrix number of columns (max 31 for now) - - UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on) - UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments - UINT32 m_display_cache[0x20]; // (internal use) - UINT8 m_display_decay[0x20][0x20]; // (internal use) - - TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); - void display_update(); - void set_display_size(int maxx, int maxy); - void set_display_segmask(UINT32 digits, UINT32 mask); - void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true); - -protected: - virtual void machine_start() override; - virtual void machine_reset() override; -}; - - - -// machine start/reset - -void supercon_state::machine_start() -{ - // zerofill - memset(m_display_state, 0, sizeof(m_display_state)); - memset(m_display_cache, ~0, sizeof(m_display_cache)); - memset(m_display_decay, 0, sizeof(m_display_decay)); - memset(m_display_segmask, 0, sizeof(m_display_segmask)); - - m_inp_mux = 0; - m_led_select = 0; - m_led_data = 0; - - // register for savestates - save_item(NAME(m_display_maxy)); - save_item(NAME(m_display_maxx)); - save_item(NAME(m_display_wait)); - - save_item(NAME(m_display_state)); - /* save_item(NAME(m_display_cache)); */ // don't save! - save_item(NAME(m_display_decay)); - save_item(NAME(m_display_segmask)); - - save_item(NAME(m_inp_mux)); - save_item(NAME(m_led_select)); - save_item(NAME(m_led_data)); -} - -void supercon_state::machine_reset() -{ -} - - - -/*************************************************************************** - - Helper Functions - -***************************************************************************/ - -// The device may strobe the outputs very fast, it is unnoticeable to the user. -// To prevent flickering here, we need to simulate a decay. - -void supercon_state::display_update() -{ - UINT32 active_state[0x20]; - - for (int y = 0; y < m_display_maxy; y++) - { - active_state[y] = 0; - - for (int x = 0; x <= m_display_maxx; x++) - { - // turn on powered segments - if (m_display_state[y] >> x & 1) - m_display_decay[y][x] = m_display_wait; - - // determine active state - UINT32 ds = (m_display_decay[y][x] != 0) ? 1 : 0; - active_state[y] |= (ds << x); - } - } - - // on difference, send to output - for (int y = 0; y < m_display_maxy; y++) - if (m_display_cache[y] != active_state[y]) - { - if (m_display_segmask[y] != 0) - output().set_digit_value(y, active_state[y] & m_display_segmask[y]); - - const int mul = (m_display_maxx <= 10) ? 10 : 100; - for (int x = 0; x <= m_display_maxx; x++) - { - int state = active_state[y] >> x & 1; - char buf1[0x10]; // lampyx - char buf2[0x10]; // y.x - - if (x == m_display_maxx) - { - // always-on if selected - sprintf(buf1, "lamp%da", y); - sprintf(buf2, "%d.a", y); - } - else - { - sprintf(buf1, "lamp%d", y * mul + x); - sprintf(buf2, "%d.%d", y, x); - } - output().set_value(buf1, state); - output().set_value(buf2, state); - } - } - - memcpy(m_display_cache, active_state, sizeof(m_display_cache)); -} - -TIMER_DEVICE_CALLBACK_MEMBER(supercon_state::display_decay_tick) -{ - // slowly turn off unpowered segments - for (int y = 0; y < m_display_maxy; y++) - for (int x = 0; x <= m_display_maxx; x++) - if (m_display_decay[y][x] != 0) - m_display_decay[y][x]--; - - display_update(); -} - -void supercon_state::set_display_size(int maxx, int maxy) -{ - m_display_maxx = maxx; - m_display_maxy = maxy; -} - -void supercon_state::set_display_segmask(UINT32 digits, UINT32 mask) -{ - // set a segment mask per selected digit, but leave unselected ones alone - for (int i = 0; i < 0x20; i++) - { - if (digits & 1) - m_display_segmask[i] = mask; - digits >>= 1; - } -} - -void supercon_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update) -{ - set_display_size(maxx, maxy); - - // update current state - UINT32 mask = (1 << maxx) - 1; - for (int y = 0; y < maxy; y++) - m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0; - - if (update) - display_update(); -} - -// generic input handlers - -UINT16 supercon_state::read_inputs(int columns) -{ - UINT16 ret = 0; - - // read selected input rows - for (int i = 0; i < columns; i++) - if (m_inp_mux >> i & 1) - ret |= m_inp_matrix[i]->read(); - - return ret; -} - - -/* Address maps */ - - -WRITE8_MEMBER(supercon_state::supercon_1c_w) -{ -} - -WRITE8_MEMBER(supercon_state::supercon_1d_w) -{ -} - -WRITE8_MEMBER(supercon_state::supercon_1e_w) -{ - // d0-d7: input mux, led data - m_inp_mux = m_led_data = data; - display_matrix(8, 3, m_led_data, m_led_select); -} - -WRITE8_MEMBER(supercon_state::supercon_1f_w) -{ - // d4-d6: select led row - m_led_select = data >> 4 & 7; - display_matrix(8, 3, m_led_data, m_led_select); - - // d7: enable beeper - m_beeper->set_state(data >> 7 & 1); -} - - -READ8_MEMBER(supercon_state::supercon_1c_r) -{ - return 0xff; -} - -READ8_MEMBER(supercon_state::supercon_1d_r) -{ - return 0xff; -} - -READ8_MEMBER(supercon_state::supercon_1e_r) -{ - // d6,d7: multiplexed inputs (side panel) - return (read_inputs(8) >> 2 & 0xc0) ^ 0xff; -} - -READ8_MEMBER(supercon_state::supercon_1f_r) -{ - // d0-d7: multiplexed inputs (chessboard squares) - return ~read_inputs(8) & 0xff; -} - - - - -static ADDRESS_MAP_START( supercon_mem, AS_PROGRAM, 8, supercon_state ) - AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("nvram") - AM_RANGE(0x1c00, 0x1c00) AM_READWRITE(supercon_1c_r, supercon_1c_w) - AM_RANGE(0x1d00, 0x1d00) AM_READWRITE(supercon_1d_r, supercon_1d_w) - AM_RANGE(0x1e00, 0x1e00) AM_READWRITE(supercon_1e_r, supercon_1e_w) - AM_RANGE(0x1f00, 0x1f00) AM_READWRITE(supercon_1f_r, supercon_1f_w) - AM_RANGE(0x2000, 0xffff) AM_ROM -ADDRESS_MAP_END - -/* Input ports */ - -static INPUT_PORTS_START( supercon ) - PORT_START("IN.0") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) // newgame - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) - - PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) - - PORT_START("IN.2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) - - PORT_START("IN.3") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) - - PORT_START("IN.4") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) - - PORT_START("IN.5") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) - - PORT_START("IN.6") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) - - PORT_START("IN.7") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) - - - -INPUT_PORTS_END - -/* Machine driver */ - -static MACHINE_CONFIG_START( supercon, supercon_state ) - - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M6502, XTAL_8MHz/2) - MCFG_CPU_PERIODIC_INT_DRIVER(supercon_state, irq0_line_hold, 600) // guessed - MCFG_CPU_PROGRAM_MAP(supercon_mem) - - MCFG_NVRAM_ADD_0FILL("nvram") - - MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", supercon_state, display_decay_tick, attotime::from_msec(1)) - MCFG_DEFAULT_LAYOUT(layout_supercon) - - /* sound hardware */ - MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("beeper", BEEP, 2000) // guessed - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) -MACHINE_CONFIG_END - -/* ROM definition */ - -ROM_START(supercon) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("novag_8441", 0x0000, 0x8000, CRC(b853cf6e) SHA1(1a759072a5023b92c07f1fac01b7a21f7b5b45d0) ) // label obscured by Q.C. sticker - ROM_LOAD("novag_8442", 0x8000, 0x8000, CRC(c8f82331) SHA1(f7fd039f9a3344db9749931490ded9e9e309cfbe) ) -ROM_END - -/* Driver */ - -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ -CONS( 1984, supercon, 0, 0, supercon, supercon, driver_device, 0, "Novag", "Super Constellation", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 94ae3cf2bd7..3f8095b579e 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -28448,6 +28448,9 @@ pkunwarj // UPL-????? (c) 1985 (Arcade Game TV List - P.9 raiders5 // UPL-85004 (c) 1985 raiders5t // UPL-85004 (c) 1985 Taito license +@source:novag6502.cpp +supercon // + @source:nsm.cpp firebird // @@ -33606,9 +33609,6 @@ superchsj // D46 (c) 1992 Taito Corporation (Japan) superchsp // prototype superchsu // D46 (c) 1992 Taito America Corporation (US) -@source:supercon.cpp -supercon // - @source:supercrd.cpp fruitstr // (c) 1992 Fun World supercrd // (c) 1992 Fun World diff --git a/src/mame/mess.flt b/src/mame/mess.flt index d79069a97f2..93b0531b119 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -376,6 +376,7 @@ ngen.cpp ngp.cpp nokia_3310.cpp notetaker.cpp +novag6502.cpp ob68k1a.cpp octopus.cpp odyssey2.cpp @@ -542,7 +543,6 @@ sun3.cpp sun4.cpp super6.cpp super80.cpp -supercon.cpp superslave.cpp supracan.cpp sv8000.cpp -- cgit v1.2.3-70-g09d2 From 5aea0893a03648efe27025f88d6b98cd48129869 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 9 Mar 2016 18:02:13 +1100 Subject: Use type-safe printf for core_file and emu_file, surprisingly few knock-on effects Properly fix up a couple of places I64FMT was being used, still more to deal with --- src/devices/sound/discrete.cpp | 17 ++++++++--------- src/devices/sound/esqpump.cpp | 10 +++++----- src/emu/cheat.cpp | 3 +++ src/emu/cheat.h | 2 +- src/emu/fileio.cpp | 19 ++----------------- src/emu/fileio.h | 7 +++++-- src/lib/util/corefile.cpp | 36 +++++++++++++----------------------- src/lib/util/corefile.h | 9 ++++++--- src/mame/drivers/ssem.cpp | 41 ++++++++++++++++++++++++----------------- src/tools/chdman.cpp | 33 ++++++++++++++------------------- 10 files changed, 81 insertions(+), 96 deletions(-) (limited to 'src') diff --git a/src/devices/sound/discrete.cpp b/src/devices/sound/discrete.cpp index dc66910707f..e09c47c9bf0 100644 --- a/src/devices/sound/discrete.cpp +++ b/src/devices/sound/discrete.cpp @@ -39,6 +39,7 @@ #include "sound/wavwrite.h" #include "discrete.h" #include +#include /* for_each collides with c++ standard libraries - include it here */ #define for_each(_T, _e, _l) for (_T _e = (_l)->begin_ptr() ; _e <= (_l)->end_ptr(); _e++) @@ -647,15 +648,15 @@ void discrete_device::display_profiling(void) total = list_run_time(m_node_list); count = m_node_list.count(); /* print statistics */ - printf("%s",string_format("Total Samples : %16I64d\n", m_total_samples).c_str()); + util::stream_format(std::cout, "Total Samples : %16d\n", m_total_samples); tresh = total / count; - printf("%s",string_format("Threshold (mean): %16I64d\n", tresh / m_total_samples).c_str()); + util::stream_format(std::cout, "Threshold (mean): %16d\n", tresh / m_total_samples ); for_each(discrete_base_node **, node, &m_node_list) { discrete_step_interface *step; if ((*node)->interface(step)) if (step->run_time > tresh) - printf("%3d: %20s %8.2f %10.2f\n", (*node)->index(), (*node)->module_name(), (double) step->run_time / (double) total * 100.0, ((double) step->run_time) / (double) m_total_samples); + util::stream_format(std::cout, "%3d: %20s %8.2f %10.2f\n", (*node)->index(), (*node)->module_name(), double(step->run_time) / double(total) * 100.0, double(step->run_time) / double(m_total_samples)); } /* Task information */ @@ -663,10 +664,10 @@ void discrete_device::display_profiling(void) { tt = step_list_run_time((*task)->step_list); - printf("Task(%d): %8.2f %15.2f\n", (*task)->task_group, tt / (double) total * 100.0, tt / (double) m_total_samples); + util::stream_format(std::cout, "Task(%d): %8.2f %15.2f\n", (*task)->task_group, tt / double(total) * 100.0, tt / double(m_total_samples)); } - printf("Average samples/double->update: %8.2f\n", (double) m_total_samples / (double) m_total_stream_updates); + util::stream_format(std::cout, "Average samples/double->update: %8.2f\n", double(m_total_samples) / double(m_total_stream_updates)); } @@ -737,7 +738,7 @@ void discrete_device::init_nodes(const sound_block_list_t &block_list) task->task_group = block->initial[0]; if (task->task_group < 0 || task->task_group >= DISCRETE_MAX_TASK_GROUPS) fatalerror("discrete_dso_task: illegal task_group %d\n", task->task_group); - //printf("task group %d\n", task->task_group); + //util::stream_format(std::cout, "task group %d\n", task->task_group); task_list.add(task); } break; @@ -870,7 +871,6 @@ void discrete_device::device_start() //m_stream = machine().sound().stream_alloc(*this, 0, 2, 22257); const discrete_block *intf_start = m_intf; - char name[128]; /* If a clock is specified we will use it, otherwise run at the audio sample rate. */ if (this->clock()) @@ -884,9 +884,8 @@ void discrete_device::device_start() m_total_stream_updates = 0; /* create the logfile */ - sprintf(name, "discrete%s.log", this->tag()); if (DISCRETE_DEBUGLOG) - m_disclogfile = fopen(name, "w"); + m_disclogfile = fopen(util::string_format("discrete%s.log", this->tag()).c_str(), "w"); /* enable profiling */ m_profiling = 0; diff --git a/src/devices/sound/esqpump.cpp b/src/devices/sound/esqpump.cpp index e9ad6cedf85..9873029e056 100644 --- a/src/devices/sound/esqpump.cpp +++ b/src/devices/sound/esqpump.cpp @@ -112,7 +112,7 @@ void esq_5505_5510_pump::sound_stream_update(sound_stream &stream, stream_sample e[(ei + 0x1d0f) % 0x4000] = e_next; if (l != e[ei]) { - fprintf(stderr, "expected (%d) but have (%d)\n", e[ei], l); + util::stream_format(std::cerr, "expected (%d) but have (%d)\n", e[ei], l); } ei = (ei + 1) % 0x4000; #endif @@ -133,9 +133,9 @@ void esq_5505_5510_pump::sound_stream_update(sound_stream &stream, stream_sample bool silence = silent_for >= 500; if (was_silence != silence) { if (!silence) { - fprintf(stderr, ".-*\n"); + util::stream_format(std::cerr, ".-*\n"); } else { - fprintf(stderr, "*-.\n"); + util::stream_format(std::cerr, "*-.\n"); } was_silence = silence; } @@ -148,7 +148,7 @@ void esq_5505_5510_pump::sound_stream_update(sound_stream &stream, stream_sample { osd_ticks_t elapsed = now - last_ticks; osd_ticks_t tps = osd_ticks_per_second(); - fprintf(stderr, "%s",string_format("Pump: %d samples in %I64d ticks for %f Hz\n", last_samples, elapsed, last_samples * (double)tps / (double)elapsed).c_str()); + util::stream_format(std::cerr, "Pump: %d samples in %d ticks for %f Hz\n", last_samples, elapsed, last_samples * (double)tps / (double)elapsed); last_ticks = now; while (next_report_ticks <= now) { next_report_ticks += tps; @@ -156,7 +156,7 @@ void esq_5505_5510_pump::sound_stream_update(sound_stream &stream, stream_sample last_samples = 0; #if !PUMP_FAKE_ESP_PROCESSING - fprintf(stderr, "%s",string_format(" ESP spent %I64d ticks on %d samples, %f ticks per sample\n", ticks_spent_processing, samples_processed, (double)ticks_spent_processing / (double)samples_processed).c_str()); + util::stream_format(std::cerr, " ESP spent %d ticks on %d samples, %f ticks per sample\n", ticks_spent_processing, samples_processed, (double)ticks_spent_processing / (double)samples_processed); ticks_spent_processing = 0; samples_processed = 0; #endif diff --git a/src/emu/cheat.cpp b/src/emu/cheat.cpp index 6b24b22fc35..0a799ca6f13 100644 --- a/src/emu/cheat.cpp +++ b/src/emu/cheat.cpp @@ -1031,6 +1031,9 @@ std::unique_ptr &cheat_entry::script_for_state(script_state state) // CHEAT MANAGER //************************************************************************** +const int cheat_manager::CHEAT_VERSION; + + //------------------------------------------------- // cheat_manager - constructor //------------------------------------------------- diff --git a/src/emu/cheat.h b/src/emu/cheat.h index 6badabd14d6..20772e25640 100644 --- a/src/emu/cheat.h +++ b/src/emu/cheat.h @@ -329,7 +329,7 @@ private: symbol_table m_symtable; // global symbol table // constants - static const int CHEAT_VERSION = 1; + static constexpr int CHEAT_VERSION = 1; }; diff --git a/src/emu/fileio.cpp b/src/emu/fileio.cpp index 23f21f8b9b7..79bf746fbfa 100644 --- a/src/emu/fileio.cpp +++ b/src/emu/fileio.cpp @@ -617,25 +617,10 @@ int emu_file::puts(const char *s) // vfprintf - vfprintf to a text file //------------------------------------------------- -int emu_file::vprintf(const char *fmt, va_list va) +int emu_file::vprintf(util::format_argument_pack const &args) { // write the data if we can - return (m_file) ? m_file->vprintf(fmt, va) : 0; -} - - -//------------------------------------------------- -// printf - vfprintf to a text file -//------------------------------------------------- - -int CLIB_DECL emu_file::printf(const char *fmt, ...) -{ - int rc; - va_list va; - va_start(va, fmt); - rc = vprintf(fmt, va); - va_end(va); - return rc; + return m_file ? m_file->vprintf(args) : 0; } diff --git a/src/emu/fileio.h b/src/emu/fileio.h index 9a65349614f..22f36f5362e 100644 --- a/src/emu/fileio.h +++ b/src/emu/fileio.h @@ -135,8 +135,11 @@ public: // writing UINT32 write(const void *buffer, UINT32 length); int puts(const char *s); - int vprintf(const char *fmt, va_list va); - int printf(const char *fmt, ...) ATTR_PRINTF(2,3); + int vprintf(util::format_argument_pack const &args); + template int printf(Format &&fmt, Params &&...args) + { + return vprintf(util::make_format_argument_pack(std::forward(fmt), std::forward(args)...)); + } // buffers void flush(); diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp index b4a246d81f6..fd98c8be59f 100644 --- a/src/lib/util/corefile.cpp +++ b/src/lib/util/corefile.cpp @@ -8,14 +8,15 @@ ***************************************************************************/ -#include - #include "corefile.h" + #include "unicode.h" +#include "vecstream.h" + #include #include -#include +#include #include #include @@ -157,7 +158,7 @@ public: virtual std::uint32_t write(const void *buffer, std::uint32_t length) override { return m_file.write(buffer, length); } virtual int puts(const char *s) override { return m_file.puts(s); } - virtual int vprintf(const char *fmt, va_list va) override { return m_file.vprintf(fmt, va); } + virtual int vprintf(util::format_argument_pack const &args) override { return m_file.vprintf(args); } virtual file_error truncate(std::uint64_t offset) override { return m_file.truncate(offset); } virtual file_error flush() override { return m_file.flush(); } @@ -184,7 +185,7 @@ public: virtual int ungetc(int c) override; virtual char *gets(char *s, int n) override; virtual int puts(char const *s) override; - virtual int vprintf(char const *fmt, va_list va) override; + virtual int vprintf(util::format_argument_pack const &args) override; protected: core_text_file(std::uint32_t openflags) @@ -192,6 +193,7 @@ protected: , m_text_type(text_file_type::OSD) , m_back_char_head(0) , m_back_char_tail(0) + , m_printf_buffer() { } @@ -208,6 +210,7 @@ private: char m_back_chars[UTF8_CHAR_MAX]; // buffer to hold characters for ungetc int m_back_char_head; // head of ungetc buffer int m_back_char_tail; // tail of ungetc buffer + ovectorstream m_printf_buffer; // persistent buffer for formatted output }; @@ -608,11 +611,12 @@ int core_text_file::puts(char const *s) vprintf - vfprintf to a text file -------------------------------------------------*/ -int core_text_file::vprintf(char const *fmt, va_list va) +int core_text_file::vprintf(util::format_argument_pack const &args) { - char buf[1024]; - vsnprintf(buf, sizeof(buf), fmt, va); - return puts(buf); + m_printf_buffer.seekp(0, ovectorstream::beg); + util::stream_format(m_printf_buffer, args); + m_printf_buffer.put('\0'); + return puts(&m_printf_buffer.vec()[0]); } @@ -1248,20 +1252,6 @@ file_error core_file::load(char const *filename, dynamic_buffer &data) } -/*------------------------------------------------- - printf - printf to a text file --------------------------------------------------*/ - -int CLIB_DECL core_file::printf(char const *fmt, ...) -{ - va_list va; - va_start(va, fmt); - auto const rc = vprintf(fmt, va); - va_end(va); - return rc; -} - - /*------------------------------------------------- protected constructor -------------------------------------------------*/ diff --git a/src/lib/util/corefile.h b/src/lib/util/corefile.h index a5837e6de21..7ec76af7cb5 100644 --- a/src/lib/util/corefile.h +++ b/src/lib/util/corefile.h @@ -13,9 +13,9 @@ #ifndef __COREFILE_H__ #define __COREFILE_H__ -#include #include "corestr.h" #include "coretmpl.h" +#include "strformat.h" #include #include @@ -114,8 +114,11 @@ public: virtual int puts(const char *s) = 0; // printf-style text write to a file - virtual int vprintf(const char *fmt, va_list va) = 0; - int CLIB_DECL printf(const char *fmt, ...) ATTR_PRINTF(2,3); + virtual int vprintf(util::format_argument_pack const &args) = 0; + template int printf(Format &&fmt, Params &&...args) + { + return vprintf(util::make_format_argument_pack(std::forward(fmt), std::forward(args)...)); + } // file truncation virtual file_error truncate(std::uint64_t offset) = 0; diff --git a/src/mame/drivers/ssem.cpp b/src/mame/drivers/ssem.cpp index 2fdc6eefebe..a35cb104d92 100644 --- a/src/mame/drivers/ssem.cpp +++ b/src/mame/drivers/ssem.cpp @@ -18,21 +18,29 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_store(*this, "store"), - m_screen(*this, "screen") { } - - required_device m_maincpu; - required_shared_ptr m_store; - required_device m_screen; + m_screen(*this, "screen") + { + } - UINT8 m_store_line; virtual void machine_start() override; virtual void machine_reset() override; UINT32 screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_INPUT_CHANGED_MEMBER(panel_check); DECLARE_QUICKLOAD_LOAD_MEMBER(ssem_store); inline UINT32 reverse(UINT32 v); - void glyph_print(bitmap_rgb32 &bitmap, INT32 x, INT32 y, const char *msg, ...) ATTR_PRINTF(5,6); void strlower(char *buf); + +private: + template + void glyph_print(bitmap_rgb32 &bitmap, INT32 x, INT32 y, Format &&fmt, Params &&...args); + + required_device m_maincpu; + required_shared_ptr m_store; + required_device m_screen; + + UINT8 m_store_line; + + util::ovectorstream m_glyph_print_buf; }; @@ -403,20 +411,18 @@ static const UINT8 char_glyphs[0x80][8] = { 0xff, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xff }, }; -void ssem_state::glyph_print(bitmap_rgb32 &bitmap, INT32 x, INT32 y, const char *msg, ...) +template +void ssem_state::glyph_print(bitmap_rgb32 &bitmap, INT32 x, INT32 y, Format &&fmt, Params &&...args) { - va_list arg_list; - char buf[32768]; - INT32 index = 0; const rectangle &visarea = m_screen->visible_area(); - va_start( arg_list, msg ); - vsprintf( buf, msg, arg_list ); - va_end( arg_list ); + m_glyph_print_buf.seekp(0, util::ovectorstream::beg); + util::stream_format(m_glyph_print_buf, std::forward(fmt), std::forward(args)...); + m_glyph_print_buf.put('\0'); - for(index = 0; index < strlen(buf) && index < 32768; index++) + for(char const *buf = &m_glyph_print_buf.vec()[0]; *buf; buf++) { - UINT8 cur = (UINT8)buf[index]; + UINT8 cur = UINT8(*buf); if(cur < 0x80) { INT32 line = 0; @@ -493,7 +499,7 @@ UINT32 ssem_state::screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitma (m_store[(m_store_line << 2) | 1] << 16) | (m_store[(m_store_line << 2) | 2] << 8) | (m_store[(m_store_line << 2) | 3] << 0)); - glyph_print(bitmap, 0, 272, "%s",string_format("LINE:%02d VALUE:%08x HALT:%I64d", m_store_line, word, m_maincpu->state_int(SSEM_HALT)).c_str()); + glyph_print(bitmap, 0, 272, "LINE:%02u VALUE:%08x HALT:%d", m_store_line, word, m_maincpu->state_int(SSEM_HALT)); return 0; } @@ -609,6 +615,7 @@ QUICKLOAD_LOAD_MEMBER(ssem_state, ssem_store) void ssem_state::machine_start() { save_item(NAME(m_store_line)); + m_glyph_print_buf.reserve(1024); } void ssem_state::machine_reset() diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp index 0358a4c5620..1a80bc76e13 100644 --- a/src/tools/chdman.cpp +++ b/src/tools/chdman.cpp @@ -23,8 +23,10 @@ #include #include #include -#include + +#include #include +#include @@ -105,7 +107,7 @@ const int MODE_GDI = 2; typedef std::unordered_map parameters_t; -static void report_error(int error, const char *format, ...) ATTR_PRINTF(2,3); +template static void report_error(int error, Format &&fmt, Params &&...args); static void do_info(parameters_t ¶ms); static void do_verify(parameters_t ¶ms); static void do_create_raw(parameters_t ¶ms); @@ -727,15 +729,11 @@ static const command_description s_commands[] = // report_error - report an error //------------------------------------------------- -static void report_error(int error, const char *format, ...) +template static void report_error(int error, Format &&fmt, Params &&...args) { // output to stderr - va_list arg; - va_start(arg, format); - vfprintf(stderr, format, arg); - fflush(stderr); - va_end(arg); - fprintf(stderr, "\n"); + util::stream_format(std::cerr, std::forward(fmt), std::forward(args)...); + std::cerr << std::endl; // reset time for progress and return the error lastprogress = 0; @@ -747,7 +745,7 @@ static void report_error(int error, const char *format, ...) // progress - generic progress callback //------------------------------------------------- -static void ATTR_PRINTF(2,3) progress(bool forceit, const char *format, ...) +template static void progress(bool forceit, Format &&fmt, Params &&...args) { // skip if it hasn't been long enough clock_t curtime = clock(); @@ -756,11 +754,8 @@ static void ATTR_PRINTF(2,3) progress(bool forceit, const char *format, ...) lastprogress = curtime; // standard vfprintf stuff here - va_list arg; - va_start(arg, format); - vfprintf(stderr, format, arg); - fflush(stderr); - va_end(arg); + util::stream_format(std::cerr, std::forward(fmt), std::forward(args)...); + std::cerr << std::flush; } @@ -1237,7 +1232,7 @@ void output_track_metadata(int mode, util::core_file &file, int tracknum, const break; } bool needquote = strchr(filename, ' ') != nullptr; - file.printf("%s",string_format("%d %d %d %d %s%s%s %I64d\n", tracknum+1, frameoffs, mode, size, needquote?"\"":"", filename, needquote?"\"":"", discoffs).c_str()); + file.printf("%d %d %d %d %s%s%s %d\n", tracknum+1, frameoffs, mode, size, needquote?"\"":"", filename, needquote?"\"":"", discoffs); } else if (mode == MODE_CUEBIN) { @@ -2598,7 +2593,7 @@ static void do_extract_ld(parameters_t ¶ms) if (err != CHDERR_NONE) { UINT64 filepos = static_cast(input_chd).tell(); - report_error(1, "%s",string_format("Error reading hunk %I64d at offset %I64d from CHD file (%s): %s\n", framenum, filepos, params.find(OPTION_INPUT)->second->c_str(), chd_file::error_string(err)).c_str()); + report_error(1, "Error reading hunk %d at offset %d from CHD file (%s): %s\n", framenum, filepos, params.find(OPTION_INPUT)->second->c_str(), chd_file::error_string(err)); } // write audio @@ -2606,7 +2601,7 @@ static void do_extract_ld(parameters_t ¶ms) { avi_error avierr = avi_append_sound_samples(output_file, chnum, avconfig.audio[chnum], actsamples, 0); if (avierr != AVIERR_NONE) - report_error(1, "%s",string_format("Error writing samples for hunk %I64d to file (%s): %s\n", framenum, output_file_str->second->c_str(), avi_error_string(avierr)).c_str()); + report_error(1, "Error writing samples for hunk %d to file (%s): %s\n", framenum, output_file_str->second->c_str(), avi_error_string(avierr)); } // write video @@ -2614,7 +2609,7 @@ static void do_extract_ld(parameters_t ¶ms) { avi_error avierr = avi_append_video_frame(output_file, fullbitmap); if (avierr != AVIERR_NONE) - report_error(1, "%s",string_format("Error writing video for hunk %I64d to file (%s): %s\n", framenum, output_file_str->second->c_str(), avi_error_string(avierr)).c_str()); + report_error(1, "Error writing video for hunk %d to file (%s): %s\n", framenum, output_file_str->second->c_str(), avi_error_string(avierr)); } } -- cgit v1.2.3-70-g09d2 From c126878b838be9d7108b878f752219cb9deaecbf Mon Sep 17 00:00:00 2001 From: David Haywood Date: Wed, 9 Mar 2016 14:53:24 +0000 Subject: new clones Last Resort (prototype) [Chris Ransley] --- src/mame/drivers/neogeo_noslot.cpp | 30 ++++++++++++++++++++++++++++++ src/mame/mame.lst | 1 + 2 files changed, 31 insertions(+) (limited to 'src') diff --git a/src/mame/drivers/neogeo_noslot.cpp b/src/mame/drivers/neogeo_noslot.cpp index d6e7eccd327..f3f79953c03 100644 --- a/src/mame/drivers/neogeo_noslot.cpp +++ b/src/mame/drivers/neogeo_noslot.cpp @@ -1310,6 +1310,35 @@ ROM_START( lresort ) ROM_LOAD16_BYTE( "024-c4.c4", 0x200001, 0x080000, CRC(7382fefb) SHA1(e916dec5bb5462eb9ae9711f08c7388937abb980) ) /* Plane 2,3 */ /* TC534200 */ ROM_END +ROM_START( lresortp ) /* prototype - all roms were hand labeled with CRCs */ + ROM_REGION( 0x100000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "024_p1_5937.bin", 0x000001, 0x080000, CRC(8e6008ee) SHA1(6779663118782207156dc9fa9e24e81e30c6391c) ) + ROM_LOAD16_BYTE( "024_p2_8d37.bin", 0x000000, 0x080000, CRC(6d9ee90f) SHA1(ecd42182988092417bc96db8301ea408e47735f2) ) + + NEO_SFIX_128K( "024_s1_22fe.bin", CRC(5cef5cc6) SHA1(9ec305007bdb356e9f8f279beae5e2bcb3f2cf7b) ) + + NEO_BIOS_AUDIO_128K( "024_m1_fc7a.bin", CRC(22122875) SHA1(540c21559163381467679f836cb068adaf526659) ) + + ROM_REGION( 0x200000, "ymsnd", 0 ) + ROM_LOAD( "024_v11_b085.bin", 0x000000, 0x080000, CRC(0722da38) SHA1(66a9b463d5277908b3a01c03de82b3de9118f2cb) ) // 024_v11_b085.bin 024-v1.v1 [1/2] IDENTICAL + ROM_LOAD( "024_v12_d3b7.bin", 0x080000, 0x080000, CRC(670ce3ec) SHA1(9004aa85d4a9b0ecf9cf9357b073ed55a98fdb02) ) // 024_v12_d3b7.bin 024-v1.v1 [2/2] IDENTICAL + ROM_LOAD( "024_v13_a31e.bin", 0x100000, 0x080000, CRC(2e39462b) SHA1(b0a9b1a3377bf0369f3020192505c46ca52927d6) ) // 024_v13_a31e.bin 024-v2.v2 [1/2] IDENTICAL + ROM_LOAD( "024_v24_2f0f.bin", 0x180000, 0x080000, CRC(7944754f) SHA1(d42a46c5127c6c62041ebffb0007af8a24abd360) ) // 024_v24_2f0f.bin 024-v2.v2 [2/2] IDENTICAL + + NO_DELTAT_REGION + + ROM_REGION( 0x400000, "sprites", 0 ) // note, ROM_LOAD32_BYTE + ROM_LOAD32_BYTE( "024_c1_b764.bin", 0x000000, 0x80000, CRC(677749ec) SHA1(6f94675e037956a380652ab1056e6f1dec605bec) ) /* Plane 0 */ + ROM_LOAD32_BYTE( "024_c2_1951.bin", 0x000002, 0x80000, CRC(104d7b59) SHA1(404e8776ee8df4ca282eb7b747759af8628ddca1) ) /* Plane 2 */ + ROM_LOAD32_BYTE( "024_c3_0f63.bin", 0x000001, 0x80000, CRC(b0965a74) SHA1(e8026dd4f722ccab9c913261d09ab8843ef56a0e) ) /* Plane 1 */ + ROM_LOAD32_BYTE( "024_c4_c5b5.bin", 0x000003, 0x80000, CRC(dcfc3860) SHA1(8443b455ae8de656adab57f3b7e68919f22d3b9d) ) /* Plane 3 */ + ROM_LOAD32_BYTE( "024_c5_dd03.bin", 0x200000, 0x80000, CRC(50322397) SHA1(3308fbe48ad165b9894a52fc3a8d9898bbbc0c0e) ) /* Plane 0 */ + ROM_LOAD32_BYTE( "024_c6_c81a.bin", 0x200002, 0x80000, CRC(c3c93894) SHA1(f23b9d7e2b54d44c96370dde282bdf45cebd9cba) ) /* Plane 2 */ + ROM_LOAD32_BYTE( "024_c7_5edc.bin", 0x200001, 0x80000, CRC(21faf72b) SHA1(00bf257b06180ae6ede57744cea6257b3488d9f0) ) /* Plane 1 */ + ROM_LOAD32_BYTE( "024_c8_0850.bin", 0x200003, 0x80000, CRC(fb57217b) SHA1(607a98da754e8b1dd94a6432b21a36cc38e06a0f) ) /* Plane 3 */ +ROM_END + + /**************************************** ID-0025 . NGM-025 @@ -9638,6 +9667,7 @@ GAME( 1990, joyjoy, neogeo, neogeo_noslot, neogeo, neogeo_state, neoge GAME( 1991, quizdais, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Quiz Daisousa Sen - The Last Count Down (NGM-023)(NGH-023)", MACHINE_SUPPORTS_SAVE ) GAME( 1991, quizdaisk, quizdais, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Quiz Daisousa Sen - The Last Count Down (Korean release)", MACHINE_SUPPORTS_SAVE ) GAME( 1992, lresort, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Last Resort", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, lresortp, lresort, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Last Resort (prototype)", MACHINE_SUPPORTS_SAVE ) GAME( 1991, eightman, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK / Pallas", "Eight Man (NGM-025)(NGH-025)", MACHINE_SUPPORTS_SAVE ) GAME( 1991, legendos, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Legend of Success Joe / Ashita no Joe Densetsu", MACHINE_SUPPORTS_SAVE ) GAME( 1991, 2020bb, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK / Pallas", "2020 Super Baseball (set 1)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 2a4af9dc401..cf4b493004b 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -28065,6 +28065,7 @@ lastsold // 0196 Censored Korean release of lastblad lbowling // 0019 (c) 1990 SNK legendos // 0029 (c) 1991 SNK lresort // 0024 (c) 1992 SNK +lresortp // prototype magdrop2 // 0221 (c) 1996 Data East Corporation magdrop3 // 0233 (c) 1997 Data East Corporation maglord // 0005 (c) 1990 Alpha Denshi Co. -- cgit v1.2.3-70-g09d2 From 8dad674507a9e8d5ae6e3cb23df717ea0c41443b Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Thu, 10 Mar 2016 04:41:08 +1100 Subject: Allow seek to position 0 in a vectorstream with empty storage, always reserve 1k for core_file printf buffer --- src/lib/util/corefile.cpp | 1 + src/lib/util/vecstream.h | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp index fd98c8be59f..64169a606fc 100644 --- a/src/lib/util/corefile.cpp +++ b/src/lib/util/corefile.cpp @@ -613,6 +613,7 @@ int core_text_file::puts(char const *s) int core_text_file::vprintf(util::format_argument_pack const &args) { + m_printf_buffer.reserve(1024); m_printf_buffer.seekp(0, ovectorstream::beg); util::stream_format(m_printf_buffer, args); m_printf_buffer.put('\0'); diff --git a/src/lib/util/vecstream.h b/src/lib/util/vecstream.h index 498e35eac5e..bf144501253 100644 --- a/src/lib/util/vecstream.h +++ b/src/lib/util/vecstream.h @@ -116,7 +116,7 @@ public: void reserve(typename vector_type::size_type size) { - if ((m_mode & std::ios_base::out) && (m_storage.size() < size)) + if ((m_mode & std::ios_base::out) && (m_storage.capacity() < size)) { m_storage.reserve(size); adjust(); @@ -150,8 +150,8 @@ protected: bool const out(which & std::ios_base::out); if ((!in && !out) || (in && out && (std::ios_base::cur == dir)) || - (in && (!(m_mode & std::ios_base::in) || !this->gptr())) || - (out && (!(m_mode & std::ios_base::out) || !this->pptr()))) + (in && !(m_mode & std::ios_base::in)) || + (out && !(m_mode & std::ios_base::out))) { return pos_type(off_type(-1)); } -- cgit v1.2.3-70-g09d2 From 017be62bdcea3e8a76534594839cb01ea8ed7a51 Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Wed, 9 Mar 2016 15:06:32 -0300 Subject: New clones marked as NOT_WORKING -------------------------------- Super Poker (v114IT) [Mirko Buffoni, Roberto Fresca] Super Poker (v116IT-MX) [MiX, Roberto Fresca] --- src/mame/drivers/spoker.cpp | 57 +++++++++++++++++++++++++++++++++++++-------- src/mame/mame.lst | 4 +++- 2 files changed, 50 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/spoker.cpp b/src/mame/drivers/spoker.cpp index 2814ba39bd3..cd1652f1b25 100644 --- a/src/mame/drivers/spoker.cpp +++ b/src/mame/drivers/spoker.cpp @@ -623,6 +623,24 @@ ROM_START( spk116it ) ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) ROM_END +ROM_START( spk116ita ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "v_v116it_mx.bin", 0x0000, 0x10000, CRC(f84eefe3) SHA1(9b3acde4f8f5f635155ed132c10d11bf609da2dd) ) + + ROM_REGION( 0xc0000, "gfx1", 0 ) + ROM_LOAD( "6.bin", 0x80000, 0x40000, CRC(55b54b11) SHA1(decf27d40ec842374af02c93d761375690be83a3) ) + ROM_LOAD( "5.bin", 0x40000, 0x40000, CRC(163f5b64) SHA1(5d3a5c2a64691ee9e2bb3a7c283aa9efa53fb35e) ) + ROM_LOAD( "4.bin", 0x00000, 0x40000, CRC(ec2c6ac3) SHA1(e0a38da26202d2b9a481060fe5b88a38e284201e) ) + + ROM_REGION( 0x30000, "gfx2", 0 ) + ROM_LOAD( "3.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) + ROM_LOAD( "2.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) + ROM_LOAD( "1.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) + + ROM_REGION( 0x40000, "oki", 0 ) /* expansion rom - contains backgrounds and pictures charmaps */ + ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) +ROM_END + ROM_START( spk115it ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "v.bin", 0x0000, 0x10000, CRC(df52997b) SHA1(72a76e84aeedfdebd4c6cb47809117a28b5d3892) ) // sldh @@ -641,6 +659,23 @@ ROM_START( spk115it ) ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) ROM_END +ROM_START( spk114it ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "v_v114it.bin", 0x0000, 0x10000, CRC(471f5d97) SHA1(94781fb7bd8e9633fafca72de41113c3f21fbf4e) ) + + ROM_REGION( 0xc0000, "gfx1", 0 ) + ROM_LOAD( "6_v114it.bin", 0x80000, 0x40000, CRC(466cec74) SHA1(6e4fe56a55f1e230eb01266c67cc82a87f6aaec6) ) + ROM_LOAD( "5_v114it.bin", 0x40000, 0x40000, CRC(ae32a620) SHA1(d5238628269050e21da31d628b1d80b0f9b2d251) ) + ROM_LOAD( "4_v114it.bin", 0x00000, 0x40000, CRC(c2105b1c) SHA1(cd2a930e9c15d1fdcc02ce87c109b5b4107430fa) ) + + ROM_REGION( 0x30000, "gfx2", 0 ) + ROM_FILL( 0x0000, 0x30000, 0xff ) /* filling the whole bank */ + + ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ + ROM_LOAD( "7_v114it.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) +ROM_END + + /* Super Poker (IGS) US & UA versions. @@ -806,7 +841,7 @@ DRIVER_INIT_MEMBER(spoker_state, spk116it) UINT8 *rom = memregion("maincpu")->base(); - for (A = 0;A < 0x10000;A++) + for (A = 0; A < 0x10000; A++) { rom[A] ^= 0x02; if ((A & 0x0208) == 0x0208) rom[A] ^= 0x20; @@ -858,12 +893,14 @@ DRIVER_INIT_MEMBER(spoker_state, 3super8) Game Drivers ***************************************************************************/ -/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ -GAME( 1993?, spk116it, 0, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v116IT)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, spk115it, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v115IT)", MACHINE_SUPPORTS_SAVE ) -GAME( 1996, spk306us, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v306US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, spk205us, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v205US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, spk203us, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v203US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, spk200ua, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v200UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, spk102ua, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v102UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, 3super8, spk116it, 3super8, 3super8, spoker_state, 3super8, ROT0, "", "3 Super 8 (Italy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) //roms are badly dumped +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ +GAME( 1993?, spk116it, 0, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v116IT)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993?, spk116ita, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v116IT-MX)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1993?, spk115it, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v115IT)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993?, spk114it, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v114IT)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1996, spk306us, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v306US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1996, spk205us, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v205US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1996, spk203us, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v203US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1996, spk200ua, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v200UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1996, spk102ua, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v102UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1993?, 3super8, spk116it, 3super8, 3super8, spoker_state, 3super8, ROT0, "", "3 Super 8 (Italy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) //roms are badly dumped diff --git a/src/mame/mame.lst b/src/mame/mame.lst index f346939c176..c73f5fca016 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -33118,8 +33118,10 @@ spss4240 // @source:spoker.cpp 3super8 // unknown -spk115it // (c) 199? IGS spk116it // (c) 199? IGS +spk116ita // (c) 199? IGS +spk115it // (c) 199? IGS +spk114it // (c) 199? IGS spk306us // (c) 1996 IGS spk205us // (c) 1996 IGS spk203us // (c) 1996 IGS -- cgit v1.2.3-70-g09d2 From 3b6a8df4d98d2226c3d3e89dadf2b9a09d509711 Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Wed, 9 Mar 2016 15:36:05 -0300 Subject: Super Poker: Reparent all sets. --- src/mame/drivers/spoker.cpp | 167 ++++++++++++++++++++++---------------------- src/mame/mame.lst | 10 +-- 2 files changed, 90 insertions(+), 87 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/spoker.cpp b/src/mame/drivers/spoker.cpp index cd1652f1b25..e828b593da4 100644 --- a/src/mame/drivers/spoker.cpp +++ b/src/mame/drivers/spoker.cpp @@ -605,77 +605,6 @@ MACHINE_CONFIG_END ROMs load ***************************************************************************/ -ROM_START( spk116it ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "v.bin", 0x0000, 0x10000, CRC(e44e943a) SHA1(78e32d07e2be9a452be10735641cbcf269068c55) ) - - ROM_REGION( 0xc0000, "gfx1", 0 ) - ROM_LOAD( "6.bin", 0x80000, 0x40000, CRC(55b54b11) SHA1(decf27d40ec842374af02c93d761375690be83a3) ) - ROM_LOAD( "5.bin", 0x40000, 0x40000, CRC(163f5b64) SHA1(5d3a5c2a64691ee9e2bb3a7c283aa9efa53fb35e) ) - ROM_LOAD( "4.bin", 0x00000, 0x40000, CRC(ec2c6ac3) SHA1(e0a38da26202d2b9a481060fe5b88a38e284201e) ) - - ROM_REGION( 0x30000, "gfx2", 0 ) - ROM_LOAD( "3.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) - ROM_LOAD( "2.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) - ROM_LOAD( "1.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) - - ROM_REGION( 0x40000, "oki", 0 ) /* expansion rom - contains backgrounds and pictures charmaps */ - ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) -ROM_END - -ROM_START( spk116ita ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "v_v116it_mx.bin", 0x0000, 0x10000, CRC(f84eefe3) SHA1(9b3acde4f8f5f635155ed132c10d11bf609da2dd) ) - - ROM_REGION( 0xc0000, "gfx1", 0 ) - ROM_LOAD( "6.bin", 0x80000, 0x40000, CRC(55b54b11) SHA1(decf27d40ec842374af02c93d761375690be83a3) ) - ROM_LOAD( "5.bin", 0x40000, 0x40000, CRC(163f5b64) SHA1(5d3a5c2a64691ee9e2bb3a7c283aa9efa53fb35e) ) - ROM_LOAD( "4.bin", 0x00000, 0x40000, CRC(ec2c6ac3) SHA1(e0a38da26202d2b9a481060fe5b88a38e284201e) ) - - ROM_REGION( 0x30000, "gfx2", 0 ) - ROM_LOAD( "3.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) - ROM_LOAD( "2.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) - ROM_LOAD( "1.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) - - ROM_REGION( 0x40000, "oki", 0 ) /* expansion rom - contains backgrounds and pictures charmaps */ - ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) -ROM_END - -ROM_START( spk115it ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "v.bin", 0x0000, 0x10000, CRC(df52997b) SHA1(72a76e84aeedfdebd4c6cb47809117a28b5d3892) ) // sldh - - ROM_REGION( 0xc0000, "gfx1", 0 ) - ROM_LOAD( "6.bin", 0x80000, 0x40000, CRC(f9b027f8) SHA1(c4686a4024062482f9864e0445087e32899fc775) ) // sldh - ROM_LOAD( "5.bin", 0x40000, 0x40000, CRC(baca51b6) SHA1(c97322c814729332378b6304a79062fea385ca97) ) // sldh - ROM_LOAD( "4.bin", 0x00000, 0x40000, CRC(1172c790) SHA1(43f1d019ecae5c605722e3fe77ae2f022b01260b) ) // sldh - - ROM_REGION( 0x30000, "gfx2", 0 ) - ROM_LOAD( "3.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) - ROM_LOAD( "2.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) - ROM_LOAD( "1.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) - - ROM_REGION( 0x40000, "oki", 0 ) /* expansion rom - contains backgrounds and pictures charmaps */ - ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) -ROM_END - -ROM_START( spk114it ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "v_v114it.bin", 0x0000, 0x10000, CRC(471f5d97) SHA1(94781fb7bd8e9633fafca72de41113c3f21fbf4e) ) - - ROM_REGION( 0xc0000, "gfx1", 0 ) - ROM_LOAD( "6_v114it.bin", 0x80000, 0x40000, CRC(466cec74) SHA1(6e4fe56a55f1e230eb01266c67cc82a87f6aaec6) ) - ROM_LOAD( "5_v114it.bin", 0x40000, 0x40000, CRC(ae32a620) SHA1(d5238628269050e21da31d628b1d80b0f9b2d251) ) - ROM_LOAD( "4_v114it.bin", 0x00000, 0x40000, CRC(c2105b1c) SHA1(cd2a930e9c15d1fdcc02ce87c109b5b4107430fa) ) - - ROM_REGION( 0x30000, "gfx2", 0 ) - ROM_FILL( 0x0000, 0x30000, 0xff ) /* filling the whole bank */ - - ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ - ROM_LOAD( "7_v114it.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) -ROM_END - - /* Super Poker (IGS) US & UA versions. @@ -774,6 +703,80 @@ ROM_START( spk102ua ) ROM_LOAD( "mx28f2000p_v102_uasp.u34", 0x0000, 0x40000, CRC(33e6089d) SHA1(cd1ad01e92c18bbeab3fe3ea9152f8b0a3eb1b29) ) ROM_END +/* + Super Poker + Italian sets... +*/ +ROM_START( spk116it ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "v.bin", 0x0000, 0x10000, CRC(e44e943a) SHA1(78e32d07e2be9a452be10735641cbcf269068c55) ) + + ROM_REGION( 0xc0000, "gfx1", 0 ) + ROM_LOAD( "6.bin", 0x80000, 0x40000, CRC(55b54b11) SHA1(decf27d40ec842374af02c93d761375690be83a3) ) + ROM_LOAD( "5.bin", 0x40000, 0x40000, CRC(163f5b64) SHA1(5d3a5c2a64691ee9e2bb3a7c283aa9efa53fb35e) ) + ROM_LOAD( "4.bin", 0x00000, 0x40000, CRC(ec2c6ac3) SHA1(e0a38da26202d2b9a481060fe5b88a38e284201e) ) + + ROM_REGION( 0x30000, "gfx2", 0 ) + ROM_LOAD( "3.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) + ROM_LOAD( "2.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) + ROM_LOAD( "1.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) + + ROM_REGION( 0x40000, "oki", 0 ) /* expansion rom - contains backgrounds and pictures charmaps */ + ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) +ROM_END + +ROM_START( spk116itmx ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "v_v116it_mx.bin", 0x0000, 0x10000, CRC(f84eefe3) SHA1(9b3acde4f8f5f635155ed132c10d11bf609da2dd) ) + + ROM_REGION( 0xc0000, "gfx1", 0 ) + ROM_LOAD( "6.bin", 0x80000, 0x40000, CRC(55b54b11) SHA1(decf27d40ec842374af02c93d761375690be83a3) ) + ROM_LOAD( "5.bin", 0x40000, 0x40000, CRC(163f5b64) SHA1(5d3a5c2a64691ee9e2bb3a7c283aa9efa53fb35e) ) + ROM_LOAD( "4.bin", 0x00000, 0x40000, CRC(ec2c6ac3) SHA1(e0a38da26202d2b9a481060fe5b88a38e284201e) ) + + ROM_REGION( 0x30000, "gfx2", 0 ) + ROM_LOAD( "3.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) + ROM_LOAD( "2.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) + ROM_LOAD( "1.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) + + ROM_REGION( 0x40000, "oki", 0 ) /* expansion rom - contains backgrounds and pictures charmaps */ + ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) +ROM_END + +ROM_START( spk115it ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "v.bin", 0x0000, 0x10000, CRC(df52997b) SHA1(72a76e84aeedfdebd4c6cb47809117a28b5d3892) ) // sldh + + ROM_REGION( 0xc0000, "gfx1", 0 ) + ROM_LOAD( "6.bin", 0x80000, 0x40000, CRC(f9b027f8) SHA1(c4686a4024062482f9864e0445087e32899fc775) ) // sldh + ROM_LOAD( "5.bin", 0x40000, 0x40000, CRC(baca51b6) SHA1(c97322c814729332378b6304a79062fea385ca97) ) // sldh + ROM_LOAD( "4.bin", 0x00000, 0x40000, CRC(1172c790) SHA1(43f1d019ecae5c605722e3fe77ae2f022b01260b) ) // sldh + + ROM_REGION( 0x30000, "gfx2", 0 ) + ROM_LOAD( "3.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) + ROM_LOAD( "2.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) + ROM_LOAD( "1.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) + + ROM_REGION( 0x40000, "oki", 0 ) /* expansion rom - contains backgrounds and pictures charmaps */ + ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) +ROM_END + +ROM_START( spk114it ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "v_v114it.bin", 0x0000, 0x10000, CRC(471f5d97) SHA1(94781fb7bd8e9633fafca72de41113c3f21fbf4e) ) + + ROM_REGION( 0xc0000, "gfx1", 0 ) + ROM_LOAD( "6_v114it.bin", 0x80000, 0x40000, CRC(466cec74) SHA1(6e4fe56a55f1e230eb01266c67cc82a87f6aaec6) ) + ROM_LOAD( "5_v114it.bin", 0x40000, 0x40000, CRC(ae32a620) SHA1(d5238628269050e21da31d628b1d80b0f9b2d251) ) + ROM_LOAD( "4_v114it.bin", 0x00000, 0x40000, CRC(c2105b1c) SHA1(cd2a930e9c15d1fdcc02ce87c109b5b4107430fa) ) + + ROM_REGION( 0x30000, "gfx2", 0 ) + ROM_FILL( 0x0000, 0x30000, 0xff ) /* filling the whole bank */ + + ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ + ROM_LOAD( "7_v114it.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) +ROM_END + /* @@ -893,14 +896,14 @@ DRIVER_INIT_MEMBER(spoker_state, 3super8) Game Drivers ***************************************************************************/ -/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ -GAME( 1993?, spk116it, 0, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v116IT)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, spk116ita, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v116IT-MX)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1993?, spk115it, spk116it, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v115IT)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, spk114it, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v114IT)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1996, spk306us, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v306US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1996, spk205us, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v205US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1996, spk203us, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v203US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1996, spk200ua, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v200UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1996, spk102ua, spk116it, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v102UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1993?, 3super8, spk116it, 3super8, 3super8, spoker_state, 3super8, ROT0, "", "3 Super 8 (Italy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) //roms are badly dumped +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ +GAME( 1996, spk306us, 0, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v306US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1996, spk205us, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v205US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1996, spk203us, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v203US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1996, spk200ua, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v200UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1993?, spk116it, spk306us, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v116IT)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993?, spk116itmx, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v116IT-MX)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1993?, spk115it, spk306us, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v115IT)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993?, spk114it, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v114IT)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1996, spk102ua, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v102UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption +GAME( 1993?, 3super8, 0, 3super8, 3super8, spoker_state, 3super8, ROT0, "", "3 Super 8 (Italy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) //roms are badly dumped diff --git a/src/mame/mame.lst b/src/mame/mame.lst index c73f5fca016..733616754c4 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -33117,16 +33117,16 @@ splash10 // (c) 1992 - Ref 922804 spss4240 // @source:spoker.cpp -3super8 // unknown -spk116it // (c) 199? IGS -spk116ita // (c) 199? IGS -spk115it // (c) 199? IGS -spk114it // (c) 199? IGS spk306us // (c) 1996 IGS spk205us // (c) 1996 IGS spk203us // (c) 1996 IGS spk200ua // (c) 1996 IGS +spk116it // (c) 199? IGS +spk116ita // (c) 199? IGS +spk115it // (c) 199? IGS +spk114it // (c) 199? IGS spk102ua // (c) 1996 IGS +3super8 // unknown @source:spool99.cpp spool99 // (c) 1998 Electronic Projects -- cgit v1.2.3-70-g09d2 From cf70105443eb0e811e9598afd95d541e4b8aa1c0 Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Wed, 9 Mar 2016 19:22:12 -0300 Subject: Renamed some roms and fixed a mistake... --- src/mame/drivers/spoker.cpp | 44 ++++++++++++++++++++++---------------------- src/mame/mame.lst | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/spoker.cpp b/src/mame/drivers/spoker.cpp index e828b593da4..d42a628d1d0 100644 --- a/src/mame/drivers/spoker.cpp +++ b/src/mame/drivers/spoker.cpp @@ -712,17 +712,17 @@ ROM_START( spk116it ) ROM_LOAD( "v.bin", 0x0000, 0x10000, CRC(e44e943a) SHA1(78e32d07e2be9a452be10735641cbcf269068c55) ) ROM_REGION( 0xc0000, "gfx1", 0 ) - ROM_LOAD( "6.bin", 0x80000, 0x40000, CRC(55b54b11) SHA1(decf27d40ec842374af02c93d761375690be83a3) ) - ROM_LOAD( "5.bin", 0x40000, 0x40000, CRC(163f5b64) SHA1(5d3a5c2a64691ee9e2bb3a7c283aa9efa53fb35e) ) - ROM_LOAD( "4.bin", 0x00000, 0x40000, CRC(ec2c6ac3) SHA1(e0a38da26202d2b9a481060fe5b88a38e284201e) ) + ROM_LOAD( "6_v116it.bin", 0x80000, 0x40000, CRC(55b54b11) SHA1(decf27d40ec842374af02c93d761375690be83a3) ) + ROM_LOAD( "5_v116it.bin", 0x40000, 0x40000, CRC(163f5b64) SHA1(5d3a5c2a64691ee9e2bb3a7c283aa9efa53fb35e) ) + ROM_LOAD( "4_v116it.bin", 0x00000, 0x40000, CRC(ec2c6ac3) SHA1(e0a38da26202d2b9a481060fe5b88a38e284201e) ) ROM_REGION( 0x30000, "gfx2", 0 ) - ROM_LOAD( "3.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) - ROM_LOAD( "2.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) - ROM_LOAD( "1.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) + ROM_LOAD( "3_v116it.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) + ROM_LOAD( "2_v116it.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) + ROM_LOAD( "1_v116it.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) ROM_REGION( 0x40000, "oki", 0 ) /* expansion rom - contains backgrounds and pictures charmaps */ - ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) + ROM_LOAD( "7_v116it.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) ROM_END ROM_START( spk116itmx ) @@ -730,35 +730,35 @@ ROM_START( spk116itmx ) ROM_LOAD( "v_v116it_mx.bin", 0x0000, 0x10000, CRC(f84eefe3) SHA1(9b3acde4f8f5f635155ed132c10d11bf609da2dd) ) ROM_REGION( 0xc0000, "gfx1", 0 ) - ROM_LOAD( "6.bin", 0x80000, 0x40000, CRC(55b54b11) SHA1(decf27d40ec842374af02c93d761375690be83a3) ) - ROM_LOAD( "5.bin", 0x40000, 0x40000, CRC(163f5b64) SHA1(5d3a5c2a64691ee9e2bb3a7c283aa9efa53fb35e) ) - ROM_LOAD( "4.bin", 0x00000, 0x40000, CRC(ec2c6ac3) SHA1(e0a38da26202d2b9a481060fe5b88a38e284201e) ) + ROM_LOAD( "6_v116itmx.bin", 0x80000, 0x40000, CRC(55b54b11) SHA1(decf27d40ec842374af02c93d761375690be83a3) ) + ROM_LOAD( "5_v116itmx.bin", 0x40000, 0x40000, CRC(163f5b64) SHA1(5d3a5c2a64691ee9e2bb3a7c283aa9efa53fb35e) ) + ROM_LOAD( "4_v116itmx.bin", 0x00000, 0x40000, CRC(ec2c6ac3) SHA1(e0a38da26202d2b9a481060fe5b88a38e284201e) ) ROM_REGION( 0x30000, "gfx2", 0 ) - ROM_LOAD( "3.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) - ROM_LOAD( "2.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) - ROM_LOAD( "1.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) + ROM_LOAD( "3_v116itmx.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) + ROM_LOAD( "2_v116itmx.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) + ROM_LOAD( "1_v116itmx.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) ROM_REGION( 0x40000, "oki", 0 ) /* expansion rom - contains backgrounds and pictures charmaps */ - ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) + ROM_LOAD( "7_v116itmx.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) ROM_END ROM_START( spk115it ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "v.bin", 0x0000, 0x10000, CRC(df52997b) SHA1(72a76e84aeedfdebd4c6cb47809117a28b5d3892) ) // sldh + ROM_LOAD( "v_v115it.bin", 0x0000, 0x10000, CRC(df52997b) SHA1(72a76e84aeedfdebd4c6cb47809117a28b5d3892) ) // sldh ROM_REGION( 0xc0000, "gfx1", 0 ) - ROM_LOAD( "6.bin", 0x80000, 0x40000, CRC(f9b027f8) SHA1(c4686a4024062482f9864e0445087e32899fc775) ) // sldh - ROM_LOAD( "5.bin", 0x40000, 0x40000, CRC(baca51b6) SHA1(c97322c814729332378b6304a79062fea385ca97) ) // sldh - ROM_LOAD( "4.bin", 0x00000, 0x40000, CRC(1172c790) SHA1(43f1d019ecae5c605722e3fe77ae2f022b01260b) ) // sldh + ROM_LOAD( "6_v115it.bin", 0x80000, 0x40000, CRC(f9b027f8) SHA1(c4686a4024062482f9864e0445087e32899fc775) ) // sldh + ROM_LOAD( "5_v115it.bin", 0x40000, 0x40000, CRC(baca51b6) SHA1(c97322c814729332378b6304a79062fea385ca97) ) // sldh + ROM_LOAD( "4_v115it.bin", 0x00000, 0x40000, CRC(1172c790) SHA1(43f1d019ecae5c605722e3fe77ae2f022b01260b) ) // sldh ROM_REGION( 0x30000, "gfx2", 0 ) - ROM_LOAD( "3.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) - ROM_LOAD( "2.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) - ROM_LOAD( "1.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) + ROM_LOAD( "3_v115it.bin", 0x20000, 0x10000, CRC(5f18b012) SHA1(c9a96237eaf3138f136bbaffb29dde0ef568ce73) ) + ROM_LOAD( "2_v115it.bin", 0x10000, 0x10000, CRC(50fc3505) SHA1(ca1e4ee7e0bb59c3bd67727f65054a48000ae7fe) ) + ROM_LOAD( "1_v115it.bin", 0x00000, 0x10000, CRC(28ce630a) SHA1(9b597073d33841e7db2c68bbe9f30b734d7f7b41) ) ROM_REGION( 0x40000, "oki", 0 ) /* expansion rom - contains backgrounds and pictures charmaps */ - ROM_LOAD( "7.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) + ROM_LOAD( "7_v115it.bin", 0x0000, 0x40000, CRC(67789f1c) SHA1(1bef621b4d6399f76020c6310e2e1c2f861679de) ) ROM_END ROM_START( spk114it ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 733616754c4..f0cec1a2958 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -33122,7 +33122,7 @@ spk205us // (c) 1996 IGS spk203us // (c) 1996 IGS spk200ua // (c) 1996 IGS spk116it // (c) 199? IGS -spk116ita // (c) 199? IGS +spk116itmx // (c) 199? IGS spk115it // (c) 199? IGS spk114it // (c) 199? IGS spk102ua // (c) 1996 IGS -- cgit v1.2.3-70-g09d2 From bf419d7e9c7d6c58041929c813a37fbb569c2c4b Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Wed, 9 Mar 2016 19:45:56 -0300 Subject: OCD... (nw) ;) --- src/mame/mame.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mame/mame.lst b/src/mame/mame.lst index f0cec1a2958..dc534dcefc9 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -33122,7 +33122,7 @@ spk205us // (c) 1996 IGS spk203us // (c) 1996 IGS spk200ua // (c) 1996 IGS spk116it // (c) 199? IGS -spk116itmx // (c) 199? IGS +spk116itmx // (c) 199? IGS spk115it // (c) 199? IGS spk114it // (c) 199? IGS spk102ua // (c) 1996 IGS -- cgit v1.2.3-70-g09d2 From c014845c2e2fda7a56adcd6c6f5901d15fe097f4 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 10 Mar 2016 00:58:57 +0100 Subject: novag6502: added internal layout for supercon --- src/mame/drivers/novag6502.cpp | 176 +++++++++------- src/mame/layout/supercon.lay | 463 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 532 insertions(+), 107 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/novag6502.cpp b/src/mame/drivers/novag6502.cpp index 6bb71e2e24d..bd291149ea6 100644 --- a/src/mame/drivers/novag6502.cpp +++ b/src/mame/drivers/novag6502.cpp @@ -23,7 +23,7 @@ Super Constellation Chess Computer (model 844): #include "sound/beep.h" // internal artwork -#include "supercon.lh" +#include "supercon.lh" // clickable class novag6502_state : public driver_device @@ -82,7 +82,6 @@ protected: }; - // machine start/reset void novag6502_state::machine_start() @@ -221,6 +220,7 @@ void novag6502_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 set display_update(); } + // generic input handlers UINT16 novag6502_state::read_inputs(int columns) @@ -236,8 +236,14 @@ UINT16 novag6502_state::read_inputs(int columns) } -/* Address maps */ +// Devices, I/O + +/****************************************************************************** + Super Constellation +******************************************************************************/ + +// TTL WRITE8_MEMBER(novag6502_state::supercon_1c_w) { @@ -256,6 +262,7 @@ WRITE8_MEMBER(novag6502_state::supercon_1e_w) WRITE8_MEMBER(novag6502_state::supercon_1f_w) { + // d0-d3: ? // d4-d6: select led row m_led_select = data >> 4 & 7; display_matrix(8, 3, m_led_data, m_led_select); @@ -277,6 +284,7 @@ READ8_MEMBER(novag6502_state::supercon_1d_r) READ8_MEMBER(novag6502_state::supercon_1e_r) { + // d0-d5: unused? // d6,d7: multiplexed inputs (side panel) return (read_inputs(8) >> 2 & 0xc0) ^ 0xff; } @@ -289,6 +297,9 @@ READ8_MEMBER(novag6502_state::supercon_1f_r) +/****************************************************************************** + Address Maps +******************************************************************************/ static ADDRESS_MAP_START( supercon_mem, AS_PROGRAM, 8, novag6502_state ) AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("nvram") @@ -299,110 +310,115 @@ static ADDRESS_MAP_START( supercon_mem, AS_PROGRAM, 8, novag6502_state ) AM_RANGE(0x2000, 0xffff) AM_ROM ADDRESS_MAP_END -/* Input ports */ + + +/****************************************************************************** + Input Ports +******************************************************************************/ static INPUT_PORTS_START( supercon ) PORT_START("IN.0") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h8") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g8") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f8") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e8") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d8") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c8") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b8") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a8") PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) // newgame PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h7") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g7") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f7") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e7") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d7") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c7") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a7") PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_START("IN.2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h6") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g6") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f6") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e6") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d6") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b6") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a6") PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_START("IN.3") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h5") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g5") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f5") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e5") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c5") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b5") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a5") PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_START("IN.4") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h4") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g4") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f4") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d4") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c4") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b4") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a4") PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_START("IN.5") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h3") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g3") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e3") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d3") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c3") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b3") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a3") PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_START("IN.6") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h2") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f2") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e2") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d2") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c2") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b2") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a2") PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_START("IN.7") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g1") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f1") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e1") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d1") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c1") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b1") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a1") PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) +INPUT_PORTS_END -INPUT_PORTS_END - -/* Machine driver */ +/****************************************************************************** + Machine Drivers +******************************************************************************/ static MACHINE_CONFIG_START( supercon, novag6502_state ) @@ -411,7 +427,7 @@ static MACHINE_CONFIG_START( supercon, novag6502_state ) MCFG_CPU_PERIODIC_INT_DRIVER(novag6502_state, irq0_line_hold, 600) // guessed MCFG_CPU_PROGRAM_MAP(supercon_mem) - MCFG_NVRAM_ADD_0FILL("nvram") + MCFG_NVRAM_ADD_1FILL("nvram") MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", novag6502_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_supercon) @@ -422,7 +438,11 @@ static MACHINE_CONFIG_START( supercon, novag6502_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END -/* ROM definition */ + + +/****************************************************************************** + ROM Definitions +******************************************************************************/ ROM_START(supercon) ROM_REGION( 0x10000, "maincpu", 0 ) @@ -430,7 +450,11 @@ ROM_START(supercon) ROM_LOAD("novag_8442", 0x8000, 0x8000, CRC(c8f82331) SHA1(f7fd039f9a3344db9749931490ded9e9e309cfbe) ) ROM_END -/* Driver */ -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ -CONS( 1984, supercon, 0, 0, supercon, supercon, driver_device, 0, "Novag", "Super Constellation", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) + +/****************************************************************************** + Drivers +******************************************************************************/ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ +CONS( 1984, supercon, 0, 0, supercon, supercon, driver_device, 0, "Novag", "Super Constellation", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/layout/supercon.lay b/src/mame/layout/supercon.lay index 5047e4df72b..831c63d673f 100644 --- a/src/mame/layout/supercon.lay +++ b/src/mame/layout/supercon.lay @@ -3,43 +3,444 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-70-g09d2 From c44ffeb8fc184d54cbea878bae11eca38c7173e7 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 10 Mar 2016 01:12:46 +0100 Subject: tagged car jamboree driver to myself, will rewrite it soon --- src/mame/drivers/carjmbre.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/carjmbre.cpp b/src/mame/drivers/carjmbre.cpp index e32fc2b77de..3471647a7ad 100644 --- a/src/mame/drivers/carjmbre.cpp +++ b/src/mame/drivers/carjmbre.cpp @@ -1,7 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood - -// **** SKELETON DRIVER **** original removed due to unresolved licensing. +// copyright-holders:hap /*************************************************************************** @@ -40,7 +38,7 @@ class carjmbre_state : public driver_device public: carjmbre_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - {} + { } }; -- cgit v1.2.3-70-g09d2 From 2acc33d8a7c0bf498838d1751319457d30a84a2b Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 9 Mar 2016 19:59:25 -0500 Subject: Let slot_default in softlists override INIs (but not the command line) --- src/emu/emuopts.cpp | 10 +++++++--- src/emu/emuopts.h | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index b9187edea57..bf83f2d6ace 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -32,7 +32,7 @@ const options_entry emu_options::s_option_entries[] = { OPTION_READCONFIG ";rc", "1", OPTION_BOOLEAN, "enable loading of configuration files" }, { OPTION_WRITECONFIG ";wc", "0", OPTION_BOOLEAN, "writes configuration to (driver).ini on exit" }, - // seach path options + // search path options { nullptr, nullptr, OPTION_HEADER, "CORE SEARCH PATH OPTIONS" }, { OPTION_MEDIAPATH ";rp;biospath;bp", "roms", OPTION_STRING, "path to ROMsets and hard disk images" }, { OPTION_HASHPATH ";hash_directory;hash", "hash", OPTION_STRING, "path to hash files" }, @@ -270,7 +270,11 @@ bool emu_options::add_slot_options(const software_part *swpart) std::string featurename = std::string(name).append("_default"); const char *value = swpart->feature(featurename.c_str()); if (value != nullptr && (*value == '\0' || slot->option(value) != nullptr)) - set_default_value(name, value); + { + // set priority above INIs but below actual command line + std::string error; + set_value(name, value, OPTION_PRIORITY_SUBCMD, error); + } } } return (options_count() != starting_count); @@ -391,7 +395,7 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_ m_device_options = 0; add_device_options(); if (name != nullptr && exists(name)) - set_value(name, value, OPTION_PRIORITY_CMDLINE, error_string); + set_value(name, value, OPTION_PRIORITY_SUBCMD, error_string); core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); int num; diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index 79df39c7438..0512924dd59 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -23,7 +23,8 @@ enum { // command-line options are HIGH priority - OPTION_PRIORITY_CMDLINE = OPTION_PRIORITY_HIGH, + OPTION_PRIORITY_SUBCMD = OPTION_PRIORITY_HIGH, + OPTION_PRIORITY_CMDLINE, // INI-based options are NORMAL priority, in increasing order: OPTION_PRIORITY_INI = OPTION_PRIORITY_NORMAL, -- cgit v1.2.3-70-g09d2 From ee695f12a361f9ce258c9377a872364e555de9f5 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Thu, 10 Mar 2016 02:21:54 -0500 Subject: NoteTaker: Fix another typo in bios 1.5, no longer runs off into the weeds and actually tries to load from floppy now. Needs FDC hooked up still. [Lord Nightmare] --- src/mame/drivers/notetaker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index af0feddd964..31ee5f696f1 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -736,7 +736,7 @@ ROM_START( notetakr ) ROMX_LOAD( "biop__2.00_hi.b2716.h1", 0x0000, 0x0800, CRC(1119691d) SHA1(4c20b595b554e6f5489ab2c3fb364b4a052f05e3), ROM_SKIP(1) | ROM_BIOS(1)) ROMX_LOAD( "biop__2.00_lo.b2716.g1", 0x0001, 0x0800, CRC(b72aa4c7) SHA1(85dab2399f906c7695dc92e7c18f32e2303c5892), ROM_SKIP(1) | ROM_BIOS(1)) ROM_SYSTEM_BIOS( 1, "v1.50", "IO Monitor v1.50" ) // typed from the source listing at http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790620_Z-IOP_1.5_ls.pdf and scrambled - ROMX_LOAD( "z-iop_1.50_hi.h1", 0x0000, 0x0800, CRC(2994656e) SHA1(ca2bb38eb9075c5c2f3cc5439b209e7e216084da), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "z-iop_1.50_hi.h1", 0x0000, 0x0800, CRC(122ffb5b) SHA1(b957fe24620e1aa98b3158dbcf459937dbd54bac), ROM_SKIP(1) | ROM_BIOS(2)) ROMX_LOAD( "z-iop_1.50_lo.g1", 0x0001, 0x0800, CRC(2cb79a67) SHA1(692aafd2aeea27533f6288dbb1cb8678ea08fade), ROM_SKIP(1) | ROM_BIOS(2)) ROM_REGION( 0x100000, "iocpu", ROMREGION_ERASEFF ) // area for descrambled roms ROM_REGION( 0x100000, "mainram", ROMREGION_ERASEFF ) // main ram, on 2 cards with parity/ecc/syndrome/timing/bus arbitration on another 2 cards -- cgit v1.2.3-70-g09d2 From bb0de79a3a855de73699497cd4a0054cbd90631d Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Thu, 10 Mar 2016 19:13:30 +1100 Subject: To ArBee with love Add common debugger commands to global menu bar [Vas Crabb] Also fix occasional crash in Copy Visible Note that copy visible, paste, toggle breakpoint, and view options still require you to use context menus in windows Debug/Run menus only work when a debugger window has focus, so Break is less useful than it could be Hope this is at least a slight improvement for you, ArBee --- src/osd/modules/debugger/debugosx.mm | 98 ++++++++++++++++++++++ src/osd/modules/debugger/osx/debugview.mm | 2 +- src/osd/modules/debugger/osx/debugwindowhandler.h | 1 + src/osd/modules/debugger/osx/debugwindowhandler.mm | 15 +++- 4 files changed, 114 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/osd/modules/debugger/debugosx.mm b/src/osd/modules/debugger/debugosx.mm index 6c52459f719..598a85dd569 100644 --- a/src/osd/modules/debugger/debugosx.mm +++ b/src/osd/modules/debugger/debugosx.mm @@ -29,6 +29,8 @@ #import "osx/debugconsole.h" #import "osx/debugwindowhandler.h" +#include + //============================================================ // MODULE SUPPORT @@ -60,10 +62,14 @@ public: private: running_machine *m_machine; MAMEDebugConsole *m_console; + + static std::atomic_bool s_added_menus; }; MODULE_DEFINITION(DEBUG_OSX, debugger_osx) +std::atomic_bool debugger_osx::s_added_menus(false); + //============================================================ // debugger_osx::init //============================================================ @@ -113,7 +119,99 @@ void debugger_osx::wait_for_debugger(device_t &device, bool firststop) // create a console window if (m_console == nil) + { + if (!s_added_menus.exchange(true, std::memory_order_relaxed)) + { + NSMenuItem *item; + + NSMenu *const debugMenu = [[NSMenu allocWithZone:[NSMenu menuZone]] initWithTitle:@"Debug"]; + item = [[NSApp mainMenu] insertItemWithTitle:@"Debug" action:NULL keyEquivalent:@"" atIndex:1]; + [item setSubmenu:debugMenu]; + [debugMenu release]; + + [debugMenu addItemWithTitle:@"New Memory Window" + action:@selector(debugNewMemoryWindow:) + keyEquivalent:@"d"]; + [debugMenu addItemWithTitle:@"New Disassembly Window" + action:@selector(debugNewDisassemblyWindow:) + keyEquivalent:@"a"]; + [debugMenu addItemWithTitle:@"New Error Log Window" + action:@selector(debugNewErrorLogWindow:) + keyEquivalent:@"l"]; + [debugMenu addItemWithTitle:@"New (Break|Watch)points Window" + action:@selector(debugNewPointsWindow:) + keyEquivalent:@"b"]; + [debugMenu addItemWithTitle:@"New Devices Window" + action:@selector(debugNewDevicesWindow:) + keyEquivalent:@"D"]; + + [debugMenu addItem:[NSMenuItem separatorItem]]; + + [[debugMenu addItemWithTitle:@"Soft Reset" + action:@selector(debugSoftReset:) + keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF3FunctionKey]] + setKeyEquivalentModifierMask:0]; + [[debugMenu addItemWithTitle:@"Hard Reset" + action:@selector(debugHardReset:) + keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF3FunctionKey]] + setKeyEquivalentModifierMask:NSShiftKeyMask]; + + NSMenu *const runMenu = [[NSMenu allocWithZone:[NSMenu menuZone]] initWithTitle:@"Run"]; + item = [[NSApp mainMenu] insertItemWithTitle:@"Run" + action:NULL + keyEquivalent:@"" + atIndex:([[NSApp mainMenu] indexOfItemWithSubmenu:debugMenu] + 1)]; + [item setSubmenu:runMenu]; + [runMenu release]; + + [runMenu addItemWithTitle:@"Break" + action:@selector(debugBreak:) + keyEquivalent:@""]; + + [runMenu addItem:[NSMenuItem separatorItem]]; + + [[runMenu addItemWithTitle:@"Run" + action:@selector(debugRun:) + keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF5FunctionKey]] + setKeyEquivalentModifierMask:0]; + [[runMenu addItemWithTitle:@"Run and Hide Debugger" + action:@selector(debugRunAndHide:) + keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF12FunctionKey]] + setKeyEquivalentModifierMask:0]; + [[runMenu addItemWithTitle:@"Run to Next CPU" + action:@selector(debugRunToNextCPU:) + keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF6FunctionKey]] + setKeyEquivalentModifierMask:0]; + [[runMenu addItemWithTitle:@"Run until Next Interrupt on Current CPU" + action:@selector(debugRunToNextInterrupt:) + keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF7FunctionKey]] + setKeyEquivalentModifierMask:0]; + [[runMenu addItemWithTitle:@"Run until Next VBLANK" + action:@selector(debugRunToNextVBLANK:) + keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF8FunctionKey]] + setKeyEquivalentModifierMask:0]; + [[runMenu addItemWithTitle:@"Run to Cursor" + action:@selector(debugRunToCursor:) + keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF4FunctionKey]] + setKeyEquivalentModifierMask:0]; + + [runMenu addItem:[NSMenuItem separatorItem]]; + + [[runMenu addItemWithTitle:@"Step Into" + action:@selector(debugStepInto:) + keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF11FunctionKey]] + setKeyEquivalentModifierMask:0]; + [[runMenu addItemWithTitle:@"Step Over" + action:@selector(debugStepOver:) + keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF10FunctionKey]] + setKeyEquivalentModifierMask:0]; + [[runMenu addItemWithTitle:@"Step Out" + action:@selector(debugStepOut:) + keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF10FunctionKey]] + setKeyEquivalentModifierMask:NSShiftKeyMask]; + } m_console = [[MAMEDebugConsole alloc] initWithMachine:*m_machine]; + } // make sure the debug windows are visible if (firststop) diff --git a/src/osd/modules/debugger/osx/debugview.mm b/src/osd/modules/debugger/osx/debugview.mm index e793c649d9e..05d2e2dfc17 100644 --- a/src/osd/modules/debugger/osx/debugview.mm +++ b/src/osd/modules/debugger/osx/debugview.mm @@ -63,7 +63,7 @@ static void debugwin_view_update(debug_view &view, void *osdprivate) InactiveSelectedBackground = [[NSColor colorWithCalibratedWhite:0.875 alpha:1.0] retain]; InactiveSelectedCurrentBackground = [[NSColor colorWithCalibratedRed:0.875 green:0.5 blue:0.625 alpha:1.0] retain]; - NonWhiteCharacters = [[NSCharacterSet whitespaceAndNewlineCharacterSet] invertedSet]; + NonWhiteCharacters = [[[NSCharacterSet whitespaceAndNewlineCharacterSet] invertedSet] retain]; } diff --git a/src/osd/modules/debugger/osx/debugwindowhandler.h b/src/osd/modules/debugger/osx/debugwindowhandler.h index e8d2d6eb08d..0fc40d9eb64 100644 --- a/src/osd/modules/debugger/osx/debugwindowhandler.h +++ b/src/osd/modules/debugger/osx/debugwindowhandler.h @@ -38,6 +38,7 @@ extern NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification; - (void)activate; +- (IBAction)debugBreak:(id)sender; - (IBAction)debugRun:(id)sender; - (IBAction)debugRunAndHide:(id)sender; - (IBAction)debugRunToNextCPU:(id)sender; diff --git a/src/osd/modules/debugger/osx/debugwindowhandler.mm b/src/osd/modules/debugger/osx/debugwindowhandler.mm index d99a9ec9961..fd11fa89152 100644 --- a/src/osd/modules/debugger/osx/debugwindowhandler.mm +++ b/src/osd/modules/debugger/osx/debugwindowhandler.mm @@ -29,6 +29,10 @@ NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification = @"MAMEAuxiliaryD @implementation MAMEDebugWindowHandler + (void)addCommonActionItems:(NSMenu *)menu { + [menu addItemWithTitle:@"Break" + action:@selector(debugBreak:) + keyEquivalent:@""]; + NSMenuItem *runParentItem = [menu addItemWithTitle:@"Run" action:@selector(debugRun:) keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF5FunctionKey]]; @@ -181,13 +185,22 @@ NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification = @"MAMEAuxiliaryD } +- (IBAction)debugBreak:(id)sender { + if (machine->debug_flags & DEBUG_FLAG_ENABLED) + debug_cpu_get_visible_cpu(*machine)->debug()->halt_on_next_instruction("User-initiated break\n"); +} + + - (IBAction)debugRun:(id)sender { debug_cpu_get_visible_cpu(*machine)->debug()->go(); } - (IBAction)debugRunAndHide:(id)sender { - [[NSNotificationCenter defaultCenter] postNotificationName:MAMEHideDebuggerNotification object:self]; + [[NSNotificationCenter defaultCenter] postNotificationName:MAMEHideDebuggerNotification + object:self + userInfo:[NSDictionary dictionaryWithObject:[NSValue valueWithPointer:machine] + forKey:@"MAMEDebugMachine"]]; debug_cpu_get_visible_cpu(*machine)->debug()->go(); } -- cgit v1.2.3-70-g09d2 From 17ed79fbea3860ca1e4c1be99ca252177b1d85b8 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 10 Mar 2016 09:39:16 +0100 Subject: novag6502: added supercon button labels --- src/mame/drivers/hh_cop400.cpp | 4 +-- src/mame/drivers/hh_tms1k.cpp | 2 +- src/mame/drivers/novag6502.cpp | 63 ++++++++++++++---------------------------- 3 files changed, 23 insertions(+), 46 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index da4539a9094..38f833668fe 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -1044,9 +1044,9 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ CONS( 1979, ctstein, 0, 0, ctstein, ctstein, driver_device, 0, "Castle Toy", "Einstein (Castle Toy)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1980, h2hbaskb, 0, 0, h2hbaskb, h2hbaskb, driver_device, 0, "Coleco", "Head to Head Basketball/Hockey/Soccer (COP420L)", MACHINE_SUPPORTS_SAVE ) +CONS( 1980, h2hbaskb, 0, 0, h2hbaskb, h2hbaskb, driver_device, 0, "Coleco", "Head to Head Basketball/Hockey/Soccer (COP420L version)", MACHINE_SUPPORTS_SAVE ) -CONS( 1981, einvaderc, einvader, 0, einvaderc, einvaderc, driver_device, 0, "Entex", "Space Invader (Entex, COP444)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING ) +CONS( 1981, einvaderc, einvader, 0, einvaderc, einvaderc, driver_device, 0, "Entex", "Space Invader (Entex, COP444L version)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING ) CONS( 1979, funjacks, 0, 0, funjacks, funjacks, driver_device, 0, "Mattel", "Funtronics Jacks", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) CONS( 1979, funrlgl, 0, 0, funrlgl, funrlgl, driver_device, 0, "Mattel", "Funtronics Red Light Green Light", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index ac0a8783843..5be37c7fb20 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -5445,7 +5445,7 @@ CONS( 1979, cnfball2, 0, 0, cnfball2, cnfball2, driver_device, 0, "Con CONS( 1979, ebball, 0, 0, ebball, ebball, driver_device, 0, "Entex", "Electronic Baseball (Entex)", MACHINE_SUPPORTS_SAVE ) CONS( 1979, ebball2, 0, 0, ebball2, ebball2, driver_device, 0, "Entex", "Electronic Baseball 2 (Entex)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, ebball3, 0, 0, ebball3, ebball3, driver_device, 0, "Entex", "Electronic Baseball 3 (Entex)", MACHINE_SUPPORTS_SAVE ) -CONS( 1980, einvader, 0, 0, einvader, einvader, driver_device, 0, "Entex", "Space Invader (Entex, TMS1100)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1980, einvader, 0, 0, einvader, einvader, driver_device, 0, "Entex", "Space Invader (Entex, TMS1100 version)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) CONS( 1980, efootb4 , 0, 0, efootb4, efootb4, driver_device, 0, "Entex", "Color Football 4 (Entex)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, ebaskb2 , 0, 0, ebaskb2, ebaskb2, driver_device, 0, "Entex", "Electronic Basketball 2 (Entex)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, raisedvl, 0, 0, raisedvl, raisedvl, driver_device, 0, "Entex", "Raise The Devil", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) diff --git a/src/mame/drivers/novag6502.cpp b/src/mame/drivers/novag6502.cpp index bd291149ea6..043d3d2d895 100644 --- a/src/mame/drivers/novag6502.cpp +++ b/src/mame/drivers/novag6502.cpp @@ -44,12 +44,8 @@ public: optional_device m_beeper; optional_ioport_array<8> m_inp_matrix; - DECLARE_WRITE8_MEMBER(supercon_1c_w); - DECLARE_WRITE8_MEMBER(supercon_1d_w); DECLARE_WRITE8_MEMBER(supercon_1e_w); DECLARE_WRITE8_MEMBER(supercon_1f_w); - DECLARE_READ8_MEMBER(supercon_1c_r); - DECLARE_READ8_MEMBER(supercon_1d_r); DECLARE_READ8_MEMBER(supercon_1e_r); DECLARE_READ8_MEMBER(supercon_1f_r); @@ -245,14 +241,6 @@ UINT16 novag6502_state::read_inputs(int columns) // TTL -WRITE8_MEMBER(novag6502_state::supercon_1c_w) -{ -} - -WRITE8_MEMBER(novag6502_state::supercon_1d_w) -{ -} - WRITE8_MEMBER(novag6502_state::supercon_1e_w) { // d0-d7: input mux, led data @@ -271,20 +259,9 @@ WRITE8_MEMBER(novag6502_state::supercon_1f_w) m_beeper->set_state(data >> 7 & 1); } - -READ8_MEMBER(novag6502_state::supercon_1c_r) -{ - return 0xff; -} - -READ8_MEMBER(novag6502_state::supercon_1d_r) -{ - return 0xff; -} - READ8_MEMBER(novag6502_state::supercon_1e_r) { - // d0-d5: unused? + // d0-d5: ? // d6,d7: multiplexed inputs (side panel) return (read_inputs(8) >> 2 & 0xc0) ^ 0xff; } @@ -303,8 +280,8 @@ READ8_MEMBER(novag6502_state::supercon_1f_r) static ADDRESS_MAP_START( supercon_mem, AS_PROGRAM, 8, novag6502_state ) AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("nvram") - AM_RANGE(0x1c00, 0x1c00) AM_READWRITE(supercon_1c_r, supercon_1c_w) - AM_RANGE(0x1d00, 0x1d00) AM_READWRITE(supercon_1d_r, supercon_1d_w) + AM_RANGE(0x1c00, 0x1c00) AM_WRITENOP // printer/clock? + AM_RANGE(0x1d00, 0x1d00) AM_WRITENOP // printer/clock? AM_RANGE(0x1e00, 0x1e00) AM_READWRITE(supercon_1e_r, supercon_1e_w) AM_RANGE(0x1f00, 0x1f00) AM_READWRITE(supercon_1f_r, supercon_1f_w) AM_RANGE(0x2000, 0xffff) AM_ROM @@ -326,8 +303,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c8") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b8") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a8") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) // newgame - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("New Game") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("King / Multi Move / Player/Player") PORT_START("IN.1") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h7") @@ -338,8 +315,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c7") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b7") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a7") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Verify / Set Up") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Queen / Best Move/Random / Training Level") PORT_START("IN.2") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h6") @@ -350,8 +327,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c6") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b6") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a6") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Change Color") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Bishop / Sound / Depth Search") PORT_START("IN.3") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h5") @@ -362,8 +339,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c5") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b5") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a5") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Clear Board") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Knight / Solve Mate") PORT_START("IN.4") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h4") @@ -374,8 +351,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c4") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b4") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a4") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Print Moves") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Rook / Print Board") PORT_START("IN.5") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h3") @@ -386,8 +363,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c3") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b3") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a3") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Form Size") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Pion / Print List / Acc. Time") PORT_START("IN.6") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h2") @@ -398,8 +375,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c2") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b2") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a2") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Hint") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("Set Level") PORT_START("IN.7") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h1") @@ -410,8 +387,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c1") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b1") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a1") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Go") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("Take Back") INPUT_PORTS_END @@ -434,7 +411,7 @@ static MACHINE_CONFIG_START( supercon, novag6502_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("beeper", BEEP, 2000) // guessed + MCFG_SOUND_ADD("beeper", BEEP, 1200) // guessed MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END -- cgit v1.2.3-70-g09d2 From b0cfd601ac9046d98e392ffe4252f7a8602e1b99 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 10 Mar 2016 10:48:54 +0100 Subject: novag6502: button mappings were wrong way around --- src/mame/drivers/fidel6502.cpp | 24 ++++++++++++------------ src/mame/drivers/fidel68k.cpp | 12 ++++++------ src/mame/drivers/novag6502.cpp | 34 +++++++++++++++++----------------- 3 files changed, 35 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp index 0f4f0c66900..75edef3a3c6 100644 --- a/src/mame/drivers/fidel6502.cpp +++ b/src/mame/drivers/fidel6502.cpp @@ -700,12 +700,12 @@ static INPUT_PORTS_START( sc12 ) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h8") PORT_START("IN.8") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("RV/Pawn") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("DM/Knight") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("TB/Bishop") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("LV/Rook") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("PV/Queen") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("PB/King") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("RV / Pawn") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("DM / Knight") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("TB / Bishop") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("LV / Rook") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("PV / Queen") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("PB / King") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("CL") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("RE") INPUT_PORTS_END @@ -715,12 +715,12 @@ static INPUT_PORTS_START( fexcel ) PORT_MODIFY("IN.8") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Move/Pawn") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Hint/Knight") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Take Back/Bishop") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Level/Rook") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Options/Queen") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Verify/King") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Move / Pawn") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Hint / Knight") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Take Back / Bishop") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Level / Rook") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Options / Queen") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Verify / King") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_CODE(KEYCODE_N) PORT_NAME("New Game") INPUT_PORTS_END diff --git a/src/mame/drivers/fidel68k.cpp b/src/mame/drivers/fidel68k.cpp index 463b92f8638..fcf546c8964 100644 --- a/src/mame/drivers/fidel68k.cpp +++ b/src/mame/drivers/fidel68k.cpp @@ -366,12 +366,12 @@ static INPUT_PORTS_START( eag ) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a8") PORT_START("IN.8") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("PB/King") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("PV/Queen") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("TM/Rook") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("ST/Bishop") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("TB/Knight") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("LV/Pawn") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("PB / King") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("PV / Queen") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("TM / Rook") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("ST / Bishop") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("TB / Knight") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("LV / Pawn") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Option") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("RV") INPUT_PORTS_END diff --git a/src/mame/drivers/novag6502.cpp b/src/mame/drivers/novag6502.cpp index 043d3d2d895..9593976acff 100644 --- a/src/mame/drivers/novag6502.cpp +++ b/src/mame/drivers/novag6502.cpp @@ -303,8 +303,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c8") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b8") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a8") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("New Game") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("King / Multi Move / Player/Player") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("New Game") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("King / Multi Move / Player/Player") PORT_START("IN.1") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h7") @@ -315,8 +315,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c7") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b7") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a7") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Verify / Set Up") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Queen / Best Move/Random / Training Level") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Verify / Set Up") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("Queen / Best Move/Random / Training Level") PORT_START("IN.2") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h6") @@ -327,8 +327,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c6") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b6") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a6") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Change Color") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Bishop / Sound / Depth Search") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Change Color") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Bishop / Sound / Depth Search") PORT_START("IN.3") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h5") @@ -339,8 +339,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c5") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b5") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a5") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Clear Board") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Knight / Solve Mate") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Clear Board") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Knight / Solve Mate") PORT_START("IN.4") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h4") @@ -351,8 +351,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c4") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b4") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a4") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Print Moves") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Rook / Print Board") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Print Moves") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Rook / Print Board") PORT_START("IN.5") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h3") @@ -363,8 +363,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c3") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b3") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a3") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Form Size") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Pion / Print List / Acc. Time") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Form Size") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Pion / Print List / Acc. Time") PORT_START("IN.6") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h2") @@ -375,8 +375,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c2") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b2") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a2") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Hint") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("Set Level") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Hint") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Set Level") PORT_START("IN.7") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h1") @@ -387,8 +387,8 @@ static INPUT_PORTS_START( supercon ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c1") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b1") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a1") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Go") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("Take Back") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Go") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Take Back") INPUT_PORTS_END @@ -421,7 +421,7 @@ MACHINE_CONFIG_END ROM Definitions ******************************************************************************/ -ROM_START(supercon) +ROM_START( supercon ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("novag_8441", 0x0000, 0x8000, CRC(b853cf6e) SHA1(1a759072a5023b92c07f1fac01b7a21f7b5b45d0) ) // label obscured by Q.C. sticker ROM_LOAD("novag_8442", 0x8000, 0x8000, CRC(c8f82331) SHA1(f7fd039f9a3344db9749931490ded9e9e309cfbe) ) -- cgit v1.2.3-70-g09d2 From 1145ebcea4fdbf0aaf369eadfbf2c07dab74f9a2 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 10 Mar 2016 14:24:49 +0100 Subject: carjmbre: basic program-flow --- src/mame/drivers/carjmbre.cpp | 164 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 144 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/carjmbre.cpp b/src/mame/drivers/carjmbre.cpp index 3471647a7ad..199e3003080 100644 --- a/src/mame/drivers/carjmbre.cpp +++ b/src/mame/drivers/carjmbre.cpp @@ -1,6 +1,5 @@ // license:BSD-3-Clause // copyright-holders:hap - /*************************************************************************** Car Jamboree @@ -32,49 +31,174 @@ ***************************************************************************/ #include "emu.h" +#include "cpu/z80/z80.h" +#include "sound/ay8910.h" class carjmbre_state : public driver_device { public: carjmbre_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu") { } + + // devices/pointers + required_device m_maincpu; + required_device m_audiocpu; + + bool m_nmi_enabled; + + DECLARE_WRITE8_MEMBER(nmi_enable_w); + INTERRUPT_GEN_MEMBER(vblank_nmi); + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + +protected: + virtual void machine_start() override; }; +void carjmbre_state::machine_start() +{ + // zerofill + m_nmi_enabled = false; + + // register for savestates + save_item(NAME(m_nmi_enabled)); +} + +/*************************************************************************** + + Video + +***************************************************************************/ + +UINT32 carjmbre_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + return 0; +} + +/*************************************************************************** + + I/O - maincpu + +***************************************************************************/ + +INTERRUPT_GEN_MEMBER(carjmbre_state::vblank_nmi) +{ + if (m_nmi_enabled) + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); +} + +WRITE8_MEMBER(carjmbre_state::nmi_enable_w) +{ + // d0: enable/clear vblank nmi + m_nmi_enabled = bool(data & 1); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); +} + +static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, carjmbre_state ) + AM_RANGE(0x0000, 0x7fff) AM_ROM + AM_RANGE(0x8803, 0x8803) AM_WRITE(nmi_enable_w) + AM_RANGE(0x8000, 0x87ff) AM_RAM // 6116 + AM_RANGE(0x9000, 0x97ff) AM_RAM // 2114*4 +ADDRESS_MAP_END + +/*************************************************************************** + + I/O - audiocpu + +***************************************************************************/ + +static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, carjmbre_state ) + AM_RANGE(0x0000, 0x0fff) AM_ROM + AM_RANGE(0x2000, 0x27ff) AM_RAM // 6116 +ADDRESS_MAP_END + +static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, carjmbre_state ) + ADDRESS_MAP_GLOBAL_MASK(0xff) + AM_RANGE(0x00, 0xff) AM_NOP +ADDRESS_MAP_END + +/*************************************************************************** + + Inputs + +***************************************************************************/ static INPUT_PORTS_START( carjmbre ) INPUT_PORTS_END + +/*************************************************************************** + + Machine Config + +***************************************************************************/ + static MACHINE_CONFIG_START( carjmbre, carjmbre_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) + MCFG_CPU_PROGRAM_MAP(main_map) + MCFG_CPU_VBLANK_INT_DRIVER("screen", carjmbre_state, vblank_nmi) + + MCFG_CPU_ADD("audiocpu", Z80, XTAL_18_432MHz/6/2) + MCFG_CPU_PROGRAM_MAP(sound_map) + MCFG_CPU_IO_MAP(sound_io_map) + + /* video hardware */ + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_REFRESH_RATE(60) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) + MCFG_SCREEN_SIZE(32*8, 32*8) + MCFG_SCREEN_UPDATE_DRIVER(carjmbre_state, screen_update) + MCFG_SCREEN_PALETTE("palette") + + MCFG_PALETTE_ADD_3BIT_BGR("palette") // temp + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/6/2) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) + MCFG_SOUND_ADD("ay2", AY8910, XTAL_18_432MHz/6/2) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END + + +/*************************************************************************** + + Game drivers + +***************************************************************************/ + ROM_START( carjmbre ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "c1", 0x0000, 0x1000, CRC(62b21739) SHA1(710e5c52f27603aa8f864f6f28d7272f21271d60) ) - ROM_LOAD( "c2", 0x1000, 0x1000, CRC(9ab1a0fa) SHA1(519cf67b98e62b2b42232788ba01ab6637880afc) ) - ROM_LOAD( "c3", 0x2000, 0x1000, CRC(bb29e100) SHA1(93e3cfcf7f8b0b36327f402d9a64c04c3b2c7549) ) - ROM_LOAD( "c4", 0x3000, 0x1000, CRC(c63d8f97) SHA1(9f08fd1cd24a1fb4011864c06580985e009d9af4) ) - ROM_LOAD( "c5", 0x4000, 0x1000, CRC(4d593942) SHA1(30cc649a4be3d7f3705f55d8d0dadb0b63d59ec9) ) - ROM_LOAD( "c6", 0x5000, 0x1000, CRC(fb576963) SHA1(5bf5c54a7c12aa55272629c12b414bf49cda0f1f) ) - ROM_LOAD( "c7", 0x6000, 0x1000, CRC(2b8c4511) SHA1(428a48d6b14455d66720a115bc5f35293dc50de7) ) - ROM_LOAD( "c8", 0x7000, 0x1000, CRC(51cc22a7) SHA1(f614368bfee04f084c70bf145801ac46e5631acb) ) + ROM_LOAD( "c1", 0x0000, 0x1000, CRC(62b21739) SHA1(710e5c52f27603aa8f864f6f28d7272f21271d60) ) + ROM_LOAD( "c2", 0x1000, 0x1000, CRC(9ab1a0fa) SHA1(519cf67b98e62b2b42232788ba01ab6637880afc) ) + ROM_LOAD( "c3", 0x2000, 0x1000, CRC(bb29e100) SHA1(93e3cfcf7f8b0b36327f402d9a64c04c3b2c7549) ) + ROM_LOAD( "c4", 0x3000, 0x1000, CRC(c63d8f97) SHA1(9f08fd1cd24a1fb4011864c06580985e009d9af4) ) + ROM_LOAD( "c5", 0x4000, 0x1000, CRC(4d593942) SHA1(30cc649a4be3d7f3705f55d8d0dadb0b63d59ec9) ) + ROM_LOAD( "c6", 0x5000, 0x1000, CRC(fb576963) SHA1(5bf5c54a7c12aa55272629c12b414bf49cda0f1f) ) + ROM_LOAD( "c7", 0x6000, 0x1000, CRC(2b8c4511) SHA1(428a48d6b14455d66720a115bc5f35293dc50de7) ) + ROM_LOAD( "c8", 0x7000, 0x1000, CRC(51cc22a7) SHA1(f614368bfee04f084c70bf145801ac46e5631acb) ) ROM_REGION( 0x10000, "audiocpu", 0 ) - ROM_LOAD( "c15", 0x0000, 0x1000, CRC(7d7779d1) SHA1(f8f5246be4cc9632076d3330fc3d3343b911dfee) ) + ROM_LOAD( "c15", 0x0000, 0x1000, CRC(7d7779d1) SHA1(f8f5246be4cc9632076d3330fc3d3343b911dfee) ) ROM_REGION( 0x2000, "gfx1", 0 ) - ROM_LOAD( "c9", 0x0000, 0x1000, CRC(2accb821) SHA1(ce2804536fc1abd3377dc864c8c9976ca28c1b6e) ) - ROM_LOAD( "c10", 0x1000, 0x1000, CRC(75ddbe56) SHA1(5e1363967a822265618793ccb74bf3ef5e0e00b5) ) + ROM_LOAD( "c9", 0x0000, 0x1000, CRC(2accb821) SHA1(ce2804536fc1abd3377dc864c8c9976ca28c1b6e) ) + ROM_LOAD( "c10", 0x1000, 0x1000, CRC(75ddbe56) SHA1(5e1363967a822265618793ccb74bf3ef5e0e00b5) ) ROM_REGION( 0x4000, "gfx2", 0 ) - ROM_LOAD( "c11", 0x0000, 0x1000, CRC(d90cd126) SHA1(7ee110cf19b45ee654016ba0ce92f3db6ea2ed92) ) - ROM_LOAD( "c12", 0x1000, 0x1000, CRC(b3bb39d7) SHA1(89c901be6fae2356ce4d2653e94bf28d6bcf41fe) ) - ROM_LOAD( "c13", 0x2000, 0x1000, CRC(3004010b) SHA1(00d5d2185014159112eb90d8ed50092a3b4ab664) ) - ROM_LOAD( "c14", 0x3000, 0x1000, CRC(fb5f0d31) SHA1(7a27af91efc836bb48c6ed3b283b7c5f7b31c4b5) ) + ROM_LOAD( "c11", 0x0000, 0x1000, CRC(d90cd126) SHA1(7ee110cf19b45ee654016ba0ce92f3db6ea2ed92) ) + ROM_LOAD( "c12", 0x1000, 0x1000, CRC(b3bb39d7) SHA1(89c901be6fae2356ce4d2653e94bf28d6bcf41fe) ) + ROM_LOAD( "c13", 0x2000, 0x1000, CRC(3004010b) SHA1(00d5d2185014159112eb90d8ed50092a3b4ab664) ) + ROM_LOAD( "c14", 0x3000, 0x1000, CRC(fb5f0d31) SHA1(7a27af91efc836bb48c6ed3b283b7c5f7b31c4b5) ) ROM_REGION( 0x0040, "proms", 0 ) - ROM_LOAD( "c.d19", 0x0000, 0x0020, CRC(220bceeb) SHA1(46b9f867d014596e2aa7503f104dc721965f0ed5) ) - ROM_LOAD( "c.d18", 0x0020, 0x0020, CRC(7b9ed1b0) SHA1(ec5e1f56e5a2fc726083866c08ac0e1de0ed6ace) ) + ROM_LOAD( "c.d19", 0x0000, 0x0020, CRC(220bceeb) SHA1(46b9f867d014596e2aa7503f104dc721965f0ed5) ) + ROM_LOAD( "c.d18", 0x0020, 0x0020, CRC(7b9ed1b0) SHA1(ec5e1f56e5a2fc726083866c08ac0e1de0ed6ace) ) ROM_END -GAME( 1983, carjmbre, 0, carjmbre, carjmbre, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Car Jamboree", MACHINE_IS_SKELETON ) +GAME( 1983, carjmbre, 0, carjmbre, carjmbre, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Car Jamboree", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) -- cgit v1.2.3-70-g09d2 From c3bad4a577181d145679ff672550edebfa4e4649 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 10 Mar 2016 15:14:48 +0100 Subject: carjmbre: added sound, added inputs(from online doc, obviously dipswitch info is same as before) --- src/mame/drivers/carjmbre.cpp | 55 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mame/drivers/carjmbre.cpp b/src/mame/drivers/carjmbre.cpp index 199e3003080..c3e30f5c1bc 100644 --- a/src/mame/drivers/carjmbre.cpp +++ b/src/mame/drivers/carjmbre.cpp @@ -101,6 +101,9 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, carjmbre_state ) AM_RANGE(0x8803, 0x8803) AM_WRITE(nmi_enable_w) AM_RANGE(0x8000, 0x87ff) AM_RAM // 6116 AM_RANGE(0x9000, 0x97ff) AM_RAM // 2114*4 + AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN1") + AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN2") + AM_RANGE(0xb800, 0xb800) AM_READ_PORT("DSW") AM_WRITE(soundlatch_byte_w) ADDRESS_MAP_END /*************************************************************************** @@ -116,7 +119,13 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, carjmbre_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0xff) AM_NOP + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) + AM_RANGE(0x20, 0x21) AM_DEVWRITE("ay1", ay8910_device, address_data_w) + AM_RANGE(0x22, 0x22) AM_WRITENOP // bdir/bc2/bc1 inactive write + AM_RANGE(0x24, 0x24) AM_DEVREAD("ay1", ay8910_device, data_r) + AM_RANGE(0x30, 0x31) AM_DEVWRITE("ay2", ay8910_device, address_data_w) + AM_RANGE(0x32, 0x32) AM_WRITENOP // bdir/bc2/bc1 inactive write + AM_RANGE(0x34, 0x34) AM_DEVREAD("ay2", ay8910_device, data_r) ADDRESS_MAP_END /*************************************************************************** @@ -126,6 +135,49 @@ ADDRESS_MAP_END ***************************************************************************/ static INPUT_PORTS_START( carjmbre ) + PORT_START("IN1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY + + PORT_START("IN2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL + + PORT_START("DSW") + PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW:1,2") + PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x03, DEF_STR( Free_Play ) ) + PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW:3") + PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_6C ) ) + PORT_DIPNAME( 0x18, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW:4,5") + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x08, "4" ) + PORT_DIPSETTING( 0x10, "5" ) + PORT_DIPSETTING( 0x18, "Free") + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW:6") + PORT_DIPSETTING( 0x00, "10k then every 100k" ) + PORT_DIPSETTING( 0x20, "20k then every 100k" ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW:7") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW:8") + PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) INPUT_PORTS_END @@ -151,6 +203,7 @@ static MACHINE_CONFIG_START( carjmbre, carjmbre_state ) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(32*8, 32*8) + MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) MCFG_SCREEN_UPDATE_DRIVER(carjmbre_state, screen_update) MCFG_SCREEN_PALETTE("palette") -- cgit v1.2.3-70-g09d2 From 1c9dd36c322df7ab7e0a5aa80893139c0f0dd493 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 10 Mar 2016 17:11:51 +0100 Subject: carjmbre: added bg tilemap, added palette (resnet stuff copied, was written by me in 2011) --- src/mame/drivers/carjmbre.cpp | 110 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 101 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/carjmbre.cpp b/src/mame/drivers/carjmbre.cpp index c3e30f5c1bc..baca1397412 100644 --- a/src/mame/drivers/carjmbre.cpp +++ b/src/mame/drivers/carjmbre.cpp @@ -32,6 +32,7 @@ #include "emu.h" #include "cpu/z80/z80.h" +#include "video/resnet.h" #include "sound/ay8910.h" class carjmbre_state : public driver_device @@ -40,30 +41,46 @@ public: carjmbre_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu") + m_audiocpu(*this, "audiocpu"), + m_videoram(*this, "videoram"), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette") { } // devices/pointers required_device m_maincpu; required_device m_audiocpu; - + required_shared_ptr m_videoram; + required_device m_gfxdecode; + required_device m_palette; + bool m_nmi_enabled; + UINT8 m_bgcolor; + tilemap_t *m_tilemap; DECLARE_WRITE8_MEMBER(nmi_enable_w); + DECLARE_WRITE8_MEMBER(bgcolor_w); + DECLARE_WRITE8_MEMBER(videoram_w); INTERRUPT_GEN_MEMBER(vblank_nmi); + + DECLARE_PALETTE_INIT(carjmbre); UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + TILE_GET_INFO_MEMBER(get_tile_info); protected: virtual void machine_start() override; + virtual void video_start() override; }; void carjmbre_state::machine_start() { // zerofill m_nmi_enabled = false; + m_bgcolor = 0; // register for savestates save_item(NAME(m_nmi_enabled)); + save_item(NAME(m_bgcolor)); } /*************************************************************************** @@ -72,8 +89,71 @@ void carjmbre_state::machine_start() ***************************************************************************/ +// palette info from Popper schematics (OEC 1983, very similar video hw) +static const res_net_decode_info carjmbre_decode_info = +{ + 1, // there may be two proms needed to construct color + 0, 63, // start/end + // R, G, B, + { 0, 0, 0, }, // offsets + { 0, 3, 6, }, // shifts + {0x07,0x07,0x03, } // masks +}; + +static const res_net_info carjmbre_net_info = +{ + RES_NET_VCC_5V | RES_NET_VBIAS_5V | RES_NET_VIN_TTL_OUT, + { + { RES_NET_AMP_NONE, 0, 0, 3, { 1000, 470, 220 } }, + { RES_NET_AMP_NONE, 0, 0, 3, { 1000, 470, 220 } }, + { RES_NET_AMP_NONE, 0, 0, 2, { 470, 220, 0 } } + } +}; + +PALETTE_INIT_MEMBER(carjmbre_state, carjmbre) +{ + const UINT8 *color_prom = memregion("proms")->base(); + std::vector rgb; + + compute_res_net_all(rgb, color_prom, carjmbre_decode_info, carjmbre_net_info); + palette.set_pen_colors(0, rgb); + palette.palette()->normalize_range(0, 63); +} + +WRITE8_MEMBER(carjmbre_state::bgcolor_w) +{ + m_bgcolor = data & 0x3f; +} + +// tilemap + +WRITE8_MEMBER(carjmbre_state::videoram_w) +{ + m_videoram[offset] = data; + m_tilemap->mark_tile_dirty(offset & 0x3ff); +} + + + +TILE_GET_INFO_MEMBER(carjmbre_state::get_tile_info) +{ + int attr = m_videoram[tile_index | 0x400]; + int code = (m_videoram[tile_index] & 0xff) | (attr << 1 & 0x100); + SET_TILE_INFO_MEMBER(0, code, attr & 0xf, 0); +} + +void carjmbre_state::video_start() +{ + m_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(carjmbre_state::get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_tilemap->set_transparent_pen(0); +} + + UINT32 carjmbre_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { + bitmap.fill(m_bgcolor, cliprect); + m_tilemap->draw(screen, bitmap, cliprect, 0, 0); + return 0; } @@ -96,11 +176,13 @@ WRITE8_MEMBER(carjmbre_state::nmi_enable_w) m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } + static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, carjmbre_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8803, 0x8803) AM_WRITE(nmi_enable_w) + AM_RANGE(0x8805, 0x8805) AM_WRITE(bgcolor_w) AM_RANGE(0x8000, 0x87ff) AM_RAM // 6116 - AM_RANGE(0x9000, 0x97ff) AM_RAM // 2114*4 + AM_RANGE(0x9000, 0x97ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") // 2114*4 AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN1") AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN2") AM_RANGE(0xb800, 0xb800) AM_READ_PORT("DSW") AM_WRITE(soundlatch_byte_w) @@ -113,7 +195,7 @@ ADDRESS_MAP_END ***************************************************************************/ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, carjmbre_state ) - AM_RANGE(0x0000, 0x0fff) AM_ROM + AM_RANGE(0x0000, 0x0fff) AM_MIRROR(0x1000) AM_ROM AM_RANGE(0x2000, 0x27ff) AM_RAM // 6116 ADDRESS_MAP_END @@ -121,10 +203,10 @@ static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, carjmbre_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_RANGE(0x20, 0x21) AM_DEVWRITE("ay1", ay8910_device, address_data_w) - AM_RANGE(0x22, 0x22) AM_WRITENOP // bdir/bc2/bc1 inactive write + AM_RANGE(0x22, 0x22) AM_WRITENOP // bdir/bc2/bc1 ~010 inactive write AM_RANGE(0x24, 0x24) AM_DEVREAD("ay1", ay8910_device, data_r) AM_RANGE(0x30, 0x31) AM_DEVWRITE("ay2", ay8910_device, address_data_w) - AM_RANGE(0x32, 0x32) AM_WRITENOP // bdir/bc2/bc1 inactive write + AM_RANGE(0x32, 0x32) AM_WRITENOP // bdir/bc2/bc1 ~010 inactive write AM_RANGE(0x34, 0x34) AM_DEVREAD("ay2", ay8910_device, data_r) ADDRESS_MAP_END @@ -181,6 +263,14 @@ static INPUT_PORTS_START( carjmbre ) INPUT_PORTS_END + + +static GFXDECODE_START( carjmbre ) + GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x2_planar, 0, 16 ) + //GFXDECODE_ENTRY( "gfx2", 0, x, 0, 16 ) +GFXDECODE_END + + /*************************************************************************** Machine Config @@ -206,9 +296,11 @@ static MACHINE_CONFIG_START( carjmbre, carjmbre_state ) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) MCFG_SCREEN_UPDATE_DRIVER(carjmbre_state, screen_update) MCFG_SCREEN_PALETTE("palette") - - MCFG_PALETTE_ADD_3BIT_BGR("palette") // temp + MCFG_GFXDECODE_ADD("gfxdecode", "palette", carjmbre) + MCFG_PALETTE_ADD("palette", 64) + MCFG_PALETTE_INIT_OWNER(carjmbre_state, carjmbre) + /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/6/2) @@ -254,4 +346,4 @@ ROM_START( carjmbre ) ROM_LOAD( "c.d18", 0x0020, 0x0020, CRC(7b9ed1b0) SHA1(ec5e1f56e5a2fc726083866c08ac0e1de0ed6ace) ) ROM_END -GAME( 1983, carjmbre, 0, carjmbre, carjmbre, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Car Jamboree", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +GAME( 1983, carjmbre, 0, carjmbre, carjmbre, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Car Jamboree", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_COLORS | MACHINE_NOT_WORKING ) -- cgit v1.2.3-70-g09d2 From 0ddb0f7047fa2582b20cd022aba398b274029183 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 10 Mar 2016 18:31:09 +0100 Subject: carjmbre: added sprites, preliminary --- src/emu/drawgfx.cpp | 27 -------------------------- src/mame/drivers/carjmbre.cpp | 45 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 40 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/emu/drawgfx.cpp b/src/emu/drawgfx.cpp index 30bde314664..8ca9b1d7aea 100644 --- a/src/emu/drawgfx.cpp +++ b/src/emu/drawgfx.cpp @@ -86,33 +86,6 @@ gfxdecode_device::gfxdecode_device(const machine_config &mconfig, const char *ta // gfx_element - constructor //------------------------------------------------- -#ifdef UNUSED_FUNCTION -gfx_element::gfx_element() - : m_palette(nullptr), - m_width(0), - m_height(0), - m_startx(0), - m_starty(0), - m_origwidth(0), - m_origheight(0), - m_total_elements(0), - m_color_base(0), - m_color_depth(0), - m_color_granularity(0), - m_total_colors(0), - m_line_modulo(0), - m_char_modulo(0), - m_srcdata(nullptr), - m_dirtyseq(1), - m_gfxdata(nullptr), - m_layout_is_raw(false), - m_layout_planes(0), - m_layout_xormask(0), - m_layout_charincrement(0) -{ -} -#endif - gfx_element::gfx_element(palette_device &palette, UINT8 *base, UINT32 width, UINT32 height, UINT32 rowbytes, UINT32 total_colors, UINT32 color_base, UINT32 color_granularity) : m_palette(&palette), m_width(width), diff --git a/src/mame/drivers/carjmbre.cpp b/src/mame/drivers/carjmbre.cpp index baca1397412..2a9d717933c 100644 --- a/src/mame/drivers/carjmbre.cpp +++ b/src/mame/drivers/carjmbre.cpp @@ -43,6 +43,7 @@ public: m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_videoram(*this, "videoram"), + m_spriteram(*this, "spriteram"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } @@ -51,6 +52,7 @@ public: required_device m_maincpu; required_device m_audiocpu; required_shared_ptr m_videoram; + required_shared_ptr m_spriteram; required_device m_gfxdecode; required_device m_palette; @@ -65,6 +67,7 @@ public: DECLARE_PALETTE_INIT(carjmbre); UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); TILE_GET_INFO_MEMBER(get_tile_info); protected: @@ -151,12 +154,31 @@ void carjmbre_state::video_start() UINT32 carjmbre_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - bitmap.fill(m_bgcolor, cliprect); + //bitmap.fill(m_bgcolor, cliprect); + bitmap.fill(0, cliprect); m_tilemap->draw(screen, bitmap, cliprect, 0, 0); - + draw_sprites(bitmap, cliprect); return 0; } +// sprites + +void carjmbre_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + for (int offs = 0; offs < m_spriteram.bytes(); offs += 4) + { + int sy = 240 - m_spriteram[offs]; + int code = m_spriteram[offs + 1]; + int color = m_spriteram[offs + 2] & 0xf; + int flipx = m_spriteram[offs + 2] >> 6 & 1; + int flipy = m_spriteram[offs + 2] >> 7 & 1; + int sx = m_spriteram[offs + 3]; + + m_gfxdecode->gfx(1)->transpen(bitmap, cliprect, code, color, flipx, flipy, sx, sy, 0); + } +} + + /*************************************************************************** I/O - maincpu @@ -183,6 +205,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, carjmbre_state ) AM_RANGE(0x8805, 0x8805) AM_WRITE(bgcolor_w) AM_RANGE(0x8000, 0x87ff) AM_RAM // 6116 AM_RANGE(0x9000, 0x97ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") // 2114*4 + AM_RANGE(0x9800, 0x98ff) AM_RAM AM_SHARE("spriteram") // 5101*2 AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN1") AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN2") AM_RANGE(0xb800, 0xb800) AM_READ_PORT("DSW") AM_WRITE(soundlatch_byte_w) @@ -203,10 +226,10 @@ static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, carjmbre_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_RANGE(0x20, 0x21) AM_DEVWRITE("ay1", ay8910_device, address_data_w) - AM_RANGE(0x22, 0x22) AM_WRITENOP // bdir/bc2/bc1 ~010 inactive write + AM_RANGE(0x22, 0x22) AM_WRITENOP // bdir/bc2/bc1 1/0/1 inactive write AM_RANGE(0x24, 0x24) AM_DEVREAD("ay1", ay8910_device, data_r) AM_RANGE(0x30, 0x31) AM_DEVWRITE("ay2", ay8910_device, address_data_w) - AM_RANGE(0x32, 0x32) AM_WRITENOP // bdir/bc2/bc1 ~010 inactive write + AM_RANGE(0x32, 0x32) AM_WRITENOP // bdir/bc2/bc1 1/0/1 inactive write AM_RANGE(0x34, 0x34) AM_DEVREAD("ay2", ay8910_device, data_r) ADDRESS_MAP_END @@ -265,9 +288,21 @@ INPUT_PORTS_END +const gfx_layout carjmbre_spritelayout = +{ + 16,16, + RGN_FRAC(1,4), + 2, + { RGN_FRAC(1,2), RGN_FRAC(0,2) }, + { STEP8(0,1), STEP8(256*16*8,1) }, + { STEP16(0,8) }, + 16*8 +}; + + static GFXDECODE_START( carjmbre ) GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x2_planar, 0, 16 ) - //GFXDECODE_ENTRY( "gfx2", 0, x, 0, 16 ) + GFXDECODE_ENTRY( "gfx2", 0, carjmbre_spritelayout, 0, 16 ) GFXDECODE_END -- cgit v1.2.3-70-g09d2 From f101218036f65b574909cd91fe6115756da6553a Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Thu, 10 Mar 2016 20:22:44 +0100 Subject: floppy: Fix subtle interaction between wd_fdc initial restore and floppy reset [O. Galibert] esq5505: Don't return rom to the debugger (nw) esq5505: Invert the deflector dish polarity (nw) --- src/devices/imagedev/floppy.cpp | 18 ++--- src/devices/machine/wd_fdc.cpp | 163 +++++++++++++++++++++------------------- src/devices/machine/wd_fdc.h | 4 +- src/mame/drivers/esq5505.cpp | 8 +- 4 files changed, 100 insertions(+), 93 deletions(-) (limited to 'src') diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index 9a2bd21d764..c4269c944ef 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -516,15 +516,15 @@ void floppy_image_device::mon_w(int state) if (!mon && image) { revolution_start_time = machine().time(); - if (motor_always_on) { - // Drives with motor that is always spinning are immediately ready when a disk is loaded - // because there is no spin-up time - ready = false; - if(!cur_ready_cb.isnull()) - cur_ready_cb(this, ready); - } else { - ready_counter = 2; - } + if (motor_always_on) { + // Drives with motor that is always spinning are immediately ready when a disk is loaded + // because there is no spin-up time + ready = false; + if(!cur_ready_cb.isnull()) + cur_ready_cb(this, ready); + } else { + ready_counter = 2; + } index_resync(); } diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp index 15744f5f7bc..c07f4539683 100644 --- a/src/devices/machine/wd_fdc.cpp +++ b/src/devices/machine/wd_fdc.cpp @@ -90,7 +90,7 @@ void wd_fdc_t::device_start() enmf_cb.resolve(); if (!has_enmf && !enmf_cb.isnull()) - logerror("%s: Warning, this chip doesn't have an ENMF line.\n", tag()); + logerror("Warning, this chip doesn't have an ENMF line.\n"); t_gen = timer_alloc(TM_GEN); t_cmd = timer_alloc(TM_CMD); @@ -154,9 +154,9 @@ void wd_fdc_t::soft_reset() intrq_cond = 0; live_abort(); - // restore - last_dir = 1; - seek_start(RESTORE); + // trigger a restore after everything else is reset too, in particular the floppy device itself + sub_state = INITIAL_RESTORE; + t_gen->adjust(attotime::zero); } void wd_fdc_t::set_floppy(floppy_image_device *_floppy) @@ -190,13 +190,13 @@ void wd_fdc_t::set_floppy(floppy_image_device *_floppy) void wd_fdc_t::dden_w(bool _dden) { if(disable_mfm) { - logerror("%s: Error, this chip does not have a dden line\n", tag()); + logerror("Error, this chip does not have a dden line\n"); return; } if(dden != _dden) { dden = _dden; - if (TRACE_LINES) logerror("%s: select %s\n", tag(), dden ? "fm" : "mfm"); + if (TRACE_LINES) logerror("select %s\n", dden ? "fm" : "mfm"); } } @@ -215,7 +215,7 @@ std::string wd_fdc_t::ttsn() void wd_fdc_t::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { - if (TRACE_EVENT) logerror("%s: Event fired for timer %s\n", tag(), (id==TM_GEN)? "TM_GEN" : (id==TM_CMD)? "TM_CMD" : (id==TM_TRACK)? "TM_TRACK" : "TM_SECTOR"); + if (TRACE_EVENT) logerror("Event fired for timer %s\n", (id==TM_GEN)? "TM_GEN" : (id==TM_CMD)? "TM_CMD" : (id==TM_TRACK)? "TM_TRACK" : "TM_SECTOR"); live_sync(); switch(id) { @@ -243,7 +243,7 @@ void wd_fdc_t::command_end() void wd_fdc_t::seek_start(int state) { - if (TRACE_COMMAND) logerror("%s: seek %d (track=%d)\n", tag(), data, track); + if (TRACE_COMMAND) logerror("seek %d (track=%d)\n", data, track); main_state = state; status &= ~(S_CRC|S_RNF|S_SPIN); if(head_control) { @@ -263,7 +263,7 @@ void wd_fdc_t::seek_continue() for(;;) { switch(sub_state) { case SPINUP: - if (TRACE_STATE) logerror("%s: SPINUP\n", tag()); + if (TRACE_STATE) logerror("SPINUP\n"); if(!(status & S_MON)) { spinup(); return; @@ -274,11 +274,11 @@ void wd_fdc_t::seek_continue() break; case SPINUP_WAIT: - if (TRACE_STATE) logerror("%s: SPINUP_WAIT\n", tag()); + if (TRACE_STATE) logerror("SPINUP_WAIT\n"); return; case SPINUP_DONE: - if (TRACE_STATE) logerror("%s: SPINUP_DONE\n", tag()); + if (TRACE_STATE) logerror("SPINUP_DONE\n"); if(main_state == RESTORE && floppy && !floppy->trk00_r()) { sub_state = SEEK_WAIT_STEP_TIME; delay_cycles(t_gen, step_times[command & 3]); @@ -296,7 +296,7 @@ void wd_fdc_t::seek_continue() break; case SEEK_MOVE: - if (TRACE_STATE) logerror("%s: SEEK_MOVE\n", tag()); + if (TRACE_STATE) logerror("SEEK_MOVE\n"); if(floppy) { floppy->dir_w(last_dir); floppy->stp_w(0); @@ -312,11 +312,11 @@ void wd_fdc_t::seek_continue() return; case SEEK_WAIT_STEP_TIME: - if (TRACE_STATE) logerror("%s: SEEK_WAIT_STEP_TIME\n", tag()); + if (TRACE_STATE) logerror("SEEK_WAIT_STEP_TIME\n"); return; case SEEK_WAIT_STEP_TIME_DONE: { - if (TRACE_STATE) logerror("%s: SEEK_WAIT_STEP_TIME_DONE\n", tag()); + if (TRACE_STATE) logerror("SEEK_WAIT_STEP_TIME_DONE\n"); bool done = false; switch(main_state) { case RESTORE: @@ -349,16 +349,16 @@ void wd_fdc_t::seek_continue() } case SEEK_WAIT_STABILIZATION_TIME: - if (TRACE_STATE) logerror("%s: SEEK_WAIT_STABILIZATION_TIME\n", tag()); + if (TRACE_STATE) logerror("SEEK_WAIT_STABILIZATION_TIME\n"); return; case SEEK_WAIT_STABILIZATION_TIME_DONE: - if (TRACE_STATE) logerror("%s: SEEK_WAIT_STABILIZATION_TIME_DONE\n", tag()); + if (TRACE_STATE) logerror("SEEK_WAIT_STABILIZATION_TIME_DONE\n"); sub_state = SEEK_DONE; break; case SEEK_DONE: - if (TRACE_STATE) logerror("%s: SEEK_DONE\n", tag()); + if (TRACE_STATE) logerror("SEEK_DONE\n"); status |= S_HLD; hld = true; if (!hld_cb.isnull()) @@ -378,7 +378,7 @@ void wd_fdc_t::seek_continue() return; case SCAN_ID: - if (TRACE_STATE) logerror("%s: SCAN_ID\n", tag()); + if (TRACE_STATE) logerror("SCAN_ID\n"); if(cur_live.idbuf[0] != track) { live_start(SEARCH_ADDRESS_MARK_HEADER); return; @@ -392,13 +392,13 @@ void wd_fdc_t::seek_continue() return; case SCAN_ID_FAILED: - if (TRACE_STATE) logerror("%s: SCAN_ID_FAILED\n", tag()); + if (TRACE_STATE) logerror("SCAN_ID_FAILED\n"); status |= S_RNF; command_end(); return; default: - logerror("%s: seek unknown sub-state %d\n", ttsn().c_str(), sub_state); + logerror("seek unknown sub-state %d\n", ttsn().c_str(), sub_state); return; } } @@ -407,7 +407,7 @@ void wd_fdc_t::seek_continue() bool wd_fdc_t::sector_matches() const { if(TRACE_MATCH) - logerror("%s: matching read T=%02x H=%02x S=%02x L=%02x - searched T=%02x S=%02x\n", tag(), + logerror("matching read T=%02x H=%02x S=%02x L=%02x - searched T=%02x S=%02x\n", cur_live.idbuf[0], cur_live.idbuf[1], cur_live.idbuf[2], cur_live.idbuf[3], track, sector); @@ -428,7 +428,7 @@ bool wd_fdc_t::is_ready() void wd_fdc_t::read_sector_start() { - if (TRACE_COMMAND) logerror("%s: read sector%s (c=%02x) t=%d, s=%d\n", tag(), command & 0x10 ? " multiple" : "", command, track, sector); + if (TRACE_COMMAND) logerror("read sector%s (c=%02x) t=%d, s=%d\n", command & 0x10 ? " multiple" : "", command, track, sector); if(!is_ready()) { command_end(); return; @@ -449,7 +449,7 @@ void wd_fdc_t::read_sector_continue() for(;;) { switch(sub_state) { case SPINUP: - if (TRACE_STATE) logerror("%s: SPINUP\n", tag()); + if (TRACE_STATE) logerror("SPINUP\n"); if(!(status & S_MON)) { spinup(); return; @@ -458,11 +458,11 @@ void wd_fdc_t::read_sector_continue() break; case SPINUP_WAIT: - if (TRACE_STATE) logerror("%s: SPINUP_WAIT\n", tag()); + if (TRACE_STATE) logerror("SPINUP_WAIT\n"); return; case SPINUP_DONE: - if (TRACE_STATE) logerror("%s: SPINUP_DONE\n", tag()); + if (TRACE_STATE) logerror("SPINUP_DONE\n"); if(command & 4) { sub_state = SETTLE_WAIT; delay_cycles(t_gen, settle_time()); @@ -473,18 +473,18 @@ void wd_fdc_t::read_sector_continue() } case SETTLE_WAIT: - if (TRACE_STATE) logerror("%s: SETTLE_WAIT\n", tag()); + if (TRACE_STATE) logerror("SETTLE_WAIT\n"); return; case SETTLE_DONE: - if (TRACE_STATE) logerror("%s: SETTLE_DONE\n", tag()); + if (TRACE_STATE) logerror("SETTLE_DONE\n"); sub_state = SCAN_ID; counter = 0; live_start(SEARCH_ADDRESS_MARK_HEADER); return; case SCAN_ID: - if (TRACE_STATE) logerror("%s: SCAN_ID\n", tag()); + if (TRACE_STATE) logerror("SCAN_ID\n"); if(!sector_matches()) { live_start(SEARCH_ADDRESS_MARK_HEADER); return; @@ -500,13 +500,13 @@ void wd_fdc_t::read_sector_continue() return; case SCAN_ID_FAILED: - if (TRACE_STATE) logerror("%s: SCAN_ID_FAILED\n", tag()); + if (TRACE_STATE) logerror("SCAN_ID_FAILED\n"); status |= S_RNF; command_end(); return; case SECTOR_READ: - if (TRACE_STATE) logerror("%s: SECTOR_READ\n", tag()); + if (TRACE_STATE) logerror("SECTOR_READ\n"); if(cur_live.crc) status |= S_CRC; @@ -520,7 +520,7 @@ void wd_fdc_t::read_sector_continue() break; default: - logerror("%s: read sector unknown sub-state %d\n", ttsn().c_str(), sub_state); + logerror("read sector unknown sub-state %d\n", ttsn().c_str(), sub_state); return; } } @@ -528,7 +528,7 @@ void wd_fdc_t::read_sector_continue() void wd_fdc_t::read_track_start() { - if (TRACE_COMMAND) logerror("%s: read track (c=%02x) t=%d\n", tag(), command, track); + if (TRACE_COMMAND) logerror("read track (c=%02x) t=%d\n", command, track); if(!is_ready()) { command_end(); @@ -550,7 +550,7 @@ void wd_fdc_t::read_track_continue() for(;;) { switch(sub_state) { case SPINUP: - if (TRACE_STATE) logerror("%s: SPINUP\n", tag()); + if (TRACE_STATE) logerror("SPINUP\n"); if(!(status & S_MON)) { spinup(); return; @@ -559,11 +559,11 @@ void wd_fdc_t::read_track_continue() break; case SPINUP_WAIT: - if (TRACE_STATE) logerror("%s: SPINUP_WAIT\n", tag()); + if (TRACE_STATE) logerror("SPINUP_WAIT\n"); return; case SPINUP_DONE: - if (TRACE_STATE) logerror("%s: SPINUP_DONE\n", tag()); + if (TRACE_STATE) logerror("SPINUP_DONE\n"); if(command & 4) { sub_state = SETTLE_WAIT; delay_cycles(t_gen, settle_time()); @@ -575,31 +575,31 @@ void wd_fdc_t::read_track_continue() } case SETTLE_WAIT: - if (TRACE_STATE) logerror("%s: SETTLE_WAIT\n", tag()); + if (TRACE_STATE) logerror("SETTLE_WAIT\n"); return; case SETTLE_DONE: - if (TRACE_STATE) logerror("%s: SETTLE_DONE\n", tag()); + if (TRACE_STATE) logerror("SETTLE_DONE\n"); sub_state = WAIT_INDEX; return; case WAIT_INDEX: - if (TRACE_STATE) logerror("%s: WAIT_INDEX\n", tag()); + if (TRACE_STATE) logerror("WAIT_INDEX\n"); return; case WAIT_INDEX_DONE: - if (TRACE_STATE) logerror("%s: WAIT_INDEX_DONE\n", tag()); + if (TRACE_STATE) logerror("WAIT_INDEX_DONE\n"); sub_state = TRACK_DONE; live_start(READ_TRACK_DATA); return; case TRACK_DONE: - if (TRACE_STATE) logerror("%s: TRACK_DONE\n", tag()); + if (TRACE_STATE) logerror("TRACK_DONE\n"); command_end(); return; default: - logerror("%s: read track unknown sub-state %d\n", ttsn().c_str(), sub_state); + logerror("read track unknown sub-state %d\n", ttsn().c_str(), sub_state); return; } } @@ -607,7 +607,7 @@ void wd_fdc_t::read_track_continue() void wd_fdc_t::read_id_start() { - if (TRACE_COMMAND) logerror("%s: read id (c=%02x)\n", tag(), command); + if (TRACE_COMMAND) logerror("read id (c=%02x)\n", command); if(!is_ready()) { command_end(); return; @@ -628,7 +628,7 @@ void wd_fdc_t::read_id_continue() for(;;) { switch(sub_state) { case SPINUP: - if (TRACE_STATE) logerror("%s: SPINUP\n", tag()); + if (TRACE_STATE) logerror("SPINUP\n"); if(!(status & S_MON)) { spinup(); return; @@ -637,11 +637,11 @@ void wd_fdc_t::read_id_continue() break; case SPINUP_WAIT: - if (TRACE_STATE) logerror("%s: SPINUP_WAIT\n", tag()); + if (TRACE_STATE) logerror("SPINUP_WAIT\n"); return; case SPINUP_DONE: - if (TRACE_STATE) logerror("%s: SPINUP_DONE\n", tag()); + if (TRACE_STATE) logerror("SPINUP_DONE\n"); if(command & 4) { sub_state = SETTLE_WAIT; delay_cycles(t_gen, settle_time()); @@ -652,29 +652,29 @@ void wd_fdc_t::read_id_continue() } case SETTLE_WAIT: - if (TRACE_STATE) logerror("%s: SETTLE_WAIT\n", tag()); + if (TRACE_STATE) logerror("SETTLE_WAIT\n"); return; case SETTLE_DONE: - if (TRACE_STATE) logerror("%s: SETTLE_DONE\n", tag()); + if (TRACE_STATE) logerror("SETTLE_DONE\n"); sub_state = SCAN_ID; counter = 0; live_start(SEARCH_ADDRESS_MARK_HEADER); return; case SCAN_ID: - if (TRACE_STATE) logerror("%s: SCAN_ID\n", tag()); + if (TRACE_STATE) logerror("SCAN_ID\n"); command_end(); return; case SCAN_ID_FAILED: - if (TRACE_STATE) logerror("%s: SCAN_ID_FAILED\n", tag()); + if (TRACE_STATE) logerror("SCAN_ID_FAILED\n"); status |= S_RNF; command_end(); return; default: - logerror("%s: read id unknown sub-state %d\n", ttsn().c_str(), sub_state); + logerror("read id unknown sub-state %d\n", ttsn().c_str(), sub_state); return; } } @@ -682,7 +682,7 @@ void wd_fdc_t::read_id_continue() void wd_fdc_t::write_track_start() { - if (TRACE_COMMAND) logerror("%s: write track (c=%02x) t=%d\n", tag(), command, track); + if (TRACE_COMMAND) logerror("write track (c=%02x) t=%d\n", command, track); if(!is_ready()) { command_end(); @@ -709,7 +709,7 @@ void wd_fdc_t::write_track_continue() for(;;) { switch(sub_state) { case SPINUP: - if (TRACE_STATE) logerror("%s: SPINUP\n", tag()); + if (TRACE_STATE) logerror("SPINUP\n"); if(!(status & S_MON)) { spinup(); return; @@ -718,11 +718,11 @@ void wd_fdc_t::write_track_continue() break; case SPINUP_WAIT: - if (TRACE_STATE) logerror("%s: SPINUP_WAIT\n", tag()); + if (TRACE_STATE) logerror("SPINUP_WAIT\n"); return; case SPINUP_DONE: - if (TRACE_STATE) logerror("%s: SPINUP_DONE\n", tag()); + if (TRACE_STATE) logerror("SPINUP_DONE\n"); if(command & 4) { sub_state = SETTLE_WAIT; delay_cycles(t_gen, settle_time()); @@ -733,22 +733,22 @@ void wd_fdc_t::write_track_continue() } case SETTLE_WAIT: - if (TRACE_STATE) logerror("%s: SETTLE_WAIT\n", tag()); + if (TRACE_STATE) logerror("SETTLE_WAIT\n"); return; case SETTLE_DONE: - if (TRACE_STATE) logerror("%s: SETTLE_DONE\n", tag()); + if (TRACE_STATE) logerror("SETTLE_DONE\n"); set_drq(); sub_state = DATA_LOAD_WAIT; delay_cycles(t_gen, 192); return; case DATA_LOAD_WAIT: - if (TRACE_STATE) logerror("%s: DATA_LOAD_WAIT\n", tag()); + if (TRACE_STATE) logerror("DATA_LOAD_WAIT\n"); return; case DATA_LOAD_WAIT_DONE: - if (TRACE_STATE) logerror("%s: DATA_LOAD_WAIT_DONE\n", tag()); + if (TRACE_STATE) logerror("DATA_LOAD_WAIT_DONE\n"); if(drq) { status |= S_LOST; drop_drq(); @@ -759,18 +759,18 @@ void wd_fdc_t::write_track_continue() break; case WAIT_INDEX: - if (TRACE_STATE) logerror("%s: WAIT_INDEX\n", tag()); + if (TRACE_STATE) logerror("WAIT_INDEX\n"); return; case WAIT_INDEX_DONE: - if (TRACE_STATE) logerror("%s: WAIT_INDEX_DONE\n", tag()); + if (TRACE_STATE) logerror("WAIT_INDEX_DONE\n"); sub_state = TRACK_DONE; live_start(WRITE_TRACK_DATA); pll_start_writing(machine().time()); return; case TRACK_DONE: - if (TRACE_STATE) logerror("%s: TRACK_DONE\n", tag()); + if (TRACE_STATE) logerror("TRACK_DONE\n"); if(format_last_byte_count) { char buf[32]; if(format_last_byte_count > 1) @@ -779,12 +779,12 @@ void wd_fdc_t::write_track_continue() sprintf(buf, "%02x", format_last_byte); format_description_string += buf; } - if (TRACE_DESC) logerror("%s: track description %s\n", tag(), format_description_string.c_str()); + if (TRACE_DESC) logerror("track description %s\n", format_description_string.c_str()); command_end(); return; default: - logerror("%s: write track unknown sub-state %d\n", ttsn().c_str(), sub_state); + logerror("write track unknown sub-state %d\n", ttsn().c_str(), sub_state); return; } } @@ -793,7 +793,7 @@ void wd_fdc_t::write_track_continue() void wd_fdc_t::write_sector_start() { - if (TRACE_COMMAND) logerror("%s: write sector%s (c=%02x) t=%d, s=%d\n", tag(), command & 0x10 ? " multiple" : "", command, track, sector); + if (TRACE_COMMAND) logerror("write sector%s (c=%02x) t=%d, s=%d\n", command & 0x10 ? " multiple" : "", command, track, sector); if(!is_ready()) { command_end(); @@ -815,7 +815,7 @@ void wd_fdc_t::write_sector_continue() for(;;) { switch(sub_state) { case SPINUP: - if (TRACE_STATE) logerror("%s: SPINUP\n", tag()); + if (TRACE_STATE) logerror("SPINUP\n"); if(!(status & S_MON)) { spinup(); return; @@ -824,11 +824,11 @@ void wd_fdc_t::write_sector_continue() break; case SPINUP_WAIT: - if (TRACE_STATE) logerror("%s: SPINUP_WAIT\n", tag()); + if (TRACE_STATE) logerror("SPINUP_WAIT\n"); return; case SPINUP_DONE: - if (TRACE_STATE) logerror("%s: SPINUP_DONE\n", tag()); + if (TRACE_STATE) logerror("SPINUP_DONE\n"); if(command & 4) { sub_state = SETTLE_WAIT; delay_cycles(t_gen, settle_time()); @@ -839,18 +839,18 @@ void wd_fdc_t::write_sector_continue() } case SETTLE_WAIT: - if (TRACE_STATE) logerror("%s: SETTLE_WAIT\n", tag()); + if (TRACE_STATE) logerror("SETTLE_WAIT\n"); return; case SETTLE_DONE: - if (TRACE_STATE) logerror("%s: SETTLE_DONE\n", tag()); + if (TRACE_STATE) logerror("SETTLE_DONE\n"); sub_state = SCAN_ID; counter = 0; live_start(SEARCH_ADDRESS_MARK_HEADER); return; case SCAN_ID: - if (TRACE_STATE) logerror("%s: SCAN_ID\n", tag()); + if (TRACE_STATE) logerror("SCAN_ID\n"); if(!sector_matches()) { live_start(SEARCH_ADDRESS_MARK_HEADER); return; @@ -866,13 +866,13 @@ void wd_fdc_t::write_sector_continue() return; case SCAN_ID_FAILED: - if (TRACE_STATE) logerror("%s: SCAN_ID_FAILED\n", tag()); + if (TRACE_STATE) logerror("SCAN_ID_FAILED\n"); status |= S_RNF; command_end(); return; case SECTOR_WRITE: - if (TRACE_STATE) logerror("%s: SECTOR_WRITE\n", tag()); + if (TRACE_STATE) logerror("SECTOR_WRITE\n"); if(command & 0x10) { sector++; sub_state = SPINUP_DONE; @@ -883,7 +883,7 @@ void wd_fdc_t::write_sector_continue() break; default: - logerror("%s: write sector unknown sub-state %d\n", ttsn().c_str(), sub_state); + logerror("write sector unknown sub-state %d\n", ttsn().c_str(), sub_state); return; } } @@ -891,7 +891,7 @@ void wd_fdc_t::write_sector_continue() void wd_fdc_t::interrupt_start() { - if (TRACE_COMMAND) logerror("%s: Forced interrupt (c=%02x)\n", tag(), command); + if (TRACE_COMMAND) logerror("Forced interrupt (c=%02x)\n", command); if(status & S_BUSY) { main_state = sub_state = cur_live.state = IDLE; @@ -990,6 +990,11 @@ void wd_fdc_t::do_generic() sub_state = DATA_LOAD_WAIT_DONE; break; + case INITIAL_RESTORE: + last_dir = 1; + seek_start(RESTORE); + break; + default: if(cur_live.tm.is_never()) logerror("%s: do_generic on unknown sub-state %d\n", ttsn().c_str(), sub_state); @@ -1055,7 +1060,7 @@ void wd_fdc_t::do_cmd_w() void wd_fdc_t::cmd_w(UINT8 val) { - if (TRACE_COMP) logerror("%s: Initiating command %02x\n", tag(), val); + if (TRACE_COMP) logerror("Initiating command %02x\n", val); if (inverted_bus) val ^= 0xff; if(intrq && !(intrq_cond & I_IMM)) { @@ -1273,7 +1278,7 @@ void wd_fdc_t::index_callback(floppy_image_device *floppy, int state) if(!intrq_cb.isnull()) intrq_cb(intrq); } - + logerror("tick %d\n", state); switch(sub_state) { case IDLE: if(motor_control || head_control) { @@ -1492,7 +1497,7 @@ bool wd_fdc_t::write_one_bit(const attotime &limit) void wd_fdc_t::live_write_raw(UINT16 raw) { - if (TRACE_WRITE) logerror("%s: write raw %04x, CRC=%04x\n", tag(), raw, cur_live.crc); + if (TRACE_WRITE) logerror("write raw %04x, CRC=%04x\n", raw, cur_live.crc); cur_live.shift_reg = raw; cur_live.data_bit_context = raw & 1; } @@ -1511,7 +1516,7 @@ void wd_fdc_t::live_write_mfm(UINT8 mfm) } cur_live.shift_reg = raw; cur_live.data_bit_context = context; - if (TRACE_WRITE) logerror("%s: live_write_mfm byte=%02x, raw=%04x, CRC=%04x\n", tag(), mfm, raw, cur_live.crc); + if (TRACE_WRITE) logerror("live_write_mfm byte=%02x, raw=%04x, CRC=%04x\n", mfm, raw, cur_live.crc); } @@ -1524,7 +1529,7 @@ void wd_fdc_t::live_write_fm(UINT8 fm) cur_live.data_reg = fm; cur_live.shift_reg = raw; cur_live.data_bit_context = fm & 1; - if (TRACE_WRITE) logerror("%s: live_write_fm byte=%02x, raw=%04x, CRC=%04x\n", tag(), fm, raw, cur_live.crc); + if (TRACE_WRITE) logerror("live_write_fm byte=%02x, raw=%04x, CRC=%04x\n", fm, raw, cur_live.crc); } void wd_fdc_t::live_run(attotime limit) diff --git a/src/devices/machine/wd_fdc.h b/src/devices/machine/wd_fdc.h index 4abc761e74b..8aab3309264 100644 --- a/src/devices/machine/wd_fdc.h +++ b/src/devices/machine/wd_fdc.h @@ -275,7 +275,7 @@ private: WRITE_TRACK, WRITE_SECTOR, - // Sub states + // Sub states, plus the reset-time restore request SPINUP, SPINUP_WAIT, @@ -304,6 +304,8 @@ private: SECTOR_WRITE, TRACK_DONE, + INITIAL_RESTORE, + // Live states SEARCH_ADDRESS_MARK_HEADER, diff --git a/src/mame/drivers/esq5505.cpp b/src/mame/drivers/esq5505.cpp index fa0d3dc8a56..db14c6b1a2a 100644 --- a/src/mame/drivers/esq5505.cpp +++ b/src/mame/drivers/esq5505.cpp @@ -306,11 +306,11 @@ void esq5505_state::machine_reset() if (floppy) { - m_duart->ip0_w(ASSERT_LINE); + m_duart->ip0_w(CLEAR_LINE); } else { - m_duart->ip0_w(CLEAR_LINE); + m_duart->ip0_w(ASSERT_LINE); } } } @@ -347,7 +347,7 @@ READ16_MEMBER(esq5505_state::lower_r) m_ram = (UINT16 *)(void *)memshare("osram")->ptr(); } - if (m_maincpu->get_fc() == 0x6) // supervisor mode = ROM + if (!space.debugger_access() && m_maincpu->get_fc() == 0x6) // supervisor mode = ROM { return m_rom[offset]; } @@ -363,7 +363,7 @@ WRITE16_MEMBER(esq5505_state::lower_w) if (offset < 0x4000) { - if (m_maincpu->get_fc() != 0x6) // if not supervisor mode, RAM + if (space.debugger_access() || m_maincpu->get_fc() != 0x6) // if not supervisor mode, RAM { COMBINE_DATA(&m_ram[offset]); } -- cgit v1.2.3-70-g09d2 From 302337a294d27d5b2c36e4db1e290e93b09e98e4 Mon Sep 17 00:00:00 2001 From: angelosa Date: Thu, 10 Mar 2016 19:39:09 +0100 Subject: Checkpoint, nw --- src/mame/drivers/toypop.cpp | 261 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 254 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp index 148ec231f2c..ef88792f680 100644 --- a/src/mame/drivers/toypop.cpp +++ b/src/mame/drivers/toypop.cpp @@ -22,6 +22,8 @@ Notes: #include "emu.h" #include "cpu/m6809/m6809.h" #include "cpu/m68000/m68000.h" +#include "machine/namcoio.h" +#include "sound/namco.h" #define MASTER_CLOCK XTAL_6_144MHz @@ -31,13 +33,25 @@ public: toypop_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_master_cpu(*this,"maincpu"), + m_slave_cpu(*this, "slave"), + m_sound_cpu(*this, "audiocpu"), + m_namco15xx(*this, "namco"), + m_namco58xx(*this, "58xx"), + m_namco56xx_1(*this, "56xx_1"), + m_namco56xx_2(*this, "56xx_2"), m_gfxdecode(*this, "gfxdecode"), m_fgvram(*this, "fgvram"), m_fgattr(*this, "fgattr") { } required_device m_master_cpu; + required_device m_slave_cpu; + required_device m_sound_cpu; + required_device m_namco15xx; + required_device m_namco58xx; + required_device m_namco56xx_1; + required_device m_namco56xx_2; required_device m_gfxdecode; required_shared_ptr m_fgvram; @@ -48,7 +62,13 @@ public: DECLARE_READ8_MEMBER(irq_enable_r); INTERRUPT_GEN_MEMBER(master_vblank_irq); DECLARE_PALETTE_INIT(toypop); - + DECLARE_READ8_MEMBER(dipA_l); + DECLARE_READ8_MEMBER(dipA_h); + DECLARE_READ8_MEMBER(dipB_l); + DECLARE_READ8_MEMBER(dipB_h); + //DECLARE_WRITE8_MEMBER(out_coin0); + //DECLARE_WRITE8_MEMBER(out_coin1); + DECLARE_WRITE8_MEMBER(flip); protected: // driver_device overrides // virtual void machine_start() override; @@ -158,24 +178,233 @@ READ8_MEMBER(toypop_state::irq_enable_r) return 0; } +READ8_MEMBER(toypop_state::dipA_l){ return ioport("DSW1")->read(); } // dips A +READ8_MEMBER(toypop_state::dipA_h){ return ioport("DSW1")->read() >> 4; } // dips A +READ8_MEMBER(toypop_state::dipB_l){ return ioport("DSW2")->read(); } // dips B +READ8_MEMBER(toypop_state::dipB_h){ return ioport("DSW2")->read() >> 4; } // dips B + +WRITE8_MEMBER(toypop_state::flip) +{ + flip_screen_set(data & 1); +} + static ADDRESS_MAP_START( master_map, AS_PROGRAM, 8, toypop_state ) AM_RANGE(0x0000, 0x03ff) AM_RAM AM_SHARE("fgvram") AM_RANGE(0x0400, 0x07ff) AM_RAM AM_SHARE("fgattr") AM_RANGE(0x0800, 0x1fff) AM_RAM AM_RANGE(0x2800, 0x2fff) AM_RAM - // 0x6000 - 0x603f namco i/o - AM_RANGE(0x6800, 0x6bff) AM_RAM // shared ram device + // TODO: 0x6xxx-0x7xxx seems to be programmable somehow (PAL?) + AM_RANGE(0x6000, 0x600f) AM_DEVREADWRITE("58xx", namco58xx_device, read, write) + AM_RANGE(0x6010, 0x601f) AM_DEVREADWRITE("56xx_1", namco56xx_device, read, write) + AM_RANGE(0x6020, 0x602f) AM_DEVREADWRITE("56xx_2", namco56xx_device, read, write) + AM_RANGE(0x6800, 0x6bff) AM_DEVREADWRITE("namco", namco_15xx_device, sharedram_r, sharedram_w) AM_RANGE(0x7000, 0x7000) AM_READ(irq_enable_r) + // 0x8000 m68k irq // 0x9000 sound irq // 0xa000 paletteram AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION("master_rom",0) ADDRESS_MAP_END +static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 16, toypop_state ) + AM_RANGE(0x000000, 0x007fff) AM_ROM AM_REGION("slave_rom", 0) + AM_RANGE(0x080000, 0x0bffff) AM_RAM +ADDRESS_MAP_END + +static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, toypop_state ) + AM_RANGE(0x0000, 0x03ff) AM_DEVREADWRITE("namco", namco_15xx_device, sharedram_r, sharedram_w) + AM_RANGE(0xe000, 0xffff) AM_ROM AM_REGION("sound_rom", 0) +ADDRESS_MAP_END + static INPUT_PORTS_START( liblrabl ) + /* The inputs are not memory mapped, they are handled by three I/O chips. */ + PORT_START("P1_RIGHT") /* 58XX #0 pins 22-29 */ + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY + + PORT_START("P2_RIGHT") /* 58XX #0 pins 22-29 */ + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY PORT_COCKTAIL + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY PORT_COCKTAIL + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY PORT_COCKTAIL + + PORT_START("P1_LEFT") /* 56XX #2 pins 22-29 */ + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY + + PORT_START("P2_LEFT") /* 56XX #2 pins 22-29 */ + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY PORT_COCKTAIL + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY PORT_COCKTAIL + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY PORT_COCKTAIL + + PORT_START("BUTTONS") /* 58XX #0 pins 30-33 and 38-41 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) + + PORT_START("COINS") /* 58XX #0 pins 30-33 and 38-41 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) + + PORT_START("DSW1") /* 56XX #1 pins 22-29 */ + /* default setting: all OFF */ + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:8,7") + PORT_DIPSETTING( 0x02, "1" ) + PORT_DIPSETTING( 0x00, "2" ) + PORT_DIPSETTING( 0x03, "3" ) + PORT_DIPSETTING( 0x01, "5" ) + PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWA:6,5,4") + // bonus scores for common + PORT_DIPSETTING( 0x1c, "40k 120k 200k 400k 600k 1m" ) + PORT_DIPSETTING( 0x0c, "40k 140k 250k 400k 700k 1m" ) + // bonus scores for 1, 2 or 3 lives + PORT_DIPSETTING( 0x14, "50k 150k 300k 500k 700k 1m" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) + PORT_DIPSETTING( 0x04, "40k 120k and every 120k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) + PORT_DIPSETTING( 0x18, "40k 150k and every 150k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) + PORT_DIPSETTING( 0x08, "50k 150k 300k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) + PORT_DIPSETTING( 0x10, "40k 120k 200k" ) PORT_CONDITION("DSW1", 0x03, NOTEQUALS, 0x01) + // bonus scores for 5 lives + PORT_DIPSETTING( 0x14, "40k 120k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) + PORT_DIPSETTING( 0x04, "50k 150k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) + PORT_DIPSETTING( 0x18, "50k 150k and every 150k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) + PORT_DIPSETTING( 0x08, "60k 200k and every 200k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) + PORT_DIPSETTING( 0x10, "50k" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01) + // bonus scores for common + PORT_DIPSETTING( 0x00, DEF_STR( None ) ) + PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:3,2,1") + PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0xc0, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 3C_2C ) ) + PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x60, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 1C_6C ) ) + + PORT_START("DSW2") /* 56XX #1 pins 30-33 and 38-41 */ + PORT_DIPNAME( 0x01, 0x01, "Freeze" ) PORT_DIPLOCATION("SWB:8") + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, "Rack Test" ) PORT_DIPLOCATION("SWB:7") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:6") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x04, DEF_STR( On ) ) + PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWB:5,4") + PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 1C_7C ) ) + PORT_DIPNAME( 0x20, 0x20, "Practice" ) PORT_DIPLOCATION("SWB:3") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x20, DEF_STR( On ) ) + PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:2,1") + PORT_DIPSETTING( 0xc0, "A" ) + PORT_DIPSETTING( 0x40, "B" ) + PORT_DIPSETTING( 0x80, "C" ) + PORT_DIPSETTING( 0x00, "D" ) + + PORT_START("SERVICE") /* 56XX #2 pins 30-33 */ + PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) + PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) INPUT_PORTS_END static INPUT_PORTS_START( toypop ) + /* The inputs are not memory mapped, they are handled by three I/O chips. */ + PORT_START("P1_RIGHT") /* 58XX #0 pins 22-29 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY + + PORT_START("P2_RIGHT") /* 58XX #0 pins 22-29 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) + + PORT_START("BUTTONS") /* 58XX #0 pins 30-33 and 38-41 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) + + PORT_START("COINS") /* 58XX #0 pins 30-33 and 38-41 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) + + PORT_START("DSW1") /* 56XX #1 pins 22-29 */ + /* default setting: all OFF */ + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:8,7") + PORT_DIPSETTING( 0x02, "1" ) + PORT_DIPSETTING( 0x01, "2" ) + PORT_DIPSETTING( 0x03, "3" ) + PORT_DIPSETTING( 0x00, "5" ) + PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:6,5") + PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) + PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:4,3") + PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWA:2") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_SERVICE_DIPLOC( 0x80, 0x80, "SWA:1" ) + + PORT_START("DSW2") /* 56XX #1 pins 30-33 and 38-41 */ + PORT_DIPNAME( 0x01, 0x01, "Freeze" ) PORT_DIPLOCATION("SWB:8") + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Level_Select ) ) PORT_DIPLOCATION("SWB:7") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, "2 Players Game" ) PORT_DIPLOCATION("SWB:6") + PORT_DIPSETTING( 0x00, "1 Credit" ) + PORT_DIPSETTING( 0x04, "2 Credits" ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:5") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, "Entering" ) PORT_DIPLOCATION("SWB:4") // buy in + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) + PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:3,2") + PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x60, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWB:1") + PORT_DIPSETTING( 0x80, "Every 15000 points" ) + PORT_DIPSETTING( 0x00, "Every 20000 points" ) + + PORT_START("P1_LEFT") /* 56XX #2 pins 22-29 */ + PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("P2_LEFT") /* 56XX #2 pins 22-29 */ + PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("SERVICE") /* 56XX #2 pins 30-33 */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) // would be Cabinet, but this game has no cocktail mode + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) // service mode again INPUT_PORTS_END @@ -224,7 +453,6 @@ static MACHINE_CONFIG_START( liblrabl, toypop_state ) MCFG_CPU_PROGRAM_MAP(master_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, master_vblank_irq) -#if 0 MCFG_CPU_ADD("slave", M68000, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(slave_map) @@ -233,7 +461,24 @@ static MACHINE_CONFIG_START( liblrabl, toypop_state ) -#endif + + MCFG_DEVICE_ADD("58xx", NAMCO58XX, 0) + MCFG_NAMCO58XX_IN_0_CB(IOPORT("COINS")) + MCFG_NAMCO58XX_IN_1_CB(IOPORT("P1_RIGHT")) + MCFG_NAMCO58XX_IN_2_CB(IOPORT("P2_RIGHT")) + MCFG_NAMCO58XX_IN_3_CB(IOPORT("BUTTONS")) + + MCFG_DEVICE_ADD("56xx_1", NAMCO56XX, 0) + MCFG_NAMCO56XX_IN_0_CB(READ8(toypop_state, dipA_h)) + MCFG_NAMCO56XX_IN_1_CB(READ8(toypop_state, dipB_l)) + MCFG_NAMCO56XX_IN_2_CB(READ8(toypop_state, dipB_h)) + MCFG_NAMCO56XX_IN_3_CB(READ8(toypop_state, dipA_l)) + MCFG_NAMCO56XX_OUT_0_CB(WRITE8(toypop_state, flip)) + + MCFG_DEVICE_ADD("56xx_2", NAMCO56XX, 0) + MCFG_NAMCO56XX_IN_1_CB(IOPORT("P1_LEFT")) + MCFG_NAMCO56XX_IN_2_CB(IOPORT("P2_LEFT")) + MCFG_NAMCO56XX_IN_3_CB(IOPORT("SERVICE")) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60.606060) @@ -250,7 +495,9 @@ static MACHINE_CONFIG_START( liblrabl, toypop_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - + MCFG_SOUND_ADD("namco", NAMCO_15XX, 24000) + MCFG_NAMCO_AUDIO_VOICES(8) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( toypop, liblrabl ) @@ -316,4 +563,4 @@ ROM_START( toypop ) ROM_END GAME( 1983, liblrabl, 0, liblrabl, liblrabl, driver_device, 0, ROT0, "Namco", "Libble Rabble", MACHINE_IS_SKELETON ) -GAME( 1986, toypop, 0, toypop, toypop, driver_device, 0, ROT0, "Namco", "Toypop", MACHINE_IS_SKELETON ) +GAME( 1986, toypop, 0, toypop, toypop, driver_device, 0, ROT0, "Namco", "Toypop", MACHINE_IS_SKELETON ) -- cgit v1.2.3-70-g09d2 From 0713ab0c6718d0d09abcdec615afe19642ff6f53 Mon Sep 17 00:00:00 2001 From: angelosa Date: Thu, 10 Mar 2016 20:02:08 +0100 Subject: More work towards getting comms right ... --- src/mame/drivers/toypop.cpp | 57 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp index ef88792f680..fb95ee3f4e3 100644 --- a/src/mame/drivers/toypop.cpp +++ b/src/mame/drivers/toypop.cpp @@ -40,6 +40,7 @@ public: m_namco56xx_1(*this, "56xx_1"), m_namco56xx_2(*this, "56xx_2"), m_gfxdecode(*this, "gfxdecode"), + m_slave_sharedram(*this, "slave_sharedram"), m_fgvram(*this, "fgvram"), m_fgattr(*this, "fgattr") { } @@ -54,13 +55,15 @@ public: required_device m_namco56xx_2; required_device m_gfxdecode; + required_shared_ptr m_slave_sharedram; required_shared_ptr m_fgvram; required_shared_ptr m_fgattr; UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER(irq_enable_r); INTERRUPT_GEN_MEMBER(master_vblank_irq); + DECLARE_READ8_MEMBER(irq_enable_r); + DECLARE_WRITE8_MEMBER(irq_disable_w); DECLARE_PALETTE_INIT(toypop); DECLARE_READ8_MEMBER(dipA_l); DECLARE_READ8_MEMBER(dipA_h); @@ -69,6 +72,10 @@ public: //DECLARE_WRITE8_MEMBER(out_coin0); //DECLARE_WRITE8_MEMBER(out_coin1); DECLARE_WRITE8_MEMBER(flip); + DECLARE_WRITE8_MEMBER(slave_halt_ctrl_w); + DECLARE_READ8_MEMBER(slave_shared_r); + DECLARE_WRITE8_MEMBER(slave_shared_w); + DECLARE_WRITE8_MEMBER(sound_halt_ctrl_w); protected: // driver_device overrides // virtual void machine_start() override; @@ -158,7 +165,7 @@ void toypop_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect } UINT16 tile = m_fgvram[count]; - UINT8 color = m_fgattr[count] & 0x3f; + UINT8 color = (m_fgattr[count] & 0x3f) + 0x40; //if((color & 0x30) != 0x30) gfx_0->opaque(bitmap,cliprect,tile,color,0,0,x*8,y*8); @@ -178,6 +185,31 @@ READ8_MEMBER(toypop_state::irq_enable_r) return 0; } +WRITE8_MEMBER(toypop_state::irq_disable_w) +{ + m_master_irq_enable = false; +} + +WRITE8_MEMBER(toypop_state::slave_halt_ctrl_w) +{ + m_slave_cpu->set_input_line(INPUT_LINE_RESET,offset & 0x800 ? ASSERT_LINE : CLEAR_LINE); +} + +WRITE8_MEMBER(toypop_state::sound_halt_ctrl_w) +{ + m_sound_cpu->set_input_line(INPUT_LINE_RESET,offset & 0x800 ? ASSERT_LINE : CLEAR_LINE); +} + +READ8_MEMBER(toypop_state::slave_shared_r) +{ + return m_slave_sharedram[offset]; +} + +WRITE8_MEMBER(toypop_state::slave_shared_w) +{ + m_slave_sharedram[offset] = data; +} + READ8_MEMBER(toypop_state::dipA_l){ return ioport("DSW1")->read(); } // dips A READ8_MEMBER(toypop_state::dipA_h){ return ioport("DSW1")->read() >> 4; } // dips A READ8_MEMBER(toypop_state::dipB_l){ return ioport("DSW2")->read(); } // dips B @@ -192,23 +224,24 @@ static ADDRESS_MAP_START( master_map, AS_PROGRAM, 8, toypop_state ) AM_RANGE(0x0000, 0x03ff) AM_RAM AM_SHARE("fgvram") AM_RANGE(0x0400, 0x07ff) AM_RAM AM_SHARE("fgattr") AM_RANGE(0x0800, 0x1fff) AM_RAM - AM_RANGE(0x2800, 0x2fff) AM_RAM + AM_RANGE(0x2800, 0x2fff) AM_RAM AM_SHARE("slave_sharedram") // TODO: 0x6xxx-0x7xxx seems to be programmable somehow (PAL?) AM_RANGE(0x6000, 0x600f) AM_DEVREADWRITE("58xx", namco58xx_device, read, write) AM_RANGE(0x6010, 0x601f) AM_DEVREADWRITE("56xx_1", namco56xx_device, read, write) AM_RANGE(0x6020, 0x602f) AM_DEVREADWRITE("56xx_2", namco56xx_device, read, write) AM_RANGE(0x6800, 0x6bff) AM_DEVREADWRITE("namco", namco_15xx_device, sharedram_r, sharedram_w) - AM_RANGE(0x7000, 0x7000) AM_READ(irq_enable_r) + AM_RANGE(0x7000, 0x7000) AM_READWRITE(irq_enable_r,irq_disable_w) - // 0x8000 m68k irq - // 0x9000 sound irq - // 0xa000 paletteram + AM_RANGE(0x8000, 0x8fff) AM_WRITE(slave_halt_ctrl_w) + AM_RANGE(0x9000, 0x9fff) AM_WRITE(sound_halt_ctrl_w) + // 0xa000 palette bank AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION("master_rom",0) ADDRESS_MAP_END static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 16, toypop_state ) AM_RANGE(0x000000, 0x007fff) AM_ROM AM_REGION("slave_rom", 0) AM_RANGE(0x080000, 0x0bffff) AM_RAM + AM_RANGE(0x100000, 0x100fff) AM_READWRITE8(slave_shared_r,slave_shared_w,0x00ff) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, toypop_state ) @@ -440,6 +473,8 @@ GFXDECODE_END void toypop_state::machine_reset() { m_master_irq_enable = false; + m_slave_cpu->set_input_line(INPUT_LINE_RESET,ASSERT_LINE); + m_sound_cpu->set_input_line(INPUT_LINE_RESET,ASSERT_LINE); } INTERRUPT_GEN_MEMBER(toypop_state::master_vblank_irq) @@ -513,8 +548,8 @@ ROM_START( liblrabl ) ROM_LOAD( "2c.rom", 0x0000, 0x2000, CRC(7c09e50a) SHA1(5f004d60bbb7355e008a9cda137b28bc2192b8ef) ) ROM_REGION( 0x8000, "slave_rom", 0 ) - ROM_LOAD16_BYTE( "8c.rom", 0x0000, 0x4000, CRC(a00cd959) SHA1(cc5621103c31cfbc65941615cab391db0f74e6ce) ) - ROM_LOAD16_BYTE("10c.rom", 0x0001, 0x4000, CRC(09ce209b) SHA1(2ed46d6592f8227bac8ab54963d9a300706ade47) ) + ROM_LOAD16_BYTE("8c.rom", 0x0001, 0x4000, CRC(a00cd959) SHA1(cc5621103c31cfbc65941615cab391db0f74e6ce) ) + ROM_LOAD16_BYTE("10c.rom", 0x0000, 0x4000, CRC(09ce209b) SHA1(2ed46d6592f8227bac8ab54963d9a300706ade47) ) ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "5p.rom", 0x0000, 0x2000, CRC(3b4937f0) SHA1(06d9de576f1c2262c34aeb91054e68c9298af688) ) @@ -542,8 +577,8 @@ ROM_START( toypop ) ROM_LOAD( "tp1-3.2c", 0x0000, 0x2000, CRC(5f3bf6e2) SHA1(d1b3335661b9b23cb10001416c515b77b5e783e9) ) ROM_REGION( 0x8000, "slave_rom", 0 ) - ROM_LOAD16_BYTE( "tp1-4.8c", 0x0000, 0x4000, CRC(76997db3) SHA1(5023a2f20a5f2c9baff130f6832583493c71f883) ) - ROM_LOAD16_BYTE("tp1-5.10c", 0x0001, 0x4000, CRC(37de8786) SHA1(710365e34c05d01815844c414518f93234b6160b) ) + ROM_LOAD16_BYTE("tp1-4.8c", 0x0001, 0x4000, CRC(76997db3) SHA1(5023a2f20a5f2c9baff130f6832583493c71f883) ) + ROM_LOAD16_BYTE("tp1-5.10c", 0x0000, 0x4000, CRC(37de8786) SHA1(710365e34c05d01815844c414518f93234b6160b) ) ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "tp1-7.5p", 0x0000, 0x2000, CRC(95076f9e) SHA1(1e3d32b21f6d46591ec3921aba51f672d64a9023) ) -- cgit v1.2.3-70-g09d2 From c998f7555f7ea414c18e72b346126fa22a88e23f Mon Sep 17 00:00:00 2001 From: angelosa Date: Thu, 10 Mar 2016 20:28:20 +0100 Subject: Added bitmap, nw --- src/mame/drivers/toypop.cpp | 49 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp index fb95ee3f4e3..98f84b77f0b 100644 --- a/src/mame/drivers/toypop.cpp +++ b/src/mame/drivers/toypop.cpp @@ -39,8 +39,10 @@ public: m_namco58xx(*this, "58xx"), m_namco56xx_1(*this, "56xx_1"), m_namco56xx_2(*this, "56xx_2"), + m_palette(*this, "palette"), m_gfxdecode(*this, "gfxdecode"), m_slave_sharedram(*this, "slave_sharedram"), + m_bgvram(*this, "bgvram"), m_fgvram(*this, "fgvram"), m_fgattr(*this, "fgattr") { } @@ -53,15 +55,19 @@ public: required_device m_namco58xx; required_device m_namco56xx_1; required_device m_namco56xx_2; + required_device m_palette; required_device m_gfxdecode; required_shared_ptr m_slave_sharedram; + required_shared_ptr m_bgvram; required_shared_ptr m_fgvram; required_shared_ptr m_fgattr; UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(master_vblank_irq); + INTERRUPT_GEN_MEMBER(slave_vblank_irq); + DECLARE_READ8_MEMBER(irq_enable_r); DECLARE_WRITE8_MEMBER(irq_disable_w); DECLARE_PALETTE_INIT(toypop); @@ -75,6 +81,7 @@ public: DECLARE_WRITE8_MEMBER(slave_halt_ctrl_w); DECLARE_READ8_MEMBER(slave_shared_r); DECLARE_WRITE8_MEMBER(slave_shared_w); + DECLARE_WRITE16_MEMBER(slave_irq_enable_w); DECLARE_WRITE8_MEMBER(sound_halt_ctrl_w); protected: // driver_device overrides @@ -84,7 +91,9 @@ protected: // virtual void video_start() override; private: bool m_master_irq_enable; + bool m_slave_irq_enable; + void legacy_bg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect); void legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect); }; @@ -138,6 +147,27 @@ PALETTE_INIT_MEMBER(toypop_state, toypop) } } +void toypop_state::legacy_bg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect) +{ + int x, y; + const UINT16 pal_base = 0x300; + const UINT32 src_base = 0x200/2; + const UINT16 src_pitch = 288 / 2; + + for (y = cliprect.min_y; y <= cliprect.max_y; ++y) + { + UINT16 *src = &m_bgvram[y * src_pitch + cliprect.min_x + src_base]; + UINT16 *dst = &bitmap.pix16(y, cliprect.min_x); + + for (x = cliprect.min_x; x <= cliprect.max_x; x += 2) + { + UINT32 srcpix = *src++; + *dst++ = m_palette->pen(((srcpix >> 8) & 0xf) + pal_base); + *dst++ = m_palette->pen((srcpix & 0xf) + pal_base); + } + } +} + void toypop_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect) { gfx_element *gfx_0 = m_gfxdecode->gfx(0); @@ -167,14 +197,14 @@ void toypop_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect UINT16 tile = m_fgvram[count]; UINT8 color = (m_fgattr[count] & 0x3f) + 0x40; - //if((color & 0x30) != 0x30) - gfx_0->opaque(bitmap,cliprect,tile,color,0,0,x*8,y*8); + gfx_0->transpen(bitmap,cliprect,tile,color,0,0,x*8,y*8,0); } } UINT32 toypop_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) { + legacy_bg_draw(bitmap,cliprect); legacy_fg_draw(bitmap,cliprect); return 0; } @@ -210,6 +240,11 @@ WRITE8_MEMBER(toypop_state::slave_shared_w) m_slave_sharedram[offset] = data; } +WRITE16_MEMBER(toypop_state::slave_irq_enable_w) +{ + m_slave_irq_enable = (offset & 0x40000) ? false : true; +} + READ8_MEMBER(toypop_state::dipA_l){ return ioport("DSW1")->read(); } // dips A READ8_MEMBER(toypop_state::dipA_h){ return ioport("DSW1")->read() >> 4; } // dips A READ8_MEMBER(toypop_state::dipB_l){ return ioport("DSW2")->read(); } // dips B @@ -242,6 +277,8 @@ static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 16, toypop_state ) AM_RANGE(0x000000, 0x007fff) AM_ROM AM_REGION("slave_rom", 0) AM_RANGE(0x080000, 0x0bffff) AM_RAM AM_RANGE(0x100000, 0x100fff) AM_READWRITE8(slave_shared_r,slave_shared_w,0x00ff) + AM_RANGE(0x190000, 0x1dffff) AM_RAM AM_SHARE("bgvram") + AM_RANGE(0x300000, 0x3fffff) AM_WRITE(slave_irq_enable_w) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, toypop_state ) @@ -473,6 +510,7 @@ GFXDECODE_END void toypop_state::machine_reset() { m_master_irq_enable = false; + m_slave_irq_enable = false; m_slave_cpu->set_input_line(INPUT_LINE_RESET,ASSERT_LINE); m_sound_cpu->set_input_line(INPUT_LINE_RESET,ASSERT_LINE); } @@ -483,6 +521,12 @@ INTERRUPT_GEN_MEMBER(toypop_state::master_vblank_irq) device.execute().set_input_line(M6809_IRQ_LINE,HOLD_LINE); } +INTERRUPT_GEN_MEMBER(toypop_state::slave_vblank_irq) +{ + if(m_slave_irq_enable == true) + device.execute().set_input_line(6,HOLD_LINE); +} + static MACHINE_CONFIG_START( liblrabl, toypop_state ) MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(master_map) @@ -490,6 +534,7 @@ static MACHINE_CONFIG_START( liblrabl, toypop_state ) MCFG_CPU_ADD("slave", M68000, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(slave_map) + MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, slave_vblank_irq) MCFG_CPU_ADD("audiocpu", M6809, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(sound_map) -- cgit v1.2.3-70-g09d2 From 934795a792e9374cb4d6a1393c0b8741400280f4 Mon Sep 17 00:00:00 2001 From: angelosa Date: Thu, 10 Mar 2016 20:58:27 +0100 Subject: Working sound, nw --- src/mame/drivers/toypop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp index 98f84b77f0b..4d1a588a4c8 100644 --- a/src/mame/drivers/toypop.cpp +++ b/src/mame/drivers/toypop.cpp @@ -538,7 +538,7 @@ static MACHINE_CONFIG_START( liblrabl, toypop_state ) MCFG_CPU_ADD("audiocpu", M6809, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(sound_map) - + MCFG_CPU_PERIODIC_INT_DRIVER(toypop_state, irq0_line_hold, 60) -- cgit v1.2.3-70-g09d2 From 9b37b67dd2e878157e46ad31f3f494807fe70e69 Mon Sep 17 00:00:00 2001 From: angelosa Date: Thu, 10 Mar 2016 21:02:15 +0100 Subject: toypop_state -> namcos16_state, nw --- src/mame/drivers/toypop.cpp | 71 ++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp index 4d1a588a4c8..4f76815374f 100644 --- a/src/mame/drivers/toypop.cpp +++ b/src/mame/drivers/toypop.cpp @@ -27,10 +27,10 @@ Notes: #define MASTER_CLOCK XTAL_6_144MHz -class toypop_state : public driver_device +class namcos16_state : public driver_device { public: - toypop_state(const machine_config &mconfig, device_type type, const char *tag) + namcos16_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_master_cpu(*this,"maincpu"), m_slave_cpu(*this, "slave"), @@ -98,7 +98,7 @@ private: }; -PALETTE_INIT_MEMBER(toypop_state, toypop) +PALETTE_INIT_MEMBER(namcos16_state, toypop) { const UINT8 *color_prom = memregion("proms")->base(); @@ -147,7 +147,7 @@ PALETTE_INIT_MEMBER(toypop_state, toypop) } } -void toypop_state::legacy_bg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect) +void namcos16_state::legacy_bg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect) { int x, y; const UINT16 pal_base = 0x300; @@ -168,7 +168,7 @@ void toypop_state::legacy_bg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect } } -void toypop_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect) +void namcos16_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect) { gfx_element *gfx_0 = m_gfxdecode->gfx(0); int count; @@ -198,64 +198,63 @@ void toypop_state::legacy_fg_draw(bitmap_ind16 &bitmap,const rectangle &cliprect UINT8 color = (m_fgattr[count] & 0x3f) + 0x40; gfx_0->transpen(bitmap,cliprect,tile,color,0,0,x*8,y*8,0); - } } -UINT32 toypop_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) +UINT32 namcos16_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) { legacy_bg_draw(bitmap,cliprect); legacy_fg_draw(bitmap,cliprect); return 0; } -READ8_MEMBER(toypop_state::irq_enable_r) +READ8_MEMBER(namcos16_state::irq_enable_r) { m_master_irq_enable = true; return 0; } -WRITE8_MEMBER(toypop_state::irq_disable_w) +WRITE8_MEMBER(namcos16_state::irq_disable_w) { m_master_irq_enable = false; } -WRITE8_MEMBER(toypop_state::slave_halt_ctrl_w) +WRITE8_MEMBER(namcos16_state::slave_halt_ctrl_w) { m_slave_cpu->set_input_line(INPUT_LINE_RESET,offset & 0x800 ? ASSERT_LINE : CLEAR_LINE); } -WRITE8_MEMBER(toypop_state::sound_halt_ctrl_w) +WRITE8_MEMBER(namcos16_state::sound_halt_ctrl_w) { m_sound_cpu->set_input_line(INPUT_LINE_RESET,offset & 0x800 ? ASSERT_LINE : CLEAR_LINE); } -READ8_MEMBER(toypop_state::slave_shared_r) +READ8_MEMBER(namcos16_state::slave_shared_r) { return m_slave_sharedram[offset]; } -WRITE8_MEMBER(toypop_state::slave_shared_w) +WRITE8_MEMBER(namcos16_state::slave_shared_w) { m_slave_sharedram[offset] = data; } -WRITE16_MEMBER(toypop_state::slave_irq_enable_w) +WRITE16_MEMBER(namcos16_state::slave_irq_enable_w) { m_slave_irq_enable = (offset & 0x40000) ? false : true; } -READ8_MEMBER(toypop_state::dipA_l){ return ioport("DSW1")->read(); } // dips A -READ8_MEMBER(toypop_state::dipA_h){ return ioport("DSW1")->read() >> 4; } // dips A -READ8_MEMBER(toypop_state::dipB_l){ return ioport("DSW2")->read(); } // dips B -READ8_MEMBER(toypop_state::dipB_h){ return ioport("DSW2")->read() >> 4; } // dips B +READ8_MEMBER(namcos16_state::dipA_l){ return ioport("DSW1")->read(); } // dips A +READ8_MEMBER(namcos16_state::dipA_h){ return ioport("DSW1")->read() >> 4; } // dips A +READ8_MEMBER(namcos16_state::dipB_l){ return ioport("DSW2")->read(); } // dips B +READ8_MEMBER(namcos16_state::dipB_h){ return ioport("DSW2")->read() >> 4; } // dips B -WRITE8_MEMBER(toypop_state::flip) +WRITE8_MEMBER(namcos16_state::flip) { flip_screen_set(data & 1); } -static ADDRESS_MAP_START( master_map, AS_PROGRAM, 8, toypop_state ) +static ADDRESS_MAP_START( master_map, AS_PROGRAM, 8, namcos16_state ) AM_RANGE(0x0000, 0x03ff) AM_RAM AM_SHARE("fgvram") AM_RANGE(0x0400, 0x07ff) AM_RAM AM_SHARE("fgattr") AM_RANGE(0x0800, 0x1fff) AM_RAM @@ -273,7 +272,7 @@ static ADDRESS_MAP_START( master_map, AS_PROGRAM, 8, toypop_state ) AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION("master_rom",0) ADDRESS_MAP_END -static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 16, toypop_state ) +static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 16, namcos16_state ) AM_RANGE(0x000000, 0x007fff) AM_ROM AM_REGION("slave_rom", 0) AM_RANGE(0x080000, 0x0bffff) AM_RAM AM_RANGE(0x100000, 0x100fff) AM_READWRITE8(slave_shared_r,slave_shared_w,0x00ff) @@ -281,7 +280,7 @@ static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 16, toypop_state ) AM_RANGE(0x300000, 0x3fffff) AM_WRITE(slave_irq_enable_w) ADDRESS_MAP_END -static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, toypop_state ) +static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, namcos16_state ) AM_RANGE(0x0000, 0x03ff) AM_DEVREADWRITE("namco", namco_15xx_device, sharedram_r, sharedram_w) AM_RANGE(0xe000, 0xffff) AM_ROM AM_REGION("sound_rom", 0) ADDRESS_MAP_END @@ -507,7 +506,7 @@ static GFXDECODE_START( toypop ) GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 128*4, 64 ) GFXDECODE_END -void toypop_state::machine_reset() +void namcos16_state::machine_reset() { m_master_irq_enable = false; m_slave_irq_enable = false; @@ -515,30 +514,30 @@ void toypop_state::machine_reset() m_sound_cpu->set_input_line(INPUT_LINE_RESET,ASSERT_LINE); } -INTERRUPT_GEN_MEMBER(toypop_state::master_vblank_irq) +INTERRUPT_GEN_MEMBER(namcos16_state::master_vblank_irq) { if(m_master_irq_enable == true) device.execute().set_input_line(M6809_IRQ_LINE,HOLD_LINE); } -INTERRUPT_GEN_MEMBER(toypop_state::slave_vblank_irq) +INTERRUPT_GEN_MEMBER(namcos16_state::slave_vblank_irq) { if(m_slave_irq_enable == true) device.execute().set_input_line(6,HOLD_LINE); } -static MACHINE_CONFIG_START( liblrabl, toypop_state ) +static MACHINE_CONFIG_START( liblrabl, namcos16_state ) MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(master_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, master_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos16_state, master_vblank_irq) MCFG_CPU_ADD("slave", M68000, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(slave_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", toypop_state, slave_vblank_irq) + MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos16_state, slave_vblank_irq) MCFG_CPU_ADD("audiocpu", M6809, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT_DRIVER(toypop_state, irq0_line_hold, 60) + MCFG_CPU_PERIODIC_INT_DRIVER(namcos16_state, irq0_line_hold, 60) @@ -549,11 +548,11 @@ static MACHINE_CONFIG_START( liblrabl, toypop_state ) MCFG_NAMCO58XX_IN_3_CB(IOPORT("BUTTONS")) MCFG_DEVICE_ADD("56xx_1", NAMCO56XX, 0) - MCFG_NAMCO56XX_IN_0_CB(READ8(toypop_state, dipA_h)) - MCFG_NAMCO56XX_IN_1_CB(READ8(toypop_state, dipB_l)) - MCFG_NAMCO56XX_IN_2_CB(READ8(toypop_state, dipB_h)) - MCFG_NAMCO56XX_IN_3_CB(READ8(toypop_state, dipA_l)) - MCFG_NAMCO56XX_OUT_0_CB(WRITE8(toypop_state, flip)) + MCFG_NAMCO56XX_IN_0_CB(READ8(namcos16_state, dipA_h)) + MCFG_NAMCO56XX_IN_1_CB(READ8(namcos16_state, dipB_l)) + MCFG_NAMCO56XX_IN_2_CB(READ8(namcos16_state, dipB_h)) + MCFG_NAMCO56XX_IN_3_CB(READ8(namcos16_state, dipA_l)) + MCFG_NAMCO56XX_OUT_0_CB(WRITE8(namcos16_state, flip)) MCFG_DEVICE_ADD("56xx_2", NAMCO56XX, 0) MCFG_NAMCO56XX_IN_1_CB(IOPORT("P1_LEFT")) @@ -565,13 +564,13 @@ static MACHINE_CONFIG_START( liblrabl, toypop_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(36*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 32*8-1) - MCFG_SCREEN_UPDATE_DRIVER(toypop_state, screen_update) + MCFG_SCREEN_UPDATE_DRIVER(namcos16_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", toypop) MCFG_PALETTE_ADD("palette", 128*4+64*4+16*2) MCFG_PALETTE_INDIRECT_ENTRIES(256) - MCFG_PALETTE_INIT_OWNER(toypop_state, toypop) + MCFG_PALETTE_INIT_OWNER(namcos16_state, toypop) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") -- cgit v1.2.3-70-g09d2 From 991060345d7924a8560aa80f084426d581fed3c0 Mon Sep 17 00:00:00 2001 From: Dirk Best Date: Thu, 10 Mar 2016 21:09:33 +0100 Subject: remove leftover logging (nw) --- src/devices/machine/wd_fdc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp index c07f4539683..84fcbf5ceb8 100644 --- a/src/devices/machine/wd_fdc.cpp +++ b/src/devices/machine/wd_fdc.cpp @@ -1278,7 +1278,7 @@ void wd_fdc_t::index_callback(floppy_image_device *floppy, int state) if(!intrq_cb.isnull()) intrq_cb(intrq); } - logerror("tick %d\n", state); + switch(sub_state) { case IDLE: if(motor_control || head_control) { -- cgit v1.2.3-70-g09d2 From 8c6c1a59e5b354695f60f410223630d7b0ed11de Mon Sep 17 00:00:00 2001 From: RobertoFresca Date: Thu, 10 Mar 2016 19:03:08 -0300 Subject: IGS Super Poker: Decrypted all the US/UA sets. They are still not working due to hardware differences with the former ones laying in the driver. I/O are driven through IGS custom IC's instead of 2x PPI8255 devices. [Roberto Fresca] --- src/mame/drivers/spoker.cpp | 56 +++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/spoker.cpp b/src/mame/drivers/spoker.cpp index d42a628d1d0..f51457d4572 100644 --- a/src/mame/drivers/spoker.cpp +++ b/src/mame/drivers/spoker.cpp @@ -6,18 +6,25 @@ Driver by Mirko Buffoni Additional work by Roberto Fresca. +**************************************************************************** + + NOTES: + + - Very similar to IGS009 driver, but without the reels stuff. + Maybe both drivers can be merged at some point. + + - The Super Poker US/UA sets look like they lack of PPI 8255 devices... + +**************************************************************************** + TODO: + - Understand how to reset NVRAM - Map DSW (Operator mode doesn't help) - Map Leds and Coin counters - 3super8 randomly crashes - 3super8 doesn't have the 8x32 tilemap, change the video emulation accordingly -**************************************************************************** - - Very similar to IGS009 driver, but without the reels stuff. - Maybe both drivers can be merged at some point. - ***************************************************************************/ #include "emu.h" @@ -77,6 +84,7 @@ public: DECLARE_CUSTOM_INPUT_MEMBER(hopper_r); + DECLARE_DRIVER_INIT(spkleftover); DECLARE_DRIVER_INIT(spk116it); DECLARE_DRIVER_INIT(3super8); virtual void machine_start() override; @@ -838,12 +846,26 @@ ROM_END Driver Init ***************************************************************************/ +DRIVER_INIT_MEMBER(spoker_state, spkleftover) +{ +/* The last 4K have the scheme/table for the whole encryption. + Maybe a leftover... +*/ + int A, B; + UINT8 *rom = memregion("maincpu")->base(); + + for (A = 0; A < 0x10000; A++) + { + B = ((A & 0x0fff) | 0xf000); + rom[A] = rom[A] ^ rom[B]; + } +} + DRIVER_INIT_MEMBER(spoker_state, spk116it) { int A; UINT8 *rom = memregion("maincpu")->base(); - for (A = 0; A < 0x10000; A++) { rom[A] ^= 0x02; @@ -896,14 +918,14 @@ DRIVER_INIT_MEMBER(spoker_state, 3super8) Game Drivers ***************************************************************************/ -/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ -GAME( 1996, spk306us, 0, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v306US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1996, spk205us, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v205US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1996, spk203us, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v203US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1996, spk200ua, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v200UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1993?, spk116it, spk306us, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v116IT)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, spk116itmx, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v116IT-MX)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1993?, spk115it, spk306us, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v115IT)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, spk114it, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v114IT)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1996, spk102ua, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v102UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper decryption -GAME( 1993?, 3super8, 0, 3super8, 3super8, spoker_state, 3super8, ROT0, "", "3 Super 8 (Italy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) //roms are badly dumped +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ +GAME( 1996, spk306us, 0, spoker, spoker, spoker_state, spkleftover, ROT0, "IGS", "Super Poker (v306US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper machine driver +GAME( 1996, spk205us, spk306us, spoker, spoker, spoker_state, spkleftover, ROT0, "IGS", "Super Poker (v205US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper machine driver +GAME( 1996, spk203us, spk306us, spoker, spoker, spoker_state, spkleftover, ROT0, "IGS", "Super Poker (v203US)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper machine driver +GAME( 1996, spk200ua, spk306us, spoker, spoker, spoker_state, spkleftover, ROT0, "IGS", "Super Poker (v200UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper machine driver +GAME( 1993?, spk116it, spk306us, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v116IT)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993?, spk116itmx, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v116IT-MX)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper machine driver +GAME( 1993?, spk115it, spk306us, spoker, spoker, spoker_state, spk116it, ROT0, "IGS", "Super Poker (v115IT)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993?, spk114it, spk306us, spoker, spoker, driver_device, 0, ROT0, "IGS", "Super Poker (v114IT)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper machine driver +GAME( 1996, spk102ua, spk306us, spoker, spoker, spoker_state, spkleftover, ROT0, "IGS", "Super Poker (v102UA)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs proper machine driver +GAME( 1993?, 3super8, 0, 3super8, 3super8, spoker_state, 3super8, ROT0, "", "3 Super 8 (Italy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) //roms are badly dumped -- cgit v1.2.3-70-g09d2 From 27bf6e5e80d8e47ec8b2e624a8b9ec255cba913e Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Thu, 10 Mar 2016 18:17:22 -0500 Subject: NoteTaker: Attached FDC and floppy drive. [Lord Nightmare] --- src/mame/drivers/notetaker.cpp | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index 31ee5f696f1..53971abc082 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -79,6 +79,7 @@ DONE: #include "machine/ay31015.h" #include "video/tms9927.h" #include "sound/dac.h" +#include "machine/wd_fdc.h" class notetaker_state : public driver_device { @@ -95,7 +96,10 @@ public: m_kbduart(*this, "kbduart"), m_eiauart(*this, "eiauart"), m_crtc(*this, "crt5027"), - m_dac(*this, "dac") + m_dac(*this, "dac"), + m_fdc(*this, "wd1791"), + m_floppy0(*this, "wd1791:0"), + m_floppy(NULL) { } // devices @@ -105,6 +109,9 @@ public: required_device m_eiauart; required_device m_crtc; required_device m_dac; + required_device m_fdc; + required_device m_floppy0; + floppy_image_device *m_floppy; //declarations // screen @@ -513,7 +520,7 @@ static ADDRESS_MAP_START(notetaker_iocpu_io, AS_IO, 16, notetaker_state) //AM_RANGE(0xa0, 0xa1) AM_MIRROR(0x7E18) AM_DEVREADWRITE("debug8255", 8255_device, read, write) // debugger board 8255 AM_RANGE(0xc0, 0xc1) AM_MIRROR(0x7E1E) AM_WRITE(FIFOBus_w) // DAC data write to FIFO //AM_RANGE(0x100, 0x101) AM_MIRROR(0x7E1E) AM_WRITE(DiskReg_w) I/O register (adc speed, crtc pixel clock enable, +5 and +12v relays for floppy, etc) - //AM_RANGE(0x120, 0x127) AM_MIRROR(0x7E18) AM_DEVREADWRITE("wd1791", fd1971_device) // floppy controller + AM_RANGE(0x120, 0x127) AM_MIRROR(0x7E18) AM_DEVREADWRITE8("wd1791", fd1791_t, read, write, 0x00FF) // floppy controller AM_RANGE(0x140, 0x15f) AM_MIRROR(0x7E00) AM_DEVREADWRITE8("crt5027", crt5027_device, read, write, 0x00FF) // crt controller AM_RANGE(0x160, 0x161) AM_MIRROR(0x7E1E) AM_WRITE(LoadDispAddr_w) // loads the start address for the display framebuffer AM_RANGE(0x1a0, 0x1a1) AM_MIRROR(0x7E10) AM_READ(ReadEIAStatus_r) // read keyboard fifo state @@ -586,12 +593,21 @@ static ADDRESS_MAP_START(notetaker_emulatorcpu_io, AS_IO, 16, notetaker_state) ADDRESS_MAP_END */ +/* Input ports */ + +/* Floppy Image Interface */ +static SLOT_INTERFACE_START( notetaker_floppies ) + SLOT_INTERFACE( "525dd", FLOPPY_525_DD ) +SLOT_INTERFACE_END + /* Machine Start; allocate timers and savestate stuff */ void notetaker_state::machine_start() { // allocate the DAC timer, and set it to fire NEVER. We'll set it up properly in IPReset. m_FIFO_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(notetaker_state::timer_fifoclk),this)); m_FIFO_timer->adjust(attotime::never); + // floppy stuff + m_floppy = NULL; // savestate stuff // TODO: add me! } @@ -649,7 +665,6 @@ void notetaker_state::ep_reset() { } - /* Input ports */ static INPUT_PORTS_START( notetakr ) INPUT_PORTS_END @@ -682,6 +697,7 @@ static MACHINE_CONFIG_START( notetakr, notetaker_state ) MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + /* Devices */ MCFG_DEVICE_ADD( "crt5027", CRT5027, (XTAL_36MHz/4)/8) // the clock for the crt5027 is configurable rate; 36MHz xtal divided by 1*, 2, 3, 4, 5, 6, 7, or 8 (* because this is a 74s163 this setting probably means divide by 1; documentation at http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790605_Definition_of_8086_Ports.pdf claims it is 1.5, which makes no sense) and secondarily divided by 8 (again by two to load the 16 bit output shifters after this) // on reset, bitclk is 000 so divider is (36mhz/8)/8; during boot it is written with 101, changing the divider to (36mhz/4)/8 // TODO: for now, we just hack it to the latter setting from start; this should be handled correctly in ip_reset(); @@ -697,7 +713,10 @@ static MACHINE_CONFIG_START( notetakr, notetaker_state ) MCFG_DEVICE_ADD( "eiauart", AY31015, 0 ) // HD6402, == AY-3-1015D MCFG_AY31015_RX_CLOCK(((XTAL_960kHz/10)/4)/5) // hard-wired through an mc14568b divider set to divide by 4, the result set to divide by 5; this resulting 4800hz signal being 300 baud (16 clocks per baud) MCFG_AY31015_TX_CLOCK(((XTAL_960kHz/10)/4)/5) // hard-wired through an mc14568b divider set to divide by 4, the result set to divide by 5; this resulting 4800hz signal being 300 baud (16 clocks per baud) - /* Devices */ + + /* Floppy */ + MCFG_FD1791_ADD("wd1791", (((XTAL_24MHz/3)/2)/2)) // 2mhz, from 24mhz ip clock divided by 6 via 8284, an additional 2 by LS161 at #e1 on display/floppy board + MCFG_FLOPPY_DRIVE_ADD("wd1791:0", notetaker_floppies, "525dd", floppy_image_device::default_floppy_formats) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") // TODO: should be stereo -- cgit v1.2.3-70-g09d2 From e27c18a4d407cf29dfc730ee335938175785d55d Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 11 Mar 2016 01:51:13 +0100 Subject: carjmbre: marked game as working again, still some problems with sprites --- src/mame/drivers/carjmbre.cpp | 77 ++++++++++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/carjmbre.cpp b/src/mame/drivers/carjmbre.cpp index 2a9d717933c..68a1330fefd 100644 --- a/src/mame/drivers/carjmbre.cpp +++ b/src/mame/drivers/carjmbre.cpp @@ -60,9 +60,10 @@ public: UINT8 m_bgcolor; tilemap_t *m_tilemap; - DECLARE_WRITE8_MEMBER(nmi_enable_w); DECLARE_WRITE8_MEMBER(bgcolor_w); DECLARE_WRITE8_MEMBER(videoram_w); + DECLARE_WRITE8_MEMBER(nmi_enable_w); + DECLARE_WRITE8_MEMBER(flipscreen_w); INTERRUPT_GEN_MEMBER(vblank_nmi); DECLARE_PALETTE_INIT(carjmbre); @@ -86,6 +87,7 @@ void carjmbre_state::machine_start() save_item(NAME(m_bgcolor)); } + /*************************************************************************** Video @@ -125,9 +127,11 @@ PALETTE_INIT_MEMBER(carjmbre_state, carjmbre) WRITE8_MEMBER(carjmbre_state::bgcolor_w) { - m_bgcolor = data & 0x3f; + // guessed, seems to match with flyer + m_bgcolor = ~data & 0x3f; } + // tilemap WRITE8_MEMBER(carjmbre_state::videoram_w) @@ -136,8 +140,6 @@ WRITE8_MEMBER(carjmbre_state::videoram_w) m_tilemap->mark_tile_dirty(offset & 0x3ff); } - - TILE_GET_INFO_MEMBER(carjmbre_state::get_tile_info) { int attr = m_videoram[tile_index | 0x400]; @@ -154,37 +156,54 @@ void carjmbre_state::video_start() UINT32 carjmbre_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - //bitmap.fill(m_bgcolor, cliprect); - bitmap.fill(0, cliprect); + bitmap.fill(m_bgcolor, cliprect); m_tilemap->draw(screen, bitmap, cliprect, 0, 0); draw_sprites(bitmap, cliprect); return 0; } + // sprites void carjmbre_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) { - for (int offs = 0; offs < m_spriteram.bytes(); offs += 4) + for (int offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4) { - int sy = 240 - m_spriteram[offs]; + int sy = m_spriteram[offs]; int code = m_spriteram[offs + 1]; int color = m_spriteram[offs + 2] & 0xf; int flipx = m_spriteram[offs + 2] >> 6 & 1; int flipy = m_spriteram[offs + 2] >> 7 & 1; int sx = m_spriteram[offs + 3]; - + + // align to tilemap + if (flip_screen()) + { + sy += 1; + sx = 233 - sx; + flipx = !flipx; + flipy = !flipy; + } + else + { + sy = 241 - sy; + sx -= 7; + } + m_gfxdecode->gfx(1)->transpen(bitmap, cliprect, code, color, flipx, flipy, sx, sy, 0); } } + /*************************************************************************** - I/O - maincpu + I/O, Memory Maps ***************************************************************************/ +// maincpu side + INTERRUPT_GEN_MEMBER(carjmbre_state::vblank_nmi) { if (m_nmi_enabled) @@ -198,11 +217,17 @@ WRITE8_MEMBER(carjmbre_state::nmi_enable_w) m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } +WRITE8_MEMBER(carjmbre_state::flipscreen_w) +{ + // d0: flip screen (cocktail mode) + flip_screen_set(data & 1); +} static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, carjmbre_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8803, 0x8803) AM_WRITE(nmi_enable_w) AM_RANGE(0x8805, 0x8805) AM_WRITE(bgcolor_w) + AM_RANGE(0x8807, 0x8807) AM_WRITE(flipscreen_w) AM_RANGE(0x8000, 0x87ff) AM_RAM // 6116 AM_RANGE(0x9000, 0x97ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") // 2114*4 AM_RANGE(0x9800, 0x98ff) AM_RAM AM_SHARE("spriteram") // 5101*2 @@ -211,11 +236,8 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, carjmbre_state ) AM_RANGE(0xb800, 0xb800) AM_READ_PORT("DSW") AM_WRITE(soundlatch_byte_w) ADDRESS_MAP_END -/*************************************************************************** - - I/O - audiocpu -***************************************************************************/ +// audiocpu side static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, carjmbre_state ) AM_RANGE(0x0000, 0x0fff) AM_MIRROR(0x1000) AM_ROM @@ -233,6 +255,8 @@ static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, carjmbre_state ) AM_RANGE(0x34, 0x34) AM_DEVREAD("ay2", ay8910_device, data_r) ADDRESS_MAP_END + + /*************************************************************************** Inputs @@ -287,31 +311,29 @@ INPUT_PORTS_END +/*************************************************************************** + + Machine Config + +***************************************************************************/ -const gfx_layout carjmbre_spritelayout = +static const gfx_layout carjmbre_spritelayout = { 16,16, RGN_FRAC(1,4), 2, - { RGN_FRAC(1,2), RGN_FRAC(0,2) }, + { RGN_FRAC(2,4), RGN_FRAC(0,4) }, { STEP8(0,1), STEP8(256*16*8,1) }, { STEP16(0,8) }, 16*8 }; - static GFXDECODE_START( carjmbre ) GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x2_planar, 0, 16 ) GFXDECODE_ENTRY( "gfx2", 0, carjmbre_spritelayout, 0, 16 ) GFXDECODE_END -/*************************************************************************** - - Machine Config - -***************************************************************************/ - static MACHINE_CONFIG_START( carjmbre, carjmbre_state ) /* basic machine hardware */ @@ -328,7 +350,7 @@ static MACHINE_CONFIG_START( carjmbre, carjmbre_state ) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(32*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) + MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) MCFG_SCREEN_UPDATE_DRIVER(carjmbre_state, screen_update) MCFG_SCREEN_PALETTE("palette") @@ -367,8 +389,8 @@ ROM_START( carjmbre ) ROM_LOAD( "c15", 0x0000, 0x1000, CRC(7d7779d1) SHA1(f8f5246be4cc9632076d3330fc3d3343b911dfee) ) ROM_REGION( 0x2000, "gfx1", 0 ) - ROM_LOAD( "c9", 0x0000, 0x1000, CRC(2accb821) SHA1(ce2804536fc1abd3377dc864c8c9976ca28c1b6e) ) - ROM_LOAD( "c10", 0x1000, 0x1000, CRC(75ddbe56) SHA1(5e1363967a822265618793ccb74bf3ef5e0e00b5) ) + ROM_LOAD( "c10", 0x0000, 0x1000, CRC(75ddbe56) SHA1(5e1363967a822265618793ccb74bf3ef5e0e00b5) ) + ROM_LOAD( "c9", 0x1000, 0x1000, CRC(2accb821) SHA1(ce2804536fc1abd3377dc864c8c9976ca28c1b6e) ) ROM_REGION( 0x4000, "gfx2", 0 ) ROM_LOAD( "c11", 0x0000, 0x1000, CRC(d90cd126) SHA1(7ee110cf19b45ee654016ba0ce92f3db6ea2ed92) ) @@ -381,4 +403,5 @@ ROM_START( carjmbre ) ROM_LOAD( "c.d18", 0x0020, 0x0020, CRC(7b9ed1b0) SHA1(ec5e1f56e5a2fc726083866c08ac0e1de0ed6ace) ) ROM_END -GAME( 1983, carjmbre, 0, carjmbre, carjmbre, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Car Jamboree", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_COLORS | MACHINE_NOT_WORKING ) + +GAME( 1983, carjmbre, 0, carjmbre, carjmbre, driver_device, 0, ROT90, "Omori Electric Co., Ltd.", "Car Jamboree", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_GRAPHICS ) -- cgit v1.2.3-70-g09d2 From 75cd8cf155068f9c2ecc141904e8e27b795b74dc Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 11 Mar 2016 10:51:18 +0100 Subject: commented out regression slow error.log on Windows --- src/emu/machine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index 70c3f2f1569..b1b67ab81d0 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -1011,7 +1011,9 @@ void running_machine::logfile_callback(const running_machine &machine, const cha if (machine.m_logfile != nullptr) { machine.m_logfile->puts(buffer); - machine.m_logfile->flush(); + + // TODO: commented out for now - it causes -log slow down to a crawl on Windows + //machine.m_logfile->flush(); } } -- cgit v1.2.3-70-g09d2 From a880f01b17e4d268a25b4646d580b736d14b9e02 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 11 Mar 2016 20:56:08 +1100 Subject: Don't need to call FlushFileBuffers (it's equivalent to fsync, not fflush) --- src/emu/machine.cpp | 3 +-- src/osd/windows/winfile.cpp | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-) (limited to 'src') diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index b1b67ab81d0..b3ac263473e 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -1012,8 +1012,7 @@ void running_machine::logfile_callback(const running_machine &machine, const cha { machine.m_logfile->puts(buffer); - // TODO: commented out for now - it causes -log slow down to a crawl on Windows - //machine.m_logfile->flush(); + machine.m_logfile->flush(); } } diff --git a/src/osd/windows/winfile.cpp b/src/osd/windows/winfile.cpp index e8fcc30ab2c..742f97363d6 100644 --- a/src/osd/windows/winfile.cpp +++ b/src/osd/windows/winfile.cpp @@ -290,19 +290,6 @@ file_error osd_fflush(osd_file *file) if (!file || !file->handle) return FILERR_FAILURE; - switch (file->type) - { - case WINFILE_FILE: - // attempt to flush file buffers - if (!FlushFileBuffers(file->handle)) - return win_error_to_mame_file_error(GetLastError()); - break; - case WINFILE_SOCKET: - return FILERR_FAILURE; - case WINFILE_PTTY: - return FILERR_FAILURE; - - } return FILERR_NONE; } -- cgit v1.2.3-70-g09d2 From 679574e96589fb62c12c4614bf8a5c96c97c9fdf Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 11 Mar 2016 15:00:29 +0100 Subject: With latest package from MSYS of clang 3.8.0 build at least compile fine on windows (nw) Strange crashing while executing --- scripts/src/tests.lua | 5 ----- src/osd/modules/input/input_dinput.cpp | 8 ++------ src/osd/modules/input/input_rawinput.cpp | 10 +++++----- src/osd/modules/input/input_win32.cpp | 13 +++++-------- src/osd/modules/input/input_xinput.cpp | 2 +- src/osd/modules/sound/xaudio2_sound.cpp | 2 -- 6 files changed, 13 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/scripts/src/tests.lua b/scripts/src/tests.lua index d30cff64df2..baba88df28c 100644 --- a/scripts/src/tests.lua +++ b/scripts/src/tests.lua @@ -22,11 +22,6 @@ project "gtest" "-Wno-unused-variable", } - configuration { "mingw-clang" } - buildoptions { - "-O0", -- crash of compiler when doing optimization - } - configuration { "vs*" } if _OPTIONS["vs"]=="intel-15" then buildoptions { diff --git a/src/osd/modules/input/input_dinput.cpp b/src/osd/modules/input/input_dinput.cpp index a80eb4c994d..a56f913854d 100644 --- a/src/osd/modules/input/input_dinput.cpp +++ b/src/osd/modules/input/input_dinput.cpp @@ -115,8 +115,6 @@ protected: class dinput_keyboard_device : public dinput_device { private: - HANDLE m_dataEvent; - HANDLE m_exitEvent; std::mutex m_device_lock; public: @@ -124,7 +122,7 @@ public: dinput_keyboard_device(running_machine &machine, const char *name, input_module &module) : dinput_device(machine, name, DEVICE_CLASS_KEYBOARD, module), - keyboard({0}) + keyboard({{0}}) { } @@ -152,8 +150,6 @@ class dinput_module : public wininput_module private: LPDIRECTINPUT m_dinput; int m_dinput_version; - int didevtype_keyboard; - int didevtype_mouse; public: dinput_module(const char* type, const char* name) @@ -493,7 +489,7 @@ public: dinput_joystick_device(running_machine &machine, const char *name, input_module &module) : dinput_device(machine, name, DEVICE_CLASS_JOYSTICK, module), - joystick({0}) + joystick({{0}}) { } diff --git a/src/osd/modules/input/input_rawinput.cpp b/src/osd/modules/input/input_rawinput.cpp index 84d8a96fec3..2bfdf134f34 100644 --- a/src/osd/modules/input/input_rawinput.cpp +++ b/src/osd/modules/input/input_rawinput.cpp @@ -263,7 +263,7 @@ public: rawinput_keyboard_device(running_machine& machine, const char* name, input_module& module) : rawinput_device(machine, name, DEVICE_CLASS_KEYBOARD, module), - keyboard({0}) + keyboard({{0}}) { } @@ -549,8 +549,8 @@ public: } protected: - USHORT usagepage() { return 1; } - USHORT usage() { return 6; } + USHORT usagepage() override { return 1; } + USHORT usage() override { return 6; } void add_rawinput_device(running_machine& machine, RAWINPUTDEVICELIST * device) override { // make sure this is a keyboard @@ -596,8 +596,8 @@ public: } protected: - USHORT usagepage() { return 1; } - USHORT usage() { return 2; } + USHORT usagepage() override { return 1; } + USHORT usage() override { return 2; } void add_rawinput_device(running_machine& machine, RAWINPUTDEVICELIST * device) override { // make sure this is a mouse diff --git a/src/osd/modules/input/input_win32.cpp b/src/osd/modules/input/input_win32.cpp index e1b69c8091c..0fb86095112 100644 --- a/src/osd/modules/input/input_win32.cpp +++ b/src/osd/modules/input/input_win32.cpp @@ -45,7 +45,7 @@ public: win32_keyboard_device(running_machine& machine, const char *name, input_module &module) : event_based_device(machine, name, DEVICE_CLASS_KEYBOARD, module), - keyboard({0}) + keyboard({{0}}) { } @@ -68,7 +68,6 @@ protected: class keyboard_input_win32 : public wininput_module { private: - const osd_options * m_options; public: keyboard_input_win32() @@ -138,7 +137,7 @@ public: win32_mouse_device(running_machine& machine, const char *name, input_module &module) : event_based_device(machine, name, DEVICE_CLASS_MOUSE, module), mouse({0}), - win32_mouse({0}) + win32_mouse({{0}}) { } @@ -172,10 +171,11 @@ public: void reset() override { memset(&mouse, 0, sizeof(mouse)); + memset(&win32_mouse, 0, sizeof(win32_mouse)); } protected: - void process_event(MouseButtonEventArgs &args) + void process_event(MouseButtonEventArgs &args) override { // set the button state mouse.rgbButtons[args.button] = args.keydown ? 0x80 : 0x00; @@ -192,9 +192,6 @@ protected: class mouse_input_win32 : public wininput_module { -private: - const osd_options * m_options; - public: mouse_input_win32() : wininput_module(OSD_MOUSEINPUT_PROVIDER, "win32") @@ -301,7 +298,7 @@ public: } protected: - void process_event(MouseButtonEventArgs &args) + void process_event(MouseButtonEventArgs &args) override { // Are we in shared axis mode? if (m_lightgun_shared_axis_mode) diff --git a/src/osd/modules/input/input_xinput.cpp b/src/osd/modules/input/input_xinput.cpp index a531bbdfefb..b88dbe24c1a 100644 --- a/src/osd/modules/input/input_xinput.cpp +++ b/src/osd/modules/input/input_xinput.cpp @@ -187,7 +187,7 @@ private: public: xinput_joystick_device(running_machine &machine, const char *name, input_module &module) : device_info(machine, name, DEVICE_CLASS_JOYSTICK, module), - gamepad({0}), + gamepad({{0}}), xinput_state({0}), xinput_api(nullptr) { diff --git a/src/osd/modules/sound/xaudio2_sound.cpp b/src/osd/modules/sound/xaudio2_sound.cpp index 4beb2de9da7..e09d87aa6c6 100644 --- a/src/osd/modules/sound/xaudio2_sound.cpp +++ b/src/osd/modules/sound/xaudio2_sound.cpp @@ -205,7 +205,6 @@ private: std::thread m_audioThread; std::queue m_queue; std::unique_ptr m_buffer_pool; - HMODULE m_xaudio2_module; UINT32 m_overflows; UINT32 m_underflows; BOOL m_in_underflow; @@ -227,7 +226,6 @@ public: m_hEventDataAvailable(nullptr), m_hEventExiting(nullptr), m_buffer_pool(nullptr), - m_xaudio2_module(nullptr), m_overflows(0), m_underflows(0), m_in_underflow(FALSE), -- cgit v1.2.3-70-g09d2 From aadae5fd0b56f98fb398d06aae3d2d4f9eda4d36 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 11 Mar 2016 18:10:42 +0100 Subject: armedf.cpp: fixed missing ship icon in terrafb and terrafjb and fixed the ladder appearing on the high score table in cclimbr2. This explains also why those worked correctly after saving and reloading state (nw) --- src/mame/drivers/armedf.cpp | 2 +- src/mame/video/armedf.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/armedf.cpp b/src/mame/drivers/armedf.cpp index e2a9dd65b3a..8b5c48ec057 100644 --- a/src/mame/drivers/armedf.cpp +++ b/src/mame/drivers/armedf.cpp @@ -711,7 +711,7 @@ READ8_MEMBER(armedf_state::blitter_txram_r) WRITE8_MEMBER(armedf_state::blitter_txram_w) { m_text_videoram[offset] = data; - m_tx_tilemap->mark_tile_dirty(offset); + m_tx_tilemap->mark_all_dirty(); } WRITE8_MEMBER(armedf_state::fg_scrollx_w) diff --git a/src/mame/video/armedf.cpp b/src/mame/video/armedf.cpp index 84c08f9c022..c6834e38890 100644 --- a/src/mame/video/armedf.cpp +++ b/src/mame/video/armedf.cpp @@ -29,7 +29,7 @@ TILEMAP_MAPPER_MEMBER(armedf_state::armedf_scan_type2) TILEMAP_MAPPER_MEMBER(armedf_state::armedf_scan_type3) { /* col: 0..63; row: 0..31 */ - /* legion & legiono */ + /* legion & legionjb */ return (col & 0x1f) * 32 + row + 0x800 * (col / 32); } @@ -113,7 +113,7 @@ TILE_GET_INFO_MEMBER(armedf_state::get_bg_tile_info) VIDEO_START_MEMBER(armedf_state,terraf) { - m_sprite_offy = (m_scroll_type & 2 ) ? 0 : 128; /* legion, legiono, crazy climber 2 */ + m_sprite_offy = (m_scroll_type & 2 ) ? 0 : 128; /* legion, legionjb, crazy climber 2 */ m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(armedf_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 64, 32); m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(armedf_state::get_fg_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 64, 32); @@ -136,7 +136,7 @@ VIDEO_START_MEMBER(armedf_state,terraf) VIDEO_START_MEMBER(armedf_state,armedf) { - m_sprite_offy = (m_scroll_type & 2 ) ? 0 : 128; /* legion, legiono, crazy climber 2 */ + m_sprite_offy = (m_scroll_type & 2 ) ? 0 : 128; /* legion, legionjb, crazy climber 2 */ m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(armedf_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 64, 32); m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(armedf_state::get_fg_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 64, 32); @@ -170,7 +170,7 @@ READ8_MEMBER(armedf_state::nb1414m4_text_videoram_r) WRITE8_MEMBER(armedf_state::nb1414m4_text_videoram_w) { m_text_videoram[offset] = data; - m_tx_tilemap->mark_tile_dirty(offset & 0x7ff); + m_tx_tilemap->mark_all_dirty(); } READ8_MEMBER(armedf_state::armedf_text_videoram_r) @@ -181,7 +181,7 @@ READ8_MEMBER(armedf_state::armedf_text_videoram_r) WRITE8_MEMBER(armedf_state::armedf_text_videoram_w) { m_text_videoram[offset] = data; - m_tx_tilemap->mark_tile_dirty(offset & 0x7ff); + m_tx_tilemap->mark_all_dirty(); } WRITE16_MEMBER(armedf_state::armedf_fg_videoram_w) -- cgit v1.2.3-70-g09d2 From 560e350e22d3b2dfdedf67c4296852166d5b4fd1 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 11 Mar 2016 18:12:13 +0100 Subject: Fix that makes non-Unicode build to work (nw) --- src/osd/modules/input/input_rawinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/osd/modules/input/input_rawinput.cpp b/src/osd/modules/input/input_rawinput.cpp index 2bfdf134f34..cf17742ce58 100644 --- a/src/osd/modules/input/input_rawinput.cpp +++ b/src/osd/modules/input/input_rawinput.cpp @@ -370,7 +370,7 @@ public: : wininput_module(type, name), get_rawinput_device_list("GetRawInputDeviceList", L"user32.dll"), get_rawinput_data("GetRawInputData", L"user32.dll"), - get_rawinput_device_info("GetRawInputDeviceInfoW", L"user32.dll"), + get_rawinput_device_info("GetRawInputDeviceInfo", L"user32.dll"), register_rawinput_devices("RegisterRawInputDevices", L"user32.dll") { } -- cgit v1.2.3-70-g09d2 From cf2fcab813d9bb349a619547d8cad5ec01115557 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 11 Mar 2016 18:24:57 +0100 Subject: audio/taito_en.cpp: use device_mconfig_additions() (nw) --- src/mame/audio/taito_en.cpp | 47 ++++++----- src/mame/audio/taito_en.h | 6 +- src/mame/drivers/galastrm.cpp | 4 +- src/mame/drivers/groundfx.cpp | 4 +- src/mame/drivers/gunbustr.cpp | 8 +- src/mame/drivers/superchs.cpp | 10 +-- src/mame/drivers/taito_f3.cpp | 188 +++++++++++++++++++++--------------------- src/mame/drivers/taitojc.cpp | 28 +++---- src/mame/drivers/undrfire.cpp | 16 ++-- src/mame/includes/taito_f3.h | 2 +- 10 files changed, 159 insertions(+), 154 deletions(-) (limited to 'src') diff --git a/src/mame/audio/taito_en.cpp b/src/mame/audio/taito_en.cpp index 7fc4a193a17..4e518f0fce7 100644 --- a/src/mame/audio/taito_en.cpp +++ b/src/mame/audio/taito_en.cpp @@ -20,10 +20,10 @@ const device_type TAITO_EN = &device_creator; taito_en_device::taito_en_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, TAITO_EN, "Taito Ensoniq Sound System", tag, owner, clock, "taito_en", __FILE__), - m_audiocpu(*this, ":audiocpu"), - m_ensoniq(*this, ":ensoniq"), - m_duart68681(*this, ":duart68681"), - m_mb87078(*this, ":mb87078"), + m_audiocpu(*this, "audiocpu"), + m_ensoniq(*this, "ensoniq"), + m_duart68681(*this, "duart68681"), + m_mb87078(*this, "mb87078"), m_snd_shared_ram(*this, ":snd_shared"), m_es5510_dol_latch(0), m_es5510_dil_latch(0), @@ -56,11 +56,11 @@ void taito_en_device::device_start() void taito_en_device::device_reset() { /* Sound cpu program loads to 0xc00000 so we use a bank */ - UINT16 *ROM = (UINT16 *)machine().root_device().memregion("audiocpu")->base(); - UINT16 *sound_ram = (UINT16 *)machine().root_device().memshare("share1")->ptr(); - machine().root_device().membank("bank1")->set_base(&ROM[0x80000]); - machine().root_device().membank("bank2")->set_base(&ROM[0x90000]); - machine().root_device().membank("bank3")->set_base(&ROM[0xa0000]); + UINT16 *ROM = (UINT16 *)memregion("audiocpu")->base(); + UINT16 *sound_ram = (UINT16 *)memshare("share1")->ptr(); + membank("bank1")->set_base(&ROM[0x80000]); + membank("bank2")->set_base(&ROM[0x90000]); + membank("bank3")->set_base(&ROM[0xa0000]); sound_ram[0] = ROM[0x80000]; /* Stack and Reset vectors */ sound_ram[1] = ROM[0x80001]; @@ -105,7 +105,7 @@ WRITE8_MEMBER( taito_en_device::en_68000_share_w ) WRITE16_MEMBER( taito_en_device::en_es5505_bank_w ) { - UINT32 max_banks_this_game = (space.machine().root_device().memregion("ensoniq.0")->bytes()/0x200000)-1; + UINT32 max_banks_this_game = (memregion(":ensoniq.0")->bytes()/0x200000)-1; /* mask out unused bits */ data &= max_banks_this_game; @@ -146,7 +146,7 @@ READ16_MEMBER( taito_en_device::es5510_dsp_r ) WRITE16_MEMBER( taito_en_device::es5510_dsp_w ) { - UINT8 *snd_mem = (UINT8 *)space.machine().root_device().memregion("ensoniq.0")->base(); + UINT8 *snd_mem = (UINT8 *)memregion(":ensoniq.0")->base(); // if (offset>4 && offset!=0x80 && offset!=0xa0 && offset!=0xc0 && offset!=0xe0) // logerror("%06x: DSP write offset %04x %04x\n",space.device().safe_pc(),offset,data); @@ -218,14 +218,14 @@ WRITE16_MEMBER( taito_en_device::es5510_dsp_w ) * *************************************/ -static ADDRESS_MAP_START( en_sound_map, AS_PROGRAM, 16, driver_device ) +static ADDRESS_MAP_START( en_sound_map, AS_PROGRAM, 16, taito_en_device ) AM_RANGE(0x000000, 0x00ffff) AM_RAM AM_MIRROR(0x30000) AM_SHARE("share1") - AM_RANGE(0x140000, 0x140fff) AM_DEVREADWRITE8("taito_en", taito_en_device, en_68000_share_r, en_68000_share_w, 0xff00) + AM_RANGE(0x140000, 0x140fff) AM_READWRITE8(en_68000_share_r, en_68000_share_w, 0xff00) AM_RANGE(0x200000, 0x20001f) AM_DEVREADWRITE("ensoniq", es5505_device, read, write) - AM_RANGE(0x260000, 0x2601ff) AM_DEVREADWRITE("taito_en", taito_en_device, es5510_dsp_r, es5510_dsp_w) //todo: hook up cpu/es5510 + AM_RANGE(0x260000, 0x2601ff) AM_READWRITE(es5510_dsp_r, es5510_dsp_w) //todo: hook up cpu/es5510 AM_RANGE(0x280000, 0x28001f) AM_DEVREADWRITE8("duart68681", mc68681_device, read, write, 0x00ff) - AM_RANGE(0x300000, 0x30003f) AM_DEVWRITE("taito_en", taito_en_device, en_es5505_bank_w) - AM_RANGE(0x340000, 0x340003) AM_DEVWRITE8("taito_en", taito_en_device, en_volume_w, 0xff00) + AM_RANGE(0x300000, 0x30003f) AM_WRITE(en_es5505_bank_w) + AM_RANGE(0x340000, 0x340003) AM_WRITE8(en_volume_w, 0xff00) AM_RANGE(0xc00000, 0xc1ffff) AM_ROMBANK("bank1") AM_RANGE(0xc20000, 0xc3ffff) AM_ROMBANK("bank2") AM_RANGE(0xc40000, 0xc7ffff) AM_ROMBANK("bank3") @@ -295,16 +295,15 @@ WRITE_LINE_MEMBER(taito_en_device::duart_irq_handler) MACHINE_CONFIG_FRAGMENT( taito_en_sound ) /* basic machine hardware */ - MCFG_TAITO_EN_ADD("taito_en") MCFG_CPU_ADD("audiocpu", M68000, XTAL_30_4761MHz / 2) MCFG_CPU_PROGRAM_MAP(en_sound_map) MCFG_MC68681_ADD("duart68681", XTAL_16MHz / 4) MCFG_MC68681_SET_EXTERNAL_CLOCKS(XTAL_16MHz/2/8, XTAL_16MHz/2/16, XTAL_16MHz/2/16, XTAL_16MHz/2/8) - MCFG_MC68681_IRQ_CALLBACK(DEVWRITELINE("taito_en", taito_en_device, duart_irq_handler)) + MCFG_MC68681_IRQ_CALLBACK(WRITELINE(taito_en_device, duart_irq_handler)) MCFG_DEVICE_ADD("mb87078", MB87078, 0) - MCFG_MB87078_GAIN_CHANGED_CB(DEVWRITE8("taito_en", taito_en_device, mb87078_gain_changed)) + MCFG_MB87078_GAIN_CHANGED_CB(WRITE8(taito_en_device, mb87078_gain_changed)) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") @@ -315,3 +314,13 @@ MACHINE_CONFIG_FRAGMENT( taito_en_sound ) MCFG_SOUND_ROUTE(0, "lspeaker", 0.08) MCFG_SOUND_ROUTE(1, "rspeaker", 0.08) MACHINE_CONFIG_END + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor taito_en_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( taito_en_sound ); +} diff --git a/src/mame/audio/taito_en.h b/src/mame/audio/taito_en.h index 395a313a07a..0d4fee8a30f 100644 --- a/src/mame/audio/taito_en.h +++ b/src/mame/audio/taito_en.h @@ -35,6 +35,7 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + virtual machine_config_constructor device_mconfig_additions() const override; private: // inherited devices/pointers @@ -56,8 +57,3 @@ private: }; extern const device_type TAITO_EN; - -MACHINE_CONFIG_EXTERN( taito_en_sound ); - -#define MCFG_TAITO_EN_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, TAITO_EN, 0) diff --git a/src/mame/drivers/galastrm.cpp b/src/mame/drivers/galastrm.cpp index 9c242647aae..796b3130948 100644 --- a/src/mame/drivers/galastrm.cpp +++ b/src/mame/drivers/galastrm.cpp @@ -314,7 +314,7 @@ static MACHINE_CONFIG_START( galastrm, galastrm_state ) MCFG_TC0480SCP_PALETTE("palette") /* sound hardware */ - MCFG_FRAGMENT_ADD(taito_en_sound) + MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) MACHINE_CONFIG_END /***************************************************************************/ @@ -326,7 +326,7 @@ ROM_START( galastrm ) ROM_LOAD32_BYTE( "c99_13.ic103", 0x00002, 0x40000, CRC(885fcb35) SHA1(be10e109c461c1f776e98efa1b2a4d588aa0c41c) ) ROM_LOAD32_BYTE( "c99_14.ic104", 0x00003, 0x40000, CRC(457ef6b1) SHA1(06c2613d46addacd380a0f2413cd795b17ac9474) ) - ROM_REGION( 0x180000, "audiocpu", 0 ) + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) ROM_LOAD16_BYTE( "c99_23.ic8", 0x100000, 0x20000, CRC(5718ee92) SHA1(33cfa60c5bceb1525498f27b598067d2dc620431) ) ROM_LOAD16_BYTE( "c99_22.ic7", 0x100001, 0x20000, CRC(b90f7c42) SHA1(e2fa9ee10ad61ae1a672c3357c0072b79ec7fbcb) ) diff --git a/src/mame/drivers/groundfx.cpp b/src/mame/drivers/groundfx.cpp index b4649993cb2..ff6d31a6870 100644 --- a/src/mame/drivers/groundfx.cpp +++ b/src/mame/drivers/groundfx.cpp @@ -347,7 +347,7 @@ static MACHINE_CONFIG_START( groundfx, groundfx_state ) MCFG_TC0480SCP_PALETTE("palette") /* sound hardware */ - MCFG_FRAGMENT_ADD(taito_en_sound) + MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) MACHINE_CONFIG_END /*************************************************************************** @@ -361,7 +361,7 @@ ROM_START( groundfx ) ROM_LOAD32_BYTE( "d51-22.77", 0x00002, 0x80000, CRC(b6b04d88) SHA1(58685ee8fd788dcbfe318f1e3c06d93e2128034c) ) ROM_LOAD32_BYTE( "d51-21.59", 0x00003, 0x80000, CRC(21ecde2b) SHA1(c6d3738f34c8e24346e7784b14aeff300ae2d225) ) - ROM_REGION( 0x180000, "audiocpu", 0 ) + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) ROM_LOAD16_BYTE( "d51-29.54", 0x100000, 0x40000, CRC(4b64f41d) SHA1(040427668d13f7320d23805098d6d0e1aa8d121e) ) ROM_LOAD16_BYTE( "d51-30.56", 0x100001, 0x40000, CRC(45f339fe) SHA1(cc7adfb2b86070f5bb426542e3b7ed2a50b3c39e) ) diff --git a/src/mame/drivers/gunbustr.cpp b/src/mame/drivers/gunbustr.cpp index 4fc53982509..b4ffdf0ba70 100644 --- a/src/mame/drivers/gunbustr.cpp +++ b/src/mame/drivers/gunbustr.cpp @@ -306,7 +306,7 @@ static MACHINE_CONFIG_START( gunbustr, gunbustr_state ) MCFG_TC0480SCP_PALETTE("palette") /* sound hardware */ - MCFG_FRAGMENT_ADD(taito_en_sound) + MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) MACHINE_CONFIG_END /***************************************************************************/ @@ -318,7 +318,7 @@ ROM_START( gunbustr ) ROM_LOAD32_BYTE( "d27-21.bin", 0x00002, 0x40000, CRC(60950a8a) SHA1(a0336bf6970baa6eaa998a112db840a7fd0452d7) ) ROM_LOAD32_BYTE( "d27-27.bin", 0x00003, 0x40000, CRC(fd7d3d4c) SHA1(df42e135b1e9b7e371971ba7c8a2e161f3623aa3) ) - ROM_REGION( 0x140000, "audiocpu", 0 ) /* Sound cpu */ + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) /* Sound cpu */ ROM_LOAD16_BYTE( "d27-25.bin", 0x100000, 0x20000, CRC(c88203cf) SHA1(a918d395b471acdce56dacabd7a1e1e023948365) ) ROM_LOAD16_BYTE( "d27-24.bin", 0x100001, 0x20000, CRC(084bd8bd) SHA1(93229bc7de4550ead1bb12f666ddbacbe357488d) ) @@ -352,7 +352,7 @@ ROM_START( gunbustru ) ROM_LOAD32_BYTE( "d27-21.bin", 0x00002, 0x40000, CRC(60950a8a) SHA1(a0336bf6970baa6eaa998a112db840a7fd0452d7) ) ROM_LOAD32_BYTE( "d27-26.bin", 0x00003, 0x40000, CRC(8a7a0dda) SHA1(59ee7c391c170ab05a3d3d940d833c65e265d9b3) ) - ROM_REGION( 0x140000, "audiocpu", 0 ) /* Sound cpu */ + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) /* Sound cpu */ ROM_LOAD16_BYTE( "d27-25.bin", 0x100000, 0x20000, CRC(c88203cf) SHA1(a918d395b471acdce56dacabd7a1e1e023948365) ) ROM_LOAD16_BYTE( "d27-24.bin", 0x100001, 0x20000, CRC(084bd8bd) SHA1(93229bc7de4550ead1bb12f666ddbacbe357488d) ) @@ -386,7 +386,7 @@ ROM_START( gunbustrj ) ROM_LOAD32_BYTE( "d27-21.bin", 0x00002, 0x40000, CRC(60950a8a) SHA1(a0336bf6970baa6eaa998a112db840a7fd0452d7) ) ROM_LOAD32_BYTE( "d27-20.bin", 0x00003, 0x40000, CRC(13735c60) SHA1(65b762b28d51b295f6fe190420af566b1b3d4a82) ) - ROM_REGION( 0x140000, "audiocpu", 0 ) /* Sound cpu */ + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) /* Sound cpu */ ROM_LOAD16_BYTE( "d27-25.bin", 0x100000, 0x20000, CRC(c88203cf) SHA1(a918d395b471acdce56dacabd7a1e1e023948365) ) ROM_LOAD16_BYTE( "d27-24.bin", 0x100001, 0x20000, CRC(084bd8bd) SHA1(93229bc7de4550ead1bb12f666ddbacbe357488d) ) diff --git a/src/mame/drivers/superchs.cpp b/src/mame/drivers/superchs.cpp index 3f88465df2e..035b0ccafc5 100644 --- a/src/mame/drivers/superchs.cpp +++ b/src/mame/drivers/superchs.cpp @@ -339,7 +339,7 @@ static MACHINE_CONFIG_START( superchs, superchs_state ) MCFG_TC0480SCP_PALETTE("palette") /* sound hardware */ - MCFG_FRAGMENT_ADD(taito_en_sound) + MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( chase3, superchs ) @@ -358,7 +358,7 @@ ROM_START( superchs ) ROM_LOAD32_BYTE( "d46-33+.ic23", 0x00002, 0x40000, CRC(3094bcd0) SHA1(b6779b81a3ebec440a9359868dc43fc3a631ee11) ) /* Actually labeled D46 33* */ ROM_LOAD32_BYTE( "d46-32+.ic21", 0x00003, 0x40000, CRC(4fbeb335) SHA1(430cb753f3a12ab0412e82aef99e6e93b83050d6) ) /* Actually labeled D46 32* */ - ROM_REGION( 0x140000, "audiocpu", 0 ) /* Sound cpu */ + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) /* Sound cpu */ ROM_LOAD16_BYTE( "d46-37.ic8", 0x100000, 0x20000, CRC(60b51b91) SHA1(0d0b017808e0a3bdabe8ef5a726bbe16428db06b) ) ROM_LOAD16_BYTE( "d46-36.ic7", 0x100001, 0x20000, CRC(8f7aa276) SHA1(b3e330e33099d3cbf4cdc43063119b041e9eea3a) ) @@ -408,7 +408,7 @@ ROM_START( superchsu ) ROM_LOAD32_BYTE( "d46-33+.ic23", 0x00002, 0x40000, CRC(3094bcd0) SHA1(b6779b81a3ebec440a9359868dc43fc3a631ee11) ) /* Actually labeled D46 33* */ ROM_LOAD32_BYTE( "d46-31+.ic21", 0x00003, 0x40000, CRC(38b983a3) SHA1(c4859cecc2f3506b7090c462cecd3e4eaabe85aa) ) /* Actually labeled D46 31* */ - ROM_REGION( 0x140000, "audiocpu", 0 ) /* Sound cpu */ + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) /* Sound cpu */ ROM_LOAD16_BYTE( "d46-37.ic8", 0x100000, 0x20000, CRC(60b51b91) SHA1(0d0b017808e0a3bdabe8ef5a726bbe16428db06b) ) ROM_LOAD16_BYTE( "d46-36.ic7", 0x100001, 0x20000, CRC(8f7aa276) SHA1(b3e330e33099d3cbf4cdc43063119b041e9eea3a) ) @@ -458,7 +458,7 @@ ROM_START( superchsj ) ROM_LOAD32_BYTE( "d46-26+.ic23", 0x00002, 0x40000, CRC(2aaba1b0) SHA1(13ceaa678bd671c5c88cac35e8a021a180728a69) ) /* Actually labeled D46 26* */ ROM_LOAD32_BYTE( "d46-25+.ic21", 0x00003, 0x40000, CRC(4241e97a) SHA1(e3e361080e3ebc098805310d41b3afe7f14ff8b4) ) /* Actually labeled D46 25* */ - ROM_REGION( 0x140000, "audiocpu", 0 ) /* Sound cpu */ + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) /* Sound cpu */ ROM_LOAD16_BYTE( "d46-30.ic8", 0x100000, 0x20000, CRC(88f8a421) SHA1(4fd0885d398b1b0e127d7462926d1630a635e305) ) ROM_LOAD16_BYTE( "d46-29.ic7", 0x100001, 0x20000, CRC(04501fa5) SHA1(dfbafc34df8ab0fcaefb5ca4c3143977020b7e58) ) @@ -508,7 +508,7 @@ ROM_START( superchsp ) ROM_LOAD32_BYTE( "ic25 a56c.bin", 0x00001, 0x40000, CRC(553ebaa9) SHA1(cfa544cb147218c3b3d9be313d83350bed34b348) ) ROM_LOAD32_BYTE( "ic27 1a46.bin", 0x00000, 0x40000, CRC(544e34c0) SHA1(57039063fa547e650fc66baf132988fb23ba0565) ) - ROM_REGION( 0x140000, "audiocpu", 0 ) /* Sound cpu */ + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) /* Sound cpu */ ROM_LOAD16_BYTE( "sound ic7 lower.bin", 0x100001, 0x20000, CRC(e70902cc) SHA1(ee3d31c4e2c92c4a338d08d379cb80f42f8fa9cf) ) ROM_LOAD16_BYTE( "sound ic8 upper.bin", 0x100000, 0x20000, CRC(86eea635) SHA1(49615a152c215e1f940ab16be3b0f1120822969c) ) diff --git a/src/mame/drivers/taito_f3.cpp b/src/mame/drivers/taito_f3.cpp index 17d62e4f18e..2d13f715018 100644 --- a/src/mame/drivers/taito_f3.cpp +++ b/src/mame/drivers/taito_f3.cpp @@ -119,7 +119,7 @@ WRITE32_MEMBER(taito_f3_state::f3_sound_reset_1_w) WRITE32_MEMBER(taito_f3_state::f3_sound_bankswitch_w) { if (m_f3_game==KIRAMEKI) { - UINT16 *rom = (UINT16 *)memregion("audiocpu")->base(); + UINT16 *rom = (UINT16 *)memregion("taito_en:audiocpu")->base(); UINT32 idx; idx = (offset << 1) & 0x1e; @@ -131,7 +131,7 @@ WRITE32_MEMBER(taito_f3_state::f3_sound_bankswitch_w) /* Banks are 0x20000 bytes each, divide by two to get data16 pointer rather than byte pointer */ - membank("bank2")->set_base(&rom[(idx*0x20000)/2 + 0x80000]); + membank("taito_en:bank2")->set_base(&rom[(idx*0x20000)/2 + 0x80000]); } else { logerror("Sound bankswitch in unsupported game\n"); @@ -461,7 +461,7 @@ static MACHINE_CONFIG_START( f3, taito_f3_state ) MCFG_VIDEO_START_OVERRIDE(taito_f3_state,f3) /* sound hardware */ - MCFG_FRAGMENT_ADD(taito_en_sound) + MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) MACHINE_CONFIG_END /* These games reprogram the video output registers to display different scanlines, @@ -581,7 +581,7 @@ ROM_START( ringrage ) ROM_LOAD ("d21-08.51", 0x180000, 0x080000, CRC(a0d95be9) SHA1(1746097e827ac10906f012c5c4f93c388a30f4b3) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d21-18.5", 0x100000, 0x20000, CRC(133b55d0) SHA1(feb5c9d0b1adcae3b16eb206c8ac4e73fd88bef4) ) ROM_LOAD16_BYTE("d21-19.6", 0x100001, 0x20000, CRC(1f98908f) SHA1(972c8f7e4e417831466714efd0b4cadca1f3e8e5) ) @@ -610,7 +610,7 @@ ROM_START( ringrageu ) ROM_LOAD ("d21-08.51", 0x180000, 0x080000, CRC(a0d95be9) SHA1(1746097e827ac10906f012c5c4f93c388a30f4b3) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d21-18.5", 0x100000, 0x20000, CRC(133b55d0) SHA1(feb5c9d0b1adcae3b16eb206c8ac4e73fd88bef4) ) ROM_LOAD16_BYTE("d21-19.6", 0x100001, 0x20000, CRC(1f98908f) SHA1(972c8f7e4e417831466714efd0b4cadca1f3e8e5) ) @@ -639,7 +639,7 @@ ROM_START( ringragej ) ROM_LOAD ("d21-08.51", 0x180000, 0x080000, CRC(a0d95be9) SHA1(1746097e827ac10906f012c5c4f93c388a30f4b3) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d21-18.5", 0x100000, 0x20000, CRC(133b55d0) SHA1(feb5c9d0b1adcae3b16eb206c8ac4e73fd88bef4) ) ROM_LOAD16_BYTE("d21-19.6", 0x100001, 0x20000, CRC(1f98908f) SHA1(972c8f7e4e417831466714efd0b4cadca1f3e8e5) ) @@ -668,7 +668,7 @@ ROM_START( arabianm ) ROM_LOAD ("d29-08.ic51", 0x180000, 0x080000, CRC(d7562851) SHA1(91d86e75ba7a590ca298b932b4cf8fa9228f115e) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d29-18.ic5", 0x100000, 0x20000, CRC(d97780df) SHA1(d0f9d2fd7ce13f620bb44083bf012f67dda4b10b) ) ROM_LOAD16_BYTE("d29-19.ic6", 0x100001, 0x20000, CRC(b1ad365c) SHA1(1cd26d8feaaa06b50dfee32e9b7950b8ee92ac55) ) @@ -708,7 +708,7 @@ ROM_START( arabianmj ) ROM_LOAD ("d29-08.ic51", 0x180000, 0x080000, CRC(d7562851) SHA1(91d86e75ba7a590ca298b932b4cf8fa9228f115e) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d29-18.ic5", 0x100000, 0x20000, CRC(d97780df) SHA1(d0f9d2fd7ce13f620bb44083bf012f67dda4b10b) ) ROM_LOAD16_BYTE("d29-19.ic6", 0x100001, 0x20000, CRC(b1ad365c) SHA1(1cd26d8feaaa06b50dfee32e9b7950b8ee92ac55) ) @@ -748,7 +748,7 @@ ROM_START( arabianmu ) ROM_LOAD ("d29-08.ic51", 0x180000, 0x080000, CRC(d7562851) SHA1(91d86e75ba7a590ca298b932b4cf8fa9228f115e) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d29-18.ic5", 0x100000, 0x20000, CRC(d97780df) SHA1(d0f9d2fd7ce13f620bb44083bf012f67dda4b10b) ) ROM_LOAD16_BYTE("d29-19.ic6", 0x100001, 0x20000, CRC(b1ad365c) SHA1(1cd26d8feaaa06b50dfee32e9b7950b8ee92ac55) ) @@ -786,7 +786,7 @@ ROM_START( ridingf ) ROM_LOAD16_BYTE("d34-06.50", 0x000001, 0x080000, CRC(edc9b9f3) SHA1(c57bec1c8882d95388c3fae7cb5a321bdb202737) ) ROM_FILL ( 0x100000, 0x100000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d34-07.5", 0x100000, 0x20000, CRC(67239e2b) SHA1(8e0268fab53d26cde5c1928326c4787533dc6ffe) ) ROM_LOAD16_BYTE("d34-08.6", 0x100001, 0x20000, CRC(2cf20323) SHA1(b2bbac3714ecfd75506ae000c7eec603dfe3e13d) ) @@ -813,7 +813,7 @@ ROM_START( ridingfj ) ROM_LOAD16_BYTE("d34-06.50", 0x000001, 0x080000, CRC(edc9b9f3) SHA1(c57bec1c8882d95388c3fae7cb5a321bdb202737) ) ROM_FILL ( 0x100000, 0x100000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d34-07.5", 0x100000, 0x20000, CRC(67239e2b) SHA1(8e0268fab53d26cde5c1928326c4787533dc6ffe) ) ROM_LOAD16_BYTE("d34-08.6", 0x100001, 0x20000, CRC(2cf20323) SHA1(b2bbac3714ecfd75506ae000c7eec603dfe3e13d) ) @@ -840,7 +840,7 @@ ROM_START( ridingfu ) ROM_LOAD16_BYTE("d34-06.50", 0x000001, 0x080000, CRC(edc9b9f3) SHA1(c57bec1c8882d95388c3fae7cb5a321bdb202737) ) ROM_FILL ( 0x100000, 0x100000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d34-07.5", 0x100000, 0x20000, CRC(67239e2b) SHA1(8e0268fab53d26cde5c1928326c4787533dc6ffe) ) ROM_LOAD16_BYTE("d34-08.6", 0x100001, 0x20000, CRC(2cf20323) SHA1(b2bbac3714ecfd75506ae000c7eec603dfe3e13d) ) @@ -871,7 +871,7 @@ ROM_START( gseeker ) ROM_LOAD16_BYTE("d40_06.rom", 0x000001, 0x100000, CRC(a822abe4) SHA1(1a0dd9dcb8e24daab6eb1661307ef0e10f7e4d4e) ) ROM_FILL ( 0x200000, 0x200000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d40_07.rom", 0x100000, 0x20000, CRC(7e9b26c2) SHA1(d88ad39a9d70b4a5bd3f83e0d4d0725f659f1d2a) ) ROM_LOAD16_BYTE("d40_08.rom", 0x100001, 0x20000, CRC(9c926a28) SHA1(9d9ee75eb895edc381c3ab4df5af941f84cd2073) ) @@ -902,7 +902,7 @@ ROM_START( gseekerj ) ROM_LOAD16_BYTE("d40_06.rom", 0x000001, 0x100000, CRC(a822abe4) SHA1(1a0dd9dcb8e24daab6eb1661307ef0e10f7e4d4e) ) ROM_FILL ( 0x200000, 0x200000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d40_07.rom", 0x100000, 0x20000, CRC(7e9b26c2) SHA1(d88ad39a9d70b4a5bd3f83e0d4d0725f659f1d2a) ) ROM_LOAD16_BYTE("d40_08.rom", 0x100001, 0x20000, CRC(9c926a28) SHA1(9d9ee75eb895edc381c3ab4df5af941f84cd2073) ) @@ -933,7 +933,7 @@ ROM_START( gseekeru ) ROM_LOAD16_BYTE("d40_06.rom", 0x000001, 0x100000, CRC(a822abe4) SHA1(1a0dd9dcb8e24daab6eb1661307ef0e10f7e4d4e) ) ROM_FILL ( 0x200000, 0x200000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d40_07.rom", 0x100000, 0x20000, CRC(7e9b26c2) SHA1(d88ad39a9d70b4a5bd3f83e0d4d0725f659f1d2a) ) ROM_LOAD16_BYTE("d40_08.rom", 0x100001, 0x20000, CRC(9c926a28) SHA1(9d9ee75eb895edc381c3ab4df5af941f84cd2073) ) @@ -965,7 +965,7 @@ ROM_START( commandw ) ROM_LOAD ("cw_scr_h.bin", 0x300000, 0x100000, CRC(001f85dd) SHA1(2532377c0b54bc964ea4e74911ff62fea2d53975) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("cw_spr1.bin", 0x100000, 0x20000, CRC(c8f81c25) SHA1(1c914053826587cc2d5d2c0220a3e29a641fe6f9) ) ROM_LOAD16_BYTE("cw_spr0.bin", 0x100001, 0x20000, CRC(2aaa9dfb) SHA1(6d4c36ff54a84035c0ddf40e4f3eafd2adc15a5e) ) @@ -996,7 +996,7 @@ ROM_START( cupfinal ) ROM_LOAD ("d49-11.43", 0x180000, 0x080000, CRC(11318b26) SHA1(a7153f9f406d52189f59cbe58d65f88f4e2e6fcc) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d49-17.32", 0x100000, 0x20000, CRC(f2058eba) SHA1(7faaa94fadf02b6304287b61fb9613f9f4169fef) ) ROM_LOAD16_BYTE("d49-18.33", 0x100001, 0x20000, CRC(a0fdd270) SHA1(9b5a2c8d35ea3bc6842e3c328447c3bf641b9237) ) @@ -1028,7 +1028,7 @@ ROM_START( hthero93 ) ROM_LOAD ("d49-11.43", 0x180000, 0x080000, CRC(11318b26) SHA1(a7153f9f406d52189f59cbe58d65f88f4e2e6fcc) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d49-17.32", 0x100000, 0x20000, CRC(f2058eba) SHA1(7faaa94fadf02b6304287b61fb9613f9f4169fef) ) ROM_LOAD16_BYTE("d49-18.33", 0x100001, 0x20000, CRC(a0fdd270) SHA1(9b5a2c8d35ea3bc6842e3c328447c3bf641b9237) ) @@ -1060,7 +1060,7 @@ ROM_START( hthero93u ) ROM_LOAD ("d49-11.43", 0x180000, 0x080000, CRC(11318b26) SHA1(a7153f9f406d52189f59cbe58d65f88f4e2e6fcc) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d49-17.32", 0x100000, 0x20000, CRC(f2058eba) SHA1(7faaa94fadf02b6304287b61fb9613f9f4169fef) ) ROM_LOAD16_BYTE("d49-18.33", 0x100001, 0x20000, CRC(a0fdd270) SHA1(9b5a2c8d35ea3bc6842e3c328447c3bf641b9237) ) @@ -1108,7 +1108,7 @@ ROM_START( trstar ) ROM_LOAD ("d53-11.50", 0x300000, 0x100000, CRC(39c0a546) SHA1(53f03586f6586032fc3b4f90e987c1128edbb0a7) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d53-13.10", 0x100000, 0x20000, CRC(877f0361) SHA1(eda58d71fb06f739bee1451d7aa7e7e6dee10e03) ) ROM_LOAD16_BYTE("d53-14.23", 0x100001, 0x20000, CRC(a8664867) SHA1(dffddca469019abac33a1abe41c3fe83fbf553ce) ) @@ -1139,7 +1139,7 @@ ROM_START( trstarj ) ROM_LOAD ("d53-11.50", 0x300000, 0x100000, CRC(39c0a546) SHA1(53f03586f6586032fc3b4f90e987c1128edbb0a7) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d53-13.10", 0x100000, 0x20000, CRC(877f0361) SHA1(eda58d71fb06f739bee1451d7aa7e7e6dee10e03) ) ROM_LOAD16_BYTE("d53-14.23", 0x100001, 0x20000, CRC(a8664867) SHA1(dffddca469019abac33a1abe41c3fe83fbf553ce) ) @@ -1170,7 +1170,7 @@ ROM_START( prmtmfgt ) ROM_LOAD ("d53-11.50", 0x300000, 0x100000, CRC(39c0a546) SHA1(53f03586f6586032fc3b4f90e987c1128edbb0a7) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d53-13.10", 0x100000, 0x20000, CRC(877f0361) SHA1(eda58d71fb06f739bee1451d7aa7e7e6dee10e03) ) ROM_LOAD16_BYTE("d53-14.23", 0x100001, 0x20000, CRC(a8664867) SHA1(dffddca469019abac33a1abe41c3fe83fbf553ce) ) @@ -1201,7 +1201,7 @@ ROM_START( trstaro ) ROM_LOAD ("d53-11.50", 0x300000, 0x100000, CRC(39c0a546) SHA1(53f03586f6586032fc3b4f90e987c1128edbb0a7) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d53-13.10", 0x100000, 0x20000, CRC(877f0361) SHA1(eda58d71fb06f739bee1451d7aa7e7e6dee10e03) ) ROM_LOAD16_BYTE("d53-14.23", 0x100001, 0x20000, CRC(a8664867) SHA1(dffddca469019abac33a1abe41c3fe83fbf553ce) ) @@ -1232,7 +1232,7 @@ ROM_START( trstaroj ) ROM_LOAD ("d53-11.50", 0x300000, 0x100000, CRC(39c0a546) SHA1(53f03586f6586032fc3b4f90e987c1128edbb0a7) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d53-13.10", 0x100000, 0x20000, CRC(877f0361) SHA1(eda58d71fb06f739bee1451d7aa7e7e6dee10e03) ) ROM_LOAD16_BYTE("d53-14.23", 0x100001, 0x20000, CRC(a8664867) SHA1(dffddca469019abac33a1abe41c3fe83fbf553ce) ) @@ -1263,7 +1263,7 @@ ROM_START( prmtmfgto ) ROM_LOAD ("d53-11.50", 0x300000, 0x100000, CRC(39c0a546) SHA1(53f03586f6586032fc3b4f90e987c1128edbb0a7) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d53-13.10", 0x100000, 0x20000, CRC(877f0361) SHA1(eda58d71fb06f739bee1451d7aa7e7e6dee10e03) ) ROM_LOAD16_BYTE("d53-14.23", 0x100001, 0x20000, CRC(a8664867) SHA1(dffddca469019abac33a1abe41c3fe83fbf553ce) ) @@ -1291,7 +1291,7 @@ ROM_START( gunlock ) ROM_LOAD ("d66-08.ic49", 0x300000, 0x100000, CRC(9959f30b) SHA1(64bf2bf995c283c00d968e3c078b824de4084d3d) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 code */ ROM_LOAD16_BYTE("d66-23.ic10", 0x100000, 0x40000, CRC(57fb7c49) SHA1(f8709fd1e9ea7cee10ee2288d13339f675a7d3ae) ) ROM_LOAD16_BYTE("d66-22.ic23", 0x100001, 0x40000, CRC(83dd7f9b) SHA1(dae21f64232d3e268f22b5e9899e0b726fdc9a9f) ) @@ -1319,7 +1319,7 @@ ROM_START( rayforce ) ROM_LOAD ("d66-08.ic49", 0x300000, 0x100000, CRC(9959f30b) SHA1(64bf2bf995c283c00d968e3c078b824de4084d3d) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 code */ ROM_LOAD16_BYTE("d66-23.ic10", 0x100000, 0x40000, CRC(57fb7c49) SHA1(f8709fd1e9ea7cee10ee2288d13339f675a7d3ae) ) ROM_LOAD16_BYTE("d66-22.ic23", 0x100001, 0x40000, CRC(83dd7f9b) SHA1(dae21f64232d3e268f22b5e9899e0b726fdc9a9f) ) @@ -1347,7 +1347,7 @@ ROM_START( rayforcej ) ROM_LOAD ("d66-08.ic49", 0x300000, 0x100000, CRC(9959f30b) SHA1(64bf2bf995c283c00d968e3c078b824de4084d3d) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 code */ ROM_LOAD16_BYTE("d66-23.ic10", 0x100000, 0x40000, CRC(57fb7c49) SHA1(f8709fd1e9ea7cee10ee2288d13339f675a7d3ae) ) ROM_LOAD16_BYTE("d66-22.ic23", 0x100001, 0x40000, CRC(83dd7f9b) SHA1(dae21f64232d3e268f22b5e9899e0b726fdc9a9f) ) @@ -1378,7 +1378,7 @@ ROM_START( scfinals ) /* This is the single PCB version */ ROM_LOAD ("d49-11.43", 0x180000, 0x080000, CRC(11318b26) SHA1(a7153f9f406d52189f59cbe58d65f88f4e2e6fcc) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d49-17.ic5", 0x100000, 0x20000, CRC(f2058eba) SHA1(7faaa94fadf02b6304287b61fb9613f9f4169fef) ) ROM_LOAD16_BYTE("d49-18.ic6", 0x100001, 0x20000, CRC(a0fdd270) SHA1(9b5a2c8d35ea3bc6842e3c328447c3bf641b9237) ) @@ -1413,7 +1413,7 @@ ROM_START( scfinalso ) /* Cart version */ ROM_LOAD ("d49-11.43", 0x180000, 0x080000, CRC(11318b26) SHA1(a7153f9f406d52189f59cbe58d65f88f4e2e6fcc) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d49-17.32", 0x100000, 0x20000, CRC(f2058eba) SHA1(7faaa94fadf02b6304287b61fb9613f9f4169fef) ) ROM_LOAD16_BYTE("d49-18.33", 0x100001, 0x20000, CRC(a0fdd270) SHA1(9b5a2c8d35ea3bc6842e3c328447c3bf641b9237) ) @@ -1448,7 +1448,7 @@ ROM_START( lightbr ) ROM_LOAD ("d69-05.bin", 0x600000, 0x200000, CRC(f9f5433c) SHA1(d3de66385d883c72967c44bc29983d7a79f665d1) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d69-18.bin", 0x100000, 0x20000, CRC(04600d7b) SHA1(666cfab09b61fd6e0bc4ff277018ebf1cda01b0e) ) ROM_LOAD16_BYTE("d69-19.bin", 0x100001, 0x20000, CRC(1484e853) SHA1(4459c18ba005786483c652857e527c6093efb036) ) @@ -1479,7 +1479,7 @@ ROM_START( dungeonm ) ROM_LOAD ("d69-05.bin", 0x600000, 0x200000, CRC(f9f5433c) SHA1(d3de66385d883c72967c44bc29983d7a79f665d1) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d69-18.bin", 0x100000, 0x20000, CRC(04600d7b) SHA1(666cfab09b61fd6e0bc4ff277018ebf1cda01b0e) ) ROM_LOAD16_BYTE("d69-19.bin", 0x100001, 0x20000, CRC(1484e853) SHA1(4459c18ba005786483c652857e527c6093efb036) ) @@ -1510,7 +1510,7 @@ ROM_START( dungeonmu ) ROM_LOAD ("d69-05.bin", 0x600000, 0x200000, CRC(f9f5433c) SHA1(d3de66385d883c72967c44bc29983d7a79f665d1) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d69-18.bin", 0x100000, 0x20000, CRC(04600d7b) SHA1(666cfab09b61fd6e0bc4ff277018ebf1cda01b0e) ) ROM_LOAD16_BYTE("d69-19.bin", 0x100001, 0x20000, CRC(1484e853) SHA1(4459c18ba005786483c652857e527c6093efb036) ) @@ -1601,7 +1601,7 @@ ROM_START( lightbrj ) ROM_LOAD ("d69-05.bin", 0x600000, 0x200000, CRC(f9f5433c) SHA1(d3de66385d883c72967c44bc29983d7a79f665d1) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d69-18.bin", 0x100000, 0x20000, CRC(04600d7b) SHA1(666cfab09b61fd6e0bc4ff277018ebf1cda01b0e) ) ROM_LOAD16_BYTE("d69-19.bin", 0x100001, 0x20000, CRC(1484e853) SHA1(4459c18ba005786483c652857e527c6093efb036) ) @@ -1632,7 +1632,7 @@ ROM_START( intcup94 ) ROM_LOAD ("d78-03.43", 0x180000, 0x080000, CRC(a8bc36e5) SHA1(5777b9457292e8a9cbb4e8226ba939530ffab07c) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d78-08.32", 0x100000, 0x20000, CRC(a629d07c) SHA1(b2904e106633a3960ceb2bc58b600ea60034ff0b) ) ROM_LOAD16_BYTE("d78-09.33", 0x100001, 0x20000, CRC(1f0efe01) SHA1(7bff748b9fcee170e430d90ee07eb9975d8fba59) ) @@ -1664,7 +1664,7 @@ ROM_START( hthero94 ) ROM_LOAD ("d78-03.43", 0x180000, 0x080000, CRC(a8bc36e5) SHA1(5777b9457292e8a9cbb4e8226ba939530ffab07c) ) ROM_FILL ( 0x100000, 0x080000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d78-08.32", 0x100000, 0x20000, CRC(a629d07c) SHA1(b2904e106633a3960ceb2bc58b600ea60034ff0b) ) ROM_LOAD16_BYTE("d78-09.33", 0x100001, 0x20000, CRC(1f0efe01) SHA1(7bff748b9fcee170e430d90ee07eb9975d8fba59) ) @@ -1691,7 +1691,7 @@ ROM_START( recalh ) ROM_LOAD16_BYTE("rh_scrm.bin", 0x000001, 0x100000, CRC(37200968) SHA1(4a8d5a17af7eb732f481bf174099845e8d8d6b87) ) ROM_FILL ( 0x200000, 0x200000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("rh_spr1.bin", 0x100000, 0x20000, CRC(504cbc1d) SHA1(35a775c1ebc8107c553e43b9d84eb735446c26fd) ) ROM_LOAD16_BYTE("rh_spr0.bin", 0x100001, 0x20000, CRC(78fba467) SHA1(4586b061724be7ec413784b820c33cc0d6bbcd0c) ) @@ -1732,7 +1732,7 @@ ROM_START( kaiserkn ) ROM_LOAD ("d84-18.rom", 0xb00000, 0x100000, CRC(e812bcc5) SHA1(3574e4a99232d9fc7989ec5d1e8fe76b4b30784a) ) ROM_FILL ( 0x600000, 0x300000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d84-26.32", 0x100000, 0x40000, CRC(4f5b8563) SHA1(1d4e06cbea7bc73a99d6e30be714fff420151bbc) ) ROM_LOAD16_BYTE("d84-27.33", 0x100001, 0x40000, CRC(fb0cb1ba) SHA1(16a79b53651a6131f7636db19738b456b7c28bff) ) @@ -1775,7 +1775,7 @@ ROM_START( kaiserknj ) ROM_LOAD ("d84-18.rom", 0xb00000, 0x100000, CRC(e812bcc5) SHA1(3574e4a99232d9fc7989ec5d1e8fe76b4b30784a) ) ROM_FILL ( 0x600000, 0x300000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d84-26.32", 0x100000, 0x40000, CRC(4f5b8563) SHA1(1d4e06cbea7bc73a99d6e30be714fff420151bbc) ) ROM_LOAD16_BYTE("d84-27.33", 0x100001, 0x40000, CRC(fb0cb1ba) SHA1(16a79b53651a6131f7636db19738b456b7c28bff) ) @@ -1818,7 +1818,7 @@ ROM_START( gblchmp ) ROM_LOAD ("d84-18.rom", 0xb00000, 0x100000, CRC(e812bcc5) SHA1(3574e4a99232d9fc7989ec5d1e8fe76b4b30784a) ) ROM_FILL ( 0x600000, 0x300000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d84-26.32", 0x100000, 0x40000, CRC(4f5b8563) SHA1(1d4e06cbea7bc73a99d6e30be714fff420151bbc) ) ROM_LOAD16_BYTE("d84-27.33", 0x100001, 0x40000, CRC(fb0cb1ba) SHA1(16a79b53651a6131f7636db19738b456b7c28bff) ) @@ -1861,7 +1861,7 @@ ROM_START( dankuga ) ROM_LOAD ("d84-18.rom", 0xb00000, 0x100000, CRC(e812bcc5) SHA1(3574e4a99232d9fc7989ec5d1e8fe76b4b30784a) ) ROM_FILL ( 0x600000, 0x300000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d84-26.32", 0x100000, 0x40000, CRC(4f5b8563) SHA1(1d4e06cbea7bc73a99d6e30be714fff420151bbc) ) ROM_LOAD16_BYTE("d84-27.33", 0x100001, 0x40000, CRC(fb0cb1ba) SHA1(16a79b53651a6131f7636db19738b456b7c28bff) ) @@ -1892,7 +1892,7 @@ ROM_START( dariusg ) ROM_LOAD ("d87-08.bin", 0x600000, 0x200000, CRC(76d23602) SHA1(ca53ea6641182c44a4038bbeaa5effb1687f1980) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d87-13.bin", 0x100000, 0x40000, CRC(15b1fff4) SHA1(28692b731ae98a47c2c5e11a8a71b61a813d9a64) ) ROM_LOAD16_BYTE("d87-14.bin", 0x100001, 0x40000, CRC(eecda29a) SHA1(6eb238e47bc7bf635ffbdbb25fb06a37db980ef8) ) @@ -1920,7 +1920,7 @@ ROM_START( dariusgj ) ROM_LOAD ("d87-08.bin", 0x600000, 0x200000, CRC(76d23602) SHA1(ca53ea6641182c44a4038bbeaa5effb1687f1980) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d87-13.bin", 0x100000, 0x40000, CRC(15b1fff4) SHA1(28692b731ae98a47c2c5e11a8a71b61a813d9a64) ) ROM_LOAD16_BYTE("d87-14.bin", 0x100001, 0x40000, CRC(eecda29a) SHA1(6eb238e47bc7bf635ffbdbb25fb06a37db980ef8) ) @@ -1948,7 +1948,7 @@ ROM_START( dariusgu ) ROM_LOAD ("d87-08.bin", 0x600000, 0x200000, CRC(76d23602) SHA1(ca53ea6641182c44a4038bbeaa5effb1687f1980) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d87-13.bin", 0x100000, 0x40000, CRC(15b1fff4) SHA1(28692b731ae98a47c2c5e11a8a71b61a813d9a64) ) ROM_LOAD16_BYTE("d87-14.bin", 0x100001, 0x40000, CRC(eecda29a) SHA1(6eb238e47bc7bf635ffbdbb25fb06a37db980ef8) ) @@ -1976,7 +1976,7 @@ ROM_START( dariusgx ) ROM_LOAD ("d87-08.bin", 0x600000, 0x200000, CRC(76d23602) SHA1(ca53ea6641182c44a4038bbeaa5effb1687f1980) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d87-13.bin", 0x100000, 0x40000, CRC(15b1fff4) SHA1(28692b731ae98a47c2c5e11a8a71b61a813d9a64) ) ROM_LOAD16_BYTE("d87-14.bin", 0x100001, 0x40000, CRC(eecda29a) SHA1(6eb238e47bc7bf635ffbdbb25fb06a37db980ef8) ) @@ -2005,7 +2005,7 @@ ROM_START( bublbob2 ) ROM_LOAD ("d90-06", 0x300000, 0x100000, CRC(166a72b8) SHA1(7f70b8c960794322e1dc88e6600a2d13d948d873) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d90-13.ic32", 0x100000, 0x40000, CRC(6762bd90) SHA1(771db0382bc8dab2caf13d0fc20648366c685829) ) ROM_LOAD16_BYTE("d90-14.ic33", 0x100001, 0x40000, CRC(8e33357e) SHA1(68b81693c22e6357e37244f2a416818a81338138) ) @@ -2039,7 +2039,7 @@ ROM_START( bublbob2o ) ROM_LOAD ("d90-06", 0x300000, 0x100000, CRC(166a72b8) SHA1(7f70b8c960794322e1dc88e6600a2d13d948d873) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d90-13.ic32", 0x100000, 0x40000, CRC(6762bd90) SHA1(771db0382bc8dab2caf13d0fc20648366c685829) ) ROM_LOAD16_BYTE("d90-14.ic33", 0x100001, 0x40000, CRC(8e33357e) SHA1(68b81693c22e6357e37244f2a416818a81338138) ) @@ -2069,7 +2069,7 @@ ROM_START( bublbob2p ) ROM_LOAD32_BYTE("cq80-scr3-4266.ic4", 0x000003, 0x080000, CRC(c114583f) SHA1(ec85e8f4135e48607bb84b810d57d570ef56b228) ) ROM_LOAD16_BYTE("cq80-scr4-7fe1.ic3", 0x300000, 0x080000, CRC(2bba1728) SHA1(cdd2e651c233a185fcbb3fd8f5eabee2af30f781) ) - ROM_REGION(0x180000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("snd-h-348f.ic66", 0x100000, 0x20000, CRC(f66e60f2) SHA1(b94c97ccde179a69811137c77730c91924236bfe)) ROM_LOAD16_BYTE("snd-l-4ec1.ic65", 0x100001, 0x20000, CRC(d302d8bc) SHA1(02a2e69d0f4406578b12b05ab25d2abdf5bbba3c) ) @@ -2114,7 +2114,7 @@ ROM_START( bubsymphe ) ROM_LOAD ("d90-06", 0x300000, 0x100000, CRC(166a72b8) SHA1(7f70b8c960794322e1dc88e6600a2d13d948d873) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d90-13.ic32", 0x100000, 0x40000, CRC(6762bd90) SHA1(771db0382bc8dab2caf13d0fc20648366c685829) ) ROM_LOAD16_BYTE("d90-14.ic33", 0x100001, 0x40000, CRC(8e33357e) SHA1(68b81693c22e6357e37244f2a416818a81338138) ) @@ -2142,7 +2142,7 @@ ROM_START( bubsymphj ) ROM_LOAD ("d90-06", 0x300000, 0x100000, CRC(166a72b8) SHA1(7f70b8c960794322e1dc88e6600a2d13d948d873) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d90-13.ic32", 0x100000, 0x40000, CRC(6762bd90) SHA1(771db0382bc8dab2caf13d0fc20648366c685829) ) ROM_LOAD16_BYTE("d90-14.ic33", 0x100001, 0x40000, CRC(8e33357e) SHA1(68b81693c22e6357e37244f2a416818a81338138) ) @@ -2231,7 +2231,7 @@ ROM_START( bubsymphu ) ROM_LOAD ("d90-06", 0x300000, 0x100000, CRC(166a72b8) SHA1(7f70b8c960794322e1dc88e6600a2d13d948d873) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("d90-13.ic32", 0x100000, 0x40000, CRC(6762bd90) SHA1(771db0382bc8dab2caf13d0fc20648366c685829) ) ROM_LOAD16_BYTE("d90-14.ic33", 0x100001, 0x40000, CRC(8e33357e) SHA1(68b81693c22e6357e37244f2a416818a81338138) ) @@ -2257,7 +2257,7 @@ ROM_START( spcinvdj ) ROM_LOAD16_BYTE("d93-10.45", 0x000001, 0x20000, CRC(8a3f531b) SHA1(69f9971c45971018108a5d312d5bbcfd3caf9bd0) ) ROM_FILL ( 0x040000, 0x40000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d93-05.bin", 0x100000, 0x20000, CRC(ff365596) SHA1(4cf2e0d6f42cf3fb69796be6092eff8a47f7f8b9) ) ROM_LOAD16_BYTE("d93-06.bin", 0x100001, 0x20000, CRC(ef7ad400) SHA1(01be403d575a543f089b910a5a8c381a6603e67e) ) @@ -2293,7 +2293,7 @@ ROM_START( pwrgoal ) ROM_LOAD ("d94-12.bin", 0x300000, 0x100000, CRC(47064189) SHA1(99ceeb326dcc2e1c3acba8ac14d94dcb17c6e032) ) ROM_FILL ( 0x200000, 0x100000,0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d94-19.bin", 0x100000, 0x40000, CRC(c93dbcf4) SHA1(413520e652d809651aff9b1b74e6353112d34c12) ) /* Over dump?? 0x20000-0x3ffff == 0xFF */ ROM_LOAD16_BYTE("d94-20.bin", 0x100001, 0x40000, CRC(f232bf64) SHA1(bbfeae0785fc49c12aa6d9b1bd6ff7c8515f8fe7) ) /* Over dump?? 0x20000-0x3ffff == 0xFF */ @@ -2327,7 +2327,7 @@ ROM_START( hthero95 ) ROM_LOAD ("d94-12.bin", 0x300000, 0x100000, CRC(47064189) SHA1(99ceeb326dcc2e1c3acba8ac14d94dcb17c6e032) ) ROM_FILL ( 0x200000, 0x100000,0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d94-19.bin", 0x100000, 0x40000, CRC(c93dbcf4) SHA1(413520e652d809651aff9b1b74e6353112d34c12) ) /* Over dump?? 0x20000-0x3ffff == 0xFF */ ROM_LOAD16_BYTE("d94-20.bin", 0x100001, 0x40000, CRC(f232bf64) SHA1(bbfeae0785fc49c12aa6d9b1bd6ff7c8515f8fe7) ) /* Over dump?? 0x20000-0x3ffff == 0xFF */ @@ -2361,7 +2361,7 @@ ROM_START( hthero95u ) ROM_LOAD ("d94-12.bin", 0x300000, 0x100000, CRC(47064189) SHA1(99ceeb326dcc2e1c3acba8ac14d94dcb17c6e032) ) ROM_FILL ( 0x200000, 0x100000,0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d94-19.bin", 0x100000, 0x40000, CRC(c93dbcf4) SHA1(413520e652d809651aff9b1b74e6353112d34c12) ) /* Over dump?? 0x20000-0x3ffff == 0xFF */ ROM_LOAD16_BYTE("d94-20.bin", 0x100001, 0x40000, CRC(f232bf64) SHA1(bbfeae0785fc49c12aa6d9b1bd6ff7c8515f8fe7) ) /* Over dump?? 0x20000-0x3ffff == 0xFF */ @@ -2387,7 +2387,7 @@ ROM_START( qtheater ) ROM_LOAD16_BYTE("d95-05.45", 0x000001, 0x200000, CRC(1a1a852b) SHA1(89827485a31af4e2457775a5d16f747a764b6d67) ) ROM_FILL ( 0x400000, 0x400000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("d95-07.32", 0x100000, 0x40000, CRC(3c201d70) SHA1(89fe4d363f4e1a847ba7d2894a2092708b287a33) ) ROM_LOAD16_BYTE("d95-08.33", 0x100001, 0x40000, CRC(01c23354) SHA1(7b332edc844b1b1c1513e879215089987645fa3f) ) @@ -2415,7 +2415,7 @@ ROM_START( spcinv95u ) ROM_LOAD ("e06-06", 0x300000, 0x100000, CRC(9380db3c) SHA1(83f5a46a01b9c15499e0dc2222df496d26baa0d4) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e06-09.32", 0x100000, 0x40000, CRC(9bcafc87) SHA1(10b3f6da00a41550fe6a705232f0e33fda3c7e7c) ) ROM_LOAD16_BYTE("e06-10.33", 0x100001, 0x40000, CRC(b752b61f) SHA1(e948a8af19c70ba8b8e908c869bc88ed0cac8420) ) @@ -2450,7 +2450,7 @@ ROM_START( spcinv95 ) ROM_LOAD ("e06-06", 0x300000, 0x100000, CRC(9380db3c) SHA1(83f5a46a01b9c15499e0dc2222df496d26baa0d4) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e06-09.32", 0x100000, 0x40000, CRC(9bcafc87) SHA1(10b3f6da00a41550fe6a705232f0e33fda3c7e7c) ) ROM_LOAD16_BYTE("e06-10.33", 0x100001, 0x40000, CRC(b752b61f) SHA1(e948a8af19c70ba8b8e908c869bc88ed0cac8420) ) @@ -2485,7 +2485,7 @@ ROM_START( akkanvdr ) ROM_LOAD ("e06-06", 0x300000, 0x100000, CRC(9380db3c) SHA1(83f5a46a01b9c15499e0dc2222df496d26baa0d4) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e06-09.32", 0x100000, 0x40000, CRC(9bcafc87) SHA1(10b3f6da00a41550fe6a705232f0e33fda3c7e7c) ) ROM_LOAD16_BYTE("e06-10.33", 0x100001, 0x40000, CRC(b752b61f) SHA1(e948a8af19c70ba8b8e908c869bc88ed0cac8420) ) @@ -2598,7 +2598,7 @@ ROM_START( elvactr ) ROM_LOAD ("e02-06.43", 0x600000, 0x200000, CRC(4c8726e9) SHA1(8ce2320a087f43c49428a39dafffec8c40d61b03) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e02-13.32", 0x100000, 0x40000, CRC(80932702) SHA1(c468234d03aa31b2aa0c3bd6bec32034216c2ae4) ) ROM_LOAD16_BYTE("e02-14.33", 0x100001, 0x40000, CRC(706671a5) SHA1(1ac90647d617e73f12a67274a025ae43a6b3a316) ) @@ -2635,7 +2635,7 @@ ROM_START( elvactrj ) ROM_LOAD ("e02-06.43", 0x600000, 0x200000, CRC(4c8726e9) SHA1(8ce2320a087f43c49428a39dafffec8c40d61b03) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e02-13.32", 0x100000, 0x40000, CRC(80932702) SHA1(c468234d03aa31b2aa0c3bd6bec32034216c2ae4) ) ROM_LOAD16_BYTE("e02-14.33", 0x100001, 0x40000, CRC(706671a5) SHA1(1ac90647d617e73f12a67274a025ae43a6b3a316) ) @@ -2663,7 +2663,7 @@ ROM_START( elvact2u ) ROM_LOAD ("e02-06.43", 0x600000, 0x200000, CRC(4c8726e9) SHA1(8ce2320a087f43c49428a39dafffec8c40d61b03) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e02-13.32", 0x100000, 0x40000, CRC(80932702) SHA1(c468234d03aa31b2aa0c3bd6bec32034216c2ae4) ) ROM_LOAD16_BYTE("e02-14.33", 0x100001, 0x40000, CRC(706671a5) SHA1(1ac90647d617e73f12a67274a025ae43a6b3a316) ) @@ -2692,7 +2692,7 @@ ROM_START( twinqix ) ROM_LOAD16_BYTE("scr0-4.b03", 0x300000, 0x080000, CRC(d32280fe) SHA1(56b120128c5e4b8c6598a1de51269e6702a63175) ) ROM_LOAD16_BYTE("scr0-5.b02", 0x300001, 0x080000, CRC(fdd1a85b) SHA1(1d94a4858baef3e78c456049dc58249a574205fe) ) - ROM_REGION(0x180000, "audiocpu", 0) /* sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* sound CPU */ ROM_LOAD16_BYTE("spr0-1.b66", 0x100000, 0x40000, CRC(4b20e99d) SHA1(faf184daea0f1131bafa50edb48bd470d4c0b141) ) ROM_LOAD16_BYTE("spr0-0.b65", 0x100001, 0x40000, CRC(2569eb30) SHA1(ec804131025e600198cd8342925823340e7ef458) ) @@ -2734,7 +2734,7 @@ ROM_START( quizhuhu ) ROM_LOAD ("e08-10.43", 0x300000, 0x100000, CRC(60abc71b) SHA1(f4aa906920c6134c33a4dfb51724f3adbd3d7de4) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e08-18.32", 0x100000, 0x20000, CRC(e695497e) SHA1(9d845b4c0bd9b40471fb4b5ab2f9240058bc324f) ) ROM_LOAD16_BYTE("e08-17.33", 0x100001, 0x20000, CRC(fafc7e4e) SHA1(26f46d5900fbf26d25651e7e818e486fc7a878ec) ) @@ -2764,7 +2764,7 @@ ROM_START( pbobble2 ) ROM_LOAD ("e10-05.rom", 0x300000, 0x100000, CRC(81266151) SHA1(aa3b144f32995425db97efce440e234a3c7a6715) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e10-12.32", 0x100000, 0x40000, CRC(b92dc8ad) SHA1(0c1428d313507b1ae5a2af3b2fbaaa5650135e1e) ) ROM_LOAD16_BYTE("e10-13.33", 0x100001, 0x40000, CRC(87842c13) SHA1(d15b47c7430e677ae172f86fd5be595e4fe72e42) ) @@ -2796,7 +2796,7 @@ ROM_START( pbobble2o ) ROM_LOAD ("e10-05.rom", 0x300000, 0x100000, CRC(81266151) SHA1(aa3b144f32995425db97efce440e234a3c7a6715) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e10-12.32", 0x100000, 0x40000, CRC(b92dc8ad) SHA1(0c1428d313507b1ae5a2af3b2fbaaa5650135e1e) ) ROM_LOAD16_BYTE("e10-13.33", 0x100001, 0x40000, CRC(87842c13) SHA1(d15b47c7430e677ae172f86fd5be595e4fe72e42) ) @@ -2823,7 +2823,7 @@ ROM_START( pbobble2j ) ROM_LOAD ("e10-05.rom", 0x300000, 0x100000, CRC(81266151) SHA1(aa3b144f32995425db97efce440e234a3c7a6715) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e10-12.32", 0x100000, 0x40000, CRC(b92dc8ad) SHA1(0c1428d313507b1ae5a2af3b2fbaaa5650135e1e) ) ROM_LOAD16_BYTE("e10-13.33", 0x100001, 0x40000, CRC(87842c13) SHA1(d15b47c7430e677ae172f86fd5be595e4fe72e42) ) @@ -2850,7 +2850,7 @@ ROM_START( pbobble2u ) ROM_LOAD ("e10-05.rom", 0x300000, 0x100000, CRC(81266151) SHA1(aa3b144f32995425db97efce440e234a3c7a6715) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e10-16.32", 0x100000, 0x40000, CRC(765ce77a) SHA1(e2723bd6238da91d28307081909a7172a1825c83) ) ROM_LOAD16_BYTE("e10-17.33", 0x100001, 0x40000, CRC(0aec3b1e) SHA1(a76a020cefcfbf86b0d893a6eb8ff93cb571abeb) ) @@ -2877,7 +2877,7 @@ ROM_START( pbobble2x ) ROM_LOAD ("e10-05.rom", 0x300000, 0x100000, CRC(81266151) SHA1(aa3b144f32995425db97efce440e234a3c7a6715) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e10-30.32", 0x100000, 0x40000, CRC(bb090c1e) SHA1(af2ff23d6f9bd56c25530cb9bf9f452b6f5210f5) ) ROM_LOAD16_BYTE("e10-31.33", 0x100001, 0x40000, CRC(f4b88d65) SHA1(c74dcb4bed979039fad1d5c7528c14ce4db1d5ec) ) @@ -2912,7 +2912,7 @@ ROM_START( gekiridn ) ROM_LOAD ("e11-06.ic43", 0x600000, 0x200000, CRC(200ce305) SHA1(c80a0b96510913a6411e6763fb72bf413fb792da) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e11-13.ic32", 0x100000, 0x40000, CRC(f5c5486a) SHA1(4091f3ddb1e6cbc9dc89485e1e784a4b6fa191b7) ) ROM_LOAD16_BYTE("e11-14.ic33", 0x100001, 0x40000, CRC(7fa10f96) SHA1(50efefd890535e952022a494c5b4e9b33bb90fad) ) @@ -2940,7 +2940,7 @@ ROM_START( gekiridnj ) ROM_LOAD ("e11-06.ic43", 0x600000, 0x200000, CRC(200ce305) SHA1(c80a0b96510913a6411e6763fb72bf413fb792da) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e11-13.ic32", 0x100000, 0x40000, CRC(f5c5486a) SHA1(4091f3ddb1e6cbc9dc89485e1e784a4b6fa191b7) ) ROM_LOAD16_BYTE("e11-14.ic33", 0x100001, 0x40000, CRC(7fa10f96) SHA1(50efefd890535e952022a494c5b4e9b33bb90fad) ) @@ -2974,7 +2974,7 @@ ROM_START( tcobra2 ) ROM_LOAD16_BYTE("e15-07.ic44", 0x400001, 0x100000, CRC(8164f7ee) SHA1(4550521f820e93ec08b86d148135966d016cbf22) ) ROM_FILL ( 0x600000, 0x600000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e15-15.ic32", 0x100000, 0x20000, CRC(22126dfb) SHA1(a1af17e5c3440f1bab50d79f92c251f1a4536ca0) ) ROM_LOAD16_BYTE("e15-16.ic33", 0x100001, 0x20000, CRC(f8b58ea0) SHA1(c9e196620765efc4c7b535793a5d1f586698ce55) ) @@ -3011,7 +3011,7 @@ ROM_START( tcobra2u ) ROM_LOAD16_BYTE("e15-07.ic44", 0x400001, 0x100000, CRC(8164f7ee) SHA1(4550521f820e93ec08b86d148135966d016cbf22) ) ROM_FILL ( 0x600000, 0x600000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e15-15.ic32", 0x100000, 0x20000, CRC(22126dfb) SHA1(a1af17e5c3440f1bab50d79f92c251f1a4536ca0) ) ROM_LOAD16_BYTE("e15-16.ic33", 0x100001, 0x20000, CRC(f8b58ea0) SHA1(c9e196620765efc4c7b535793a5d1f586698ce55) ) @@ -3048,7 +3048,7 @@ ROM_START( ktiger2 ) ROM_LOAD16_BYTE("e15-07.ic44", 0x400001, 0x100000, CRC(8164f7ee) SHA1(4550521f820e93ec08b86d148135966d016cbf22) ) ROM_FILL ( 0x600000, 0x600000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e15-15.ic32", 0x100000, 0x20000, CRC(22126dfb) SHA1(a1af17e5c3440f1bab50d79f92c251f1a4536ca0) ) ROM_LOAD16_BYTE("e15-16.ic33", 0x100001, 0x20000, CRC(f8b58ea0) SHA1(c9e196620765efc4c7b535793a5d1f586698ce55) ) @@ -3082,7 +3082,7 @@ ROM_START( bubblem ) ROM_LOAD ("e21-05.rom", 0x300000, 0x100000, CRC(07eab58f) SHA1(ae2d7b839b39d88d11652df74804a39230674467) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* Sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* Sound CPU */ ROM_LOAD16_BYTE("e21-12.32", 0x100000, 0x40000, CRC(34093de1) SHA1(d69d6b5f10b8fe86f727d739ed5aecceb15e01f7) ) ROM_LOAD16_BYTE("e21-13.33", 0x100001, 0x40000, CRC(9e9ec437) SHA1(b0265b688846c642d240b2f3677d2330d31eaa87) ) @@ -3112,7 +3112,7 @@ ROM_START( bubblemj ) ROM_LOAD ("e21-05.rom", 0x300000, 0x100000, CRC(07eab58f) SHA1(ae2d7b839b39d88d11652df74804a39230674467) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* Sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* Sound CPU */ ROM_LOAD16_BYTE("e21-12.32", 0x100000, 0x40000, CRC(34093de1) SHA1(d69d6b5f10b8fe86f727d739ed5aecceb15e01f7) ) ROM_LOAD16_BYTE("e21-13.33", 0x100001, 0x40000, CRC(9e9ec437) SHA1(b0265b688846c642d240b2f3677d2330d31eaa87) ) @@ -3142,7 +3142,7 @@ ROM_START( cleopatr ) ROM_LOAD ("e28-04.bin", 0x300000, 0x100000, CRC(57aef029) SHA1(5c07209015d4749d1ffb3e9c1a890e6cfeec8cb0) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x140000, "audiocpu", 0) /* Sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* Sound CPU */ ROM_LOAD16_BYTE("e28-11.bin", 0x100000, 0x20000, CRC(01a06950) SHA1(94d22cd839f9027e9d45264c366e0cb5d698e0b6) ) ROM_LOAD16_BYTE("e28-12.bin", 0x100001, 0x20000, CRC(dc19260f) SHA1(fa0ca03a236326652e4f9898d07cd837c1507a9d) ) @@ -3168,7 +3168,7 @@ ROM_START( pbobble3 ) ROM_LOAD ("e29-06.rom", 0x300000, 0x100000, CRC(c16184f8) SHA1(ded417d9d116b5a2f7518fa404bc2dda1c6a6366) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 code */ ROM_LOAD16_BYTE("e29-13.rom", 0x100000, 0x40000, CRC(1ef551ef) SHA1(527defe8f35314304adb4b483285b08cd6ebe865) ) ROM_LOAD16_BYTE("e29-14.rom", 0x100001, 0x40000, CRC(7ee7e688) SHA1(d65aa9c449e1d64f10d1be9727a9d93ab1571e65) ) @@ -3197,7 +3197,7 @@ ROM_START( pbobble3u ) ROM_LOAD ("e29-06.rom", 0x300000, 0x100000, CRC(c16184f8) SHA1(ded417d9d116b5a2f7518fa404bc2dda1c6a6366) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 code */ ROM_LOAD16_BYTE("e29-13.rom", 0x100000, 0x40000, CRC(1ef551ef) SHA1(527defe8f35314304adb4b483285b08cd6ebe865) ) ROM_LOAD16_BYTE("e29-14.rom", 0x100001, 0x40000, CRC(7ee7e688) SHA1(d65aa9c449e1d64f10d1be9727a9d93ab1571e65) ) @@ -3226,7 +3226,7 @@ ROM_START( pbobble3j ) ROM_LOAD ("e29-06.ic43", 0x300000, 0x100000, CRC(c16184f8) SHA1(ded417d9d116b5a2f7518fa404bc2dda1c6a6366) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 code */ ROM_LOAD16_BYTE("e29-13.ic32", 0x100000, 0x40000, CRC(1ef551ef) SHA1(527defe8f35314304adb4b483285b08cd6ebe865) ) ROM_LOAD16_BYTE("e29-14.ic33", 0x100001, 0x40000, CRC(7ee7e688) SHA1(d65aa9c449e1d64f10d1be9727a9d93ab1571e65) ) @@ -3251,7 +3251,7 @@ ROM_START( arkretrn ) ROM_LOAD32_BYTE("e36-09.18", 0x000002, 0x040000, CRC(f16985e0) SHA1(a74cfee8f958e7a32354d4353eeb199a7fb1ce64) ) ROM_LOAD32_BYTE("e36-15.17", 0x000003, 0x040000, CRC(4467ff37) SHA1(509a0d516def02d86d81b9868de0d9593539e65c) ) - ROM_REGION(0x180000, "audiocpu", 0) /* Sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* Sound CPU */ ROM_LOAD16_BYTE("e36-12.32", 0x100000, 0x40000, CRC(3bae39be) SHA1(777142ecc24799b934ed51ac4cd8700bb6da7e3c) ) ROM_LOAD16_BYTE("e36-13.33", 0x100001, 0x40000, CRC(94448e82) SHA1(d7766490318623be770545918391c5e6144dd619) ) @@ -3285,7 +3285,7 @@ ROM_START( arkretrnu ) ROM_LOAD32_BYTE("e36-09.18", 0x000002, 0x040000, CRC(f16985e0) SHA1(a74cfee8f958e7a32354d4353eeb199a7fb1ce64) ) ROM_LOAD32_BYTE("e36-14.17", 0x000003, 0x040000, CRC(3360cfa1) SHA1(b06afc392b3864a895aed3a406d5d9886b1d0894) ) - ROM_REGION(0x180000, "audiocpu", 0) /* Sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* Sound CPU */ ROM_LOAD16_BYTE("e36-12.32", 0x100000, 0x40000, CRC(3bae39be) SHA1(777142ecc24799b934ed51ac4cd8700bb6da7e3c) ) ROM_LOAD16_BYTE("e36-13.33", 0x100001, 0x40000, CRC(94448e82) SHA1(d7766490318623be770545918391c5e6144dd619) ) @@ -3319,7 +3319,7 @@ ROM_START( arkretrnj ) ROM_LOAD32_BYTE("e36-09.18", 0x000002, 0x040000, CRC(f16985e0) SHA1(a74cfee8f958e7a32354d4353eeb199a7fb1ce64) ) ROM_LOAD32_BYTE("e36-08.17", 0x000003, 0x040000, CRC(aa699e1b) SHA1(6bde0759940e0f238e4fa5bd228115574ff927d8) ) - ROM_REGION(0x180000, "audiocpu", 0) /* Sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* Sound CPU */ ROM_LOAD16_BYTE("e36-12.32", 0x100000, 0x40000, CRC(3bae39be) SHA1(777142ecc24799b934ed51ac4cd8700bb6da7e3c) ) ROM_LOAD16_BYTE("e36-13.33", 0x100001, 0x40000, CRC(94448e82) SHA1(d7766490318623be770545918391c5e6144dd619) ) @@ -3371,7 +3371,7 @@ ROM_START( kirameki ) ROM_LOAD ("e44-09.42", 0xb00000, 0x100000, CRC(a8e68eb7) SHA1(843bbb8a61bd4b9cbb14c7242281ce0c83c432ff) ) ROM_FILL ( 0x600000, 0x300000, 0x00 ) - ROM_REGION(0x400000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x400000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e44-20.51", 0x100000, 0x080000, CRC(4df7e051) SHA1(db0f5758458764a1c04116d5d5bbb20d4d36c875) ) ROM_LOAD16_BYTE("e44-21.52", 0x100001, 0x080000, CRC(d31b94b8) SHA1(41ee381d10254dc6e7163c5f353568539a96fc20) ) ROM_LOAD16_WORD_SWAP("e44-15.53", 0x200000, 0x200000, CRC(5043b608) SHA1(a328b8cc27ba1620a75a17cdf8571e217c42b9fd) ) /* Banked data */ @@ -3403,7 +3403,7 @@ ROM_START( puchicar ) ROM_LOAD ("e46-10", 0x300000, 0x100000, CRC(1999b76a) SHA1(83d6d2efe250bf3b119982bbf701f9b9d856af2d) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e46-21", 0x100000, 0x40000, CRC(b466cff6) SHA1(0757984f15a6ac9939c1e8625d5b9bfcbc788acc) ) ROM_LOAD16_BYTE("e46-22", 0x100001, 0x40000, CRC(c67b767e) SHA1(19f3db6615d7a6ed4d2636b6beabe2f3ed6d0c38) ) @@ -3443,7 +3443,7 @@ ROM_START( puchicarj ) ROM_LOAD ("e46-10", 0x300000, 0x100000, CRC(1999b76a) SHA1(83d6d2efe250bf3b119982bbf701f9b9d856af2d) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e46-19", 0x100000, 0x40000, CRC(2624eba0) SHA1(ba0b13bda241c648c7f8520106acd8c0c888fe29) ) ROM_LOAD16_BYTE("e46-20", 0x100001, 0x40000, CRC(065e934f) SHA1(0ec1b5ae33b1c43776b9327c9d380787d64ed5f9) ) @@ -3479,7 +3479,7 @@ ROM_START( pbobble4 ) ROM_LOAD ("e49-06", 0x300000, 0x100000, CRC(ec85f7ce) SHA1(9fead68c38fc9ca84d34d70343b13665978c362b) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 code */ ROM_LOAD16_BYTE("e49-13.32", 0x100000, 0x40000, CRC(83536f7f) SHA1(2252cee00ae260954cc76d92af8eb2a87d23cbfb) ) ROM_LOAD16_BYTE("e49-14.33", 0x100001, 0x40000, CRC(19815bdb) SHA1(38ad682236c7df0710055dd8dbdec30d5da0839d) ) @@ -3515,7 +3515,7 @@ ROM_START( pbobble4j ) ROM_LOAD ("e49-06", 0x300000, 0x100000, CRC(ec85f7ce) SHA1(9fead68c38fc9ca84d34d70343b13665978c362b) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 code */ ROM_LOAD16_BYTE("e49-13.32", 0x100000, 0x40000, CRC(83536f7f) SHA1(2252cee00ae260954cc76d92af8eb2a87d23cbfb) ) ROM_LOAD16_BYTE("e49-14.33", 0x100001, 0x40000, CRC(19815bdb) SHA1(38ad682236c7df0710055dd8dbdec30d5da0839d) ) @@ -3551,7 +3551,7 @@ ROM_START( pbobble4u ) ROM_LOAD ("e49-06", 0x300000, 0x100000, CRC(ec85f7ce) SHA1(9fead68c38fc9ca84d34d70343b13665978c362b) ) ROM_FILL ( 0x200000, 0x100000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 code */ ROM_LOAD16_BYTE("e49-13.32", 0x100000, 0x40000, CRC(83536f7f) SHA1(2252cee00ae260954cc76d92af8eb2a87d23cbfb) ) ROM_LOAD16_BYTE("e49-14.33", 0x100001, 0x40000, CRC(19815bdb) SHA1(38ad682236c7df0710055dd8dbdec30d5da0839d) ) @@ -3588,7 +3588,7 @@ ROM_START( popnpopj ) ROM_LOAD ("e51-06.43", 0x600000, 0x200000, CRC(c240d6c8) SHA1(6f3b5224b7eb8783893375d432bbbfc37f81c230) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e51-13.32", 0x100000, 0x40000, CRC(3b9e3986) SHA1(26340bda0ad2ea580e2395135617966676a71ad5) ) ROM_LOAD16_BYTE("e51-14.33", 0x100001, 0x40000, CRC(1f9a5015) SHA1(5da38c5fe2a50bcde6bd46ab1cb9a56dbab1a882) ) @@ -3623,7 +3623,7 @@ ROM_START( popnpop ) ROM_LOAD ("e51-06.43", 0x600000, 0x200000, CRC(c240d6c8) SHA1(6f3b5224b7eb8783893375d432bbbfc37f81c230) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e51-13.32", 0x100000, 0x40000, CRC(3b9e3986) SHA1(26340bda0ad2ea580e2395135617966676a71ad5) ) ROM_LOAD16_BYTE("e51-14.33", 0x100001, 0x40000, CRC(1f9a5015) SHA1(5da38c5fe2a50bcde6bd46ab1cb9a56dbab1a882) ) @@ -3658,7 +3658,7 @@ ROM_START( popnpopu ) ROM_LOAD ("e51-06.43", 0x600000, 0x200000, CRC(c240d6c8) SHA1(6f3b5224b7eb8783893375d432bbbfc37f81c230) ) ROM_FILL ( 0x400000, 0x200000, 0x00 ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e51-13.32", 0x100000, 0x40000, CRC(3b9e3986) SHA1(26340bda0ad2ea580e2395135617966676a71ad5) ) ROM_LOAD16_BYTE("e51-14.33", 0x100001, 0x40000, CRC(1f9a5015) SHA1(5da38c5fe2a50bcde6bd46ab1cb9a56dbab1a882) ) @@ -3737,7 +3737,7 @@ ROM_START( landmakr ) - ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x140000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("e61-14.32", 0x100000, 0x20000, CRC(b905f4a7) SHA1(613b954e3e129fd44b4ce64958f16e5636012d6e) ) ROM_LOAD16_BYTE("e61-15.33", 0x100001, 0x20000, CRC(87909869) SHA1(7b90c23899a673966cac3352d375d17b83e66596) ) @@ -3787,7 +3787,7 @@ ROM_START( landmakrp ) - ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */ + ROM_REGION(0x180000, "taito_en:audiocpu", 0) /* 68000 sound CPU */ ROM_LOAD16_BYTE("spro-1.66", 0x100000, 0x40000, CRC(18961bbb) SHA1(df054def35a49c0754356c15ec15336cbf28b063) ) ROM_LOAD16_BYTE("spro-0.65", 0x100001, 0x40000, CRC(2c64557a) SHA1(768007162d5d2cbe650c735bc1af2c10ed13b046) ) diff --git a/src/mame/drivers/taitojc.cpp b/src/mame/drivers/taitojc.cpp index df177c2aa40..01e7a6a86b4 100644 --- a/src/mame/drivers/taitojc.cpp +++ b/src/mame/drivers/taitojc.cpp @@ -1123,7 +1123,7 @@ static MACHINE_CONFIG_START( taitojc, taitojc_state ) MCFG_DEVICE_ADD("tc0780fpa", TC0780FPA, 0) /* sound hardware */ - MCFG_FRAGMENT_ADD(taito_en_sound) + MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( dendego, taitojc ) @@ -1201,7 +1201,7 @@ ROM_START( sidebs ) /* Side by Side ver 2.7 J */ ROM_LOAD32_BYTE( "e23-49.ic38", 0x000002, 0x80000, CRC(b2fdded3) SHA1(8e0f2d2d967a2e6b7d1954548941bc6257799d2d) ) ROM_LOAD32_BYTE( "e23-50.ic39", 0x000003, 0x80000, CRC(76510731) SHA1(b8b9836fa121d2028e0218f4d439af0d7dae295e) ) - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e23-23.ic30", 0x100001, 0x40000, CRC(cffbffe5) SHA1(c01ac44390dacab4b49bb066a46d81a184b07a1e) ) ROM_LOAD16_BYTE( "e23-24.ic31", 0x100000, 0x40000, CRC(64bae246) SHA1(f929f664881487615b1259db43a0721135830274) ) @@ -1243,7 +1243,7 @@ ROM_START( sidebsja ) /* Side by Side ver 2.5 J */ ROM_LOAD32_BYTE( "e23-21.ic38", 0x000002, 0x80000, CRC(357f2e10) SHA1(226922f2649d9ac78d253200f5bbff4fb3ac74c8) ) ROM_LOAD32_BYTE( "e23-22.ic39", 0x000003, 0x80000, CRC(c793ba43) SHA1(0ddbf625320968b4e18309d8e732ce4a2b9f4bce) ) - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e23-23.ic30", 0x100001, 0x40000, CRC(cffbffe5) SHA1(c01ac44390dacab4b49bb066a46d81a184b07a1e) ) ROM_LOAD16_BYTE( "e23-24.ic31", 0x100000, 0x40000, CRC(64bae246) SHA1(f929f664881487615b1259db43a0721135830274) ) @@ -1285,7 +1285,7 @@ ROM_START( sidebs2 ) ROM_LOAD32_BYTE( "sbs2_p2.ic38", 0x000002, 0x80000, CRC(ade07d7e) SHA1(a5200ea3ddbfef37d302e7cb27015b6f6aa8a7c1) ) ROM_LOAD32_BYTE( "sbs2_p3.ic39", 0x000003, 0x80000, CRC(94e943d6) SHA1(2bc7332526b969e5084b9d73063f1c0d18ec5181) ) - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e38-19.ic30", 0x100001, 0x40000, CRC(3f50cb7b) SHA1(76af65c9b74ede843a3182f79cecda8c3e3febe6) ) ROM_LOAD16_BYTE( "e38-20.ic31", 0x100000, 0x40000, CRC(d01340e7) SHA1(76ee48d644dc1ec415d47e0df4864c64ac928b9d) ) @@ -1351,7 +1351,7 @@ ROM_START( sidebs2j ) /* This version has the sub-title of "Evoluzione" */ ROM_LOAD32_BYTE( "e38-25+.ic38", 0x000002, 0x80000, CRC(f1a8a4df) SHA1(e4cf75969fb0503df2290522194b097f5cb983a3) ) /* Actual label E38-25* */ ROM_LOAD32_BYTE( "e38-26+.ic39", 0x000003, 0x80000, CRC(b550fbf2) SHA1(a0a461af7e71c6ad6468cfdee2bc7161ae31bbfb) ) /* Actual label E38-26* */ - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e38-19.ic30", 0x100001, 0x040000, CRC(3f50cb7b) SHA1(76af65c9b74ede843a3182f79cecda8c3e3febe6) ) ROM_LOAD16_BYTE( "e38-20.ic31", 0x100000, 0x040000, CRC(d01340e7) SHA1(76ee48d644dc1ec415d47e0df4864c64ac928b9d) ) @@ -1417,7 +1417,7 @@ ROM_START( dendego ) ROM_LOAD32_BYTE( "e35-23.ic38", 0x000002, 0x80000, CRC(1da4acd6) SHA1(2ce11c5f37287526bb1d39185f793d79fc73d5b5) ) ROM_LOAD32_BYTE( "e35-24.ic39", 0x000003, 0x80000, CRC(0318afb0) SHA1(9c86330c85536fb1a093ed40610b1c3ddb7813c3) ) - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e35-25.ic30", 0x100001, 0x40000, CRC(8104de13) SHA1(e518fbaf91704cf5cb8ffbb4833e3adba8c18658) ) ROM_LOAD16_BYTE( "e35-26.ic31", 0x100000, 0x40000, CRC(61821cc9) SHA1(87cd5bd3bb22c9f4ca4b6d96f75434d48418321b) ) @@ -1464,7 +1464,7 @@ ROM_START( dendegox ) ROM_LOAD32_BYTE( "e35-32.ic38", 0x000002, 0x80000, CRC(66be29d5) SHA1(e73937f5bda709a606d5cdf7316b26051317c22f) ) //ex ROM_LOAD32_BYTE( "e35-33.ic39", 0x000003, 0x80000, CRC(76a6bde2) SHA1(ca456ec3f0410777362e3eb977ae156866271bd5) ) //ex - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e35-25.ic30", 0x100001, 0x40000, CRC(8104de13) SHA1(e518fbaf91704cf5cb8ffbb4833e3adba8c18658) ) ROM_LOAD16_BYTE( "e35-26.ic31", 0x100000, 0x40000, CRC(61821cc9) SHA1(87cd5bd3bb22c9f4ca4b6d96f75434d48418321b) ) @@ -1511,7 +1511,7 @@ ROM_START( dendego2 ) ROM_LOAD32_BYTE( "e52-27-1.ic38", 0x000002, 0x80000, CRC(25f0d81d) SHA1(c33c3e6b1ad49b63b31a2f1227d43141faef4eab) ) ROM_LOAD32_BYTE( "e52-28-1.ic39", 0x000003, 0x80000, CRC(e76ff6a1) SHA1(674c00f19df034de8134d48a8c2d2e42f7eb1be7) ) - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e52-29.ic30", 0x100001, 0x40000, CRC(6010162a) SHA1(f14920b26887f5387b3e261b63573d850195982a) ) ROM_LOAD16_BYTE( "e52-30.ic31", 0x100000, 0x40000, CRC(2881af4a) SHA1(5918f6508b3cd3bef3751e3bda2a48152569c1cd) ) @@ -1562,7 +1562,7 @@ ROM_START( dendego23k ) ROM_LOAD32_BYTE( "e52-37.ic38", 0x000002, 0x80000, CRC(65b8ef31) SHA1(b61b391b160e81715ff355aeef65026d7e4dd9af) ) //2ex ROM_LOAD32_BYTE( "e52-38.ic39", 0x000003, 0x80000, CRC(cf61f321) SHA1(c8493d2499afba673174b26044aca537e384916c) ) //2ex - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e52-29.ic30", 0x100001, 0x40000, CRC(6010162a) SHA1(f14920b26887f5387b3e261b63573d850195982a) ) ROM_LOAD16_BYTE( "e52-30.ic31", 0x100000, 0x40000, CRC(2881af4a) SHA1(5918f6508b3cd3bef3751e3bda2a48152569c1cd) ) @@ -1619,7 +1619,7 @@ ROM_START( landgear ) /* Landing Gear Ver 4.2 O */ ROM_LOAD32_BYTE( "e17-39.ic38", 0x000002, 0x80000, CRC(ccbbcc7b) SHA1(52d91fcaa1683d2679ed4f14ebc11dc487527898) ) ROM_LOAD32_BYTE( "e17-40.ic39", 0x000003, 0x80000, CRC(ce9231d2) SHA1(d2c3955d910dbd0cac95862047c58791af626722) ) /* 0x7ffff == 03 - One byte difference from E17-36.ic39 */ - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e17-21.ic30", 0x100001, 0x40000, CRC(8b54f46c) SHA1(c6d16197ab7768945becf9b49b6d286113b4d1cc) ) ROM_LOAD16_BYTE( "e17-22.ic31", 0x100000, 0x40000, CRC(b96f6cd7) SHA1(0bf086e5dc6d524cd00e33df3e3d2a8b9231eb72) ) @@ -1673,7 +1673,7 @@ ROM_START( landgearj ) /* Landing Gear Ver 4.2 J */ ROM_LOAD32_BYTE( "e17-35.ic38", 0x000002, 0x80000, CRC(ccbbcc7b) SHA1(52d91fcaa1683d2679ed4f14ebc11dc487527898) ) /* matches E17-39.ic38, verified correct */ ROM_LOAD32_BYTE( "e17-36.ic39", 0x000003, 0x80000, CRC(209c50fe) SHA1(42e0eaa182730e260ee4361d936b133ed85f8221) ) /* 0x7ffff == 01 - One byte difference from E17-40.ic39 */ - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e17-21.ic30", 0x100001, 0x40000, CRC(8b54f46c) SHA1(c6d16197ab7768945becf9b49b6d286113b4d1cc) ) ROM_LOAD16_BYTE( "e17-22.ic31", 0x100000, 0x40000, CRC(b96f6cd7) SHA1(0bf086e5dc6d524cd00e33df3e3d2a8b9231eb72) ) @@ -1727,7 +1727,7 @@ ROM_START( landgeara ) /* Landing Gear Ver 3.1 O, is there an alternate set with ROM_LOAD32_BYTE( "e17-26+.ic38", 0x000002, 0x80000, CRC(3032bbe7) SHA1(201c61f236c81928f50815d8ad12e312a3c7427b) ) /* Actually labeled E17-26* */ ROM_LOAD32_BYTE( "e17-27+.ic39", 0x000003, 0x80000, CRC(e936224c) SHA1(8699cbb756844d12b7585e66198b7faed2af8e24) ) /* Actually labeled E17-27* */ - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e17-21.ic30", 0x100001, 0x40000, CRC(8b54f46c) SHA1(c6d16197ab7768945becf9b49b6d286113b4d1cc) ) ROM_LOAD16_BYTE( "e17-22.ic31", 0x100000, 0x40000, CRC(b96f6cd7) SHA1(0bf086e5dc6d524cd00e33df3e3d2a8b9231eb72) ) @@ -1781,7 +1781,7 @@ ROM_START( landgearja ) /* Landing Gear Ver 3.0 J, is there an alternate set wit ROM_LOAD32_BYTE( "e17-19+.ic38", 0x000002, 0x80000, CRC(1c487204) SHA1(f6c8ddd80c57ed63b0785b240c4b00416a1a87f3) ) /* Actually labeled E17-19* */ ROM_LOAD32_BYTE( "e17-20+.ic39", 0x000003, 0x80000, CRC(1311234f) SHA1(5211cae0d6dc1710bc669bcf81a247b01f8aebff) ) /* Actually labeled E17-20* */ - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e17-21.ic30", 0x100001, 0x40000, CRC(8b54f46c) SHA1(c6d16197ab7768945becf9b49b6d286113b4d1cc) ) ROM_LOAD16_BYTE( "e17-22.ic31", 0x100000, 0x40000, CRC(b96f6cd7) SHA1(0bf086e5dc6d524cd00e33df3e3d2a8b9231eb72) ) @@ -1835,7 +1835,7 @@ ROM_START( dangcurv ) ROM_LOAD32_BYTE( "e09-25.ic38", 0x000002, 0x80000, CRC(aa233404) SHA1(a2b14e54eb1b5f6d4ed9f289b30ecfa654f21c87) ) ROM_LOAD32_BYTE( "e09-26.ic39", 0x000003, 0x80000, CRC(78337271) SHA1(bd29de6a5b6db3baddecf82c3b6c8b366c64289e) ) - ROM_REGION( 0x180000, "audiocpu", 0 ) /* 68000 Code */ + ROM_REGION( 0x180000, "taito_en:audiocpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "e09-27.ic30", 0x100001, 0x40000, CRC(6d54839c) SHA1(a28c9b0727128b82bb0fa71dc951e3f03ee45e1b) ) ROM_LOAD16_BYTE( "e09-28.ic31", 0x100000, 0x40000, CRC(566d7d83) SHA1(92661ccb631f843bf704c50d54fae28f6b5b272b) ) diff --git a/src/mame/drivers/undrfire.cpp b/src/mame/drivers/undrfire.cpp index 25e7dda6841..65e79c5acee 100644 --- a/src/mame/drivers/undrfire.cpp +++ b/src/mame/drivers/undrfire.cpp @@ -711,7 +711,7 @@ static MACHINE_CONFIG_START( undrfire, undrfire_state ) MCFG_TC0480SCP_PALETTE("palette") /* sound hardware */ - MCFG_FRAGMENT_ADD(taito_en_sound) + MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) MACHINE_CONFIG_END @@ -760,7 +760,7 @@ static MACHINE_CONFIG_START( cbombers, undrfire_state ) MCFG_TC0480SCP_PALETTE("palette") /* sound hardware */ - MCFG_FRAGMENT_ADD(taito_en_sound) + MCFG_DEVICE_ADD("taito_en", TAITO_EN, 0) MACHINE_CONFIG_END @@ -775,7 +775,7 @@ ROM_START( undrfire ) ROM_LOAD32_BYTE( "d67-17", 0x00002, 0x80000, CRC(34e030b7) SHA1(62c270c817199a56e647ea74849fe5c07717ac18) ) ROM_LOAD32_BYTE( "d67-23", 0x00003, 0x80000, CRC(28e84e0a) SHA1(74c73c6df07d33ef4c0a29f8c1ee1a33eee922da) ) - ROM_REGION( 0x140000, "audiocpu", 0 ) + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) ROM_LOAD16_BYTE( "d67-20", 0x100000, 0x20000, CRC(974ebf69) SHA1(8a5de503c514bf0da0c956e2dfdf0cfb83ea1f72) ) ROM_LOAD16_BYTE( "d67-21", 0x100001, 0x20000, CRC(8fc6046f) SHA1(28522ce5c5900f74d3faa86710256a7201b32500) ) @@ -815,7 +815,7 @@ ROM_START( undrfireu ) ROM_LOAD32_BYTE( "d67-17", 0x00002, 0x80000, CRC(34e030b7) SHA1(62c270c817199a56e647ea74849fe5c07717ac18) ) ROM_LOAD32_BYTE( "d67-22", 0x00003, 0x80000, CRC(5fef7e9c) SHA1(03a6ea0715ce8705d74550186b22940f8a49c088) ) - ROM_REGION( 0x140000, "audiocpu", 0 ) + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) ROM_LOAD16_BYTE( "d67-20", 0x100000, 0x20000, CRC(974ebf69) SHA1(8a5de503c514bf0da0c956e2dfdf0cfb83ea1f72) ) ROM_LOAD16_BYTE( "d67-21", 0x100001, 0x20000, CRC(8fc6046f) SHA1(28522ce5c5900f74d3faa86710256a7201b32500) ) @@ -854,7 +854,7 @@ ROM_START( undrfirej ) ROM_LOAD32_BYTE( "d67-17", 0x00002, 0x80000, CRC(34e030b7) SHA1(62c270c817199a56e647ea74849fe5c07717ac18) ) ROM_LOAD32_BYTE( "d67-16", 0x00003, 0x80000, CRC(c6e62f26) SHA1(6a430916f829a4b0240ccf8477dcbb1f39a26e90) ) - ROM_REGION( 0x140000, "audiocpu", 0 ) + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) ROM_LOAD16_BYTE( "d67-20", 0x100000, 0x20000, CRC(974ebf69) SHA1(8a5de503c514bf0da0c956e2dfdf0cfb83ea1f72) ) ROM_LOAD16_BYTE( "d67-21", 0x100001, 0x20000, CRC(8fc6046f) SHA1(28522ce5c5900f74d3faa86710256a7201b32500) ) @@ -893,7 +893,7 @@ ROM_START( cbombers ) ROM_LOAD32_BYTE( "d83_40.ic3", 0x00002, 0x80000, CRC(b05f59ea) SHA1(e46a31737f44be2a3d478b8010fe0d6383290e03) ) ROM_LOAD32_BYTE( "d83_38.ic16", 0x00003, 0x80000, CRC(0a10616c) SHA1(c9cfc8c870f8a989f004d2db4f6fb76e5b7b7f9b) ) - ROM_REGION( 0x140000, "audiocpu", 0 ) /* Sound cpu */ + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) /* Sound cpu */ ROM_LOAD16_BYTE( "d83_26.ic37", 0x100000, 0x20000, CRC(4f49b484) SHA1(96daa3cb7fa4aae3aedc91ec27d85945311dfcc9) ) ROM_LOAD16_BYTE( "d83_27.ic38", 0x100001, 0x20000, CRC(2aa1a237) SHA1(b809f75bbbbb4eb5d0df725aaa31aae8a6fba552) ) @@ -947,7 +947,7 @@ ROM_START( cbombersj ) ROM_LOAD32_BYTE( "d83_35.ic3", 0x00002, 0x80000, CRC(b0379b1e) SHA1(fc398f5f67d1347b594563a3703db4c0e01d5dff) ) ROM_LOAD32_BYTE( "d83_33.ic16", 0x00003, 0x80000, CRC(72fb42a7) SHA1(7c0b02be604b8b90c444a973962d4b29a5b8b047) ) - ROM_REGION( 0x140000, "audiocpu", 0 ) /* Sound cpu */ + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) /* Sound cpu */ ROM_LOAD16_BYTE( "d83_26.ic37", 0x100000, 0x20000, CRC(4f49b484) SHA1(96daa3cb7fa4aae3aedc91ec27d85945311dfcc9) ) ROM_LOAD16_BYTE( "d83_27.ic38", 0x100001, 0x20000, CRC(2aa1a237) SHA1(b809f75bbbbb4eb5d0df725aaa31aae8a6fba552) ) @@ -1003,7 +1003,7 @@ ROM_START( cbombersp ) ROM_LOAD32_BYTE( "lh.bin", 0x00002, 0x80000, CRC(77ad9acb) SHA1(73bc156c377d42e7c752d71686ca5ad3dc506053) ) ROM_LOAD32_BYTE( "ll.bin", 0x00003, 0x80000, CRC(54c060a5) SHA1(7623eb418734d2adc4e913b5a99d4caeb857b3ac) ) - ROM_REGION( 0x140000, "audiocpu", 0 ) // Sound cpu + ROM_REGION( 0x140000, "taito_en:audiocpu", 0 ) // Sound cpu ROM_LOAD16_BYTE( "ic47_eprg_h_up_c5c5.bin", 0x100000, 0x20000, CRC(cb0d11b1) SHA1(0ac192f31f531defe088ed899aadbaa0798df4d6) ) ROM_LOAD16_BYTE( "ic46_eprg_l_low_d5e.bin", 0x100001, 0x20000, CRC(567ae215) SHA1(32d40d1c24e014ffb52a81df4a0d5adb20f0048c) ) diff --git a/src/mame/includes/taito_f3.h b/src/mame/includes/taito_f3.h index 5b31c9db98c..97e5642c007 100644 --- a/src/mame/includes/taito_f3.h +++ b/src/mame/includes/taito_f3.h @@ -55,7 +55,7 @@ public: taito_f3_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), + m_audiocpu(*this, "taito_en:audiocpu"), m_oki(*this, "oki"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), -- cgit v1.2.3-70-g09d2 From b4e07b56f770dd723b2762862e4c4c32c6a62d03 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 11 Mar 2016 18:39:23 +0100 Subject: Revert "armedf.cpp: fixed missing ship icon in terrafb and terrafjb and fixed the ladder appearing on the high score table in cclimbr2. This explains also why those worked correctly after saving and reloading state (nw)" This reverts commit aadae5fd0b56f98fb398d06aae3d2d4f9eda4d36. --- src/mame/drivers/armedf.cpp | 2 +- src/mame/video/armedf.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mame/drivers/armedf.cpp b/src/mame/drivers/armedf.cpp index 8b5c48ec057..e2a9dd65b3a 100644 --- a/src/mame/drivers/armedf.cpp +++ b/src/mame/drivers/armedf.cpp @@ -711,7 +711,7 @@ READ8_MEMBER(armedf_state::blitter_txram_r) WRITE8_MEMBER(armedf_state::blitter_txram_w) { m_text_videoram[offset] = data; - m_tx_tilemap->mark_all_dirty(); + m_tx_tilemap->mark_tile_dirty(offset); } WRITE8_MEMBER(armedf_state::fg_scrollx_w) diff --git a/src/mame/video/armedf.cpp b/src/mame/video/armedf.cpp index c6834e38890..84c08f9c022 100644 --- a/src/mame/video/armedf.cpp +++ b/src/mame/video/armedf.cpp @@ -29,7 +29,7 @@ TILEMAP_MAPPER_MEMBER(armedf_state::armedf_scan_type2) TILEMAP_MAPPER_MEMBER(armedf_state::armedf_scan_type3) { /* col: 0..63; row: 0..31 */ - /* legion & legionjb */ + /* legion & legiono */ return (col & 0x1f) * 32 + row + 0x800 * (col / 32); } @@ -113,7 +113,7 @@ TILE_GET_INFO_MEMBER(armedf_state::get_bg_tile_info) VIDEO_START_MEMBER(armedf_state,terraf) { - m_sprite_offy = (m_scroll_type & 2 ) ? 0 : 128; /* legion, legionjb, crazy climber 2 */ + m_sprite_offy = (m_scroll_type & 2 ) ? 0 : 128; /* legion, legiono, crazy climber 2 */ m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(armedf_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 64, 32); m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(armedf_state::get_fg_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 64, 32); @@ -136,7 +136,7 @@ VIDEO_START_MEMBER(armedf_state,terraf) VIDEO_START_MEMBER(armedf_state,armedf) { - m_sprite_offy = (m_scroll_type & 2 ) ? 0 : 128; /* legion, legionjb, crazy climber 2 */ + m_sprite_offy = (m_scroll_type & 2 ) ? 0 : 128; /* legion, legiono, crazy climber 2 */ m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(armedf_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 64, 32); m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(armedf_state::get_fg_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 64, 32); @@ -170,7 +170,7 @@ READ8_MEMBER(armedf_state::nb1414m4_text_videoram_r) WRITE8_MEMBER(armedf_state::nb1414m4_text_videoram_w) { m_text_videoram[offset] = data; - m_tx_tilemap->mark_all_dirty(); + m_tx_tilemap->mark_tile_dirty(offset & 0x7ff); } READ8_MEMBER(armedf_state::armedf_text_videoram_r) @@ -181,7 +181,7 @@ READ8_MEMBER(armedf_state::armedf_text_videoram_r) WRITE8_MEMBER(armedf_state::armedf_text_videoram_w) { m_text_videoram[offset] = data; - m_tx_tilemap->mark_all_dirty(); + m_tx_tilemap->mark_tile_dirty(offset & 0x7ff); } WRITE16_MEMBER(armedf_state::armedf_fg_videoram_w) -- cgit v1.2.3-70-g09d2 From a46635346df67685481d8cf2b37df4ae4f09725d Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 11 Mar 2016 20:23:18 +0100 Subject: this is always true now so no reason to check (nw) --- src/devices/machine/bcreader.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/devices/machine/bcreader.cpp b/src/devices/machine/bcreader.cpp index 5a5df7fb452..4d05a779835 100644 --- a/src/devices/machine/bcreader.cpp +++ b/src/devices/machine/bcreader.cpp @@ -208,7 +208,6 @@ void barcode_reader_device::decode(int len) sum += (i & 1) ? (m_byte_data[i] * 1) : (m_byte_data[i] * 3); } - if (m_pixel_data) { sum = (10 - (sum % 10)) % 10; if (sum != m_byte_data[len - 1]) -- cgit v1.2.3-70-g09d2 From d213ae836e012fdae5e556edf16a7e87fe5eeb55 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 11 Mar 2016 20:23:50 +0100 Subject: if (this) leftover, need to check if this causes some issue (nw) --- src/devices/cpu/m68000/m68kcpu.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp index 38ff81d57f3..8e8e7a3eadb 100644 --- a/src/devices/cpu/m68000/m68kcpu.cpp +++ b/src/devices/cpu/m68000/m68kcpu.cpp @@ -742,7 +742,6 @@ WRITE_LINE_MEMBER( m68000_base_device::write_irq7 ) bool m68000_base_device::memory_translate(address_spacenum space, int intention, offs_t &address) { /* only applies to the program address space and only does something if the MMU's enabled */ - if (this) { /* 68040 needs to call the MMU even when disabled so transparent translation works */ if ((space == AS_PROGRAM) && ((pmmu_enabled) || (CPU_TYPE_IS_040_PLUS(cpu_type)))) @@ -2646,7 +2645,6 @@ void m68020pmmu_device::device_start() bool m68020hmmu_device::memory_translate(address_spacenum space, int intention, offs_t &address) { /* only applies to the program address space and only does something if the MMU's enabled */ - if (this) { if ((space == AS_PROGRAM) && (hmmu_enabled)) { -- cgit v1.2.3-70-g09d2 From a521d9a3cf3f35ee61dcc5378411b569e6d705aa Mon Sep 17 00:00:00 2001 From: Ville Linde Date: Sat, 12 Mar 2016 01:38:23 +0200 Subject: ppcdrc: handle divide by zero (nw) --- src/devices/cpu/powerpc/ppcdrc.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/devices/cpu/powerpc/ppcdrc.cpp b/src/devices/cpu/powerpc/ppcdrc.cpp index 35b984d240d..7390f9284e9 100644 --- a/src/devices/cpu/powerpc/ppcdrc.cpp +++ b/src/devices/cpu/powerpc/ppcdrc.cpp @@ -3472,7 +3472,13 @@ int ppc_device::generate_instruction_3b(drcuml_block *block, compiler_state *com case 0x12: /* FDIVSx */ if (!(m_drcoptions & PPCDRC_ACCURATE_SINGLES)) return generate_instruction_3f(block, compiler, desc); - UML_FDDIV(block, F0, F64(G_RA(op)), F64(G_RB(op))); // fddiv f0,ra,rb + UML_FDCMP(block, F64(G_RB(op)), mem(&m_core->fp0)); // fdcmp rb,0 + UML_JMPc(block, COND_Z, compiler->labelnum); // bz 1: + UML_FDDIV(block, F0, F64(G_RA(op)), F64(G_RB(op))); // fddiv f0,ra,rb + UML_JMP(block, compiler->labelnum+1); // bz 2: + UML_LABEL(block, compiler->labelnum++); // 1: + UML_FDMOV(block, F0, mem(&m_core->fp0)); // fdmov f0,0 + UML_LABEL(block, compiler->labelnum++); // 2: UML_FDRNDS(block, F64(G_RD(op)), F0); // fdrnds rd,f0 generate_fp_flags(block, desc, TRUE); return TRUE; @@ -3566,7 +3572,13 @@ int ppc_device::generate_instruction_3f(drcuml_block *block, compiler_state *com return TRUE; case 0x12: /* FDIVx */ + UML_FDCMP(block, F64(G_RB(op)), mem(&m_core->fp0)); // fdcmp rb,0 + UML_JMPc(block, COND_Z, compiler->labelnum); // bz 1: UML_FDDIV(block, F64(G_RD(op)), F64(G_RA(op)), F64(G_RB(op))); // fddiv rd,ra,rb + UML_JMP(block, compiler->labelnum+1); // bz 2: + UML_LABEL(block, compiler->labelnum++); // 1: + UML_FDMOV(block, F64(G_RD(op)), mem(&m_core->fp0)); // fdmov rd,0 + UML_LABEL(block, compiler->labelnum++); // 2: generate_fp_flags(block, desc, TRUE); return TRUE; -- cgit v1.2.3-70-g09d2 From 30b4c5e4c006090afbe47c28970e8e4041eb43e8 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 12 Mar 2016 01:34:35 +0100 Subject: hh_tms1k: cnfball and fxmcr165 WIP --- src/mame/drivers/hh_hmcs40.cpp | 3 +- src/mame/drivers/hh_tms1k.cpp | 483 +++++++++++++++++++++++++++++++++-------- src/mame/drivers/hh_ucom4.cpp | 65 +++--- src/mame/includes/hh_tms1k.h | 4 +- src/mame/layout/cnfball.lay | 68 ++++++ src/mame/layout/fxmcr165.lay | 57 +++++ src/mame/mame.lst | 2 + 7 files changed, 555 insertions(+), 127 deletions(-) create mode 100644 src/mame/layout/cnfball.lay create mode 100644 src/mame/layout/fxmcr165.lay (limited to 'src') diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp index d3639a6fb84..beee880e94e 100644 --- a/src/mame/drivers/hh_hmcs40.cpp +++ b/src/mame/drivers/hh_hmcs40.cpp @@ -3403,8 +3403,7 @@ static INPUT_PORTS_START( mwcbaseb ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("P1 1") INPUT_PORTS_END - -static const INT16 mwcbaseb_speaker_levels[] = { 0, 16384, -16384, 0, -16384, 0, -32768, -16384 }; +static const INT16 mwcbaseb_speaker_levels[] = { 0, 0x3fff, -0x4000, 0, -0x4000, 0, -0x8000, -0x4000 }; static MACHINE_CONFIG_START( mwcbaseb, mwcbaseb_state ) diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index 5be37c7fb20..5ece38cb177 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -22,8 +22,8 @@ @MP0905B TMS0970 1977, Parker Brothers Codename Sector *MP0057 TMS1000 1978, APH Student Speech+ (same ROM contents as TSI Speech+?) *MP0158 TMS1000 1979, Entex Soccer - *MP0168 TMS1000? 1979, Conic Basketball - *MP0170 TMS1000? 1979, E.R.S. Football + *MP0168 TMS1000 1979, Conic Basketball + @MP0170 TMS1000 1979, Conic Football @MP0914 TMS1000 1979, Entex Baseball 1 @MP0923 TMS1000 1979, Entex Baseball 2 @MP1030 TMS1100 1980, APF Mathemagician @@ -36,11 +36,11 @@ *MP1219 TMS1100 1980, U.S. Games Super Sports 4 @MP1221 TMS1100 1980, Entex Raise The Devil *MP1296 TMS1100? 1982, Entex Black Knight - *MP1312 TMS1100 198?, Tandy/RadioShack Science Fair Microcomputer Trainer + @MP1312 TMS1100 1985, Gakken FX-Micom R-165/Tandy Radio Shack Science Fair Microcomputer Trainer *MP1359 TMS1100? 1985, Capsela CRC2000 @MP1525 TMS1170 1980, Coleco Head to Head Baseball *MP1604 ? 1981, Hanzawa Twinvader III/Tandy Cosmic Fire Away 3000 (? note: VFD-capable) - @MP2105 TMS1370 1979, Gakken Poker + @MP2105 TMS1370 1979, Gakken/Entex Poker *MP2139 TMS1370? 1982, Gakken Galaxy Invader 1000 @MP2726 TMS1040 1979, Tomy Break Up *MP2788 TMS1040? 1980, Bandai Flight Time (? note: VFD-capable) @@ -87,13 +87,13 @@ @MP7334 TMS1400 1981, Coleco Total Control 4 @MP7351 TMS1400 1982, Parker Brothers Master Merlin @MP7551 TMS1670 1980, Entex Color Football 4 (6009) - @MPF553 TMS1670 1980, Gakken Jackpot: Gin Rummy & Black Jack (note: assume F to be a misprint) + @MPF553 TMS1670 1980, Gakken/Entex Jackpot: Gin Rummy & Black Jack (note: assume F to be a misprint) *MP7573 TMS1670? 1981, Entex Select-a-Game cartridge: Football 4 (? note: 40-pin, VFD-capable) inconsistent: *TMC1007 TMS1000 1976, TSI Speech+ (S14002-A) - @CD7282SL TMS1100 1981, Tandy/RadioShack Tandy-12 (serial is similar to TI Speak & Spell series?) + @CD7282SL TMS1100 1981, Tandy Radio Shack Tandy-12 (serial is similar to TI Speak & Spell series?) *M95041 ? 1983, Tsukuda Game Pachinko (? note: 40-pin, VFD-capable) (* denotes not yet emulated by MAME, @ denotes it's in this driver) @@ -120,6 +120,7 @@ #include "astro.lh" #include "bankshot.lh" #include "bigtrak.lh" +#include "cnfball.lh" #include "cnfball2.lh" #include "cnsector.lh" #include "comp4.lh" @@ -131,6 +132,7 @@ #include "efootb4.lh" #include "einvader.lh" // test-layout(but still playable) #include "elecdet.lh" +#include "fxmcr165.lh" #include "gjackpot.lh" #include "gpoker.lh" #include "h2hbaseb.lh" @@ -609,44 +611,44 @@ READ8_MEMBER(amaztron_state::read_k) static INPUT_PORTS_START( amaztron ) PORT_START("IN.0") // R0 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 1") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 6") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 11") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 16") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 21") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 6") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 11") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 16") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 21") PORT_START("IN.1") // R1 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 2") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 7") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 12") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 17") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 22") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 2") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 7") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 12") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 17") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 22") PORT_START("IN.2") // R2 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 3") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 8") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 13") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 18") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 23") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 3") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 8") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 13") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 18") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 23") PORT_START("IN.3") // R3 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 4") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 9") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 14") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 19") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 24") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 4") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 9") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 14") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 19") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 24") PORT_START("IN.4") // R4 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 5") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 10") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 15") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 20") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square 25") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 5") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 10") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 15") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 20") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 25") PORT_START("IN.5") // R5 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SELECT) PORT_NAME("Game Select") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_START) PORT_NAME("Game Start") - PORT_BIT(0x1c, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Game Select") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Game Start") + PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END static MACHINE_CONFIG_START( amaztron, amaztron_state ) @@ -900,7 +902,7 @@ READ8_MEMBER(cqback_state::read_k) static INPUT_PORTS_START( cqback ) PORT_START("IN.0") // K1 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("P1 Left/Right") + PORT_BIT( 0x01, 0x01, IPT_SPECIAL ) PORT_CONDITION("FAKE", 0x03, NOTEQUALS, 0x00) // left/right PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Kick/Pass") @@ -919,6 +921,10 @@ static INPUT_PORTS_START( cqback ) PORT_CONFNAME( 0x01, 0x00, "Factory Test" ) PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) PORT_CONFSETTING( 0x01, DEF_STR( On ) ) // TP1-TP2 + + PORT_START("FAKE") // fake port for left/right combination + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY INPUT_PORTS_END static MACHINE_CONFIG_START( cqback, cqback_state ) @@ -1024,7 +1030,7 @@ static INPUT_PORTS_START( h2hfootb ) PORT_CONFSETTING( 0x02, "2" ) PORT_START("IN.3") // K8 - PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("P1 Left/Right") + PORT_BIT( 0x001, 0x001, IPT_SPECIAL ) PORT_CONDITION("FAKE", 0x03, NOTEQUALS, 0x00) // left/right PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Kick/Pass") @@ -1033,6 +1039,10 @@ static INPUT_PORTS_START( h2hfootb ) PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY + + PORT_START("FAKE") // fake port for left/right combination + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY INPUT_PORTS_END static MACHINE_CONFIG_START( h2hfootb, h2hfootb_state ) @@ -1352,6 +1362,131 @@ MACHINE_CONFIG_END +/*************************************************************************** + + Conic Electronic Football (1) + * TMS1000 MP0170 (die label MP0170) + * DS8874N, 3*9 LED array, 7 7seg LEDs, 1-bit sound + + This is a clone of Mattel Football. Apparently Mattel has tried to keep imports + of infringing games from going through customs. Conic (Hong Kong) answered + by distributing the game under subsidiary brands - see list below. + + known releases: + - Hong Kong: Conic Electronic Football + - USA(1): Football, ERS(Electronic Readout Systems) + - USA(2): Football, ELECsonic + - USA(3): Football, no brand! + +***************************************************************************/ + +class cnfball_state : public hh_tms1k_state +{ +public: + cnfball_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_READ8_MEMBER(read_k); +}; + +// handlers + +void cnfball_state::prepare_display() +{ + // declare 7segs, middle ones have DP + set_display_segmask(0xc3, 0x7f); + set_display_segmask(0x38, 0xff); + + display_matrix(8+3, 10, m_o | (m_r << 6 & 0x700), m_grid); +} + +WRITE16_MEMBER(cnfball_state::write_r) +{ + // R5,R8: N/C + // R6,R7: speaker out + m_speaker->level_w(data >> 6 & 3); + + // R9,R10: input mux + m_inp_mux = data >> 9 & 3; + + // R0: DS8874N CP: clock pulse edge-triggered + // note: DS8874N CP goes back to K8 too, game relies on it + if ((data ^ m_r) & 1) + m_grid = m_grid << 1 & 0x1ff; + + // R1: DS8874N _DATA: reset shift register + if (~data & 2) + m_grid = 1; + + // R2-R4: led data + m_r = data; + prepare_display(); +} + +WRITE16_MEMBER(cnfball_state::write_o) +{ + // O0-O7: digit segments + m_o = data; + prepare_display(); +} + +READ8_MEMBER(cnfball_state::read_k) +{ + // K: multiplexed inputs, K8 also tied to DS8874N CP(R0) + return read_inputs(2) | (m_r << 3 & 8); +} + + +// config + +static INPUT_PORTS_START( cnfball ) + PORT_START("IN.0") // R9 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + PORT_BIT( 0x04, 0x04, IPT_SPECIAL ) PORT_CONDITION("FAKE", 0x03, NOTEQUALS, 0x00) // left/right + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.1") // R10 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Kick") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Score") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Status") + PORT_CONFNAME( 0x08, 0x08, "Players" ) + PORT_CONFSETTING( 0x08, "1" ) + PORT_CONFSETTING( 0x00, "2" ) + + PORT_START("FAKE") // fake port for left/right combination + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY +INPUT_PORTS_END + +static const INT16 cnfball_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 }; + +static MACHINE_CONFIG_START( cnfball, cnfball_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1000, 400000) // approximation - RC osc. R=39K, C=47pf + MCFG_TMS1XXX_READ_K_CB(READ8(cnfball_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(cnfball_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(cnfball_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_cnfball) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SPEAKER_LEVELS(4, cnfball_speaker_levels) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + /*************************************************************************** Conic Electronic Football II @@ -2671,6 +2806,144 @@ MACHINE_CONFIG_END +/*************************************************************************** + + Gakken FX-Micom R-165 + * TMS1100 MCU, label MP1312, die label MP1312A + * 1 7seg led, 6 other leds, 1-bit sound + + This is a simple educational home computer. Refer to the extensive manual + for more information. It was distributed later in the USA by Tandy Radio Shack, + under their Science Fair series. Another 25 years later, Gakken re-released + the R-165 as GMC-4, obviously on modern hardware, but fully compatible. + + known releases: + - Japan: FX-Micom R-165 + - USA: Science Fair Microcomputer Trainer, published by Tandy Radio Shack + Of note is the complete redesign of the case, adding more adjustable wiring + +***************************************************************************/ + +class fxmcr165_state : public hh_tms1k_state +{ +public: + fxmcr165_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_READ8_MEMBER(read_k); +}; + +// handlers + +void fxmcr165_state::prepare_display() +{ + // 7seg digit from O0-O6 + m_display_segmask[0] = 0x7f; + m_display_state[0] = BITSWAP8(m_o,7,2,6,5,4,3,1,0) & 0x7f; + + // leds from R4-R10 + m_display_state[1] = m_r >> 4 & 0x7f; + set_display_size(7, 2); + display_update(); +} + +WRITE16_MEMBER(fxmcr165_state::write_r) +{ + // R0-R3: input mux low + m_inp_mux = (m_inp_mux & 0x10) | (data & 0xf); + + // R7: speaker out + m_speaker->level_w(data >> 7 & 1); + + // R4-R10: led data (direct) + m_r = data; + prepare_display(); +} + +WRITE16_MEMBER(fxmcr165_state::write_o) +{ + // O7: input mux high + m_inp_mux = (m_inp_mux & 0xf) | (data >> 3 & 0x10); + + // O0-O6: digit segments (direct) + m_o = data; + prepare_display(); +} + +READ8_MEMBER(fxmcr165_state::read_k) +{ + // K: multiplexed inputs + return read_inputs(5); +} + + +// config + +/* physical button layout and labels is like this: + + [C] [D] [E] [F] [ADR SET] + [8] [9] [A] [B] [INCR] + [4] [5] [6] [7] [RUN] + [0] [1] [2] [3] [RESET] +*/ + +static INPUT_PORTS_START( fxmcr165 ) + PORT_START("IN.0") // R0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("C") + + PORT_START("IN.1") // R1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("D") + + PORT_START("IN.2") // R2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("A") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("E") + + PORT_START("IN.3") // R3 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("B") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_F) PORT_NAME("F") + + PORT_START("IN.4") // O7 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Reset") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Run") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_EQUALS) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("Increment") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("Address Set") +INPUT_PORTS_END + +static MACHINE_CONFIG_START( fxmcr165, fxmcr165_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1100, XTAL_400kHz) + MCFG_TMS1XXX_READ_K_CB(READ8(fxmcr165_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(fxmcr165_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(fxmcr165_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_fxmcr165) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + /*************************************************************************** Ideal Electronic Detective @@ -2776,7 +3049,6 @@ static INPUT_PORTS_START( elecdet ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false) INPUT_PORTS_END - static const INT16 elecdet_speaker_levels[4] = { 0, 0x3fff, 0x3fff, 0x7fff }; static MACHINE_CONFIG_START( elecdet, elecdet_state ) @@ -2877,34 +3149,34 @@ READ8_MEMBER(starwbc_state::read_k) static INPUT_PORTS_START( starwbc ) PORT_START("IN.0") // R0 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Basic Game") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Intermediate Game") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Advanced Game") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("Player Number") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_NAME("Basic Game") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_NAME("Intermediate Game") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_NAME("Advanced Game") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) PORT_NAME("Player Number") PORT_START("IN.1") // R1 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("Start Turn") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_NAME("End Turn") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_NAME("Start Turn") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_NAME("End Turn") PORT_START("IN.2") // R3 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Magna Scan") // only used in adv. game - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Enemy Scan") // only used in adv. game - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Screen Up") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_NAME("Magna Scan") // only used in adv. game + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_NAME("Enemy Scan") // only used in adv. game + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("Screen Up") PORT_START("IN.3") // R5 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Evasive Maneuvers") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("Move") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("Fire") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("Battle Stations") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("Evasive Maneuvers") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) PORT_NAME("Move") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_F) PORT_NAME("Fire") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("Battle Stations") PORT_START("IN.4") // R7 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Left") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_UP) PORT_NAME("Up") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Down") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Right") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Left") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_UP) PORT_NAME("Up") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Down") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Right") INPUT_PORTS_END static MACHINE_CONFIG_START( starwbc, starwbc_state ) @@ -3949,31 +4221,30 @@ READ8_MEMBER(merlin_state::read_k) static INPUT_PORTS_START( merlin ) PORT_START("IN.0") // O0 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME("Button 0") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("Button 1") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Button 3") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Button 2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME("Button 0") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("Button 1") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Button 3") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Button 2") PORT_START("IN.1") // O1 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Button 4") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Button 5") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Button 7") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Button 6") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Button 4") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Button 5") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Button 7") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Button 6") PORT_START("IN.2") // O2 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Button 8") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Button 9") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("Same Game") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Button 10") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Button 8") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Button 9") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_G) PORT_NAME("Same Game") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Button 10") PORT_START("IN.3") // O3 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("Comp Turn") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_NAME("Hit Me") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("New Game") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("Comp Turn") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_H) PORT_NAME("Hit Me") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("New Game") INPUT_PORTS_END - static const INT16 merlin_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff }; static MACHINE_CONFIG_START( merlin, merlin_state ) @@ -4037,7 +4308,7 @@ static INPUT_PORTS_START( mmerlin ) PORT_INCLUDE( merlin ) PORT_MODIFY("IN.3") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Score") // instead of Hit Me + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("Score") // instead of Hit Me INPUT_PORTS_END static MACHINE_CONFIG_START( mmerlin, mmerlin_state ) @@ -4153,7 +4424,6 @@ static INPUT_PORTS_START( stopthief ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false) INPUT_PORTS_END - static const INT16 stopthief_speaker_levels[7] = { 0, 0x7fff/6, 0x7fff/5, 0x7fff/4, 0x7fff/3, 0x7fff/2, 0x7fff }; static MACHINE_CONFIG_START( stopthief, stopthief_state ) @@ -4460,31 +4730,34 @@ READ8_MEMBER(lostreas_state::read_k) static INPUT_PORTS_START( lostreas ) PORT_START("IN.0") // O0 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4") PORT_START("IN.1") // O1 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8") PORT_START("IN.2") // O2 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_U) PORT_NAME("Air/Up") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("$ Value") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear") + PORT_BIT( 0x04, 0x04, IPT_SPECIAL ) PORT_CONDITION("FAKE", 0x03, NOTEQUALS, 0x00) // air/up + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_V) PORT_NAME("$ Value") PORT_START("IN.3") // O3 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("E-W (silver)") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("N-S (silver)") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("E-W (gold)") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("N-S (gold)") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("E-W (silver)") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("N-S (silver)") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_NAME("E-W (gold)") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_NAME("N-S (gold)") + + PORT_START("FAKE") // Air/Up buttons share the same position on the matrix + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("Air") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) PORT_NAME("Up") INPUT_PORTS_END - static const INT16 lostreas_speaker_levels[16] = { 0, 0x7fff/15, 0x7fff/14, 0x7fff/13, 0x7fff/12, 0x7fff/11, 0x7fff/10, 0x7fff/9, @@ -5081,6 +5354,17 @@ ROM_START( tc4 ) ROM_END +ROM_START( cnfball ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "mp0170", 0x0000, 0x0400, CRC(50e8a44f) SHA1(fea6ae03c4ef329d825f8688e6854df15023d47e) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1000_common2_micro.pla", 0, 867, CRC(d33da3cf) SHA1(13c4ebbca227818db75e6db0d45b66ba5e207776) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1000_cnfball_output.pla", 0, 365, CRC(0af52f64) SHA1(b4cf450e4d895eddb67448aa69e4f18a5a84e033) ) +ROM_END + + ROM_START( cnfball2 ) ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD( "mp1181", 0x0000, 0x0800, CRC(4553a840) SHA1(2e1132c9bc51641f77ba7f2430b5a3b2766b3a3d) ) @@ -5191,6 +5475,17 @@ ROM_START( gjackpot ) ROM_END +ROM_START( fxmcr165 ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "mp1312", 0x0000, 0x0800, CRC(6efc8bcc) SHA1(ced8a02b472a3178073691d3dccc0f19f57428fd) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1100_fxmcr165_output.pla", 0, 365, CRC(ce656866) SHA1(40e1614f5afcc7572fda596e1be453d54e95af0c) ) +ROM_END + + ROM_START( elecdet ) ROM_REGION( 0x1000, "maincpu", 0 ) ROM_LOAD( "mp6100a", 0x0000, 0x1000, CRC(6f396bb8) SHA1(1f104d4ca9bee0d4572be4779b7551dfe20c4f04) ) @@ -5440,6 +5735,7 @@ CONS( 1980, h2hfootb, 0, 0, h2hfootb, h2hfootb, driver_device, 0, "Col CONS( 1980, h2hbaseb, 0, 0, h2hbaseb, h2hbaseb, driver_device, 0, "Coleco", "Head to Head Baseball", MACHINE_SUPPORTS_SAVE ) CONS( 1981, tc4, 0, 0, tc4, tc4, driver_device, 0, "Coleco", "Total Control 4", MACHINE_SUPPORTS_SAVE ) +CONS( 1979, cnfball, 0, 0, cnfball, cnfball, driver_device, 0, "Conic", "Electronic Football (Conic)", MACHINE_SUPPORTS_SAVE ) CONS( 1979, cnfball2, 0, 0, cnfball2, cnfball2, driver_device, 0, "Conic", "Electronic Football II (Conic)", MACHINE_SUPPORTS_SAVE ) CONS( 1979, ebball, 0, 0, ebball, ebball, driver_device, 0, "Entex", "Electronic Baseball (Entex)", MACHINE_SUPPORTS_SAVE ) @@ -5452,6 +5748,7 @@ CONS( 1980, raisedvl, 0, 0, raisedvl, raisedvl, driver_device, 0, "Ent CONS( 1979, gpoker, 0, 0, gpoker, gpoker, driver_device, 0, "Gakken", "Poker (Gakken, 1979 version)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, gjackpot, 0, 0, gjackpot, gjackpot, driver_device, 0, "Gakken", "Jackpot: Gin Rummy & Black Jack", MACHINE_SUPPORTS_SAVE ) +COMP( 1983, fxmcr165, 0, 0, fxmcr165, fxmcr165, driver_device, 0, "Gakken", "FX-Micom R-165", MACHINE_SUPPORTS_SAVE ) CONS( 1979, elecdet, 0, 0, elecdet, elecdet, driver_device, 0, "Ideal", "Electronic Detective", MACHINE_SUPPORTS_SAVE ) // *** diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp index e607444ad64..bb7d99e82a7 100644 --- a/src/mame/drivers/hh_ucom4.cpp +++ b/src/mame/drivers/hh_ucom4.cpp @@ -310,8 +310,7 @@ static INPUT_PORTS_START( ufombs ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END - -static const INT16 ufombs_speaker_levels[] = { 0, 32767, -32768, 0 }; +static const INT16 ufombs_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 }; static MACHINE_CONFIG_START( ufombs, ufombs_state ) @@ -444,14 +443,17 @@ static INPUT_PORTS_START( ssfball ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) // multiplexed, handled in input_b_r PORT_START("IN.3") // port A - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_NAME("Ball-carrier Left/Right") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_NAME("Ball-carrier Up") - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_NAME("Ball-carrier Down") + PORT_BIT( 0x01, 0x01, IPT_SPECIAL ) PORT_CONDITION("FAKE", 0x03, NOTEQUALS, 0x00) // left/right + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Pass") -INPUT_PORTS_END + PORT_START("FAKE") // fake port for left/right combination + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY +INPUT_PORTS_END -static const INT16 ssfball_speaker_levels[] = { 0, 32767, -32768, 0 }; +static const INT16 ssfball_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 }; static MACHINE_CONFIG_START( ssfball, ssfball_state ) @@ -828,8 +830,7 @@ static INPUT_PORTS_START( splasfgt ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END - -static const INT16 splasfgt_speaker_levels[] = { 0, 32767, -32768, 0 }; +static const INT16 splasfgt_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 }; static MACHINE_CONFIG_START( splasfgt, splasfgt_state ) @@ -1022,34 +1023,34 @@ READ8_MEMBER(tactix_state::input_r) static INPUT_PORTS_START( tactix ) PORT_START("IN.0") // C0 port A - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Button 1") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Button 5") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("Button 9") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("Button 13") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_NAME("Button 1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_NAME("Button 5") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("Button 9") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("Button 13") PORT_START("IN.1") // C1 port A - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Button 2") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Button 6") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Button 10") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Button 14") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_NAME("Button 2") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_NAME("Button 6") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("Button 10") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("Button 14") PORT_START("IN.2") // C2 port A - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Button 3") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Button 7") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("Button 11") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("Button 15") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_NAME("Button 3") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("Button 7") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("Button 11") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("Button 15") PORT_START("IN.3") // C3 port A - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Button 4") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Button 8") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("Button 12") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("Button 16") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_NAME("Button 4") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("Button 8") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_F) PORT_NAME("Button 12") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_V) PORT_NAME("Button 16") PORT_START("IN.4") // E0 port A - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("New Game") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Comp Turn") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_NAME("New Game") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("Comp Turn") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END static MACHINE_CONFIG_START( tactix, tactix_state ) @@ -1247,7 +1248,7 @@ static INPUT_PORTS_START( efball ) PORT_START("IN.1") // port B PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("P1 Left/Right") + PORT_BIT( 0x04, 0x04, IPT_SPECIAL ) PORT_CONDITION("FAKE", 0x03, NOTEQUALS, 0x00) // left/right PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Pass") PORT_START("IN.2") // port C @@ -1255,6 +1256,10 @@ static INPUT_PORTS_START( efball ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Kick Return") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Kick") + + PORT_START("FAKE") // fake port for left/right combination + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY INPUT_PORTS_END static MACHINE_CONFIG_START( efball, efball_state ) diff --git a/src/mame/includes/hh_tms1k.h b/src/mame/includes/hh_tms1k.h index fc05dc3baf9..46f6530ae7a 100644 --- a/src/mame/includes/hh_tms1k.h +++ b/src/mame/includes/hh_tms1k.h @@ -50,8 +50,8 @@ public: int m_display_maxy; // display matrix number of rows int m_display_maxx; // display matrix number of columns (max 31 for now) - UINT32 m_grid; // VFD current row data - UINT32 m_plate; // VFD current column data + UINT32 m_grid; // VFD/LED current row data + UINT32 m_plate; // VFD/LED current column data UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on) UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments diff --git a/src/mame/layout/cnfball.lay b/src/mame/layout/cnfball.lay new file mode 100644 index 00000000000..bb5a3720d5f --- /dev/null +++ b/src/mame/layout/cnfball.lay @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/fxmcr165.lay b/src/mame/layout/fxmcr165.lay new file mode 100644 index 00000000000..6cbc66fcbf9 --- /dev/null +++ b/src/mame/layout/fxmcr165.lay @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index dc534dcefc9..2b8672f6d9a 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -13687,6 +13687,7 @@ amaztron // Coleco astro // Kosmos bankshot // Parker Bros bigtrak // Milton Bradley +cnfball // Conic cnfball2 // Conic cnsector // Parker Bros comp4 // Milton Bradley @@ -13698,6 +13699,7 @@ ebball3 // Entex efootb4 // Entex einvader // Entex elecdet // Ideal +fxmcr165 // Gakken gjackpot // Gakken gpoker // Gakken h2hbaseb // Coleco -- cgit v1.2.3-70-g09d2 From 75e5db381bd0cbd3fd664ebf83f518cdbd86b345 Mon Sep 17 00:00:00 2001 From: Dirk Best Date: Sat, 12 Mar 2016 02:34:23 +0100 Subject: Add support to adjust the screen color This is now used for monochrome screens instead of creating custom palettes. --- src/devices/bus/c64/xl80.cpp | 4 +-- src/devices/bus/cbm2/hrg.cpp | 8 ++--- src/devices/bus/comx35/clm.cpp | 4 +-- src/devices/bus/ecbbus/grip.cpp | 4 +-- src/devices/bus/pet/hsg.cpp | 8 ++--- src/devices/bus/wangpc/tig.cpp | 4 +-- src/devices/machine/terminal.cpp | 4 +-- src/emu/emupal.cpp | 65 +++++++++------------------------------ src/emu/emupal.h | 38 ++++++++--------------- src/emu/screen.cpp | 13 ++++++++ src/emu/screen.h | 9 ++++++ src/lib/util/palette.cpp | 8 +++++ src/lib/util/palette.h | 2 ++ src/mame/drivers/8080bw.cpp | 4 +-- src/mame/drivers/a51xx.cpp | 2 +- src/mame/drivers/a7150.cpp | 2 +- src/mame/drivers/ac1.cpp | 2 +- src/mame/drivers/ace.cpp | 2 +- src/mame/drivers/alesis.cpp | 2 +- src/mame/drivers/alto2.cpp | 4 +-- src/mame/drivers/amust.cpp | 4 +-- src/mame/drivers/apple1.cpp | 2 +- src/mame/drivers/apricot.cpp | 4 +-- src/mame/drivers/argo.cpp | 2 +- src/mame/drivers/atarist.cpp | 2 +- src/mame/drivers/attache.cpp | 4 +-- src/mame/drivers/aussiebyte.cpp | 2 +- src/mame/drivers/ax20.cpp | 3 +- src/mame/drivers/bcs3.cpp | 4 +-- src/mame/drivers/beehive.cpp | 4 +-- src/mame/drivers/bigbord2.cpp | 2 +- src/mame/drivers/binbug.cpp | 8 ++--- src/mame/drivers/bitgraph.cpp | 2 +- src/mame/drivers/bk.cpp | 2 +- src/mame/drivers/blockade.cpp | 2 +- src/mame/drivers/bw12.cpp | 4 +-- src/mame/drivers/c10.cpp | 2 +- src/mame/drivers/c900.cpp | 2 +- src/mame/drivers/cat.cpp | 2 +- src/mame/drivers/cbm2.cpp | 4 +-- src/mame/drivers/cd2650.cpp | 2 +- src/mame/drivers/circus.cpp | 8 ++--- src/mame/drivers/compis.cpp | 4 +-- src/mame/drivers/comquest.cpp | 2 +- src/mame/drivers/concept.cpp | 2 +- src/mame/drivers/copsnrob.cpp | 2 +- src/mame/drivers/cxhumax.cpp | 2 +- src/mame/drivers/d6800.cpp | 2 +- src/mame/drivers/dct11em.cpp | 2 +- src/mame/drivers/dim68k.cpp | 2 +- src/mame/drivers/dms5000.cpp | 2 +- src/mame/drivers/dmv.cpp | 4 +-- src/mame/drivers/dvk_ksm.cpp | 4 +-- src/mame/drivers/ec65.cpp | 4 +-- src/mame/drivers/fastinvaders.cpp | 2 +- src/mame/drivers/fc100.cpp | 3 +- src/mame/drivers/fk1.cpp | 4 +-- src/mame/drivers/galaxy.cpp | 4 +-- src/mame/drivers/galeb.cpp | 2 +- src/mame/drivers/galgame.cpp | 2 +- src/mame/drivers/gamepock.cpp | 2 +- src/mame/drivers/grfd2301.cpp | 2 +- src/mame/drivers/h19.cpp | 4 +-- src/mame/drivers/headonb.cpp | 2 +- src/mame/drivers/hitme.cpp | 2 +- src/mame/drivers/homelab.cpp | 12 ++++---- src/mame/drivers/homez80.cpp | 2 +- src/mame/drivers/hp64k.cpp | 4 +-- src/mame/drivers/hp9845.cpp | 4 +-- src/mame/drivers/hp9k.cpp | 2 +- src/mame/drivers/huebler.cpp | 2 +- src/mame/drivers/ie15.cpp | 4 +-- src/mame/drivers/imds2.cpp | 2 +- src/mame/drivers/ipds.cpp | 4 +-- src/mame/drivers/iq151.cpp | 4 +-- src/mame/drivers/irisha.cpp | 2 +- src/mame/drivers/itt3030.cpp | 2 +- src/mame/drivers/jonos.cpp | 2 +- src/mame/drivers/jr100.cpp | 2 +- src/mame/drivers/jtc.cpp | 4 +-- src/mame/drivers/jupace.cpp | 2 +- src/mame/drivers/jupiter.cpp | 2 +- src/mame/drivers/k8915.cpp | 4 +-- src/mame/drivers/kaypro.cpp | 4 +-- src/mame/drivers/konin.cpp | 2 +- src/mame/drivers/kramermc.cpp | 2 +- src/mame/drivers/lisa.cpp | 2 +- src/mame/drivers/llc.cpp | 4 +-- src/mame/drivers/m20.cpp | 2 +- src/mame/drivers/m79152pc.cpp | 2 +- src/mame/drivers/macpci.cpp | 2 +- src/mame/drivers/mbc200.cpp | 2 +- src/mame/drivers/mc80.cpp | 4 +-- src/mame/drivers/meadows.cpp | 6 ++-- src/mame/drivers/mes.cpp | 2 +- src/mame/drivers/micral.cpp | 4 +-- src/mame/drivers/microtan.cpp | 2 +- src/mame/drivers/mikro80.cpp | 2 +- src/mame/drivers/mk85.cpp | 2 +- src/mame/drivers/mk90.cpp | 2 +- src/mame/drivers/modellot.cpp | 4 +-- src/mame/drivers/mx2178.cpp | 4 +-- src/mame/drivers/myb3k.cpp | 2 +- src/mame/drivers/mycom.cpp | 2 +- src/mame/drivers/mz80.cpp | 2 +- src/mame/drivers/nanos.cpp | 2 +- src/mame/drivers/nascom1.cpp | 2 +- src/mame/drivers/nitedrvr.cpp | 2 +- src/mame/drivers/nokia_3310.cpp | 4 +-- src/mame/drivers/notetaker.cpp | 2 +- src/mame/drivers/octopus.cpp | 2 +- src/mame/drivers/okean240.cpp | 2 +- src/mame/drivers/ondra.cpp | 2 +- src/mame/drivers/orao.cpp | 2 +- src/mame/drivers/orbit.cpp | 2 +- src/mame/drivers/osbexec.cpp | 4 +-- src/mame/drivers/osborne1.cpp | 4 +-- src/mame/drivers/p112.cpp | 2 +- src/mame/drivers/pcm.cpp | 2 +- src/mame/drivers/pda600.cpp | 2 +- src/mame/drivers/pegasus.cpp | 2 +- src/mame/drivers/peoplepc.cpp | 4 +-- src/mame/drivers/pet.cpp | 8 ++--- src/mame/drivers/plan80.cpp | 4 +-- src/mame/drivers/pmd85.cpp | 4 +-- src/mame/drivers/pockstat.cpp | 2 +- src/mame/drivers/poly88.cpp | 2 +- src/mame/drivers/primo.cpp | 2 +- src/mame/drivers/proteus3.cpp | 2 +- src/mame/drivers/ptcsol.cpp | 2 +- src/mame/drivers/pv9234.cpp | 2 +- src/mame/drivers/pyl601.cpp | 4 +-- src/mame/drivers/rd100.cpp | 4 +-- src/mame/drivers/rm380z.cpp | 2 +- src/mame/drivers/sapi1.cpp | 2 +- src/mame/drivers/sbrain.cpp | 4 +-- src/mame/drivers/sbrkout.cpp | 2 +- src/mame/drivers/sdk80.cpp | 2 +- src/mame/drivers/sorcerer.cpp | 2 +- src/mame/drivers/ssem.cpp | 2 +- src/mame/drivers/sshot.cpp | 2 +- src/mame/drivers/starcrus.cpp | 2 +- src/mame/drivers/super80.cpp | 4 +-- src/mame/drivers/swyft.cpp | 2 +- src/mame/drivers/sys2900.cpp | 2 +- src/mame/drivers/tandy2k.cpp | 4 +-- src/mame/drivers/tavernie.cpp | 2 +- src/mame/drivers/tdv2324.cpp | 4 +-- src/mame/drivers/tek405x.cpp | 8 ++--- src/mame/drivers/terak.cpp | 2 +- src/mame/drivers/ti99_2.cpp | 4 +-- src/mame/drivers/tim011.cpp | 2 +- src/mame/drivers/tk80bs.cpp | 2 +- src/mame/drivers/trs80.cpp | 2 +- src/mame/drivers/trs80m2.cpp | 8 ++--- src/mame/drivers/ts803.cpp | 4 +-- src/mame/drivers/tvgame.cpp | 2 +- src/mame/drivers/uknc.cpp | 2 +- src/mame/drivers/univac.cpp | 4 +-- src/mame/drivers/unixpc.cpp | 2 +- src/mame/drivers/ut88.cpp | 2 +- src/mame/drivers/v6809.cpp | 2 +- src/mame/drivers/victor9k.cpp | 4 +-- src/mame/drivers/videopin.cpp | 2 +- src/mame/drivers/vixen.cpp | 4 +-- src/mame/drivers/vt100.cpp | 4 +-- src/mame/drivers/vt220.cpp | 2 +- src/mame/drivers/vt240.cpp | 2 +- src/mame/drivers/vt320.cpp | 2 +- src/mame/drivers/vt520.cpp | 2 +- src/mame/drivers/wicat.cpp | 4 +-- src/mame/drivers/xerox820.cpp | 4 +-- src/mame/drivers/z1013.cpp | 2 +- src/mame/drivers/zorba.cpp | 4 +-- src/mame/drivers/zrt80.cpp | 4 +-- src/mame/video/abc1600.cpp | 4 +-- src/mame/video/abc80.cpp | 2 +- src/mame/video/abc800.cpp | 4 +-- src/mame/video/abc802.cpp | 4 +-- src/mame/video/apollo.cpp | 2 +- src/mame/video/newbrain.cpp | 4 +-- src/mame/video/osi.cpp | 4 +-- src/mame/video/pcd.cpp | 2 +- src/mame/video/v1050.cpp | 4 +-- src/mame/video/vtvideo.cpp | 4 +-- 185 files changed, 332 insertions(+), 345 deletions(-) (limited to 'src') diff --git a/src/devices/bus/c64/xl80.cpp b/src/devices/bus/c64/xl80.cpp index c1f7fe0f1dd..5f4a1eaa285 100644 --- a/src/devices/bus/c64/xl80.cpp +++ b/src/devices/bus/c64/xl80.cpp @@ -122,14 +122,14 @@ GFXDECODE_END //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( c64_xl80 ) - MCFG_SCREEN_ADD(MC6845_SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(MC6845_SCREEN_TAG, RASTER, rgb_t::white) MCFG_SCREEN_UPDATE_DEVICE(HD46505SP_TAG, h46505_device, screen_update) MCFG_SCREEN_SIZE(80*8, 24*8) MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*8-1) MCFG_SCREEN_REFRESH_RATE(50) MCFG_GFXDECODE_ADD("gfxdecode", "palette", c64_xl80) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD(HD46505SP_TAG, H46505, MC6845_SCREEN_TAG, XTAL_14_31818MHz / 8) MCFG_MC6845_SHOW_BORDER_AREA(true) diff --git a/src/devices/bus/cbm2/hrg.cpp b/src/devices/bus/cbm2/hrg.cpp index bb0e38a22cb..6bc88abdadb 100644 --- a/src/devices/bus/cbm2/hrg.cpp +++ b/src/devices/bus/cbm2/hrg.cpp @@ -85,12 +85,12 @@ ADDRESS_MAP_END //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( cbm2_hrg_a ) - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DEVICE(EF9365_TAG, ef9365_device, screen_update) MCFG_SCREEN_SIZE(512, 512) MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 512-1) MCFG_SCREEN_REFRESH_RATE(25) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD(EF9365_TAG, EF9365, 1750000) MCFG_VIDEO_SET_SCREEN(SCREEN_TAG) @@ -106,12 +106,12 @@ MACHINE_CONFIG_END //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( cbm2_hrg_b ) - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DEVICE(EF9366_TAG, ef9365_device, screen_update) MCFG_SCREEN_SIZE(512, 256) MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1) MCFG_SCREEN_REFRESH_RATE(50) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD(EF9366_TAG, EF9365, 1750000) MCFG_VIDEO_SET_SCREEN(SCREEN_TAG) diff --git a/src/devices/bus/comx35/clm.cpp b/src/devices/bus/comx35/clm.cpp index b9cc57b836f..15aa7f88295 100644 --- a/src/devices/bus/comx35/clm.cpp +++ b/src/devices/bus/comx35/clm.cpp @@ -135,7 +135,7 @@ GFXDECODE_END //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( comx_clm ) - MCFG_SCREEN_ADD(MC6845_SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(MC6845_SCREEN_TAG, RASTER, rgb_t::white) MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update) MCFG_SCREEN_SIZE(80*8, 24*8) MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*8-1) @@ -143,7 +143,7 @@ static MACHINE_CONFIG_FRAGMENT( comx_clm ) MCFG_SCREEN_REFRESH_RATE(50) MCFG_GFXDECODE_ADD("gfxdecode", "palette", comx_clm) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD(MC6845_TAG, MC6845, MC6845_SCREEN_TAG, XTAL_14_31818MHz/7) MCFG_MC6845_SHOW_BORDER_AREA(true) diff --git a/src/devices/bus/ecbbus/grip.cpp b/src/devices/bus/ecbbus/grip.cpp index 75ba3961754..ca0cd2a579a 100644 --- a/src/devices/bus/ecbbus/grip.cpp +++ b/src/devices/bus/ecbbus/grip.cpp @@ -459,14 +459,14 @@ static MACHINE_CONFIG_FRAGMENT( grip ) MCFG_CPU_IO_MAP(grip_io) // video hardware - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::white) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update) MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/devices/bus/pet/hsg.cpp b/src/devices/bus/pet/hsg.cpp index d0bd43d0020..e22f4041a73 100644 --- a/src/devices/bus/pet/hsg.cpp +++ b/src/devices/bus/pet/hsg.cpp @@ -87,12 +87,12 @@ ADDRESS_MAP_END //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( cbm8000_hsg_a ) - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DEVICE(EF9365_TAG, ef9365_device, screen_update) MCFG_SCREEN_SIZE(512, 512) MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 512-1) MCFG_SCREEN_REFRESH_RATE(25) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD(EF9365_TAG, EF9365, 1750000) MCFG_VIDEO_SET_SCREEN(SCREEN_TAG) @@ -108,12 +108,12 @@ MACHINE_CONFIG_END //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( cbm8000_hsg_b ) - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DEVICE(EF9366_TAG, ef9365_device, screen_update) MCFG_SCREEN_SIZE(512, 256) MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1) MCFG_SCREEN_REFRESH_RATE(50) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD(EF9366_TAG, EF9365, 1750000) MCFG_VIDEO_SET_SCREEN(SCREEN_TAG) diff --git a/src/devices/bus/wangpc/tig.cpp b/src/devices/bus/wangpc/tig.cpp index efadfc332dc..519758ba12a 100644 --- a/src/devices/bus/wangpc/tig.cpp +++ b/src/devices/bus/wangpc/tig.cpp @@ -110,14 +110,14 @@ UPD7220_DISPLAY_PIXELS_MEMBER( wangpc_tig_device::hgdc_display_pixels ) //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( wangpc_tig ) - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, wangpc_tig_device, screen_update) MCFG_SCREEN_SIZE(80*10, 25*12) MCFG_SCREEN_VISIBLE_AREA(0, 80*10-1, 0, 25*12-1) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) MCFG_SCREEN_REFRESH_RATE(60) - MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") + MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette") MCFG_DEVICE_ADD(UPD7720_0_TAG, UPD7220, XTAL_52_832MHz/28) MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_0_map) diff --git a/src/devices/machine/terminal.cpp b/src/devices/machine/terminal.cpp index 6b1b26b8c85..86388182f15 100644 --- a/src/devices/machine/terminal.cpp +++ b/src/devices/machine/terminal.cpp @@ -319,14 +319,14 @@ WRITE8_MEMBER( generic_terminal_device::kbd_put ) ***************************************************************************/ static MACHINE_CONFIG_FRAGMENT( generic_terminal ) - MCFG_SCREEN_ADD(TERMINAL_SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(TERMINAL_SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(TERMINAL_WIDTH*8, TERMINAL_HEIGHT*10) MCFG_SCREEN_VISIBLE_AREA(0, TERMINAL_WIDTH*8-1, 0, TERMINAL_HEIGHT*10-1) MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, generic_terminal_device, update) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0) MCFG_GENERIC_KEYBOARD_CB(WRITE8(generic_terminal_device, kbd_put)) diff --git a/src/emu/emupal.cpp b/src/emu/emupal.cpp index e3d2dcd97a1..ccd0b26d324 100644 --- a/src/emu/emupal.cpp +++ b/src/emu/emupal.cpp @@ -744,79 +744,44 @@ void palette_device::configure_rgb_shadows(int mode, float factor) void palette_device::palette_init_all_black(palette_device &palette) { - int i; - - for (i = 0; i < palette.entries(); i++) + for (int i = 0; i < palette.entries(); i++) { - palette.set_pen_color(i,rgb_t::black); // black + palette.set_pen_color(i, rgb_t::black); } } /*------------------------------------------------- - black_and_white - basic 2-color black & white --------------------------------------------------*/ - -void palette_device::palette_init_black_and_white(palette_device &palette) -{ - palette.set_pen_color(0,rgb_t::black); // black - palette.set_pen_color(1,rgb_t::white); // white -} - - -/*------------------------------------------------- - white_and_black - basic 2-color white & black --------------------------------------------------*/ - -void palette_device::palette_init_white_and_black(palette_device &palette) -{ - palette.set_pen_color(0,rgb_t::white); // white - palette.set_pen_color(1,rgb_t::black); // black -} - - -/*------------------------------------------------- - monochrome_amber - 2-color black & amber --------------------------------------------------*/ - -void palette_device::palette_init_monochrome_amber(palette_device &palette) -{ - palette.set_pen_color(0, rgb_t::black); // black - palette.set_pen_color(1, rgb_t(0xf7, 0xaa, 0x00)); // amber -} - - -/*------------------------------------------------- - monochrome_green - 2-color black & green + monochrome - 2-color black & white -------------------------------------------------*/ -void palette_device::palette_init_monochrome_green(palette_device &palette) +void palette_device::palette_init_monochrome(palette_device &palette) { - palette.set_pen_color(0, rgb_t::black); // black - palette.set_pen_color(1, rgb_t(0x00, 0xff, 0x00)); // green + palette.set_pen_color(0, rgb_t::black); + palette.set_pen_color(1, rgb_t::white); } /*------------------------------------------------- - monochrome_green_highlight - 3-color black & green + monochrome_inverted - 2-color white & black -------------------------------------------------*/ -void palette_device::palette_init_monochrome_green_highlight(palette_device &palette) +void palette_device::palette_init_monochrome_inverted(palette_device &palette) { - palette.set_pen_color(0, rgb_t::black); // black - palette.set_pen_color(1, rgb_t(0x00, 0xc0, 0x00)); // green - palette.set_pen_color(2, rgb_t(0x00, 0xff, 0x00)); // green + palette.set_pen_color(0, rgb_t::white); + palette.set_pen_color(1, rgb_t::black); } /*------------------------------------------------- - monochrome_yellow - 2-color black & yellow + monochrome_highlight - 3-color -------------------------------------------------*/ -void palette_device::palette_init_monochrome_yellow(palette_device &palette) +void palette_device::palette_init_monochrome_highlight(palette_device &palette) { - palette.set_pen_color(0, rgb_t::black); // black - palette.set_pen_color(1, rgb_t(0xff, 0xff, 0x00)); // yellow + palette.set_pen_color(0, rgb_t::black); + palette.set_pen_color(1, rgb_t(0xc0, 0xc0, 0xc0)); + palette.set_pen_color(2, rgb_t::white); } diff --git a/src/emu/emupal.h b/src/emu/emupal.h index b06a5b43d7f..57b6cecebdc 100644 --- a/src/emu/emupal.h +++ b/src/emu/emupal.h @@ -217,31 +217,20 @@ palette_device::static_enable_hilights(*device); -// standard palettes -#define MCFG_PALETTE_ADD_BLACK_AND_WHITE(_tag) \ +// monochrome palettes +#define MCFG_PALETTE_ADD_MONOCHROME(_tag) \ MCFG_PALETTE_ADD(_tag, 2) \ - palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_black_and_white), downcast(device))); + palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_monochrome), downcast(device))); -#define MCFG_PALETTE_ADD_WHITE_AND_BLACK(_tag) \ +#define MCFG_PALETTE_ADD_MONOCHROME_INVERTED(_tag) \ MCFG_PALETTE_ADD(_tag, 2) \ - palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_white_and_black), downcast(device))); + palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_monochrome_inverted), downcast(device))); -#define MCFG_PALETTE_ADD_MONOCHROME_AMBER(_tag) \ - MCFG_PALETTE_ADD(_tag, 2) \ - palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_monochrome_amber), downcast(device))); - -#define MCFG_PALETTE_ADD_MONOCHROME_GREEN(_tag) \ - MCFG_PALETTE_ADD(_tag, 2) \ - palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_monochrome_green), downcast(device))); - -#define MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT(_tag) \ +#define MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT(_tag) \ MCFG_PALETTE_ADD(_tag, 3) \ - palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_monochrome_green_highlight), downcast(device))); - -#define MCFG_PALETTE_ADD_MONOCHROME_YELLOW(_tag) \ - MCFG_PALETTE_ADD(_tag, 2) \ - palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_monochrome_yellow), downcast(device))); + palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_monochrome_highlight), downcast(device))); +// 8-bit palettes #define MCFG_PALETTE_ADD_3BIT_RGB(_tag) \ MCFG_PALETTE_ADD(_tag, 8) \ palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_3bit_rgb), downcast(device))); @@ -266,10 +255,12 @@ MCFG_PALETTE_ADD(_tag, 8) \ palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_3bit_bgr), downcast(device))); +// 15-bit palettes #define MCFG_PALETTE_ADD_RRRRRGGGGGBBBBB(_tag) \ MCFG_PALETTE_ADD(_tag, 32768) \ palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_RRRRRGGGGGBBBBB), downcast(device))); +// 16-bit palettes #define MCFG_PALETTE_ADD_BBBBBGGGGGRRRRR(_tag) \ MCFG_PALETTE_ADD(_tag, 32768) \ palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_BBBBBGGGGGRRRRR), downcast(device))); @@ -437,12 +428,9 @@ public: // generic palette init routines void palette_init_all_black(palette_device &palette); - void palette_init_black_and_white(palette_device &palette); - void palette_init_white_and_black(palette_device &palette); - void palette_init_monochrome_amber(palette_device &palette); - void palette_init_monochrome_green(palette_device &palette); - void palette_init_monochrome_green_highlight(palette_device &palette); - void palette_init_monochrome_yellow(palette_device &palette); + void palette_init_monochrome(palette_device &palette); + void palette_init_monochrome_inverted(palette_device &palette); + void palette_init_monochrome_highlight(palette_device &palette); void palette_init_3bit_rgb(palette_device &palette); void palette_init_3bit_rbg(palette_device &palette); void palette_init_3bit_brg(palette_device &palette); diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp index 2ae1269cdd8..c286788ea37 100644 --- a/src/emu/screen.cpp +++ b/src/emu/screen.cpp @@ -240,6 +240,19 @@ void screen_device::static_set_video_attributes(device_t &device, UINT32 flags) screen_device &screen = downcast(device); screen.m_video_attributes = flags; } + + +//------------------------------------------------- +// static_set_color - set the screen global color +//------------------------------------------------- + +void screen_device::static_set_color(device_t &device, rgb_t color) +{ + screen_device &screen = downcast(device); + screen.m_color = color; +} + + //------------------------------------------------- // device_validity_check - verify device // configuration diff --git a/src/emu/screen.h b/src/emu/screen.h index 6a38b72f377..711602b0395 100644 --- a/src/emu/screen.h +++ b/src/emu/screen.h @@ -193,6 +193,7 @@ public: static void static_set_screen_vblank(device_t &device, screen_vblank_delegate callback); static void static_set_palette(device_t &device, const char *tag); static void static_set_video_attributes(device_t &device, UINT32 flags); + static void static_set_color(device_t &device, rgb_t color); // information getters render_container &container() const { assert(m_container != nullptr); return *m_container; } @@ -365,6 +366,12 @@ typedef device_type_iterator<&device_creator, screen_device> scre #define MCFG_SCREEN_ADD(_tag, _type) \ MCFG_DEVICE_ADD(_tag, SCREEN, 0) \ MCFG_SCREEN_TYPE(_type) + +#define MCFG_SCREEN_ADD_MONOCHROME(_tag, _type, _color) \ + MCFG_DEVICE_ADD(_tag, SCREEN, 0) \ + MCFG_SCREEN_TYPE(_type) \ + MCFG_SCREEN_COLOR(_color) + #define MCFG_SCREEN_MODIFY(_tag) \ MCFG_DEVICE_MODIFY(_tag) @@ -442,6 +449,8 @@ typedef device_type_iterator<&device_creator, screen_device> scre screen_device::static_set_palette(*device, FINDER_DUMMY_TAG); #define MCFG_SCREEN_VIDEO_ATTRIBUTES(_flags) \ screen_device::static_set_video_attributes(*device, _flags); +#define MCFG_SCREEN_COLOR(_color) \ + screen_device::static_set_color(*device, _color); //************************************************************************** diff --git a/src/lib/util/palette.cpp b/src/lib/util/palette.cpp index bd3c2d45ede..8c61c64a470 100644 --- a/src/lib/util/palette.cpp +++ b/src/lib/util/palette.cpp @@ -15,9 +15,17 @@ #include +//************************************************************************** +// CONSTANTS +//************************************************************************** + const rgb_t rgb_t::black(0,0,0); const rgb_t rgb_t::white(255,255,255); +// the colors below are commonly used screen colors +const rgb_t rgb_t::green(0, 255, 0); +const rgb_t rgb_t::amber(247, 170, 0); + //************************************************************************** // INLINE FUNCTIONS diff --git a/src/lib/util/palette.h b/src/lib/util/palette.h index 9c6703119e1..2dfbac03a45 100644 --- a/src/lib/util/palette.h +++ b/src/lib/util/palette.h @@ -78,6 +78,8 @@ public: // constants static const rgb_t black; static const rgb_t white; + static const rgb_t green; + static const rgb_t amber; private: UINT32 m_data; diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp index 4df457ce129..b5d7bbe462f 100644 --- a/src/mame/drivers/8080bw.cpp +++ b/src/mame/drivers/8080bw.cpp @@ -789,7 +789,7 @@ MACHINE_CONFIG_START( spacecom, _8080bw_state ) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1) MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_spacecom) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_FRAGMENT_ADD(invaders_audio) @@ -2543,7 +2543,7 @@ MACHINE_CONFIG_START( shuttlei, _8080bw_state ) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 24*8-1) MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_shuttlei) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_FRAGMENT_ADD(invaders_samples_audio) diff --git a/src/mame/drivers/a51xx.cpp b/src/mame/drivers/a51xx.cpp index 2284450bde4..5d51870eaad 100644 --- a/src/mame/drivers/a51xx.cpp +++ b/src/mame/drivers/a51xx.cpp @@ -128,7 +128,7 @@ static MACHINE_CONFIG_START( a5120, a51xx_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", a51xx) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/drivers/a7150.cpp b/src/mame/drivers/a7150.cpp index 3559e6548b2..f6e4d8398fc 100644 --- a/src/mame/drivers/a7150.cpp +++ b/src/mame/drivers/a7150.cpp @@ -67,7 +67,7 @@ static MACHINE_CONFIG_START( a7150, a7150_state ) MCFG_SCREEN_UPDATE_DRIVER(a7150_state, screen_update_a7150) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/drivers/ac1.cpp b/src/mame/drivers/ac1.cpp index bf67bbfff9e..ba3f64c8836 100644 --- a/src/mame/drivers/ac1.cpp +++ b/src/mame/drivers/ac1.cpp @@ -145,7 +145,7 @@ static MACHINE_CONFIG_START( ac1, ac1_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", ac1 ) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") diff --git a/src/mame/drivers/ace.cpp b/src/mame/drivers/ace.cpp index 46b86ba5e09..ace8a5a1b07 100644 --- a/src/mame/drivers/ace.cpp +++ b/src/mame/drivers/ace.cpp @@ -331,7 +331,7 @@ static MACHINE_CONFIG_START( ace, aceal_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", ace) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ /* ???? */ diff --git a/src/mame/drivers/alesis.cpp b/src/mame/drivers/alesis.cpp index ceda2d749d8..132c60cc7bf 100644 --- a/src/mame/drivers/alesis.cpp +++ b/src/mame/drivers/alesis.cpp @@ -372,7 +372,7 @@ static MACHINE_CONFIG_START( hr16, alesis_state ) MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_PALETTE_INIT_OWNER(alesis_state, alesis) MCFG_CASSETTE_ADD( "cassette" ) diff --git a/src/mame/drivers/alto2.cpp b/src/mame/drivers/alto2.cpp index 7f1884639a5..a7007273401 100644 --- a/src/mame/drivers/alto2.cpp +++ b/src/mame/drivers/alto2.cpp @@ -270,7 +270,7 @@ static MACHINE_CONFIG_START( alto2, alto2_state ) MCFG_CPU_IO_MAP(alto2_iomem_map) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::white) MCFG_SCREEN_RAW_PARAMS(XTAL_20_16MHz, ALTO2_DISPLAY_TOTAL_WIDTH, 0, ALTO2_DISPLAY_WIDTH, ALTO2_DISPLAY_TOTAL_HEIGHT, 0, ALTO2_DISPLAY_HEIGHT + ALTO2_FAKE_STATUS_H) @@ -282,7 +282,7 @@ static MACHINE_CONFIG_START( alto2, alto2_state ) MCFG_DEFAULT_LAYOUT( layout_vertical ) - MCFG_PALETTE_ADD_WHITE_AND_BLACK("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DIABLO_DRIVES_ADD() MACHINE_CONFIG_END diff --git a/src/mame/drivers/amust.cpp b/src/mame/drivers/amust.cpp index 7f359feabcc..a827079b408 100644 --- a/src/mame/drivers/amust.cpp +++ b/src/mame/drivers/amust.cpp @@ -397,13 +397,13 @@ static MACHINE_CONFIG_START( amust, amust_state ) MCFG_MACHINE_RESET_OVERRIDE(amust_state, amust) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", amust) /* sound hardware */ diff --git a/src/mame/drivers/apple1.cpp b/src/mame/drivers/apple1.cpp index 51449676180..d2858672814 100644 --- a/src/mame/drivers/apple1.cpp +++ b/src/mame/drivers/apple1.cpp @@ -594,7 +594,7 @@ static MACHINE_CONFIG_START( apple1, apple1_state ) MCFG_SCREEN_UPDATE_DRIVER(apple1_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD( A1_PIA_TAG, PIA6821, 0) MCFG_PIA_READPA_HANDLER(READ8(apple1_state, pia_keyboard_r)) diff --git a/src/mame/drivers/apricot.cpp b/src/mame/drivers/apricot.cpp index 126cd1d6452..2f185f1c8ac 100644 --- a/src/mame/drivers/apricot.cpp +++ b/src/mame/drivers/apricot.cpp @@ -392,13 +392,13 @@ static MACHINE_CONFIG_START( apricot, apricot_state ) MCFG_RAM_DEFAULT_SIZE("256k") // video hardware - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_SIZE(800, 400) MCFG_SCREEN_VISIBLE_AREA(0, 800-1, 0, 400-1) MCFG_SCREEN_REFRESH_RATE(72) MCFG_SCREEN_UPDATE_DRIVER(apricot_state, screen_update_apricot) - MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") + MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette") MCFG_MC6845_ADD("ic30", HD6845, "screen", XTAL_15MHz / 10) MCFG_MC6845_SHOW_BORDER_AREA(false) diff --git a/src/mame/drivers/argo.cpp b/src/mame/drivers/argo.cpp index a9925128402..ccf0841218a 100644 --- a/src/mame/drivers/argo.cpp +++ b/src/mame/drivers/argo.cpp @@ -360,7 +360,7 @@ static MACHINE_CONFIG_START( argo, argo_state ) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/atarist.cpp b/src/mame/drivers/atarist.cpp index f06e1a98ed7..9a3fc88c5d3 100644 --- a/src/mame/drivers/atarist.cpp +++ b/src/mame/drivers/atarist.cpp @@ -2383,7 +2383,7 @@ static MACHINE_CONFIG_START( stbook, stbook_state ) MCFG_SCREEN_SIZE(640, 400) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 399) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/attache.cpp b/src/mame/drivers/attache.cpp index 0c6a1c9d3b5..69bcb219ee6 100644 --- a/src/mame/drivers/attache.cpp +++ b/src/mame/drivers/attache.cpp @@ -931,7 +931,7 @@ static MACHINE_CONFIG_START( attache, attache_state ) MCFG_QUANTUM_TIME(attotime::from_hz(60)) - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(64)) /* not accurate */ MCFG_SCREEN_SIZE(640,240) @@ -939,7 +939,7 @@ static MACHINE_CONFIG_START( attache, attache_state ) MCFG_SCREEN_UPDATE_DRIVER(attache_state, screen_update) MCFG_SCREEN_VBLANK_DRIVER(attache_state, vblank_int) - MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") + MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette") MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("psg", AY8912, XTAL_8MHz / 4) diff --git a/src/mame/drivers/aussiebyte.cpp b/src/mame/drivers/aussiebyte.cpp index 5cf1b650dea..eb790c0ae00 100644 --- a/src/mame/drivers/aussiebyte.cpp +++ b/src/mame/drivers/aussiebyte.cpp @@ -458,7 +458,7 @@ static MACHINE_CONFIG_START( aussiebyte, aussiebyte_state ) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", sy6545_1_device, screen_update) MCFG_GFXDECODE_ADD("gfxdecode", "palette", crt8002) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/ax20.cpp b/src/mame/drivers/ax20.cpp index f51f0dc925c..8d5ca0fae06 100644 --- a/src/mame/drivers/ax20.cpp +++ b/src/mame/drivers/ax20.cpp @@ -128,6 +128,7 @@ static MACHINE_CONFIG_START( ax20, ax20_state ) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_COLOR(rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DRIVER(ax20_state, screen_update) @@ -135,7 +136,7 @@ static MACHINE_CONFIG_START( ax20, ax20_state ) MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*12-1) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", ax20) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_I8272A_ADD("fdc", true) diff --git a/src/mame/drivers/bcs3.cpp b/src/mame/drivers/bcs3.cpp index cd885352dba..eab460c0cc3 100644 --- a/src/mame/drivers/bcs3.cpp +++ b/src/mame/drivers/bcs3.cpp @@ -389,7 +389,7 @@ static MACHINE_CONFIG_START( bcs3, bcs3_state ) MCFG_SCREEN_UPDATE_DRIVER(bcs3_state, screen_update_bcs3) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", bcs3) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD("ctc", Z80CTC, XTAL_5MHz / 2) MCFG_Z80CTC_INTR_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) @@ -416,7 +416,7 @@ static MACHINE_CONFIG_START( bcs3a, bcs3_state ) MCFG_SCREEN_UPDATE_DRIVER(bcs3_state, screen_update_bcs3a) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", bcs3) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD("ctc", Z80CTC, XTAL_7MHz / 2) MCFG_Z80CTC_INTR_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) diff --git a/src/mame/drivers/beehive.cpp b/src/mame/drivers/beehive.cpp index e152a41cc54..6881abbf0bd 100644 --- a/src/mame/drivers/beehive.cpp +++ b/src/mame/drivers/beehive.cpp @@ -293,7 +293,7 @@ static MACHINE_CONFIG_START( beehive, beehive_state ) MCFG_CPU_IO_MAP(beehive_io) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DRIVER(beehive_state, screen_update) @@ -301,7 +301,7 @@ static MACHINE_CONFIG_START( beehive, beehive_state ) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/bigbord2.cpp b/src/mame/drivers/bigbord2.cpp index 013e53c92e5..7b00129e939 100644 --- a/src/mame/drivers/bigbord2.cpp +++ b/src/mame/drivers/bigbord2.cpp @@ -552,7 +552,7 @@ static MACHINE_CONFIG_START( bigbord2, bigbord2_state ) MCFG_SCREEN_RAW_PARAMS(XTAL_10_69425MHz, 700, 0, 560, 260, 0, 240) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_GFXDECODE_ADD("gfxdecode", "palette", bigbord2) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* keyboard */ MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc", bigbord2_state, ctc_tick, attotime::from_hz(MAIN_CLOCK)) diff --git a/src/mame/drivers/binbug.cpp b/src/mame/drivers/binbug.cpp index ba135c2b0ed..fa05ab12f59 100644 --- a/src/mame/drivers/binbug.cpp +++ b/src/mame/drivers/binbug.cpp @@ -297,7 +297,7 @@ static MACHINE_CONFIG_START( binbug, binbug_state ) MCFG_S2650_FLAG_HANDLER(WRITELINE(binbug_state, binbug_serial_w)) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::amber) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DRIVER(binbug_state, screen_update) @@ -306,7 +306,7 @@ static MACHINE_CONFIG_START( binbug, binbug_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", dg640) - MCFG_PALETTE_ADD_MONOCHROME_AMBER("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* Keyboard */ MCFG_RS232_PORT_ADD(KEYBOARD_TAG, default_rs232_devices, "keyboard") @@ -534,7 +534,7 @@ static MACHINE_CONFIG_START( dg680, dg680_state ) MCFG_CPU_CONFIG(dg680_daisy_chain) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::amber) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DRIVER(binbug_state, screen_update) @@ -543,7 +543,7 @@ static MACHINE_CONFIG_START( dg680, dg680_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", dg640) - MCFG_PALETTE_ADD_MONOCHROME_AMBER("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* Keyboard */ MCFG_DEVICE_ADD("keyb", GENERIC_KEYBOARD, 0) diff --git a/src/mame/drivers/bitgraph.cpp b/src/mame/drivers/bitgraph.cpp index 511f4fb2a1b..7a8e3231683 100644 --- a/src/mame/drivers/bitgraph.cpp +++ b/src/mame/drivers/bitgraph.cpp @@ -466,7 +466,7 @@ static MACHINE_CONFIG_FRAGMENT( bg_motherboard ) MCFG_SCREEN_UPDATE_DRIVER(bitgraph_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD(ACIA0_TAG, ACIA6850, 0) MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE(RS232_H_TAG, rs232_port_device, write_txd)) diff --git a/src/mame/drivers/bk.cpp b/src/mame/drivers/bk.cpp index 6248aceff65..adb25ef5bc2 100644 --- a/src/mame/drivers/bk.cpp +++ b/src/mame/drivers/bk.cpp @@ -174,7 +174,7 @@ static MACHINE_CONFIG_START( bk0010, bk_state ) MCFG_SCREEN_UPDATE_DRIVER(bk_state, screen_update_bk0010) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/blockade.cpp b/src/mame/drivers/blockade.cpp index 406444ec463..cba736f6139 100644 --- a/src/mame/drivers/blockade.cpp +++ b/src/mame/drivers/blockade.cpp @@ -477,7 +477,7 @@ static MACHINE_CONFIG_START( blockade, blockade_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", blockade) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ diff --git a/src/mame/drivers/bw12.cpp b/src/mame/drivers/bw12.cpp index e0b9a4584de..8942f44fe1d 100644 --- a/src/mame/drivers/bw12.cpp +++ b/src/mame/drivers/bw12.cpp @@ -544,7 +544,7 @@ static MACHINE_CONFIG_START( common, bw12_state ) MCFG_CPU_IO_MAP(bw12_io) /* video hardware */ - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::amber) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update) @@ -552,7 +552,7 @@ static MACHINE_CONFIG_START( common, bw12_state ) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 200-1) MCFG_GFXDECODE_ADD("gfxdecode", "palette", bw12) - MCFG_PALETTE_ADD_MONOCHROME_AMBER("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_16MHz/8) MCFG_MC6845_SHOW_BORDER_AREA(true) diff --git a/src/mame/drivers/c10.cpp b/src/mame/drivers/c10.cpp index a2333d810b7..b3826e30986 100644 --- a/src/mame/drivers/c10.cpp +++ b/src/mame/drivers/c10.cpp @@ -167,7 +167,7 @@ static MACHINE_CONFIG_START( c10, c10_state ) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", c10) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END DRIVER_INIT_MEMBER(c10_state,c10) diff --git a/src/mame/drivers/c900.cpp b/src/mame/drivers/c900.cpp index 18e5238c3eb..aa6f50ec20c 100644 --- a/src/mame/drivers/c900.cpp +++ b/src/mame/drivers/c900.cpp @@ -116,7 +116,7 @@ static MACHINE_CONFIG_START( c900, c900_state ) MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0) MCFG_GENERIC_TERMINAL_KEYBOARD_CB(WRITE8(c900_state, kbd_put)) MCFG_GFXDECODE_ADD("gfxdecode", "palette", c900) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END ROM_START( c900 ) diff --git a/src/mame/drivers/cat.cpp b/src/mame/drivers/cat.cpp index fd892b3b877..f85db656ba5 100644 --- a/src/mame/drivers/cat.cpp +++ b/src/mame/drivers/cat.cpp @@ -1050,7 +1050,7 @@ static MACHINE_CONFIG_START( cat, cat_state ) MCFG_SCREEN_UPDATE_DRIVER(cat_state, screen_update_cat) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_VIDEO_START_OVERRIDE(cat_state,cat) diff --git a/src/mame/drivers/cbm2.cpp b/src/mame/drivers/cbm2.cpp index 4fe040e64f2..df8460f71d3 100644 --- a/src/mame/drivers/cbm2.cpp +++ b/src/mame/drivers/cbm2.cpp @@ -2230,7 +2230,7 @@ static MACHINE_CONFIG_START( cbm2lp_ntsc, cbm2_state ) MCFG_QUANTUM_PERFECT_CPU(M6509_TAG) // video hardware - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DEVICE(MC68B45_TAG, mc6845_device, screen_update) MCFG_SCREEN_REFRESH_RATE(60) @@ -2238,7 +2238,7 @@ static MACHINE_CONFIG_START( cbm2lp_ntsc, cbm2_state ) MCFG_SCREEN_SIZE(768, 312) MCFG_SCREEN_VISIBLE_AREA(0, 768-1, 0, 312-1) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD(MC68B45_TAG, MC6845, SCREEN_TAG, XTAL_18MHz/9) MCFG_MC6845_SHOW_BORDER_AREA(true) diff --git a/src/mame/drivers/cd2650.cpp b/src/mame/drivers/cd2650.cpp index 03cde2f4d6c..ac844445d72 100644 --- a/src/mame/drivers/cd2650.cpp +++ b/src/mame/drivers/cd2650.cpp @@ -277,7 +277,7 @@ static MACHINE_CONFIG_START( cd2650, cd2650_state ) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 159) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", cd2650) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* quickload */ MCFG_QUICKLOAD_ADD("quickload", cd2650_state, cd2650, "pgm", 1) diff --git a/src/mame/drivers/circus.cpp b/src/mame/drivers/circus.cpp index eb51605922b..518fb0488e0 100644 --- a/src/mame/drivers/circus.cpp +++ b/src/mame/drivers/circus.cpp @@ -299,7 +299,7 @@ static MACHINE_CONFIG_START( circus, circus_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", circus) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -334,7 +334,7 @@ static MACHINE_CONFIG_START( robotbwl, circus_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", robotbwl) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -376,7 +376,7 @@ static MACHINE_CONFIG_START( crash, circus_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", circus) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -410,7 +410,7 @@ static MACHINE_CONFIG_START( ripcord, circus_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", circus) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/compis.cpp b/src/mame/drivers/compis.cpp index 7432eba2781..063aae353ad 100644 --- a/src/mame/drivers/compis.cpp +++ b/src/mame/drivers/compis.cpp @@ -636,7 +636,7 @@ static MACHINE_CONFIG_START( compis, compis_state ) MCFG_80186_TMROUT1_HANDLER(DEVWRITELINE(DEVICE_SELF, compis_state, tmr1_w)) // video hardware - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate @@ -649,7 +649,7 @@ static MACHINE_CONFIG_START( compis, compis_state ) MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(compis_state, hgdc_display_pixels) MCFG_VIDEO_SET_SCREEN(SCREEN_TAG) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // devices MCFG_DEVICE_ADD(I80130_TAG, I80130, XTAL_16MHz/2) diff --git a/src/mame/drivers/comquest.cpp b/src/mame/drivers/comquest.cpp index 5329f09e1d4..a4000192f2e 100644 --- a/src/mame/drivers/comquest.cpp +++ b/src/mame/drivers/comquest.cpp @@ -257,7 +257,7 @@ static MACHINE_CONFIG_START( comquest, comquest_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", comquest ) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ diff --git a/src/mame/drivers/concept.cpp b/src/mame/drivers/concept.cpp index 5d10bf4e2f9..4d8bc11819b 100644 --- a/src/mame/drivers/concept.cpp +++ b/src/mame/drivers/concept.cpp @@ -221,7 +221,7 @@ static MACHINE_CONFIG_START( concept, concept_state ) MCFG_SCREEN_UPDATE_DRIVER(concept_state, screen_update_concept) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/copsnrob.cpp b/src/mame/drivers/copsnrob.cpp index c53c4e8ecec..92177ecaea6 100644 --- a/src/mame/drivers/copsnrob.cpp +++ b/src/mame/drivers/copsnrob.cpp @@ -260,7 +260,7 @@ static MACHINE_CONFIG_START( copsnrob, copsnrob_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", copsnrob) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") diff --git a/src/mame/drivers/cxhumax.cpp b/src/mame/drivers/cxhumax.cpp index d1ed5d1b5e0..fa2a956b2fe 100644 --- a/src/mame/drivers/cxhumax.cpp +++ b/src/mame/drivers/cxhumax.cpp @@ -1067,7 +1067,7 @@ static MACHINE_CONFIG_START( cxhumax, cxhumax_state ) MCFG_SCREEN_VISIBLE_AREA(0, 1920-1, 0, 1080-1) MCFG_SCREEN_UPDATE_DRIVER(cxhumax_state, screen_update_cxhumax) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0) MACHINE_CONFIG_END diff --git a/src/mame/drivers/d6800.cpp b/src/mame/drivers/d6800.cpp index 03e9c0f94ce..af68192003d 100644 --- a/src/mame/drivers/d6800.cpp +++ b/src/mame/drivers/d6800.cpp @@ -391,7 +391,7 @@ static MACHINE_CONFIG_START( d6800, d6800_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(25)) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/dct11em.cpp b/src/mame/drivers/dct11em.cpp index 6140955e06a..a97bb28978b 100644 --- a/src/mame/drivers/dct11em.cpp +++ b/src/mame/drivers/dct11em.cpp @@ -65,7 +65,7 @@ static MACHINE_CONFIG_START( dct11em, dct11em_state ) MCFG_SCREEN_UPDATE_DRIVER(dct11em_state, screen_update_dct11em) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/dim68k.cpp b/src/mame/drivers/dim68k.cpp index 57ca5cba7d1..614bfd0e2a1 100644 --- a/src/mame/drivers/dim68k.cpp +++ b/src/mame/drivers/dim68k.cpp @@ -315,7 +315,7 @@ static MACHINE_CONFIG_START( dim68k, dim68k_state ) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 250-1) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", dim68k) /* sound hardware */ diff --git a/src/mame/drivers/dms5000.cpp b/src/mame/drivers/dms5000.cpp index 953f9aebe74..49ed1049d85 100644 --- a/src/mame/drivers/dms5000.cpp +++ b/src/mame/drivers/dms5000.cpp @@ -70,7 +70,7 @@ static MACHINE_CONFIG_START( dms5000, dms5000_state ) MCFG_SCREEN_UPDATE_DRIVER(dms5000_state, screen_update_dms5000) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/dmv.cpp b/src/mame/drivers/dmv.cpp index 8940c1263fa..6683abc3ab2 100644 --- a/src/mame/drivers/dmv.cpp +++ b/src/mame/drivers/dmv.cpp @@ -727,7 +727,7 @@ static MACHINE_CONFIG_START( dmv, dmv_state ) MCFG_DMV_KEYBOARD_ADD("keyboard") /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DEVICE("upd7220", upd7220_device, screen_update) @@ -735,7 +735,7 @@ static MACHINE_CONFIG_START( dmv, dmv_state ) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1) MCFG_GFXDECODE_ADD("gfxdecode", "palette", dmv) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEFAULT_LAYOUT(layout_dmv) // devices diff --git a/src/mame/drivers/dvk_ksm.cpp b/src/mame/drivers/dvk_ksm.cpp index a136035ca0f..9d1273c70ff 100644 --- a/src/mame/drivers/dvk_ksm.cpp +++ b/src/mame/drivers/dvk_ksm.cpp @@ -338,7 +338,7 @@ static MACHINE_CONFIG_START( ksm, ksm_state ) MCFG_TIMER_DRIVER_ADD_PERIODIC("scantimer", ksm_state, scanline_callback, attotime::from_hz(50*28*11)) MCFG_TIMER_START_DELAY(attotime::from_hz(XTAL_15_4MHz/KSM_HORZ_START)) - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DRIVER(ksm_state, screen_update) MCFG_SCREEN_RAW_PARAMS(XTAL_15_4MHz, KSM_TOTAL_HORZ, KSM_HORZ_START, KSM_HORZ_START+KSM_DISP_HORZ, KSM_TOTAL_VERT, KSM_VERT_START, @@ -347,7 +347,7 @@ static MACHINE_CONFIG_START( ksm, ksm_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", ksm) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_PIC8259_ADD( "pic8259", INPUTLINE("maincpu", 0), VCC, NULL ) diff --git a/src/mame/drivers/ec65.cpp b/src/mame/drivers/ec65.cpp index 8d458b174b7..f54762a053f 100644 --- a/src/mame/drivers/ec65.cpp +++ b/src/mame/drivers/ec65.cpp @@ -182,7 +182,7 @@ static MACHINE_CONFIG_START( ec65, ec65_state ) MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update) MCFG_GFXDECODE_ADD("gfxdecode", "palette", ec65) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD(MC6845_TAG, MC6845, "screen", XTAL_16MHz / 8) MCFG_MC6845_SHOW_BORDER_AREA(false) @@ -220,7 +220,7 @@ static MACHINE_CONFIG_START( ec65k, ec65k_state ) MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update) MCFG_GFXDECODE_ADD("gfxdecode", "palette", ec65) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD(MC6845_TAG, MC6845, "screen", XTAL_16MHz / 8) MCFG_MC6845_SHOW_BORDER_AREA(false) diff --git a/src/mame/drivers/fastinvaders.cpp b/src/mame/drivers/fastinvaders.cpp index fad9c9eaf95..1dad27b04d5 100644 --- a/src/mame/drivers/fastinvaders.cpp +++ b/src/mame/drivers/fastinvaders.cpp @@ -661,7 +661,7 @@ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", fastinvaders_state, scanline_timer, MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", fastinvaders) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ // TODO diff --git a/src/mame/drivers/fc100.cpp b/src/mame/drivers/fc100.cpp index 7b32ffc4a18..efe540eae31 100644 --- a/src/mame/drivers/fc100.cpp +++ b/src/mame/drivers/fc100.cpp @@ -523,8 +523,9 @@ static MACHINE_CONFIG_START( fc100, fc100_state ) // other lines not connected MCFG_SCREEN_MC6847_NTSC_ADD("screen", "vdg") + MCFG_SCREEN_COLOR(rgb_t::amber) MCFG_GFXDECODE_ADD("gfxdecode", "f4palette", fc100) - MCFG_PALETTE_ADD_MONOCHROME_AMBER("f4palette") + MCFG_PALETTE_ADD_MONOCHROME("f4palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/fk1.cpp b/src/mame/drivers/fk1.cpp index e250aada256..d3d32f1dc5e 100644 --- a/src/mame/drivers/fk1.cpp +++ b/src/mame/drivers/fk1.cpp @@ -411,7 +411,7 @@ static MACHINE_CONFIG_START( fk1, fk1_state ) MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(fk1_state,fk1_irq_callback) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DRIVER(fk1_state, screen_update) @@ -419,7 +419,7 @@ static MACHINE_CONFIG_START( fk1, fk1_state ) MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD("pit8253", PIT8253, 0) MCFG_PIT8253_CLK0(50) diff --git a/src/mame/drivers/galaxy.cpp b/src/mame/drivers/galaxy.cpp index 7104b6f3bf9..8a6a884ea8d 100644 --- a/src/mame/drivers/galaxy.cpp +++ b/src/mame/drivers/galaxy.cpp @@ -187,7 +187,7 @@ static MACHINE_CONFIG_START( galaxy, galaxy_state ) MCFG_SCREEN_UPDATE_DRIVER(galaxy_state, screen_update_galaxy) MCFG_GFXDECODE_ADD("gfxdecode", "palette", galaxy) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* snapshot */ @@ -229,7 +229,7 @@ static MACHINE_CONFIG_START( galaxyp, galaxy_state ) MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 208-1) MCFG_SCREEN_UPDATE_DRIVER(galaxy_state, screen_update_galaxy) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* snapshot */ diff --git a/src/mame/drivers/galeb.cpp b/src/mame/drivers/galeb.cpp index 64d24d912e0..d595a603966 100644 --- a/src/mame/drivers/galeb.cpp +++ b/src/mame/drivers/galeb.cpp @@ -143,7 +143,7 @@ static MACHINE_CONFIG_START( galeb, galeb_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", galeb ) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* audio hardware */ diff --git a/src/mame/drivers/galgame.cpp b/src/mame/drivers/galgame.cpp index 0855699da39..07c9b348eec 100644 --- a/src/mame/drivers/galgame.cpp +++ b/src/mame/drivers/galgame.cpp @@ -334,7 +334,7 @@ static MACHINE_CONFIG_START( galaxygame, galaxygame_state ) MCFG_SCREEN_UPDATE_DRIVER(galaxygame_state, screen_update_galaxygame) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/drivers/gamepock.cpp b/src/mame/drivers/gamepock.cpp index 89c06dd40dd..1dc26145819 100644 --- a/src/mame/drivers/gamepock.cpp +++ b/src/mame/drivers/gamepock.cpp @@ -59,7 +59,7 @@ static MACHINE_CONFIG_START( gamepock, gamepock_state ) MCFG_DEFAULT_LAYOUT(layout_lcd) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/grfd2301.cpp b/src/mame/drivers/grfd2301.cpp index cc9c16a74b2..cdbac8b8394 100644 --- a/src/mame/drivers/grfd2301.cpp +++ b/src/mame/drivers/grfd2301.cpp @@ -124,7 +124,7 @@ static MACHINE_CONFIG_START( grfd2301, grfd2301_state ) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 239) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END ROM_START( grfd2301 ) diff --git a/src/mame/drivers/h19.cpp b/src/mame/drivers/h19.cpp index 75e725ce7df..e479dfd7e08 100644 --- a/src/mame/drivers/h19.cpp +++ b/src/mame/drivers/h19.cpp @@ -394,14 +394,14 @@ static MACHINE_CONFIG_START( h19, h19_state ) //MCFG_DEVICE_PERIODIC_INT_DRIVER(h19_state, irq0_line_hold, 50) // for testing, causes a keyboard scan /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_SCREEN_SIZE(640, 200) MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 200 - 1) MCFG_GFXDECODE_ADD("gfxdecode", "palette", h19) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_12_288MHz / 8) // clk taken from schematics MCFG_MC6845_SHOW_BORDER_AREA(false) diff --git a/src/mame/drivers/headonb.cpp b/src/mame/drivers/headonb.cpp index 5eddfa20c66..58873339e8e 100644 --- a/src/mame/drivers/headonb.cpp +++ b/src/mame/drivers/headonb.cpp @@ -174,7 +174,7 @@ static MACHINE_CONFIG_START( headonb, headonb_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", headonb) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ // TODO diff --git a/src/mame/drivers/hitme.cpp b/src/mame/drivers/hitme.cpp index 7f285a41cc5..b0f27566303 100644 --- a/src/mame/drivers/hitme.cpp +++ b/src/mame/drivers/hitme.cpp @@ -328,7 +328,7 @@ static MACHINE_CONFIG_START( hitme, hitme_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", hitme) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/homelab.cpp b/src/mame/drivers/homelab.cpp index 0d6fc6735f1..7c1ab0eb2cc 100644 --- a/src/mame/drivers/homelab.cpp +++ b/src/mame/drivers/homelab.cpp @@ -737,7 +737,7 @@ static MACHINE_CONFIG_START( homelab, homelab_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", homelab_state, homelab_frame) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) MCFG_SCREEN_SIZE(40*8, 25*8) @@ -747,7 +747,7 @@ static MACHINE_CONFIG_START( homelab, homelab_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", homelab) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -768,7 +768,7 @@ static MACHINE_CONFIG_START( homelab3, homelab_state ) MCFG_MACHINE_RESET_OVERRIDE(homelab_state,homelab3) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) MCFG_SCREEN_SIZE(64*8, 32*8) @@ -778,7 +778,7 @@ static MACHINE_CONFIG_START( homelab3, homelab_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", homelab) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -799,7 +799,7 @@ static MACHINE_CONFIG_START( brailab4, homelab_state ) MCFG_MACHINE_RESET_OVERRIDE(homelab_state,brailab4) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) MCFG_SCREEN_SIZE(64*8, 32*8) @@ -809,7 +809,7 @@ static MACHINE_CONFIG_START( brailab4, homelab_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", homelab) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/homez80.cpp b/src/mame/drivers/homez80.cpp index ccddfcddccd..ea517b55d81 100644 --- a/src/mame/drivers/homez80.cpp +++ b/src/mame/drivers/homez80.cpp @@ -296,7 +296,7 @@ static MACHINE_CONFIG_START( homez80, homez80_state ) MCFG_SCREEN_VISIBLE_AREA(0, 344-1, 0, 32*8-1) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", homez80 ) MACHINE_CONFIG_END diff --git a/src/mame/drivers/hp64k.cpp b/src/mame/drivers/hp64k.cpp index 02f6fd696a1..d23e5525066 100644 --- a/src/mame/drivers/hp64k.cpp +++ b/src/mame/drivers/hp64k.cpp @@ -1350,11 +1350,11 @@ static MACHINE_CONFIG_START(hp64k , hp64k_state) MCFG_I8275_DRQ_CALLBACK(WRITELINE(hp64k_state , hp64k_crtc_drq_w)) MCFG_I8275_VRTC_CALLBACK(WRITELINE(hp64k_state , hp64k_crtc_vrtc_w)) - MCFG_SCREEN_ADD("screen" , RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DEVICE("crtc" , i8275_device , screen_update) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_SIZE(720 , 390) - MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") + MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette") MCFG_FD1791_ADD("fdc" , XTAL_4MHz / 4) MCFG_WD_FDC_FORCE_READY diff --git a/src/mame/drivers/hp9845.cpp b/src/mame/drivers/hp9845.cpp index a8fb77fa17c..1387432ea85 100644 --- a/src/mame/drivers/hp9845.cpp +++ b/src/mame/drivers/hp9845.cpp @@ -695,11 +695,11 @@ static MACHINE_CONFIG_START( hp9845b, hp9845b_state ) MCFG_HPHYBRID_PA_CHANGED(WRITE8(hp9845b_state , pa_w)) // video hardware - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DRIVER(hp9845b_state, screen_update) MCFG_SCREEN_RAW_PARAMS(20849400 , 99 * 9 , 0 , 80 * 9 , 26 * 15 , 0 , 25 * 15) MCFG_SCREEN_VBLANK_DRIVER(hp9845b_state, vblank_w) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", hp9845b_state, scanline_timer, "screen", 0, 1) diff --git a/src/mame/drivers/hp9k.cpp b/src/mame/drivers/hp9k.cpp index 9fa6ae09513..13972ae06b5 100644 --- a/src/mame/drivers/hp9k.cpp +++ b/src/mame/drivers/hp9k.cpp @@ -407,7 +407,7 @@ static MACHINE_CONFIG_START( hp9k, hp9k_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", hp9k) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD("mc6845", MC6845, "screen", XTAL_16MHz / 16) MCFG_MC6845_SHOW_BORDER_AREA(false) diff --git a/src/mame/drivers/huebler.cpp b/src/mame/drivers/huebler.cpp index b3a3be497ce..1d5dda7ff73 100644 --- a/src/mame/drivers/huebler.cpp +++ b/src/mame/drivers/huebler.cpp @@ -340,7 +340,7 @@ static MACHINE_CONFIG_START( amu880, amu880_state ) MCFG_SCREEN_RAW_PARAMS(9000000, 576, 0*6, 64*6, 320, 0*10, 24*10) MCFG_GFXDECODE_ADD("gfxdecode", "palette", amu880) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* devices */ MCFG_DEVICE_ADD(Z80CTC_TAG, Z80CTC, XTAL_10MHz/4) diff --git a/src/mame/drivers/ie15.cpp b/src/mame/drivers/ie15.cpp index 9d2b6b708be..28c0304a1c4 100644 --- a/src/mame/drivers/ie15.cpp +++ b/src/mame/drivers/ie15.cpp @@ -615,7 +615,7 @@ static MACHINE_CONFIG_START( ie15, ie15_state ) MCFG_TIMER_START_DELAY(attotime::from_hz(XTAL_30_8MHz/(2*IE15_HORZ_START))) /* Video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DRIVER(ie15_state, screen_update) MCFG_SCREEN_RAW_PARAMS(XTAL_30_8MHz/2, IE15_TOTAL_HORZ, IE15_HORZ_START, IE15_HORZ_START+IE15_DISP_HORZ, IE15_TOTAL_VERT, IE15_VERT_START, @@ -624,7 +624,7 @@ static MACHINE_CONFIG_START( ie15, ie15_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", ie15) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEFAULT_LAYOUT(layout_ie15) diff --git a/src/mame/drivers/imds2.cpp b/src/mame/drivers/imds2.cpp index 49667a8ebd6..40dc9bb8818 100644 --- a/src/mame/drivers/imds2.cpp +++ b/src/mame/drivers/imds2.cpp @@ -840,7 +840,7 @@ static MACHINE_CONFIG_START(imds2 , imds2_state) MCFG_SCREEN_UPDATE_DEVICE("ioccrtc" , i8275_device , screen_update) MCFG_SCREEN_REFRESH_RATE(50) MCFG_GFXDECODE_ADD("gfxdecode" , "palette" , imds2) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("iocbeep" , BEEP , IOC_BEEP_FREQ) diff --git a/src/mame/drivers/ipds.cpp b/src/mame/drivers/ipds.cpp index 00df139e72e..7dfb1398b31 100644 --- a/src/mame/drivers/ipds.cpp +++ b/src/mame/drivers/ipds.cpp @@ -133,14 +133,14 @@ static MACHINE_CONFIG_START( ipds, ipds_state ) MCFG_CPU_IO_MAP(ipds_io) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DEVICE("i8275", i8275_device, screen_update) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) MCFG_GFXDECODE_ADD("gfxdecode", "palette", ipds) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD("i8275", I8275, XTAL_19_6608MHz / 4) MCFG_I8275_CHARACTER_WIDTH(6) diff --git a/src/mame/drivers/iq151.cpp b/src/mame/drivers/iq151.cpp index 76986eae7f9..aa305ba859d 100644 --- a/src/mame/drivers/iq151.cpp +++ b/src/mame/drivers/iq151.cpp @@ -385,7 +385,7 @@ static MACHINE_CONFIG_START( iq151, iq151_state ) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DRIVER(iq151_state, screen_update) @@ -393,7 +393,7 @@ static MACHINE_CONFIG_START( iq151, iq151_state ) MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 0, 32*8-1) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/irisha.cpp b/src/mame/drivers/irisha.cpp index bdb0a39dd36..5361fcb37af 100644 --- a/src/mame/drivers/irisha.cpp +++ b/src/mame/drivers/irisha.cpp @@ -400,7 +400,7 @@ static MACHINE_CONFIG_START( irisha, irisha_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", irisha) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/itt3030.cpp b/src/mame/drivers/itt3030.cpp index 9e2808396ee..1c7ed3aab7b 100644 --- a/src/mame/drivers/itt3030.cpp +++ b/src/mame/drivers/itt3030.cpp @@ -787,7 +787,7 @@ static MACHINE_CONFIG_START( itt3030, itt3030_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", itt3030) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* internal ram */ MCFG_RAM_ADD("mainram") diff --git a/src/mame/drivers/jonos.cpp b/src/mame/drivers/jonos.cpp index 657d2dca18b..8e9458f6e93 100644 --- a/src/mame/drivers/jonos.cpp +++ b/src/mame/drivers/jonos.cpp @@ -133,7 +133,7 @@ static MACHINE_CONFIG_START( jonos, jonos_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", jonos) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END DRIVER_INIT_MEMBER(jonos_state,jonos) diff --git a/src/mame/drivers/jr100.cpp b/src/mame/drivers/jr100.cpp index 4cd7cac2c4c..a8934dace89 100644 --- a/src/mame/drivers/jr100.cpp +++ b/src/mame/drivers/jr100.cpp @@ -378,7 +378,7 @@ static MACHINE_CONFIG_START( jr100, jr100_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", jr100) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD("via", VIA6522, XTAL_14_31818MHz / 16) MCFG_VIA6522_READPB_HANDLER(READ8(jr100_state,jr100_via_read_b)) diff --git a/src/mame/drivers/jtc.cpp b/src/mame/drivers/jtc.cpp index 07114be0ac1..bcfd6864a5b 100644 --- a/src/mame/drivers/jtc.cpp +++ b/src/mame/drivers/jtc.cpp @@ -751,7 +751,7 @@ static MACHINE_CONFIG_DERIVED( jtc, basic ) MCFG_SCREEN_VISIBLE_AREA(0, 64-1, 0, 64-1) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* internal ram */ MCFG_RAM_ADD(RAM_TAG) @@ -783,7 +783,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( jtces23, basic, jtces23_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", jtces23) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mame/drivers/jupace.cpp b/src/mame/drivers/jupace.cpp index 86ba95a41c6..802b0c68530 100644 --- a/src/mame/drivers/jupace.cpp +++ b/src/mame/drivers/jupace.cpp @@ -756,7 +756,7 @@ static MACHINE_CONFIG_START( ace, ace_state ) MCFG_TIMER_DRIVER_ADD_SCANLINE("set_irq", ace_state, set_irq, SCREEN_TAG, 31*8, 264) MCFG_TIMER_DRIVER_ADD_SCANLINE("clear_irq", ace_state, clear_irq, SCREEN_TAG, 32*8, 264) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", ace) diff --git a/src/mame/drivers/jupiter.cpp b/src/mame/drivers/jupiter.cpp index e7e545ebd74..a9eb865b7d1 100644 --- a/src/mame/drivers/jupiter.cpp +++ b/src/mame/drivers/jupiter.cpp @@ -256,7 +256,7 @@ static MACHINE_CONFIG_START( jupiter3, jupiter3_state ) MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 320-1) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // devices MCFG_DEVICE_ADD(INS1771N1_TAG, FD1771, 1000000) diff --git a/src/mame/drivers/k8915.cpp b/src/mame/drivers/k8915.cpp index 568851f15e0..a4d9f0e1dd4 100644 --- a/src/mame/drivers/k8915.cpp +++ b/src/mame/drivers/k8915.cpp @@ -156,7 +156,7 @@ static MACHINE_CONFIG_START( k8915, k8915_state ) MCFG_CPU_IO_MAP(k8915_io) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DRIVER(k8915_state, screen_update) @@ -164,7 +164,7 @@ static MACHINE_CONFIG_START( k8915, k8915_state ) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0) MCFG_GENERIC_KEYBOARD_CB(WRITE8(k8915_state, kbd_put)) diff --git a/src/mame/drivers/kaypro.cpp b/src/mame/drivers/kaypro.cpp index 56c99399790..f8d78018e85 100644 --- a/src/mame/drivers/kaypro.cpp +++ b/src/mame/drivers/kaypro.cpp @@ -202,7 +202,7 @@ static MACHINE_CONFIG_START( kayproii, kaypro_state ) MCFG_MACHINE_RESET_OVERRIDE(kaypro_state, kaypro ) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(80*7, 24*10) @@ -212,7 +212,7 @@ static MACHINE_CONFIG_START( kayproii, kaypro_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", kayproii) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/konin.cpp b/src/mame/drivers/konin.cpp index ac7c8a0d69c..09a732f4269 100644 --- a/src/mame/drivers/konin.cpp +++ b/src/mame/drivers/konin.cpp @@ -91,7 +91,7 @@ static MACHINE_CONFIG_START( konin, konin_state ) MCFG_SCREEN_UPDATE_DRIVER(konin_state, screen_update_konin) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/kramermc.cpp b/src/mame/drivers/kramermc.cpp index db139591a34..b6b43e9f2d3 100644 --- a/src/mame/drivers/kramermc.cpp +++ b/src/mame/drivers/kramermc.cpp @@ -128,7 +128,7 @@ static MACHINE_CONFIG_START( kramermc, kramermc_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", kramermc ) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/drivers/lisa.cpp b/src/mame/drivers/lisa.cpp index e7e06b5cb12..34e9b8bbe1f 100644 --- a/src/mame/drivers/lisa.cpp +++ b/src/mame/drivers/lisa.cpp @@ -121,7 +121,7 @@ static MACHINE_CONFIG_START( lisa, lisa_state ) MCFG_SCREEN_UPDATE_DRIVER(lisa_state, screen_update_lisa) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ diff --git a/src/mame/drivers/llc.cpp b/src/mame/drivers/llc.cpp index 693e21e2478..183496a535c 100644 --- a/src/mame/drivers/llc.cpp +++ b/src/mame/drivers/llc.cpp @@ -214,7 +214,7 @@ static MACHINE_CONFIG_START( llc1, llc_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", llc1) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEFAULT_LAYOUT(layout_llc1) MCFG_DEVICE_ADD("z80pio1", Z80PIO, XTAL_3MHz) @@ -257,7 +257,7 @@ static MACHINE_CONFIG_START( llc2, llc_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", llc2) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/m20.cpp b/src/mame/drivers/m20.cpp index 89e792e83ad..f56d4d5004d 100644 --- a/src/mame/drivers/m20.cpp +++ b/src/mame/drivers/m20.cpp @@ -792,7 +792,7 @@ static MACHINE_CONFIG_START( m20, m20_state ) MCFG_SCREEN_SIZE(512, 256) MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* Devices */ MCFG_FD1797_ADD("fd1797", 1000000) diff --git a/src/mame/drivers/m79152pc.cpp b/src/mame/drivers/m79152pc.cpp index 9cd9cb9acb8..6cc765a5fd0 100644 --- a/src/mame/drivers/m79152pc.cpp +++ b/src/mame/drivers/m79152pc.cpp @@ -126,7 +126,7 @@ static MACHINE_CONFIG_START( m79152pc, m79152pc_state ) MCFG_SCREEN_UPDATE_DRIVER(m79152pc_state, screen_update_m79152pc) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", m79152pc) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/macpci.cpp b/src/mame/drivers/macpci.cpp index 3eea5fd31ad..69b79d6f386 100644 --- a/src/mame/drivers/macpci.cpp +++ b/src/mame/drivers/macpci.cpp @@ -101,7 +101,7 @@ static MACHINE_CONFIG_START( pippin, macpci_state ) MCFG_SCREEN_UPDATE_DRIVER(macpci_state, screen_update_pippin) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") diff --git a/src/mame/drivers/mbc200.cpp b/src/mame/drivers/mbc200.cpp index edd010e9a07..203646963cb 100644 --- a/src/mame/drivers/mbc200.cpp +++ b/src/mame/drivers/mbc200.cpp @@ -225,7 +225,7 @@ static MACHINE_CONFIG_START( mbc200, mbc200_state ) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", h46505_device, screen_update) MCFG_GFXDECODE_ADD("gfxdecode", "palette", mbc200) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_8MHz / 4) // HD46505SP MCFG_MC6845_SHOW_BORDER_AREA(false) diff --git a/src/mame/drivers/mc80.cpp b/src/mame/drivers/mc80.cpp index 5518a87408a..48a237a56b3 100644 --- a/src/mame/drivers/mc80.cpp +++ b/src/mame/drivers/mc80.cpp @@ -178,7 +178,7 @@ static MACHINE_CONFIG_START( mc8020, mc80_state ) MCFG_SCREEN_UPDATE_DRIVER(mc80_state, screen_update_mc8020) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* devices */ MCFG_DEVICE_ADD("z80pio", Z80PIO, XTAL_2_4576MHz) @@ -216,7 +216,7 @@ static MACHINE_CONFIG_START( mc8030, mc80_state ) MCFG_SCREEN_UPDATE_DRIVER(mc80_state, screen_update_mc8030) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* Devices */ MCFG_DEVICE_ADD("zve_pio", Z80PIO, XTAL_2_4576MHz) diff --git a/src/mame/drivers/meadows.cpp b/src/mame/drivers/meadows.cpp index 801f779049a..cc808e5324f 100644 --- a/src/mame/drivers/meadows.cpp +++ b/src/mame/drivers/meadows.cpp @@ -628,7 +628,7 @@ static MACHINE_CONFIG_START( meadows, meadows_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", meadows) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* audio hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -660,7 +660,7 @@ static MACHINE_CONFIG_START( minferno, meadows_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", minferno) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* audio hardware */ // TODO @@ -689,7 +689,7 @@ static MACHINE_CONFIG_START( bowl3d, meadows_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", meadows) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* audio hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/mes.cpp b/src/mame/drivers/mes.cpp index 00091ddf3a4..7fba4e556b0 100644 --- a/src/mame/drivers/mes.cpp +++ b/src/mame/drivers/mes.cpp @@ -118,7 +118,7 @@ static MACHINE_CONFIG_START( mes, mes_state ) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/drivers/micral.cpp b/src/mame/drivers/micral.cpp index 743ee915080..3aca6e673ee 100644 --- a/src/mame/drivers/micral.cpp +++ b/src/mame/drivers/micral.cpp @@ -257,13 +257,13 @@ static MACHINE_CONFIG_START( micral, micral_state ) MCFG_MACHINE_RESET_OVERRIDE(micral_state, micral) // video hardware - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(250)) MCFG_SCREEN_UPDATE_DRIVER(micral_state, screen_update) MCFG_SCREEN_SIZE(64*6, 32*8) MCFG_SCREEN_VISIBLE_AREA(0, 64*6-1, 0, 32*8-1) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") //MCFG_GFXDECODE_ADD("gfxdecode", "palette", micral) MCFG_DEVICE_ADD("crtc", CRT5037, XTAL_17_9712MHz/2) // xtal freq unknown diff --git a/src/mame/drivers/microtan.cpp b/src/mame/drivers/microtan.cpp index 5503e3285e8..fcf0676cb15 100644 --- a/src/mame/drivers/microtan.cpp +++ b/src/mame/drivers/microtan.cpp @@ -225,7 +225,7 @@ static MACHINE_CONFIG_START( microtan, microtan_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", microtan) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/mikro80.cpp b/src/mame/drivers/mikro80.cpp index 5fda3bf1ee6..ae543027dfc 100644 --- a/src/mame/drivers/mikro80.cpp +++ b/src/mame/drivers/mikro80.cpp @@ -179,7 +179,7 @@ static MACHINE_CONFIG_START( mikro80, mikro80_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", mikro80) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") diff --git a/src/mame/drivers/mk85.cpp b/src/mame/drivers/mk85.cpp index 5ab8197a55a..2ac48fe1071 100644 --- a/src/mame/drivers/mk85.cpp +++ b/src/mame/drivers/mk85.cpp @@ -77,7 +77,7 @@ static MACHINE_CONFIG_START( mk85, mk85_state ) MCFG_SCREEN_UPDATE_DRIVER(mk85_state, screen_update_mk85) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/mk90.cpp b/src/mame/drivers/mk90.cpp index ce3ffa2abd2..68134c41490 100644 --- a/src/mame/drivers/mk90.cpp +++ b/src/mame/drivers/mk90.cpp @@ -82,7 +82,7 @@ static MACHINE_CONFIG_START( mk90, mk90_state ) MCFG_SCREEN_UPDATE_DRIVER(mk90_state, screen_update_mk90) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/modellot.cpp b/src/mame/drivers/modellot.cpp index 23eabd69770..0743a324e06 100644 --- a/src/mame/drivers/modellot.cpp +++ b/src/mame/drivers/modellot.cpp @@ -155,7 +155,7 @@ static MACHINE_CONFIG_START( modellot, modellot_state ) MCFG_CPU_IO_MAP(modellot_io) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(64*8, 16*16) @@ -164,7 +164,7 @@ static MACHINE_CONFIG_START( modellot, modellot_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", modellot ) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* Devices */ MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0) diff --git a/src/mame/drivers/mx2178.cpp b/src/mame/drivers/mx2178.cpp index add947cbcdd..c0e09f69578 100644 --- a/src/mame/drivers/mx2178.cpp +++ b/src/mame/drivers/mx2178.cpp @@ -162,14 +162,14 @@ static MACHINE_CONFIG_START( mx2178, mx2178_state ) MCFG_CPU_IO_MAP(mx2178_io) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not correct MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) MCFG_GFXDECODE_ADD("gfxdecode", "palette", mx2178) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* Devices */ MCFG_MC6845_ADD("crtc", MC6845, "screen", 18869600 / 8) // clk unknown diff --git a/src/mame/drivers/myb3k.cpp b/src/mame/drivers/myb3k.cpp index 2eb5cba1dc7..283cb63d531 100644 --- a/src/mame/drivers/myb3k.cpp +++ b/src/mame/drivers/myb3k.cpp @@ -262,7 +262,7 @@ static MACHINE_CONFIG_START( myb3k, myb3k_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", myb3k) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* devices */ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_3_579545MHz/4) /* unknown clock, hand tuned to get ~60 fps */ diff --git a/src/mame/drivers/mycom.cpp b/src/mame/drivers/mycom.cpp index efea8bc5bed..32df87b41f2 100644 --- a/src/mame/drivers/mycom.cpp +++ b/src/mame/drivers/mycom.cpp @@ -529,7 +529,7 @@ static MACHINE_CONFIG_START( mycom, mycom_state ) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 192-1) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", mycom) /* Manual states clock is 1.008mhz for 40 cols, and 2.016 mhz for 80 cols. diff --git a/src/mame/drivers/mz80.cpp b/src/mame/drivers/mz80.cpp index dddf128c958..6546e3b3325 100644 --- a/src/mame/drivers/mz80.cpp +++ b/src/mame/drivers/mz80.cpp @@ -287,7 +287,7 @@ static MACHINE_CONFIG_START( mz80k, mz80_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", mz80k) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* Audio */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/nanos.cpp b/src/mame/drivers/nanos.cpp index a40db7653a9..e83f3074979 100644 --- a/src/mame/drivers/nanos.cpp +++ b/src/mame/drivers/nanos.cpp @@ -485,7 +485,7 @@ static MACHINE_CONFIG_START( nanos, nanos_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", nanos) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* devices */ MCFG_DEVICE_ADD("z80ctc_0", Z80CTC, XTAL_4MHz) diff --git a/src/mame/drivers/nascom1.cpp b/src/mame/drivers/nascom1.cpp index fc3497f3e70..ffe9b3b55e6 100644 --- a/src/mame/drivers/nascom1.cpp +++ b/src/mame/drivers/nascom1.cpp @@ -655,7 +655,7 @@ static MACHINE_CONFIG_START( nascom1, nascom1_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", nascom1) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // uart MCFG_DEVICE_ADD( "hd6402", AY31015, 0 ) diff --git a/src/mame/drivers/nitedrvr.cpp b/src/mame/drivers/nitedrvr.cpp index a36b46ad204..34409ac6c1b 100644 --- a/src/mame/drivers/nitedrvr.cpp +++ b/src/mame/drivers/nitedrvr.cpp @@ -156,7 +156,7 @@ static MACHINE_CONFIG_START( nitedrvr, nitedrvr_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", nitedrvr) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/nokia_3310.cpp b/src/mame/drivers/nokia_3310.cpp index 81f15a75ce7..a07d0579f9f 100644 --- a/src/mame/drivers/nokia_3310.cpp +++ b/src/mame/drivers/nokia_3310.cpp @@ -692,7 +692,7 @@ static MACHINE_CONFIG_START( noki3310, noki3310_state ) MCFG_CPU_PROGRAM_MAP(noki3310_map) /* video hardware */ - MCFG_SCREEN_ADD("screen", LCD) + MCFG_SCREEN_ADD_MONOCHROME("screen", LCD, rgb_t::white) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(84, 48) @@ -700,7 +700,7 @@ static MACHINE_CONFIG_START( noki3310, noki3310_state ) MCFG_SCREEN_UPDATE_DEVICE("pcd8544", pcd8544_device, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_WHITE_AND_BLACK("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_PCD8544_ADD("pcd8544") MCFG_PCD8544_SCREEN_UPDATE_CALLBACK(noki3310_state, pcd8544_screen_update) diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp index 53971abc082..c5e12655e80 100644 --- a/src/mame/drivers/notetaker.cpp +++ b/src/mame/drivers/notetaker.cpp @@ -695,7 +695,7 @@ static MACHINE_CONFIG_START( notetakr, notetaker_state ) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* Devices */ MCFG_DEVICE_ADD( "crt5027", CRT5027, (XTAL_36MHz/4)/8) // the clock for the crt5027 is configurable rate; 36MHz xtal divided by 1*, 2, 3, 4, 5, 6, 7, or 8 (* because this is a 74s163 this setting probably means divide by 1; documentation at http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790605_Definition_of_8086_Ports.pdf claims it is 1.5, which makes no sense) and secondarily divided by 8 (again by two to load the 16 bit output shifters after this) diff --git a/src/mame/drivers/octopus.cpp b/src/mame/drivers/octopus.cpp index b219aa52261..7567722bfdd 100644 --- a/src/mame/drivers/octopus.cpp +++ b/src/mame/drivers/octopus.cpp @@ -179,7 +179,7 @@ static MACHINE_CONFIG_START( octopus, octopus_state ) MCFG_SCREEN_UPDATE_DRIVER(octopus_state, screen_update_octopus) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/okean240.cpp b/src/mame/drivers/okean240.cpp index 8ad181fe10e..8c66709e4d4 100644 --- a/src/mame/drivers/okean240.cpp +++ b/src/mame/drivers/okean240.cpp @@ -488,7 +488,7 @@ static MACHINE_CONFIG_START( okean240t, okean240_state ) MCFG_SCREEN_UPDATE_DRIVER(okean240_state, screen_update_okean240) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0) MCFG_GENERIC_TERMINAL_KEYBOARD_CB(WRITE8(okean240_state, kbd_put)) diff --git a/src/mame/drivers/ondra.cpp b/src/mame/drivers/ondra.cpp index 33c713902d1..b8c0402709b 100644 --- a/src/mame/drivers/ondra.cpp +++ b/src/mame/drivers/ondra.cpp @@ -131,7 +131,7 @@ static MACHINE_CONFIG_START( ondra, ondra_state ) MCFG_SCREEN_UPDATE_DRIVER(ondra_state, screen_update_ondra) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // sound hardware diff --git a/src/mame/drivers/orao.cpp b/src/mame/drivers/orao.cpp index 4695e0855ff..46632ff1a2b 100644 --- a/src/mame/drivers/orao.cpp +++ b/src/mame/drivers/orao.cpp @@ -179,7 +179,7 @@ static MACHINE_CONFIG_START( orao, orao_state ) MCFG_SCREEN_UPDATE_DRIVER(orao_state, screen_update_orao) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* audio hardware */ diff --git a/src/mame/drivers/orbit.cpp b/src/mame/drivers/orbit.cpp index 248d818c497..94796573917 100644 --- a/src/mame/drivers/orbit.cpp +++ b/src/mame/drivers/orbit.cpp @@ -306,7 +306,7 @@ static MACHINE_CONFIG_START( orbit, orbit_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", orbit) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") diff --git a/src/mame/drivers/osbexec.cpp b/src/mame/drivers/osbexec.cpp index c21143bc676..226b4519128 100644 --- a/src/mame/drivers/osbexec.cpp +++ b/src/mame/drivers/osbexec.cpp @@ -530,11 +530,11 @@ static MACHINE_CONFIG_START( osbexec, osbexec_state ) MCFG_CPU_IO_MAP( osbexec_io) MCFG_CPU_CONFIG( osbexec_daisy_config ) - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DRIVER(osbexec_state, screen_update) MCFG_SCREEN_RAW_PARAMS( MAIN_CLOCK/2, 768, 0, 640, 260, 0, 240 ) /* May not be correct */ MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") + MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette") MCFG_SPEAKER_STANDARD_MONO( "mono" ) MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) diff --git a/src/mame/drivers/osborne1.cpp b/src/mame/drivers/osborne1.cpp index 43bdd2417d3..2581c42b0a4 100644 --- a/src/mame/drivers/osborne1.cpp +++ b/src/mame/drivers/osborne1.cpp @@ -244,12 +244,12 @@ static MACHINE_CONFIG_START( osborne1, osborne1_state ) MCFG_CPU_IO_MAP(osborne1_io) MCFG_Z80_SET_IRQACK_CALLBACK(WRITELINE(osborne1_state, irqack_w)) - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DRIVER(osborne1_state, screen_update) MCFG_SCREEN_RAW_PARAMS( MAIN_CLOCK, 1024, 0, 104*8, 260, 0, 24*10 ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", osborne1) - MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") + MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette") MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) diff --git a/src/mame/drivers/p112.cpp b/src/mame/drivers/p112.cpp index f67599bcdf7..cfd312e85ec 100644 --- a/src/mame/drivers/p112.cpp +++ b/src/mame/drivers/p112.cpp @@ -96,7 +96,7 @@ static MACHINE_CONFIG_START( p112, p112_state ) MCFG_SCREEN_UPDATE_DRIVER(p112_state, screen_update_p112) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/drivers/pcm.cpp b/src/mame/drivers/pcm.cpp index 912256491f9..e11ff7b8da4 100644 --- a/src/mame/drivers/pcm.cpp +++ b/src/mame/drivers/pcm.cpp @@ -267,7 +267,7 @@ static MACHINE_CONFIG_START( pcm, pcm_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", pcm) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* Sound */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/pda600.cpp b/src/mame/drivers/pda600.cpp index c4dd15ab4cd..5fe546c4e7b 100644 --- a/src/mame/drivers/pda600.cpp +++ b/src/mame/drivers/pda600.cpp @@ -212,7 +212,7 @@ static MACHINE_CONFIG_START( pda600, pda600_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", pda600) MCFG_DEFAULT_LAYOUT(layout_lcd) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // NVRAM needs to be filled with random data to fail the checksum and be initialized correctly MCFG_NVRAM_ADD_RANDOM_FILL("nvram") diff --git a/src/mame/drivers/pegasus.cpp b/src/mame/drivers/pegasus.cpp index bb7d157b3b7..39e921783a7 100644 --- a/src/mame/drivers/pegasus.cpp +++ b/src/mame/drivers/pegasus.cpp @@ -496,7 +496,7 @@ static MACHINE_CONFIG_START( pegasus, pegasus_state ) MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 0, 16*16-1) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", pegasus) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/peoplepc.cpp b/src/mame/drivers/peoplepc.cpp index 12149daa4fb..894017bd029 100644 --- a/src/mame/drivers/peoplepc.cpp +++ b/src/mame/drivers/peoplepc.cpp @@ -252,12 +252,12 @@ static MACHINE_CONFIG_START( olypeopl, peoplepc_state) MCFG_DEVICE_ADD("ppi8255", I8255, 0) - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_RAW_PARAMS(XTAL_22MHz,640,0,640,475,0,475) MCFG_SCREEN_UPDATE_DEVICE( "h46505", mc6845_device, screen_update ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD("h46505", H46505, "screen", XTAL_22MHz/8) MCFG_MC6845_SHOW_BORDER_AREA(false) diff --git a/src/mame/drivers/pet.cpp b/src/mame/drivers/pet.cpp index 3a25ac12358..4dd733c274b 100644 --- a/src/mame/drivers/pet.cpp +++ b/src/mame/drivers/pet.cpp @@ -1481,7 +1481,7 @@ static MACHINE_CONFIG_START( pet, pet_state ) MCFG_M6502_DISABLE_DIRECT() // address decoding is 100% dynamic, no RAM/ROM banks // video hardware - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) MCFG_SCREEN_SIZE(320, 200) @@ -1489,7 +1489,7 @@ static MACHINE_CONFIG_START( pet, pet_state ) MCFG_SCREEN_UPDATE_DRIVER(pet_state, screen_update) MCFG_TIMER_DRIVER_ADD_PERIODIC("sync_timer", pet_state, sync_tick, attotime::from_hz(120)) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // devices MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL_8MHz/8) @@ -1905,7 +1905,7 @@ static MACHINE_CONFIG_START( pet80, pet80_state ) MCFG_M6502_DISABLE_DIRECT() // address decoding is 100% dynamic, no RAM/ROM banks // video hardware - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) MCFG_SCREEN_SIZE(640, 250) @@ -1919,7 +1919,7 @@ static MACHINE_CONFIG_START( pet80, pet80_state ) MCFG_MC6845_UPDATE_ROW_CB(pet80_state, pet80_update_row) MCFG_MC6845_OUT_VSYNC_CB(DEVWRITELINE(M6520_1_TAG, pia6821_device, cb1_w)) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/plan80.cpp b/src/mame/drivers/plan80.cpp index f621c73d92b..8ab84821f91 100644 --- a/src/mame/drivers/plan80.cpp +++ b/src/mame/drivers/plan80.cpp @@ -235,7 +235,7 @@ static MACHINE_CONFIG_START( plan80, plan80_state ) MCFG_CPU_IO_MAP(plan80_io) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DRIVER(plan80_state, screen_update) @@ -244,7 +244,7 @@ static MACHINE_CONFIG_START( plan80, plan80_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", plan80) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/pmd85.cpp b/src/mame/drivers/pmd85.cpp index 04ba8217f70..5e5b091cb9f 100644 --- a/src/mame/drivers/pmd85.cpp +++ b/src/mame/drivers/pmd85.cpp @@ -600,7 +600,7 @@ static MACHINE_CONFIG_START( pmd85, pmd85_state ) MCFG_PIT8253_CLK2(1) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(0) MCFG_SCREEN_SIZE(288, 256) @@ -608,7 +608,7 @@ static MACHINE_CONFIG_START( pmd85, pmd85_state ) MCFG_SCREEN_UPDATE_DRIVER(pmd85_state, screen_update_pmd85) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") + MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/pockstat.cpp b/src/mame/drivers/pockstat.cpp index 0662ab59f5b..5c90dcc56d0 100644 --- a/src/mame/drivers/pockstat.cpp +++ b/src/mame/drivers/pockstat.cpp @@ -991,7 +991,7 @@ static MACHINE_CONFIG_START( pockstat, pockstat_state ) MCFG_SCREEN_VISIBLE_AREA(0, 32-1, 0, 32-1) MCFG_SCREEN_UPDATE_DRIVER(pockstat_state, screen_update_pockstat) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("dac", DAC, 0) diff --git a/src/mame/drivers/poly88.cpp b/src/mame/drivers/poly88.cpp index 79905bc2eea..1d3232bb06b 100644 --- a/src/mame/drivers/poly88.cpp +++ b/src/mame/drivers/poly88.cpp @@ -175,7 +175,7 @@ static MACHINE_CONFIG_START( poly88, poly88_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", poly88) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* audio hardware */ diff --git a/src/mame/drivers/primo.cpp b/src/mame/drivers/primo.cpp index 7ad1739139c..021591cde2d 100644 --- a/src/mame/drivers/primo.cpp +++ b/src/mame/drivers/primo.cpp @@ -255,7 +255,7 @@ static MACHINE_CONFIG_START( primoa32, primo_state ) MCFG_SCREEN_UPDATE_DRIVER(primo_state, screen_update_primo) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/proteus3.cpp b/src/mame/drivers/proteus3.cpp index 573b8772d52..760d0d10c4d 100644 --- a/src/mame/drivers/proteus3.cpp +++ b/src/mame/drivers/proteus3.cpp @@ -326,7 +326,7 @@ static MACHINE_CONFIG_START( proteus3, proteus3_state ) MCFG_SCREEN_UPDATE_DRIVER(proteus3_state, screen_update_proteus3) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", proteus3) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* Devices */ MCFG_DEVICE_ADD("pia", PIA6821, 0) diff --git a/src/mame/drivers/ptcsol.cpp b/src/mame/drivers/ptcsol.cpp index 72384632812..d444a07fb45 100644 --- a/src/mame/drivers/ptcsol.cpp +++ b/src/mame/drivers/ptcsol.cpp @@ -737,7 +737,7 @@ static MACHINE_CONFIG_START( sol20, sol20_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", sol20) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/pv9234.cpp b/src/mame/drivers/pv9234.cpp index 101dd0151cc..026ac632927 100644 --- a/src/mame/drivers/pv9234.cpp +++ b/src/mame/drivers/pv9234.cpp @@ -151,7 +151,7 @@ static MACHINE_CONFIG_START( pv9234, pv9234_state ) MCFG_SCREEN_UPDATE_DRIVER(pv9234_state, screen_update_pv9234) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/drivers/pyl601.cpp b/src/mame/drivers/pyl601.cpp index 8da7b17d6ed..806c131c624 100644 --- a/src/mame/drivers/pyl601.cpp +++ b/src/mame/drivers/pyl601.cpp @@ -530,14 +530,14 @@ static MACHINE_CONFIG_START( pyl601, pyl601_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", pyl601_state, pyl601_interrupt) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(640, 200) MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 200 - 1) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_GFXDECODE_ADD("gfxdecode", "palette", pyl601) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/rd100.cpp b/src/mame/drivers/rd100.cpp index 46c20ff62ce..c89951d57db 100644 --- a/src/mame/drivers/rd100.cpp +++ b/src/mame/drivers/rd100.cpp @@ -94,13 +94,13 @@ static MACHINE_CONFIG_START( rd100, rd100_state ) MCFG_MACHINE_RESET_OVERRIDE(rd100_state, rd100) // video hardware - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(250)) MCFG_SCREEN_UPDATE_DRIVER(rd100_state, screen_update) MCFG_SCREEN_SIZE(64*6, 32*8) MCFG_SCREEN_VISIBLE_AREA(0, 64*6-1, 0, 32*8-1) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") //MCFG_GFXDECODE_ADD("gfxdecode", "palette", rd100) MACHINE_CONFIG_END diff --git a/src/mame/drivers/rm380z.cpp b/src/mame/drivers/rm380z.cpp index 659ec0dbe31..cb08fd5017a 100644 --- a/src/mame/drivers/rm380z.cpp +++ b/src/mame/drivers/rm380z.cpp @@ -144,7 +144,7 @@ static MACHINE_CONFIG_START( rm380z, rm380z_state ) MCFG_SCREEN_UPDATE_DRIVER(rm380z_state, screen_update_rm380z) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* RAM configurations */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mame/drivers/sapi1.cpp b/src/mame/drivers/sapi1.cpp index 732baca6c3e..a389456c315 100644 --- a/src/mame/drivers/sapi1.cpp +++ b/src/mame/drivers/sapi1.cpp @@ -549,7 +549,7 @@ static MACHINE_CONFIG_START( sapi1, sapi1_state ) MCFG_SCREEN_UPDATE_DRIVER(sapi1_state, screen_update_sapi1) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mame/drivers/sbrain.cpp b/src/mame/drivers/sbrain.cpp index 2994f754518..9bc9709113c 100644 --- a/src/mame/drivers/sbrain.cpp +++ b/src/mame/drivers/sbrain.cpp @@ -324,7 +324,7 @@ static MACHINE_CONFIG_START( sbrain, sbrain_state ) MCFG_CPU_IO_MAP(sbrain_subio) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::amber) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DRIVER(sbrain_state, screen_update) @@ -332,7 +332,7 @@ static MACHINE_CONFIG_START( sbrain, sbrain_state ) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 239) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_MONOCHROME_AMBER("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/sbrkout.cpp b/src/mame/drivers/sbrkout.cpp index 54bbf6c4e6e..69dd21dcbea 100644 --- a/src/mame/drivers/sbrkout.cpp +++ b/src/mame/drivers/sbrkout.cpp @@ -594,7 +594,7 @@ static MACHINE_CONFIG_START( sbrkout, sbrkout_state ) MCFG_SCREEN_UPDATE_DRIVER(sbrkout_state, screen_update_sbrkout) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/sdk80.cpp b/src/mame/drivers/sdk80.cpp index 954bf30afeb..5418220ad83 100644 --- a/src/mame/drivers/sdk80.cpp +++ b/src/mame/drivers/sdk80.cpp @@ -178,7 +178,7 @@ static MACHINE_CONFIG_START( sdk80, sdk80_state ) // MCFG_GFXDECODE_ADD("gfxdecode", "palette", sdk80) -// MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") +// MCFG_PALETTE_ADD_MONOCHROME("palette") // Video board UART // MCFG_DEVICE_ADD( "hd6402", AY31015, 0 ) diff --git a/src/mame/drivers/sorcerer.cpp b/src/mame/drivers/sorcerer.cpp index 741a784045b..e4491eebc7f 100644 --- a/src/mame/drivers/sorcerer.cpp +++ b/src/mame/drivers/sorcerer.cpp @@ -413,7 +413,7 @@ static MACHINE_CONFIG_START( sorcerer, sorcerer_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", sorcerer) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/ssem.cpp b/src/mame/drivers/ssem.cpp index a35cb104d92..278d02518fb 100644 --- a/src/mame/drivers/ssem.cpp +++ b/src/mame/drivers/ssem.cpp @@ -635,7 +635,7 @@ static MACHINE_CONFIG_START( ssem, ssem_state ) MCFG_SCREEN_SIZE(256, 280) MCFG_SCREEN_VISIBLE_AREA(0, 255, 0, 279) MCFG_SCREEN_UPDATE_DRIVER(ssem_state, screen_update_ssem) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* quickload */ MCFG_QUICKLOAD_ADD("quickload", ssem_state, ssem_store, "snp,asm", 1) diff --git a/src/mame/drivers/sshot.cpp b/src/mame/drivers/sshot.cpp index 97075424ff0..cb87ec1187d 100644 --- a/src/mame/drivers/sshot.cpp +++ b/src/mame/drivers/sshot.cpp @@ -352,7 +352,7 @@ static MACHINE_CONFIG_START( supershot, supershot_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", supershot) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ //... diff --git a/src/mame/drivers/starcrus.cpp b/src/mame/drivers/starcrus.cpp index f855f6eb459..9c42109b9f4 100644 --- a/src/mame/drivers/starcrus.cpp +++ b/src/mame/drivers/starcrus.cpp @@ -149,7 +149,7 @@ static MACHINE_CONFIG_START( starcrus, starcrus_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", starcrus) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/super80.cpp b/src/mame/drivers/super80.cpp index ad47e443f2a..8bbb6c194f7 100644 --- a/src/mame/drivers/super80.cpp +++ b/src/mame/drivers/super80.cpp @@ -699,13 +699,13 @@ static MACHINE_CONFIG_START( super80, super80_state ) MCFG_Z80PIO_OUT_PA_CB(WRITE8(super80_state, pio_port_a_w)) MCFG_Z80PIO_IN_PB_CB(READ8(super80_state,pio_port_b_r)) - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(48.8) MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) MCFG_SCREEN_UPDATE_DRIVER(super80_state, screen_update_super80) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", super80) MCFG_DEFAULT_LAYOUT( layout_super80 ) diff --git a/src/mame/drivers/swyft.cpp b/src/mame/drivers/swyft.cpp index 27827228b3b..8799893eded 100644 --- a/src/mame/drivers/swyft.cpp +++ b/src/mame/drivers/swyft.cpp @@ -783,7 +783,7 @@ static MACHINE_CONFIG_START( swyft, swyft_state ) MCFG_SCREEN_UPDATE_DRIVER(swyft_state, screen_update_swyft) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_VIDEO_START_OVERRIDE(swyft_state,swyft) diff --git a/src/mame/drivers/sys2900.cpp b/src/mame/drivers/sys2900.cpp index 848ec90ff58..01192b40379 100644 --- a/src/mame/drivers/sys2900.cpp +++ b/src/mame/drivers/sys2900.cpp @@ -130,7 +130,7 @@ static MACHINE_CONFIG_START( sys2900, sys2900_state ) MCFG_SCREEN_UPDATE_DRIVER(sys2900_state, screen_update_sys2900) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/drivers/tandy2k.cpp b/src/mame/drivers/tandy2k.cpp index d88f3120b98..61c26bce428 100644 --- a/src/mame/drivers/tandy2k.cpp +++ b/src/mame/drivers/tandy2k.cpp @@ -767,7 +767,7 @@ static MACHINE_CONFIG_START( tandy2k, tandy2k_state ) MCFG_80186_IRQ_SLAVE_ACK(DEVREAD8(DEVICE_SELF, tandy2k_state, irq_callback)) // video hardware - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate MCFG_SCREEN_SIZE(640, 400) @@ -775,7 +775,7 @@ static MACHINE_CONFIG_START( tandy2k, tandy2k_state ) //MCFG_SCREEN_UPDATE_DEVICE(CRT9021B_TAG, crt9021_t, screen_update) MCFG_SCREEN_UPDATE_DRIVER(tandy2k_state, screen_update) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD(CRT9007_TAG, CRT9007, XTAL_16MHz*28/20/8) MCFG_DEVICE_ADDRESS_MAP(AS_0, vpac_mem) diff --git a/src/mame/drivers/tavernie.cpp b/src/mame/drivers/tavernie.cpp index 9c15b99f5c1..c6ccd0fb51a 100644 --- a/src/mame/drivers/tavernie.cpp +++ b/src/mame/drivers/tavernie.cpp @@ -349,7 +349,7 @@ static MACHINE_CONFIG_DERIVED( ivg09, cpu09 ) MCFG_SCREEN_SIZE(80*8, 25*10) MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 25*10-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEFAULT_LAYOUT(layout_tavernie) /* sound hardware */ diff --git a/src/mame/drivers/tdv2324.cpp b/src/mame/drivers/tdv2324.cpp index 5d943ec505a..539d0f2e2aa 100644 --- a/src/mame/drivers/tdv2324.cpp +++ b/src/mame/drivers/tdv2324.cpp @@ -267,13 +267,13 @@ static MACHINE_CONFIG_START( tdv2324, tdv2324_state ) MCFG_CPU_PROGRAM_MAP(tdv2324_fdc_mem) // video hardware - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_UPDATE_DRIVER(tdv2324_state, screen_update) MCFG_SCREEN_SIZE(800, 400) MCFG_SCREEN_VISIBLE_AREA(0, 800-1, 0, 400-1) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD(TMS9937NL_TAG, TMS9927, XTAL_25_39836MHz) MCFG_TMS9927_CHAR_WIDTH(8) diff --git a/src/mame/drivers/tek405x.cpp b/src/mame/drivers/tek405x.cpp index a2e58454346..acec32694cd 100644 --- a/src/mame/drivers/tek405x.cpp +++ b/src/mame/drivers/tek405x.cpp @@ -1000,14 +1000,14 @@ static MACHINE_CONFIG_START( tek4051, tek4051_state ) // video hardware MCFG_VECTOR_ADD("vector") - MCFG_SCREEN_ADD(SCREEN_TAG, VECTOR) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, VECTOR, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate MCFG_SCREEN_SIZE(1024, 780) MCFG_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 780-1) MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") @@ -1107,14 +1107,14 @@ static MACHINE_CONFIG_START( tek4052, tek4052_state ) // video hardware MCFG_VECTOR_ADD("vector") - MCFG_SCREEN_ADD(SCREEN_TAG, VECTOR) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, VECTOR, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate MCFG_SCREEN_SIZE(1024, 780) MCFG_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 780-1) MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/terak.cpp b/src/mame/drivers/terak.cpp index 714a2d3fcfb..7b747489cdd 100644 --- a/src/mame/drivers/terak.cpp +++ b/src/mame/drivers/terak.cpp @@ -104,7 +104,7 @@ static MACHINE_CONFIG_START( terak, terak_state ) MCFG_SCREEN_UPDATE_DRIVER(terak_state, screen_update_terak) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/drivers/ti99_2.cpp b/src/mame/drivers/ti99_2.cpp index 2eaf0250d68..8bffc874560 100644 --- a/src/mame/drivers/ti99_2.cpp +++ b/src/mame/drivers/ti99_2.cpp @@ -376,7 +376,7 @@ static MACHINE_CONFIG_START( ti99_2, ti99_2_state ) /* video hardware */ /*MCFG_TMS9928A( &tms9918_interface )*/ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::white) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(256, 192) @@ -385,7 +385,7 @@ static MACHINE_CONFIG_START( ti99_2, ti99_2_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", ti99_2) - MCFG_PALETTE_ADD_WHITE_AND_BLACK("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/drivers/tim011.cpp b/src/mame/drivers/tim011.cpp index 42e644bba84..218dc66c686 100644 --- a/src/mame/drivers/tim011.cpp +++ b/src/mame/drivers/tim011.cpp @@ -148,7 +148,7 @@ static MACHINE_CONFIG_START( tim011,tim011_state ) MCFG_SCREEN_UPDATE_DRIVER(tim011_state, screen_update_tim011) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/tk80bs.cpp b/src/mame/drivers/tk80bs.cpp index 99d6f1f1db5..766a371e638 100644 --- a/src/mame/drivers/tk80bs.cpp +++ b/src/mame/drivers/tk80bs.cpp @@ -181,7 +181,7 @@ static MACHINE_CONFIG_START( tk80bs, tk80bs_state ) MCFG_SCREEN_UPDATE_DRIVER(tk80bs_state, screen_update_tk80bs) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", tk80bs) /* Devices */ diff --git a/src/mame/drivers/trs80.cpp b/src/mame/drivers/trs80.cpp index 8a9c0c3af24..a946124cbe4 100644 --- a/src/mame/drivers/trs80.cpp +++ b/src/mame/drivers/trs80.cpp @@ -574,7 +574,7 @@ static MACHINE_CONFIG_START( trs80, trs80_state ) // the original model I, MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", trs80) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/trs80m2.cpp b/src/mame/drivers/trs80m2.cpp index 9c84301cc74..e642a894edd 100644 --- a/src/mame/drivers/trs80m2.cpp +++ b/src/mame/drivers/trs80m2.cpp @@ -706,14 +706,14 @@ static MACHINE_CONFIG_START( trs80m2, trs80m2_state ) MCFG_CPU_IO_MAP(z80_io) // video hardware - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_UPDATE_DRIVER(trs80m2_state, screen_update) MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_12_48MHz/8) MCFG_MC6845_SHOW_BORDER_AREA(true) @@ -796,14 +796,14 @@ static MACHINE_CONFIG_START( trs80m16, trs80m16_state ) MCFG_DEVICE_DISABLE() // video hardware - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_UPDATE_DRIVER(trs80m2_state, screen_update) MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_12_48MHz/8) MCFG_MC6845_SHOW_BORDER_AREA(true) diff --git a/src/mame/drivers/ts803.cpp b/src/mame/drivers/ts803.cpp index f706f95a693..c18f41cfda2 100644 --- a/src/mame/drivers/ts803.cpp +++ b/src/mame/drivers/ts803.cpp @@ -496,12 +496,12 @@ static MACHINE_CONFIG_START( ts803, ts803_state ) MCFG_CPU_CONFIG(daisy_chain) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_SIZE(640,240) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 240-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", sy6545_1_device, screen_update) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* crtc */ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", 13608000 / 8) diff --git a/src/mame/drivers/tvgame.cpp b/src/mame/drivers/tvgame.cpp index 44ede341caf..c667bce0570 100644 --- a/src/mame/drivers/tvgame.cpp +++ b/src/mame/drivers/tvgame.cpp @@ -105,7 +105,7 @@ static MACHINE_CONFIG_START( tvgame, tvgame_state ) MCFG_SCREEN_SIZE(216, 213) MCFG_SCREEN_VISIBLE_AREA(0, 215, 0, 212) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/uknc.cpp b/src/mame/drivers/uknc.cpp index af546c28b6e..b7d97e481d2 100644 --- a/src/mame/drivers/uknc.cpp +++ b/src/mame/drivers/uknc.cpp @@ -76,7 +76,7 @@ static MACHINE_CONFIG_START( uknc, uknc_state ) MCFG_SCREEN_UPDATE_DRIVER(uknc_state, screen_update_uknc) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mame/drivers/univac.cpp b/src/mame/drivers/univac.cpp index 588b2a1bc39..b8131c8c5cb 100644 --- a/src/mame/drivers/univac.cpp +++ b/src/mame/drivers/univac.cpp @@ -173,14 +173,14 @@ static MACHINE_CONFIG_START( uts20, univac_state ) MCFG_CPU_CONFIG(daisy_chain) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DRIVER(univac_state, screen_update) MCFG_SCREEN_SIZE(640, 250) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_NVRAM_ADD_1FILL("nvram") MCFG_DEVICE_ADD("ctc", Z80CTC, XTAL_4MHz) diff --git a/src/mame/drivers/unixpc.cpp b/src/mame/drivers/unixpc.cpp index 1e08d3b6574..4e8259840c7 100644 --- a/src/mame/drivers/unixpc.cpp +++ b/src/mame/drivers/unixpc.cpp @@ -200,7 +200,7 @@ static MACHINE_CONFIG_START( unixpc, unixpc_state ) MCFG_DEFAULT_LAYOUT(layout_unixpc) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // internal ram MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mame/drivers/ut88.cpp b/src/mame/drivers/ut88.cpp index adcb42cf7e6..8849215091a 100644 --- a/src/mame/drivers/ut88.cpp +++ b/src/mame/drivers/ut88.cpp @@ -194,7 +194,7 @@ static MACHINE_CONFIG_START( ut88, ut88_state ) MCFG_SCREEN_UPDATE_DRIVER(ut88_state, screen_update_ut88) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", ut88 ) /* audio hardware */ diff --git a/src/mame/drivers/v6809.cpp b/src/mame/drivers/v6809.cpp index 6acbf18954e..df1ef0cb255 100644 --- a/src/mame/drivers/v6809.cpp +++ b/src/mame/drivers/v6809.cpp @@ -308,7 +308,7 @@ static MACHINE_CONFIG_START( v6809, v6809_state ) MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) MCFG_SCREEN_UPDATE_DEVICE("crtc", sy6545_1_device, screen_update) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", v6809) /* sound hardware */ diff --git a/src/mame/drivers/victor9k.cpp b/src/mame/drivers/victor9k.cpp index 6c48143b051..b01d0d9fe37 100644 --- a/src/mame/drivers/victor9k.cpp +++ b/src/mame/drivers/victor9k.cpp @@ -464,14 +464,14 @@ static MACHINE_CONFIG_START( victor9k, victor9k_state ) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE(I8259A_TAG, pic8259_device, inta_cb) // video hardware - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate MCFG_SCREEN_UPDATE_DEVICE(HD46505S_TAG, hd6845_device, screen_update) MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) - MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") + MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette") MCFG_MC6845_ADD(HD46505S_TAG, HD6845, SCREEN_TAG, XTAL_30MHz/11) // HD6845 == HD46505S MCFG_MC6845_SHOW_BORDER_AREA(true) diff --git a/src/mame/drivers/videopin.cpp b/src/mame/drivers/videopin.cpp index 160a1b0307a..38b0603cd79 100644 --- a/src/mame/drivers/videopin.cpp +++ b/src/mame/drivers/videopin.cpp @@ -371,7 +371,7 @@ static MACHINE_CONFIG_START( videopin, videopin_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", videopin) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/vixen.cpp b/src/mame/drivers/vixen.cpp index 0365076cb5f..d3c77194da5 100644 --- a/src/mame/drivers/vixen.cpp +++ b/src/mame/drivers/vixen.cpp @@ -740,13 +740,13 @@ static MACHINE_CONFIG_START( vixen, vixen_state ) MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(vixen_state,vixen_int_ack) // video hardware - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::amber) MCFG_SCREEN_UPDATE_DRIVER(vixen_state, screen_update) MCFG_SCREEN_RAW_PARAMS(XTAL_23_9616MHz/2, 96*8, 0*8, 81*8, 27*10, 0*10, 26*10) MCFG_TIMER_DRIVER_ADD_SCANLINE("vsync", vixen_state, vsync_tick, SCREEN_TAG, 26*10, 27*10) - MCFG_PALETTE_ADD_MONOCHROME_AMBER("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/vt100.cpp b/src/mame/drivers/vt100.cpp index 3561394bfbe..95791341fc3 100644 --- a/src/mame/drivers/vt100.cpp +++ b/src/mame/drivers/vt100.cpp @@ -405,7 +405,7 @@ static MACHINE_CONFIG_START( vt100, vt100_state ) MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(vt100_state,vt100_irq_callback) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(80*10, 25*10) @@ -414,7 +414,7 @@ static MACHINE_CONFIG_START( vt100, vt100_state ) MCFG_SCREEN_PALETTE("vt100_video:palette") MCFG_GFXDECODE_ADD("gfxdecode", "vt100_video:palette", vt100) -// MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") +// MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEFAULT_LAYOUT( layout_vt100 ) diff --git a/src/mame/drivers/vt220.cpp b/src/mame/drivers/vt220.cpp index 42fcb2ea2c1..bdb1ebd9a99 100644 --- a/src/mame/drivers/vt220.cpp +++ b/src/mame/drivers/vt220.cpp @@ -74,7 +74,7 @@ static MACHINE_CONFIG_START( vt220, vt220_state ) MCFG_SCREEN_UPDATE_DRIVER(vt220_state, screen_update_vt220) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mame/drivers/vt240.cpp b/src/mame/drivers/vt240.cpp index 153cc6f249f..51a8e280393 100644 --- a/src/mame/drivers/vt240.cpp +++ b/src/mame/drivers/vt240.cpp @@ -219,7 +219,7 @@ static MACHINE_CONFIG_FRAGMENT( vt240_motherboard ) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) // MCFG_VIDEO_START_OVERRIDE(vt240_state,vt240) MCFG_SCREEN_UPDATE_DEVICE("upd7220", upd7220_device, screen_update) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", vt240) MCFG_DEVICE_ADD("upd7220", UPD7220, XTAL_4MHz / 4) diff --git a/src/mame/drivers/vt320.cpp b/src/mame/drivers/vt320.cpp index 5a661b962b6..cb40407e0ac 100644 --- a/src/mame/drivers/vt320.cpp +++ b/src/mame/drivers/vt320.cpp @@ -97,7 +97,7 @@ static MACHINE_CONFIG_START( vt320, vt320_state ) MCFG_SCREEN_UPDATE_DRIVER(vt320_state, screen_update_vt320) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mame/drivers/vt520.cpp b/src/mame/drivers/vt520.cpp index c65c7ebe5ee..c9f88584245 100644 --- a/src/mame/drivers/vt520.cpp +++ b/src/mame/drivers/vt520.cpp @@ -88,7 +88,7 @@ static MACHINE_CONFIG_START( vt520, vt520_state ) MCFG_SCREEN_UPDATE_DRIVER(vt520_state, screen_update_vt520) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") // On the board there are two M5M44256BJ-7 chips // Which are DRAM 256K x 4bit diff --git a/src/mame/drivers/wicat.cpp b/src/mame/drivers/wicat.cpp index 81b17bb1bb2..207c048e7c8 100644 --- a/src/mame/drivers/wicat.cpp +++ b/src/mame/drivers/wicat.cpp @@ -874,13 +874,13 @@ static MACHINE_CONFIG_START( wicat, wicat_state ) MCFG_X2210_ADD("vsram") // XD2210 - MCFG_SCREEN_ADD("screen",RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_SIZE(720,300) MCFG_SCREEN_VISIBLE_AREA(0,720-1,0,300-1) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_UPDATE_DEVICE("video",i8275_device,screen_update) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_DEVICE_ADD("video", I8275, XTAL_19_6608MHz/8) MCFG_I8275_CHARACTER_WIDTH(9) diff --git a/src/mame/drivers/xerox820.cpp b/src/mame/drivers/xerox820.cpp index bb35067b6a1..0e49169dd2d 100644 --- a/src/mame/drivers/xerox820.cpp +++ b/src/mame/drivers/xerox820.cpp @@ -552,7 +552,7 @@ static MACHINE_CONFIG_START( xerox820, xerox820_state ) MCFG_SCREEN_RAW_PARAMS(XTAL_10_69425MHz, 700, 0, 560, 260, 0, 240) MCFG_GFXDECODE_ADD("gfxdecode", "palette", xerox820) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* devices */ MCFG_DEVICE_ADD(Z80PIO_KB_TAG, Z80PIO, XTAL_20MHz/8) @@ -626,7 +626,7 @@ static MACHINE_CONFIG_START( xerox820ii, xerox820ii_state ) MCFG_SCREEN_RAW_PARAMS(XTAL_10_69425MHz, 700, 0, 560, 260, 0, 240) MCFG_GFXDECODE_ADD("gfxdecode", "palette", xerox820ii) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/z1013.cpp b/src/mame/drivers/z1013.cpp index ca1d5c3a3bf..160b2744960 100644 --- a/src/mame/drivers/z1013.cpp +++ b/src/mame/drivers/z1013.cpp @@ -378,7 +378,7 @@ static MACHINE_CONFIG_START( z1013, z1013_state ) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", z1013) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/zorba.cpp b/src/mame/drivers/zorba.cpp index d6ab846e84c..c2275dcf454 100644 --- a/src/mame/drivers/zorba.cpp +++ b/src/mame/drivers/zorba.cpp @@ -353,11 +353,11 @@ static MACHINE_CONFIG_START( zorba, zorba_state ) MCFG_CPU_PROGRAM_MAP(zorba_kbdmem) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_UPDATE_DEVICE("crtc", i8275_device, screen_update) MCFG_GFXDECODE_ADD("gfxdecode", "palette", zorba) - MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") + MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/zrt80.cpp b/src/mame/drivers/zrt80.cpp index dc895e73e9c..ed0cc48ea07 100644 --- a/src/mame/drivers/zrt80.cpp +++ b/src/mame/drivers/zrt80.cpp @@ -280,14 +280,14 @@ static MACHINE_CONFIG_START( zrt80, zrt80_state ) MCFG_CPU_IO_MAP(zrt80_io) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_SCREEN_SIZE(640, 200) MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 200 - 1) MCFG_GFXDECODE_ADD("gfxdecode", "palette", zrt80) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/video/abc1600.cpp b/src/mame/video/abc1600.cpp index 60b05e4fc94..f7ca47d97bb 100644 --- a/src/mame/video/abc1600.cpp +++ b/src/mame/video/abc1600.cpp @@ -187,14 +187,14 @@ MC6845_ON_UPDATE_ADDR_CHANGED( abc1600_mover_device::crtc_update ) static MACHINE_CONFIG_FRAGMENT( abc1600_mover ) MCFG_DEFAULT_LAYOUT(layout_abc1600) - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate MCFG_SCREEN_UPDATE_DRIVER(abc1600_mover_device, screen_update) MCFG_SCREEN_SIZE(958, 1067) MCFG_SCREEN_VISIBLE_AREA(0, 958-1, 0, 1067-1) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_MC6845_ADD(SY6845E_TAG, SY6845E, SCREEN_TAG, XTAL_64MHz/32) MCFG_MC6845_SHOW_BORDER_AREA(true) diff --git a/src/mame/video/abc80.cpp b/src/mame/video/abc80.cpp index 30272f3b0ea..a267538093d 100644 --- a/src/mame/video/abc80.cpp +++ b/src/mame/video/abc80.cpp @@ -201,5 +201,5 @@ MACHINE_CONFIG_FRAGMENT( abc80_video ) MCFG_SCREEN_RAW_PARAMS(XTAL_11_9808MHz/2, ABC80_HTOTAL, ABC80_HBEND, ABC80_HBSTART, ABC80_VTOTAL, ABC80_VBEND, ABC80_VBSTART) MCFG_GFXDECODE_ADD("gfxdecode", "palette", abc80) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/video/abc800.cpp b/src/mame/video/abc800.cpp index ee9fc3a19de..422cf3ae6a0 100644 --- a/src/mame/video/abc800.cpp +++ b/src/mame/video/abc800.cpp @@ -300,12 +300,12 @@ MACHINE_CONFIG_FRAGMENT( abc800m_video ) MCFG_MC6845_UPDATE_ROW_CB(abc800m_state, abc800m_update_row) MCFG_MC6845_OUT_VSYNC_CB(DEVWRITELINE(Z80DART_TAG, z80dart_device, rib_w)) - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t(0xff, 0xff, 0x00)) MCFG_SCREEN_UPDATE_DRIVER(abc800m_state, screen_update) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) MCFG_SCREEN_SIZE(768, 312) MCFG_SCREEN_VISIBLE_AREA(0,768-1, 0, 312-1) - MCFG_PALETTE_ADD_MONOCHROME_YELLOW("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/video/abc802.cpp b/src/mame/video/abc802.cpp index 667f8cfe931..c2786d0b024 100644 --- a/src/mame/video/abc802.cpp +++ b/src/mame/video/abc802.cpp @@ -208,7 +208,7 @@ MACHINE_CONFIG_FRAGMENT( abc802_video ) MCFG_MC6845_UPDATE_ROW_CB(abc802_state, abc802_update_row) MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(abc802_state, vs_w)) - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::amber) MCFG_SCREEN_UPDATE_DRIVER(abc802_state, screen_update) MCFG_SCREEN_REFRESH_RATE(60) @@ -216,5 +216,5 @@ MACHINE_CONFIG_FRAGMENT( abc802_video ) MCFG_SCREEN_SIZE(768, 312) MCFG_SCREEN_VISIBLE_AREA(0,768-1, 0, 312-1) - MCFG_PALETTE_ADD_MONOCHROME_AMBER("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END diff --git a/src/mame/video/apollo.cpp b/src/mame/video/apollo.cpp index 9735f0e334a..32f7256aa94 100644 --- a/src/mame/video/apollo.cpp +++ b/src/mame/video/apollo.cpp @@ -1891,7 +1891,7 @@ void apollo_graphics_15i::device_reset() MACHINE_CONFIG_FRAGMENT( apollo_mono19i ) MCFG_DEFAULT_LAYOUT( layout_apollo ) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_SCREEN_ADD(VIDEO_SCREEN_TAG, RASTER) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) MCFG_SCREEN_REFRESH_RATE(64) diff --git a/src/mame/video/newbrain.cpp b/src/mame/video/newbrain.cpp index 8e6b9f0cc7a..3b39e206397 100644 --- a/src/mame/video/newbrain.cpp +++ b/src/mame/video/newbrain.cpp @@ -180,14 +180,14 @@ GFXDECODE_END MACHINE_CONFIG_FRAGMENT( newbrain_video ) MCFG_DEFAULT_LAYOUT(layout_newbrain) - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DRIVER(newbrain_state, screen_update) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(640, 250) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249) - MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", newbrain) MACHINE_CONFIG_END diff --git a/src/mame/video/osi.cpp b/src/mame/video/osi.cpp index 94dd155454b..eea0822be61 100644 --- a/src/mame/video/osi.cpp +++ b/src/mame/video/osi.cpp @@ -153,7 +153,7 @@ MACHINE_CONFIG_FRAGMENT( osi600_video ) MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0, 32*8-1) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END MACHINE_CONFIG_FRAGMENT( uk101_video ) @@ -164,7 +164,7 @@ MACHINE_CONFIG_FRAGMENT( uk101_video ) MCFG_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 16*16-1) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END MACHINE_CONFIG_FRAGMENT( osi630_video ) diff --git a/src/mame/video/pcd.cpp b/src/mame/video/pcd.cpp index d8c6d2b95e5..66d4b288347 100644 --- a/src/mame/video/pcd.cpp +++ b/src/mame/video/pcd.cpp @@ -160,7 +160,7 @@ static MACHINE_CONFIG_FRAGMENT( pcx_video ) MCFG_SCREEN_UPDATE_DEVICE("crtc", scn2674_device, screen_update) MCFG_GFXDECODE_ADD("gfxdecode", "palette", pcx) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MCFG_SCN2674_VIDEO_ADD("crtc", 0, INPUTLINE("graphics", MCS51_INT0_LINE)); MCFG_SCN2674_TEXT_CHARACTER_WIDTH(8) diff --git a/src/mame/video/v1050.cpp b/src/mame/video/v1050.cpp index 2154b01fb42..a37fcae796b 100644 --- a/src/mame/video/v1050.cpp +++ b/src/mame/video/v1050.cpp @@ -113,12 +113,12 @@ MACHINE_CONFIG_FRAGMENT( v1050_video ) MCFG_MC6845_UPDATE_ROW_CB(v1050_state, crtc_update_row) MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(v1050_state, crtc_vs_w)) - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green) MCFG_SCREEN_UPDATE_DEVICE(H46505_TAG, h46505_device, screen_update) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) MCFG_SCREEN_SIZE(640, 400) MCFG_SCREEN_VISIBLE_AREA(0,640-1, 0, 400-1) - MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette") + MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette") MACHINE_CONFIG_END diff --git a/src/mame/video/vtvideo.cpp b/src/mame/video/vtvideo.cpp index b4d5b40ab55..45bcfe5da79 100644 --- a/src/mame/video/vtvideo.cpp +++ b/src/mame/video/vtvideo.cpp @@ -928,7 +928,7 @@ TIMER_CALLBACK_MEMBER(vt100_video_device::lba7_change) } static MACHINE_CONFIG_FRAGMENT(vt100_video) -MCFG_PALETTE_ADD_MONOCHROME_GREEN("palette") + MCFG_PALETTE_ADD_MONOCHROME("palette") MACHINE_CONFIG_END //------------------------------------------------- @@ -942,7 +942,7 @@ machine_config_constructor vt100_video_device::device_mconfig_additions() const } static MACHINE_CONFIG_FRAGMENT(rainbow_video) -MCFG_PALETTE_ADD("palette", 4) + MCFG_PALETTE_ADD("palette", 4) MACHINE_CONFIG_END //------------------------------------------------- -- cgit v1.2.3-70-g09d2 From de94132b261e846d2cc4d1aa6d8cd61797a00329 Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Sat, 12 Mar 2016 04:18:02 -0500 Subject: Change default value of autoboot_delay to 0. The LUA scripts themselves can use wait() to delay. (nw) --- src/emu/emuopts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index bf83f2d6ace..332c9c2d787 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -190,7 +190,7 @@ const options_entry emu_options::s_option_entries[] = { OPTION_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" }, { OPTION_UI_MOUSE, "1", OPTION_BOOLEAN, "display ui mouse cursor" }, { OPTION_AUTOBOOT_COMMAND ";ab", nullptr, OPTION_STRING, "command to execute after machine boot" }, - { OPTION_AUTOBOOT_DELAY, "2", OPTION_INTEGER, "timer delay in sec to trigger command execution on autoboot" }, + { OPTION_AUTOBOOT_DELAY, "0", OPTION_INTEGER, "timer delay in sec to trigger command execution on autoboot" }, { OPTION_AUTOBOOT_SCRIPT ";script", nullptr, OPTION_STRING, "lua script to execute after machine boot" }, { OPTION_CONSOLE, "0", OPTION_BOOLEAN, "enable emulator LUA console" }, { OPTION_LANGUAGE ";lang", "English", OPTION_STRING, "display language" }, -- cgit v1.2.3-70-g09d2 From dcab55bf53b94713a6f72e9633f5101c8dd6c08c Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 12 Mar 2016 10:49:20 +0100 Subject: fix for VS builds by Vas (nw) --- src/lib/util/strformat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/util/strformat.h b/src/lib/util/strformat.h index 0b65e942e9f..8eb5f791ed0 100644 --- a/src/lib/util/strformat.h +++ b/src/lib/util/strformat.h @@ -1111,7 +1111,7 @@ protected: format_argument const *arguments, std::enable_if_t >::value, std::size_t> argument_count) : m_begin(fmt.empty() ? nullptr : &*std::cbegin(fmt)) - , m_end(fmt.empty() ? nullptr : &*std::cend(fmt)) + , m_end(fmt.empty() ? nullptr : (m_begin + std::distance(std::cbegin(fmt), std::cend(fmt)))) , m_check_nul(true) , m_arguments(arguments) , m_argument_count(argument_count) -- cgit v1.2.3-70-g09d2