This commit is contained in:
Brad Hughes 2016-03-19 12:00:57 -04:00
commit bcf2c50e13
17 changed files with 146 additions and 46 deletions

View File

@ -520,6 +520,18 @@ C1066 - ??
</part> </part>
</software> </software>
<software name="gprace" supported="no">
<description>GP Race</description>
<year>1992</year>
<publisher>Bit Corporation</publisher>
<info name="serial" value="C1056" />
<part name="cart" interface="gamate_cart">
<dataarea name="rom" size="131072">
<rom name="c1-056.bin" size="131072" crc="447595e4" sha1="1b471f8ac8ffb107c62ec3b765c43e268d90b73a" offset="0" />
</dataarea>
</part>
</software>
<software name="fanttrav" supported="no"> <software name="fanttrav" supported="no">
<description>Fantasy Travel</description> <description>Fantasy Travel</description>
<year>1993</year> <year>1993</year>

View File

@ -9993,14 +9993,14 @@ a certain item) -->
</software> </software>
<software name="mgear"> <software name="mgear">
<description>Master Gear Adapter</description> <description>Master Gear Converter</description>
<year>1991</year> <year>1991</year>
<publisher>Sega</publisher> <publisher>Sega</publisher>
<part name="cart" interface="gamegear_cart"> <part name="cart" interface="gamegear_cart">
<feature name="slot" value="mgear" /> <feature name="slot" value="mgear" />
<feature name="pin_42" value="sms_mode" /> <feature name="pin_42" value="sms_mode" />
<dataarea name="rom" size="1"> <dataarea name="rom" size="1">
<!-- this cartridge is just an adapted --> <!-- this cartridge is just an adapter -->
</dataarea> </dataarea>
</part> </part>
</software> </software>

View File

@ -2376,17 +2376,6 @@
</part> </part>
</software> </software>
<software name="felipe" cloneof="teddyboy">
<description>Felipe em Acao (Bra)</description>
<year>19??</year>
<publisher>Tec Toy</publisher>
<part name="cart" interface="sms_cart">
<dataarea name="rom" size="32768">
<rom name="felipe em acao (b).bin" size="32768" crc="ccb2cab4" sha1="b7601ff0116490b85c9bd50109db175ce2dd9104" offset="000000" />
</dataarea>
</part>
</software>
<software name="ferias"> <software name="ferias">
<description>Férias Frustradas do Pica-Pau (Bra)</description> <description>Férias Frustradas do Pica-Pau (Bra)</description>
<year>1996</year> <year>1996</year>
@ -6720,17 +6709,6 @@
</part> </part>
</software> </software>
<software name="treinam">
<description>Treinamento Do Mymo (Bra)</description>
<year>19??</year>
<publisher>Tec Toy</publisher>
<part name="cart" interface="sms_cart">
<dataarea name="rom" size="262144">
<rom name="treinamento do mymo (b).bin" size="262144" crc="e94784f2" sha1="327c3518363ee060b681ff34c0b2eea3ffea27e4" offset="000000" />
</dataarea>
</part>
</software>
<software name="trivial"> <software name="trivial">
<description>Trivial Pursuit - Genus Edition (Euro)</description> <description>Trivial Pursuit - Genus Edition (Euro)</description>
<year>1992</year> <year>1992</year>

View File

@ -844,6 +844,7 @@ FULLTARGET := $(TARGET)$(SUBTARGET)
endif endif
PROJECTDIR := $(BUILDDIR)/projects/$(OSD)/$(FULLTARGET) PROJECTDIR := $(BUILDDIR)/projects/$(OSD)/$(FULLTARGET)
PROJECTDIR_MINI := $(BUILDDIR)/projects/osdmini/$(FULLTARGET) PROJECTDIR_MINI := $(BUILDDIR)/projects/osdmini/$(FULLTARGET)
PROJECTDIR_SDL := $(BUILDDIR)/projects/sdl/$(FULLTARGET)
PROJECTDIR_WIN := $(BUILDDIR)/projects/windows/$(FULLTARGET) PROJECTDIR_WIN := $(BUILDDIR)/projects/windows/$(FULLTARGET)
.PHONY: all clean regenie generate .PHONY: all clean regenie generate
@ -1306,6 +1307,30 @@ steamlink: generate $(PROJECTDIR)/gmake-steamlink/Makefile
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-steamlink config=$(CONFIG) precompile $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-steamlink config=$(CONFIG) precompile
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-steamlink config=$(CONFIG) $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-steamlink config=$(CONFIG)
#-------------------------------------------------
# gmake-rpi
#-------------------------------------------------
$(PROJECTDIR_SDL)/gmake-rpi/Makefile: makefile $(SCRIPTS) $(GENIE)
ifndef RASPBERRY_SDK_PATH
$(error RASPBERRY_SDK_PATH is not set)
endif
ifndef RASPBERRY_SYSROOT
$(error RASPBERRY_SYSROOT is not set)
endif
$(SILENT) $(GENIE) $(PARAMS) --gcc=rpi --gcc_version=4.9.2 --osd=sdl --targetos=rpi --targetos=rpi --NO_USE_MIDI=1 --PLATFORM=arm --NOASM=1 --USE_QTDEBUG=0 --SDL_INSTALL_ROOT=$(RASPBERRY_SYSROOT)/usr gmake
.PHONY: rpi
ifndef RASPBERRY_SDK_PATH
$(error RASPBERRY_SDK_PATH is not set)
endif
ifndef RASPBERRY_SYSROOT
$(error RASPBERRY_SYSROOT is not set)
endif
rpi: generate $(PROJECTDIR_SDL)/gmake-rpi/Makefile
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_SDL)/gmake-rpi config=$(CONFIG) precompile
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_SDL)/gmake-rpi config=$(CONFIG)
#------------------------------------------------- #-------------------------------------------------
# cmake # cmake
#------------------------------------------------- #-------------------------------------------------

View File

@ -114,6 +114,7 @@ newoption {
{ "haiku", "Haiku" }, { "haiku", "Haiku" },
{ "solaris", "Solaris SunOS" }, { "solaris", "Solaris SunOS" },
{ "steamlink", "Steam Link" }, { "steamlink", "Steam Link" },
{ "rpi", "Raspberry Pi" },
}, },
} }
@ -1098,7 +1099,7 @@ configuration { "pnacl" }
} }
archivesplit_size "20" archivesplit_size "20"
configuration { "linux-*" } configuration { "linux-* or rpi"}
links { links {
"dl", "dl",
"rt", "rt",
@ -1123,6 +1124,19 @@ configuration { "steamlink" }
"EGL_API_FB", "EGL_API_FB",
} }
configuration { "rpi" }
links {
"SDL2",
"fontconfig",
"X11",
"GLESv2",
"EGL",
"bcm_host",
"vcos",
"vchiq_arm",
"pthread",
}
configuration { "osx* or xcode4" } configuration { "osx* or xcode4" }
links { links {
"pthread", "pthread",

View File

@ -726,6 +726,14 @@ end
"-Wno-uninitialized", "-Wno-uninitialized",
"-Wno-unused-function", "-Wno-unused-function",
} }
configuration { "rpi" }
buildoptions {
"-Wno-unused-but-set-variable",
"-Wno-unused-variable",
}
defines {
"__STDC_VERSION__=199901L",
}
configuration { } configuration { }

View File

@ -103,6 +103,9 @@ end
configuration { "mingw*" or "vs*" } configuration { "mingw*" or "vs*" }
targetextension ".exe" targetextension ".exe"
configuration { "rpi" }
targetextension ""
configuration { "asmjs" } configuration { "asmjs" }
targetextension ".bc" targetextension ".bc"
if os.getenv("EMSCRIPTEN") then if os.getenv("EMSCRIPTEN") then

View File

@ -245,6 +245,16 @@ function toolchain(_buildDir, _subDir)
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-steamlink") location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-steamlink")
end end
if "rpi" == _OPTIONS["gcc"] then
if not os.getenv("RASPBERRY_SDK_PATH") then
print("Set RASPBERRY_SDK_PATH envrionment variable.")
end
premake.gcc.cc = "$(RASPBERRY_SDK_PATH)/bin/arm-linux-gnueabihf-gcc"
premake.gcc.cxx = "$(RASPBERRY_SDK_PATH)/bin/arm-linux-gnueabihf-g++"
premake.gcc.ar = "$(RASPBERRY_SDK_PATH)/bin/arm-linux-gnueabihf-ar"
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-rpi")
end
if "mingw32-gcc" == _OPTIONS["gcc"] then if "mingw32-gcc" == _OPTIONS["gcc"] then
if not os.getenv("MINGW32") then if not os.getenv("MINGW32") then
print("Set MINGW32 envrionment variable.") print("Set MINGW32 envrionment variable.")
@ -511,6 +521,37 @@ function toolchain(_buildDir, _subDir)
configuration { "steamlink", "Debug" } configuration { "steamlink", "Debug" }
targetdir (_buildDir .. "steamlink/bin/Debug") targetdir (_buildDir .. "steamlink/bin/Debug")
configuration { "rpi" }
objdir ( _buildDir .. "rpi/obj")
libdirs {
"$(RASPBERRY_SYSROOT)/opt/vc/lib",
}
includedirs {
"$(RASPBERRY_SYSROOT)/opt/vc/include",
"$(RASPBERRY_SYSROOT)/opt/vc/include/interface/vcos/pthreads",
"$(RASPBERRY_SYSROOT)/opt/vc/include/interface/vmcs_host/linux",
}
defines {
"__VCCOREVER__=0x04000000", -- There is no special prefedined compiler symbol to detect RaspberryPi, faking it.
}
linkoptions {
"-Wl,--gc-sections",
}
buildoptions {
"--sysroot=$(RASPBERRY_SYSROOT)",
}
linkoptions {
"-static-libgcc",
"-static-libstdc++",
"--sysroot=$(RASPBERRY_SYSROOT)",
}
configuration { "rpi", "Release" }
targetdir (_buildDir .. "rpi/bin/Release")
configuration { "rpi", "Debug" }
targetdir (_buildDir .. "rpi/bin/Debug")
configuration { "mingw-clang" } configuration { "mingw-clang" }
linkoptions { linkoptions {
"-Wl,--allow-multiple-definition", "-Wl,--allow-multiple-definition",

View File

@ -275,7 +275,7 @@ int a78_cart_slot_device::validate_header(int head, bool log)
{ {
if (log) if (log)
{ {
osd_printf_info("Unsupported mapper, please contact MESSdevs (Header 0x%X)\n", head); osd_printf_info("Unsupported mapper, please contact MAMEdevs (Header 0x%X)\n", head);
osd_printf_info("Disabling special bits\n"); osd_printf_info("Disabling special bits\n");
} }
head &= 0x00ff; head &= 0x00ff;
@ -414,7 +414,7 @@ bool a78_cart_slot_device::call_load()
break; break;
} }
// check if cart has a POKEY at $0450 (typically a VersaBoard variant)! // check if cart has a POKEY at $0450 (typically a VersaBoard variant)
if (mapper & 0x40) if (mapper & 0x40)
{ {
if (m_type != A78_TYPE2) if (m_type != A78_TYPE2)
@ -434,13 +434,13 @@ bool a78_cart_slot_device::call_load()
if (head[58] == 1) if (head[58] == 1)
{ {
osd_printf_info("This cart support external NVRAM savings, using HSC.\n"); osd_printf_info("This cart supports external NVRAM using HSC.\n");
osd_printf_info("Run it with the High Score Cart mounted to exploit this feature.\n"); osd_printf_info("Run it with the High Score Cart mounted to exploit this feature.\n");
} }
else if (head[58] == 2) else if (head[58] == 2)
{ {
osd_printf_info("This cart support external NVRAM savings, using SaveKey.\n"); osd_printf_info("This cart supports external NVRAM using SaveKey.\n");
osd_printf_info("This is not supported in MESS currently.\n"); osd_printf_info("This is not supported in MAME currently.\n");
} }
if (head[63]) if (head[63])
@ -714,12 +714,12 @@ WRITE8_MEMBER(a78_cart_slot_device::write_40xx)
bit 3 [0x08] - bank 0 of 144K ROM at $4000 bit 3 [0x08] - bank 0 of 144K ROM at $4000
bit 4 [0x10] - bank 6 at $4000 bit 4 [0x10] - bank 6 at $4000
bit 5 [0x20] - banked RAM at $4000 bit 5 [0x20] - banked RAM at $4000
bit 6 [0x40] - POKEY at $0450
bit 8-15 - Special values bit 8-15 - Special values
0 = Normal cart 0 = Normal cart // normal compared to what? perhaps this should be 'unused'
1 = Absolute (F18 Hornet) 1 = Absolute (F18 Hornet)
2 = Activision (Double Dragon & Rampage) 2 = Activision (Double Dragon & Rampage)
3 = POKEY at $0450
-------------------------------------------------*/ -------------------------------------------------*/
@ -817,6 +817,7 @@ void a78_cart_slot_device::internal_header_logging(UINT8 *header, UINT32 len)
logerror( "\t\tbank0 at $4000: %s\n", BIT(head_mapper, 3) ? "Yes" : "No"); logerror( "\t\tbank0 at $4000: %s\n", BIT(head_mapper, 3) ? "Yes" : "No");
logerror( "\t\tbank6 at $4000: %s\n", BIT(head_mapper, 4) ? "Yes" : "No"); logerror( "\t\tbank6 at $4000: %s\n", BIT(head_mapper, 4) ? "Yes" : "No");
logerror( "\t\tbanked RAM: %s\n", BIT(head_mapper, 5) ? "Yes" : "No"); logerror( "\t\tbanked RAM: %s\n", BIT(head_mapper, 5) ? "Yes" : "No");
logerror( "\t\tPOKEY at $450: %s\n", BIT(head_mapper, 6) ? "Yes" : "No");
logerror( "\t\tSpecial: %s ", (head_mapper & 0xff00) ? "Yes" : "No"); logerror( "\t\tSpecial: %s ", (head_mapper & 0xff00) ? "Yes" : "No");
if (head_mapper & 0xff00) if (head_mapper & 0xff00)
{ {

View File

@ -2,10 +2,16 @@
// copyright-holders:Fabio Priuli // copyright-holders:Fabio Priuli
/*********************************************************************************************************** /***********************************************************************************************************
Master Gear Adapter emulation Master Gear Converter emulation
***********************************************************************************************************/ ***********************************************************************************************************/
// The Master Gear Converter, also known as Master Gear, Gear Master Converter
// or (in Brazil) as Master Gear Adaptor, allows to plug western SMS cartridges
// on the Game Gear, by enabling the SMS compatibility mode on the Game Gear
// cartridge slot. Some SMS games have compatibility issues, confirmed on the
// real hardware, when run on the Game Gear.
#include "emu.h" #include "emu.h"
#include "mgear.h" #include "mgear.h"
@ -18,7 +24,7 @@
const device_type SEGA8_ROM_MGEAR = &device_creator<sega8_mgear_device>; const device_type SEGA8_ROM_MGEAR = &device_creator<sega8_mgear_device>;
sega8_mgear_device::sega8_mgear_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) sega8_mgear_device::sega8_mgear_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: sega8_rom_device(mconfig, SEGA8_ROM_MGEAR, "Master Gear Adapter", tag, owner, clock, "sega8_mgear", __FILE__), : sega8_rom_device(mconfig, SEGA8_ROM_MGEAR, "Master Gear Converter", tag, owner, clock, "sega8_mgear", __FILE__),
m_subslot(*this, "subslot") m_subslot(*this, "subslot")
{ {
} }
@ -38,6 +44,7 @@ void sega8_mgear_device::device_reset()
static MACHINE_CONFIG_FRAGMENT( sub_slot ) static MACHINE_CONFIG_FRAGMENT( sub_slot )
MCFG_SMS_CARTRIDGE_ADD("subslot", sms_cart, nullptr) MCFG_SMS_CARTRIDGE_ADD("subslot", sms_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","sms")
MACHINE_CONFIG_END MACHINE_CONFIG_END
machine_config_constructor sega8_mgear_device::device_mconfig_additions() const machine_config_constructor sega8_mgear_device::device_mconfig_additions() const

View File

@ -6,6 +6,9 @@
**********************************************************************/ **********************************************************************/
// This emulated device is the version released by Sega. In Brazil, Tec Toy
// released a version that does not have any switch to turn on/off auto-repeat.
#include "rfu.h" #include "rfu.h"
@ -16,7 +19,7 @@
const device_type SMS_RAPID_FIRE = &device_creator<sms_rapid_fire_device>; const device_type SMS_RAPID_FIRE = &device_creator<sms_rapid_fire_device>;
// time interval not verified
#define RAPID_FIRE_INTERVAL attotime::from_hz(10) #define RAPID_FIRE_INTERVAL attotime::from_hz(10)

View File

@ -7,11 +7,17 @@
**********************************************************************/ **********************************************************************/
// The games designed for the US model of the Sports Pad controller use the // The games designed for the US model of the Sports Pad controller use the
// TH line of the controller port as output, to select which nibble, of the // TH line of the controller port to select which nibble, of the two axis
// two axis bytes, will be read at a time. The Japanese cartridge Sports Pad // bytes, will be read at a time. The Japanese cartridge Sports Pad Soccer
// Soccer uses a different mode, because the Sega Mark III lacks TH output, so // uses a different mode, because the Sega Mark III lacks the TH line, so
// there is a different Sports Pad model released in Japan (see sportsjp.c). // there is a different Sports Pad model released in Japan (see sportsjp.c).
// The Japanese SMS has the TH line connected, but doesn't report TH input
// on port 0xDD. However, a magazine raffled the US Sports Pad along with a
// Great Ice Hockey cartridge, in Japanese format, to owners of that console.
// So, Great Ice Hockey seems to just need TH pin as output to work, while
// other games designed for the US Sports Pad don't work on the Japanese SMS.
// It was discovered that games designed for the Paddle Controller, released // It was discovered that games designed for the Paddle Controller, released
// in Japan, switch to a mode incompatible with the original Paddle when // in Japan, switch to a mode incompatible with the original Paddle when
// detect the system region as Export. Similar to how the US model of the // detect the system region as Export. Similar to how the US model of the

View File

@ -8,7 +8,7 @@
// 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 // 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 // used by the US model, due to the missing TH line on Sega Mark III
// controller ports. // controller ports.
#include "sportsjp.h" #include "sportsjp.h"

View File

@ -6,11 +6,6 @@
**********************************************************************/ **********************************************************************/
// 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.
#pragma once #pragma once
#ifndef __SMS_SPORTS_PAD_JP__ #ifndef __SMS_SPORTS_PAD_JP__

View File

@ -6,6 +6,13 @@
**********************************************************************/ **********************************************************************/
// The Gender Adapter is not an official Sega product. It is produced by the
// SMSPower website to permit to plug a cartridge on the expansion slot on any
// SMS 1 model. This includes the Japanese SMS, which has FM sound, so it is
// a way to get FM music of western cartridges that have FM code but were not
// released in Japan. Some games have compatibility issues, confirmed on the
// real hardware, when run plugged-in to the SMS expansion slot.
#include "gender.h" #include "gender.h"

View File

@ -199,7 +199,7 @@ osd_font_sdl::TTF_Font_ptr osd_font_sdl::TTF_OpenFont_Magic(std::string const &n
unsigned char const ttf_magic[] = { 0x00, 0x01, 0x00, 0x00, 0x00 }; unsigned char const ttf_magic[] = { 0x00, 0x01, 0x00, 0x00, 0x00 };
unsigned char const ttc1_magic[] = { 0x74, 0x74, 0x63, 0x66, 0x00, 0x01, 0x00, 0x00 }; unsigned char const ttc1_magic[] = { 0x74, 0x74, 0x63, 0x66, 0x00, 0x01, 0x00, 0x00 };
unsigned char const ttc2_magic[] = { 0x74, 0x74, 0x63, 0x66, 0x00, 0x02, 0x00, 0x00 }; unsigned char const ttc2_magic[] = { 0x74, 0x74, 0x63, 0x66, 0x00, 0x02, 0x00, 0x00 };
constexpr auto buffer_size = std::max({ sizeof(ttf_magic), sizeof(ttc1_magic), sizeof(ttc2_magic) }); auto buffer_size = std::max({ sizeof(ttf_magic), sizeof(ttc1_magic), sizeof(ttc2_magic) });
unsigned char buffer[buffer_size]; unsigned char buffer[buffer_size];
auto const bytes_read = file.read(buffer, buffer_size); auto const bytes_read = file.read(buffer, buffer_size);
file.close(); file.close();

View File

@ -84,7 +84,7 @@ static void* sdlNativeWindowHandle(SDL_Window* _window)
return nullptr; return nullptr;
} }
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD # if BX_PLATFORM_LINUX || BX_PLATFORM_BSD || BX_PLATFORM_RPI
return (void*)wmi.info.x11.window; return (void*)wmi.info.x11.window;
# elif BX_PLATFORM_OSX # elif BX_PLATFORM_OSX
return wmi.info.cocoa.window; return wmi.info.cocoa.window;