Cleanup: Removed unneeded defines
This commit is contained in:
parent
2c8c1d2b49
commit
cdf1b26254
14 changed files with 29 additions and 366 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -44,3 +44,4 @@ VisualGDB/VisualGDB/Release/gencpu
|
|||
VisualGDB/VisualGDB/Release/gencomp
|
||||
*.tlog
|
||||
VSLinux/obj/ARM/Debug/amiberry-sdl2-dev
|
||||
VisualGDB/VisualGDB/Debug/Amiberry-sdl2-dev
|
||||
|
|
7
Makefile
7
Makefile
|
@ -26,13 +26,12 @@ guisan:
|
|||
cd src/guisan && make all && cd ../..
|
||||
|
||||
DEBUG=1
|
||||
PANDORA=1
|
||||
|
||||
SDL_CFLAGS = `sdl2-config --cflags --libs`
|
||||
|
||||
DEFS += `xml2-config --cflags`
|
||||
DEFS += -DCPU_arm -DARMV6_ASSEMBLY -DAMIBERRY -DPICASSO96
|
||||
DEFS += -DWITH_INGAME_WARNING -DRASPBERRY -DCAPSLOCK_DEBIAN_WORKAROUND
|
||||
DEFS += `xml2-config --cflags`
|
||||
DEFS += -DARMV6_ASSEMBLY -DAMIBERRY
|
||||
DEFS += -DCAPSLOCK_DEBIAN_WORKAROUND
|
||||
DEFS += -DROM_PATH_PREFIX=\"./\" -DDATA_PREFIX=\"./data/\" -DSAVE_PREFIX=\"./saves/\"
|
||||
DEFS += -DUSE_SDL
|
||||
|
||||
|
|
|
@ -400,7 +400,6 @@
|
|||
<ClCompile Include="..\src\sinctable.cpp">
|
||||
<DeploymentContent>false</DeploymentContent>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\sounddep\sound.cpp" />
|
||||
<ClCompile Include="..\src\sounddep\sound_sdl_new.cpp" />
|
||||
<ClCompile Include="..\src\statusline.cpp">
|
||||
<DeploymentContent>false</DeploymentContent>
|
||||
|
|
|
@ -603,9 +603,6 @@
|
|||
<ClCompile Include="..\src\osdep\menu\menu_config.cpp">
|
||||
<Filter>src\osdep\menu</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\sounddep\sound.cpp">
|
||||
<Filter>src\sounddep</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\sounddep\sound_sdl_new.cpp">
|
||||
<Filter>src\sounddep</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -31,31 +31,31 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">
|
||||
<GNUConfigurationType>Debug</GNUConfigurationType>
|
||||
<Toolchain>C:\SysGCC\raspberry</Toolchain>
|
||||
<TargetName>$(ProjectName)-sdl2</TargetName>
|
||||
<TargetName>$(ProjectName)-sdl2-dev</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|VisualGDB'">
|
||||
<Toolchain>C:\SysGCC\raspberry</Toolchain>
|
||||
<TargetName>$(ProjectName)-sdl2</TargetName>
|
||||
<TargetName>$(ProjectName)-sdl2-dev</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-rpi2|VisualGDB'">
|
||||
<Toolchain>C:\SysGCC\raspberry</Toolchain>
|
||||
<TargetName>$(ProjectName)-sdl2-rpi2</TargetName>
|
||||
<TargetName>$(ProjectName)-sdl2-dev-rpi2</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-rpi1|VisualGDB'">
|
||||
<Toolchain>C:\SysGCC\raspberry</Toolchain>
|
||||
<TargetName>$(ProjectName)-sdl2-rpi1</TargetName>
|
||||
<TargetName>$(ProjectName)-sdl2-dev-rpi1</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">
|
||||
<ClCompile>
|
||||
<CPPLanguageStandard>GNUPP14</CPPLanguageStandard>
|
||||
<AdditionalIncludeDirectories>C:\SysGCC\raspberry\lib\gcc\arm-linux-gnueabihf\4.9\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\include\c++\4.9;C:\SysGCC\raspberry\arm-linux-gnueabihf\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include\SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;=/opt/vc/include;=/opt/vc/include/interface/vmcs_host/linux;=/opt/vc/include/interface/vcos/pthreads;=/usr/local/include;=/usr/local/include/SDL2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DEBUG=1;_REENTRANT;RASPBERRY;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;PICASSO96;USE_ARMNEON;CPU_arm;ARMV6_ASSEMBLY;AMIBERRY;WITH_INGAME_WARNING;USE_SDL;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DEBUG=1;_REENTRANT;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;USE_ARMNEON;ARMV6_ASSEMBLY;AMIBERRY;USE_SDL;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard -pipe %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLinkerInputs>-Wl,-gc-sections,-rpath,/usr/local/lib;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/local/lib;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLibraryNames>SDL2;SDL2_image;SDL2_ttf;pthread;m;z;png;rt;xml2;FLAC;mpg123;dl;guisan;profiler;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<AdditionalLibraryNames>SDL2;SDL2_image;SDL2_ttf;pthread;m;z;png;rt;xml2;FLAC;mpg123;dl;guisan;profiler;tcmalloc;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<LinkerScript />
|
||||
<ExtraRPATH>=/usr/local/lib;%(ExtraRPATH)</ExtraRPATH>
|
||||
</Link>
|
||||
|
@ -64,7 +64,7 @@
|
|||
<ClCompile>
|
||||
<CPPLanguageStandard>GNUPP14</CPPLanguageStandard>
|
||||
<AdditionalIncludeDirectories>C:\SysGCC\raspberry\lib\gcc\arm-linux-gnueabihf\4.9\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\include\c++\4.9;C:\SysGCC\raspberry\arm-linux-gnueabihf\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include\SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;=/opt/vc/include;=/opt/vc/include/interface/vmcs_host/linux;=/opt/vc/include/interface/vcos/pthreads;=/usr/local/include;=/usr/local/include/SDL2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;RASPBERRY;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;PICASSO96;USE_ARMNEON;CPU_arm;ARMV6_ASSEMBLY;AMIBERRY;WITH_INGAME_WARNING;USE_SDL;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;USE_ARMNEON;ARMV6_ASSEMBLY;AMIBERRY;USE_SDL;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard -pipe -fweb %(AdditionalOptions)</AdditionalOptions>
|
||||
<OmitFramePointer>true</OmitFramePointer>
|
||||
<InlineFunctions>true</InlineFunctions>
|
||||
|
@ -72,7 +72,7 @@
|
|||
<Link>
|
||||
<AdditionalLinkerInputs>-Wl,-gc-sections,-rpath,/usr/local/lib;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/local/lib;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLibraryNames>SDL2;SDL2_image;SDL2_ttf;pthread;m;z;png;rt;xml2;FLAC;mpg123;dl;guisan;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<AdditionalLibraryNames>SDL2;SDL2_image;SDL2_ttf;pthread;m;z;png;rt;xml2;FLAC;mpg123;dl;guisan;profiler;tcmalloc;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<LinkerScript />
|
||||
<ExtraRPATH>=/usr/local/lib;%(ExtraRPATH)</ExtraRPATH>
|
||||
</Link>
|
||||
|
@ -81,7 +81,7 @@
|
|||
<ClCompile>
|
||||
<CPPLanguageStandard>GNUPP14</CPPLanguageStandard>
|
||||
<AdditionalIncludeDirectories>C:\SysGCC\raspberry\lib\gcc\arm-linux-gnueabihf\4.9\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\include\c++\4.9;C:\SysGCC\raspberry\arm-linux-gnueabihf\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include\SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;=/opt/vc/include;=/opt/vc/include/interface/vmcs_host/linux;=/opt/vc/include/interface/vcos/pthreads;=/usr/local/include;=/usr/local/include/SDL2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;RASPBERRY;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;PICASSO96;USE_ARMNEON;CPU_arm;ARMV6_ASSEMBLY;AMIBERRY;WITH_INGAME_WARNING;USE_SDL;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;USE_ARMNEON;ARMV6_ASSEMBLY;AMIBERRY;USE_SDL;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -pipe -fweb %(AdditionalOptions)</AdditionalOptions>
|
||||
<OmitFramePointer>true</OmitFramePointer>
|
||||
<InlineFunctions>true</InlineFunctions>
|
||||
|
@ -89,7 +89,7 @@
|
|||
<Link>
|
||||
<AdditionalLinkerInputs>-Wl,-gc-sections,-rpath,/usr/local/lib;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/local/lib;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLibraryNames>SDL2;pthread;m;z;SDL2_image;png;rt;xml2;FLAC;mpg123;dl;SDL2_ttf;guisan;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<AdditionalLibraryNames>SDL2;SDL2_image;SDL2_ttf;pthread;m;z;png;rt;xml2;FLAC;mpg123;dl;guisan;profiler;tcmalloc;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<LinkerScript>
|
||||
</LinkerScript>
|
||||
<ExtraRPATH>=/usr/local/lib;%(ExtraRPATH)</ExtraRPATH>
|
||||
|
@ -99,7 +99,7 @@
|
|||
<ClCompile>
|
||||
<CPPLanguageStandard>GNUPP14</CPPLanguageStandard>
|
||||
<AdditionalIncludeDirectories>C:\SysGCC\raspberry\lib\gcc\arm-linux-gnueabihf\4.9\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\include\c++\4.9;C:\SysGCC\raspberry\arm-linux-gnueabihf\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\local\include\SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;=/opt/vc/include;=/opt/vc/include/interface/vmcs_host/linux;=/opt/vc/include/interface/vcos/pthreads;=/usr/local/include;=/usr/local/include/SDL2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;RASPBERRY;CAPSLOCK_DEBIAN_WORKAROUND;PICASSO96;CPU_arm;ARMV6_ASSEMBLY;AMIBERRY;WITH_INGAME_WARNING;USE_SDL;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6_ASSEMBLY;AMIBERRY;USE_SDL;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv6zk -mfpu=vfp -mfloat-abi=hard -pipe -fweb %(AdditionalOptions)</AdditionalOptions>
|
||||
<OmitFramePointer>true</OmitFramePointer>
|
||||
<InlineFunctions>true</InlineFunctions>
|
||||
|
@ -107,7 +107,7 @@
|
|||
<Link>
|
||||
<AdditionalLinkerInputs>-Wl,-gc-sections,-rpath,/usr/local/lib;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>../../src/guisan/lib;=/opt/vc/lib;=/usr/local/lib;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLibraryNames>SDL2;pthread;m;z;SDL2_image;png;rt;xml2;FLAC;mpg123;dl;SDL2_ttf;guisan;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<AdditionalLibraryNames>SDL2;SDL2_image;SDL2_ttf;pthread;m;z;png;rt;xml2;FLAC;mpg123;dl;guisan;profiler;tcmalloc;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<LinkerScript>
|
||||
</LinkerScript>
|
||||
<ExtraRPATH>=/usr/local/lib;%(ExtraRPATH)</ExtraRPATH>
|
||||
|
|
|
@ -83,7 +83,7 @@ int fsdb_fill_file_attrs (a_inode *base, a_inode *aino)
|
|||
| (S_IWUSR & statbuf.st_mode ? 0 : A_FIBF_WRITE)
|
||||
| (S_IRUSR & statbuf.st_mode ? 0 : A_FIBF_READ));
|
||||
|
||||
#if defined(WIN32) || defined(ANDROIDSDL) || defined(RASPBERRY)
|
||||
#if defined(WIN32) || defined(ANDROIDSDL) || defined(AMIBERRY)
|
||||
// Always give execute & read permission
|
||||
// Temporary do this for raspberry...
|
||||
aino->amigaos_mode &= ~A_FIBF_EXECUTE;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "blkdev.h"
|
||||
#include <SDL.h>
|
||||
|
||||
#ifdef RASPBERRY
|
||||
#ifdef AMIBERRY
|
||||
#include <linux/kd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
|
|
@ -27,7 +27,6 @@ static gcn::UaeDropDown* KeyForQuit;
|
|||
static gcn::Label* lblButtonForQuit;
|
||||
static gcn::UaeDropDown* ButtonForQuit;
|
||||
|
||||
#ifdef RASPBERRY
|
||||
class StringListModel : public gcn::ListModel
|
||||
{
|
||||
vector<string> values;
|
||||
|
@ -59,7 +58,6 @@ static gcn::UaeDropDown* cboKBDLed_scr;
|
|||
|
||||
const char* listValues[] = {"none", "POWER", "DF0", "DF1", "DF2", "DF3", "DF*", "HD", "CD"};
|
||||
StringListModel KBDLedList(listValues, 9);
|
||||
#endif
|
||||
|
||||
static const int ControlKey_SDLKeyValues[] = {0, SDL_SCANCODE_F11, SDL_SCANCODE_F12};
|
||||
|
||||
|
@ -119,13 +117,11 @@ public:
|
|||
else if (actionEvent.getSource() == ButtonForQuit)
|
||||
changed_prefs.button_for_quit = ControlButton_SDLButtonValues[ButtonForQuit->getSelected()];
|
||||
|
||||
#ifdef RASPBERRY
|
||||
else if (actionEvent.getSource() == cboKBDLed_num)
|
||||
changed_prefs.kbd_led_num = cboKBDLed_num->getSelected();
|
||||
|
||||
else if (actionEvent.getSource() == cboKBDLed_scr)
|
||||
changed_prefs.kbd_led_scr = cboKBDLed_scr->getSelected();
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -249,12 +245,11 @@ void ExitPanelMisc()
|
|||
delete chkShowGUI;
|
||||
delete chkBSDSocket;
|
||||
|
||||
#ifdef RASPBERRY
|
||||
delete lblScrLock;
|
||||
delete lblNumLock;
|
||||
delete cboKBDLed_num;
|
||||
delete cboKBDLed_scr;
|
||||
#endif
|
||||
|
||||
delete miscActionListener;
|
||||
delete lblKeyForMenu;
|
||||
delete KeyForMenu;
|
||||
|
@ -272,12 +267,10 @@ void RefreshPanelMisc()
|
|||
|
||||
chkStatusLine->setSelected(changed_prefs.leds_on_screen);
|
||||
chkShowGUI->setSelected(changed_prefs.start_gui);
|
||||
|
||||
chkBSDSocket->setSelected(changed_prefs.socket_emu);
|
||||
#ifdef RASPBERRY
|
||||
cboKBDLed_num->setSelected(changed_prefs.kbd_led_num);
|
||||
cboKBDLed_scr->setSelected(changed_prefs.kbd_led_scr);
|
||||
#endif
|
||||
|
||||
KeyForMenu->setSelected(GetControlKeyIndex(changed_prefs.key_for_menu));
|
||||
KeyForQuit->setSelected(GetControlKeyIndex(changed_prefs.key_for_quit));
|
||||
ButtonForMenu->setSelected(GetControlButtonIndex(changed_prefs.button_for_menu));
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#define DIALOG_WIDTH 520
|
||||
#define DIALOG_HEIGHT 400
|
||||
|
||||
#if defined(RASPBERRY) || defined(ANDROID)
|
||||
#if defined(AMIBERRY) || defined(ANDROID)
|
||||
#define FILE_SELECT_KEEP_POSITION
|
||||
#endif
|
||||
|
||||
|
|
|
@ -423,7 +423,7 @@ int loadconfig_old(struct uae_prefs* p, const char* orgpath)
|
|||
int dummy;
|
||||
|
||||
fscanf(f, "kickstart=%d\n", &kickstart);
|
||||
#if defined(RASPBERRY) || defined(ANDROIDSDL)
|
||||
#if defined(AMIBERRY) || defined(ANDROIDSDL)
|
||||
fscanf(f, "scaling=%d\n", &dummy);
|
||||
#else
|
||||
fscanf(f, "scaling=%d\n", &mainMenu_enableHWscaling);
|
||||
|
@ -431,7 +431,7 @@ int loadconfig_old(struct uae_prefs* p, const char* orgpath)
|
|||
fscanf(f, "showstatus=%d\n", &p->leds_on_screen);
|
||||
fscanf(f, "mousemultiplier=%d\n", &p->input_joymouse_multiplier);
|
||||
p->input_joymouse_multiplier *= 10;
|
||||
#if defined(RASPBERRY) || defined(ANDROIDSDL)
|
||||
#if defined(AMIBERRY) || defined(ANDROIDSDL)
|
||||
fscanf(f, "systemclock=%d\n", &dummy); // mainMenu_throttle never changes -> removed
|
||||
fscanf(f, "syncthreshold=%d\n", &dummy); // timeslice_mode never changes -> removed
|
||||
#else
|
||||
|
|
|
@ -30,15 +30,6 @@
|
|||
* programs started from a Picasso workbench.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Note: This is the Pandora specific version of Picasso96:
|
||||
* - only 16 bit color mode is available (R5G6B5) in hardware
|
||||
* - we simulate R8G8B8A8 on Amiga side and use Neon-code to convert to R5G6B5
|
||||
* - we have no hardware sprite for mouse pointer
|
||||
* I removed some code which handled unsupported modes and formats to make code
|
||||
* easier to read.
|
||||
*/
|
||||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
|
||||
|
@ -888,7 +879,7 @@ void picasso_handle_vsync()
|
|||
#define BLT_FUNC(s,d) *d = (*s) | (*d)
|
||||
#include "p96_blit.cpp"
|
||||
#define BLT_NAME BLIT_TRUE_32
|
||||
#ifdef RASPBERRY
|
||||
#ifdef AMIBERRY
|
||||
#define BLT_FUNC(s,d) memset(d, 0xff, sizeof (*d))
|
||||
#else
|
||||
#define BLT_FUNC(s,d) *d = 0xffffffff
|
||||
|
@ -943,7 +934,7 @@ void picasso_handle_vsync()
|
|||
#define BLT_FUNC(s,d) *d = (*s) | (*d)
|
||||
#include "p96_blit.cpp"
|
||||
#define BLT_NAME BLIT_TRUE_24
|
||||
#ifdef RASPBERRY
|
||||
#ifdef AMIBERRY
|
||||
#define BLT_FUNC(s,d) memset(d, 0xff, sizeof (*d))
|
||||
#else
|
||||
#define BLT_FUNC(s,d) *d = 0xffffffff
|
||||
|
@ -998,7 +989,7 @@ void picasso_handle_vsync()
|
|||
#define BLT_FUNC(s,d) *d = (*s) | (*d)
|
||||
#include "p96_blit.cpp"
|
||||
#define BLT_NAME BLIT_TRUE_16
|
||||
#ifdef RASPBERRY
|
||||
#ifdef AMIBERRY
|
||||
#define BLT_FUNC(s,d) memset(d, 0xff, sizeof (*d))
|
||||
#else
|
||||
#define BLT_FUNC(s,d) *d = 0xffffffff
|
||||
|
@ -1053,7 +1044,7 @@ void picasso_handle_vsync()
|
|||
#define BLT_FUNC(s,d) *d = (*s) | (*d)
|
||||
#include "p96_blit.cpp"
|
||||
#define BLT_NAME BLIT_TRUE_8
|
||||
#ifdef RASPBERRY
|
||||
#ifdef AMIBERRY
|
||||
#define BLT_FUNC(s,d) memset(d, 0xff, sizeof (*d))
|
||||
#else
|
||||
#define BLT_FUNC(s,d) *d = 0xffffffff
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#define CPUEMU_11 /* 68000+prefetch emulation */
|
||||
/* #define CPUEMU_12 */ /* cycle-exact cpu&blitter */
|
||||
/* #define ACTION_REPLAY */ /* Action Replay 1/2/3 support */
|
||||
/* #define PICASSO96 */ /* Picasso96 display card emulation */
|
||||
#define PICASSO96 /* Picasso96 display card emulation */
|
||||
/* #define UAEGFX_INTERNAL */ /* built-in libs:picasso96/uaegfx.card */
|
||||
#define BSDSOCKET /* bsdsocket.library emulation */
|
||||
/* #define CAPS */ /* CAPS-image support */
|
||||
|
|
|
@ -1,317 +0,0 @@
|
|||
/*
|
||||
* Minimalistic sound.c implementation for gp2x
|
||||
* (c) notaz, 2007
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/soundcard.h>
|
||||
#include <semaphore.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <sched.h>
|
||||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "uae.h"
|
||||
#include "options.h"
|
||||
#include "memory.h"
|
||||
#include "newcpu.h"
|
||||
#include "custom.h"
|
||||
#include "audio.h"
|
||||
#include "gensound.h"
|
||||
#include "sd-pandora/sound.h"
|
||||
#include "savestate.h"
|
||||
|
||||
|
||||
uae_u16 sndbuffer[4][(SNDBUFFER_LEN+32)*DEFAULT_SOUND_CHANNELS];
|
||||
uae_u16 *sndbufpt = sndbuffer[0];
|
||||
uae_u16 *render_sndbuff = sndbuffer[0];
|
||||
uae_u16 *finish_sndbuff = sndbuffer[0] + SNDBUFFER_LEN*2;
|
||||
|
||||
uae_u16 cdaudio_buffer[CDAUDIO_BUFFERS][(CDAUDIO_BUFFER_LEN + 32) * 2];
|
||||
uae_u16 *cdbufpt = cdaudio_buffer[0];
|
||||
uae_u16 *render_cdbuff = cdaudio_buffer[0];
|
||||
uae_u16 *finish_cdbuff = cdaudio_buffer[0] + CDAUDIO_BUFFER_LEN * 2;
|
||||
bool cdaudio_active = false;
|
||||
static int cdwrcnt = 0;
|
||||
static int cdrdcnt = 0;
|
||||
|
||||
static int have_sound = 0;
|
||||
static int lastfreq;
|
||||
|
||||
void update_sound (float clk)
|
||||
{
|
||||
float evtime;
|
||||
|
||||
evtime = clk * CYCLE_UNIT / (float)currprefs.sound_freq;
|
||||
scaled_sample_evtime = (int)evtime;
|
||||
}
|
||||
|
||||
|
||||
static int sounddev = -1, s_oldrate = 0, s_oldbits = 0, s_oldstereo = 0;
|
||||
static int sound_thread_active = 0, sound_thread_exit = 0;
|
||||
static sem_t sound_sem;
|
||||
static sem_t sound_out_sem;
|
||||
static int output_cnt = 0;
|
||||
static int wrcnt = 0;
|
||||
|
||||
static void *sound_thread(void *unused)
|
||||
{
|
||||
int cnt = 0, sem_val = 0;
|
||||
sound_thread_active = 1;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
sem_getvalue(&sound_sem, &sem_val);
|
||||
while (sem_val > 1)
|
||||
{
|
||||
sem_wait(&sound_sem);
|
||||
sem_getvalue(&sound_sem, &sem_val);
|
||||
}
|
||||
|
||||
sem_wait(&sound_sem);
|
||||
if (sound_thread_exit)
|
||||
break;
|
||||
|
||||
cnt = output_cnt;
|
||||
sem_post(&sound_out_sem);
|
||||
|
||||
if(currprefs.sound_stereo) {
|
||||
if(cdaudio_active && currprefs.sound_freq == 44100 && cdrdcnt < cdwrcnt) {
|
||||
for(int i=0; i<SNDBUFFER_LEN * 2; ++i)
|
||||
sndbuffer[cnt&3][i] += cdaudio_buffer[cdrdcnt & (CDAUDIO_BUFFERS - 1)][i];
|
||||
cdrdcnt++;
|
||||
}
|
||||
write(sounddev, sndbuffer[cnt&3], SNDBUFFER_LEN * 2);
|
||||
}
|
||||
else
|
||||
write(sounddev, sndbuffer[cnt&3], SNDBUFFER_LEN);
|
||||
}
|
||||
|
||||
cdrdcnt = cdwrcnt;
|
||||
sound_thread_active = 0;
|
||||
sem_post(&sound_out_sem);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static void init_soundbuffer_usage(void)
|
||||
{
|
||||
sndbufpt = sndbuffer[0];
|
||||
render_sndbuff = sndbuffer[0];
|
||||
finish_sndbuff = sndbuffer[0] + SNDBUFFER_LEN * 2;
|
||||
output_cnt = 0;
|
||||
wrcnt = 0;
|
||||
|
||||
cdbufpt = cdaudio_buffer[0];
|
||||
render_cdbuff = cdaudio_buffer[0];
|
||||
finish_cdbuff = cdaudio_buffer[0] + CDAUDIO_BUFFER_LEN * 2;
|
||||
cdrdcnt = 0;
|
||||
cdwrcnt = 0;
|
||||
}
|
||||
|
||||
|
||||
static int pandora_start_sound(int rate, int bits, int stereo)
|
||||
{
|
||||
int frag = 0, buffers, ret;
|
||||
unsigned int bsize;
|
||||
|
||||
if (!sound_thread_active)
|
||||
{
|
||||
// init sem, start sound thread
|
||||
pthread_t thr;
|
||||
|
||||
init_soundbuffer_usage();
|
||||
|
||||
s_oldrate = 0;
|
||||
s_oldbits = 0;
|
||||
s_oldstereo = 0;
|
||||
|
||||
sound_thread_exit = 0;
|
||||
ret = sem_init(&sound_sem, 0, 0);
|
||||
if (ret != 0)
|
||||
write_log("sem_init() failed: %i, errno=%i\n", ret, errno);
|
||||
sem_init(&sound_out_sem, 0, 0);
|
||||
ret = pthread_create(&thr, NULL, sound_thread, NULL);
|
||||
if (ret != 0)
|
||||
write_log("pthread_create() failed: %i\n", ret);
|
||||
pthread_detach(thr);
|
||||
}
|
||||
|
||||
if (sounddev <= 0)
|
||||
{
|
||||
sounddev = open("/dev/dsp", O_WRONLY);
|
||||
if (sounddev == -1)
|
||||
{
|
||||
write_log("open(\"/dev/dsp\") failed with %i\n", errno);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// if no settings change, we don't need to do anything
|
||||
if (rate == s_oldrate && s_oldbits == bits && s_oldstereo == stereo)
|
||||
return 0;
|
||||
|
||||
ioctl(sounddev, SNDCTL_DSP_SPEED, &rate);
|
||||
ioctl(sounddev, SNDCTL_DSP_SETFMT, &bits);
|
||||
ioctl(sounddev, SNDCTL_DSP_STEREO, &stereo);
|
||||
// calculate buffer size
|
||||
buffers = 16;
|
||||
bsize = rate / 32;
|
||||
if (rate > 22050) { bsize*=4; buffers*=2; } // 44k mode seems to be very demanding
|
||||
while ((bsize>>=1)) frag++;
|
||||
frag |= buffers<<16; // 16 buffers
|
||||
ioctl(sounddev, SNDCTL_DSP_SETFRAGMENT, &frag);
|
||||
|
||||
s_oldrate = rate;
|
||||
s_oldbits = bits;
|
||||
s_oldstereo = stereo;
|
||||
usleep(100000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// this is meant to be called only once on exit
|
||||
void pandora_stop_sound(void)
|
||||
{
|
||||
if (sound_thread_exit)
|
||||
printf("don't call pandora_stop_sound more than once!\n");
|
||||
if (sound_thread_active)
|
||||
{
|
||||
sound_thread_exit = 1;
|
||||
sem_post(&sound_sem);
|
||||
sem_wait(&sound_out_sem);
|
||||
sem_destroy(&sound_sem);
|
||||
sem_destroy(&sound_out_sem);
|
||||
}
|
||||
|
||||
if (sounddev > 0)
|
||||
close(sounddev);
|
||||
sounddev = -1;
|
||||
}
|
||||
|
||||
|
||||
void finish_sound_buffer (void)
|
||||
{
|
||||
output_cnt = wrcnt;
|
||||
|
||||
sem_post(&sound_sem);
|
||||
sem_wait(&sound_out_sem);
|
||||
|
||||
wrcnt++;
|
||||
sndbufpt = render_sndbuff = sndbuffer[wrcnt&3];
|
||||
if(currprefs.sound_stereo)
|
||||
finish_sndbuff = sndbufpt + SNDBUFFER_LEN;
|
||||
else
|
||||
finish_sndbuff = sndbufpt + SNDBUFFER_LEN/2;
|
||||
}
|
||||
|
||||
|
||||
void pause_sound_buffer (void)
|
||||
{
|
||||
reset_sound ();
|
||||
}
|
||||
|
||||
|
||||
void restart_sound_buffer(void)
|
||||
{
|
||||
sndbufpt = render_sndbuff = sndbuffer[wrcnt&3];
|
||||
if(currprefs.sound_stereo)
|
||||
finish_sndbuff = sndbufpt + SNDBUFFER_LEN;
|
||||
else
|
||||
finish_sndbuff = sndbufpt + SNDBUFFER_LEN/2;
|
||||
|
||||
cdbufpt = render_cdbuff = cdaudio_buffer[cdwrcnt & (CDAUDIO_BUFFERS - 1)];
|
||||
finish_cdbuff = cdbufpt + CDAUDIO_BUFFER_LEN * 2;
|
||||
}
|
||||
|
||||
|
||||
void finish_cdaudio_buffer (void)
|
||||
{
|
||||
cdwrcnt++;
|
||||
cdbufpt = render_cdbuff = cdaudio_buffer[cdwrcnt & (CDAUDIO_BUFFERS - 1)];
|
||||
finish_cdbuff = cdbufpt + CDAUDIO_BUFFER_LEN;
|
||||
audio_activate();
|
||||
}
|
||||
|
||||
|
||||
bool cdaudio_catchup(void)
|
||||
{
|
||||
while((cdwrcnt > cdrdcnt + CDAUDIO_BUFFERS - 10) && (sound_thread_active != 0) && (quit_program == 0)) {
|
||||
sleep_millis(10);
|
||||
}
|
||||
return (sound_thread_active != 0);
|
||||
}
|
||||
|
||||
|
||||
/* Try to determine whether sound is available. This is only for GUI purposes. */
|
||||
int setup_sound (void)
|
||||
{
|
||||
if (pandora_start_sound(currprefs.sound_freq, 16, currprefs.sound_stereo) != 0)
|
||||
return 0;
|
||||
|
||||
sound_available = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int open_sound (void)
|
||||
{
|
||||
if (pandora_start_sound(currprefs.sound_freq, 16, currprefs.sound_stereo) != 0)
|
||||
return 0;
|
||||
|
||||
have_sound = 1;
|
||||
sound_available = 1;
|
||||
|
||||
if(currprefs.sound_stereo)
|
||||
sample_handler = sample16s_handler;
|
||||
else
|
||||
sample_handler = sample16_handler;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void close_sound (void)
|
||||
{
|
||||
if (!have_sound)
|
||||
return;
|
||||
|
||||
// testing shows that reopenning sound device is not a good idea on pandora (causes random sound driver crashes)
|
||||
// we will close it on real exit instead
|
||||
//pandora_stop_sound();
|
||||
have_sound = 0;
|
||||
}
|
||||
|
||||
int init_sound (void)
|
||||
{
|
||||
have_sound=open_sound();
|
||||
return have_sound;
|
||||
}
|
||||
|
||||
void pause_sound (void)
|
||||
{
|
||||
/* nothing to do */
|
||||
}
|
||||
|
||||
void resume_sound (void)
|
||||
{
|
||||
/* nothing to do */
|
||||
}
|
||||
|
||||
void reset_sound (void)
|
||||
{
|
||||
if (!have_sound)
|
||||
return;
|
||||
|
||||
init_soundbuffer_usage();
|
||||
|
||||
clear_sound_buffers();
|
||||
clear_cdaudio_buffers();
|
||||
}
|
||||
|
||||
void sound_volume (int dir)
|
||||
{
|
||||
}
|
|
@ -384,7 +384,7 @@ void close_sound(void)
|
|||
|
||||
// testing shows that reopenning sound device is not a good idea (causes random sound driver crashes)
|
||||
// we will close it on real exit instead
|
||||
#ifdef RASPBERRY
|
||||
#ifdef AMIBERRY
|
||||
//amiberry_stop_sound();
|
||||
#endif
|
||||
have_sound = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue