From 9f95c4fb8f4dc1a236961592e97a6daba2cff72d Mon Sep 17 00:00:00 2001 From: etabeta78 Date: Fri, 26 Dec 2014 08:00:33 +0100 Subject: (MESS) gamegear: fixed detection of SMS games (via adapter) and added support for connecting a SMS pad to the unit (via Gear2Gear port + adapter) to play 2players games. [Enik Land] out of whatsnew: needless to say, we are not yet in the position to use the Gear2Gear port to link two gamegear units, so don't ask ;-) --- src/emu/bus/bus.mak | 11 ++++++++ src/emu/bus/sms_ctrl/multitap.c | 2 +- src/emu/bus/sms_ctrl/sportsjp.c | 4 +-- src/emu/bus/sms_ctrl/sportsjp.h | 4 +-- src/mess/drivers/sms.c | 45 ++++++++++++++++++++++++------ src/mess/includes/sms.h | 7 ++++- src/mess/machine/sms.c | 61 +++++++++++++++++++++++++++++++---------- src/mess/mess.mak | 1 + 8 files changed, 105 insertions(+), 30 deletions(-) diff --git a/src/emu/bus/bus.mak b/src/emu/bus/bus.mak index 8f1e0e7798a..dceb9529df7 100644 --- a/src/emu/bus/bus.mak +++ b/src/emu/bus/bus.mak @@ -1252,6 +1252,17 @@ BUSOBJS += $(BUSOBJ)/gameboy/rom.o BUSOBJS += $(BUSOBJ)/gameboy/mbc.o endif +#------------------------------------------------- +# +#@src/emu/bus/gamegear/gear2gear.h,BUSES += GAMEGEAR +#------------------------------------------------- + +ifneq ($(filter GAMEGEAR,$(BUSES)),) +OBJDIRS += $(BUSOBJ)/gamegear +BUSOBJS += $(BUSOBJ)/gamegear/gear2gear.o +BUSOBJS += $(BUSOBJ)/gamegear/smsctrladp.o +endif + #------------------------------------------------- # #@src/emu/bus/gba/gba_slot.h,BUSES += GBA diff --git a/src/emu/bus/sms_ctrl/multitap.c b/src/emu/bus/sms_ctrl/multitap.c index 481a331e1dc..6f27588889c 100644 --- a/src/emu/bus/sms_ctrl/multitap.c +++ b/src/emu/bus/sms_ctrl/multitap.c @@ -29,7 +29,7 @@ const device_type SMS_MULTITAP = &device_creator; //------------------------------------------------- sms_multitap_device::sms_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, SMS_MULTITAP, "Furrtek's Multitap", tag, owner, clock, "sms_multitap", __FILE__), + device_t(mconfig, SMS_MULTITAP, "Multitap", tag, owner, clock, "sms_multitap", __FILE__), device_sms_control_port_interface(mconfig, *this), m_subctrl1_port(*this, "ctrl1"), m_subctrl2_port(*this, "ctrl2"), diff --git a/src/emu/bus/sms_ctrl/sportsjp.c b/src/emu/bus/sms_ctrl/sportsjp.c index 9e692e32abf..4fc166ccd3d 100644 --- a/src/emu/bus/sms_ctrl/sportsjp.c +++ b/src/emu/bus/sms_ctrl/sportsjp.c @@ -1,13 +1,13 @@ /********************************************************************** - Sega Master System "Sports Pad" (japanese model) emulation + Sega Master System "Sports Pad" (Japanese model) emulation Copyright MESS Team. Visit http://mamedev.org for licensing and usage restrictions. **********************************************************************/ -// The japanese Sports Pad controller is only required to play the cartridge +// The Japanese Sports Pad controller is only required to play the cartridge // Sports Pad Soccer, released in Japan. It uses a different mode than the // used by the US model, due to missing output lines on Sega Mark III // controller ports. diff --git a/src/emu/bus/sms_ctrl/sportsjp.h b/src/emu/bus/sms_ctrl/sportsjp.h index 065f8293a97..b8b643519fd 100644 --- a/src/emu/bus/sms_ctrl/sportsjp.h +++ b/src/emu/bus/sms_ctrl/sportsjp.h @@ -1,13 +1,13 @@ /********************************************************************** - Sega Master System "Sports Pad" (japanese model) emulation + Sega Master System "Sports Pad" (Japanese model) emulation Copyright MESS Team. Visit http://mamedev.org for licensing and usage restrictions. **********************************************************************/ -// The japanese Sports Pad controller is only required to play the cartridge +// The Japanese Sports Pad controller is only required to play the cartridge // Sports Pad Soccer, released in Japan. It uses a different mode than the // used by the US model, due to missing output lines on Sega Mark III // controller ports. diff --git a/src/mess/drivers/sms.c b/src/mess/drivers/sms.c index d47c95f0cab..7d91e446f95 100644 --- a/src/mess/drivers/sms.c +++ b/src/mess/drivers/sms.c @@ -13,7 +13,6 @@ To do: - SIO interface for Game Gear (needs netplay, I guess) - - Gear to Gear Port SMS Controller Adaptor - Sega Demo Unit II (kiosk expansion device) - SMS Disk System (floppy disk drive expansion device) - unreleased - Rapid button of Japanese Master System @@ -24,7 +23,7 @@ - Software compatibility flags, by region and/or BIOS - Emulate SRAM cartridges? (for use with Bock's dump tool) - Support for other DE-9 compatible controllers, like the Mega Drive 6-Button - that has software support (at least a test tool made by Charles MacDonald) + that has homebrew software support The Game Gear SIO hardware is not emulated but has some placeholders in 'machine/sms.c' @@ -47,6 +46,29 @@ -------------------------------------------------------------------------------- +General compatibility issues on real hardware (not emulation bugs): + +- Some ROMs have issues or don't work when running on a console of different + region; +- Many Japanese/Korean or homebrew ROMs don't have the signature required by + BIOSes of consoles sold overseas; +- Paddle games need to detect the system region as Japanese to work with the + Paddle controller; +- Few games of the ones with FM support need to detect the system region as + Japanese to play FM sound; +- The Light Phaser gun doesn't work with the Japanese SMS; +- There are reports about Light Phaser working on the second Korean console + version, and a Korean advert shows support on the first version (Gam*Boy I, + although based on Japanese SMS); +- The Korean SMS versions have Japanese-format cartridge slot, but only on the + first (Gam*Boy I) the region is detected as Japanese; +- Some SMS ROMs don't run when are plugged-in to SMS expansion slot, through + the gender adapter; +- Some SMS ROMs don't run when are plugged-in to a Game Gear, through the + Master Gear adapter; + +-------------------------------------------------------------------------------- + Sega Master System II Sega 1990 @@ -338,10 +360,10 @@ static ADDRESS_MAP_START( gg_io, AS_IO, 8, sms_state ) AM_RANGE(0x40, 0x7f) AM_DEVWRITE("gamegear", gamegear_device, write) AM_RANGE(0x80, 0x80) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sega315_5124_device, vram_read, vram_write) AM_RANGE(0x81, 0x81) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sega315_5124_device, register_read, register_write) - AM_RANGE(0xc0, 0xc0) AM_READ_PORT("GG_PORT_DC") - AM_RANGE(0xc1, 0xc1) AM_READ_PORT("GG_PORT_DD") - AM_RANGE(0xdc, 0xdc) AM_READ_PORT("GG_PORT_DC") - AM_RANGE(0xdd, 0xdd) AM_READ_PORT("GG_PORT_DD") + AM_RANGE(0xc0, 0xc0) AM_READ(sms_input_port_dc_r) + AM_RANGE(0xc1, 0xc1) AM_READ(sms_input_port_dd_r) + AM_RANGE(0xdc, 0xdc) AM_READ(sms_input_port_dc_r) + AM_RANGE(0xdd, 0xdd) AM_READ(sms_input_port_dd_r) ADDRESS_MAP_END @@ -439,9 +461,6 @@ static INPUT_PORTS_START( gg ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("GG_PORT_DD") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("START") PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("Start") /* Game Gear START */ @@ -785,6 +804,10 @@ static MACHINE_CONFIG_START( gamegear, sms_state ) MCFG_GG_CARTRIDGE_ADD("slot", gg_cart, NULL) MCFG_SOFTWARE_LIST_ADD("cart_list", "gamegear") + + MCFG_GG_GEAR2GEAR_PORT_ADD("gear2gear", gg_gear2gear_port_devices, NULL) + MCFG_GG_GEAR2GEAR_PORT_TH_INPUT_HANDLER(WRITELINE(sms_state, sms_ctrl2_th_input)) // not verified + //MCFG_GG_GEAR2GEAR_PORT_PIXEL_HANDLER(READ32(sms_state, sms_pixel_color)) // only for GG-TV mod MACHINE_CONFIG_END @@ -963,6 +986,10 @@ ROM_END - Sega Mark III Soft Desk 10 - Sega Shooting Zone + The SMS Store Display Unit is labeled PD-W UNIT. Pictures found on Internet + show cartridges with a label where a not-for-sale message is written along + the information that it is for use on the Product Display-Working Unit. + ***************************************************************************/ /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ diff --git a/src/mess/includes/sms.h b/src/mess/includes/sms.h index 3c694451363..7d159a96824 100644 --- a/src/mess/includes/sms.h +++ b/src/mess/includes/sms.h @@ -19,6 +19,7 @@ #define CONTROL1_TAG "ctrl1" #define CONTROL2_TAG "ctrl2" +#include "bus/gamegear/gear2gear.h" #include "bus/sms_ctrl/smsctrl.h" #include "bus/sms_exp/smsexp.h" #include "bus/sega8/sega8_slot.h" @@ -36,6 +37,8 @@ public: m_region_maincpu(*this, "maincpu"), m_port_ctrl1(*this, CONTROL1_TAG), m_port_ctrl2(*this, CONTROL2_TAG), + m_port_gear2gear(*this, "gear2gear"), + m_port_gg_dc(*this, "GG_PORT_DC"), m_port_pause(*this, "PAUSE"), m_port_reset(*this, "RESET"), m_port_start(*this, "START"), @@ -63,6 +66,8 @@ public: required_memory_region m_region_maincpu; optional_device m_port_ctrl1; optional_device m_port_ctrl2; + optional_device m_port_gear2gear; + optional_ioport m_port_gg_dc; optional_ioport m_port_pause; optional_ioport m_port_reset; optional_ioport m_port_start; @@ -195,7 +200,7 @@ protected: void setup_media_slots(); void setup_enabled_slots(); void lphaser_hcount_latch(); - void sms_get_inputs(address_space &space); + void sms_get_inputs(); }; class smssdisp_state : public sms_state diff --git a/src/mess/machine/sms.c b/src/mess/machine/sms.c index b4bdb25e3d0..76c2bf0e527 100644 --- a/src/mess/machine/sms.c +++ b/src/mess/machine/sms.c @@ -45,6 +45,9 @@ WRITE_LINE_MEMBER(sms_state::sms_ctrl1_th_input) WRITE_LINE_MEMBER(sms_state::sms_ctrl2_th_input) { + if (m_is_gamegear && (!m_cartslot->exists() || !m_cartslot->m_cart->get_sms_mode())) + return; + // Check if TH of controller port 2 is set to input (1) if (m_io_ctrl_reg & 0x08) { @@ -63,9 +66,10 @@ WRITE_LINE_MEMBER(sms_state::sms_ctrl2_th_input) } -void sms_state::sms_get_inputs( address_space &space ) +void sms_state::sms_get_inputs() { - UINT8 data1, data2; + UINT8 data1 = 0xff; + UINT8 data2 = 0xff; m_port_dc_reg = 0xff; m_port_dd_reg = 0xff; @@ -74,12 +78,28 @@ void sms_state::sms_get_inputs( address_space &space ) // physical pins numbering. For register bits whose order differs, // it's necessary move the equivalent controller bits to match. - data1 = m_port_ctrl1->port_r(); - m_port_dc_reg &= ~0x0f | data1; // Up, Down, Left, Right - m_port_dc_reg &= ~0x10 | (data1 >> 1); // TL (Button 1) - m_port_dc_reg &= ~0x20 | (data1 >> 2); // TR (Button 2) + if (m_is_gamegear) + { + data1 = m_port_gg_dc->read(); + m_port_dc_reg &= ~0x03f | data1; + } + else + { + data1 = m_port_ctrl1->port_r(); + m_port_dc_reg &= ~0x0f | data1; // Up, Down, Left, Right + m_port_dc_reg &= ~0x10 | (data1 >> 1); // TL (Button 1) + m_port_dc_reg &= ~0x20 | (data1 >> 2); // TR (Button 2) + } - data2 = m_port_ctrl2->port_r(); + if (m_is_gamegear) + { + if (m_cartslot->exists() && m_cartslot->m_cart->get_sms_mode()) + data2 = m_port_gear2gear->port_r(); + } + else + { + data2 = m_port_ctrl2->port_r(); + } m_port_dc_reg &= ~0xc0 | (data2 << 6); // Up, Down m_port_dd_reg &= ~0x03 | (data2 >> 2); // Left, Right m_port_dd_reg &= ~0x04 | (data2 >> 3); // TL (Button 1) @@ -116,7 +136,7 @@ READ8_MEMBER(sms_state::sms_fm_detect_r) } else { - sms_get_inputs(space); + sms_get_inputs(); return m_port_dc_reg; } } @@ -129,6 +149,12 @@ WRITE8_MEMBER(sms_state::sms_io_control_w) UINT8 ctrl1_port_data = 0xff; UINT8 ctrl2_port_data = 0xff; + if (m_is_gamegear && (!m_cartslot->exists() || !m_cartslot->m_cart->get_sms_mode())) + { + m_io_ctrl_reg = data; + return; + } + // Controller Port 1: // check if TR or TH are set to output (0). @@ -171,12 +197,16 @@ WRITE8_MEMBER(sms_state::sms_io_control_w) } if (!m_is_gamegear) m_port_ctrl2->port_w(ctrl2_port_data); + else + m_port_gear2gear->port_w(ctrl2_port_data); // not verified } // check if TH is set to input (1). if (data & 0x08) { if (!m_is_gamegear) ctrl2_port_data &= ~0x40 | m_port_ctrl2->port_r(); + else + ctrl2_port_data &= ~0x40 | m_port_gear2gear->port_r(); // not verified // check if TH input level is high (1) and was output/low (0) if ((ctrl2_port_data & 0x40) && !(m_io_ctrl_reg & 0x88)) @@ -232,17 +262,17 @@ READ8_MEMBER(sms_state::sms_input_port_dc_r) { if (m_is_mark_iii) { - sms_get_inputs(space); + sms_get_inputs(); return m_port_dc_reg; } - if (m_mem_ctrl_reg & IO_CHIP) + if (!m_is_gamegear && (m_mem_ctrl_reg & IO_CHIP)) { return 0xff; } else { - sms_get_inputs(space); + sms_get_inputs(); // Check if TR of controller port 1 is set to output (0) if (!(m_io_ctrl_reg & 0x01)) @@ -260,14 +290,14 @@ READ8_MEMBER(sms_state::sms_input_port_dd_r) { if (m_is_mark_iii) { - sms_get_inputs(space); + sms_get_inputs(); return m_port_dd_reg; } - if (m_mem_ctrl_reg & IO_CHIP) + if (!m_is_gamegear && (m_mem_ctrl_reg & IO_CHIP)) return 0xff; - sms_get_inputs(space); + sms_get_inputs(); // Check if TR of controller port 2 is set to output (0) if (!(m_io_ctrl_reg & 0x04)) @@ -276,12 +306,13 @@ READ8_MEMBER(sms_state::sms_input_port_dd_r) m_port_dd_reg &= ~0x08 | ((m_io_ctrl_reg & 0x40) >> 3); } - if (m_is_smsj) + if (m_is_smsj || (m_is_gamegear && m_is_gg_region_japan)) { // For Japanese Master System, set upper 4 bits with TH/TR // direction bits of IO control register, according to Enri's // docs (http://www43.tok2.com/home/cmpslv/Sms/EnrSms.htm). // This makes the console incapable of using the Light Phaser. + // Assume the same for a Japanese Game Gear. m_port_dd_reg &= ~0x10 | ((m_io_ctrl_reg & 0x01) << 4); m_port_dd_reg &= ~0x20 | ((m_io_ctrl_reg & 0x04) << 3); m_port_dd_reg &= ~0x40 | ((m_io_ctrl_reg & 0x02) << 5); diff --git a/src/mess/mess.mak b/src/mess/mess.mak index c48f3cc031f..9c283ba4bfe 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -595,6 +595,7 @@ BUSES += ECONET BUSES += EP64 BUSES += EPSON_SIO BUSES += GAMEBOY +BUSES += GAMEGEAR BUSES += GBA BUSES += GENERIC BUSES += IEEE488 -- cgit v1.2.3 From 1d8c19a81de6099a9e3ade184245a4e1a43a4556 Mon Sep 17 00:00:00 2001 From: etabeta78 Date: Fri, 26 Dec 2014 08:02:39 +0100 Subject: (MESS) softlist: some more external submissions. nw. --- hash/sol20_cass.xml | 32 ++++---- hash/timex_dock.xml | 227 ++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 176 insertions(+), 83 deletions(-) mode change 100644 => 100755 hash/timex_dock.xml diff --git a/hash/sol20_cass.xml b/hash/sol20_cass.xml index 63dade9f0d2..be1f05b7eed 100644 --- a/hash/sol20_cass.xml +++ b/hash/sol20_cass.xml @@ -67,7 +67,7 @@ Note: No more infos about! Sol Printer I/O Software P/N 727056, Rev. A 19?? - Processor Technology Corp. + Processor Technology Corporation @@ -145,7 +145,7 @@ User Manual at http://www.sol20.org/manuals/als8.pdf ALS-8 program development system 1977 - Processor Technolgy Corp. + Processor Technology Corporation @@ -166,7 +166,7 @@ User Manual at http://www.sol20.org/manuals/atc.pdf Air Traffic Control 1978 - Processor Technolgy + Processor Technology Corporation @@ -182,7 +182,7 @@ Processor Technology Basic/5 - a simple BASIC MTCHS B 1AD9 034D ;21 matches; you play against the computer; last one to pick up a match loses LUNAR B 1AD9 0953 ;Traditional text lunar lander -In SOLOS moniotr "XEQ BASIC" to load/autorun or "GET BASIC" and then "EXEC 0". +In SOLOS monitor "XEQ BASIC" to load/autorun or "GET BASIC" and then "EXEC 0". In BASIC program "XEQ MTCHS" to load/autorun or "GET MTCHS" and then "RUN". In BASIC program "XEQ LUNAR" to load/autorun or "GET LUNAR" and then "RUN". (see note below) @@ -196,7 +196,7 @@ User Manual at http://www.sol20.org/manuals/basic5.pdf Sol BASIC/5 1977 - Processor Technolgy Corp. + Processor Technology Corporation @@ -223,7 +223,7 @@ User Manual at http://www.sol20.org/manuals/chess.pdf 8080 Chess Cassette; P/N 727152 19?? - Processor Technolgy Corp. + Processor Technology Corporation @@ -251,7 +251,7 @@ User Manual at http://www.sol20.org/manuals/debug.pdf DEBUG, Advanced 8080 Debugger; P/N 727132 1978 - Processor Technolgy Corp. + Processor Technology Corporation @@ -275,7 +275,7 @@ User Manual at http://www.sol20.org/manuals/img/edit-img.pdf EDIT, Advanced 8080 Editor; P/N 727142 1978 - Processor Technolgy Corp. + Processor Technology Corporation @@ -307,7 +307,7 @@ User Manual at http://www.sol20.org/manuals/extcassbasic.pdf Extended Cassette BASIC; P/N 727019 1977 - Processor Technolgy Corp. + Processor Technology Corporation @@ -346,7 +346,7 @@ User Manual at http://www.sol20.org/manuals/focal.pdf 8080 Cassette Focal(tm); P/N 727027 1978 - Processor Technolgy Corp. + Processor Technology Corporation @@ -370,7 +370,7 @@ User Manual at http://www.sol20.org/manuals/gamepac1.pdf GAMEPAC 1 1977 - Processor Technolgy Corp. + Processor Technology Corporation @@ -392,7 +392,7 @@ User Manual at http://www.sol20.org/manuals/gamepac2.pdf GAMEPAC 2 1978 - Processor Technolgy Corp. + Processor Technology Corporation @@ -442,7 +442,7 @@ User Manual at http://www.sol20.org/manuals/music.pdf Music System 1977 - Software Technology Corp. + Software Technology @@ -488,7 +488,7 @@ User Manual at http://www.sol20.org/manuals/img/pilot-img.pdf Cassette PILOT P/N 727112 Rev. A 1978 - Processor Technology Corp. + Processor Technology Corporation @@ -572,7 +572,7 @@ User Manual at http://www.sol20.org/manuals/trek80.pdf TREK-80 19?? - Processor Technolgy Corp. + Processor Technology Corporation @@ -778,7 +778,7 @@ More infos http://www.sol20.org/articles/access_v1n4.pdf Access newsletter, Volume 1, issue #4 1977 - Processor Technolgy Corp. + Processor Technology Corporation diff --git a/hash/timex_dock.xml b/hash/timex_dock.xml old mode 100644 new mode 100755 index ba2eb4bce67..08d5b11a705 --- a/hash/timex_dock.xml +++ b/hash/timex_dock.xml @@ -4,10 +4,72 @@ + + + Androids - 19?? - <unknown> + 1983 + Timex Computer @@ -15,10 +77,11 @@ + Backgammon - 19?? - <unknown> + 1983 + Sinclair Research @@ -26,10 +89,11 @@ + Budgeter - 19?? - <unknown> + 1983 + Timex Computer @@ -37,10 +101,11 @@ + Casino1 - 19?? - <unknown> + 1983 + Timex Computer @@ -48,10 +113,11 @@ + Chess - 19?? - <unknown> + 1983 + Timex Computer @@ -59,10 +125,11 @@ + Crazy Bugs - 19?? - <unknown> + 1983 + Timex Computer @@ -70,8 +137,9 @@ + - eToolkit + eToolkit (Toolkit EPROM) 19?? <unknown> @@ -81,10 +149,11 @@ + Flight Simulator - 19?? - <unknown> + 1983 + Timex Computer @@ -92,10 +161,11 @@ + Gyruss - 19?? - <unknown> + 1984 + Parker Software @@ -103,10 +173,11 @@ + Horace & the Spiders - 19?? - <unknown> + 1983 + Timex Computer @@ -114,10 +185,11 @@ + Hungry Horace - 19?? - <unknown> + 1983 + Timex Computer @@ -125,10 +197,11 @@ + Jupiter ACE Emulator - 19?? - <unknown> + 1985 + Paul Farrow @@ -136,10 +209,11 @@ + Loco Motion - 19?? - <unknown> + 1984 + Parker Software @@ -147,10 +221,11 @@ + Montezuma's Revenge - 19?? - <unknown> + 1984 + Parker Software @@ -158,10 +233,11 @@ + - MTERM - 19?? - <unknown> + MTERM - Smart Terminal Program + 1983 + Westridge Communications @@ -169,10 +245,11 @@ + Penetrator - 19?? - <unknown> + 1983 + Timex Computer @@ -180,10 +257,11 @@ + - Pinball - 19?? - <unknown> + Pro Pinball + 1983 + Timex Computer @@ -191,10 +269,11 @@ + Planetoids - 19?? - <unknown> + 1983 + Sinclair Research @@ -202,10 +281,11 @@ + Popeye - 19?? - <unknown> + 1984 + Parker Software @@ -213,10 +293,11 @@ + Q*Bert - 19?? - <unknown> + 1984 + Parker Software @@ -224,10 +305,11 @@ + Return Of The Jedi - Death Star Battle - 19?? - <unknown> + 1984 + Parker Software @@ -235,6 +317,7 @@ + rWP32 @@ -247,10 +330,11 @@ + Shadow of the Unicorn - 19?? - <unknown> + 1985 + Mikro-Gen @@ -258,10 +342,11 @@ + Space Raiders - 19?? - <unknown> + 1983 + Timex Computer @@ -269,10 +354,11 @@ + Star Wars - The Arcade Game - 19?? - <unknown> + 1984 + Parker Software @@ -280,10 +366,11 @@ + States and Capitals - 19?? - <unknown> + 1983 + Timex Computer @@ -291,10 +378,11 @@ + Super Hot-Z Disassembler v2.51 (AROS) 19?? - <unknown> + Ray Kingsley @@ -302,10 +390,11 @@ + Swordfight - 19?? - <unknown> + 1983 + Timex Computer @@ -313,10 +402,11 @@ + Tasword II - 19?? - <unknown> + 1983 + Tasman Software @@ -324,11 +414,11 @@ - + TimeWord - 19?? - <unknown> + 1986 + TMX Portugal @@ -336,10 +426,11 @@ + - vu-calc - 19?? - <unknown> + VU-Calc + 1983 + Timex Computer @@ -347,10 +438,11 @@ + - vu-file - 19?? - <unknown> + VU-File + 1983 + Timex Computer @@ -358,10 +450,11 @@ + Zebra OS 64 - 19?? - <unknown> + 1985 + Zebra Systems -- cgit v1.2.3 From 3d2ff2847152a37e761aa178cc369c2984fd3f51 Mon Sep 17 00:00:00 2001 From: etabeta78 Date: Fri, 26 Dec 2014 08:04:17 +0100 Subject: (MESS) megacdj.xml: started logging data of the original bin+cue used in the creation of the CHDs. this shall be of help to remove bad dumps or keep good ones when redumps become available. while at it, added ring codes when available. nw. --- hash/megacdj.xml | 4256 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 3416 insertions(+), 840 deletions(-) diff --git a/hash/megacdj.xml b/hash/megacdj.xml index b396c0ff65e..017fd41e702 100644 --- a/hash/megacdj.xml +++ b/hash/megacdj.xml @@ -2,17 +2,29 @@ - - - + + After Burner III (Jpn) 1992 CRI + @@ -23,10 +35,16 @@ + AX-101 (Jpn) 1994 Sega + @@ -37,10 +55,33 @@ + Bari-Arm (Jpn) 1993 Human Entertainment + @@ -51,10 +92,56 @@ - Burai - Hachigyoku no Yuushi Densetsu (Jpn) + + Burai - Yatsudama no Yuushi Densetsu (Jpn) 1992 Sega + @@ -64,25 +151,73 @@ - - Capcom no Quiz - Tonosama no Yabou (Jpn) - 1992 - SIMS - - - - - - - - - - + Cosmic Fantasy Stories (Jpn) 1992 Nihon Telenet + @@ -93,10 +228,47 @@ + Cyborg 009 (Jpn) 1993 Nihon Telenet + @@ -107,10 +279,39 @@ + Dennin Aleste - Nobunaga and His Ninja Force (Jpn) 1992 Compile + @@ -121,10 +322,25 @@ + Detonator Orgun (Jpn) 1992 Hot-B + @@ -135,10 +351,25 @@ + Devastator (Jpn) 1993 Wolf Team + @@ -149,10 +380,16 @@ + Dragon's Lair (Jpn) 1994 Sega + @@ -163,10 +400,27 @@ + Dynamic Country Club (Jpn) 1993 Sega + @@ -177,10 +431,39 @@ + Earnest Evans (Jpn) 1991 Wolf Team + @@ -191,10 +474,49 @@ + Egawa Suguru no Super League CD (Jpn) 1993 Sega + @@ -205,10 +527,43 @@ + F1 Circus CD (Jpn) 1994 Nichibutsu + @@ -219,10 +574,43 @@ + Final Fight CD (Jpn) 1993 Sega + @@ -233,10 +621,64 @@ + Gambler Jikochuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Jpn) 1992 Game Arts + @@ -247,10 +689,45 @@ + Game no Kandume Vol.1 (Jpn) 1994 Sega + @@ -261,10 +738,38 @@ + Game no Kandume Vol.2 (Jpn) 1994 Sega + @@ -275,10 +780,52 @@ + Garou Densetsu Special (Jpn) 1995 Victor Entertainment + @@ -289,10 +836,51 @@ + Heavenly Symphony (Jpn) 1994 Sega + @@ -303,10 +891,30 @@ + Heavy Nova (Jpn) 1991 Micronet + @@ -317,10 +925,38 @@ + Heimdall (Jpn) 1994 Victor Entertainment + @@ -331,10 +967,27 @@ + Jaguar XJ220 (Jpn) 1993 Victor Entertainment + @@ -345,10 +998,31 @@ + Jangou World Cup (Jpn) 1993 Victor Entertainment + @@ -359,10 +1033,19 @@ + Kamen Rider ZO (Jpn) 1994 Toei Animation + @@ -373,10 +1056,39 @@ + Keiou Yuugekitai (Jpn) 1993 Victor Entertainment + @@ -387,10 +1099,28 @@ + Lodoss Tou Senki - Eiyuu Sensou (Jpn) 1994 Sega + @@ -401,10 +1131,18 @@ + Lunar - Eternal Blue (Jpn, Set 1) 1994 Game Arts + @@ -415,10 +1153,66 @@ + Lunar - The Silver Star (Jpn) 1992 Game Arts + @@ -429,10 +1223,23 @@ + Microcosm (Jpn) 1994 Victor Entertainment + @@ -443,10 +1250,53 @@ + Night Striker (Jpn, Kor) 1993 Taito + @@ -457,10 +1307,20 @@ + Night Trap (Jpn) 1993 Sega + @@ -478,10 +1338,16 @@ + Nostalgia 1907 (Jpn) 1991 Takeru + @@ -492,10 +1358,17 @@ + Popful Mail (Jpn) 1994 Sega + @@ -506,10 +1379,39 @@ + Prince of Persia (Jpn) 1992 Victor Entertainment + @@ -520,10 +1422,37 @@ + Pro Yakyuu Super League CD (Jpn) 1992 Sega + @@ -534,10 +1463,55 @@ + Quiz Scramble Special (Jpn, Rev. B) 1992 Sega + @@ -547,11 +1521,60 @@ + + + Quiz Tonosama no Yabou (Jpn) + 1992 + SIMS + + + + + + + + + + + + Ranma ½ - Byakuranaika (Jpn) 1993 NCS + @@ -562,10 +1585,19 @@ + Rise of the Dragon - A Blade Hunter Mystery (Jpn) 1992 Sega + @@ -576,10 +1608,64 @@ + Sangokushi III (Jpn) 1993 Koei + @@ -590,10 +1676,26 @@ - Sega Classic Arcade Collection (Jpn) + + Sega Classic Arcade Collection - Limited Edition (Jpn) 1993 Sega + @@ -604,10 +1706,61 @@ + Seima Densetsu 3x3 Eyes (Jpn) 1993 Sega + @@ -618,10 +1771,99 @@ + Seirei Shinseiki - Fhey Area (Jpn) 1992 Wolf Team + @@ -632,10 +1874,28 @@ + Shadow of the Beast II - Juushin no Jubaku (Jpn) 1994 Victor Entertainment + @@ -646,10 +1906,43 @@ + Shin Megami Tensei (Jpn) 1994 SIMS + @@ -660,10 +1953,49 @@ + Shining Force CD (Jpn) 1994 Sega + @@ -674,10 +2006,22 @@ + Silpheed (Jpn) 1993 Game Arts + @@ -688,10 +2032,36 @@ + Sol-Feace (Jpn) 1991 Wolf Team + @@ -702,10 +2072,49 @@ + Sonic The Hedgehog CD (Jpn) 1993 Sega + @@ -716,10 +2125,16 @@ + Star Wars - Rebel Assault (Jpn) 19?? Victor Entertainment + @@ -730,10 +2145,16 @@ + Starblade (Jpn) 1994 Namco + @@ -744,10 +2165,60 @@ + Switch (Jpn) 1993 Sega + @@ -758,10 +2229,23 @@ + Tenbu Mega CD Special (Jpn) 1992 Wolf Team + @@ -772,10 +2256,33 @@ + Tenkafubu - Eiyuutachi no Houkou (Jpn) 1991 Game Arts + @@ -786,10 +2293,16 @@ + Thunder Storm FX (Jpn) 1992 Wolf Team + @@ -800,10 +2313,25 @@ + Thunderhawk (Jpn) 1993 Victor Entertainment + @@ -814,10 +2342,16 @@ + Time Gal (Jpn) 1992 Wolf Team + @@ -828,10 +2362,17 @@ + Urusei Yatsura - Dear My Friends (Jpn) 1994 Game Arts + @@ -842,10 +2383,31 @@ + Vay - Ryuusei no Yoroi (Jpn) 1993 SIMS + @@ -856,10 +2418,19 @@ + Wakusei Woodstock - Funky Horror Band (Jpn) 1991 Sega + @@ -870,10 +2441,20 @@ + Wing Commander (Jpn) 1994 Sega + @@ -884,10 +2465,33 @@ + Winning Post (Jpn) 1993 Koei + @@ -898,10 +2502,25 @@ + Wolfchild (Jpn) 1993 Victor Entertainment + @@ -912,10 +2531,35 @@ + Wonder Dog (Jpn) 1992 Victor Entertainment + @@ -926,10 +2570,16 @@ + Yumemi Yakata no Monogatari (Jpn) 1993 Sega + @@ -940,10 +2590,18 @@ + Yumimi Mix (Jpn) 1993 Game Arts + @@ -953,10 +2611,68 @@ - + + A-Rank Thunder Tanjouhen (Jpn) 1993 Nihon Telenet @@ -971,6 +2687,48 @@ + After Armageddon Gaiden - Majuu Toushouden Eclipse (Jpn) 1994 Sega @@ -984,20 +2742,27 @@ - - + Aisle Lord (Jpn) 1992 Wolf Team @@ -1012,6 +2777,45 @@ + Alshark (Jpn) 1993 Polydor K.K. @@ -1026,6 +2830,40 @@ + Anett Futatabi (Jpn) 1993 Wolf Team @@ -1040,6 +2878,99 @@ + Aoki Ookami to Shiroki Mejika - Genchou Hishi (Jpn) 1993 Koei @@ -1054,6 +2985,30 @@ + Arcus I-II-III (Jpn) 1993 Wolf Team @@ -1068,6 +3023,68 @@ + Arslan Senki - The Heroic Legend of Arslan (Jpn) 1993 Sega @@ -1081,20 +3098,47 @@ - - + Baku-den - The Unbalanced Zone (Jpn) 1994 Sony Music Entertainment @@ -1108,20 +3152,55 @@ - - + Battle Fantasy (Jpn) 1994 Micronet @@ -1136,6 +3215,59 @@ + Battlecorps - 3D Mechanical Battle Simulator (Jpn) 1994 Victor Entertainment @@ -1150,6 +3282,32 @@ + Black Hole Assault (Jpn) 1992 Micronet @@ -1163,33 +3321,13 @@ - - - - + Captain Tsubasa (Jpn) 1994 Tecmo @@ -1203,33 +3341,16 @@ - - - - + Daihoushinden (Jpn) 1995 Victor Entertainment @@ -1244,6 +3365,21 @@ + Dark Wizard - Yomigaeri Shiyami no Madoushi (Jpn) 1993 Sega @@ -1258,6 +3394,23 @@ + Death Bringer - Himerata Monshou - The Knight of Darkness (Jpn) 1992 Nihon Telenet @@ -1271,12 +3424,25 @@ - - - Denei Toshi - Illusion City (Jpn) + + + Illusion City - Genei Toshi (Jpn) 1993 Micro Cabin + @@ -1286,46 +3452,12 @@ - - - - - - + Double Switch (Jpn) 1995 Sega @@ -1339,20 +3471,17 @@ - - + Dungeon Master II - Skullkeep (Jpn, v1.0) 1994 Victor Entertainment @@ -1366,34 +3495,27 @@ - - - - + Ecco the Dolphin CD (Jpn, Disc 1 - Ecco the Dolphin) 1995 Sega @@ -1408,6 +3530,26 @@ + Ecco the Dolphin CD (Jpn, Disc 2 - Ecco the Dolphin II) 1995 Sega @@ -1421,20 +3563,66 @@ - - + Eye of the Beholder (Jpn) 1994 Pony Canyon @@ -1448,20 +3636,12 @@ - - + Fahrenheit (Jpn) 1995 Sega @@ -1475,113 +3655,56 @@ - - - - - - - - - - - - - - - - - - + The IIIrd World War (Jpn) 1993 Micronet @@ -1596,6 +3719,11 @@ + Ishii Hisaichi no Daisekai (Jpn) 1994 Sega @@ -1609,33 +3737,42 @@ - - - - + Jurassic Park (Jpn) 1994 Sega @@ -1649,33 +3786,33 @@ - - - - + Lethal Enforcers (Jpn) 1993 Konami @@ -1690,6 +3827,32 @@ + Lethal Enforcers II - The Western (Jpn) 1994 Konami @@ -1703,26 +3866,20 @@ - - - + Lunar - Eternal Blue (Jpn, Set 2) 1994 Game Arts + @@ -1733,11 +3890,18 @@ - + Lunar - Eternal Blue (Jpn, Set 3) 1994 Game Arts + @@ -1749,11 +3913,66 @@ - + Lunar - The Silver Star (Jpn, R1M) 1992 Game Arts + @@ -1764,11 +3983,66 @@ - - Lunar - The Silver Star (Jpn, R2M) + + Lunar - The Silver Star (Jpn, R2) 1992 Game Arts + @@ -1779,11 +4053,49 @@ - + Mahou no Shoujo - Silky Lip (Jpn, R2M) 1992 Nihon Telenet + @@ -1794,11 +4106,49 @@ - + Mahou no Shoujo - Silky Lip (Jpn, R1M) 1992 Nihon Telenet + @@ -1809,6 +4159,26 @@ + Mega Schwarzschild (Jpn) 1993 Sega @@ -1822,20 +4192,56 @@ - - + Might and Magic III - Isles of Terra (Jpn) 1993 CRI @@ -1850,6 +4256,30 @@ + Mortal Kombat (Jpn) 1994 Acclaim Japan @@ -1864,6 +4294,18 @@ + NBA Jam (Jpn) 1993 Acclaim Japan @@ -1877,39 +4319,30 @@ - - - - + The Ninjawarriors (Jpn) 1993 Taito @@ -1924,6 +4357,22 @@ + Nobunaga no Yabou - Haouden (Jpn) 1994 Koei @@ -1937,46 +4386,16 @@ - - - - - - + Prize Fighter (Jpn) 1995 Sega @@ -1996,21 +4415,17 @@ - - - + Psychic Detective Series vol.3 - AYA (Jpn) 1993 Data West @@ -2025,6 +4440,16 @@ + Psychic Detective Series vol.4 - Orgel (Jpn) 1993 Data West @@ -2040,11 +4465,55 @@ - + Quiz Scramble Special (Jpn, R1M) 1992 Sega + @@ -2055,11 +4524,55 @@ - + Quiz Scramble Special (Jpn, R2M) 1992 Sega + @@ -2069,33 +4582,14 @@ - - - - + Road Blaster FX (Jpn) 1992 Wolf Team @@ -2109,20 +4603,37 @@ - - + The Secret of Monkey Island - Monkey Island Yurei - Kaizoku Oosoudou! (Jpn) 1993 Victor Entertainment @@ -2138,10 +4649,26 @@ + Sega Classic Arcade Collection - Limited Edition (Jpn, R1M) 1993 Sega + @@ -2152,10 +4679,26 @@ + Sega Classic Arcade Collection - Limited Edition (Jpn, R2M) 1993 Sega + @@ -2165,26 +4708,101 @@ - - - + Seirei Shinseiki - Fhey Area (Jpn, R1K) 1992 Wolf Team + @@ -2195,11 +4813,99 @@ - + Seirei Shinseiki - Fhey Area (Jpn, R2K) 1992 Wolf Team + @@ -2210,6 +4916,40 @@ + Sengoku Denshou (Jpn) 1993 Sammy @@ -2223,20 +4963,13 @@ - - + Shadowrun (Jpn) 1996 Compile @@ -2250,46 +4983,32 @@ - - - - - - + SimEarth (Jpn) 1993 Sega @@ -2303,33 +5022,27 @@ - - - - + SoulStar (Jpn) 1994 Victor Entertainment @@ -2343,78 +5056,18 @@ - - - - - - - - - - - + Thunder Storm FX (Jpn, R1) 19?? Sega + @@ -2425,11 +5078,16 @@ - + Thunder Storm FX (Jpn, R2) 1992 Wolf Team + @@ -2439,33 +5097,12 @@ - - - - + Tomcat Alley (Jpn) 1994 Sega @@ -2479,46 +5116,13 @@ - - - - - - + Warau Salesman (Jpn) 1993 Sega @@ -2532,87 +5136,27 @@ - - - - - - - - - - - - + + Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (Jpn, Demo) 1994 Sega @@ -2624,6 +5168,14 @@ + Lunar - Eternal Blue - Premium CD (Jpn) [CD-Audio] 1994 Game Arts @@ -2636,6 +5188,24 @@ + Nostalgia 1907 in North Atlantic Sea - Original Sound Track Ver. 2 (Jpn) [CD-Audio] 1992 Takeru @@ -2647,6 +5217,11 @@ + Tenbu Mega CD Special (Jpn) [CD-Audio] 1992 Wolf Team @@ -2658,6 +5233,7 @@ + -- cgit v1.2.3 From 1ec4af617afaa2f2a08cef680256e4dcd14e53a6 Mon Sep 17 00:00:00 2001 From: etabeta78 Date: Fri, 26 Dec 2014 08:06:05 +0100 Subject: adding the new sourcefiles would have helped probably... ;) --- src/emu/bus/gamegear/gear2gear.c | 120 +++++++++++++++++++++++++++++++++++++ src/emu/bus/gamegear/gear2gear.h | 123 ++++++++++++++++++++++++++++++++++++++ src/emu/bus/gamegear/smsctrladp.c | 95 +++++++++++++++++++++++++++++ src/emu/bus/gamegear/smsctrladp.h | 57 ++++++++++++++++++ 4 files changed, 395 insertions(+) create mode 100644 src/emu/bus/gamegear/gear2gear.c create mode 100644 src/emu/bus/gamegear/gear2gear.h create mode 100644 src/emu/bus/gamegear/smsctrladp.c create mode 100644 src/emu/bus/gamegear/smsctrladp.h diff --git a/src/emu/bus/gamegear/gear2gear.c b/src/emu/bus/gamegear/gear2gear.c new file mode 100644 index 00000000000..fe4975b5394 --- /dev/null +++ b/src/emu/bus/gamegear/gear2gear.c @@ -0,0 +1,120 @@ +/********************************************************************** + + Sega Game Gear "Gear to Gear Port" emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "gear2gear.h" +// slot devices +#include "smsctrladp.h" + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +const device_type GG_GEAR2GEAR_PORT = &device_creator; + + + +//************************************************************************** +// CARD INTERFACE +//************************************************************************** + +//------------------------------------------------- +// device_gg_gear2gear_port_interface - constructor +//------------------------------------------------- + +device_gg_gear2gear_port_interface::device_gg_gear2gear_port_interface(const machine_config &mconfig, device_t &device) + : device_slot_card_interface(mconfig,device) +{ + m_port = dynamic_cast(device.owner()); +} + + +//------------------------------------------------- +// ~device_gg_gear2gear_port_interface - destructor +//------------------------------------------------- + +device_gg_gear2gear_port_interface::~device_gg_gear2gear_port_interface() +{ +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// gg_gear2gear_port_device - constructor +//------------------------------------------------- + +gg_gear2gear_port_device::gg_gear2gear_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, GG_GEAR2GEAR_PORT, "Gear to Gear Port", tag, owner, clock, "gg_gear2gear_port", __FILE__), + device_slot_interface(mconfig, *this), + m_th_pin_handler(*this), + m_pixel_handler(*this) +{ +} + + +//------------------------------------------------- +// gg_gear2gear_port_device - destructor +//------------------------------------------------- + +gg_gear2gear_port_device::~gg_gear2gear_port_device() +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void gg_gear2gear_port_device::device_start() +{ + m_device = dynamic_cast(get_card_device()); + + m_th_pin_handler.resolve_safe(); + m_pixel_handler.resolve_safe(0); +} + + +UINT8 gg_gear2gear_port_device::port_r() +{ + UINT8 data = 0xff; + if (m_device) + data = m_device->peripheral_r(); + return data; +} + +void gg_gear2gear_port_device::port_w( UINT8 data ) +{ + if (m_device) + m_device->peripheral_w(data); +} + + +void gg_gear2gear_port_device::th_pin_w(int state) +{ + m_th_pin_handler(state); +} + +UINT32 gg_gear2gear_port_device::pixel_r() +{ + return m_pixel_handler(); +} + + +//------------------------------------------------- +// SLOT_INTERFACE( gg_gear2gear_port_devices ) +//------------------------------------------------- + +SLOT_INTERFACE_START( gg_gear2gear_port_devices ) + SLOT_INTERFACE("smsctrladp", SMS_CTRL_ADAPTOR) +SLOT_INTERFACE_END diff --git a/src/emu/bus/gamegear/gear2gear.h b/src/emu/bus/gamegear/gear2gear.h new file mode 100644 index 00000000000..901d91c4b80 --- /dev/null +++ b/src/emu/bus/gamegear/gear2gear.h @@ -0,0 +1,123 @@ +/********************************************************************** + + Sega Game Gear "Gear to Gear Port" emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +********************************************************************** + + +**********************************************************************/ + +#pragma once + +#ifndef __GG_GEAR2GEAR_PORT__ +#define __GG_GEAR2GEAR_PORT__ + +#include "emu.h" + + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_GG_GEAR2GEAR_PORT_ADD(_tag, _slot_intf, _def_slot) \ + MCFG_DEVICE_ADD(_tag, GG_GEAR2GEAR_PORT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) +#define MCFG_GG_GEAR2GEAR_PORT_MODIFY(_tag) \ + MCFG_DEVICE_MODIFY(_tag) + + +#define MCFG_GG_GEAR2GEAR_PORT_TH_INPUT_HANDLER(_devcb) \ + devcb = &gg_gear2gear_port_device::set_th_input_handler(*device, DEVCB_##_devcb); + + +#define MCFG_GG_GEAR2GEAR_PORT_PIXEL_HANDLER(_devcb) \ + devcb = &gg_gear2gear_port_device::set_pixel_handler(*device, DEVCB_##_devcb); + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> gg_gear2gear_port_device + +class device_gg_gear2gear_port_interface; + +class gg_gear2gear_port_device : public device_t, + public device_slot_interface +{ +public: + // construction/destruction + gg_gear2gear_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~gg_gear2gear_port_device(); + + // static configuration helpers + template static devcb_base &set_th_input_handler(device_t &device, _Object object) { return downcast(device).m_th_pin_handler.set_callback(object); } + + template static devcb_base &set_pixel_handler(device_t &device, _Object object) { return downcast(device).m_pixel_handler.set_callback(object); } + + // Currently, only the support for SMS Controller Adaptor is emulated, + // for when SMS Compatibility mode is enabled. In that mode, the 10 + // pins of the Gear to Gear Port follows the same numbering of a SMS + // Control port. + + // Data returned by the port_r methods: + // bit 0 - pin 1 - Up + // bit 1 - pin 2 - Down + // bit 2 - pin 3 - Left + // bit 3 - pin 4 - Right + // bit 4 - pin 5 - Vcc (no data) + // bit 5 - pin 6 - TL (Button 1/Light Phaser Trigger) + // bit 6 - pin 7 - TH (Light Phaser sensor) + // pin 8 - GND + // bit 7 - pin 9 - TR (Button 2) + // pin 10 - Not connected + // + UINT8 port_r(); + void port_w( UINT8 data ); + + void th_pin_w(int state); + UINT32 pixel_r(); + +//protected: + // device-level overrides + virtual void device_start(); + + device_gg_gear2gear_port_interface *m_device; + +private: + devcb_write_line m_th_pin_handler; + devcb_read32 m_pixel_handler; +}; + + +// ======================> device_gg_gear2gear_port_interface + +// class representing interface-specific live sms_expansion card +class device_gg_gear2gear_port_interface : public device_slot_card_interface +{ +public: + // construction/destruction + device_gg_gear2gear_port_interface(const machine_config &mconfig, device_t &device); + virtual ~device_gg_gear2gear_port_interface(); + + virtual UINT8 peripheral_r() { return 0xff; }; + virtual void peripheral_w(UINT8 data) { }; + +protected: + gg_gear2gear_port_device *m_port; +}; + + +// device type definition +extern const device_type GG_GEAR2GEAR_PORT; + + +SLOT_INTERFACE_EXTERN( gg_gear2gear_port_devices ); + + +#endif diff --git a/src/emu/bus/gamegear/smsctrladp.c b/src/emu/bus/gamegear/smsctrladp.c new file mode 100644 index 00000000000..a2f8ca60c07 --- /dev/null +++ b/src/emu/bus/gamegear/smsctrladp.c @@ -0,0 +1,95 @@ +/********************************************************************** + + Sega Game Gear "Gear to Gear Port SMS Controller Adaptor" emulation + Also known as "Master Link" cable. + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "smsctrladp.h" + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type SMS_CTRL_ADAPTOR = &device_creator; + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// sms_ctrl_adaptor_device - constructor +//------------------------------------------------- + +sms_ctrl_adaptor_device::sms_ctrl_adaptor_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, SMS_CTRL_ADAPTOR, "SMS Controller Adaptor", tag, owner, clock, "sms_ctrl_adaptor", __FILE__), + device_gg_gear2gear_port_interface(mconfig, *this), + m_subctrl_port(*this, "ctrl") +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void sms_ctrl_adaptor_device::device_start() +{ + m_subctrl_port->device_start(); +} + + +//------------------------------------------------- +// sms_peripheral_r - rapid fire read +//------------------------------------------------- + +UINT8 sms_ctrl_adaptor_device::peripheral_r() +{ + return m_subctrl_port->port_r(); +} + + +//------------------------------------------------- +// sms_peripheral_w - rapid fire write +//------------------------------------------------- + +void sms_ctrl_adaptor_device::peripheral_w(UINT8 data) +{ + m_subctrl_port->port_w(data); +} + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +WRITE_LINE_MEMBER( sms_ctrl_adaptor_device::th_pin_w ) +{ + m_port->th_pin_w(state); +} + + +READ32_MEMBER( sms_ctrl_adaptor_device::pixel_r ) +{ + return m_port->pixel_r(); +} + + +static MACHINE_CONFIG_FRAGMENT( sms_adp_slot ) + MCFG_SMS_CONTROL_PORT_ADD("ctrl", sms_control_port_devices, "joypad") + MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(WRITELINE(sms_ctrl_adaptor_device, th_pin_w)) + MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(READ32(sms_ctrl_adaptor_device, pixel_r)) +MACHINE_CONFIG_END + + +machine_config_constructor sms_ctrl_adaptor_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( sms_adp_slot ); +} diff --git a/src/emu/bus/gamegear/smsctrladp.h b/src/emu/bus/gamegear/smsctrladp.h new file mode 100644 index 00000000000..3547253ded8 --- /dev/null +++ b/src/emu/bus/gamegear/smsctrladp.h @@ -0,0 +1,57 @@ +/********************************************************************** + + Sega Game Gear "Gear to Gear Port SMS Controller Adaptor" emulation + Also known as "Master Link" cable. + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#pragma once + +#ifndef __SMS_CTRL_ADAPTOR__ +#define __SMS_CTRL_ADAPTOR__ + + +#include "emu.h" +#include "gear2gear.h" +#include "../sms_ctrl/smsctrl.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> sms_ctrl_adaptor_device + +class sms_ctrl_adaptor_device : public device_t, + public device_gg_gear2gear_port_interface +{ +public: + // construction/destruction + sms_ctrl_adaptor_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + DECLARE_WRITE_LINE_MEMBER(th_pin_w); + DECLARE_READ32_MEMBER(pixel_r); + +protected: + // device-level overrides + virtual void device_start(); + virtual machine_config_constructor device_mconfig_additions() const; + + // device_gg_gear2gear_port_interface overrides + virtual UINT8 peripheral_r(); + virtual void peripheral_w(UINT8 data); + +private: + required_device m_subctrl_port; +}; + + +// device type definition +extern const device_type SMS_CTRL_ADAPTOR; + + +#endif -- cgit v1.2.3 From 82e58068109f8932732da1cc80761f0ae62e7638 Mon Sep 17 00:00:00 2001 From: Robert Date: Fri, 26 Dec 2014 19:39:21 +1100 Subject: (MESS) excalibur : removed unused code (nw) --- src/mess/drivers/excali64.c | 71 ++------------------------------------------- 1 file changed, 2 insertions(+), 69 deletions(-) diff --git a/src/mess/drivers/excali64.c b/src/mess/drivers/excali64.c index fda5eabd966..94e359d97d3 100644 --- a/src/mess/drivers/excali64.c +++ b/src/mess/drivers/excali64.c @@ -19,7 +19,7 @@ Notes: ToDo: - Colours are approximate. -- Disk controller, works with old wd17xx but crashes on new wd. +- Disk controller, using the old wd17xx because new wd crashes on loading a disk. - Hardware supports 20cm and 13cm floppies, but we only support 13cm as this is the only software that exists. - The schematic shows the audio counter connected to 2MHz, but this produces @@ -29,15 +29,11 @@ ToDo: ****************************************************************************/ -#define NEWFDC 0 - - #include "emu.h" #include "cpu/z80/z80.h" #include "video/mc6845.h" #include "machine/i8251.h" #include "bus/rs232/rs232.h" -//#include "machine/clock.h" #include "machine/pit8253.h" #include "machine/i8255.h" #include "bus/centronics/ctronics.h" @@ -47,14 +43,9 @@ ToDo: #include "machine/z80dma.h" #include "machine/rescap.h" #include "machine/74123.h" -#if NEWFDC -#include "machine/wd_fdc.h" -#include "formats/excali64_dsk.h" -#else #include "machine/wd17xx.h" #include "imagedev/flopdrv.h" #include "formats/basicdsk.h" -#endif class excali64_state : public driver_device { @@ -70,10 +61,6 @@ public: , m_u12(*this, "u12") , m_centronics(*this, "centronics") , m_fdc(*this, "fdc") -#if NEWFDC - , m_floppy0(*this, "fdc:0") - , m_floppy1(*this, "fdc:1") -#endif { } DECLARE_PALETTE_INIT(excali64); @@ -86,9 +73,6 @@ public: DECLARE_WRITE8_MEMBER(porte4_w); DECLARE_READ8_MEMBER(porte8_r); DECLARE_WRITE8_MEMBER(portec_w); -#if NEWFDC - DECLARE_FLOPPY_FORMATS(floppy_formats); -#endif DECLARE_WRITE_LINE_MEMBER(cent_busy_w); DECLARE_WRITE_LINE_MEMBER(busreq_w); DECLARE_READ8_MEMBER(memory_read_byte); @@ -119,13 +103,7 @@ private: required_device m_dma; required_device m_u12; required_device m_centronics; -#if NEWFDC - required_device m_fdc; - required_device m_floppy0; - required_device m_floppy1; -#else required_device m_fdc; -#endif }; static ADDRESS_MAP_START(excali64_mem, AS_PROGRAM, 8, excali64_state) @@ -151,11 +129,7 @@ static ADDRESS_MAP_START(excali64_io, AS_IO, 8, excali64_state) AM_RANGE(0xe4, 0xe7) AM_WRITE(porte4_w) AM_RANGE(0xe8, 0xeb) AM_READ(porte8_r) AM_RANGE(0xec, 0xef) AM_WRITE(portec_w) -#if NEWFDC - AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE("fdc", wd2793_t, read, write) -#else AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE("fdc", wd2793_device, read, write) -#endif ADDRESS_MAP_END @@ -246,15 +220,6 @@ WRITE_LINE_MEMBER( excali64_state::cent_busy_w ) m_centronics_busy = state; } -#if NEWFDC -FLOPPY_FORMATS_MEMBER( excali64_state::floppy_formats ) - FLOPPY_EXCALI64_FORMAT -FLOPPY_FORMATS_END - -static SLOT_INTERFACE_START( excali64_floppies ) - SLOT_INTERFACE( "525dd", FLOPPY_525_DD ) -SLOT_INTERFACE_END -#else static LEGACY_FLOPPY_OPTIONS_START(excali64) LEGACY_FLOPPY_OPTION(excali64_ds, "raw", "Excalibur 64 DS disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, HEADS([2]) @@ -270,21 +235,15 @@ static const floppy_interface excali64_floppy_interface = LEGACY_FLOPPY_OPTIONS_NAME(excali64), NULL }; -#endif // pulses from port E4 bit 5 restart the 74123. After 3.6 secs without a pulse, the motor gets turned off. WRITE8_MEMBER( excali64_state::motor_w ) { m_motor = BIT(data, 0); -#if NEWFDC - m_floppy1->get_device()->mon_w(!m_motor); - m_floppy0->get_device()->mon_w(!m_motor); -#else legacy_floppy_image_device *flop = subdevice(FLOPPY_0); flop->floppy_mon_w(!m_motor); // motor on flop = subdevice(FLOPPY_1); flop->floppy_mon_w(!m_motor); // motor on -#endif } READ8_MEMBER( excali64_state::porte8_r ) @@ -294,20 +253,6 @@ READ8_MEMBER( excali64_state::porte8_r ) WRITE8_MEMBER( excali64_state::porte4_w ) { -#if NEWFDC - floppy_image_device *floppy = NULL; - if (BIT(data, 0)) - floppy = m_floppy0->get_device(); - - if (BIT(data, 1)) - floppy = m_floppy1->get_device(); - - if (floppy) - { - m_fdc->set_floppy(floppy); - floppy->ss_w(BIT(data, 4)); - } -#else if BIT(data, 0) m_fdc->set_drive(0); @@ -315,7 +260,6 @@ WRITE8_MEMBER( excali64_state::porte4_w ) m_fdc->set_drive(1); m_fdc->set_side(BIT(data, 4)); -#endif m_u12->b_w(space,offset, BIT(data, 5)); // motor pulse } @@ -327,11 +271,7 @@ d2 = density select (0 = double) */ WRITE8_MEMBER( excali64_state::portec_w ) { -#if NEWFDC - m_fdc->dden_w(BIT(data, 2)); -#else m_fdc->dden_w(!BIT(data, 2)); -#endif } WRITE_LINE_MEMBER( excali64_state::busreq_w ) @@ -652,18 +592,11 @@ static MACHINE_CONFIG_START( excali64, excali64_state ) /* Devices */ MCFG_CASSETTE_ADD( "cassette" ) -#if NEWFDC - MCFG_WD2793x_ADD("fdc", XTAL_16MHz / 16) - MCFG_WD_FDC_FORCE_READY - MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("dma", z80dma_device, rdy_w)) - MCFG_FLOPPY_DRIVE_ADD("fdc:0", excali64_floppies, "525dd", floppy_image_device::default_floppy_formats)// excali64_state::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("fdc:1", excali64_floppies, "525dd", floppy_image_device::default_floppy_formats) -#else MCFG_DEVICE_ADD("fdc", WD2793, 0) MCFG_WD17XX_DEFAULT_DRIVE2_TAGS MCFG_WD17XX_DRQ_CALLBACK(DEVWRITELINE("dma", z80dma_device, rdy_w)) MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(excali64_floppy_interface) -#endif + MCFG_DEVICE_ADD("dma", Z80DMA, XTAL_16MHz/4) MCFG_Z80DMA_OUT_BUSREQ_CB(WRITELINE(excali64_state, busreq_w)) MCFG_Z80DMA_IN_MREQ_CB(READ8(excali64_state, memory_read_byte)) -- cgit v1.2.3