From 2a02554baa86b42adc74334d8216480f890ccf64 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 22 Jun 2013 17:56:55 +0200 Subject: [PATCH 1/5] Update JNI Makefile and MSVC solutions - new directory 'core' instead of 'source' --- libretro/jni/Android.mk | 2 +- .../msvc-2003-xbox1/msvc-2003-xbox1.vcproj | 106 +++++++++--------- .../msvc/msvc-2010-360/msvc-2010-360.vcxproj | 106 +++++++++--------- .../msvc-2010-360.vcxproj.filters | 96 ++++++++-------- libretro/msvc/msvc-2010/msvc-2010.vcxproj | 98 ++++++++-------- .../msvc/msvc-2010/msvc-2010.vcxproj.filters | 96 ++++++++-------- 6 files changed, 252 insertions(+), 252 deletions(-) diff --git a/libretro/jni/Android.mk b/libretro/jni/Android.mk index 5bae7b7..24da555 100644 --- a/libretro/jni/Android.mk +++ b/libretro/jni/Android.mk @@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -GENPLUS_SRC_DIR := ../../source +GENPLUS_SRC_DIR := ../../core LIBRETRO_DIR := ../ LOCAL_MODULE := retro diff --git a/libretro/msvc/msvc-2003-xbox1/msvc-2003-xbox1.vcproj b/libretro/msvc/msvc-2003-xbox1/msvc-2003-xbox1.vcproj index ffa6eea..f8b8762 100644 --- a/libretro/msvc/msvc-2003-xbox1/msvc-2003-xbox1.vcproj +++ b/libretro/msvc/msvc-2003-xbox1/msvc-2003-xbox1.vcproj @@ -21,7 +21,7 @@ Name="VCCLCompilerTool" Optimization="0" OptimizeForProcessor="2" - AdditionalIncludeDirectories=""$(SolutionDir)\..\..\source";"$(SolutionDir)\..\..\source\cd_hw";"$(SolutionDir)\..\..\source\cart_hw";"$(SolutionDir)\..\..\source\sound";"$(SolutionDir)\..\..\source\z80";"$(SolutionDir)\..\..\";"$(SolutionDir)";"$(SolutionDir)\..\..\source\m68k";"$(SolutionDir)\..\..\source\input_hw";"$(SolutionDir)\..\..\source\cart_hw\svp";"$(SolutionDir)\..\..\source\ntsc";"$(SolutionDir)\..\..\libretro";"$(SolutionDir)\msvc-2003-xbox1"" + AdditionalIncludeDirectories=""$(SolutionDir)\..\..\core";"$(SolutionDir)\..\..\core\cd_hw";"$(SolutionDir)\..\..\core\cart_hw";"$(SolutionDir)\..\..\core\sound";"$(SolutionDir)\..\..\core\z80";"$(SolutionDir)\..\..\";"$(SolutionDir)";"$(SolutionDir)\..\..\core\m68k";"$(SolutionDir)\..\..\core\input_hw";"$(SolutionDir)\..\..\core\cart_hw\svp";"$(SolutionDir)\..\..\core\ntsc";"$(SolutionDir)\..\..\libretro";"$(SolutionDir)\msvc-2003-xbox1"" PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;_LIB;__LIBRETRO__;LSB_FIRST;USE_16BPP_RENDERING;INLINE=static _inline;__restrict=;FRONTEND_SUPPORTS_RGB565" MinimalRebuild="TRUE" BasicRuntimeChecks="3" @@ -55,7 +55,7 @@ Optimization="3" OmitFramePointers="TRUE" OptimizeForProcessor="2" - AdditionalIncludeDirectories=""$(SolutionDir)\..\..\source";"$(SolutionDir)\..\..\source\cd_hw";"$(SolutionDir)\..\..\source\cart_hw";"$(SolutionDir)\..\..\source\sound";"$(SolutionDir)\..\..\source\z80";"$(SolutionDir)\..\..\";"$(SolutionDir)";"$(SolutionDir)\..\..\source\m68k";"$(SolutionDir)\..\..\source\input_hw";"$(SolutionDir)\..\..\source\cart_hw\svp";"$(SolutionDir)\..\..\source\ntsc";"$(SolutionDir)\..\..\libretro";"$(SolutionDir)\msvc-2003-xbox1"" + AdditionalIncludeDirectories=""$(SolutionDir)\..\..\core";"$(SolutionDir)\..\..\core\cd_hw";"$(SolutionDir)\..\..\core\cart_hw";"$(SolutionDir)\..\..\core\sound";"$(SolutionDir)\..\..\core\z80";"$(SolutionDir)\..\..\";"$(SolutionDir)";"$(SolutionDir)\..\..\core\m68k";"$(SolutionDir)\..\..\core\input_hw";"$(SolutionDir)\..\..\core\cart_hw\svp";"$(SolutionDir)\..\..\core\ntsc";"$(SolutionDir)\..\..\libretro";"$(SolutionDir)\msvc-2003-xbox1"" PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;PROFILE;_LIB;__LIBRETRO__;LSB_FIRST;USE_16BPP_RENDERING;INLINE=static _inline;__restrict=;FRONTEND_SUPPORTS_RGB565" StringPooling="TRUE" RuntimeLibrary="0" @@ -90,7 +90,7 @@ Optimization="3" OmitFramePointers="TRUE" OptimizeForProcessor="2" - AdditionalIncludeDirectories=""$(SolutionDir)\..\..\source";"$(SolutionDir)\..\..\source\cd_hw";"$(SolutionDir)\..\..\source\cart_hw";"$(SolutionDir)\..\..\source\sound";"$(SolutionDir)\..\..\source\z80";"$(SolutionDir)\..\..\";"$(SolutionDir)";"$(SolutionDir)\..\..\source\m68k";"$(SolutionDir)\..\..\source\input_hw";"$(SolutionDir)\..\..\source\cart_hw\svp";"$(SolutionDir)\..\..\source\ntsc";"$(SolutionDir)\..\..\libretro";"$(SolutionDir)\msvc-2003-xbox1"" + AdditionalIncludeDirectories=""$(SolutionDir)\..\..\core";"$(SolutionDir)\..\..\core\cd_hw";"$(SolutionDir)\..\..\core\cart_hw";"$(SolutionDir)\..\..\core\sound";"$(SolutionDir)\..\..\core\z80";"$(SolutionDir)\..\..\";"$(SolutionDir)";"$(SolutionDir)\..\..\core\m68k";"$(SolutionDir)\..\..\core\input_hw";"$(SolutionDir)\..\..\core\cart_hw\svp";"$(SolutionDir)\..\..\core\ntsc";"$(SolutionDir)\..\..\libretro";"$(SolutionDir)\msvc-2003-xbox1"" PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;PROFILE;FASTCAP;_LIB;__LIBRETRO__;LSB_FIRST;USE_16BPP_RENDERING;INLINE=static _inline;__restrict=;FRONTEND_SUPPORTS_RGB565" StringPooling="TRUE" RuntimeLibrary="0" @@ -126,7 +126,7 @@ Optimization="3" OmitFramePointers="TRUE" OptimizeForProcessor="2" - AdditionalIncludeDirectories=""$(SolutionDir)\..\..\source";"$(SolutionDir)\..\..\source\cd_hw";"$(SolutionDir)\..\..\source\cart_hw";"$(SolutionDir)\..\..\source\sound";"$(SolutionDir)\..\..\source\z80";"$(SolutionDir)\..\..\";"$(SolutionDir)";"$(SolutionDir)\..\..\source\m68k";"$(SolutionDir)\..\..\source\input_hw";"$(SolutionDir)\..\..\source\cart_hw\svp";"$(SolutionDir)\..\..\source\ntsc";"$(SolutionDir)\..\..\libretro";"$(SolutionDir)\msvc-2003-xbox1"" + AdditionalIncludeDirectories=""$(SolutionDir)\..\..\core";"$(SolutionDir)\..\..\core\cd_hw";"$(SolutionDir)\..\..\core\cart_hw";"$(SolutionDir)\..\..\core\sound";"$(SolutionDir)\..\..\core\z80";"$(SolutionDir)\..\..\";"$(SolutionDir)";"$(SolutionDir)\..\..\core\m68k";"$(SolutionDir)\..\..\core\input_hw";"$(SolutionDir)\..\..\core\cart_hw\svp";"$(SolutionDir)\..\..\core\ntsc";"$(SolutionDir)\..\..\libretro";"$(SolutionDir)\msvc-2003-xbox1"" PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;_LIB;__LIBRETRO__;LSB_FIRST;USE_16BPP_RENDERING;INLINE=static _inline;__restrict=;FRONTEND_SUPPORTS_RGB565" StringPooling="TRUE" RuntimeLibrary="0" @@ -162,7 +162,7 @@ Optimization="3" OmitFramePointers="TRUE" OptimizeForProcessor="2" - AdditionalIncludeDirectories=""$(SolutionDir)\..\..\source";"$(SolutionDir)\..\..\source\cd_hw";"$(SolutionDir)\..\..\source\cart_hw";"$(SolutionDir)\..\..\source\sound";"$(SolutionDir)\..\..\source\z80";"$(SolutionDir)\..\..\";"$(SolutionDir)";"$(SolutionDir)\..\..\source\m68k";"$(SolutionDir)\..\..\source\input_hw";"$(SolutionDir)\..\..\source\cart_hw\svp";"$(SolutionDir)\..\..\source\ntsc";"$(SolutionDir)\..\..\libretro";"$(SolutionDir)\msvc-2003-xbox1"" + AdditionalIncludeDirectories=""$(SolutionDir)\..\..\core";"$(SolutionDir)\..\..\core\cd_hw";"$(SolutionDir)\..\..\core\cart_hw";"$(SolutionDir)\..\..\core\sound";"$(SolutionDir)\..\..\core\z80";"$(SolutionDir)\..\..\";"$(SolutionDir)";"$(SolutionDir)\..\..\core\m68k";"$(SolutionDir)\..\..\core\input_hw";"$(SolutionDir)\..\..\core\cart_hw\svp";"$(SolutionDir)\..\..\core\ntsc";"$(SolutionDir)\..\..\libretro";"$(SolutionDir)\msvc-2003-xbox1"" PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;LTCG;_LIB;__LIBRETRO__;LSB_FIRST;USE_16BPP_RENDERING;INLINE=static _inline;__restrict=;FRONTEND_SUPPORTS_RGB565" StringPooling="TRUE" RuntimeLibrary="0" @@ -202,68 +202,68 @@ + RelativePath="..\..\..\core\genesis.c"> + RelativePath="..\..\..\core\io_ctrl.c"> + RelativePath="..\..\..\core\loadrom.c"> + RelativePath="..\..\..\core\mem68k.c"> + RelativePath="..\..\..\core\membnk.c"> + RelativePath="..\..\..\core\memz80.c"> + RelativePath="..\..\..\core\state.c"> + RelativePath="..\..\..\core\system.c"> + RelativePath="..\..\..\core\vdp_ctrl.c"> + RelativePath="..\..\..\core\vdp_render.c"> + RelativePath="..\..\..\core\cd_hw\cd_cart.c"> + RelativePath="..\..\..\core\cd_hw\cdc.c"> + RelativePath="..\..\..\core\cd_hw\cdd.c"> + RelativePath="..\..\..\core\cd_hw\gfx.c"> + RelativePath="..\..\..\core\cd_hw\pcm.c"> + RelativePath="..\..\..\core\cd_hw\scd.c"> + RelativePath="..\..\..\core\cart_hw\areplay.c"> + RelativePath="..\..\..\core\cart_hw\eeprom_93c.c"> + RelativePath="..\..\..\core\cart_hw\eeprom_i2c.c"> + RelativePath="..\..\..\core\cart_hw\eeprom_spi.c"> + RelativePath="..\..\..\core\cart_hw\ggenie.c"> + RelativePath="..\..\..\core\cart_hw\md_cart.c"> + RelativePath="..\..\..\core\cart_hw\sms_cart.c"> + RelativePath="..\..\..\core\cart_hw\sram.c"> + RelativePath="..\..\..\core\cart_hw\svp\ssp16.c"> + RelativePath="..\..\..\core\cart_hw\svp\svp.c"> @@ -388,80 +388,80 @@ Name="sound" Filter=""> + RelativePath="..\..\..\core\sound\blip_buf.c"> + RelativePath="..\..\..\core\sound\eq.c"> + RelativePath="..\..\..\core\sound\sn76489.c"> + RelativePath="..\..\..\core\sound\sound.c"> + RelativePath="..\..\..\core\sound\ym2413.c"> + RelativePath="..\..\..\core\sound\ym2612.c"> + RelativePath="..\..\..\core\z80\z80.c"> + RelativePath="..\..\..\core\input_hw\activator.c"> + RelativePath="..\..\..\core\input_hw\gamepad.c"> + RelativePath="..\..\..\core\input_hw\input.c"> + RelativePath="..\..\..\core\input_hw\lightgun.c"> + RelativePath="..\..\..\core\input_hw\mouse.c"> + RelativePath="..\..\..\core\input_hw\paddle.c"> + RelativePath="..\..\..\core\input_hw\sportspad.c"> + RelativePath="..\..\..\core\input_hw\teamplayer.c"> + RelativePath="..\..\..\core\input_hw\terebi_oekaki.c"> + RelativePath="..\..\..\core\input_hw\xe_a1p.c"> + RelativePath="..\..\..\core\ntsc\md_ntsc.c"> + RelativePath="..\..\..\core\ntsc\sms_ntsc.c"> + RelativePath="..\..\..\core\m68k\m68kcpu.c"> + RelativePath="..\..\..\core\m68k\s68kcpu.c"> - + CompileAsC CompileAsC CompileAsC @@ -35,7 +35,7 @@ CompileAsC CompileAsC - + CompileAsC CompileAsC CompileAsC @@ -43,7 +43,7 @@ CompileAsC CompileAsC - + CompileAsC CompileAsC CompileAsC @@ -51,7 +51,7 @@ CompileAsC CompileAsC - + CompileAsC CompileAsC CompileAsC @@ -59,7 +59,7 @@ CompileAsC CompileAsC - + CompileAsC CompileAsC CompileAsC @@ -67,7 +67,7 @@ CompileAsC CompileAsC - + CompileAsC CompileAsC CompileAsC @@ -75,7 +75,7 @@ CompileAsC CompileAsC - + CompileAsC CompileAsC CompileAsC @@ -83,7 +83,7 @@ CompileAsC CompileAsC - + CompileAsC CompileAsC CompileAsC @@ -91,28 +91,28 @@ CompileAsC CompileAsC - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + CompileAsC CompileAsC CompileAsC @@ -120,7 +120,7 @@ CompileAsC CompileAsC - + CompileAsC CompileAsC CompileAsC @@ -128,12 +128,12 @@ CompileAsC CompileAsC - - - - - - + + + + + + CompileAsC CompileAsC CompileAsC @@ -141,16 +141,16 @@ CompileAsC CompileAsC - - - - - - - - - - + + + + + + + + + + CompileAsC CompileAsC @@ -244,7 +244,7 @@ MultiThreadedDebug _DEBUG;_XBOX;_XBOX360;_LIB;INLINE=static _inline;__attribute__=;__inline__=_inline;__extension__=;USE_16BPP_RENDERING;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;%(PreprocessorDefinitions) Callcap - $(SolutionDir)\..\..\source;$(SolutionDir)\..\..\source\cd_hw;$(SolutionDir)\..\..\source\cart_hw;$(SolutionDir)\..\..\source\sound;$(SolutionDir)\..\..\source\z80;$(SolutionDir)\..\..\source\m68k;$(SolutionDir)\..\..\source\input_hw;$(SolutionDir)\..\..\source\cart_hw\svp;$(SolutionDir)\..\..\source\ntsc;$(SolutionDir)\..\;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\..\core;$(SolutionDir)\..\..\core\cd_hw;$(SolutionDir)\..\..\core\cart_hw;$(SolutionDir)\..\..\core\sound;$(SolutionDir)\..\..\core\z80;$(SolutionDir)\..\..\core\m68k;$(SolutionDir)\..\..\core\input_hw;$(SolutionDir)\..\..\core\cart_hw\svp;$(SolutionDir)\..\..\core\ntsc;$(SolutionDir)\..\;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories) CompileAsC @@ -265,7 +265,7 @@ MultiThreadedDebug _DEBUG;_XBOX;_XBOX360;_LIB;%(PreprocessorDefinitions);INLINE=static _inline;__attribute__=;__inline__=_inline;__extension__=;USE_16BPP_RENDERING;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565 Callcap - $(SolutionDir)\..\..\source;$(SolutionDir)\..\..\source\cd_hw;$(SolutionDir)\..\..\source\cart_hw;$(SolutionDir)\..\..\source\sound;$(SolutionDir)\..\..\source\z80;$(SolutionDir)\..\..\source\m68k;$(SolutionDir)\..\..\source\input_hw;$(SolutionDir)\..\..\source\cart_hw\svp;$(SolutionDir)\..\..\source\ntsc;$(SolutionDir)\..\;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\..\core;$(SolutionDir)\..\..\core\cd_hw;$(SolutionDir)\..\..\core\cart_hw;$(SolutionDir)\..\..\core\sound;$(SolutionDir)\..\..\core\z80;$(SolutionDir)\..\..\core\m68k;$(SolutionDir)\..\..\core\input_hw;$(SolutionDir)\..\..\core\cart_hw\svp;$(SolutionDir)\..\..\core\ntsc;$(SolutionDir)\..\;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories) CompileAsC @@ -287,7 +287,7 @@ MultiThreaded NDEBUG;_XBOX;_XBOX360;PROFILE;_LIB;__LIBRETRO__;USE_16BPP_RENDERING;INLINE=static _inline;FRONTEND_SUPPORTS_RGB565;%(PreprocessorDefinitions) Callcap - $(SolutionDir)\..\..\source;$(SolutionDir)\..\..\source\cd_hw;$(SolutionDir)\..\..\source\cart_hw;$(SolutionDir)\..\..\source\sound;$(SolutionDir)\..\..\source\z80;$(SolutionDir)\..\..\source\m68k;$(SolutionDir)\..\..\source\input_hw;$(SolutionDir)\..\..\source\cart_hw\svp;$(SolutionDir)\..\..\source\ntsc;$(SolutionDir)\..\;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\..\core;$(SolutionDir)\..\..\core\cd_hw;$(SolutionDir)\..\..\core\cart_hw;$(SolutionDir)\..\..\core\sound;$(SolutionDir)\..\..\core\z80;$(SolutionDir)\..\..\core\m68k;$(SolutionDir)\..\..\core\input_hw;$(SolutionDir)\..\..\core\cart_hw\svp;$(SolutionDir)\..\..\core\ntsc;$(SolutionDir)\..\;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories) CompileAsC @@ -312,7 +312,7 @@ $(OutDir)$(ProjectName).pch MultiThreaded NDEBUG;_XBOX;_XBOX360;PROFILE;FASTCAP;_LIB;__LIBRETRO__;USE_16BPP_RENDERING;INLINE=static _inline;FRONTEND_SUPPORTS_RGB565;%(PreprocessorDefinitions) - $(SolutionDir)\..\..\source;$(SolutionDir)\..\..\source\cd_hw;$(SolutionDir)\..\..\source\cart_hw;$(SolutionDir)\..\..\source\sound;$(SolutionDir)\..\..\source\z80;$(SolutionDir)\..\..\source\m68k;$(SolutionDir)\..\..\source\input_hw;$(SolutionDir)\..\..\source\cart_hw\svp;$(SolutionDir)\..\..\source\ntsc;$(SolutionDir)\..\;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\..\core;$(SolutionDir)\..\..\core\cd_hw;$(SolutionDir)\..\..\core\cart_hw;$(SolutionDir)\..\..\core\sound;$(SolutionDir)\..\..\core\z80;$(SolutionDir)\..\..\core\m68k;$(SolutionDir)\..\..\core\input_hw;$(SolutionDir)\..\..\core\cart_hw\svp;$(SolutionDir)\..\..\core\ntsc;$(SolutionDir)\..\;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories) CompileAsC @@ -335,7 +335,7 @@ $(OutDir)$(ProjectName).pch MultiThreaded NDEBUG;_XBOX;_XBOX360;_LIB;INLINE=static _inline;__inline__=_inline;__extension__=;USE_16BPP_RENDERING;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;%(PreprocessorDefinitions) - $(SolutionDir)\..\..\source;$(SolutionDir)\..\..\source\cd_hw;$(SolutionDir)\..\..\source\cart_hw;$(SolutionDir)\..\..\source\sound;$(SolutionDir)\..\..\source\z80;$(SolutionDir)\..\..\source\m68k;$(SolutionDir)\..\..\source\input_hw;$(SolutionDir)\..\..\source\cart_hw\svp;$(SolutionDir)\..\..\source\ntsc;$(SolutionDir)\..\;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\..\core;$(SolutionDir)\..\..\core\cd_hw;$(SolutionDir)\..\..\core\cart_hw;$(SolutionDir)\..\..\core\sound;$(SolutionDir)\..\..\core\z80;$(SolutionDir)\..\..\core\m68k;$(SolutionDir)\..\..\core\input_hw;$(SolutionDir)\..\..\core\cart_hw\svp;$(SolutionDir)\..\..\core\ntsc;$(SolutionDir)\..\;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories) CompileAsC @@ -358,7 +358,7 @@ $(OutDir)$(ProjectName).pch MultiThreaded NDEBUG;_XBOX;_XBOX360;LTCG;_LIB;INLINE=static _inline;__inline__=_inline;__extension__=;USE_16BPP_RENDERING;__LIBRETRO__;FRONTEND_SUPPORTS_RGB565;%(PreprocessorDefinitions) - $(SolutionDir)\..\..\source;$(SolutionDir)\..\..\source\cd_hw;$(SolutionDir)\..\..\source\cart_hw;$(SolutionDir)\..\..\source\sound;$(SolutionDir)\..\..\source\z80;$(SolutionDir)\..\..\source\m68k;$(SolutionDir)\..\..\source\input_hw;$(SolutionDir)\..\..\source\cart_hw\svp;$(SolutionDir)\..\..\source\ntsc;$(SolutionDir)\..\;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\..\core;$(SolutionDir)\..\..\core\cd_hw;$(SolutionDir)\..\..\core\cart_hw;$(SolutionDir)\..\..\core\sound;$(SolutionDir)\..\..\core\z80;$(SolutionDir)\..\..\core\m68k;$(SolutionDir)\..\..\core\input_hw;$(SolutionDir)\..\..\core\cart_hw\svp;$(SolutionDir)\..\..\core\ntsc;$(SolutionDir)\..\;$(SolutionDir)\..\..\;%(AdditionalIncludeDirectories) CompileAsC diff --git a/libretro/msvc/msvc-2010-360/msvc-2010-360.vcxproj.filters b/libretro/msvc/msvc-2010-360/msvc-2010-360.vcxproj.filters index 57f616a..657a081 100644 --- a/libretro/msvc/msvc-2010-360/msvc-2010-360.vcxproj.filters +++ b/libretro/msvc/msvc-2010-360/msvc-2010-360.vcxproj.filters @@ -38,149 +38,149 @@ - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files\z80 - + Source Files\sound - + Source Files\sound - + Source Files\sound - + Source Files\sound - + Source Files\sound - + Source Files\ntsc - + Source Files\ntsc - + Source Files\m68k - + Source Files\m68k Source Files\libretro - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\cart_hw - + Source Files\cart_hw - + Source Files\cart_hw - + Source Files\cart_hw - + Source Files\cart_hw - + Source Files\cart_hw\svp - + Source Files\cart_hw\svp - + Source Files\cd_hw - + Source Files\cd_hw - + Source Files\cd_hw - + Source Files\cd_hw - + Source Files\cd_hw - + Source Files\cd_hw - + Source Files\sound - + Source Files\cart_hw - + Source Files\cart_hw - + Source Files\cart_hw - \ No newline at end of file + diff --git a/libretro/msvc/msvc-2010/msvc-2010.vcxproj b/libretro/msvc/msvc-2010/msvc-2010.vcxproj index 5a40738..bb77921 100644 --- a/libretro/msvc/msvc-2010/msvc-2010.vcxproj +++ b/libretro/msvc/msvc-2010/msvc-2010.vcxproj @@ -11,53 +11,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -104,7 +104,7 @@ Level3 Disabled WIN32;_DEBUG;_WINDOWS;_USRDLL;MSVC2010_EXPORTS;_CRT_SECURE_NO_WARNINGS;INLINE=static _inline;__inline__=_inline;__extension__=;LSB_FIRST;__LIBRETRO__;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;%(PreprocessorDefinitions) - $(SolutionDir)/../../source;$(SolutionDir)/../../utils/zlib;$(SolutionDir)/../../source/cart_hw/svp;$(SolutionDir)/../../libretro;$(SolutionDir)/../../source/m68k;$(SolutionDir)/../../source/z80;$(SolutionDir)/../../source/input_hw;$(SolutionDir)/../../source/cart_hw;$(SolutionDir)/../../source/sound;$(SolutionDir)/../../source/ntsc;$(SolutionDir)/../../source/cd_hw;%(AdditionalIncludeDirectories) + $(SolutionDir)/../../core;$(SolutionDir)/../../utils/zlib;$(SolutionDir)/../../core/cart_hw/svp;$(SolutionDir)/../../libretro;$(SolutionDir)/../../core/m68k;$(SolutionDir)/../../core/z80;$(SolutionDir)/../../core/input_hw;$(SolutionDir)/../../core/cart_hw;$(SolutionDir)/../../core/sound;$(SolutionDir)/../../core/ntsc;$(SolutionDir)/../../core/cd_hw;%(AdditionalIncludeDirectories) Windows @@ -121,7 +121,7 @@ true true WIN32;NDEBUG;_WINDOWS;_USRDLL;MSVC2010_EXPORTS;_CRT_SECURE_NO_WARNINGS;INLINE=static _inline;__inline__=_inline;__extension__=;LSB_FIRST;__LIBRETRO__;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;%(PreprocessorDefinitions) - $(SolutionDir)/../../source;$(SolutionDir)/../../utils/zlib;$(SolutionDir)/../../source/cart_hw/svp;$(SolutionDir)/../../libretro;$(SolutionDir)/../../source/m68k;$(SolutionDir)/../../source/z80;$(SolutionDir)/../../source/input_hw;$(SolutionDir)/../../source/cart_hw;$(SolutionDir)/../../source/sound;$(SolutionDir)/../../source/ntsc;$(SolutionDir)/../../source/cd_hw;%(AdditionalIncludeDirectories) + $(SolutionDir)/../../core;$(SolutionDir)/../../utils/zlib;$(SolutionDir)/../../core/cart_hw/svp;$(SolutionDir)/../../libretro;$(SolutionDir)/../../core/m68k;$(SolutionDir)/../../core/z80;$(SolutionDir)/../../core/input_hw;$(SolutionDir)/../../core/cart_hw;$(SolutionDir)/../../core/sound;$(SolutionDir)/../../core/ntsc;$(SolutionDir)/../../core/cd_hw;%(AdditionalIncludeDirectories) Windows diff --git a/libretro/msvc/msvc-2010/msvc-2010.vcxproj.filters b/libretro/msvc/msvc-2010/msvc-2010.vcxproj.filters index eaf7203..42f5874 100644 --- a/libretro/msvc/msvc-2010/msvc-2010.vcxproj.filters +++ b/libretro/msvc/msvc-2010/msvc-2010.vcxproj.filters @@ -42,152 +42,152 @@ - + Source Files\cart_hw\svp - + Source Files\cart_hw\svp - + Source Files\cart_hw - + Source Files\cart_hw - + Source Files\cart_hw - + Source Files\cart_hw - + Source Files\cart_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw - + Source Files\input_hw Source Files\libretro - + Source Files\m68k - + Source Files\m68k - + Source Files\ntsc - + Source Files\ntsc - + Source Files\sound - + Source Files\sound - + Source Files\sound - + Source Files\sound - + Source Files\sound - + Source Files\z80 - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files\cd_hw - + Source Files\cd_hw - + Source Files\cd_hw - + Source Files\cd_hw - + Source Files\cd_hw - + Source Files\cd_hw Source Files\libretro - + Source Files\cart_hw - + Source Files\cart_hw - + Source Files\cart_hw - + Source Files\sound - \ No newline at end of file + From e4176e2d331d8c18a47abc702bcc01ba689cd61f Mon Sep 17 00:00:00 2001 From: EkeEke Date: Thu, 27 Jun 2013 01:46:17 +0200 Subject: [PATCH 2/5] [Core/SCD] fixed CDD seek command again (Final Fight CD freeze with model 2 BIOS) --- core/cd_hw/cdd.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/core/cd_hw/cdd.c b/core/cd_hw/cdd.c index 1e63e1e..cee5e66 100644 --- a/core/cd_hw/cdd.c +++ b/core/cd_hw/cdd.c @@ -1230,8 +1230,20 @@ void cdd_process(void) { case 0x00: /* Drive Status */ { - /* RS1-RS8 unchanged */ + /* RS1-RS8 normally unchanged */ scd.regs[0x38>>1].byte.h = cdd.status; + + /* unless RS1 indicated invalid track infos */ + if (scd.regs[0x38>>1].byte.l == 0x0f) + { + /* and SEEK has ended */ + if (cdd.status != CD_SEEK) + { + /* then return valid track infos, e.g current track number in RS2-RS3 (fixes Lunar - The Silver Star) */ + scd.regs[0x38>>1].byte.l = 0x02; + scd.regs[0x3a>>1].w = (cdd.index < cdd.toc.last) ? lut_BCD_16[cdd.index + 1] : 0x0A0A; + } + } break; } @@ -1482,13 +1494,13 @@ void cdd_process(void) /* update status */ cdd.status = CD_SEEK; - /* return track index in RS2-RS3 (note: returning RS1=0x0f breaks Lunar - The Silver Star) */ - scd.regs[0x38>>1].w = (CD_SEEK << 8) | 0x02; - scd.regs[0x3a>>1].w = (cdd.index < cdd.toc.last) ? lut_BCD_16[index + 1] : 0x0A0A; + /* unknown RS1-RS8 values (returning 0xF in RS1 invalidates track infos in RS2-RS8 and fixes Final Fight CD intro when seek time is emulated) */ + scd.regs[0x38>>1].w = (CD_SEEK << 8) | 0x0f; + scd.regs[0x3a>>1].w = 0x0000; scd.regs[0x3c>>1].w = 0x0000; scd.regs[0x3e>>1].w = 0x0000; - scd.regs[0x40>>1].byte.h = 0x00; - break; + scd.regs[0x40>>1].w = ~(CD_SEEK + 0xf) & 0x0f; + return; } case 0x06: /* Pause */ @@ -1539,16 +1551,9 @@ void cdd_process(void) /* no audio track playing */ scd.regs[0x36>>1].byte.h = 0x01; - /* update status */ - cdd.status = CD_READY; - - /* unknown RS0-RS8 values (returning 0xF in RS1 invalidates track infos usually returned in RS2-RS8, also fixes Final Fight CD intro when seek time is emulated) */ - scd.regs[0x38>>1].w = (CD_READY << 8) | 0x0f; - scd.regs[0x3a>>1].w = 0x0000; - scd.regs[0x3c>>1].w = 0x0000; - scd.regs[0x3e>>1].w = 0x0000; - scd.regs[0x40>>1].w = ~(CD_READY + 0xf) & 0x0f; - return; + /* update status (RS1-RS8 unchanged) */ + cdd.status = scd.regs[0x38>>1].byte.h = CD_READY; + break; } case 0x0c: /* Close Tray */ From e5ab87a4e60a04c5d7aaaf380f075cf4c290e86d Mon Sep 17 00:00:00 2001 From: EkeEke Date: Thu, 27 Jun 2013 01:49:10 +0200 Subject: [PATCH 3/5] [Core/Input] added support for XE-A1P analog controller on both ports --- core/input_hw/activator.c | 8 ++--- core/input_hw/input.c | 13 +++++-- core/input_hw/paddle.c | 4 +-- core/input_hw/sportspad.c | 8 ++--- core/input_hw/xe_a1p.c | 74 +++++++++++++++++++++++++-------------- core/input_hw/xe_a1p.h | 8 +++-- core/io_ctrl.c | 11 ++++-- gx/gui/menu.c | 6 ---- 8 files changed, 82 insertions(+), 50 deletions(-) diff --git a/core/input_hw/activator.c b/core/input_hw/activator.c index f6fbdc9..2af22db 100644 --- a/core/input_hw/activator.c +++ b/core/input_hw/activator.c @@ -51,15 +51,15 @@ void activator_reset(int index) activator[index].Counter = 0; } -INLINE unsigned char activator_read(int port) +INLINE unsigned char activator_read(int index) { /* IR sensors 1-16 data (active low) */ - uint16 data = ~input.pad[port << 2]; + uint16 data = ~input.pad[index << 2]; /* D1 = D0 (data is ready) */ - uint8 temp = (activator[port].State & 0x01) << 1; + uint8 temp = (activator[index].State & 0x01) << 1; - switch (activator[port].Counter) + switch (activator[index].Counter) { case 0: /* x x x x 0 1 0 0 */ temp |= 0x04; diff --git a/core/input_hw/input.c b/core/input_hw/input.c index 3ddced7..4506c1a 100644 --- a/core/input_hw/input.c +++ b/core/input_hw/input.c @@ -198,6 +198,13 @@ void input_init(void) break; } + case SYSTEM_XE_A1P: + { + input.dev[4] = DEVICE_XE_A1P; + player++; + break; + } + case SYSTEM_MENACER: { input.dev[4] = DEVICE_LIGHTGUN; @@ -305,19 +312,19 @@ void input_reset(void) case DEVICE_XE_A1P: { - xe_a1p_reset(); + xe_a1p_reset(i); break; } case DEVICE_PADDLE: { - paddle_reset(i >> 2); + paddle_reset(i); break; } case DEVICE_SPORTSPAD: { - sportspad_reset(i >> 2); + sportspad_reset(i); break; } diff --git a/core/input_hw/paddle.c b/core/input_hw/paddle.c index 93f500f..2fa7093 100644 --- a/core/input_hw/paddle.c +++ b/core/input_hw/paddle.c @@ -45,8 +45,8 @@ static struct void paddle_reset(int index) { - input.analog[index << 2][0] = 128; - paddle[index].State = 0x40; + input.analog[index][0] = 128; + paddle[index>>2].State = 0x40; } INLINE unsigned char paddle_read(int port) diff --git a/core/input_hw/sportspad.c b/core/input_hw/sportspad.c index 03e176e..48154e1 100644 --- a/core/input_hw/sportspad.c +++ b/core/input_hw/sportspad.c @@ -46,10 +46,10 @@ static struct void sportspad_reset(int index) { - input.analog[index << 2][0] = 128; - input.analog[index << 2][1] = 128; - sportspad[index].State = 0x40; - sportspad[index].Counter = 0; + input.analog[index][0] = 128; + input.analog[index][1] = 128; + sportspad[index>>2].State = 0x40; + sportspad[index>>2].Counter = 0; } INLINE unsigned char sportspad_read(int port) diff --git a/core/input_hw/xe_a1p.c b/core/input_hw/xe_a1p.c index 0cb702f..8821ff9 100644 --- a/core/input_hw/xe_a1p.c +++ b/core/input_hw/xe_a1p.c @@ -43,39 +43,41 @@ static struct uint8 State; uint8 Counter; uint8 Latency; -} xe_a1p; +} xe_a1p[2]; -void xe_a1p_reset(void) +void xe_a1p_reset(int index) { - input.analog[0][0] = 128; - input.analog[0][1] = 128; - input.analog[1][0] = 128; - xe_a1p.State = 0x40; - xe_a1p.Counter = 0; - xe_a1p.Latency = 0; + input.analog[index][0] = 128; + input.analog[index][1] = 128; + input.analog[index+1][0] = 128; + index >>= 2; + xe_a1p[index].State = 0x40; + xe_a1p[index].Counter = 0; + xe_a1p[index].Latency = 0; } -unsigned char xe_a1p_read() +INLINE unsigned char xe_a1p_read(int index) { unsigned int temp = 0x40; + unsigned int port = index << 2; /* Left Stick X & Y analog values (bidirectional) */ - int x = input.analog[0][0]; - int y = input.analog[0][1]; + int x = input.analog[port][0]; + int y = input.analog[port][1]; /* Right Stick X or Y value (unidirectional) */ - int z = input.analog[1][0]; + int z = input.analog[port+1][0]; /* Buttons status (active low) */ - uint16 pad = ~input.pad[0]; + uint16 pad = ~input.pad[port]; /* Current internal cycle (0-7) */ - unsigned int cycle = xe_a1p.Counter & 7; + unsigned int cycle = xe_a1p[index].Counter & 7; /* Current 4-bit data cycle */ /* There are eight internal data cycle for each 5 acquisition sequence */ /* First 4 return the same 4-bit data, next 4 return next 4-bit data */ - switch (xe_a1p.Counter >> 2) + switch (xe_a1p[index].Counter >> 2) { case 0: temp |= ((pad >> 8) & 0x0F); /* E1 E2 Start Select */ @@ -119,42 +121,62 @@ unsigned char xe_a1p_read() cycle = (cycle + 1) & 7; /* Update internal cycle counter */ - xe_a1p.Counter = (xe_a1p.Counter & ~7) | cycle; + xe_a1p[index].Counter = (xe_a1p[index].Counter & ~7) | cycle; /* Update internal latency on each read */ - xe_a1p.Latency++; + xe_a1p[index].Latency++; return temp; } -void xe_a1p_write(unsigned char data, unsigned char mask) +INLINE void xe_a1p_write(int index, unsigned char data, unsigned char mask) { /* update bits set as output only */ - data = (xe_a1p.State & ~mask) | (data & mask); + data = (xe_a1p[index].State & ~mask) | (data & mask); /* look for TH 1->0 transitions */ - if (!(data & 0x40) && (xe_a1p.State & 0x40)) + if (!(data & 0x40) && (xe_a1p[index].State & 0x40)) { /* reset acquisition cycle */ - xe_a1p.Latency = xe_a1p.Counter = 0; + xe_a1p[index].Latency = xe_a1p[index].Counter = 0; } else { /* some games immediately write new data to TH */ /* so we make sure first sequence has actually been handled */ - if (xe_a1p.Latency > 2) + if (xe_a1p[index].Latency > 2) { /* next acquisition sequence */ - xe_a1p.Counter = (xe_a1p.Counter & ~7) + 8; + xe_a1p[index].Counter = (xe_a1p[index].Counter & ~7) + 8; /* 5 sequence max with 8 cycles each */ - if (xe_a1p.Counter > 32) + if (xe_a1p[index].Counter > 32) { - xe_a1p.Counter = 32; + xe_a1p[index].Counter = 32; } } } /* update internal state */ - xe_a1p.State = data; + xe_a1p[index].State = data; +} + +unsigned char xe_a1p_1_read(void) +{ + return xe_a1p_read(0); +} + +unsigned char xe_a1p_2_read(void) +{ + return xe_a1p_read(1); +} + +void xe_a1p_1_write(unsigned char data, unsigned char mask) +{ + xe_a1p_write(0, data, mask); +} + +void xe_a1p_2_write(unsigned char data, unsigned char mask) +{ + xe_a1p_write(1, data, mask); } diff --git a/core/input_hw/xe_a1p.h b/core/input_hw/xe_a1p.h index 66b0360..7c474ed 100644 --- a/core/input_hw/xe_a1p.h +++ b/core/input_hw/xe_a1p.h @@ -40,8 +40,10 @@ #define _XE_A1PH_ /* Function prototypes */ -extern void xe_a1p_reset(void); -extern unsigned char xe_a1p_read(void); -extern void xe_a1p_write(unsigned char data, unsigned char mask); +extern void xe_a1p_reset(int index); +extern unsigned char xe_a1p_1_read(void); +extern unsigned char xe_a1p_2_read(void); +extern void xe_a1p_1_write(unsigned char data, unsigned char mask); +extern void xe_a1p_2_write(unsigned char data, unsigned char mask); #endif diff --git a/core/io_ctrl.c b/core/io_ctrl.c index 2b4f924..8d476ab 100644 --- a/core/io_ctrl.c +++ b/core/io_ctrl.c @@ -110,8 +110,8 @@ void io_init(void) case SYSTEM_XE_A1P: { - port[0].data_w = xe_a1p_write; - port[0].data_r = xe_a1p_read; + port[0].data_w = xe_a1p_1_write; + port[0].data_r = xe_a1p_1_read; break; } @@ -181,6 +181,13 @@ void io_init(void) break; } + case SYSTEM_XE_A1P: + { + port[1].data_w = xe_a1p_2_write; + port[1].data_r = xe_a1p_2_read; + break; + } + case SYSTEM_ACTIVATOR: { port[1].data_w = activator_2_write; diff --git a/gx/gui/menu.c b/gx/gui/menu.c index 5788cde..b3beba6 100644 --- a/gx/gui/menu.c +++ b/gx/gui/menu.c @@ -2183,12 +2183,6 @@ static void ctrlmenu(void) input.system[1] += 2; } - /* XE-1AP on port A only */ - if (input.system[1] == SYSTEM_XE_A1P) - { - input.system[1]++; - } - /* 4-wayplay uses both ports */ if (input.system[1] == SYSTEM_WAYPLAY) { From 660d7ea9d1c4507c970bb6c8dba1b0a8b942a32c Mon Sep 17 00:00:00 2001 From: EkeEke Date: Thu, 27 Jun 2013 01:54:02 +0200 Subject: [PATCH 4/5] [Core/input] updated header of modified files --- core/input_hw/activator.c | 2 +- core/input_hw/activator.h | 2 +- core/input_hw/input.c | 2 +- core/input_hw/input.h | 2 +- core/input_hw/paddle.c | 2 +- core/input_hw/paddle.h | 2 +- core/input_hw/sportspad.c | 2 +- core/input_hw/sportspad.h | 2 +- core/input_hw/xe_a1p.c | 2 +- core/input_hw/xe_a1p.h | 2 +- core/io_ctrl.c | 2 +- core/io_ctrl.h | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/input_hw/activator.c b/core/input_hw/activator.c index 2af22db..e256635 100644 --- a/core/input_hw/activator.c +++ b/core/input_hw/activator.c @@ -2,7 +2,7 @@ * Genesis Plus * Sega Activator support * - * Copyright (C) 2011 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2011-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/core/input_hw/activator.h b/core/input_hw/activator.h index ee75b2b..18c18fe 100644 --- a/core/input_hw/activator.h +++ b/core/input_hw/activator.h @@ -2,7 +2,7 @@ * Genesis Plus * Sega Activator support * - * Copyright (C) 2011 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2011-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/core/input_hw/input.c b/core/input_hw/input.c index 4506c1a..ce82634 100644 --- a/core/input_hw/input.c +++ b/core/input_hw/input.c @@ -3,7 +3,7 @@ * Input peripherals support * * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code) - * Copyright (C) 2007-2012 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/core/input_hw/input.h b/core/input_hw/input.h index 9798154..6f4d908 100644 --- a/core/input_hw/input.h +++ b/core/input_hw/input.h @@ -3,7 +3,7 @@ * Input peripherals support * * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code) - * Copyright (C) 2007-2012 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/core/input_hw/paddle.c b/core/input_hw/paddle.c index 2fa7093..bf655c5 100644 --- a/core/input_hw/paddle.c +++ b/core/input_hw/paddle.c @@ -2,7 +2,7 @@ * Genesis Plus * Sega Paddle Control support * - * Copyright (C) 2007-2011 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/core/input_hw/paddle.h b/core/input_hw/paddle.h index 926e947..6097a55 100644 --- a/core/input_hw/paddle.h +++ b/core/input_hw/paddle.h @@ -2,7 +2,7 @@ * Genesis Plus * Sega Paddle Control support * - * Copyright (C) 2007-2011 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/core/input_hw/sportspad.c b/core/input_hw/sportspad.c index 48154e1..8dab4cf 100644 --- a/core/input_hw/sportspad.c +++ b/core/input_hw/sportspad.c @@ -2,7 +2,7 @@ * Genesis Plus * Sega Sports Pad support * - * Copyright (C) 2007-2011 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/core/input_hw/sportspad.h b/core/input_hw/sportspad.h index 139b862..d5ae383 100644 --- a/core/input_hw/sportspad.h +++ b/core/input_hw/sportspad.h @@ -2,7 +2,7 @@ * Genesis Plus * Sega Sports Pad support * - * Copyright (C) 2007-2011 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/core/input_hw/xe_a1p.c b/core/input_hw/xe_a1p.c index 8821ff9..1f02774 100644 --- a/core/input_hw/xe_a1p.c +++ b/core/input_hw/xe_a1p.c @@ -2,7 +2,7 @@ * Genesis Plus * XE-A1P analog controller support * - * Copyright (C) 2011 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2011-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/core/input_hw/xe_a1p.h b/core/input_hw/xe_a1p.h index 7c474ed..fe5b6a1 100644 --- a/core/input_hw/xe_a1p.h +++ b/core/input_hw/xe_a1p.h @@ -2,7 +2,7 @@ * Genesis Plus * XE-A1P analog controller support * - * Copyright (C) 2011 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2011-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/core/io_ctrl.c b/core/io_ctrl.c index 8d476ab..f221bf5 100644 --- a/core/io_ctrl.c +++ b/core/io_ctrl.c @@ -5,7 +5,7 @@ * Support for Master System (315-5216, 315-5237 & 315-5297), Game Gear & Mega Drive I/O chips * * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code) - * Copyright (C) 2007-2012 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/core/io_ctrl.h b/core/io_ctrl.h index 01a7dbb..addc259 100644 --- a/core/io_ctrl.h +++ b/core/io_ctrl.h @@ -5,7 +5,7 @@ * Support for Master System (315-5216, 315-5237 & 315-5297), Game Gear & Mega Drive I/O chips * * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code) - * Copyright (C) 2007-2012 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: From d1feaa8049003b6fa7580eab5317ecf941444383 Mon Sep 17 00:00:00 2001 From: EkeEke Date: Thu, 27 Jun 2013 23:32:27 +0200 Subject: [PATCH 5/5] [Core/VDP] improved HVC latch behavior when not locked in hardware but forced for gun emulation ("Gunfight - 3 in 1" randomization issues when Justifier is enabled) --- core/input_hw/lightgun.c | 4 ++-- core/input_hw/lightgun.h | 2 +- core/vdp_ctrl.c | 17 +++++++++++++---- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/core/input_hw/lightgun.c b/core/input_hw/lightgun.c index f9a6d5f..4ed0b76 100644 --- a/core/input_hw/lightgun.c +++ b/core/input_hw/lightgun.c @@ -2,7 +2,7 @@ * Genesis Plus * Sega Light Phaser, Menacer & Konami Justifiers support * - * Copyright (C) 2007-2011 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: @@ -135,7 +135,7 @@ void lightgun_refresh(int port) m68k_update_irq(2); } - /* force HV Counter Latch (some games does not lock HV Counter but instead use larger offset value) */ + /* HACK: force HV Counter latch (some games does not lock HV Counter but instead use larger offset value) */ hvc_latch = 0x10000 | (y << 8); if (reg[12] & 1) { diff --git a/core/input_hw/lightgun.h b/core/input_hw/lightgun.h index 4a67946..0021297 100644 --- a/core/input_hw/lightgun.h +++ b/core/input_hw/lightgun.h @@ -2,7 +2,7 @@ * Genesis Plus * Sega Light Phaser, Menacer & Konami Justifiers support * - * Copyright (C) 2007-2011 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/core/vdp_ctrl.c b/core/vdp_ctrl.c index 96c9f42..e2fe42e 100644 --- a/core/vdp_ctrl.c +++ b/core/vdp_ctrl.c @@ -1370,17 +1370,26 @@ unsigned int vdp_hvc_r(unsigned int cycles) } else { + /* Mode 5: HV counters are frozen (cf. lightgun games & Sunset Riders) */ if (reg[1] & 4) { - /* Mode 5: both counters are frozen (Lightgun games, Sunset Riders) */ + /* check if HVC is really locked or is read within INT2 callback (HVC latch is forced for lightgun emulation, cf. lightgun.c) */ + if ((reg[0] & 0x02) || (m68k.int_mask == 0x0200)) + { #ifdef LOGVDP - error("[%d(%d)][%d(%d)] HVC read -> 0x%x (%x)\n", v_counter, (cycles/MCYCLES_PER_LINE-1)%lines_per_frame, cycles, cycles%MCYCLES_PER_LINE, hvc_latch & 0xffff, m68k_get_reg(M68K_REG_PC)); + error("[%d(%d)][%d(%d)] HVC read -> 0x%x (%x)\n", v_counter, (cycles/MCYCLES_PER_LINE-1)%lines_per_frame, cycles, cycles%MCYCLES_PER_LINE, data & 0xffff, m68k_get_reg(M68K_REG_PC)); #endif - return (data & 0xffff); + /* return latched HVC value */ + return (data & 0xffff); + } + + /* HV counters should be free-running (fixes "Gunfight - 3 in 1" randomization when Justifiers are enabled) */ + hvc_latch = 0; + data = hctab[cycles % MCYCLES_PER_LINE]; } else { - /* Mode 4: VCounter runs normally, HCounter is frozen */ + /* Mode 4: V counter runs normally, H counter is frozen */ data &= 0xff; } }