Synced most files with latest uae4arm sources (2017-09-22)
This commit is contained in:
parent
de12113018
commit
71408f5db5
102 changed files with 17576 additions and 18432 deletions
|
@ -69,7 +69,6 @@
|
|||
<ProjectFile>Amiberry.vcxproj</ProjectFile>
|
||||
<RemoteBuildEnvironment>
|
||||
<Records />
|
||||
<EnvironmentSetupFiles />
|
||||
</RemoteBuildEnvironment>
|
||||
<ParallelJobCount>1</ParallelJobCount>
|
||||
</Build>
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
<ProjectFile>Amiberry.vcxproj</ProjectFile>
|
||||
<RemoteBuildEnvironment>
|
||||
<Records />
|
||||
<EnvironmentSetupFiles />
|
||||
</RemoteBuildEnvironment>
|
||||
<ParallelJobCount>1</ParallelJobCount>
|
||||
</Build>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<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;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;=/opt/vc/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;=/opt/vc/include/interface/vmcs_host/linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;=/opt/vc/include/interface/vcos/pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;=/usr/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL2;=/usr/include/SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<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;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;=/opt/vc/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;=/opt/vc/include/interface/vmcs_host/linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;=/opt/vc/include/interface/vcos/pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;=/usr/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL2;=/usr/include/SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;=/usr/include/libxml2;../../src/archivers;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DEBUG=1;_REENTRANT;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;USE_ARMNEON;ARMV6_ASSEMBLY;AMIBERRY;USE_SDL;CPU_arm;GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard -pipe -Wno-write-strings %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|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;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;=/opt/vc/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;=/opt/vc/include/interface/vmcs_host/linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;=/opt/vc/include/interface/vcos/pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;=/usr/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL2;=/usr/include/SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<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;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;=/opt/vc/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;=/opt/vc/include/interface/vmcs_host/linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;=/opt/vc/include/interface/vcos/pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;=/usr/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL2;=/usr/include/SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;=/usr/include/libxml2;../../src/archivers;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;USE_ARMNEON;ARMV6_ASSEMBLY;AMIBERRY;USE_SDL;CPU_arm;GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard -pipe -Wno-write-strings %(AdditionalOptions)</AdditionalOptions>
|
||||
<OmitFramePointer>true</OmitFramePointer>
|
||||
|
@ -88,7 +88,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-rpi2|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;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;=/opt/vc/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;=/opt/vc/include/interface/vmcs_host/linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;=/opt/vc/include/interface/vcos/pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;=/usr/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL2;=/usr/include/SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<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;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;=/opt/vc/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;=/opt/vc/include/interface/vmcs_host/linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;=/opt/vc/include/interface/vcos/pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;=/usr/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL2;=/usr/include/SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;=/usr/include/libxml2;../../src/archivers;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;USE_ARMNEON;ARMV6_ASSEMBLY;AMIBERRY;USE_SDL;CPU_arm;GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -pipe -Wno-write-strings %(AdditionalOptions)</AdditionalOptions>
|
||||
<OmitFramePointer>true</OmitFramePointer>
|
||||
|
@ -107,7 +107,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-rpi1|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;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;=/opt/vc/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;=/opt/vc/include/interface/vmcs_host/linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;=/opt/vc/include/interface/vcos/pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;=/usr/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL2;=/usr/include/SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<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;../../src;../../src/include;../../src/osdep;../../src/threaddep;../../src/guisan/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;=/opt/vc/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;=/opt/vc/include/interface/vmcs_host/linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;=/opt/vc/include/interface/vcos/pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include;=/usr/include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL2;=/usr/include/SDL2;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;=/usr/include/libxml2;../../src/archivers;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6_ASSEMBLY;AMIBERRY;USE_SDL;CPU_arm;GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv6zk -mfpu=vfp -mfloat-abi=hard -pipe -Wno-write-strings %(AdditionalOptions)</AdditionalOptions>
|
||||
<OmitFramePointer>true</OmitFramePointer>
|
||||
|
@ -285,7 +285,7 @@
|
|||
<ClCompile Include="..\..\src\osdep\gui\UaeListBox.cpp" />
|
||||
<ClCompile Include="..\..\src\osdep\gui\UaeRadioButton.cpp" />
|
||||
<ClCompile Include="..\..\src\osdep\hardfile_amiberry.cpp" />
|
||||
<ClCompile Include="..\..\src\osdep\keyboard_amiberry.cpp" />
|
||||
<ClCompile Include="..\..\src\osdep\keyboard.cpp" />
|
||||
<ClCompile Include="..\..\src\osdep\mp3decoder.cpp" />
|
||||
<ClCompile Include="..\..\src\osdep\neon_helper.s" />
|
||||
<ClCompile Include="..\..\src\osdep\amiberry.cpp" />
|
||||
|
@ -488,19 +488,16 @@
|
|||
<ClInclude Include="..\..\src\include\calc.h" />
|
||||
<ClInclude Include="..\..\src\include\cd32_fmv.h" />
|
||||
<ClInclude Include="..\..\src\include\cia.h" />
|
||||
<ClInclude Include="..\..\src\include\clipboard.h" />
|
||||
<ClInclude Include="..\..\src\include\commpipe.h" />
|
||||
<ClInclude Include="..\..\src\include\cpummu.h" />
|
||||
<ClInclude Include="..\..\src\include\cputbl.h" />
|
||||
<ClInclude Include="..\..\src\include\cpu_prefetch.h" />
|
||||
<ClInclude Include="..\..\src\include\crc32.h" />
|
||||
<ClInclude Include="..\..\src\include\custom.h" />
|
||||
<ClInclude Include="..\..\src\include\debug.h" />
|
||||
<ClInclude Include="..\..\src\include\devices.h" />
|
||||
<ClInclude Include="..\..\src\include\disk.h" />
|
||||
<ClInclude Include="..\..\src\include\diskutil.h" />
|
||||
<ClInclude Include="..\..\src\include\drawing.h" />
|
||||
<ClInclude Include="..\..\src\include\ersatz.h" />
|
||||
<ClInclude Include="..\..\src\include\events.h" />
|
||||
<ClInclude Include="..\..\src\include\execio.h" />
|
||||
<ClInclude Include="..\..\src\include\execlib.h" />
|
||||
|
@ -508,8 +505,6 @@
|
|||
<ClInclude Include="..\..\src\include\filesys.h" />
|
||||
<ClInclude Include="..\..\src\include\flags_arm.h" />
|
||||
<ClInclude Include="..\..\src\include\flashrom.h" />
|
||||
<ClInclude Include="..\..\src\include\fpp-ieee-be.h" />
|
||||
<ClInclude Include="..\..\src\include\fpp-unknown.h" />
|
||||
<ClInclude Include="..\..\src\include\fpp.h" />
|
||||
<ClInclude Include="..\..\src\include\fsdb.h" />
|
||||
<ClInclude Include="..\..\src\include\fsusage.h" />
|
||||
|
@ -529,15 +524,12 @@
|
|||
<ClInclude Include="..\..\src\include\native2amiga_api.h" />
|
||||
<ClInclude Include="..\..\src\include\newcpu.h" />
|
||||
<ClInclude Include="..\..\src\include\options.h" />
|
||||
<ClInclude Include="..\..\src\include\osemu.h" />
|
||||
<ClInclude Include="..\..\src\include\picasso96.h" />
|
||||
<ClInclude Include="..\..\src\include\readcpu.h" />
|
||||
<ClInclude Include="..\..\src\include\rommgr.h" />
|
||||
<ClInclude Include="..\..\src\include\rtc.h" />
|
||||
<ClInclude Include="..\..\src\include\rtgmodes.h" />
|
||||
<ClInclude Include="..\..\src\include\savestate.h" />
|
||||
<ClInclude Include="..\..\src\include\scsi.h" />
|
||||
<ClInclude Include="..\..\src\include\scsidev.h" />
|
||||
<ClInclude Include="..\..\src\include\statusline.h" />
|
||||
<ClInclude Include="..\..\src\include\sysdeps.h" />
|
||||
<ClInclude Include="..\..\src\include\traps.h" />
|
||||
|
@ -561,7 +553,6 @@
|
|||
<ClInclude Include="..\..\src\jit\comptbl.h" />
|
||||
<ClInclude Include="..\..\src\machdep\m68k.h" />
|
||||
<ClInclude Include="..\..\src\machdep\maccess.h" />
|
||||
<ClInclude Include="..\..\src\machdep\md-fpp.h" />
|
||||
<ClInclude Include="..\..\src\machdep\rpt.h" />
|
||||
<ClInclude Include="..\..\src\osdep\cda_play.h" />
|
||||
<ClInclude Include="..\..\src\osdep\config.h" />
|
||||
|
|
|
@ -513,9 +513,6 @@
|
|||
<ClCompile Include="..\..\src\osdep\hardfile_amiberry.cpp">
|
||||
<Filter>Source files\osdep</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\osdep\keyboard_amiberry.cpp">
|
||||
<Filter>Source files\osdep</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\archivers\7z\7zBuf.cpp">
|
||||
<Filter>Source files\archivers\7z</Filter>
|
||||
</ClCompile>
|
||||
|
@ -693,6 +690,9 @@
|
|||
<ClCompile Include="..\..\src\archivers\7z\7zIn.cpp">
|
||||
<Filter>Source files\archivers\7z</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\osdep\keyboard.cpp">
|
||||
<Filter>Source files\osdep</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\..\data\35floppy.ico">
|
||||
|
@ -780,9 +780,6 @@
|
|||
<ClInclude Include="..\..\src\include\cia.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\clipboard.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\commpipe.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
|
@ -798,9 +795,6 @@
|
|||
<ClInclude Include="..\..\src\include\custom.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\debug.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\disk.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
|
@ -810,9 +804,6 @@
|
|||
<ClInclude Include="..\..\src\include\drawing.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\ersatz.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\events.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
|
@ -828,12 +819,6 @@
|
|||
<ClInclude Include="..\..\src\include\flags_arm.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\fpp-ieee-be.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\fpp-unknown.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\fsdb.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
|
@ -879,12 +864,6 @@
|
|||
<ClInclude Include="..\..\src\include\options.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\osemu.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\picasso96.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\readcpu.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
|
@ -900,9 +879,6 @@
|
|||
<ClInclude Include="..\..\src\include\scsi.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\scsidev.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\include\statusline.h">
|
||||
<Filter>Header files\include</Filter>
|
||||
</ClInclude>
|
||||
|
@ -1035,9 +1011,6 @@
|
|||
<ClInclude Include="..\..\src\machdep\maccess.h">
|
||||
<Filter>Header files\machdep</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\machdep\md-fpp.h">
|
||||
<Filter>Header files\machdep</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\machdep\rpt.h">
|
||||
<Filter>Header files\machdep</Filter>
|
||||
</ClInclude>
|
||||
|
|
1188
src/akiko.cpp
1188
src/akiko.cpp
File diff suppressed because it is too large
Load diff
|
@ -206,12 +206,12 @@
|
|||
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "include/memory.h"
|
||||
#include "memory.h"
|
||||
#include "rommgr.h"
|
||||
#include "custom.h"
|
||||
#include "newcpu.h"
|
||||
#include "zfile.h"
|
||||
#include "include/ar.h"
|
||||
#include "ar.h"
|
||||
#include "savestate.h"
|
||||
#include "crc32.h"
|
||||
#include "akiko.h"
|
||||
|
|
76
src/archivers/7z/7zAlloc.cpp
Normal file
76
src/archivers/7z/7zAlloc.cpp
Normal file
|
@ -0,0 +1,76 @@
|
|||
/* 7zAlloc.c -- Allocation functions
|
||||
2010-10-29 : Igor Pavlov : Public domain */
|
||||
|
||||
#include "7zAlloc.h"
|
||||
|
||||
/* #define _SZ_ALLOC_DEBUG */
|
||||
/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */
|
||||
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
int g_allocCount = 0;
|
||||
int g_allocCountTemp = 0;
|
||||
|
||||
#endif
|
||||
|
||||
void *SzAlloc(void *p, size_t size)
|
||||
{
|
||||
p = p;
|
||||
if (size == 0)
|
||||
return 0;
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
fprintf(stderr, "\nAlloc %10d bytes; count = %10d", size, g_allocCount);
|
||||
g_allocCount++;
|
||||
#endif
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void SzFree(void *p, void *address)
|
||||
{
|
||||
p = p;
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
if (address != 0)
|
||||
{
|
||||
g_allocCount--;
|
||||
fprintf(stderr, "\nFree; count = %10d", g_allocCount);
|
||||
}
|
||||
#endif
|
||||
free(address);
|
||||
}
|
||||
|
||||
void *SzAllocTemp(void *p, size_t size)
|
||||
{
|
||||
p = p;
|
||||
if (size == 0)
|
||||
return 0;
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
fprintf(stderr, "\nAlloc_temp %10d bytes; count = %10d", size, g_allocCountTemp);
|
||||
g_allocCountTemp++;
|
||||
#ifdef _WIN32
|
||||
return HeapAlloc(GetProcessHeap(), 0, size);
|
||||
#endif
|
||||
#endif
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void SzFreeTemp(void *p, void *address)
|
||||
{
|
||||
p = p;
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
if (address != 0)
|
||||
{
|
||||
g_allocCountTemp--;
|
||||
fprintf(stderr, "\nFree_temp; count = %10d", g_allocCountTemp);
|
||||
}
|
||||
#ifdef _WIN32
|
||||
HeapFree(GetProcessHeap(), 0, address);
|
||||
return;
|
||||
#endif
|
||||
#endif
|
||||
free(address);
|
||||
}
|
15
src/archivers/7z/7zAlloc.h
Normal file
15
src/archivers/7z/7zAlloc.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* 7zAlloc.h -- Allocation functions
|
||||
2010-10-29 : Igor Pavlov : Public domain */
|
||||
|
||||
#ifndef __7Z_ALLOC_H
|
||||
#define __7Z_ALLOC_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
void *SzAlloc(void *p, size_t size);
|
||||
void SzFree(void *p, void *address);
|
||||
|
||||
void *SzAllocTemp(void *p, size_t size);
|
||||
void SzFreeTemp(void *p, void *address);
|
||||
|
||||
#endif
|
|
@ -142,7 +142,7 @@ static SRes SzDecodeLzma(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inSt
|
|||
size_t lookahead = (1 << 18);
|
||||
if (lookahead > inSize)
|
||||
lookahead = (size_t)inSize;
|
||||
res = inStream->Look((void *)inStream, (void **)&inBuf, &lookahead);
|
||||
res = inStream->Look((void *)inStream, (const void **)&inBuf, &lookahead);
|
||||
if (res != SZ_OK)
|
||||
break;
|
||||
|
||||
|
@ -192,7 +192,7 @@ static SRes SzDecodeLzma2(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inS
|
|||
size_t lookahead = (1 << 18);
|
||||
if (lookahead > inSize)
|
||||
lookahead = (size_t)inSize;
|
||||
res = inStream->Look((void *)inStream, (void **)&inBuf, &lookahead);
|
||||
res = inStream->Look((void *)inStream, (const void **)&inBuf, &lookahead);
|
||||
if (res != SZ_OK)
|
||||
break;
|
||||
|
||||
|
@ -229,7 +229,7 @@ static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer
|
|||
size_t curSize = (1 << 18);
|
||||
if (curSize > inSize)
|
||||
curSize = (size_t)inSize;
|
||||
RINOK(inStream->Look((void *)inStream, (void **)&inBuf, &curSize));
|
||||
RINOK(inStream->Look((void *)inStream, (const void **)&inBuf, &curSize));
|
||||
if (curSize == 0)
|
||||
return SZ_ERROR_INPUT_EOF;
|
||||
memcpy(outBuffer, inBuf, curSize);
|
||||
|
|
|
@ -39,7 +39,7 @@ SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset)
|
|||
|
||||
SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size)
|
||||
{
|
||||
void *lookBuf;
|
||||
const void *lookBuf;
|
||||
if (*size == 0)
|
||||
return SZ_OK;
|
||||
RINOK(stream->Look(stream, &lookBuf, size));
|
||||
|
@ -66,7 +66,7 @@ SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size)
|
|||
return LookInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF);
|
||||
}
|
||||
|
||||
static SRes LookToRead_Look_Lookahead(void *pp, void **buf, size_t *size)
|
||||
static SRes LookToRead_Look_Lookahead(void *pp, const void **buf, size_t *size)
|
||||
{
|
||||
SRes res = SZ_OK;
|
||||
CLookToRead *p = (CLookToRead *)pp;
|
||||
|
@ -84,7 +84,7 @@ static SRes LookToRead_Look_Lookahead(void *pp, void **buf, size_t *size)
|
|||
return res;
|
||||
}
|
||||
|
||||
static SRes LookToRead_Look_Exact(void *pp, void **buf, size_t *size)
|
||||
static SRes LookToRead_Look_Exact(void *pp, const void **buf, size_t *size)
|
||||
{
|
||||
SRes res = SZ_OK;
|
||||
CLookToRead *p = (CLookToRead *)pp;
|
||||
|
|
|
@ -168,7 +168,7 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
SRes (*Look)(void *p, void **buf, size_t *size);
|
||||
SRes (*Look)(void *p, const void **buf, size_t *size);
|
||||
/* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
|
||||
(output(*size) > input(*size)) is not allowed
|
||||
(output(*size) < input(*size)) is allowed */
|
||||
|
|
1575
src/audio.cpp
1575
src/audio.cpp
File diff suppressed because it is too large
Load diff
307
src/autoconf.cpp
307
src/autoconf.cpp
|
@ -1,18 +1,18 @@
|
|||
/*
|
||||
* UAE - The Un*x Amiga Emulator
|
||||
*
|
||||
* AutoConfig devices
|
||||
*
|
||||
* Copyright 1995, 1996 Bernd Schmidt
|
||||
* Copyright 1996 Ed Hanway
|
||||
*/
|
||||
/*
|
||||
* UAE - The Un*x Amiga Emulator
|
||||
*
|
||||
* AutoConfig devices
|
||||
*
|
||||
* Copyright 1995, 1996 Bernd Schmidt
|
||||
* Copyright 1996 Ed Hanway
|
||||
*/
|
||||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "include/memory.h"
|
||||
#include "memory.h"
|
||||
#include "custom.h"
|
||||
#include "newcpu.h"
|
||||
#include "autoconf.h"
|
||||
|
@ -31,30 +31,30 @@ uaecptr rtarea_base = RTAREA_DEFAULT;
|
|||
|
||||
DECLARE_MEMORY_FUNCTIONS(rtarea);
|
||||
addrbank rtarea_bank = {
|
||||
rtarea_lget, rtarea_wget, rtarea_bget,
|
||||
rtarea_lput, rtarea_wput, rtarea_bput,
|
||||
rtarea_xlate, rtarea_check, nullptr, _T("rtarea"), _T("UAE Boot ROM"),
|
||||
rtarea_lget, rtarea_wget, rtarea_bget,
|
||||
rtarea_lput, rtarea_wput, rtarea_bput,
|
||||
rtarea_xlate, rtarea_check, NULL, _T("rtarea"), _T("UAE Boot ROM"),
|
||||
rtarea_lget, rtarea_wget,
|
||||
ABFLAG_ROMIN, S_READ, S_WRITE
|
||||
};
|
||||
|
||||
#define RTAREA_WRITEOFFSET 0xfff0
|
||||
|
||||
static uae_u8 *REGPARAM2 rtarea_xlate(uaecptr addr)
|
||||
static uae_u8 *REGPARAM2 rtarea_xlate (uaecptr addr)
|
||||
{
|
||||
addr &= 0xFFFF;
|
||||
addr &= 0xFFFF;
|
||||
return rtarea_bank.baseaddr + addr;
|
||||
}
|
||||
|
||||
static int REGPARAM2 rtarea_check(uaecptr addr, uae_u32 size)
|
||||
static int REGPARAM2 rtarea_check (uaecptr addr, uae_u32 size)
|
||||
{
|
||||
addr &= 0xFFFF;
|
||||
return (addr + size) <= 0xFFFF;
|
||||
addr &= 0xFFFF;
|
||||
return (addr + size) <= 0xFFFF;
|
||||
}
|
||||
|
||||
static uae_u32 REGPARAM2 rtarea_lget(uaecptr addr)
|
||||
static uae_u32 REGPARAM2 rtarea_lget (uaecptr addr)
|
||||
{
|
||||
addr &= 0xFFFF;
|
||||
addr &= 0xFFFF;
|
||||
if (addr & 1)
|
||||
return 0;
|
||||
if (addr >= 0xfffd)
|
||||
|
@ -62,9 +62,9 @@ static uae_u32 REGPARAM2 rtarea_lget(uaecptr addr)
|
|||
return (rtarea_bank.baseaddr[addr + 0] << 24) | (rtarea_bank.baseaddr[addr + 1] << 16) |
|
||||
(rtarea_bank.baseaddr[addr + 2] << 8) | (rtarea_bank.baseaddr[addr + 3] << 0);
|
||||
}
|
||||
static uae_u32 REGPARAM2 rtarea_wget(uaecptr addr)
|
||||
static uae_u32 REGPARAM2 rtarea_wget (uaecptr addr)
|
||||
{
|
||||
addr &= 0xFFFF;
|
||||
addr &= 0xFFFF;
|
||||
if (addr & 1)
|
||||
return 0;
|
||||
|
||||
|
@ -72,21 +72,19 @@ static uae_u32 REGPARAM2 rtarea_wget(uaecptr addr)
|
|||
|
||||
return (rtarea_bank.baseaddr[addr] << 8) + rtarea_bank.baseaddr[addr + 1];
|
||||
}
|
||||
static uae_u32 REGPARAM2 rtarea_bget(uaecptr addr)
|
||||
static uae_u32 REGPARAM2 rtarea_bget (uaecptr addr)
|
||||
{
|
||||
addr &= 0xFFFF;
|
||||
addr &= 0xFFFF;
|
||||
|
||||
if (addr == RTAREA_INTREQ + 0) {
|
||||
if (addr == RTAREA_INTREQ + 0) {
|
||||
rtarea_bank.baseaddr[addr] = atomic_bit_test_and_reset(&uae_int_requested, 0);
|
||||
//write_log(rtarea_bank.baseaddr[addr] ? _T("+") : _T("-"));
|
||||
}
|
||||
else if (addr == RTAREA_INTREQ + 1) {
|
||||
} else if (addr == RTAREA_INTREQ + 1) {
|
||||
rtarea_bank.baseaddr[addr] = false;
|
||||
} else if (addr == RTAREA_INTREQ + 2) {
|
||||
rtarea_bank.baseaddr[addr] = 0;
|
||||
}
|
||||
else if (addr == RTAREA_INTREQ + 2) {
|
||||
rtarea_bank.baseaddr[addr] = 0;
|
||||
}
|
||||
return rtarea_bank.baseaddr[addr];
|
||||
return rtarea_bank.baseaddr[addr];
|
||||
}
|
||||
|
||||
static bool rtarea_write(uaecptr addr)
|
||||
|
@ -95,10 +93,10 @@ static bool rtarea_write(uaecptr addr)
|
|||
return true;
|
||||
if (addr >= RTAREA_SYSBASE && addr < RTAREA_SYSBASE + 4)
|
||||
return true;
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void REGPARAM2 rtarea_bput(uaecptr addr, uae_u32 value)
|
||||
static void REGPARAM2 rtarea_bput (uaecptr addr, uae_u32 value)
|
||||
{
|
||||
addr &= 0xffff;
|
||||
if (!rtarea_write(addr))
|
||||
|
@ -109,7 +107,7 @@ static void REGPARAM2 rtarea_bput(uaecptr addr, uae_u32 value)
|
|||
}
|
||||
}
|
||||
|
||||
static void REGPARAM2 rtarea_wput(uaecptr addr, uae_u32 value)
|
||||
static void REGPARAM2 rtarea_wput (uaecptr addr, uae_u32 value)
|
||||
{
|
||||
addr &= 0xffff;
|
||||
value &= 0xffff;
|
||||
|
@ -123,10 +121,10 @@ static void REGPARAM2 rtarea_wput(uaecptr addr, uae_u32 value)
|
|||
uaecptr addr2 = addr - RTAREA_TRAP_STATUS;
|
||||
|
||||
rtarea_bank.baseaddr[addr + 0] = value >> 8;
|
||||
rtarea_bank.baseaddr[addr + 1] = uae_u8(value);
|
||||
rtarea_bank.baseaddr[addr + 1] = (uae_u8)value;
|
||||
}
|
||||
|
||||
static void REGPARAM2 rtarea_lput(uaecptr addr, uae_u32 value)
|
||||
static void REGPARAM2 rtarea_lput (uaecptr addr, uae_u32 value)
|
||||
{
|
||||
addr &= 0xffff;
|
||||
if (addr & 1)
|
||||
|
@ -149,33 +147,33 @@ void rtarea_reset(void)
|
|||
memset(p + RTAREA_TRAP_STATUS, 0, RTAREA_TRAP_STATUS_SIZE * (RTAREA_TRAP_DATA_NUM + RTAREA_TRAP_DATA_SEND_NUM));
|
||||
memset(p + RTAREA_HEARTBEAT, 0, 0x10000 - RTAREA_HEARTBEAT);
|
||||
memset(p + RTAREA_VARIABLES, 0, RTAREA_VARIABLES_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* some quick & dirty code to fill in the rt area and save me a lot of
|
||||
* scratch paper
|
||||
*/
|
||||
* scratch paper
|
||||
*/
|
||||
|
||||
static int rt_addr;
|
||||
static int rt_straddr;
|
||||
|
||||
uae_u32 addr(int ptr)
|
||||
uae_u32 addr (int ptr)
|
||||
{
|
||||
return uae_u32(ptr) + rtarea_base;
|
||||
return (uae_u32)ptr + rtarea_base;
|
||||
}
|
||||
|
||||
void db(uae_u8 data)
|
||||
void db (uae_u8 data)
|
||||
{
|
||||
rtarea_bank.baseaddr[rt_addr++] = data;
|
||||
}
|
||||
|
||||
void dw(uae_u16 data)
|
||||
void dw (uae_u16 data)
|
||||
{
|
||||
rtarea_bank.baseaddr[rt_addr++] = uae_u8(data >> 8);
|
||||
rtarea_bank.baseaddr[rt_addr++] = uae_u8(data);
|
||||
rtarea_bank.baseaddr[rt_addr++] = (uae_u8)(data >> 8);
|
||||
rtarea_bank.baseaddr[rt_addr++] = (uae_u8)data;
|
||||
}
|
||||
|
||||
void dl(uae_u32 data)
|
||||
void dl (uae_u32 data)
|
||||
{
|
||||
rtarea_bank.baseaddr[rt_addr++] = data >> 24;
|
||||
rtarea_bank.baseaddr[rt_addr++] = data >> 16;
|
||||
|
@ -183,98 +181,102 @@ void dl(uae_u32 data)
|
|||
rtarea_bank.baseaddr[rt_addr++] = data;
|
||||
}
|
||||
|
||||
uae_u8 dbg(uaecptr addr)
|
||||
uae_u8 dbg (uaecptr addr)
|
||||
{
|
||||
addr -= rtarea_base;
|
||||
addr -= rtarea_base;
|
||||
return rtarea_bank.baseaddr[addr];
|
||||
}
|
||||
|
||||
/* store strings starting at the end of the rt area and working
|
||||
* backward. store pointer at current address
|
||||
*/
|
||||
* backward. store pointer at current address
|
||||
*/
|
||||
|
||||
uae_u32 ds_ansi(const uae_char *str)
|
||||
uae_u32 ds_ansi (const uae_char *str)
|
||||
{
|
||||
if (!str)
|
||||
return addr(rt_straddr);
|
||||
int len = strlen(str) + 1;
|
||||
rt_straddr -= len;
|
||||
strcpy(reinterpret_cast<uae_char*>(rtarea_bank.baseaddr) + rt_straddr, str);
|
||||
return addr(rt_straddr);
|
||||
int len;
|
||||
|
||||
if (!str)
|
||||
return addr (rt_straddr);
|
||||
len = strlen (str) + 1;
|
||||
rt_straddr -= len;
|
||||
strcpy ((uae_char*)rtarea_bank.baseaddr + rt_straddr, str);
|
||||
return addr (rt_straddr);
|
||||
}
|
||||
|
||||
uae_u32 ds(const TCHAR *str)
|
||||
uae_u32 ds (const TCHAR *str)
|
||||
{
|
||||
char *s = ua(str);
|
||||
uae_u32 v = ds_ansi(s);
|
||||
xfree(s);
|
||||
char *s = ua (str);
|
||||
uae_u32 v = ds_ansi (s);
|
||||
xfree (s);
|
||||
return v;
|
||||
}
|
||||
|
||||
uae_u32 ds_bstr_ansi(const uae_char *str)
|
||||
uae_u32 ds_bstr_ansi (const uae_char *str)
|
||||
{
|
||||
int len = strlen(str) + 2;
|
||||
int len;
|
||||
|
||||
len = strlen (str) + 2;
|
||||
rt_straddr -= len;
|
||||
while (rt_straddr & 3)
|
||||
rt_straddr--;
|
||||
rtarea_bank.baseaddr[rt_straddr] = len - 2;
|
||||
strcpy(reinterpret_cast<uae_char*>(rtarea_bank.baseaddr) + rt_straddr + 1, str);
|
||||
return addr(rt_straddr) >> 2;
|
||||
strcpy ((uae_char*)rtarea_bank.baseaddr + rt_straddr + 1, str);
|
||||
return addr (rt_straddr) >> 2;
|
||||
}
|
||||
|
||||
void calltrap(uae_u32 n)
|
||||
void calltrap (uae_u32 n)
|
||||
{
|
||||
dw(0xA000 + n);
|
||||
dw (0xA000 + n);
|
||||
}
|
||||
|
||||
void org(uae_u32 a)
|
||||
void org (uae_u32 a)
|
||||
{
|
||||
if (((a & 0xffff0000) != 0x00f00000) && ((a & 0xffff0000) != rtarea_base))
|
||||
write_log(_T("ORG: corrupt address! %08X"), a);
|
||||
rt_addr = a & 0xffff;
|
||||
if ( ((a & 0xffff0000) != 0x00f00000) && ((a & 0xffff0000) != rtarea_base) )
|
||||
write_log (_T("ORG: corrupt address! %08X"), a);
|
||||
rt_addr = a & 0xffff;
|
||||
}
|
||||
|
||||
uae_u32 here(void)
|
||||
uae_u32 here (void)
|
||||
{
|
||||
return addr(rt_addr);
|
||||
return addr (rt_addr);
|
||||
}
|
||||
|
||||
void align(int b)
|
||||
void align (int b)
|
||||
{
|
||||
rt_addr = (rt_addr + b - 1) & ~(b - 1);
|
||||
rt_addr = (rt_addr + b - 1) & ~(b - 1);
|
||||
}
|
||||
|
||||
static uae_u32 REGPARAM2 nullfunc(TrapContext *ctx)
|
||||
{
|
||||
write_log(_T("Null function called\n"));
|
||||
return 0;
|
||||
write_log (_T("Null function called\n"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uae_u32 REGPARAM2 getchipmemsize(TrapContext *ctx)
|
||||
static uae_u32 REGPARAM2 getchipmemsize (TrapContext *ctx)
|
||||
{
|
||||
trap_set_dreg(ctx, 1, 0);
|
||||
trap_set_areg(ctx, 1, 0);
|
||||
return chipmem_bank.allocated_size;
|
||||
return chipmem_bank.allocated_size;
|
||||
}
|
||||
|
||||
static uae_u32 REGPARAM2 uae_puts(TrapContext *ctx)
|
||||
static uae_u32 REGPARAM2 uae_puts (TrapContext *ctx)
|
||||
{
|
||||
uae_char buf[MAX_DPATH];
|
||||
trap_get_string(ctx, buf, trap_get_areg(ctx, 0), sizeof(uae_char));
|
||||
trap_get_string(ctx, buf, trap_get_areg(ctx, 0), sizeof (uae_char));
|
||||
write_log(_T("%s"), buf);
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void rtarea_init_mem(void)
|
||||
void rtarea_init_mem (void)
|
||||
{
|
||||
rtarea_bank.reserved_size = RTAREA_SIZE;
|
||||
rtarea_bank.start = rtarea_base;
|
||||
if (!mapped_malloc(&rtarea_bank)) {
|
||||
write_log(_T("virtual memory exhausted (rtarea)!\n"));
|
||||
target_startup_msg(_T("Internal error"), _T("Virtual memory exhausted (rtarea)."));
|
||||
uae_restart(1, nullptr);
|
||||
return;
|
||||
}
|
||||
if (!mapped_malloc (&rtarea_bank)) {
|
||||
write_log (_T("virtual memory exhausted (rtarea)!\n"));
|
||||
target_startup_msg(_T("Internal error"), _T("Virtual memory exhausted (rtarea)."));
|
||||
uae_restart(1, NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void rtarea_free(void)
|
||||
|
@ -282,101 +284,102 @@ void rtarea_free(void)
|
|||
mapped_free(&rtarea_bank);
|
||||
}
|
||||
|
||||
void rtarea_init(void)
|
||||
void rtarea_init (void)
|
||||
{
|
||||
TCHAR uaever[100];
|
||||
uae_u32 a;
|
||||
TCHAR uaever[100];
|
||||
|
||||
rt_straddr = 0xFF00 - 2;
|
||||
rt_addr = 0;
|
||||
rt_straddr = 0xFF00 - 2;
|
||||
rt_addr = 0;
|
||||
|
||||
init_traps();
|
||||
init_traps ();
|
||||
|
||||
rtarea_init_mem();
|
||||
memset(rtarea_bank.baseaddr, 0, RTAREA_SIZE);
|
||||
rtarea_init_mem ();
|
||||
memset (rtarea_bank.baseaddr, 0, RTAREA_SIZE);
|
||||
|
||||
_stprintf(uaever, _T("uae-%d.%d.%d"), UAEMAJOR, UAEMINOR, UAESUBREV);
|
||||
_stprintf (uaever, _T("uae-%d.%d.%d"), UAEMAJOR, UAEMINOR, UAESUBREV);
|
||||
|
||||
EXPANSION_uaeversion = ds(uaever);
|
||||
EXPANSION_explibname = ds(_T("expansion.library"));
|
||||
EXPANSION_doslibname = ds(_T("dos.library"));
|
||||
EXPANSION_uaedevname = ds(_T("uae.device"));
|
||||
EXPANSION_uaeversion = ds (uaever);
|
||||
EXPANSION_explibname = ds (_T("expansion.library"));
|
||||
EXPANSION_doslibname = ds (_T("dos.library"));
|
||||
EXPANSION_uaedevname = ds (_T("uae.device"));
|
||||
|
||||
dw(0);
|
||||
dw(0);
|
||||
dw (0);
|
||||
dw (0);
|
||||
|
||||
#ifdef FILESYS
|
||||
filesys_install_code();
|
||||
filesys_install_code ();
|
||||
#endif
|
||||
|
||||
deftrap(NULL); /* Generic emulator trap */
|
||||
deftrap (NULL); /* Generic emulator trap */
|
||||
|
||||
uae_u32 a = here();
|
||||
/* Dummy trap - removing this breaks the filesys emulation. */
|
||||
org(rtarea_base + 0xFF00);
|
||||
calltrap(deftrap2(nullfunc, TRAPFLAG_NO_RETVAL, _T("")));
|
||||
a = here();
|
||||
/* Dummy trap - removing this breaks the filesys emulation. */
|
||||
org (rtarea_base + 0xFF00);
|
||||
calltrap (deftrap2 (nullfunc, TRAPFLAG_NO_RETVAL, _T("")));
|
||||
|
||||
org(rtarea_base + 0xFF80);
|
||||
calltrap(deftrapres(getchipmemsize, TRAPFLAG_DORET, _T("getchipmemsize")));
|
||||
org (rtarea_base + 0xFF80);
|
||||
calltrap (deftrapres (getchipmemsize, TRAPFLAG_DORET, _T("getchipmemsize")));
|
||||
dw(RTS);
|
||||
|
||||
org(rtarea_base + 0xFF10);
|
||||
calltrap(deftrapres(uae_puts, TRAPFLAG_NO_RETVAL, _T("uae_puts")));
|
||||
dw(RTS);
|
||||
org (rtarea_base + 0xFF10);
|
||||
calltrap (deftrapres (uae_puts, TRAPFLAG_NO_RETVAL, _T("uae_puts")));
|
||||
dw (RTS);
|
||||
|
||||
org(a);
|
||||
org (a);
|
||||
|
||||
uae_boot_rom_size = here() - rtarea_base;
|
||||
uae_boot_rom_size = here () - rtarea_base;
|
||||
if (uae_boot_rom_size >= RTAREA_TRAPS) {
|
||||
write_log(_T("RTAREA_TRAPS needs to be increased!"));
|
||||
target_startup_msg(_T("Internal error"), _T("RTAREA_TRAPS needs to be increased."));
|
||||
uae_restart(1, nullptr);
|
||||
return;
|
||||
write_log (_T("RTAREA_TRAPS needs to be increased!"));
|
||||
target_startup_msg(_T("Internal error"), _T("RTAREA_TRAPS needs to be increased."));
|
||||
uae_restart(1, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef PICASSO96
|
||||
uaegfx_install_code(rtarea_base + RTAREA_RTG);
|
||||
uaegfx_install_code (rtarea_base + RTAREA_RTG);
|
||||
#endif
|
||||
|
||||
org(RTAREA_TRAPS | rtarea_base);
|
||||
init_extended_traps();
|
||||
org (RTAREA_TRAPS | rtarea_base);
|
||||
init_extended_traps();
|
||||
}
|
||||
|
||||
volatile uae_atomic uae_int_requested = 0;
|
||||
|
||||
void rtarea_setup(void)
|
||||
{
|
||||
uaecptr base = need_uae_boot_rom(&currprefs);
|
||||
if (base) {
|
||||
write_log(_T("RTAREA located at %08X\n"), base);
|
||||
rtarea_base = base;
|
||||
}
|
||||
uaecptr base = need_uae_boot_rom (&currprefs);
|
||||
if (base) {
|
||||
write_log (_T("RTAREA located at %08X\n"), base);
|
||||
rtarea_base = base;
|
||||
}
|
||||
}
|
||||
|
||||
uaecptr makedatatable(uaecptr resid, uaecptr resname, uae_u8 type, uae_s8 priority, uae_u16 ver, uae_u16 rev)
|
||||
uaecptr makedatatable (uaecptr resid, uaecptr resname, uae_u8 type, uae_s8 priority, uae_u16 ver, uae_u16 rev)
|
||||
{
|
||||
uaecptr datatable = here();
|
||||
uaecptr datatable = here ();
|
||||
|
||||
dw(0xE000); /* INITBYTE */
|
||||
dw(0x0008); /* LN_TYPE */
|
||||
dw(type << 8);
|
||||
dw(0xE000); /* INITBYTE */
|
||||
dw(0x0009); /* LN_PRI */
|
||||
dw(priority << 8);
|
||||
dw(0xC000); /* INITLONG */
|
||||
dw(0x000A); /* LN_NAME */
|
||||
dl(resname);
|
||||
dw(0xE000); /* INITBYTE */
|
||||
dw(0x000E); /* LIB_FLAGS */
|
||||
dw(0x0600); /* LIBF_SUMUSED | LIBF_CHANGED */
|
||||
dw(0xD000); /* INITWORD */
|
||||
dw(0x0014); /* LIB_VERSION */
|
||||
dw(ver);
|
||||
dw(0xD000); /* INITWORD */
|
||||
dw(0x0016); /* LIB_REVISION */
|
||||
dw(rev);
|
||||
dw(0xC000); /* INITLONG */
|
||||
dw(0x0018); /* LIB_IDSTRING */
|
||||
dl(resid);
|
||||
dw(0x0000); /* end of table */
|
||||
return datatable;
|
||||
dw (0xE000); /* INITBYTE */
|
||||
dw (0x0008); /* LN_TYPE */
|
||||
dw (type << 8);
|
||||
dw (0xE000); /* INITBYTE */
|
||||
dw (0x0009); /* LN_PRI */
|
||||
dw (priority << 8);
|
||||
dw (0xC000); /* INITLONG */
|
||||
dw (0x000A); /* LN_NAME */
|
||||
dl (resname);
|
||||
dw (0xE000); /* INITBYTE */
|
||||
dw (0x000E); /* LIB_FLAGS */
|
||||
dw (0x0600); /* LIBF_SUMUSED | LIBF_CHANGED */
|
||||
dw (0xD000); /* INITWORD */
|
||||
dw (0x0014); /* LIB_VERSION */
|
||||
dw (ver);
|
||||
dw (0xD000); /* INITWORD */
|
||||
dw (0x0016); /* LIB_REVISION */
|
||||
dw (rev);
|
||||
dw (0xC000); /* INITLONG */
|
||||
dw (0x0018); /* LIB_IDSTRING */
|
||||
dl (resid);
|
||||
dw (0x0000); /* end of table */
|
||||
return datatable;
|
||||
}
|
||||
|
|
2812
src/blitfunc.cpp
2812
src/blitfunc.cpp
File diff suppressed because it is too large
Load diff
517
src/blitops.cpp
517
src/blitops.cpp
|
@ -1,263 +1,262 @@
|
|||
/* This file generated automatically - do not edit */
|
||||
/* This file generated automatically - do not edit */
|
||||
|
||||
#include "genblitter.h"
|
||||
|
||||
struct blitop blitops[256] =
|
||||
{
|
||||
/* 00 */ { "0", 0 },
|
||||
/* 01 */ { "~(srca | srcb | srcc)", 7 },
|
||||
/* 02 */ { "(srcc & ~(srca | srcb))", 7 },
|
||||
/* 03 */ { "~(srca | srcb)", 3 },
|
||||
/* 04 */ { "(srcb & ~(srca | srcc))", 7 },
|
||||
/* 05 */ { "~(srca | srcc)", 5 },
|
||||
/* 06 */ { "(~srca & (srcb ^ srcc))", 7 },
|
||||
/* 07 */ { "~(srca | (srcb & srcc))", 7 },
|
||||
/* 08 */ { "(~srca & srcb & srcc)", 7 },
|
||||
/* 09 */ { "~(srca | (srcb ^ srcc))", 7 },
|
||||
/* 0a */ { "(~srca & srcc)", 5 },
|
||||
/* 0b */ { "~(srca | (srcb & ~srcc))", 7 },
|
||||
/* 0c */ { "(~srca & srcb)", 3 },
|
||||
/* 0d */ { "~(srca | (~srcb & srcc))", 7 },
|
||||
/* 0e */ { "(~srca & (srcb | srcc))", 7 },
|
||||
/* 0f */ { "~srca", 1 },
|
||||
/* 10 */ { "(srca & ~(srcb | srcc))", 7 },
|
||||
/* 11 */ { "~(srcb | srcc)", 6 },
|
||||
/* 12 */ { "(~srcb & (srca ^ srcc))", 7 },
|
||||
/* 13 */ { "~(srcb | (srca & srcc))", 7 },
|
||||
/* 14 */ { "(~srcc & (srca ^ srcb))", 7 },
|
||||
/* 15 */ { "~(srcc | (srca & srcb))", 7 },
|
||||
/* 16 */ { "(srca ^ ((srca & srcb) | (srcb ^ srcc)))", 7 },
|
||||
/* 17 */ { "~(srca ^ ((srca ^ srcb) & (srca ^ srcc)))", 7 },
|
||||
/* 18 */ { "((srca ^ srcb) & (srca ^ srcc))", 7 },
|
||||
/* 19 */ { "(srcb ^ (~srcc | (srca & srcb)))", 7 },
|
||||
/* 1a */ { "(srca ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* 1b */ { "(srca ^ (srcc | ~(srca ^ srcb)))", 7 },
|
||||
/* 1c */ { "(srca ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* 1d */ { "(srca ^ (srcb | ~(srca ^ srcc)))", 7 },
|
||||
/* 1e */ { "(srca ^ (srcb | srcc))", 7 },
|
||||
/* 1f */ { "~(srca & (srcb | srcc))", 7 },
|
||||
/* 20 */ { "(srca & ~srcb & srcc)", 7 },
|
||||
/* 21 */ { "~(srcb | (srca ^ srcc))", 7 },
|
||||
/* 22 */ { "(~srcb & srcc)", 6 },
|
||||
/* 23 */ { "~(srcb | (srca & ~srcc))", 7 },
|
||||
/* 24 */ { "((srca ^ srcb) & (srcb ^ srcc))", 7 },
|
||||
/* 25 */ { "(srca ^ (~srcc | (srca & srcb)))", 7 },
|
||||
/* 26 */ { "(srcb ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* 27 */ { "~(srca ^ (srcc & (srca ^ srcb)))", 7 },
|
||||
/* 28 */ { "(srcc & (srca ^ srcb))", 7 },
|
||||
/* 29 */ { "~(srca ^ srcb ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* 2a */ { "(srcc & ~(srca & srcb))", 7 },
|
||||
/* 2b */ { "~(srca ^ ((srca ^ srcb) & (srcb ^ srcc)))", 7 },
|
||||
/* 2c */ { "(srcb ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* 2d */ { "(srca ^ (srcb | ~srcc))", 7 },
|
||||
/* 2e */ { "(srca ^ (srcb | (srca ^ srcc)))", 7 },
|
||||
/* 2f */ { "~(srca & (srcb | ~srcc))", 7 },
|
||||
/* 30 */ { "(srca & ~srcb)", 3 },
|
||||
/* 31 */ { "~(srcb | (~srca & srcc))", 7 },
|
||||
/* 32 */ { "(~srcb & (srca | srcc))", 7 },
|
||||
/* 33 */ { "~srcb", 2 },
|
||||
/* 34 */ { "(srcb ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* 35 */ { "(srcb ^ (srca | ~(srcb ^ srcc)))", 7 },
|
||||
/* 36 */ { "(srcb ^ (srca | srcc))", 7 },
|
||||
/* 37 */ { "~(srcb & (srca | srcc))", 7 },
|
||||
/* 38 */ { "(srca ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 39 */ { "(srcb ^ (srca | ~srcc))", 7 },
|
||||
/* 3a */ { "(srcb ^ (srca | (srcb ^ srcc)))", 7 },
|
||||
/* 3b */ { "~(srcb & (srca | ~srcc))", 7 },
|
||||
/* 3c */ { "(srca ^ srcb)", 3 },
|
||||
/* 3d */ { "(srca ^ (srcb | ~(srca | srcc)))", 7 },
|
||||
/* 3e */ { "(srca ^ (srcb | (srca ^ (srca | srcc))))", 7 },
|
||||
/* 3f */ { "~(srca & srcb)", 3 },
|
||||
/* 40 */ { "(srca & srcb & ~srcc)", 7 },
|
||||
/* 41 */ { "~(srcc | (srca ^ srcb))", 7 },
|
||||
/* 42 */ { "((srca ^ srcc) & (srcb ^ srcc))", 7 },
|
||||
/* 43 */ { "(srca ^ (~srcb | (srca & srcc)))", 7 },
|
||||
/* 44 */ { "(srcb & ~srcc)", 6 },
|
||||
/* 45 */ { "~(srcc | (srca & ~srcb))", 7 },
|
||||
/* 46 */ { "(srcc ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* 47 */ { "~(srca ^ (srcb & (srca ^ srcc)))", 7 },
|
||||
/* 48 */ { "(srcb & (srca ^ srcc))", 7 },
|
||||
/* 49 */ { "~(srca ^ srcc ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* 4a */ { "(srcc ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* 4b */ { "(srca ^ (~srcb | srcc))", 7 },
|
||||
/* 4c */ { "(srcb & ~(srca & srcc))", 7 },
|
||||
/* 4d */ { "(srca ^ ((srca ^ srcb) | ~(srca ^ srcc)))", 7 },
|
||||
/* 4e */ { "(srca ^ (srcc | (srca ^ srcb)))", 7 },
|
||||
/* 4f */ { "~(srca & (~srcb | srcc))", 7 },
|
||||
/* 50 */ { "(srca & ~srcc)", 5 },
|
||||
/* 51 */ { "~(srcc | (~srca & srcb))", 7 },
|
||||
/* 52 */ { "(srcc ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* 53 */ { "~(srcb ^ (srca & (srcb ^ srcc)))", 7 },
|
||||
/* 54 */ { "(~srcc & (srca | srcb))", 7 },
|
||||
/* 55 */ { "~srcc", 4 },
|
||||
/* 56 */ { "(srcc ^ (srca | srcb))", 7 },
|
||||
/* 57 */ { "~(srcc & (srca | srcb))", 7 },
|
||||
/* 58 */ { "(srca ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 59 */ { "(srcc ^ (srca | ~srcb))", 7 },
|
||||
/* 5a */ { "(srca ^ srcc)", 5 },
|
||||
/* 5b */ { "(srca ^ (srcc | ~(srca | srcb)))", 7 },
|
||||
/* 5c */ { "(srcc ^ (srca | (srcb ^ srcc)))", 7 },
|
||||
/* 5d */ { "~(srcc & (srca | ~srcb))", 7 },
|
||||
/* 5e */ { "(srca ^ (srcc | (srca ^ (srca | srcb))))", 7 },
|
||||
/* 5f */ { "~(srca & srcc)", 5 },
|
||||
/* 60 */ { "(srca & (srcb ^ srcc))", 7 },
|
||||
/* 61 */ { "~(srcb ^ srcc ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* 62 */ { "(srcc ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 63 */ { "(srcb ^ (~srca | srcc))", 7 },
|
||||
/* 64 */ { "(srcb ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 65 */ { "(srcc ^ (~srca | srcb))", 7 },
|
||||
/* 66 */ { "(srcb ^ srcc)", 6 },
|
||||
/* 67 */ { "(srcb ^ (srcc | ~(srca | srcb)))", 7 },
|
||||
/* 68 */ { "((srca & srcb) ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 69 */ { "~(srca ^ srcb ^ srcc)", 7 },
|
||||
/* 6a */ { "(srcc ^ (srca & srcb))", 7 },
|
||||
/* 6b */ { "~(srca ^ srcb ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 6c */ { "(srcb ^ (srca & srcc))", 7 },
|
||||
/* 6d */ { "~(srca ^ srcc ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 6e */ { "((~srca & srcb) | (srcb ^ srcc))", 7 },
|
||||
/* 6f */ { "(~srca | (srcb ^ srcc))", 7 },
|
||||
/* 70 */ { "(srca & ~(srcb & srcc))", 7 },
|
||||
/* 71 */ { "~(srca ^ ((srca ^ srcb) | (srca ^ srcc)))", 7 },
|
||||
/* 72 */ { "(srcb ^ (srcc | (srca ^ srcb)))", 7 },
|
||||
/* 73 */ { "~(srcb & (~srca | srcc))", 7 },
|
||||
/* 74 */ { "(srcc ^ (srcb | (srca ^ srcc)))", 7 },
|
||||
/* 75 */ { "~(srcc & (~srca | srcb))", 7 },
|
||||
/* 76 */ { "(srcb ^ (srcc | (srca ^ (srca & srcb))))", 7 },
|
||||
/* 77 */ { "~(srcb & srcc)", 6 },
|
||||
/* 78 */ { "(srca ^ (srcb & srcc))", 7 },
|
||||
/* 79 */ { "~(srcb ^ srcc ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* 7a */ { "((srca & ~srcb) | (srca ^ srcc))", 7 },
|
||||
/* 7b */ { "(~srcb | (srca ^ srcc))", 7 },
|
||||
/* 7c */ { "((srca ^ srcb) | (srca & ~srcc))", 7 },
|
||||
/* 7d */ { "(~srcc | (srca ^ srcb))", 7 },
|
||||
/* 7e */ { "((srca ^ srcb) | (srca ^ srcc))", 7 },
|
||||
/* 7f */ { "~(srca & srcb & srcc)", 7 },
|
||||
/* 80 */ { "(srca & srcb & srcc)", 7 },
|
||||
/* 81 */ { "~((srca ^ srcb) | (srca ^ srcc))", 7 },
|
||||
/* 82 */ { "(srcc & ~(srca ^ srcb))", 7 },
|
||||
/* 83 */ { "(srca ^ (~srcb | (srca & ~srcc)))", 7 },
|
||||
/* 84 */ { "(srcb & ~(srca ^ srcc))", 7 },
|
||||
/* 85 */ { "(srca ^ (~srcc | (srca & ~srcb)))", 7 },
|
||||
/* 86 */ { "(srcb ^ srcc ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* 87 */ { "~(srca ^ (srcb & srcc))", 7 },
|
||||
/* 88 */ { "(srcb & srcc)", 6 },
|
||||
/* 89 */ { "(srcb ^ (~srcc & (~srca | srcb)))", 7 },
|
||||
/* 8a */ { "(srcc & (~srca | srcb))", 7 },
|
||||
/* 8b */ { "(srca ^ (~srcb | (srca ^ srcc)))", 7 },
|
||||
/* 8c */ { "(srcb & (~srca | srcc))", 7 },
|
||||
/* 8d */ { "(srca ^ (~srcc | (srca ^ srcb)))", 7 },
|
||||
/* 8e */ { "(srca ^ ((srca ^ srcb) | (srca ^ srcc)))", 7 },
|
||||
/* 8f */ { "(~srca | (srcb & srcc))", 7 },
|
||||
/* 90 */ { "(srca & ~(srcb ^ srcc))", 7 },
|
||||
/* 91 */ { "(srcb ^ (~srcc | (~srca & srcb)))", 7 },
|
||||
/* 92 */ { "(srca ^ srcc ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 93 */ { "~(srcb ^ (srca & srcc))", 7 },
|
||||
/* 94 */ { "(srca ^ srcb ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 95 */ { "~(srcc ^ (srca & srcb))", 7 },
|
||||
/* 96 */ { "(srca ^ srcb ^ srcc)", 7 },
|
||||
/* 97 */ { "(srca ^ srcb ^ (srcc | ~(srca | srcb)))", 7 },
|
||||
/* 98 */ { "(srcb ^ (~srcc & (srca | srcb)))", 7 },
|
||||
/* 99 */ { "~(srcb ^ srcc)", 6 },
|
||||
/* 9a */ { "(srcc ^ (srca & ~srcb))", 7 },
|
||||
/* 9b */ { "~(srcb ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 9c */ { "(srcb ^ (srca & ~srcc))", 7 },
|
||||
/* 9d */ { "~(srcc ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 9e */ { "(srcb ^ srcc ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* 9f */ { "~(srca & (srcb ^ srcc))", 7 },
|
||||
/* a0 */ { "(srca & srcc)", 5 },
|
||||
/* a1 */ { "(srca ^ (~srcc & (srca | ~srcb)))", 7 },
|
||||
/* a2 */ { "(srcc & (srca | ~srcb))", 7 },
|
||||
/* a3 */ { "(srcb ^ (~srca | (srcb ^ srcc)))", 7 },
|
||||
/* a4 */ { "(srca ^ (~srcc & (srca | srcb)))", 7 },
|
||||
/* a5 */ { "~(srca ^ srcc)", 5 },
|
||||
/* a6 */ { "(srcc ^ (~srca & srcb))", 7 },
|
||||
/* a7 */ { "~(srca ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* a8 */ { "(srcc & (srca | srcb))", 7 },
|
||||
/* a9 */ { "~(srcc ^ (srca | srcb))", 7 },
|
||||
/* aa */ { "srcc", 4 },
|
||||
/* ab */ { "(srcc | ~(srca | srcb))", 7 },
|
||||
/* ac */ { "(srcb ^ (srca & (srcb ^ srcc)))", 7 },
|
||||
/* ad */ { "~(srcc ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* ae */ { "(srcc | (~srca & srcb))", 7 },
|
||||
/* af */ { "(~srca | srcc)", 5 },
|
||||
/* b0 */ { "(srca & (~srcb | srcc))", 7 },
|
||||
/* b1 */ { "~(srca ^ (srcc | (srca ^ srcb)))", 7 },
|
||||
/* b2 */ { "(srca ^ ((srca ^ srcc) & (srcb ^ srcc)))", 7 },
|
||||
/* b3 */ { "(~srcb | (srca & srcc))", 7 },
|
||||
/* b4 */ { "(srca ^ (srcb & ~srcc))", 7 },
|
||||
/* b5 */ { "~(srcc ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* b6 */ { "(srca ^ srcc ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* b7 */ { "~(srcb & (srca ^ srcc))", 7 },
|
||||
/* b8 */ { "(srca ^ (srcb & (srca ^ srcc)))", 7 },
|
||||
/* b9 */ { "~(srcc ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* ba */ { "(srcc | (srca & ~srcb))", 7 },
|
||||
/* bb */ { "(~srcb | srcc)", 6 },
|
||||
/* bc */ { "((srca ^ srcb) | (srca & srcc))", 7 },
|
||||
/* bd */ { "((srca ^ srcb) | ~(srca ^ srcc))", 7 },
|
||||
/* be */ { "(srcc | (srca ^ srcb))", 7 },
|
||||
/* bf */ { "(srcc | ~(srca & srcb))", 7 },
|
||||
/* c0 */ { "(srca & srcb)", 3 },
|
||||
/* c1 */ { "(srca ^ (~srcb & (srca | ~srcc)))", 7 },
|
||||
/* c2 */ { "(srca ^ (~srcb & (srca | srcc)))", 7 },
|
||||
/* c3 */ { "~(srca ^ srcb)", 3 },
|
||||
/* c4 */ { "(srcb & (srca | ~srcc))", 7 },
|
||||
/* c5 */ { "~(srcb ^ (srca | (srcb ^ srcc)))", 7 },
|
||||
/* c6 */ { "(srcb ^ (~srca & srcc))", 7 },
|
||||
/* c7 */ { "~(srca ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* c8 */ { "(srcb & (srca | srcc))", 7 },
|
||||
/* c9 */ { "~(srcb ^ (srca | srcc))", 7 },
|
||||
/* ca */ { "(srcc ^ (srca & (srcb ^ srcc)))", 7 },
|
||||
/* cb */ { "~(srcb ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* cc */ { "srcb", 2 },
|
||||
/* cd */ { "(srcb | ~(srca | srcc))", 7 },
|
||||
/* ce */ { "(srcb | (~srca & srcc))", 7 },
|
||||
/* cf */ { "(~srca | srcb)", 3 },
|
||||
/* d0 */ { "(srca & (srcb | ~srcc))", 7 },
|
||||
/* d1 */ { "~(srca ^ (srcb | (srca ^ srcc)))", 7 },
|
||||
/* d2 */ { "(srca ^ (~srcb & srcc))", 7 },
|
||||
/* d3 */ { "~(srcb ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* d4 */ { "(srca ^ ((srca ^ srcb) & (srcb ^ srcc)))", 7 },
|
||||
/* d5 */ { "(~srcc | (srca & srcb))", 7 },
|
||||
/* d6 */ { "(srca ^ srcb ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* d7 */ { "~(srcc & (srca ^ srcb))", 7 },
|
||||
/* d8 */ { "(srca ^ (srcc & (srca ^ srcb)))", 7 },
|
||||
/* d9 */ { "~(srcb ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* da */ { "((srca & srcb) | (srca ^ srcc))", 7 },
|
||||
/* db */ { "~((srca ^ srcb) & (srcb ^ srcc))", 7 },
|
||||
/* dc */ { "(srcb | (srca & ~srcc))", 7 },
|
||||
/* dd */ { "(srcb | ~srcc)", 6 },
|
||||
/* de */ { "(srcb | (srca ^ srcc))", 7 },
|
||||
/* df */ { "(srcb | ~(srca & srcc))", 7 },
|
||||
/* e0 */ { "(srca & (srcb | srcc))", 7 },
|
||||
/* e1 */ { "~(srca ^ (srcb | srcc))", 7 },
|
||||
/* e2 */ { "(srcc ^ (srcb & (srca ^ srcc)))", 7 },
|
||||
/* e3 */ { "~(srca ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* e4 */ { "(srcb ^ (srcc & (srca ^ srcb)))", 7 },
|
||||
/* e5 */ { "~(srca ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* e6 */ { "((srca & srcb) | (srcb ^ srcc))", 7 },
|
||||
/* e7 */ { "~((srca ^ srcb) & (srca ^ srcc))", 7 },
|
||||
/* e8 */ { "(srca ^ ((srca ^ srcb) & (srca ^ srcc)))", 7 },
|
||||
/* e9 */ { "(srca ^ srcb ^ (~srcc | (srca & srcb)))", 7 },
|
||||
/* ea */ { "(srcc | (srca & srcb))", 7 },
|
||||
/* eb */ { "(srcc | ~(srca ^ srcb))", 7 },
|
||||
/* ec */ { "(srcb | (srca & srcc))", 7 },
|
||||
/* ed */ { "(srcb | ~(srca ^ srcc))", 7 },
|
||||
/* ee */ { "(srcb | srcc)", 6 },
|
||||
/* ef */ { "(~srca | srcb | srcc)", 7 },
|
||||
/* f0 */ { "srca", 1 },
|
||||
/* f1 */ { "(srca | ~(srcb | srcc))", 7 },
|
||||
/* f2 */ { "(srca | (~srcb & srcc))", 7 },
|
||||
/* f3 */ { "(srca | ~srcb)", 3 },
|
||||
/* f4 */ { "(srca | (srcb & ~srcc))", 7 },
|
||||
/* f5 */ { "(srca | ~srcc)", 5 },
|
||||
/* f6 */ { "(srca | (srcb ^ srcc))", 7 },
|
||||
/* f7 */ { "(srca | ~(srcb & srcc))", 7 },
|
||||
/* f8 */ { "(srca | (srcb & srcc))", 7 },
|
||||
/* f9 */ { "(srca | ~(srcb ^ srcc))", 7 },
|
||||
/* fa */ { "(srca | srcc)", 5 },
|
||||
/* fb */ { "(srca | ~srcb | srcc)", 7 },
|
||||
/* fc */ { "(srca | srcb)", 3 },
|
||||
/* fd */ { "(srca | srcb | ~srcc)", 7 },
|
||||
/* fe */ { "(srca | srcb | srcc)", 7 },
|
||||
/* ff */ { "0xFFFFFFFF", 0 }
|
||||
struct blitop blitops[256] = {
|
||||
/* 00 */ { "0", 0 },
|
||||
/* 01 */ { "~(srca | srcb | srcc)", 7 },
|
||||
/* 02 */ { "(srcc & ~(srca | srcb))", 7 },
|
||||
/* 03 */ { "~(srca | srcb)", 3 },
|
||||
/* 04 */ { "(srcb & ~(srca | srcc))", 7 },
|
||||
/* 05 */ { "~(srca | srcc)", 5 },
|
||||
/* 06 */ { "(~srca & (srcb ^ srcc))", 7 },
|
||||
/* 07 */ { "~(srca | (srcb & srcc))", 7 },
|
||||
/* 08 */ { "(~srca & srcb & srcc)", 7 },
|
||||
/* 09 */ { "~(srca | (srcb ^ srcc))", 7 },
|
||||
/* 0a */ { "(~srca & srcc)", 5 },
|
||||
/* 0b */ { "~(srca | (srcb & ~srcc))", 7 },
|
||||
/* 0c */ { "(~srca & srcb)", 3 },
|
||||
/* 0d */ { "~(srca | (~srcb & srcc))", 7 },
|
||||
/* 0e */ { "(~srca & (srcb | srcc))", 7 },
|
||||
/* 0f */ { "~srca", 1 },
|
||||
/* 10 */ { "(srca & ~(srcb | srcc))", 7 },
|
||||
/* 11 */ { "~(srcb | srcc)", 6 },
|
||||
/* 12 */ { "(~srcb & (srca ^ srcc))", 7 },
|
||||
/* 13 */ { "~(srcb | (srca & srcc))", 7 },
|
||||
/* 14 */ { "(~srcc & (srca ^ srcb))", 7 },
|
||||
/* 15 */ { "~(srcc | (srca & srcb))", 7 },
|
||||
/* 16 */ { "(srca ^ ((srca & srcb) | (srcb ^ srcc)))", 7 },
|
||||
/* 17 */ { "~(srca ^ ((srca ^ srcb) & (srca ^ srcc)))", 7 },
|
||||
/* 18 */ { "((srca ^ srcb) & (srca ^ srcc))", 7 },
|
||||
/* 19 */ { "(srcb ^ (~srcc | (srca & srcb)))", 7 },
|
||||
/* 1a */ { "(srca ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* 1b */ { "(srca ^ (srcc | ~(srca ^ srcb)))", 7 },
|
||||
/* 1c */ { "(srca ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* 1d */ { "(srca ^ (srcb | ~(srca ^ srcc)))", 7 },
|
||||
/* 1e */ { "(srca ^ (srcb | srcc))", 7 },
|
||||
/* 1f */ { "~(srca & (srcb | srcc))", 7 },
|
||||
/* 20 */ { "(srca & ~srcb & srcc)", 7 },
|
||||
/* 21 */ { "~(srcb | (srca ^ srcc))", 7 },
|
||||
/* 22 */ { "(~srcb & srcc)", 6 },
|
||||
/* 23 */ { "~(srcb | (srca & ~srcc))", 7 },
|
||||
/* 24 */ { "((srca ^ srcb) & (srcb ^ srcc))", 7 },
|
||||
/* 25 */ { "(srca ^ (~srcc | (srca & srcb)))", 7 },
|
||||
/* 26 */ { "(srcb ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* 27 */ { "~(srca ^ (srcc & (srca ^ srcb)))", 7 },
|
||||
/* 28 */ { "(srcc & (srca ^ srcb))", 7 },
|
||||
/* 29 */ { "~(srca ^ srcb ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* 2a */ { "(srcc & ~(srca & srcb))", 7 },
|
||||
/* 2b */ { "~(srca ^ ((srca ^ srcb) & (srcb ^ srcc)))", 7 },
|
||||
/* 2c */ { "(srcb ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* 2d */ { "(srca ^ (srcb | ~srcc))", 7 },
|
||||
/* 2e */ { "(srca ^ (srcb | (srca ^ srcc)))", 7 },
|
||||
/* 2f */ { "~(srca & (srcb | ~srcc))", 7 },
|
||||
/* 30 */ { "(srca & ~srcb)", 3 },
|
||||
/* 31 */ { "~(srcb | (~srca & srcc))", 7 },
|
||||
/* 32 */ { "(~srcb & (srca | srcc))", 7 },
|
||||
/* 33 */ { "~srcb", 2 },
|
||||
/* 34 */ { "(srcb ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* 35 */ { "(srcb ^ (srca | ~(srcb ^ srcc)))", 7 },
|
||||
/* 36 */ { "(srcb ^ (srca | srcc))", 7 },
|
||||
/* 37 */ { "~(srcb & (srca | srcc))", 7 },
|
||||
/* 38 */ { "(srca ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 39 */ { "(srcb ^ (srca | ~srcc))", 7 },
|
||||
/* 3a */ { "(srcb ^ (srca | (srcb ^ srcc)))", 7 },
|
||||
/* 3b */ { "~(srcb & (srca | ~srcc))", 7 },
|
||||
/* 3c */ { "(srca ^ srcb)", 3 },
|
||||
/* 3d */ { "(srca ^ (srcb | ~(srca | srcc)))", 7 },
|
||||
/* 3e */ { "(srca ^ (srcb | (srca ^ (srca | srcc))))", 7 },
|
||||
/* 3f */ { "~(srca & srcb)", 3 },
|
||||
/* 40 */ { "(srca & srcb & ~srcc)", 7 },
|
||||
/* 41 */ { "~(srcc | (srca ^ srcb))", 7 },
|
||||
/* 42 */ { "((srca ^ srcc) & (srcb ^ srcc))", 7 },
|
||||
/* 43 */ { "(srca ^ (~srcb | (srca & srcc)))", 7 },
|
||||
/* 44 */ { "(srcb & ~srcc)", 6 },
|
||||
/* 45 */ { "~(srcc | (srca & ~srcb))", 7 },
|
||||
/* 46 */ { "(srcc ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* 47 */ { "~(srca ^ (srcb & (srca ^ srcc)))", 7 },
|
||||
/* 48 */ { "(srcb & (srca ^ srcc))", 7 },
|
||||
/* 49 */ { "~(srca ^ srcc ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* 4a */ { "(srcc ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* 4b */ { "(srca ^ (~srcb | srcc))", 7 },
|
||||
/* 4c */ { "(srcb & ~(srca & srcc))", 7 },
|
||||
/* 4d */ { "(srca ^ ((srca ^ srcb) | ~(srca ^ srcc)))", 7 },
|
||||
/* 4e */ { "(srca ^ (srcc | (srca ^ srcb)))", 7 },
|
||||
/* 4f */ { "~(srca & (~srcb | srcc))", 7 },
|
||||
/* 50 */ { "(srca & ~srcc)", 5 },
|
||||
/* 51 */ { "~(srcc | (~srca & srcb))", 7 },
|
||||
/* 52 */ { "(srcc ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* 53 */ { "~(srcb ^ (srca & (srcb ^ srcc)))", 7 },
|
||||
/* 54 */ { "(~srcc & (srca | srcb))", 7 },
|
||||
/* 55 */ { "~srcc", 4 },
|
||||
/* 56 */ { "(srcc ^ (srca | srcb))", 7 },
|
||||
/* 57 */ { "~(srcc & (srca | srcb))", 7 },
|
||||
/* 58 */ { "(srca ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 59 */ { "(srcc ^ (srca | ~srcb))", 7 },
|
||||
/* 5a */ { "(srca ^ srcc)", 5 },
|
||||
/* 5b */ { "(srca ^ (srcc | ~(srca | srcb)))", 7 },
|
||||
/* 5c */ { "(srcc ^ (srca | (srcb ^ srcc)))", 7 },
|
||||
/* 5d */ { "~(srcc & (srca | ~srcb))", 7 },
|
||||
/* 5e */ { "(srca ^ (srcc | (srca ^ (srca | srcb))))", 7 },
|
||||
/* 5f */ { "~(srca & srcc)", 5 },
|
||||
/* 60 */ { "(srca & (srcb ^ srcc))", 7 },
|
||||
/* 61 */ { "~(srcb ^ srcc ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* 62 */ { "(srcc ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 63 */ { "(srcb ^ (~srca | srcc))", 7 },
|
||||
/* 64 */ { "(srcb ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 65 */ { "(srcc ^ (~srca | srcb))", 7 },
|
||||
/* 66 */ { "(srcb ^ srcc)", 6 },
|
||||
/* 67 */ { "(srcb ^ (srcc | ~(srca | srcb)))", 7 },
|
||||
/* 68 */ { "((srca & srcb) ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 69 */ { "~(srca ^ srcb ^ srcc)", 7 },
|
||||
/* 6a */ { "(srcc ^ (srca & srcb))", 7 },
|
||||
/* 6b */ { "~(srca ^ srcb ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 6c */ { "(srcb ^ (srca & srcc))", 7 },
|
||||
/* 6d */ { "~(srca ^ srcc ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 6e */ { "((~srca & srcb) | (srcb ^ srcc))", 7 },
|
||||
/* 6f */ { "(~srca | (srcb ^ srcc))", 7 },
|
||||
/* 70 */ { "(srca & ~(srcb & srcc))", 7 },
|
||||
/* 71 */ { "~(srca ^ ((srca ^ srcb) | (srca ^ srcc)))", 7 },
|
||||
/* 72 */ { "(srcb ^ (srcc | (srca ^ srcb)))", 7 },
|
||||
/* 73 */ { "~(srcb & (~srca | srcc))", 7 },
|
||||
/* 74 */ { "(srcc ^ (srcb | (srca ^ srcc)))", 7 },
|
||||
/* 75 */ { "~(srcc & (~srca | srcb))", 7 },
|
||||
/* 76 */ { "(srcb ^ (srcc | (srca ^ (srca & srcb))))", 7 },
|
||||
/* 77 */ { "~(srcb & srcc)", 6 },
|
||||
/* 78 */ { "(srca ^ (srcb & srcc))", 7 },
|
||||
/* 79 */ { "~(srcb ^ srcc ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* 7a */ { "((srca & ~srcb) | (srca ^ srcc))", 7 },
|
||||
/* 7b */ { "(~srcb | (srca ^ srcc))", 7 },
|
||||
/* 7c */ { "((srca ^ srcb) | (srca & ~srcc))", 7 },
|
||||
/* 7d */ { "(~srcc | (srca ^ srcb))", 7 },
|
||||
/* 7e */ { "((srca ^ srcb) | (srca ^ srcc))", 7 },
|
||||
/* 7f */ { "~(srca & srcb & srcc)", 7 },
|
||||
/* 80 */ { "(srca & srcb & srcc)", 7 },
|
||||
/* 81 */ { "~((srca ^ srcb) | (srca ^ srcc))", 7 },
|
||||
/* 82 */ { "(srcc & ~(srca ^ srcb))", 7 },
|
||||
/* 83 */ { "(srca ^ (~srcb | (srca & ~srcc)))", 7 },
|
||||
/* 84 */ { "(srcb & ~(srca ^ srcc))", 7 },
|
||||
/* 85 */ { "(srca ^ (~srcc | (srca & ~srcb)))", 7 },
|
||||
/* 86 */ { "(srcb ^ srcc ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* 87 */ { "~(srca ^ (srcb & srcc))", 7 },
|
||||
/* 88 */ { "(srcb & srcc)", 6 },
|
||||
/* 89 */ { "(srcb ^ (~srcc & (~srca | srcb)))", 7 },
|
||||
/* 8a */ { "(srcc & (~srca | srcb))", 7 },
|
||||
/* 8b */ { "(srca ^ (~srcb | (srca ^ srcc)))", 7 },
|
||||
/* 8c */ { "(srcb & (~srca | srcc))", 7 },
|
||||
/* 8d */ { "(srca ^ (~srcc | (srca ^ srcb)))", 7 },
|
||||
/* 8e */ { "(srca ^ ((srca ^ srcb) | (srca ^ srcc)))", 7 },
|
||||
/* 8f */ { "(~srca | (srcb & srcc))", 7 },
|
||||
/* 90 */ { "(srca & ~(srcb ^ srcc))", 7 },
|
||||
/* 91 */ { "(srcb ^ (~srcc | (~srca & srcb)))", 7 },
|
||||
/* 92 */ { "(srca ^ srcc ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 93 */ { "~(srcb ^ (srca & srcc))", 7 },
|
||||
/* 94 */ { "(srca ^ srcb ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 95 */ { "~(srcc ^ (srca & srcb))", 7 },
|
||||
/* 96 */ { "(srca ^ srcb ^ srcc)", 7 },
|
||||
/* 97 */ { "(srca ^ srcb ^ (srcc | ~(srca | srcb)))", 7 },
|
||||
/* 98 */ { "(srcb ^ (~srcc & (srca | srcb)))", 7 },
|
||||
/* 99 */ { "~(srcb ^ srcc)", 6 },
|
||||
/* 9a */ { "(srcc ^ (srca & ~srcb))", 7 },
|
||||
/* 9b */ { "~(srcb ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 9c */ { "(srcb ^ (srca & ~srcc))", 7 },
|
||||
/* 9d */ { "~(srcc ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 9e */ { "(srcb ^ srcc ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* 9f */ { "~(srca & (srcb ^ srcc))", 7 },
|
||||
/* a0 */ { "(srca & srcc)", 5 },
|
||||
/* a1 */ { "(srca ^ (~srcc & (srca | ~srcb)))", 7 },
|
||||
/* a2 */ { "(srcc & (srca | ~srcb))", 7 },
|
||||
/* a3 */ { "(srcb ^ (~srca | (srcb ^ srcc)))", 7 },
|
||||
/* a4 */ { "(srca ^ (~srcc & (srca | srcb)))", 7 },
|
||||
/* a5 */ { "~(srca ^ srcc)", 5 },
|
||||
/* a6 */ { "(srcc ^ (~srca & srcb))", 7 },
|
||||
/* a7 */ { "~(srca ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* a8 */ { "(srcc & (srca | srcb))", 7 },
|
||||
/* a9 */ { "~(srcc ^ (srca | srcb))", 7 },
|
||||
/* aa */ { "srcc", 4 },
|
||||
/* ab */ { "(srcc | ~(srca | srcb))", 7 },
|
||||
/* ac */ { "(srcb ^ (srca & (srcb ^ srcc)))", 7 },
|
||||
/* ad */ { "~(srcc ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* ae */ { "(srcc | (~srca & srcb))", 7 },
|
||||
/* af */ { "(~srca | srcc)", 5 },
|
||||
/* b0 */ { "(srca & (~srcb | srcc))", 7 },
|
||||
/* b1 */ { "~(srca ^ (srcc | (srca ^ srcb)))", 7 },
|
||||
/* b2 */ { "(srca ^ ((srca ^ srcc) & (srcb ^ srcc)))", 7 },
|
||||
/* b3 */ { "(~srcb | (srca & srcc))", 7 },
|
||||
/* b4 */ { "(srca ^ (srcb & ~srcc))", 7 },
|
||||
/* b5 */ { "~(srcc ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* b6 */ { "(srca ^ srcc ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* b7 */ { "~(srcb & (srca ^ srcc))", 7 },
|
||||
/* b8 */ { "(srca ^ (srcb & (srca ^ srcc)))", 7 },
|
||||
/* b9 */ { "~(srcc ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* ba */ { "(srcc | (srca & ~srcb))", 7 },
|
||||
/* bb */ { "(~srcb | srcc)", 6 },
|
||||
/* bc */ { "((srca ^ srcb) | (srca & srcc))", 7 },
|
||||
/* bd */ { "((srca ^ srcb) | ~(srca ^ srcc))", 7 },
|
||||
/* be */ { "(srcc | (srca ^ srcb))", 7 },
|
||||
/* bf */ { "(srcc | ~(srca & srcb))", 7 },
|
||||
/* c0 */ { "(srca & srcb)", 3 },
|
||||
/* c1 */ { "(srca ^ (~srcb & (srca | ~srcc)))", 7 },
|
||||
/* c2 */ { "(srca ^ (~srcb & (srca | srcc)))", 7 },
|
||||
/* c3 */ { "~(srca ^ srcb)", 3 },
|
||||
/* c4 */ { "(srcb & (srca | ~srcc))", 7 },
|
||||
/* c5 */ { "~(srcb ^ (srca | (srcb ^ srcc)))", 7 },
|
||||
/* c6 */ { "(srcb ^ (~srca & srcc))", 7 },
|
||||
/* c7 */ { "~(srca ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* c8 */ { "(srcb & (srca | srcc))", 7 },
|
||||
/* c9 */ { "~(srcb ^ (srca | srcc))", 7 },
|
||||
/* ca */ { "(srcc ^ (srca & (srcb ^ srcc)))", 7 },
|
||||
/* cb */ { "~(srcb ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* cc */ { "srcb", 2 },
|
||||
/* cd */ { "(srcb | ~(srca | srcc))", 7 },
|
||||
/* ce */ { "(srcb | (~srca & srcc))", 7 },
|
||||
/* cf */ { "(~srca | srcb)", 3 },
|
||||
/* d0 */ { "(srca & (srcb | ~srcc))", 7 },
|
||||
/* d1 */ { "~(srca ^ (srcb | (srca ^ srcc)))", 7 },
|
||||
/* d2 */ { "(srca ^ (~srcb & srcc))", 7 },
|
||||
/* d3 */ { "~(srcb ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* d4 */ { "(srca ^ ((srca ^ srcb) & (srcb ^ srcc)))", 7 },
|
||||
/* d5 */ { "(~srcc | (srca & srcb))", 7 },
|
||||
/* d6 */ { "(srca ^ srcb ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* d7 */ { "~(srcc & (srca ^ srcb))", 7 },
|
||||
/* d8 */ { "(srca ^ (srcc & (srca ^ srcb)))", 7 },
|
||||
/* d9 */ { "~(srcb ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* da */ { "((srca & srcb) | (srca ^ srcc))", 7 },
|
||||
/* db */ { "~((srca ^ srcb) & (srcb ^ srcc))", 7 },
|
||||
/* dc */ { "(srcb | (srca & ~srcc))", 7 },
|
||||
/* dd */ { "(srcb | ~srcc)", 6 },
|
||||
/* de */ { "(srcb | (srca ^ srcc))", 7 },
|
||||
/* df */ { "(srcb | ~(srca & srcc))", 7 },
|
||||
/* e0 */ { "(srca & (srcb | srcc))", 7 },
|
||||
/* e1 */ { "~(srca ^ (srcb | srcc))", 7 },
|
||||
/* e2 */ { "(srcc ^ (srcb & (srca ^ srcc)))", 7 },
|
||||
/* e3 */ { "~(srca ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* e4 */ { "(srcb ^ (srcc & (srca ^ srcb)))", 7 },
|
||||
/* e5 */ { "~(srca ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* e6 */ { "((srca & srcb) | (srcb ^ srcc))", 7 },
|
||||
/* e7 */ { "~((srca ^ srcb) & (srca ^ srcc))", 7 },
|
||||
/* e8 */ { "(srca ^ ((srca ^ srcb) & (srca ^ srcc)))", 7 },
|
||||
/* e9 */ { "(srca ^ srcb ^ (~srcc | (srca & srcb)))", 7 },
|
||||
/* ea */ { "(srcc | (srca & srcb))", 7 },
|
||||
/* eb */ { "(srcc | ~(srca ^ srcb))", 7 },
|
||||
/* ec */ { "(srcb | (srca & srcc))", 7 },
|
||||
/* ed */ { "(srcb | ~(srca ^ srcc))", 7 },
|
||||
/* ee */ { "(srcb | srcc)", 6 },
|
||||
/* ef */ { "(~srca | srcb | srcc)", 7 },
|
||||
/* f0 */ { "srca", 1 },
|
||||
/* f1 */ { "(srca | ~(srcb | srcc))", 7 },
|
||||
/* f2 */ { "(srca | (~srcb & srcc))", 7 },
|
||||
/* f3 */ { "(srca | ~srcb)", 3 },
|
||||
/* f4 */ { "(srca | (srcb & ~srcc))", 7 },
|
||||
/* f5 */ { "(srca | ~srcc)", 5 },
|
||||
/* f6 */ { "(srca | (srcb ^ srcc))", 7 },
|
||||
/* f7 */ { "(srca | ~(srcb & srcc))", 7 },
|
||||
/* f8 */ { "(srca | (srcb & srcc))", 7 },
|
||||
/* f9 */ { "(srca | ~(srcb ^ srcc))", 7 },
|
||||
/* fa */ { "(srca | srcc)", 5 },
|
||||
/* fb */ { "(srca | ~srcb | srcc)", 7 },
|
||||
/* fc */ { "(srca | srcb)", 3 },
|
||||
/* fd */ { "(srca | srcb | ~srcc)", 7 },
|
||||
/* fe */ { "(srca | srcb | srcc)", 7 },
|
||||
/* ff */ { "0xFFFFFFFF", 0 }
|
||||
};
|
||||
|
|
|
@ -8,74 +8,72 @@
|
|||
#include "blitter.h"
|
||||
#include "blitfunc.h"
|
||||
|
||||
blitter_func * const blitfunc_dofast[256] =
|
||||
{
|
||||
blitdofast_0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_2a, 0, 0, 0, 0, 0,
|
||||
blitdofast_30, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_3a, 0, blitdofast_3c, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_4a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_6a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_8a, 0, blitdofast_8c, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_9a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
blitdofast_a8, 0, blitdofast_aa, 0, 0, 0, 0, 0,
|
||||
0, blitdofast_b1, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_ca, 0, blitdofast_cc, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
blitdofast_d8, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_e2, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_ea, 0, 0, 0, 0, 0,
|
||||
blitdofast_f0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_fa, 0, blitdofast_fc, 0, 0, 0
|
||||
blitter_func * const blitfunc_dofast[256] = {
|
||||
blitdofast_0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_2a, 0, 0, 0, 0, 0,
|
||||
blitdofast_30, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_3a, 0, blitdofast_3c, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_4a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_6a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_8a, 0, blitdofast_8c, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_9a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
blitdofast_a8, 0, blitdofast_aa, 0, 0, 0, 0, 0,
|
||||
0, blitdofast_b1, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_ca, 0, blitdofast_cc, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
blitdofast_d8, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_e2, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_ea, 0, 0, 0, 0, 0,
|
||||
blitdofast_f0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_fa, 0, blitdofast_fc, 0, 0, 0
|
||||
};
|
||||
|
||||
blitter_func * const blitfunc_dofast_desc[256] =
|
||||
{
|
||||
blitdofast_desc_0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_2a, 0, 0, 0, 0, 0,
|
||||
blitdofast_desc_30, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_3a, 0, blitdofast_desc_3c, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_4a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_6a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_8a, 0, blitdofast_desc_8c, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_9a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
blitdofast_desc_a8, 0, blitdofast_desc_aa, 0, 0, 0, 0, 0,
|
||||
0, blitdofast_desc_b1, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_ca, 0, blitdofast_desc_cc, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
blitdofast_desc_d8, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_e2, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_ea, 0, 0, 0, 0, 0,
|
||||
blitdofast_desc_f0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_fa, 0, blitdofast_desc_fc, 0, 0, 0
|
||||
blitter_func * const blitfunc_dofast_desc[256] = {
|
||||
blitdofast_desc_0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_2a, 0, 0, 0, 0, 0,
|
||||
blitdofast_desc_30, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_3a, 0, blitdofast_desc_3c, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_4a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_6a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_8a, 0, blitdofast_desc_8c, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_9a, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
blitdofast_desc_a8, 0, blitdofast_desc_aa, 0, 0, 0, 0, 0,
|
||||
0, blitdofast_desc_b1, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_ca, 0, blitdofast_desc_cc, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
blitdofast_desc_d8, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_e2, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_ea, 0, 0, 0, 0, 0,
|
||||
blitdofast_desc_f0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_desc_fa, 0, blitdofast_desc_fc, 0, 0, 0
|
||||
};
|
||||
|
|
804
src/blitter.cpp
804
src/blitter.cpp
File diff suppressed because it is too large
Load diff
1607
src/blkdev.cpp
1607
src/blkdev.cpp
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
1113
src/bsdsocket.cpp
1113
src/bsdsocket.cpp
File diff suppressed because it is too large
Load diff
520
src/calc.cpp
520
src/calc.cpp
|
@ -8,7 +8,7 @@
|
|||
|
||||
/*
|
||||
|
||||
Original code from http://en.wikipedia.org/wiki/Shunting_yard_algorithm
|
||||
Original code from http://en.wikipedia.org/wiki/Shunting_yard_algorithm
|
||||
|
||||
*/
|
||||
|
||||
|
@ -36,43 +36,43 @@ static double parsedvalues[MAX_VALUES];
|
|||
// 4 = right to left
|
||||
static int op_preced(const TCHAR c)
|
||||
{
|
||||
switch (c) {
|
||||
case '!':
|
||||
return 4;
|
||||
case '*': case '/': case '\\': case '%':
|
||||
return 3;
|
||||
case '+': case '-':
|
||||
return 2;
|
||||
case '=':
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
switch(c) {
|
||||
case '!':
|
||||
return 4;
|
||||
case '*': case '/': case '\\': case '%':
|
||||
return 3;
|
||||
case '+': case '-':
|
||||
return 2;
|
||||
case '=':
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool op_left_assoc(const TCHAR c)
|
||||
{
|
||||
switch (c) {
|
||||
// left to right
|
||||
case '*': case '/': case '%': case '+': case '-':
|
||||
return true;
|
||||
// right to left
|
||||
case '=': case '!':
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
switch(c) {
|
||||
// left to right
|
||||
case '*': case '/': case '%': case '+': case '-':
|
||||
return true;
|
||||
// right to left
|
||||
case '=': case '!':
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static unsigned int op_arg_count(const TCHAR c)
|
||||
{
|
||||
switch (c) {
|
||||
case '*': case '/': case '%': case '+': case '-': case '=':
|
||||
return 2;
|
||||
case '!':
|
||||
return 1;
|
||||
default:
|
||||
return c - 'A';
|
||||
}
|
||||
return 0;
|
||||
switch(c) {
|
||||
case '*': case '/': case '%': case '+': case '-': case '=':
|
||||
return 2;
|
||||
case '!':
|
||||
return 1;
|
||||
default:
|
||||
return c - 'A';
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define is_operator(c) (c == '+' || c == '-' || c == '/' || c == '*' || c == '!' || c == '%' || c == '=')
|
||||
|
@ -81,136 +81,136 @@ static unsigned int op_arg_count(const TCHAR c)
|
|||
|
||||
static bool shunting_yard(const TCHAR *input, TCHAR *output)
|
||||
{
|
||||
const TCHAR *strpos = input, *strend = input + _tcslen(input);
|
||||
TCHAR c, *outpos = output;
|
||||
const TCHAR *strpos = input, *strend = input + _tcslen(input);
|
||||
TCHAR c, *outpos = output;
|
||||
|
||||
TCHAR stack[STACK_SIZE]; // operator stack
|
||||
unsigned int sl = 0; // stack length
|
||||
TCHAR sc; // used for record stack element
|
||||
TCHAR stack[STACK_SIZE]; // operator stack
|
||||
unsigned int sl = 0; // stack length
|
||||
TCHAR sc; // used for record stack element
|
||||
|
||||
while (strpos < strend) {
|
||||
while(strpos < strend) {
|
||||
if (sl >= STACK_SIZE)
|
||||
return false;
|
||||
|
||||
// read one token from the input stream
|
||||
c = *strpos;
|
||||
if (c != ' ') {
|
||||
// If the token is a number (identifier), then add it to the output queue.
|
||||
if (is_ident(c)) {
|
||||
*outpos = c; ++outpos;
|
||||
}
|
||||
// If the token is a function token, then push it onto the stack.
|
||||
else if (is_function(c)) {
|
||||
stack[sl] = c;
|
||||
++sl;
|
||||
}
|
||||
// If the token is a function argument separator (e.g., a comma):
|
||||
else if (c == ',') {
|
||||
bool pe = false;
|
||||
while (sl > 0) {
|
||||
sc = stack[sl - 1];
|
||||
if (sc == '(') {
|
||||
pe = true;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
// Until the token at the top of the stack is a left parenthesis,
|
||||
// pop operators off the stack onto the output queue.
|
||||
*outpos = sc;
|
||||
++outpos;
|
||||
sl--;
|
||||
}
|
||||
}
|
||||
// If no left parentheses are encountered, either the separator was misplaced
|
||||
// or parentheses were mismatched.
|
||||
if (!pe) {
|
||||
calc_log((_T("Error: separator or parentheses mismatched\n")));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// If the token is an operator, op1, then:
|
||||
else if (is_operator(c)) {
|
||||
while (sl > 0) {
|
||||
sc = stack[sl - 1];
|
||||
// While there is an operator token, o2, at the top of the stack
|
||||
// op1 is left-associative and its precedence is less than or equal to that of op2,
|
||||
// or op1 is right-associative and its precedence is less than that of op2,
|
||||
if (is_operator(sc) &&
|
||||
((op_left_assoc(c) && (op_preced(c) <= op_preced(sc))) ||
|
||||
(!op_left_assoc(c) && (op_preced(c) < op_preced(sc))))) {
|
||||
// Pop o2 off the stack, onto the output queue;
|
||||
*outpos = sc;
|
||||
++outpos;
|
||||
sl--;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// push op1 onto the stack.
|
||||
stack[sl] = c;
|
||||
++sl;
|
||||
}
|
||||
// If the token is a left parenthesis, then push it onto the stack.
|
||||
else if (c == '(') {
|
||||
stack[sl] = c;
|
||||
++sl;
|
||||
}
|
||||
// If the token is a right parenthesis:
|
||||
else if (c == ')') {
|
||||
bool pe = false;
|
||||
// Until the token at the top of the stack is a left parenthesis,
|
||||
// pop operators off the stack onto the output queue
|
||||
while (sl > 0) {
|
||||
sc = stack[sl - 1];
|
||||
if (sc == '(') {
|
||||
pe = true;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
*outpos = sc;
|
||||
++outpos;
|
||||
sl--;
|
||||
}
|
||||
}
|
||||
// If the stack runs out without finding a left parenthesis, then there are mismatched parentheses.
|
||||
if (!pe) {
|
||||
calc_log((_T("Error: parentheses mismatched\n")));
|
||||
return false;
|
||||
}
|
||||
// Pop the left parenthesis from the stack, but not onto the output queue.
|
||||
sl--;
|
||||
// If the token at the top of the stack is a function token, pop it onto the output queue.
|
||||
if (sl > 0) {
|
||||
sc = stack[sl - 1];
|
||||
if (is_function(sc)) {
|
||||
*outpos = sc;
|
||||
++outpos;
|
||||
sl--;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
calc_log((_T("Unknown token %c\n"), c));
|
||||
return false; // Unknown token
|
||||
}
|
||||
}
|
||||
++strpos;
|
||||
}
|
||||
// When there are no more tokens to read:
|
||||
// While there are still operator tokens in the stack:
|
||||
while (sl > 0) {
|
||||
sc = stack[sl - 1];
|
||||
if (sc == '(' || sc == ')') {
|
||||
printf("Error: parentheses mismatched\n");
|
||||
return false;
|
||||
}
|
||||
*outpos = sc;
|
||||
++outpos;
|
||||
--sl;
|
||||
}
|
||||
*outpos = 0; // Null terminator
|
||||
return true;
|
||||
c = *strpos;
|
||||
if(c != ' ') {
|
||||
// If the token is a number (identifier), then add it to the output queue.
|
||||
if(is_ident(c)) {
|
||||
*outpos = c; ++outpos;
|
||||
}
|
||||
// If the token is a function token, then push it onto the stack.
|
||||
else if(is_function(c)) {
|
||||
stack[sl] = c;
|
||||
++sl;
|
||||
}
|
||||
// If the token is a function argument separator (e.g., a comma):
|
||||
else if(c == ',') {
|
||||
bool pe = false;
|
||||
while(sl > 0) {
|
||||
sc = stack[sl - 1];
|
||||
if(sc == '(') {
|
||||
pe = true;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
// Until the token at the top of the stack is a left parenthesis,
|
||||
// pop operators off the stack onto the output queue.
|
||||
*outpos = sc;
|
||||
++outpos;
|
||||
sl--;
|
||||
}
|
||||
}
|
||||
// If no left parentheses are encountered, either the separator was misplaced
|
||||
// or parentheses were mismatched.
|
||||
if(!pe) {
|
||||
calc_log ((_T("Error: separator or parentheses mismatched\n")));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// If the token is an operator, op1, then:
|
||||
else if(is_operator(c)) {
|
||||
while(sl > 0) {
|
||||
sc = stack[sl - 1];
|
||||
// While there is an operator token, o2, at the top of the stack
|
||||
// op1 is left-associative and its precedence is less than or equal to that of op2,
|
||||
// or op1 is right-associative and its precedence is less than that of op2,
|
||||
if(is_operator(sc) &&
|
||||
((op_left_assoc(c) && (op_preced(c) <= op_preced(sc))) ||
|
||||
(!op_left_assoc(c) && (op_preced(c) < op_preced(sc))))) {
|
||||
// Pop o2 off the stack, onto the output queue;
|
||||
*outpos = sc;
|
||||
++outpos;
|
||||
sl--;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// push op1 onto the stack.
|
||||
stack[sl] = c;
|
||||
++sl;
|
||||
}
|
||||
// If the token is a left parenthesis, then push it onto the stack.
|
||||
else if(c == '(') {
|
||||
stack[sl] = c;
|
||||
++sl;
|
||||
}
|
||||
// If the token is a right parenthesis:
|
||||
else if(c == ')') {
|
||||
bool pe = false;
|
||||
// Until the token at the top of the stack is a left parenthesis,
|
||||
// pop operators off the stack onto the output queue
|
||||
while(sl > 0) {
|
||||
sc = stack[sl - 1];
|
||||
if(sc == '(') {
|
||||
pe = true;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
*outpos = sc;
|
||||
++outpos;
|
||||
sl--;
|
||||
}
|
||||
}
|
||||
// If the stack runs out without finding a left parenthesis, then there are mismatched parentheses.
|
||||
if(!pe) {
|
||||
calc_log ((_T("Error: parentheses mismatched\n")));
|
||||
return false;
|
||||
}
|
||||
// Pop the left parenthesis from the stack, but not onto the output queue.
|
||||
sl--;
|
||||
// If the token at the top of the stack is a function token, pop it onto the output queue.
|
||||
if(sl > 0) {
|
||||
sc = stack[sl - 1];
|
||||
if(is_function(sc)) {
|
||||
*outpos = sc;
|
||||
++outpos;
|
||||
sl--;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
calc_log ((_T("Unknown token %c\n"), c));
|
||||
return false; // Unknown token
|
||||
}
|
||||
}
|
||||
++strpos;
|
||||
}
|
||||
// When there are no more tokens to read:
|
||||
// While there are still operator tokens in the stack:
|
||||
while(sl > 0) {
|
||||
sc = stack[sl - 1];
|
||||
if(sc == '(' || sc == ')') {
|
||||
printf("Error: parentheses mismatched\n");
|
||||
return false;
|
||||
}
|
||||
*outpos = sc;
|
||||
++outpos;
|
||||
--sl;
|
||||
}
|
||||
*outpos = 0; // Null terminator
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -224,15 +224,15 @@ static double docalcx(TCHAR op, double v1, double v2)
|
|||
{
|
||||
switch (op)
|
||||
{
|
||||
case '-':
|
||||
case '-':
|
||||
return v1 - v2;
|
||||
case '+':
|
||||
case '+':
|
||||
return v1 + v2;
|
||||
case '*':
|
||||
case '*':
|
||||
return v1 * v2;
|
||||
case '/':
|
||||
case '/':
|
||||
return v1 / v2;
|
||||
case '\\':
|
||||
case '\\':
|
||||
return (int)v1 % (int)v2;
|
||||
|
||||
}
|
||||
|
@ -244,9 +244,8 @@ static double stacktoval(struct calcstack *st)
|
|||
if (st->s) {
|
||||
if (_tcslen(st->s) == 1 && st->s[0] >= 'a' && st->s[0] <= 'z')
|
||||
return parsedvalues[st->s[0] - 'a'];
|
||||
return _tstof(st->s);
|
||||
}
|
||||
else {
|
||||
return _tstof (st->s);
|
||||
} else {
|
||||
return st->val;
|
||||
}
|
||||
}
|
||||
|
@ -257,19 +256,19 @@ static double docalc2(TCHAR op, struct calcstack *sv1, struct calcstack *sv2)
|
|||
|
||||
v1 = stacktoval(sv1);
|
||||
v2 = stacktoval(sv2);
|
||||
return docalcx(op, v1, v2);
|
||||
return docalcx (op, v1, v2);
|
||||
}
|
||||
static double docalc1(TCHAR op, struct calcstack *sv1, double v2)
|
||||
{
|
||||
double v1;
|
||||
|
||||
v1 = stacktoval(sv1);
|
||||
return docalcx(op, v1, v2);
|
||||
return docalcx (op, v1, v2);
|
||||
}
|
||||
|
||||
static TCHAR *chartostack(TCHAR c)
|
||||
{
|
||||
TCHAR *s = xmalloc(TCHAR, 2);
|
||||
TCHAR *s = xmalloc (TCHAR, 2);
|
||||
s[0] = c;
|
||||
s[1] = 0;
|
||||
return s;
|
||||
|
@ -277,96 +276,96 @@ static TCHAR *chartostack(TCHAR c)
|
|||
|
||||
static bool execution_order(const TCHAR *input, double *outval)
|
||||
{
|
||||
const TCHAR *strpos = input, *strend = input + _tcslen(input);
|
||||
TCHAR c, res[4];
|
||||
unsigned int sl = 0, rn = 0;
|
||||
const TCHAR *strpos = input, *strend = input + _tcslen(input);
|
||||
TCHAR c, res[4];
|
||||
unsigned int sl = 0, rn = 0;
|
||||
struct calcstack stack[STACK_SIZE] = { { 0 } }, *sc, *sc2;
|
||||
double val = 0;
|
||||
int i;
|
||||
bool ok = false;
|
||||
|
||||
// While there are input tokens left
|
||||
while (strpos < strend) {
|
||||
while(strpos < strend) {
|
||||
|
||||
if (sl >= STACK_SIZE)
|
||||
return false;
|
||||
|
||||
// Read the next token from input.
|
||||
// Read the next token from input.
|
||||
c = *strpos;
|
||||
// If the token is a value or identifier
|
||||
if (is_ident(c)) {
|
||||
// Push it onto the stack.
|
||||
stack[sl].s = chartostack(c);
|
||||
++sl;
|
||||
// If the token is a value or identifier
|
||||
if(is_ident(c)) {
|
||||
// Push it onto the stack.
|
||||
stack[sl].s = chartostack (c);
|
||||
++sl;
|
||||
}
|
||||
// Otherwise, the token is an operator (operator here includes both operators, and functions).
|
||||
else if(is_operator(c) || is_function(c)) {
|
||||
_stprintf(res, _T("_%02d"), rn);
|
||||
calc_log ((_T("%s = "), res));
|
||||
++rn;
|
||||
// It is known a priori that the operator takes n arguments.
|
||||
unsigned int nargs = op_arg_count(c);
|
||||
// If there are fewer than n values on the stack
|
||||
if(sl < nargs) {
|
||||
// (Error) The user has not input sufficient values in the expression.
|
||||
return false;
|
||||
}
|
||||
// Else, Pop the top n values from the stack.
|
||||
// Evaluate the operator, with the values as arguments.
|
||||
if(is_function(c)) {
|
||||
calc_log ((_T("%c("), c));
|
||||
while(nargs > 0){
|
||||
sc = &stack[sl - nargs]; // to remove reverse order of arguments
|
||||
if(nargs > 1) {
|
||||
calc_log ((_T("%s, "), sc));
|
||||
}
|
||||
else {
|
||||
calc_log ((_T("%s)\n"), sc));
|
||||
}
|
||||
--nargs;
|
||||
}
|
||||
sl-=op_arg_count(c);
|
||||
}
|
||||
else {
|
||||
if(nargs == 1) {
|
||||
sc = &stack[sl - 1];
|
||||
sl--;
|
||||
val = docalc1 (c, sc, val);
|
||||
calc_log ((_T("%c %s = %f;\n"), c, stacktostr(sc), val));
|
||||
}
|
||||
else {
|
||||
sc = &stack[sl - 2];
|
||||
calc_log ((_T("%s %c "), stacktostr(sc), c));
|
||||
sc2 = &stack[sl - 1];
|
||||
val = docalc2 (c, sc, sc2);
|
||||
sl--;sl--;
|
||||
calc_log ((_T("%s = %f;\n"), stacktostr(sc2), val));
|
||||
}
|
||||
}
|
||||
// Push the returned results, if any, back onto the stack.
|
||||
stack[sl].val = val;
|
||||
stack[sl].s = NULL;
|
||||
++sl;
|
||||
}
|
||||
++strpos;
|
||||
}
|
||||
// If there is only one value in the stack
|
||||
// That value is the result of the calculation.
|
||||
if(sl == 1) {
|
||||
sc = &stack[sl - 1];
|
||||
sl--;
|
||||
calc_log ((_T("result = %f\n"), val));
|
||||
if (outval)
|
||||
*outval = val;
|
||||
ok = true;
|
||||
}
|
||||
// Otherwise, the token is an operator (operator here includes both operators, and functions).
|
||||
else if (is_operator(c) || is_function(c)) {
|
||||
_stprintf(res, _T("_%02d"), rn);
|
||||
calc_log((_T("%s = "), res));
|
||||
++rn;
|
||||
// It is known a priori that the operator takes n arguments.
|
||||
unsigned int nargs = op_arg_count(c);
|
||||
// If there are fewer than n values on the stack
|
||||
if (sl < nargs) {
|
||||
// (Error) The user has not input sufficient values in the expression.
|
||||
return false;
|
||||
}
|
||||
// Else, Pop the top n values from the stack.
|
||||
// Evaluate the operator, with the values as arguments.
|
||||
if (is_function(c)) {
|
||||
calc_log((_T("%c("), c));
|
||||
while (nargs > 0) {
|
||||
sc = &stack[sl - nargs]; // to remove reverse order of arguments
|
||||
if (nargs > 1) {
|
||||
calc_log((_T("%s, "), sc));
|
||||
}
|
||||
else {
|
||||
calc_log((_T("%s)\n"), sc));
|
||||
}
|
||||
--nargs;
|
||||
}
|
||||
sl -= op_arg_count(c);
|
||||
}
|
||||
else {
|
||||
if (nargs == 1) {
|
||||
sc = &stack[sl - 1];
|
||||
sl--;
|
||||
val = docalc1(c, sc, val);
|
||||
calc_log((_T("%c %s = %f;\n"), c, stacktostr(sc), val));
|
||||
}
|
||||
else {
|
||||
sc = &stack[sl - 2];
|
||||
calc_log((_T("%s %c "), stacktostr(sc), c));
|
||||
sc2 = &stack[sl - 1];
|
||||
val = docalc2(c, sc, sc2);
|
||||
sl--; sl--;
|
||||
calc_log((_T("%s = %f;\n"), stacktostr(sc2), val));
|
||||
}
|
||||
}
|
||||
// Push the returned results, if any, back onto the stack.
|
||||
stack[sl].val = val;
|
||||
stack[sl].s = NULL;
|
||||
++sl;
|
||||
}
|
||||
++strpos;
|
||||
}
|
||||
// If there is only one value in the stack
|
||||
// That value is the result of the calculation.
|
||||
if (sl == 1) {
|
||||
sc = &stack[sl - 1];
|
||||
sl--;
|
||||
calc_log((_T("result = %f\n"), val));
|
||||
if (outval)
|
||||
*outval = val;
|
||||
ok = true;
|
||||
}
|
||||
for (i = 0; i < STACK_SIZE; i++)
|
||||
xfree(stack[i].s);
|
||||
for (i = 0; i < STACK_SIZE; i++)
|
||||
xfree (stack[i].s);
|
||||
|
||||
// If there are more values in the stack
|
||||
// (Error) The user input has too many values.
|
||||
// If there are more values in the stack
|
||||
// (Error) The user input has too many values.
|
||||
|
||||
return ok;
|
||||
return ok;
|
||||
}
|
||||
|
||||
static bool is_separator(TCHAR c)
|
||||
|
@ -383,7 +382,7 @@ static bool parse_values(const TCHAR *ins, TCHAR *out)
|
|||
TCHAR inbuf[IOBUFFERS];
|
||||
int op;
|
||||
|
||||
_tcscpy(inbuf, ins);
|
||||
_tcscpy (inbuf, ins);
|
||||
TCHAR *in = inbuf;
|
||||
TCHAR *p = out;
|
||||
op = 0;
|
||||
|
@ -397,15 +396,14 @@ static bool parse_values(const TCHAR *ins, TCHAR *out)
|
|||
in[1] = ' ';
|
||||
in[2] = ' ';
|
||||
in[3] = ' ';
|
||||
}
|
||||
else if (!_tcsncmp(in, _T("false"), 5) && is_separator(in[5])) {
|
||||
} else if (!_tcsncmp(in, _T("false"), 5) && is_separator(in[5])) {
|
||||
in[0] = '0';
|
||||
in[1] = ' ';
|
||||
in[2] = ' ';
|
||||
in[3] = ' ';
|
||||
in[4] = ' ';
|
||||
}
|
||||
if (_istdigit(*in)) {
|
||||
if (_istdigit (*in)) {
|
||||
if (ident >= MAX_VALUES)
|
||||
return false;
|
||||
if (op > 1 && (in[-1] == '-' || in[-1] == '+')) {
|
||||
|
@ -413,15 +411,14 @@ static bool parse_values(const TCHAR *ins, TCHAR *out)
|
|||
p--;
|
||||
}
|
||||
*p++ = ident + 'a';
|
||||
while (_istdigit(*in) || *in == '.')
|
||||
while (_istdigit (*in) || *in == '.')
|
||||
in++;
|
||||
tmp = *in;
|
||||
*in = 0;
|
||||
parsedvalues[ident++] = _tstof(instart);
|
||||
parsedvalues[ident++] = _tstof (instart);
|
||||
*in = tmp;
|
||||
op = 0;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (is_operator(*in))
|
||||
op++;
|
||||
*p++ = *in++;
|
||||
|
@ -433,27 +430,26 @@ static bool parse_values(const TCHAR *ins, TCHAR *out)
|
|||
|
||||
bool calc(const TCHAR *input, double *outval)
|
||||
{
|
||||
TCHAR output[IOBUFFERS], output2[IOBUFFERS];
|
||||
calc_log((_T("IN: '%s'\n"), input));
|
||||
TCHAR output[IOBUFFERS], output2[IOBUFFERS];
|
||||
calc_log ((_T("IN: '%s'\n"), input));
|
||||
if (parse_values(input, output2)) {
|
||||
if (shunting_yard(output2, output)) {
|
||||
calc_log((_T("RPN OUT: %s\n"), output));
|
||||
if (!execution_order(output, outval)) {
|
||||
calc_log((_T("PARSE ERROR!\n")));
|
||||
}
|
||||
else {
|
||||
if(shunting_yard(output2, output)) {
|
||||
calc_log ((_T("RPN OUT: %s\n"), output));
|
||||
if(!execution_order(output, outval)) {
|
||||
calc_log ((_T("PARSE ERROR!\n")));
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool iscalcformula(const TCHAR *formula)
|
||||
bool iscalcformula (const TCHAR *formula)
|
||||
{
|
||||
for (int i = 0; i < _tcslen(formula); i++) {
|
||||
for (int i = 0; i < _tcslen (formula); i++) {
|
||||
TCHAR c = formula[i];
|
||||
if (is_operator(c))
|
||||
if (is_operator (c))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "sysdeps.h"
|
||||
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "memory.h"
|
||||
#include "rommgr.h"
|
||||
#include "custom.h"
|
||||
#include "newcpu.h"
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "cda_play.h"
|
||||
#include "archivers/mp2/kjmp2.h"
|
||||
#ifdef AMIBERRY
|
||||
#ifndef WIN32
|
||||
extern "C" {
|
||||
#include "mpeg2dec/mpeg2.h"
|
||||
#include "mpeg2dec/mpeg2convert.h"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "sysdeps.h"
|
||||
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "memory.h"
|
||||
#include "cd32_fmv.h"
|
||||
#include "custom.h"
|
||||
#include "xwin.h"
|
||||
|
@ -47,7 +47,7 @@ void cd32_fmv_new_image(int w, int h, int d, uae_u8 *s)
|
|||
{
|
||||
if (!mpeg_out_buffer)
|
||||
mpeg_out_buffer = xmalloc(uae_u8, MAX_MPEG_WIDTH * MAX_MPEG_HEIGHT * MPEG_PIXBYTES_32);
|
||||
if (s == nullptr || w > MAX_MPEG_WIDTH || h > MAX_MPEG_HEIGHT) {
|
||||
if (s == NULL || w > MAX_MPEG_WIDTH || h > MAX_MPEG_HEIGHT) {
|
||||
memset(mpeg_out_buffer, 0, MAX_MPEG_WIDTH * MAX_MPEG_HEIGHT * MPEG_PIXBYTES_32);
|
||||
mpeg_width = MAX_MPEG_WIDTH;
|
||||
mpeg_height = MAX_MPEG_HEIGHT;
|
||||
|
@ -72,11 +72,11 @@ static void genlock_32(struct vidbuffer *vbin, struct vidbuffer *vbout, int w, i
|
|||
for (int hh = 0, sh = -voffset; hh < h; sh++, hh += mult) {
|
||||
for (int h2 = 0; h2 < mult; h2++) {
|
||||
uae_u8 *d8 = vbout->bufmem + vbout->rowbytes * (hh + h2 + voffset);
|
||||
uae_u32 *d32 = reinterpret_cast<uae_u32*>(d8);
|
||||
uae_u32 *d32 = (uae_u32*)d8;
|
||||
uae_u8 *s8 = vbin->bufmem + vbin->rowbytes * (hh + h2 + voffset) ;
|
||||
uae_u32 *srcp = nullptr;
|
||||
uae_u32 *srcp = NULL;
|
||||
if (sh >= 0 && sh < mpeg_height)
|
||||
srcp = reinterpret_cast<uae_u32*>(mpeg_out_buffer + sh * mpeg_width * MPEG_PIXBYTES_32);
|
||||
srcp = (uae_u32*)(mpeg_out_buffer + sh * mpeg_width * MPEG_PIXBYTES_32);
|
||||
for (int ww = 0, sw = -hoffset; ww < w; sw++, ww += mult) {
|
||||
uae_u32 sv = fmv_border_color;
|
||||
if (sw >= 0 && sw < mpeg_width && srcp)
|
||||
|
@ -84,7 +84,7 @@ static void genlock_32(struct vidbuffer *vbin, struct vidbuffer *vbout, int w, i
|
|||
for (int w2 = 0; w2 < mult; w2++) {
|
||||
uae_u32 v;
|
||||
if (s8[0] >= GENLOCK_VAL_32) {
|
||||
v = *reinterpret_cast<uae_u32*>(s8);
|
||||
v = *((uae_u32*)s8);
|
||||
} else {
|
||||
v = sv;
|
||||
}
|
||||
|
@ -101,19 +101,19 @@ static void genlock_16(struct vidbuffer *vbin, struct vidbuffer *vbout, int w, i
|
|||
for (int hh = 0, sh = -voffset; hh < h; sh++, hh += mult) {
|
||||
for (int h2 = 0; h2 < mult; h2++) {
|
||||
uae_u8 *d8 = vbout->bufmem + vbout->rowbytes * (hh + h2 + voffset);
|
||||
uae_u16 *d16 = reinterpret_cast<uae_u16*>(d8);
|
||||
uae_u16 *d16 = (uae_u16*)d8;
|
||||
uae_u8 *s8 = vbin->bufmem + vbin->rowbytes * (hh + h2 + voffset) ;
|
||||
uae_u16 *srcp = nullptr;
|
||||
uae_u16 *srcp = NULL;
|
||||
if (sh >= 0 && sh < mpeg_height)
|
||||
srcp = reinterpret_cast<uae_u16*>(mpeg_out_buffer + sh * mpeg_width * MPEG_PIXBYTES_16);
|
||||
srcp = (uae_u16*)(mpeg_out_buffer + sh * mpeg_width * MPEG_PIXBYTES_16);
|
||||
for (int ww = 0, sw = -hoffset; ww < w; sw++, ww += mult) {
|
||||
uae_u16 sv = fmv_border_color_16;
|
||||
if (sw >= 0 && sw < mpeg_width && srcp)
|
||||
sv = srcp[sw];
|
||||
for (int w2 = 0; w2 < mult; w2++) {
|
||||
uae_u32 v;
|
||||
if ((reinterpret_cast<uae_u16*>(s8)[0] >> 11) >= GENLOCK_VAL_16) {
|
||||
v = *reinterpret_cast<uae_u16*>(s8);
|
||||
if ((((uae_u16*)s8)[0] >> 11) >= GENLOCK_VAL_16) {
|
||||
v = *((uae_u16*)s8);
|
||||
} else {
|
||||
v = sv;
|
||||
}
|
||||
|
@ -129,18 +129,18 @@ static void genlock_16_nomult(struct vidbuffer *vbin, struct vidbuffer *vbout, i
|
|||
{
|
||||
for (int hh = 0, sh = -voffset; hh < h; sh++, hh++) {
|
||||
uae_u8 *d8 = vbout->bufmem + vbout->rowbytes * (hh + voffset);
|
||||
uae_u16 *d16 = reinterpret_cast<uae_u16*>(d8);
|
||||
uae_u16 *d16 = (uae_u16*)d8;
|
||||
uae_u8 *s8 = vbin->bufmem + vbin->rowbytes * (hh + voffset) ;
|
||||
uae_u16 *srcp = NULL;
|
||||
if (sh >= 0 && sh < mpeg_height)
|
||||
srcp = reinterpret_cast<uae_u16*>(mpeg_out_buffer + sh * mpeg_width * MPEG_PIXBYTES_16);
|
||||
srcp = (uae_u16*)(mpeg_out_buffer + sh * mpeg_width * MPEG_PIXBYTES_16);
|
||||
for (int ww = 0, sw = -hoffset; ww < w; sw++, ww++) {
|
||||
uae_u16 sv = fmv_border_color_16;
|
||||
if (sw >= 0 && sw < mpeg_width && srcp)
|
||||
sv = srcp[sw];
|
||||
uae_u32 v;
|
||||
if ((reinterpret_cast<uae_u16*>(s8)[0] >> 11) >= GENLOCK_VAL_16) {
|
||||
v = *reinterpret_cast<uae_u16*>(s8);
|
||||
if ((((uae_u16*)s8)[0] >> 11) >= GENLOCK_VAL_16) {
|
||||
v = *((uae_u16*)s8);
|
||||
} else {
|
||||
v = sv;
|
||||
}
|
||||
|
@ -152,6 +152,7 @@ static void genlock_16_nomult(struct vidbuffer *vbin, struct vidbuffer *vbout, i
|
|||
|
||||
void cd32_fmv_genlock(struct vidbuffer *vbin, struct vidbuffer *vbout)
|
||||
{
|
||||
int hoffset, voffset, mult;
|
||||
int w = vbin->outwidth;
|
||||
int h = vbin->outheight;
|
||||
int d = vbin->pixbytes;
|
||||
|
@ -159,7 +160,7 @@ void cd32_fmv_genlock(struct vidbuffer *vbin, struct vidbuffer *vbout)
|
|||
if (!mpeg_out_buffer)
|
||||
return;
|
||||
|
||||
int mult = 1;
|
||||
mult = 1;
|
||||
for (;;) {
|
||||
if (mult < 4 && mpeg_width * (mult << 1) <= w + 8 && mpeg_height * (mult << 1) <= h + 8) {
|
||||
mult <<= 1;
|
||||
|
@ -169,8 +170,8 @@ void cd32_fmv_genlock(struct vidbuffer *vbin, struct vidbuffer *vbout)
|
|||
}
|
||||
}
|
||||
|
||||
int hoffset = (w / mult - mpeg_width) / 2;
|
||||
int voffset = (h / mult - mpeg_height) / 2;
|
||||
hoffset = (w / mult - mpeg_width) / 2;
|
||||
voffset = (h / mult - mpeg_height) / 2;
|
||||
|
||||
if (hoffset < 0)
|
||||
hoffset = 0;
|
||||
|
|
480
src/cfgfile.cpp
480
src/cfgfile.cpp
|
@ -28,7 +28,6 @@
|
|||
#include "fsdb.h"
|
||||
#include "disk.h"
|
||||
#include "blkdev.h"
|
||||
#include "statusline.h"
|
||||
#include "calc.h"
|
||||
#include "gfxboard.h"
|
||||
#include "native2amiga_api.h"
|
||||
|
@ -46,48 +45,27 @@ static int uaeconfig;
|
|||
* as a help text. */
|
||||
struct cfg_lines
|
||||
{
|
||||
const TCHAR *config_label, *config_help;
|
||||
const TCHAR *config_label, *config_help;
|
||||
};
|
||||
|
||||
static const TCHAR* guimode1[] = {_T("no"), _T("yes"), _T("nowait"), nullptr};
|
||||
static const TCHAR* guimode2[] = {_T("false"), _T("true"), _T("nowait"), nullptr};
|
||||
static const TCHAR* guimode3[] = {_T("0"), _T("1"), _T("nowait"), nullptr};
|
||||
static const TCHAR* csmode[] = {_T("ocs"), _T("ecs_agnus"), _T("ecs_denise"), _T("ecs"), _T("aga"), nullptr};
|
||||
static const TCHAR *linemode[] = {
|
||||
_T("none"),
|
||||
_T("double"), _T("scanlines"), _T("scanlines2p"), _T("scanlines3p"),
|
||||
_T("double2"), _T("scanlines2"), _T("scanlines2p2"), _T("scanlines2p3"),
|
||||
_T("double3"), _T("scanlines3"), _T("scanlines3p2"), _T("scanlines3p3"),
|
||||
nullptr };
|
||||
static const TCHAR *speedmode[] = { _T("max"), _T("real"), nullptr };
|
||||
static const TCHAR *colormode1[] = { _T("8bit"), _T("15bit"), _T("16bit"), _T("8bit_dither"), _T("4bit_dither"), _T("32bit"), nullptr };
|
||||
static const TCHAR *colormode2[] = { _T("8"), _T("15"), _T("16"), _T("8d"), _T("4d"), _T("32"), nullptr };
|
||||
static const TCHAR *soundmode1[] = { _T("none"), _T("interrupts"), _T("normal"), _T("exact"), nullptr };
|
||||
static const TCHAR *soundmode2[] = { _T("none"), _T("interrupts"), _T("good"), _T("best"), nullptr };
|
||||
static const TCHAR *centermode1[] = { _T("none"), _T("simple"), _T("smart"), nullptr };
|
||||
static const TCHAR *centermode2[] = { _T("false"), _T("true"), _T("smart"), nullptr };
|
||||
static const TCHAR *stereomode[] = { _T("mono"), _T("stereo"), _T("clonedstereo"), _T("4ch"), _T("clonedstereo6ch"), _T("6ch"), _T("mixed"), nullptr };
|
||||
static const TCHAR *interpolmode[] = { _T("none"), _T("anti"), _T("sinc"), _T("rh"), _T("crux"), nullptr };
|
||||
static const TCHAR *collmode[] = { _T("none"), _T("sprites"), _T("playfields"), _T("full"), nullptr };
|
||||
static const TCHAR *compmode[] = { _T("direct"), _T("indirect"), _T("indirectKS"), _T("afterPic"), nullptr };
|
||||
static const TCHAR *flushmode[] = { _T("soft"), _T("hard"), nullptr };
|
||||
static const TCHAR *kbleds[] = { _T("none"), _T("POWER"), _T("DF0"), _T("DF1"), _T("DF2"), _T("DF3"), _T("HD"), _T("CD"), nullptr };
|
||||
static const TCHAR *onscreenleds[] = { _T("false"), _T("true"), _T("rtg"), _T("both"), nullptr };
|
||||
static const TCHAR *soundfiltermode1[] = { _T("off"), _T("emulated"), _T("on"), nullptr };
|
||||
static const TCHAR *soundfiltermode2[] = { _T("standard"), _T("enhanced"), nullptr };
|
||||
static const TCHAR *lorestype1[] = { _T("lores"), _T("hires"), _T("superhires"), nullptr };
|
||||
static const TCHAR *lorestype2[] = { _T("true"), _T("false"), nullptr };
|
||||
static const TCHAR *loresmode[] = { _T("normal"), _T("filtered"), nullptr };
|
||||
static const TCHAR *horizmode[] = { _T("vertical"), _T("lores"), _T("hires"), _T("superhires"), nullptr };
|
||||
static const TCHAR *vertmode[] = { _T("horizontal"), _T("single"), _T("double"), _T("quadruple"), nullptr };
|
||||
#ifdef GFXFILTER
|
||||
static const TCHAR *filtermode2[] = { _T("1x"), _T("2x"), _T("3x"), _T("4x"), 0 };
|
||||
#endif
|
||||
static const TCHAR *cartsmode[] = { _T("none"), _T("hrtmon"), nullptr };
|
||||
static const TCHAR *idemode[] = { _T("none"), _T("a600/a1200"), _T("a4000"), nullptr };
|
||||
static const TCHAR *rtctype[] = { _T("none"), _T("MSM6242B"), _T("RP5C01A"), _T("MSM6242B_A2000"), nullptr };
|
||||
static const TCHAR *ciaatodmode[] = { _T("vblank"), _T("50hz"), _T("60hz"), nullptr };
|
||||
static const TCHAR *ksmirrortype[] = { _T("none"), _T("e0"), _T("a8+e0"), nullptr };
|
||||
static const TCHAR *guimode1[] = { _T("no"), _T("yes"), _T("nowait"), 0 };
|
||||
static const TCHAR *guimode2[] = { _T("false"), _T("true"), _T("nowait"), 0 };
|
||||
static const TCHAR *guimode3[] = { _T("0"), _T("1"), _T("nowait"), 0 };
|
||||
static const TCHAR *csmode[] = { _T("ocs"), _T("ecs_agnus"), _T("ecs_denise"), _T("ecs"), _T("aga"), 0 };
|
||||
static const TCHAR *speedmode[] = { _T("max"), _T("real"), 0 };
|
||||
static const TCHAR *soundmode1[] = { _T("none"), _T("interrupts"), _T("normal"), _T("exact"), 0 };
|
||||
static const TCHAR *soundmode2[] = { _T("none"), _T("interrupts"), _T("good"), _T("best"), 0 };
|
||||
static const TCHAR *stereomode[] = { _T("mono"), _T("stereo"), _T("clonedstereo"), _T("4ch"), _T("clonedstereo6ch"), _T("6ch"), _T("mixed"), 0 };
|
||||
static const TCHAR *interpolmode[] = { _T("none"), _T("anti"), _T("sinc"), _T("rh"), _T("crux"), 0 };
|
||||
static const TCHAR *collmode[] = { _T("none"), _T("sprites"), _T("playfields"), _T("full"), 0 };
|
||||
static const TCHAR *soundfiltermode1[] = { _T("off"), _T("emulated"), _T("on"), 0 };
|
||||
static const TCHAR *soundfiltermode2[] = { _T("standard"), _T("enhanced"), 0 };
|
||||
static const TCHAR *lorestype1[] = { _T("lores"), _T("hires"), _T("superhires"), 0 };
|
||||
static const TCHAR *lorestype2[] = { _T("true"), _T("false"), 0 };
|
||||
static const TCHAR *cartsmode[] = { _T("none"), _T("hrtmon"), 0 };
|
||||
static const TCHAR *idemode[] = { _T("none"), _T("a600/a1200"), _T("a4000"), 0 };
|
||||
static const TCHAR *rtctype[] = { _T("none"), _T("MSM6242B"), _T("RP5C01A"), _T("MSM6242B_A2000"), 0 };
|
||||
static const TCHAR *ciaatodmode[] = { _T("vblank"), _T("50hz"), _T("60hz"), 0 };
|
||||
static const TCHAR *cscompa[] = {
|
||||
_T("-"), _T("Generic"), _T("CDTV"), _T("CDTV-CR"), _T("CD32"), _T("A500"), _T("A500+"), _T("A600"),
|
||||
_T("A1000"), _T("A1200"), _T("A2000"), _T("A3000"), _T("A3000T"), _T("A4000"),
|
||||
|
@ -95,48 +73,15 @@ static const TCHAR *cscompa[] = {
|
|||
nullptr
|
||||
};
|
||||
static const TCHAR *qsmodes[] = {
|
||||
_T("A500"), _T("A500+"), _T("A600"), _T("A1200"), _T("A4000"), _T("CD32"), nullptr };
|
||||
/* 3-state boolean! */
|
||||
static const TCHAR *fullmodes[] = { _T("false"), _T("true"), /* "FILE_NOT_FOUND", */ _T("fullwindow"), nullptr };
|
||||
/* bleh for compatibility */
|
||||
static const TCHAR *scsimode[] = { _T("false"), _T("true"), _T("scsi"), nullptr };
|
||||
static const TCHAR *maxhoriz[] = { _T("lores"), _T("hires"), _T("superhires"), nullptr };
|
||||
static const TCHAR *maxvert[] = { _T("nointerlace"), _T("interlace"), nullptr };
|
||||
static const TCHAR *abspointers[] = { _T("none"), _T("mousehack"), _T("tablet"), nullptr };
|
||||
static const TCHAR *magiccursors[] = { _T("both"), _T("native"), _T("host"), nullptr };
|
||||
static const TCHAR *autoscale[] = { _T("none"), _T("auto"), _T("standard"), _T("max"), _T("scale"), _T("resize"), _T("center"), _T("manual"), _T("integer"), _T("integer_auto"), nullptr };
|
||||
static const TCHAR *autoscale_rtg[] = { _T("resize"), _T("scale"), _T("center"), _T("integer"), nullptr };
|
||||
static const TCHAR *joyportmodes[] = { _T(""), _T("mouse"), _T("mousenowheel"), _T("djoy"), _T("gamepad"), _T("ajoy"), _T("cdtvjoy"), _T("cd32joy"), _T("lightpen"), nullptr };
|
||||
static const TCHAR *joyaf[] = { _T("none"), _T("normal"), _T("toggle"), nullptr };
|
||||
static const TCHAR *epsonprinter[] = { _T("none"), _T("ascii"), _T("epson_matrix_9pin"), _T("epson_matrix_24pin"), _T("epson_matrix_48pin"), nullptr };
|
||||
static const TCHAR *aspects[] = { _T("none"), _T("vga"), _T("tv"), nullptr };
|
||||
static const TCHAR *vsyncmodes[] = { _T("false"), _T("true"), _T("autoswitch"), nullptr };
|
||||
static const TCHAR *vsyncmodes2[] = { _T("normal"), _T("busywait"), nullptr };
|
||||
static const TCHAR *filterapi[] = { _T("directdraw"), _T("direct3d"), nullptr };
|
||||
static const TCHAR *dongles[] =
|
||||
{
|
||||
_T("none"),
|
||||
_T("robocop 3"), _T("leaderboard"), _T("b.a.t. ii"), _T("italy'90 soccer"), _T("dames grand maitre"),
|
||||
_T("rugby coach"), _T("cricket captain"), _T("leviathan"),
|
||||
nullptr
|
||||
};
|
||||
static const TCHAR *cdmodes[] = { _T("disabled"), _T(""), _T("image"), _T("ioctl"), _T("spti"), _T("aspi"), nullptr };
|
||||
static const TCHAR *cdconmodes[] = { _T(""), _T("uae"), _T("ide"), _T("scsi"), _T("cdtv"), _T("cd32"), nullptr };
|
||||
static const TCHAR *specialmonitors[] = { _T("none"), _T("autodetect"), _T("a2024"), _T("graffiti"), nullptr };
|
||||
static const TCHAR *rtgtype[] = {
|
||||
_T("ZorroII"), _T("ZorroIII"),
|
||||
_T("PicassoII"),
|
||||
_T("PicassoII+"),
|
||||
_T("Piccolo_Z2"), _T("Piccolo_Z3"),
|
||||
_T("PiccoloSD64_Z2"), _T("PiccoloSD64_Z3"),
|
||||
_T("Spectrum28/24_Z2"), _T("Spectrum28/24_Z3"),
|
||||
_T("PicassoIV_Z2"), _T("PicassoIV_Z3"),
|
||||
nullptr };
|
||||
static const TCHAR *waitblits[] = { _T("disabled"), _T("automatic"), _T("noidleonly"), _T("always"), nullptr };
|
||||
static const TCHAR *autoext2[] = { _T("disabled"), _T("copy"), _T("replace"), nullptr };
|
||||
static const TCHAR *leds[] = { _T("power"), _T("df0"), _T("df1"), _T("df2"), _T("df3"), _T("hd"), _T("cd"), _T("fps"), _T("cpu"), _T("snd"), _T("md"), nullptr };
|
||||
static int leds_order[] = { 3, 6, 7, 8, 9, 4, 5, 2, 1, 0, 9 };
|
||||
static const TCHAR *lacer[] = { _T("off"), _T("i"), _T("p"), nullptr };
|
||||
_T("A500"), _T("A500+"), _T("A600"), _T("A1200"), _T("A4000"), _T("CD32"), NULL };
|
||||
static const TCHAR *abspointers[] = { _T("none"), _T("mousehack"), _T("tablet"), 0 };
|
||||
static const TCHAR *joyportmodes[] = { _T(""), _T("mouse"), _T("mousenowheel"), _T("djoy"), _T("gamepad"), _T("ajoy"), _T("cdtvjoy"), _T("cd32joy"), 0 };
|
||||
static const TCHAR *joyaf[] = { _T("none"), _T("normal"), _T("toggle"), _T("always"), 0 };
|
||||
static const TCHAR *vsyncmodes[] = { _T("adaptive"), _T("false"), _T("true"), _T("autoswitch"), 0 };
|
||||
static const TCHAR *cdmodes[] = { _T("disabled"), _T(""), _T("image"), _T("ioctl"), _T("spti"), _T("aspi"), 0 };
|
||||
static const TCHAR *cdconmodes[] = { _T(""), _T("uae"), _T("ide"), _T("scsi"), _T("cdtv"), _T("cd32"), 0 };
|
||||
static const TCHAR *waitblits[] = { _T("disabled"), _T("automatic"), _T("noidleonly"), _T("always"), 0 };
|
||||
static const TCHAR *autoext2[] = { _T("disabled"), _T("copy"), _T("replace"), 0 };
|
||||
|
||||
struct hdcontrollerconfig
|
||||
{
|
||||
|
@ -246,15 +191,15 @@ static TCHAR *cfgfile_option_get(const TCHAR *s, const TCHAR *option)
|
|||
return cfgfile_option_find_it(s, option, true);
|
||||
}
|
||||
|
||||
static void trimwsa(char *s)
|
||||
static void trimwsa (char *s)
|
||||
{
|
||||
/* Delete trailing whitespace. */
|
||||
int len = strlen(s);
|
||||
while (len > 0 && strcspn(s + len - 1, "\t \r\n") == 0)
|
||||
s[--len] = '\0';
|
||||
/* Delete trailing whitespace. */
|
||||
int len = strlen (s);
|
||||
while (len > 0 && strcspn (s + len - 1, "\t \r\n") == 0)
|
||||
s[--len] = '\0';
|
||||
}
|
||||
|
||||
static int match_string(const TCHAR *table[], const TCHAR *str)
|
||||
static int match_string (const TCHAR *table[], const TCHAR *str)
|
||||
{
|
||||
for (int i = 0; table[i] != nullptr; i++)
|
||||
if (_tcsicmp(table[i], str) == 0)
|
||||
|
@ -352,10 +297,10 @@ static TCHAR *cfgfile_escape_min(const TCHAR *s)
|
|||
return my_strdup(s);
|
||||
}
|
||||
|
||||
static TCHAR *cfgfile_unescape(const TCHAR *s, const TCHAR **endpos, TCHAR separator)
|
||||
static TCHAR *cfgfile_unescape (const TCHAR *s, const TCHAR **endpos, TCHAR separator)
|
||||
{
|
||||
bool quoted = false;
|
||||
TCHAR *s2 = xmalloc(TCHAR, _tcslen(s) + 1), c2;
|
||||
TCHAR *s2 = xmalloc (TCHAR, _tcslen (s) + 1);
|
||||
TCHAR *p = s2;
|
||||
if (s[0] == '\"') {
|
||||
s++;
|
||||
|
@ -374,31 +319,31 @@ static TCHAR *cfgfile_unescape(const TCHAR *s, const TCHAR **endpos, TCHAR separ
|
|||
}
|
||||
if (c == '\\') {
|
||||
char v = 0;
|
||||
TCHAR c2;
|
||||
c = s[i + 1];
|
||||
switch (c)
|
||||
{
|
||||
case 'X':
|
||||
case 'x':
|
||||
c2 = _totupper(s[i + 2]);
|
||||
case 'X':
|
||||
case 'x':
|
||||
c2 = _totupper (s[i + 2]);
|
||||
v = ((c2 >= 'A') ? c2 - 'A' : c2 - '0') << 4;
|
||||
c2 = _totupper(s[i + 3]);
|
||||
c2 = _totupper (s[i + 3]);
|
||||
v |= (c2 >= 'A') ? c2 - 'A' : c2 - '0';
|
||||
*p++ = c2;
|
||||
i += 2;
|
||||
break;
|
||||
case 'r':
|
||||
case 'r':
|
||||
*p++ = '\r';
|
||||
break;
|
||||
case '\n':
|
||||
case '\n':
|
||||
*p++ = '\n';
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
*p++ = c;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
*p++ = c;
|
||||
}
|
||||
}
|
||||
|
@ -407,18 +352,17 @@ static TCHAR *cfgfile_unescape(const TCHAR *s, const TCHAR **endpos, TCHAR separ
|
|||
*endpos = &s[i];
|
||||
return s2;
|
||||
}
|
||||
|
||||
static TCHAR *cfgfile_unescape(const TCHAR *s, const TCHAR **endpos)
|
||||
static TCHAR *cfgfile_unescape (const TCHAR *s, const TCHAR **endpos)
|
||||
{
|
||||
return cfgfile_unescape(s, endpos, 0);
|
||||
return cfgfile_unescape (s, endpos, 0);
|
||||
}
|
||||
|
||||
static TCHAR *getnextentry(const TCHAR **valuep, const TCHAR separator)
|
||||
static TCHAR *getnextentry (const TCHAR **valuep, const TCHAR separator)
|
||||
{
|
||||
TCHAR *s;
|
||||
const TCHAR *value = *valuep;
|
||||
if (value[0] == '\"') {
|
||||
s = cfgfile_unescape(value, valuep);
|
||||
s = cfgfile_unescape (value, valuep);
|
||||
value = *valuep;
|
||||
if (*value != 0 && *value != separator) {
|
||||
xfree(s);
|
||||
|
@ -1155,25 +1099,23 @@ void cfgfile_save_options(struct zfile *f, struct uae_prefs *p, int type)
|
|||
}
|
||||
}
|
||||
|
||||
cfgfile_write(f, _T("nr_floppies"), _T("%d"), p->nr_floppies);
|
||||
cfgfile_dwrite_bool(f, _T("floppy_write_protect"), p->floppy_read_only);
|
||||
cfgfile_write(f, _T("floppy_speed"), _T("%d"), p->floppy_speed);
|
||||
cfgfile_write(f, _T("cd_speed"), _T("%d"), p->cd_speed);
|
||||
cfgfile_write (f, _T("nr_floppies"), _T("%d"), p->nr_floppies);
|
||||
cfgfile_dwrite_bool (f, _T("floppy_write_protect"), p->floppy_read_only);
|
||||
cfgfile_write (f, _T("floppy_speed"), _T("%d"), p->floppy_speed);
|
||||
cfgfile_write (f, _T("cd_speed"), _T("%d"), p->cd_speed);
|
||||
|
||||
cfgfile_write_str(f, _T("sound_output"), soundmode1[p->produce_sound]);
|
||||
cfgfile_write_str(f, _T("sound_channels"), stereomode[p->sound_stereo]);
|
||||
cfgfile_write(f, _T("sound_stereo_separation"), _T("%d"), p->sound_stereo_separation);
|
||||
cfgfile_write(f, _T("sound_stereo_mixing_delay"), _T("%d"), p->sound_mixed_stereo_delay >= 0 ? p->sound_mixed_stereo_delay : 0);
|
||||
cfgfile_write(f, _T("sound_max_buff"), _T("%d"), p->sound_maxbsiz);
|
||||
cfgfile_write(f, _T("sound_frequency"), _T("%d"), p->sound_freq);
|
||||
cfgfile_write_str(f, _T("sound_interpol"), interpolmode[p->sound_interpol]);
|
||||
cfgfile_write_str(f, _T("sound_filter"), soundfiltermode1[p->sound_filter]);
|
||||
cfgfile_write_str(f, _T("sound_filter_type"), soundfiltermode2[p->sound_filter_type]);
|
||||
cfgfile_write(f, _T("sound_volume"), _T("%d"), p->sound_volume);
|
||||
cfgfile_write_str (f, _T("sound_output"), soundmode1[p->produce_sound]);
|
||||
cfgfile_write_str (f, _T("sound_channels"), stereomode[p->sound_stereo]);
|
||||
cfgfile_write (f, _T("sound_stereo_separation"), _T("%d"), p->sound_stereo_separation);
|
||||
cfgfile_write (f, _T("sound_stereo_mixing_delay"), _T("%d"), p->sound_mixed_stereo_delay >= 0 ? p->sound_mixed_stereo_delay : 0);
|
||||
cfgfile_write (f, _T("sound_frequency"), _T("%d"), p->sound_freq);
|
||||
cfgfile_write_str (f, _T("sound_interpol"), interpolmode[p->sound_interpol]);
|
||||
cfgfile_write_str (f, _T("sound_filter"), soundfiltermode1[p->sound_filter]);
|
||||
cfgfile_write_str (f, _T("sound_filter_type"), soundfiltermode2[p->sound_filter_type]);
|
||||
if (p->sound_volume_cd >= 0)
|
||||
cfgfile_write(f, _T("sound_volume_cd"), _T("%d"), p->sound_volume_cd);
|
||||
cfgfile_write (f, _T("sound_volume_cd"), _T("%d"), p->sound_volume_cd);
|
||||
|
||||
cfgfile_write(f, _T("cachesize"), _T("%d"), p->cachesize);
|
||||
cfgfile_write (f, _T("cachesize"), _T("%d"), p->cachesize);
|
||||
|
||||
for (i = 0; i < MAX_JPORTS; i++) {
|
||||
struct jport *jp = &p->jports[i];
|
||||
|
@ -1226,59 +1168,61 @@ void cfgfile_save_options(struct zfile *f, struct uae_prefs *p, int type)
|
|||
cfgfile_dwrite_str(f, _T("uaeboard"), uaeboard[p->uaeboard]);
|
||||
cfgfile_dwrite_str(f, _T("absolute_mouse"), abspointers[p->input_tablet]);
|
||||
|
||||
cfgfile_write(f, _T("gfx_framerate"), _T("%d"), p->gfx_framerate);
|
||||
write_resolution(f, _T("gfx_width"), _T("gfx_height"), &p->gfx_size); /* compatibility with old versions */
|
||||
cfgfile_write(f, _T("gfx_refreshrate"), _T("%d"), p->gfx_apmode[0].gfx_refreshrate);
|
||||
cfgfile_dwrite(f, _T("gfx_refreshrate_rtg"), _T("%d"), p->gfx_apmode[1].gfx_refreshrate);
|
||||
cfgfile_write (f, _T("gfx_framerate"), _T("%d"), p->gfx_framerate);
|
||||
write_resolution (f, _T("gfx_width"), _T("gfx_height"), &p->gfx_size); /* compatibility with old versions */
|
||||
cfgfile_write (f, _T("gfx_refreshrate"), _T("%d"), p->gfx_apmode[0].gfx_refreshrate);
|
||||
cfgfile_dwrite (f, _T("gfx_refreshrate_rtg"), _T("%d"), p->gfx_apmode[1].gfx_refreshrate);
|
||||
|
||||
cfgfile_write_str(f, _T("gfx_vsync"), vsyncmodes[p->gfx_apmode[0].gfx_vsync]);
|
||||
cfgfile_write_str(f, _T("gfx_vsync_picasso"), vsyncmodes[p->gfx_apmode[1].gfx_vsync]);
|
||||
cfgfile_write_bool(f, _T("gfx_lores"), p->gfx_resolution == 0);
|
||||
cfgfile_write_str(f, _T("gfx_resolution"), lorestype1[p->gfx_resolution]);
|
||||
cfgfile_write_str (f, _T("gfx_vsync"), vsyncmodes[p->gfx_apmode[0].gfx_vsync + 1]);
|
||||
cfgfile_write_str (f, _T("gfx_vsync_picasso"), vsyncmodes[p->gfx_apmode[1].gfx_vsync + 1]);
|
||||
cfgfile_write_bool (f, _T("gfx_lores"), p->gfx_resolution == 0);
|
||||
cfgfile_write_str (f, _T("gfx_resolution"), lorestype1[p->gfx_resolution]);
|
||||
|
||||
cfgfile_write_bool(f, _T("immediate_blits"), p->immediate_blits);
|
||||
cfgfile_dwrite_str(f, _T("waiting_blits"), waitblits[p->waiting_blits]);
|
||||
cfgfile_write_bool(f, _T("ntsc"), p->ntscmode);
|
||||
cfgfile_write_bool (f, _T("immediate_blits"), p->immediate_blits);
|
||||
cfgfile_dwrite_str (f, _T("waiting_blits"), waitblits[p->waiting_blits]);
|
||||
cfgfile_write_bool (f, _T("fast_copper"), p->fast_copper);
|
||||
cfgfile_write_bool (f, _T("ntsc"), p->ntscmode);
|
||||
|
||||
cfgfile_dwrite_bool(f, _T("show_leds"), !!(p->leds_on_screen & STATUSLINE_CHIPSET));
|
||||
cfgfile_dwrite_bool(f, _T("show_leds_rtg"), !!(p->leds_on_screen & STATUSLINE_RTG));
|
||||
|
||||
if (p->chipset_mask & CSMASK_AGA)
|
||||
cfgfile_write(f, _T("chipset"), _T("aga"));
|
||||
else if ((p->chipset_mask & CSMASK_ECS_AGNUS) && (p->chipset_mask & CSMASK_ECS_DENISE))
|
||||
cfgfile_write(f, _T("chipset"), _T("ecs"));
|
||||
else if (p->chipset_mask & CSMASK_ECS_AGNUS)
|
||||
cfgfile_write(f, _T("chipset"), _T("ecs_agnus"));
|
||||
else if (p->chipset_mask & CSMASK_ECS_DENISE)
|
||||
cfgfile_write(f, _T("chipset"), _T("ecs_denise"));
|
||||
else
|
||||
cfgfile_write(f, _T("chipset"), _T("ocs"));
|
||||
cfgfile_dwrite_bool (f, _T("show_leds"), p->leds_on_screen);
|
||||
if (p->chipset_mask & CSMASK_AGA)
|
||||
cfgfile_write (f, _T("chipset"), _T("aga"));
|
||||
else if ((p->chipset_mask & CSMASK_ECS_AGNUS) && (p->chipset_mask & CSMASK_ECS_DENISE))
|
||||
cfgfile_write (f, _T("chipset"), _T("ecs"));
|
||||
else if (p->chipset_mask & CSMASK_ECS_AGNUS)
|
||||
cfgfile_write (f, _T("chipset"), _T("ecs_agnus"));
|
||||
else if (p->chipset_mask & CSMASK_ECS_DENISE)
|
||||
cfgfile_write (f, _T("chipset"), _T("ecs_denise"));
|
||||
else
|
||||
cfgfile_write (f, _T("chipset"), _T("ocs"));
|
||||
if (p->chipset_refreshrate > 0)
|
||||
cfgfile_write(f, _T("chipset_refreshrate"), _T("%f"), p->chipset_refreshrate);
|
||||
cfgfile_write (f, _T("chipset_refreshrate"), _T("%f"), p->chipset_refreshrate);
|
||||
|
||||
for (int i = 0; i < MAX_CHIPSET_REFRESH_TOTAL; i++) {
|
||||
if (p->cr[i].rate <= 0)
|
||||
continue;
|
||||
struct chipset_refresh *cr = &p->cr[i];
|
||||
if (!cr->inuse)
|
||||
continue;
|
||||
cr->index = i;
|
||||
_stprintf(tmp, _T("%f"), cr->rate);
|
||||
TCHAR *s = tmp + _tcslen(tmp);
|
||||
if (cr->rate == 0)
|
||||
_tcscpy(tmp, _T("0"));
|
||||
else
|
||||
_stprintf (tmp, _T("%f"), cr->rate);
|
||||
TCHAR *s = tmp + _tcslen (tmp);
|
||||
if (cr->label[0] > 0 && i < MAX_CHIPSET_REFRESH)
|
||||
s += _stprintf(s, _T(",t=%s"), cr->label);
|
||||
s += _stprintf (s, _T(",t=%s"), cr->label);
|
||||
if (cr->horiz > 0)
|
||||
s += _stprintf(s, _T(",h=%d"), cr->horiz);
|
||||
s += _stprintf (s, _T(",h=%d"), cr->horiz);
|
||||
if (cr->vert > 0)
|
||||
s += _stprintf(s, _T(",v=%d"), cr->vert);
|
||||
s += _stprintf (s, _T(",v=%d"), cr->vert);
|
||||
if (cr->locked)
|
||||
_tcscat(s, _T(",locked"));
|
||||
_tcscat (s, _T(",locked"));
|
||||
if (cr->ntsc > 0)
|
||||
_tcscat(s, _T(",ntsc"));
|
||||
_tcscat (s, _T(",ntsc"));
|
||||
else if (cr->ntsc == 0)
|
||||
_tcscat(s, _T(",pal"));
|
||||
_tcscat (s, _T(",pal"));
|
||||
if (cr->lace > 0)
|
||||
_tcscat(s, _T(",lace"));
|
||||
_tcscat (s, _T(",lace"));
|
||||
else if (cr->lace == 0)
|
||||
_tcscat(s, _T(",nlace"));
|
||||
_tcscat (s, _T(",nlace"));
|
||||
if ((cr->resolution & 7) != 7) {
|
||||
if (cr->resolution & 1)
|
||||
_tcscat(s, _T(",lores"));
|
||||
|
@ -1288,11 +1232,11 @@ void cfgfile_save_options(struct zfile *f, struct uae_prefs *p, int type)
|
|||
_tcscat(s, _T(",shres"));
|
||||
}
|
||||
if (cr->vsync > 0)
|
||||
_tcscat(s, _T(",vsync"));
|
||||
_tcscat (s, _T(",vsync"));
|
||||
else if (cr->vsync == 0)
|
||||
_tcscat(s, _T(",nvsync"));
|
||||
_tcscat (s, _T(",nvsync"));
|
||||
if (cr->rtg)
|
||||
_tcscat(s, _T(",rtg"));
|
||||
_tcscat (s, _T(",rtg"));
|
||||
if (cr->defaultdata)
|
||||
_tcscat(s, _T(",default"));
|
||||
if (i == CHIPSET_REFRESH_PAL)
|
||||
|
@ -1408,9 +1352,6 @@ void cfgfile_save_options(struct zfile *f, struct uae_prefs *p, int type)
|
|||
|
||||
cfgfile_write(f, _T("rtg_modes"), _T("0x%x"), p->picasso96_modeflags);
|
||||
|
||||
cfgfile_dwrite(f, _T("state_replay_rate"), _T("%d"), p->statecapturerate);
|
||||
cfgfile_dwrite(f, _T("state_replay_buffers"), _T("%d"), p->statecapturebuffersize);
|
||||
|
||||
cfgfile_write_str(f, _T("kbd_lang"), (p->keyboard_lang == KBD_LANG_DE ? _T("de")
|
||||
: p->keyboard_lang == KBD_LANG_DK ? _T("dk")
|
||||
: p->keyboard_lang == KBD_LANG_ES ? _T("es")
|
||||
|
@ -1883,7 +1824,6 @@ static int cfgfile_parse_host(struct uae_prefs *p, TCHAR *option, TCHAR *value)
|
|||
TCHAR *next2 = _tcschr(next, ':');
|
||||
if (next2)
|
||||
*next2++ = 0;
|
||||
int tmpval = 0;
|
||||
if (!_tcsicmp(next, _T("delay"))) {
|
||||
p->cdslots[i].delayed = true;
|
||||
next = next2;
|
||||
|
@ -1989,37 +1929,31 @@ static int cfgfile_parse_host(struct uae_prefs *p, TCHAR *option, TCHAR *value)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (_tcscmp(option, _T("gfx_vsync")) == 0) {
|
||||
if (cfgfile_strval(option, value, _T("gfx_vsync"), &p->gfx_apmode[APMODE_NATIVE].gfx_vsync, vsyncmodes, 0) >= 0)
|
||||
if (_tcscmp (option, _T("gfx_vsync")) == 0) {
|
||||
if (cfgfile_strval (option, value, _T("gfx_vsync"), &p->gfx_apmode[APMODE_NATIVE].gfx_vsync, vsyncmodes, 0) >= 0) {
|
||||
p->gfx_apmode[APMODE_NATIVE].gfx_vsync--;
|
||||
return 1;
|
||||
return cfgfile_yesno(option, value, _T("gfx_vsync"), &p->gfx_apmode[APMODE_NATIVE].gfx_vsync);
|
||||
}
|
||||
return cfgfile_yesno (option, value, _T("gfx_vsync"), &p->gfx_apmode[APMODE_NATIVE].gfx_vsync);
|
||||
}
|
||||
if (_tcscmp(option, _T("gfx_vsync_picasso")) == 0) {
|
||||
if (cfgfile_strval(option, value, _T("gfx_vsync_picasso"), &p->gfx_apmode[APMODE_RTG].gfx_vsync, vsyncmodes, 0) >= 0)
|
||||
if (_tcscmp (option, _T("gfx_vsync_picasso")) == 0) {
|
||||
if (cfgfile_strval (option, value, _T("gfx_vsync_picasso"), &p->gfx_apmode[APMODE_RTG].gfx_vsync, vsyncmodes, 0) >= 0) {
|
||||
p->gfx_apmode[APMODE_RTG].gfx_vsync--;
|
||||
return 1;
|
||||
return cfgfile_yesno(option, value, _T("gfx_vsync_picasso"), &p->gfx_apmode[APMODE_RTG].gfx_vsync);
|
||||
}
|
||||
return cfgfile_yesno (option, value, _T("gfx_vsync_picasso"), &p->gfx_apmode[APMODE_RTG].gfx_vsync);
|
||||
}
|
||||
|
||||
if (cfgfile_yesno(option, value, _T("show_leds"), &vb)) {
|
||||
if (vb)
|
||||
p->leds_on_screen |= STATUSLINE_CHIPSET;
|
||||
else
|
||||
p->leds_on_screen &= ~STATUSLINE_CHIPSET;
|
||||
if(cfgfile_yesno (option, value, _T("show_leds"), &vb)) {
|
||||
p->leds_on_screen = vb;
|
||||
return 1;
|
||||
}
|
||||
if (cfgfile_yesno(option, value, _T("show_leds_rtg"), &vb)) {
|
||||
if (vb)
|
||||
p->leds_on_screen |= STATUSLINE_RTG;
|
||||
else
|
||||
p->leds_on_screen &= ~STATUSLINE_RTG;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (_tcscmp(option, _T("gfx_width")) == 0 || _tcscmp(option, _T("gfx_height")) == 0) {
|
||||
cfgfile_intval(option, value, _T("gfx_width"), &p->gfx_size.width, 1);
|
||||
cfgfile_intval(option, value, _T("gfx_height"), &p->gfx_size.height, 1);
|
||||
return 1;
|
||||
}
|
||||
if (_tcscmp (option, _T("gfx_width")) == 0 || _tcscmp (option, _T("gfx_height")) == 0) {
|
||||
cfgfile_intval (option, value, _T("gfx_width"), &p->gfx_size.width, 1);
|
||||
cfgfile_intval (option, value, _T("gfx_height"), &p->gfx_size.height, 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (_tcscmp(option, _T("joyportfriendlyname0")) == 0 || _tcscmp(option, _T("joyportfriendlyname1")) == 0) {
|
||||
inputdevice_joyport_config_store(p, value, _tcscmp(option, _T("joyportfriendlyname0")) == 0 ? 0 : 1, -1, 2);
|
||||
|
@ -3067,66 +3001,64 @@ static void addbcromtype(struct uae_prefs *p, int romtype, bool add, const TCHAR
|
|||
static int cfgfile_parse_hardware(struct uae_prefs *p, const TCHAR *option, TCHAR *value)
|
||||
{
|
||||
int tmpval, dummyint, i;
|
||||
bool tmpbool, dummybool;
|
||||
TCHAR *section = nullptr;
|
||||
TCHAR tmpbuf[CONFIG_BLEN];
|
||||
|
||||
if (cfgfile_yesno(option, value, _T("immediate_blits"), &p->immediate_blits)
|
||||
if (cfgfile_yesno (option, value, _T("immediate_blits"), &p->immediate_blits)
|
||||
|| cfgfile_yesno (option, value, _T("fast_copper"), &p->fast_copper)
|
||||
|| cfgfile_yesno(option, value, _T("fpu_no_unimplemented"), &p->fpu_no_unimplemented)
|
||||
|| cfgfile_yesno(option, value, _T("cd32cd"), &p->cs_cd32cd)
|
||||
|| cfgfile_yesno(option, value, _T("cd32c2p"), &p->cs_cd32c2p)
|
||||
|| cfgfile_yesno(option, value, _T("cd32nvram"), &p->cs_cd32nvram)
|
||||
|| cfgfile_yesno(option, value, _T("pcmcia"), &p->cs_pcmcia)
|
||||
|| cfgfile_yesno (option, value, _T("cd32cd"), &p->cs_cd32cd)
|
||||
|| cfgfile_yesno (option, value, _T("cd32c2p"), &p->cs_cd32c2p)
|
||||
|| cfgfile_yesno (option, value, _T("cd32nvram"), &p->cs_cd32nvram)
|
||||
|| cfgfile_yesno(option, value, _T("cia_overlay"), &p->cs_ciaoverlay)
|
||||
|| cfgfile_yesno(option, value, _T("ksmirror_e0"), &p->cs_ksmirror_e0)
|
||||
|| cfgfile_yesno(option, value, _T("ksmirror_a8"), &p->cs_ksmirror_a8)
|
||||
|| cfgfile_yesno(option, value, _T("cia_todbug"), &p->cs_ciatodbug)
|
||||
|| cfgfile_yesno(option, value, _T("z3_autoconfig"), &p->cs_z3autoconfig)
|
||||
|
||||
|| cfgfile_yesno(option, value, _T("ntsc"), &p->ntscmode)
|
||||
|| cfgfile_yesno(option, value, _T("cpu_compatible"), &p->cpu_compatible)
|
||||
|| cfgfile_yesno(option, value, _T("cpu_24bit_addressing"), &p->address_space_24)
|
||||
|| cfgfile_yesno(option, value, _T("fpu_strict"), &p->fpu_strict)
|
||||
|| cfgfile_yesno(option, value, _T("fpu_softfloat"), &p->fpu_softfloat)
|
||||
|| cfgfile_yesno(option, value, _T("floppy_write_protect"), &p->floppy_read_only)
|
||||
|| cfgfile_yesno (option, value, _T("ntsc"), &p->ntscmode)
|
||||
|| cfgfile_yesno (option, value, _T("cpu_compatible"), &p->cpu_compatible)
|
||||
|| cfgfile_yesno (option, value, _T("cpu_24bit_addressing"), &p->address_space_24)
|
||||
|| cfgfile_yesno (option, value, _T("fpu_strict"), &p->fpu_strict)
|
||||
|| cfgfile_yesno (option, value, _T("fpu_softfloat"), &p->fpu_softfloat)
|
||||
|| cfgfile_yesno (option, value, _T("floppy_write_protect"), &p->floppy_read_only)
|
||||
|| cfgfile_yesno(option, value, _T("harddrive_write_protect"), &p->harddrive_read_only))
|
||||
return 1;
|
||||
return 1;
|
||||
|
||||
if (cfgfile_intval(option, value, _T("cachesize"), &p->cachesize, 1)
|
||||
|| cfgfile_intval(option, value, _T("cd32nvram_size"), &p->cs_cd32nvram_size, 1024)
|
||||
|| cfgfile_intval(option, value, _T("fatgary"), &p->cs_fatgaryrev, 1)
|
||||
|| cfgfile_intval(option, value, _T("ramsey"), &p->cs_ramseyrev, 1)
|
||||
|| cfgfile_floatval(option, value, _T("chipset_refreshrate"), &p->chipset_refreshrate)
|
||||
|| cfgfile_intval(option, value, _T("a3000mem_size"), &p->mbresmem_low_size, 0x100000)
|
||||
|| cfgfile_intval(option, value, _T("mbresmem_size"), &p->mbresmem_high_size, 0x100000)
|
||||
|| cfgfile_intval(option, value, _T("z3mem_start"), &p->z3autoconfig_start, 1)
|
||||
|| cfgfile_intval(option, value, _T("bogomem_size"), &p->bogomem_size, 0x40000)
|
||||
|| cfgfile_intval(option, value, _T("rtg_modes"), &p->picasso96_modeflags, 1)
|
||||
|| cfgfile_intval(option, value, _T("floppy_speed"), &p->floppy_speed, 1)
|
||||
|| cfgfile_intval(option, value, _T("cd_speed"), &p->cd_speed, 1)
|
||||
|| cfgfile_intval(option, value, _T("floppy_write_length"), &p->floppy_write_length, 1)
|
||||
|| cfgfile_intval(option, value, _T("nr_floppies"), &p->nr_floppies, 1)
|
||||
|| cfgfile_intval(option, value, _T("floppy0type"), &p->floppyslots[0].dfxtype, 1)
|
||||
|| cfgfile_intval(option, value, _T("floppy1type"), &p->floppyslots[1].dfxtype, 1)
|
||||
|| cfgfile_intval(option, value, _T("floppy2type"), &p->floppyslots[2].dfxtype, 1)
|
||||
|| cfgfile_intval(option, value, _T("floppy3type"), &p->floppyslots[3].dfxtype, 1))
|
||||
return 1;
|
||||
if (cfgfile_intval (option, value, _T("cachesize"), &p->cachesize, 1)
|
||||
|| cfgfile_intval (option, value, _T("cd32nvram_size"), &p->cs_cd32nvram_size, 1024)
|
||||
|| cfgfile_intval (option, value, _T("fatgary"), &p->cs_fatgaryrev, 1)
|
||||
|| cfgfile_intval (option, value, _T("ramsey"), &p->cs_ramseyrev, 1)
|
||||
|| cfgfile_floatval (option, value, _T("chipset_refreshrate"), &p->chipset_refreshrate)
|
||||
|| cfgfile_intval (option, value, _T("a3000mem_size"), &p->mbresmem_low_size, 0x100000)
|
||||
|| cfgfile_intval (option, value, _T("mbresmem_size"), &p->mbresmem_high_size, 0x100000)
|
||||
|| cfgfile_intval (option, value, _T("z3mem_start"), &p->z3autoconfig_start, 1)
|
||||
|| cfgfile_intval (option, value, _T("bogomem_size"), &p->bogomem_size, 0x40000)
|
||||
|| cfgfile_intval (option, value, _T("rtg_modes"), &p->picasso96_modeflags, 1)
|
||||
|| cfgfile_intval (option, value, _T("floppy_speed"), &p->floppy_speed, 1)
|
||||
|| cfgfile_intval (option, value, _T("cd_speed"), &p->cd_speed, 1)
|
||||
|| cfgfile_intval (option, value, _T("floppy_write_length"), &p->floppy_write_length, 1)
|
||||
|| cfgfile_intval (option, value, _T("nr_floppies"), &p->nr_floppies, 1)
|
||||
|| cfgfile_intval (option, value, _T("floppy0type"), &p->floppyslots[0].dfxtype, 1)
|
||||
|| cfgfile_intval (option, value, _T("floppy1type"), &p->floppyslots[1].dfxtype, 1)
|
||||
|| cfgfile_intval (option, value, _T("floppy2type"), &p->floppyslots[2].dfxtype, 1)
|
||||
|| cfgfile_intval (option, value, _T("floppy3type"), &p->floppyslots[3].dfxtype, 1))
|
||||
return 1;
|
||||
|
||||
if (cfgfile_strval(option, value, _T("rtc"), &p->cs_rtc, rtctype, 0)
|
||||
|| cfgfile_strval(option, value, _T("ciaatod"), &p->cs_ciaatod, ciaatodmode, 0)
|
||||
|| cfgfile_strval(option, value, _T("collision_level"), &p->collision_level, collmode, 0)
|
||||
|| cfgfile_strval(option, value, _T("waiting_blits"), &p->waiting_blits, waitblits, 0)
|
||||
|| cfgfile_strval(option, value, _T("floppy_auto_extended_adf"), &p->floppy_auto_ext2, autoext2, 0)
|
||||
|| cfgfile_strval(option, value, _T("z3mapping"), &p->z3_mapping_mode, z3mapping, 0)
|
||||
if (cfgfile_strval (option, value, _T("rtc"), &p->cs_rtc, rtctype, 0)
|
||||
|| cfgfile_strval (option, value, _T("ciaatod"), &p->cs_ciaatod, ciaatodmode, 0)
|
||||
|| cfgfile_strval (option, value, _T("collision_level"), &p->collision_level, collmode, 0)
|
||||
|| cfgfile_strval (option, value, _T("waiting_blits"), &p->waiting_blits, waitblits, 0)
|
||||
|| cfgfile_strval (option, value, _T("floppy_auto_extended_adf"), &p->floppy_auto_ext2, autoext2, 0)
|
||||
|| cfgfile_strval (option, value, _T("z3mapping"), &p->z3_mapping_mode, z3mapping, 0)
|
||||
|| cfgfile_strval(option, value, _T("boot_rom_uae"), &p->boot_rom, uaebootrom, 0)
|
||||
|| cfgfile_strval(option, value, _T("uaeboard"), &p->uaeboard, uaeboard, 0))
|
||||
return 1;
|
||||
return 1;
|
||||
|
||||
if (cfgfile_path(option, value, _T("kickstart_rom_file"), p->romfile, sizeof p->romfile / sizeof(TCHAR))
|
||||
|| cfgfile_path(option, value, _T("kickstart_ext_rom_file"), p->romextfile, sizeof p->romextfile / sizeof(TCHAR))
|
||||
|| cfgfile_path(option, value, _T("flash_file"), p->flashfile, sizeof p->flashfile / sizeof(TCHAR))
|
||||
|| cfgfile_path(option, value, _T("cart_file"), p->cartfile, sizeof p->cartfile / sizeof(TCHAR)))
|
||||
return 1;
|
||||
if (cfgfile_path (option, value, _T("kickstart_rom_file"), p->romfile, sizeof p->romfile / sizeof (TCHAR))
|
||||
|| cfgfile_path (option, value, _T("kickstart_ext_rom_file"), p->romextfile, sizeof p->romextfile / sizeof (TCHAR))
|
||||
|| cfgfile_path (option, value, _T("flash_file"), p->flashfile, sizeof p->flashfile / sizeof (TCHAR))
|
||||
|| cfgfile_path (option, value, _T("cart_file"), p->cartfile, sizeof p->cartfile / sizeof (TCHAR)))
|
||||
return 1;
|
||||
|
||||
if (cfgfile_string(option, value, _T("uaeboard_options"), tmpbuf, sizeof tmpbuf / sizeof(TCHAR))) {
|
||||
TCHAR *s = cfgfile_option_get(value, _T("order"));
|
||||
|
@ -3461,6 +3393,7 @@ static void calcformula(struct uae_prefs *prefs, TCHAR *in)
|
|||
else
|
||||
_stprintf(in, _T("%d"), (int)val);
|
||||
updatestore = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3468,10 +3401,6 @@ int cfgfile_parse_option(struct uae_prefs *p, const TCHAR *option, TCHAR *value,
|
|||
{
|
||||
calcformula(p, value);
|
||||
|
||||
if (!_tcscmp(option, _T("debug"))) {
|
||||
write_log(_T("CONFIG DEBUG: '%s'\n"), value);
|
||||
return 1;
|
||||
}
|
||||
if (!_tcscmp(option, _T("config_hardware")))
|
||||
return 1;
|
||||
if (!_tcscmp(option, _T("config_host")))
|
||||
|
@ -3503,7 +3432,7 @@ static int isutf8ext(TCHAR *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int cfgfile_separate_linea(const TCHAR *filename, char *line, TCHAR *line1b, TCHAR *line2b)
|
||||
int cfgfile_separate_linea (const TCHAR *filename, char *line, TCHAR *line1b, TCHAR *line2b)
|
||||
{
|
||||
char *line1 = line;
|
||||
line1 += strspn(line1, "\t \r\n");
|
||||
|
@ -3636,24 +3565,6 @@ static void cfgfile_parse_separated_line(struct uae_prefs *p, TCHAR *line1b, TCH
|
|||
}
|
||||
}
|
||||
|
||||
void cfgfile_parse_lines(struct uae_prefs *p, const TCHAR *lines, int type)
|
||||
{
|
||||
TCHAR *buf = my_strdup(lines);
|
||||
TCHAR *t = buf;
|
||||
for (;;) {
|
||||
if (_tcslen(t) == 0)
|
||||
break;
|
||||
TCHAR *t2 = _tcschr(t, '\n');
|
||||
if (t2)
|
||||
*t2 = 0;
|
||||
cfgfile_parse_line(p, t, type);
|
||||
if (!t2)
|
||||
break;
|
||||
t = t2 + 1;
|
||||
}
|
||||
xfree(buf);
|
||||
}
|
||||
|
||||
void cfgfile_parse_line(struct uae_prefs *p, TCHAR *line, int type)
|
||||
{
|
||||
TCHAR line1b[CONFIG_BLEN], line2b[CONFIG_BLEN];
|
||||
|
@ -3820,19 +3731,6 @@ end:
|
|||
return v;
|
||||
}
|
||||
|
||||
void cfgfile_backup(const TCHAR *path)
|
||||
{
|
||||
TCHAR dpath[MAX_DPATH];
|
||||
|
||||
fetch_configurationpath(dpath, sizeof dpath / sizeof(TCHAR));
|
||||
_tcscat(dpath, _T("configuration.backup"));
|
||||
//bool hidden = my_isfilehidden(dpath);
|
||||
my_unlink(dpath);
|
||||
my_rename(path, dpath);
|
||||
//if (hidden)
|
||||
// my_setfilehidden(dpath, hidden);
|
||||
}
|
||||
|
||||
int cfgfile_save(struct uae_prefs *p, const TCHAR *filename, int type)
|
||||
{
|
||||
struct zfile *fh = zfile_fopen(filename, _T("w"), ZFD_NORMAL);
|
||||
|
@ -4486,10 +4384,6 @@ void default_prefs(struct uae_prefs *p, bool reset, int type)
|
|||
p->mountconfig[i].unitnum = -1;
|
||||
}
|
||||
|
||||
memset(&p->jports[0], 0, sizeof(struct jport));
|
||||
memset(&p->jports[1], 0, sizeof(struct jport));
|
||||
memset(&p->jports[2], 0, sizeof(struct jport));
|
||||
memset(&p->jports[3], 0, sizeof(struct jport));
|
||||
p->jports[0].id = -1;
|
||||
p->jports[1].id = -1;
|
||||
p->jports[2].id = -1;
|
||||
|
@ -4500,22 +4394,29 @@ void default_prefs(struct uae_prefs *p, bool reset, int type)
|
|||
}
|
||||
p->keyboard_lang = KBD_LANG_US;
|
||||
|
||||
p->produce_sound = 3;
|
||||
p->sound_stereo = SND_STEREO;
|
||||
p->sound_stereo_separation = 7;
|
||||
p->sound_mixed_stereo_delay = 0;
|
||||
p->sound_freq = DEFAULT_SOUND_FREQ;
|
||||
p->sound_interpol = 1;
|
||||
p->sound_filter = FILTER_SOUND_OFF;
|
||||
p->sound_filter_type = 0;
|
||||
p->produce_sound = 3;
|
||||
p->sound_stereo = SND_STEREO;
|
||||
p->sound_stereo_separation = 7;
|
||||
p->sound_mixed_stereo_delay = 0;
|
||||
p->sound_freq = DEFAULT_SOUND_FREQ;
|
||||
p->sound_interpol = 0;
|
||||
p->sound_filter = FILTER_SOUND_OFF;
|
||||
p->sound_filter_type = 0;
|
||||
p->sound_volume_cd = 20;
|
||||
|
||||
p->cachesize = 0;
|
||||
|
||||
p->gfx_framerate = 0;
|
||||
p->gfx_framerate = 0;
|
||||
|
||||
#ifdef RASPBERRY
|
||||
p->gfx_size.width = 640;
|
||||
p->gfx_size.height = 256;
|
||||
p->gfx_resolution = RES_HIRES;
|
||||
#else
|
||||
p->gfx_size.width = 320;
|
||||
p->gfx_size.height = 240;
|
||||
p->gfx_resolution = RES_LORES;
|
||||
#endif
|
||||
|
||||
p->immediate_blits = false;
|
||||
p->waiting_blits = 0;
|
||||
|
@ -4523,6 +4424,11 @@ void default_prefs(struct uae_prefs *p, bool reset, int type)
|
|||
p->collision_level = 2;
|
||||
p->leds_on_screen = 0;
|
||||
p->boot_rom = 0;
|
||||
#ifdef PANDORA
|
||||
p->fast_copper = 1;
|
||||
#else
|
||||
p->fast_copper = 0;
|
||||
#endif
|
||||
p->cart_internal = 1;
|
||||
|
||||
p->cs_compatible = CP_GENERIC;
|
||||
|
@ -4540,10 +4446,10 @@ void default_prefs(struct uae_prefs *p, bool reset, int type)
|
|||
p->cs_df0idhw = true;
|
||||
p->cs_ciatodbug = false;
|
||||
|
||||
_tcscpy(p->floppyslots[0].df, _T("df0.adf"));
|
||||
_tcscpy(p->floppyslots[1].df, _T("df1.adf"));
|
||||
_tcscpy(p->floppyslots[2].df, _T("df2.adf"));
|
||||
_tcscpy(p->floppyslots[3].df, _T("df3.adf"));
|
||||
_tcscpy (p->floppyslots[0].df, _T(""));
|
||||
_tcscpy (p->floppyslots[1].df, _T(""));
|
||||
_tcscpy (p->floppyslots[2].df, _T(""));
|
||||
_tcscpy (p->floppyslots[3].df, _T(""));
|
||||
|
||||
configure_rom(p, roms, 0);
|
||||
_tcscpy(p->romextfile, _T(""));
|
||||
|
|
1649
src/cia.cpp
1649
src/cia.cpp
File diff suppressed because it is too large
Load diff
134
src/custom.cpp
134
src/custom.cpp
|
@ -664,14 +664,6 @@ static int toscr_delay[2];
|
|||
we can do more work at once. */
|
||||
static int toscr_nbits;
|
||||
|
||||
/* undocumented bitplane delay hardware feature */
|
||||
static int delayoffset;
|
||||
|
||||
STATIC_INLINE void compute_delay_offset()
|
||||
{
|
||||
delayoffset = (16 << fetchmode) - (((plfstrt - HARD_DDF_START_REAL) & fetchstart_mask) << 1);
|
||||
}
|
||||
|
||||
static void record_color_change2(int hpos, int regno, unsigned long value)
|
||||
{
|
||||
int pos = hpos * 2;
|
||||
|
@ -720,20 +712,6 @@ STATIC_INLINE void update_denise(int hpos)
|
|||
}
|
||||
}
|
||||
|
||||
static int islinetoggle()
|
||||
{
|
||||
int linetoggle = 0;
|
||||
if (!(beamcon0 & 0x0800) && !(beamcon0 & 0x0020) && (currprefs.chipset_mask & CSMASK_ECS_AGNUS))
|
||||
{
|
||||
linetoggle = 1; // NTSC and !LOLDIS -> LOL toggles every line
|
||||
}
|
||||
else if (!(currprefs.chipset_mask & CSMASK_ECS_AGNUS) && currprefs.ntscmode)
|
||||
{
|
||||
linetoggle = 1; // hardwired NTSC Agnus
|
||||
}
|
||||
return linetoggle;
|
||||
}
|
||||
|
||||
/* Expand bplcon0/bplcon1 into the toscr_xxx variables. */
|
||||
STATIC_INLINE void compute_toscr_delay_1(int bplcon1)
|
||||
{
|
||||
|
@ -1845,11 +1823,6 @@ STATIC_INLINE void decide_fetch(int hpos)
|
|||
}
|
||||
}
|
||||
|
||||
STATIC_INLINE void decide_fetch_safe(int hpos)
|
||||
{
|
||||
decide_fetch(hpos);
|
||||
}
|
||||
|
||||
static void reset_bpl_vars(void)
|
||||
{
|
||||
out_nbits = 0;
|
||||
|
@ -4586,48 +4559,47 @@ static void update_copper(int until_hpos)
|
|||
if (ch_comp & 1)
|
||||
ch_comp = 0;
|
||||
|
||||
/* First handle possible blitter wait
|
||||
* Must be before following free cycle check
|
||||
*/
|
||||
if ((cop_state.i2 & 0x8000) == 0) {
|
||||
if (bltstate != BLT_done) {
|
||||
/* We need to wait for the blitter. */
|
||||
cop_state.state = COP_bltwait;
|
||||
copper_enabled_thisline = 0;
|
||||
unset_special(SPCFLAG_COPPER);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
/* First handle possible blitter wait
|
||||
* Must be before following free cycle check
|
||||
*/
|
||||
if ((cop_state.i2 & 0x8000) == 0) {
|
||||
if (bltstate != BLT_done) {
|
||||
/* We need to wait for the blitter. */
|
||||
cop_state.state = COP_bltwait;
|
||||
copper_enabled_thisline = 0;
|
||||
unset_special (SPCFLAG_COPPER);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (copper_cant_read(old_hpos))
|
||||
continue;
|
||||
if (copper_cant_read (old_hpos))
|
||||
continue;
|
||||
|
||||
hp = ch_comp & (cop_state.i2 & 0xFE);
|
||||
if (vp == cop_state.vcmp && hp < cop_state.hcmp) {
|
||||
/* Position not reached yet. */
|
||||
//if (currprefs.fast_copper) {
|
||||
// if ((cop_state.i2 & 0xFE) == 0xFE) {
|
||||
// int wait_finish = cop_state.hcmp - 2;
|
||||
// /* This will leave c_hpos untouched if it's equal to wait_finish. */
|
||||
// if (wait_finish < c_hpos)
|
||||
// return;
|
||||
// else if (wait_finish <= until_hpos) {
|
||||
// c_hpos = wait_finish;
|
||||
// }
|
||||
// else
|
||||
// c_hpos = until_hpos;
|
||||
// }
|
||||
//}
|
||||
hp = ch_comp & (cop_state.i2 & 0xFE);
|
||||
if (vp == cop_state.vcmp && hp < cop_state.hcmp) {
|
||||
/* Position not reached yet. */
|
||||
if(currprefs.fast_copper) {
|
||||
if ((cop_state.i2 & 0xFE) == 0xFE) {
|
||||
int wait_finish = cop_state.hcmp - 2;
|
||||
/* This will leave c_hpos untouched if it's equal to wait_finish. */
|
||||
if (wait_finish < c_hpos)
|
||||
return;
|
||||
else if (wait_finish <= until_hpos) {
|
||||
c_hpos = wait_finish;
|
||||
} else
|
||||
c_hpos = until_hpos;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
cop_state.state = COP_read1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
cop_state.state = COP_read1;
|
||||
}
|
||||
break;
|
||||
|
||||
case COP_skip1:
|
||||
{
|
||||
unsigned int vcmp, hcmp, vp1, hp1;
|
||||
case COP_skip1:
|
||||
{
|
||||
unsigned int vcmp, hcmp, vp1, hp1;
|
||||
|
||||
if (c_hpos >= (maxhpos & ~1) || (c_hpos & 1))
|
||||
break;
|
||||
|
@ -4656,13 +4628,13 @@ out:
|
|||
cop_state.hpos = c_hpos;
|
||||
last_copper_hpos = until_hpos;
|
||||
|
||||
//if (currprefs.fast_copper) {
|
||||
// /* The test against maxhpos also prevents us from calling predict_copper
|
||||
// when we are being called from hsync_handler, which would not only be
|
||||
// stupid, but actively harmful. */
|
||||
// if ((regs.spcflags & SPCFLAG_COPPER) && (c_hpos + 8 < maxhpos))
|
||||
// predict_copper();
|
||||
//}
|
||||
if(currprefs.fast_copper) {
|
||||
/* The test against maxhpos also prevents us from calling predict_copper
|
||||
when we are being called from hsync_handler, which would not only be
|
||||
stupid, but actively harmful. */
|
||||
if ((regs.spcflags & SPCFLAG_COPPER) && (c_hpos + 8 < maxhpos))
|
||||
predict_copper ();
|
||||
}
|
||||
}
|
||||
|
||||
static void compute_spcflag_copper(int hpos)
|
||||
|
@ -4697,13 +4669,13 @@ static void compute_spcflag_copper(int hpos)
|
|||
|
||||
copper_enabled_thisline = 1;
|
||||
|
||||
/*if (currprefs.fast_copper) {
|
||||
predict_copper();
|
||||
if (!eventtab[ev_copper].active)
|
||||
set_special(SPCFLAG_COPPER);
|
||||
if(currprefs.fast_copper) {
|
||||
predict_copper ();
|
||||
if (! eventtab[ev_copper].active)
|
||||
set_special (SPCFLAG_COPPER);
|
||||
}
|
||||
else*/
|
||||
set_special(SPCFLAG_COPPER);
|
||||
else
|
||||
set_special (SPCFLAG_COPPER);
|
||||
}
|
||||
|
||||
static void copper_handler(void)
|
||||
|
@ -5579,9 +5551,6 @@ static void hsync_handler_post(bool onvsync)
|
|||
events_dmal_hsync();
|
||||
|
||||
if (currprefs.m68k_speed < 0) {
|
||||
if (vpos > 0 && !(vpos & 0x3f))
|
||||
partial_draw_frame();
|
||||
|
||||
if (is_last_line()) {
|
||||
/* really last line, just run the cpu emulation until whole vsync time has been used */
|
||||
vsyncmintime = vsyncmaxtime; /* emulate if still time left */
|
||||
|
@ -6945,7 +6914,8 @@ void check_prefs_changed_custom(void)
|
|||
inputdevice_copyconfig(&changed_prefs, &currprefs);
|
||||
currprefs.immediate_blits = changed_prefs.immediate_blits;
|
||||
currprefs.waiting_blits = changed_prefs.waiting_blits;
|
||||
currprefs.collision_level = changed_prefs.collision_level;
|
||||
currprefs.collision_level = changed_prefs.collision_level;
|
||||
currprefs.fast_copper = changed_prefs.fast_copper;
|
||||
|
||||
currprefs.cs_ciaatod = changed_prefs.cs_ciaatod;
|
||||
currprefs.cs_rtc = changed_prefs.cs_rtc;
|
||||
|
|
4710
src/disk.cpp
4710
src/disk.cpp
File diff suppressed because it is too large
Load diff
139
src/drawing.cpp
139
src/drawing.cpp
|
@ -50,6 +50,13 @@
|
|||
#include "audio.h"
|
||||
#include "devices.h"
|
||||
|
||||
#define RENDER_SIGNAL_PARTIAL 1
|
||||
#define RENDER_SIGNAL_FRAME_DONE 2
|
||||
#define RENDER_SIGNAL_QUIT 3
|
||||
static uae_thread_id render_tid = 0;
|
||||
static smp_comm_pipe *volatile render_pipe = 0;
|
||||
static uae_sem_t render_sem = 0;
|
||||
|
||||
extern int sprite_buffer_res;
|
||||
int lores_shift;
|
||||
|
||||
|
@ -590,32 +597,26 @@ STATIC_INLINE int DECODE_HAM8_3(int col, int pv)
|
|||
|
||||
STATIC_INLINE int DECODE_HAM6_1(int col, int pv)
|
||||
{
|
||||
__asm__(
|
||||
"lsl %[pv], %[pv], #1 \n\t"
|
||||
"bfi %[col], %[pv], #0, #5 \n\t"
|
||||
: [col] "+r"(col),
|
||||
[pv] "+r"(pv));
|
||||
return (col);
|
||||
__asm__ (
|
||||
"bfi %[col], %[pv], #1, #4 \n\t"
|
||||
: [col] "+r" (col) : [pv] "r" (pv) );
|
||||
return (col);
|
||||
}
|
||||
|
||||
STATIC_INLINE int DECODE_HAM6_2(int col, int pv)
|
||||
{
|
||||
__asm__(
|
||||
"lsl %[pv], %[pv], #1 \n\t"
|
||||
"bfi %[col], %[pv], #11, #5 \n\t"
|
||||
: [col] "+r"(col),
|
||||
[pv] "+r"(pv));
|
||||
return (col);
|
||||
__asm__ (
|
||||
"bfi %[col], %[pv], #12, #4 \n\t"
|
||||
: [col] "+r" (col) : [pv] "r" (pv) );
|
||||
return (col);
|
||||
}
|
||||
|
||||
STATIC_INLINE int DECODE_HAM6_3(int col, int pv)
|
||||
{
|
||||
__asm__(
|
||||
"lsl %[pv], %[pv], #2 \n\t"
|
||||
"bfi %[col], %[pv], #5, #6 \n\t"
|
||||
: [col] "+r"(col),
|
||||
[pv] "+r"(pv));
|
||||
return (col);
|
||||
__asm__ (
|
||||
"bfi %[col], %[pv], #7, #4 \n\t"
|
||||
: [col] "+r" (col) : [pv] "r" (pv) );
|
||||
return (col);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -674,21 +675,18 @@ static void init_ham_decoding(void)
|
|||
while (unpainted_amiga-- > 0)
|
||||
{
|
||||
int pv = pixdata.apixels[ham_decode_pixel++] ^ bplxor;
|
||||
uae_u32 pc = ((pv & 0xf) << 0) | ((pv & 0xf) << 4);
|
||||
switch (pv & 0x30)
|
||||
{
|
||||
case 0x00: ham_lastcolor = colors_for_drawing.acolors[pv];
|
||||
break;
|
||||
{
|
||||
case 0x00: ham_lastcolor = colors_for_drawing.acolors[pv]; break;
|
||||
#ifdef ARMV6T2
|
||||
case 0x10: ham_lastcolor = DECODE_HAM6_1(ham_lastcolor, pv);
|
||||
break;
|
||||
case 0x20: ham_lastcolor = DECODE_HAM6_2(ham_lastcolor, pv);
|
||||
break;
|
||||
case 0x30: ham_lastcolor = DECODE_HAM6_3(ham_lastcolor, pv);
|
||||
break;
|
||||
case 0x10: ham_lastcolor = DECODE_HAM8_1(ham_lastcolor, pc); break;
|
||||
case 0x20: ham_lastcolor = DECODE_HAM8_2(ham_lastcolor, pc); break;
|
||||
case 0x30: ham_lastcolor = DECODE_HAM8_3(ham_lastcolor, pc); break;
|
||||
#else
|
||||
case 0x10: ham_lastcolor &= 0xFFFF00; ham_lastcolor |= (pv & 0xF) << 4; break;
|
||||
case 0x20: ham_lastcolor &= 0x00FFFF; ham_lastcolor |= (pv & 0xF) << 20; break;
|
||||
case 0x30: ham_lastcolor &= 0xFF00FF; ham_lastcolor |= (pv & 0xF) << 12; break;
|
||||
case 0x10: ham_lastcolor &= 0xFFFF00; ham_lastcolor |= (pc & 0xF) << 4; break;
|
||||
case 0x20: ham_lastcolor &= 0x00FFFF; ham_lastcolor |= (pc & 0xF) << 20; break;
|
||||
case 0x30: ham_lastcolor &= 0xFF00FF; ham_lastcolor |= (pc & 0xF) << 12; break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -770,21 +768,18 @@ static void decode_ham(int pix, int stoppos)
|
|||
while (todraw_amiga-- > 0)
|
||||
{
|
||||
int pv = pixdata.apixels[ham_decode_pixel] ^ bplxor;
|
||||
uae_u32 pc = ((pv & 0xf) << 0) | ((pv & 0xf) << 4);
|
||||
switch (pv & 0x30)
|
||||
{
|
||||
case 0x00: ham_lastcolor = colors_for_drawing.acolors[pv];
|
||||
break;
|
||||
{
|
||||
case 0x00: ham_lastcolor = colors_for_drawing.acolors[pv]; break;
|
||||
#ifdef ARMV6T2
|
||||
case 0x10: ham_lastcolor = DECODE_HAM6_1(ham_lastcolor, pv);
|
||||
break;
|
||||
case 0x20: ham_lastcolor = DECODE_HAM6_2(ham_lastcolor, pv);
|
||||
break;
|
||||
case 0x30: ham_lastcolor = DECODE_HAM6_3(ham_lastcolor, pv);
|
||||
break;
|
||||
case 0x10: ham_lastcolor = DECODE_HAM8_1(ham_lastcolor, pc); break;
|
||||
case 0x20: ham_lastcolor = DECODE_HAM8_2(ham_lastcolor, pc); break;
|
||||
case 0x30: ham_lastcolor = DECODE_HAM8_3(ham_lastcolor, pc); break;
|
||||
#else
|
||||
case 0x10: ham_lastcolor &= 0xFFFF00; ham_lastcolor |= (pv & 0xF) << 4; break;
|
||||
case 0x20: ham_lastcolor &= 0x00FFFF; ham_lastcolor |= (pv & 0xF) << 20; break;
|
||||
case 0x30: ham_lastcolor &= 0xFF00FF; ham_lastcolor |= (pv & 0xF) << 12; break;
|
||||
case 0x10: ham_lastcolor &= 0xFFFF00; ham_lastcolor |= (pc & 0xF) << 4; break;
|
||||
case 0x20: ham_lastcolor &= 0x00FFFF; ham_lastcolor |= (pc & 0xF) << 20; break;
|
||||
case 0x30: ham_lastcolor &= 0xFF00FF; ham_lastcolor |= (pc & 0xF) << 12; break;
|
||||
#endif
|
||||
}
|
||||
ham_linebuf[ham_decode_pixel++] = ham_lastcolor;
|
||||
|
@ -2334,10 +2329,26 @@ bool vsync_handle_check(void)
|
|||
|
||||
void vsync_handle_redraw(void)
|
||||
{
|
||||
if (framecnt == 0)
|
||||
finish_drawing_frame();
|
||||
if (framecnt == 0) {
|
||||
if(render_tid) {
|
||||
write_comm_pipe_u32 (render_pipe, RENDER_SIGNAL_FRAME_DONE, 1);
|
||||
uae_sem_wait (&render_sem);
|
||||
}
|
||||
}
|
||||
|
||||
if (quit_program < 0) {
|
||||
if(render_tid) {
|
||||
write_comm_pipe_u32 (render_pipe, RENDER_SIGNAL_QUIT, 1);
|
||||
while(render_tid != 0) {
|
||||
sleep_millis(10);
|
||||
}
|
||||
destroy_comm_pipe(render_pipe);
|
||||
xfree(render_pipe);
|
||||
render_pipe = 0;
|
||||
uae_sem_destroy(&render_sem);
|
||||
render_sem = 0;
|
||||
}
|
||||
|
||||
quit_program = -quit_program;
|
||||
set_inhibit_frame(IHF_QUIT_PROGRAM);
|
||||
set_special(SPCFLAG_BRK | SPCFLAG_MODE_CHANGE);
|
||||
|
@ -2357,7 +2368,11 @@ void hsync_record_line_state(int lineno)
|
|||
if (framecnt != 0)
|
||||
return;
|
||||
|
||||
linestate_first_undecided = lineno + 1;
|
||||
linestate_first_undecided = lineno + 1;
|
||||
|
||||
if(render_tid && !(linestate_first_undecided & 0x1f)) {
|
||||
write_comm_pipe_u32 (render_pipe, RENDER_SIGNAL_PARTIAL, 1);
|
||||
}
|
||||
}
|
||||
|
||||
bool notice_interlace_seen(bool lace)
|
||||
|
@ -2405,12 +2420,44 @@ static void gen_direct_drawing_table(void)
|
|||
}
|
||||
}
|
||||
|
||||
void drawing_init(void)
|
||||
static void *render_thread (void *unused)
|
||||
{
|
||||
for(;;) {
|
||||
uae_u32 signal = read_comm_pipe_u32_blocking(render_pipe);
|
||||
switch(signal) {
|
||||
case RENDER_SIGNAL_PARTIAL:
|
||||
partial_draw_frame();
|
||||
break;
|
||||
|
||||
case RENDER_SIGNAL_FRAME_DONE:
|
||||
finish_drawing_frame();
|
||||
uae_sem_post (&render_sem);
|
||||
break;
|
||||
|
||||
case RENDER_SIGNAL_QUIT:
|
||||
render_tid = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void drawing_init (void)
|
||||
{
|
||||
gen_pfield_tables();
|
||||
|
||||
gen_direct_drawing_table();
|
||||
|
||||
if(render_pipe == 0) {
|
||||
render_pipe = xmalloc (smp_comm_pipe, 1);
|
||||
init_comm_pipe(render_pipe, 20, 1);
|
||||
}
|
||||
if(render_sem == 0) {
|
||||
uae_sem_init (&render_sem, 0, 0);
|
||||
}
|
||||
if(render_tid == 0 && render_pipe != 0 && render_sem != 0) {
|
||||
uae_start_thread(_T("render"), render_thread, NULL, &render_tid);
|
||||
}
|
||||
|
||||
#ifdef PICASSO96
|
||||
if (!isrestore()) {
|
||||
picasso_on = 0;
|
||||
|
|
157
src/events.cpp
157
src/events.cpp
|
@ -20,75 +20,75 @@ int is_syncline;
|
|||
frame_time_t vsyncmintime, vsyncmaxtime, vsyncwaittime;
|
||||
int vsynctimebase;
|
||||
|
||||
void events_schedule(void)
|
||||
void events_schedule (void)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
|
||||
unsigned long int mintime = ~0L;
|
||||
for (i = 0; i < ev_max; i++) {
|
||||
if (eventtab[i].active) {
|
||||
unsigned long int eventtime = eventtab[i].evtime - currcycle;
|
||||
if (eventtime < mintime)
|
||||
mintime = eventtime;
|
||||
}
|
||||
}
|
||||
nextevent = currcycle + mintime;
|
||||
unsigned long int mintime = ~0L;
|
||||
for (i = 0; i < ev_max; i++) {
|
||||
if (eventtab[i].active) {
|
||||
unsigned long int eventtime = eventtab[i].evtime - currcycle;
|
||||
if (eventtime < mintime)
|
||||
mintime = eventtime;
|
||||
}
|
||||
}
|
||||
nextevent = currcycle + mintime;
|
||||
}
|
||||
|
||||
void do_cycles_cpu_fastest(unsigned long cycles_to_add)
|
||||
void do_cycles_cpu_fastest (unsigned long cycles_to_add)
|
||||
{
|
||||
if ((regs.pissoff -= cycles_to_add) > 0)
|
||||
return;
|
||||
if ((regs.pissoff -= cycles_to_add) > 0)
|
||||
return;
|
||||
|
||||
cycles_to_add = -regs.pissoff;
|
||||
regs.pissoff = 0;
|
||||
cycles_to_add = -regs.pissoff;
|
||||
regs.pissoff = 0;
|
||||
|
||||
/* Keep only CPU emulation running while waiting for sync point. */
|
||||
if (is_syncline) {
|
||||
int rpt = read_processor_time();
|
||||
int v = rpt - vsyncmintime;
|
||||
if (v > vsynctimebase || v < -vsynctimebase) {
|
||||
v = 0;
|
||||
}
|
||||
if (v < speedup_timelimit) {
|
||||
regs.pissoff = pissoff_value;
|
||||
return;
|
||||
}
|
||||
is_syncline = 0;
|
||||
}
|
||||
if (is_syncline) {
|
||||
int rpt = read_processor_time ();
|
||||
int v = rpt - vsyncmintime;
|
||||
if (v > vsynctimebase || v < -vsynctimebase) {
|
||||
v = 0;
|
||||
}
|
||||
if (v < speedup_timelimit) {
|
||||
regs.pissoff = pissoff_value;
|
||||
return;
|
||||
}
|
||||
is_syncline = 0;
|
||||
}
|
||||
|
||||
while ((nextevent - currcycle) <= cycles_to_add) {
|
||||
int i;
|
||||
while ((nextevent - currcycle) <= cycles_to_add) {
|
||||
int i;
|
||||
|
||||
cycles_to_add -= (nextevent - currcycle);
|
||||
currcycle = nextevent;
|
||||
cycles_to_add -= (nextevent - currcycle);
|
||||
currcycle = nextevent;
|
||||
|
||||
for (i = 0; i < ev_max; i++) {
|
||||
if (eventtab[i].active && eventtab[i].evtime == currcycle) {
|
||||
(*eventtab[i].handler)();
|
||||
}
|
||||
}
|
||||
events_schedule();
|
||||
}
|
||||
currcycle += cycles_to_add;
|
||||
for (i = 0; i < ev_max; i++) {
|
||||
if (eventtab[i].active && eventtab[i].evtime == currcycle) {
|
||||
(*eventtab[i].handler)();
|
||||
}
|
||||
}
|
||||
events_schedule();
|
||||
}
|
||||
currcycle += cycles_to_add;
|
||||
}
|
||||
|
||||
void do_cycles_cpu_norm(unsigned long cycles_to_add)
|
||||
void do_cycles_cpu_norm (unsigned long cycles_to_add)
|
||||
{
|
||||
while ((nextevent - currcycle) <= cycles_to_add) {
|
||||
int i;
|
||||
while ((nextevent - currcycle) <= cycles_to_add) {
|
||||
int i;
|
||||
|
||||
cycles_to_add -= (nextevent - currcycle);
|
||||
currcycle = nextevent;
|
||||
cycles_to_add -= (nextevent - currcycle);
|
||||
currcycle = nextevent;
|
||||
|
||||
for (i = 0; i < ev_max; i++) {
|
||||
if (eventtab[i].active && eventtab[i].evtime == currcycle) {
|
||||
(*eventtab[i].handler)();
|
||||
}
|
||||
}
|
||||
events_schedule();
|
||||
}
|
||||
currcycle += cycles_to_add;
|
||||
for (i = 0; i < ev_max; i++) {
|
||||
if (eventtab[i].active && eventtab[i].evtime == currcycle) {
|
||||
(*eventtab[i].handler)();
|
||||
}
|
||||
}
|
||||
events_schedule();
|
||||
}
|
||||
currcycle += cycles_to_add;
|
||||
}
|
||||
|
||||
do_cycles_func do_cycles = do_cycles_cpu_norm;
|
||||
|
@ -96,40 +96,39 @@ do_cycles_func do_cycles = do_cycles_cpu_norm;
|
|||
void MISC_handler(void)
|
||||
{
|
||||
int i;
|
||||
evt mintime;
|
||||
evt ct = get_cycles();
|
||||
static int recursive;
|
||||
evt mintime;
|
||||
evt ct = get_cycles();
|
||||
static int recursive;
|
||||
|
||||
if (recursive) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
recursive++;
|
||||
eventtab[ev_misc].active = 0;
|
||||
recursive++;
|
||||
eventtab[ev_misc].active = 0;
|
||||
|
||||
mintime = ~0L;
|
||||
for (i = 0; i < ev2_max; i++) {
|
||||
if (eventtab2[i].active) {
|
||||
if (eventtab2[i].evtime == ct) {
|
||||
mintime = ~0L;
|
||||
for (i = 0; i < ev2_max; i++) {
|
||||
if (eventtab2[i].active) {
|
||||
if (eventtab2[i].evtime == ct) {
|
||||
eventtab2[i].active = false;
|
||||
eventtab2[i].handler(eventtab2[i].data);
|
||||
eventtab2[i].handler(eventtab2[i].data);
|
||||
if (eventtab2[i].active) {
|
||||
evt eventtime = eventtab2[i].evtime - ct;
|
||||
if (eventtime < mintime)
|
||||
mintime = eventtime;
|
||||
evt eventtime = eventtab2[i].evtime - ct;
|
||||
if (eventtime < mintime)
|
||||
mintime = eventtime;
|
||||
}
|
||||
}
|
||||
else {
|
||||
evt eventtime = eventtab2[i].evtime - ct;
|
||||
if (eventtime < mintime)
|
||||
mintime = eventtime;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
evt eventtime = eventtab2[i].evtime - ct;
|
||||
if (eventtime < mintime)
|
||||
mintime = eventtime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mintime != ~0UL) {
|
||||
if (mintime != ~0UL) {
|
||||
eventtab[ev_misc].active = true;
|
||||
eventtab[ev_misc].evtime = ct + mintime;
|
||||
events_schedule();
|
||||
}
|
||||
recursive--;
|
||||
eventtab[ev_misc].evtime = ct + mintime;
|
||||
events_schedule();
|
||||
}
|
||||
recursive--;
|
||||
}
|
||||
|
|
1053
src/expansion.cpp
1053
src/expansion.cpp
File diff suppressed because it is too large
Load diff
BIN
src/filesys
Normal file
BIN
src/filesys
Normal file
Binary file not shown.
8590
src/filesys.cpp
8590
src/filesys.cpp
File diff suppressed because it is too large
Load diff
14
src/filesys.sh
Normal file
14
src/filesys.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#! /bin/sh
|
||||
# Script to convert an Amiga executable named filesys into a series of
|
||||
# dw(...) statements.
|
||||
# This assumes that the first four lines only contain hunk information.
|
||||
#
|
||||
# Befehle auf der Amigaseite mit HD0:
|
||||
# DH0:
|
||||
# cd asm
|
||||
# PhxAss/PhxAss filesys.asm TO fs.out OPT 0
|
||||
# blink FROM fs.out TO filesys
|
||||
# delete fs.out
|
||||
#
|
||||
# That is what you get if you assemble/link with a68k/blink
|
||||
od -v -t xC -w8 filesys |tail -n +5 | sed -e "s,^.......,," -e "s,[0123456789abcdefABCDEF][0123456789abcdefABCDEF],db(0x&);,g" > filesys_bootrom.cpp
|
|
@ -45,7 +45,7 @@ TCHAR *nname_begin (TCHAR *nname)
|
|||
return nname;
|
||||
}
|
||||
|
||||
#ifndef _WIN32_
|
||||
#ifndef _WIN32
|
||||
/* Find the name REL in directory DIRNAME. If we find a file that
|
||||
* has exactly the same name, return REL. If we find a file that
|
||||
* has the same name when compared case-insensitively, return a
|
||||
|
|
|
@ -85,8 +85,9 @@ 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)
|
||||
#if defined(WIN32) || defined(ANDROIDSDL) || defined(RASPBERRY)
|
||||
// Always give execute & read permission
|
||||
// Temporary do this for raspberry...
|
||||
aino->amigaos_mode &= ~A_FIBF_EXECUTE;
|
||||
aino->amigaos_mode &= ~A_FIBF_READ;
|
||||
#endif
|
||||
|
|
|
@ -29,7 +29,7 @@ extern void deinit_socket_layer (void);
|
|||
|
||||
#define MAXADDRLEN 256
|
||||
|
||||
#ifdef _WIN32_
|
||||
#ifdef _WIN32
|
||||
#define SOCKET_TYPE SOCKET
|
||||
#else
|
||||
#define SOCKET_TYPE int
|
||||
|
@ -70,7 +70,7 @@ struct socketbase {
|
|||
|
||||
unsigned int *mtable; /* window messages allocated for asynchronous event notification */
|
||||
/* host-specific fields below */
|
||||
#ifdef _WIN32_
|
||||
#ifdef _WIN32
|
||||
SOCKET_TYPE sockAbort; /* for aborting WinSock2 select() (damn Microsoft) */
|
||||
SOCKET_TYPE sockAsync; /* for aborting WSBAsyncSelect() in window message handler */
|
||||
int needAbort; /* abort flag */
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
|
||||
extern int amiga_clipboard_want_data (void);
|
||||
extern void amiga_clipboard_got_data (uaecptr data, uae_u32 size, uae_u32 actual);
|
||||
extern void amiga_clipboard_die (void);
|
||||
extern void amiga_clipboard_init (void);
|
||||
extern uaecptr amiga_clipboard_proc_start (void);
|
||||
extern void amiga_clipboard_task_start (uaecptr);
|
||||
extern void clipboard_disable (bool);
|
||||
extern void clipboard_vsync (void);
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* NO Debugger
|
||||
*/
|
||||
|
||||
#ifndef DEBUG_H
|
||||
#define DEBUG_H
|
||||
|
||||
#if defined(DEBUG) && DEBUG
|
||||
#define DUNUSED(x)
|
||||
#else
|
||||
#define DUNUSED(x) ((void)x)
|
||||
#endif
|
||||
#ifndef UNUSED
|
||||
#define UNUSED(x) ((void)x)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* debug.h - Debugging utilities
|
||||
*
|
||||
* Basilisk II (C) 1997-2000 Christian Bauer
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define bug printf
|
||||
#define panicbug printf
|
||||
|
||||
#if defined(DEBUG) && DEBUG
|
||||
#define D(x) (x);
|
||||
#else
|
||||
#define D(x) ;
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG) && DEBUG > 1
|
||||
#define D2(x) (x);
|
||||
#else
|
||||
#define D2(x) ;
|
||||
#endif
|
||||
|
||||
#define infoprint bug
|
||||
#endif
|
|
@ -106,19 +106,11 @@ STATIC_INLINE uae_u16 CONVERT_RGB_16(uae_u32 c)
|
|||
return ret;
|
||||
}
|
||||
#else
|
||||
/* warning: this is still ugly, but now works with either byte order */
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define CONVERT_RGB(c) \
|
||||
( xbluecolors[((uae_u8*)(&c))[3]] | xgreencolors[((uae_u8*)(&c))[2]] | xredcolors[((uae_u8*)(&c))[1]] )
|
||||
# define CONVERT_RGB_16(c) \
|
||||
( xbluecolors[((uae_u8*)(&c))[3]] | xgreencolors[((uae_u8*)(&c))[2]] | xredcolors[((uae_u8*)(&c))[1]] )
|
||||
#else
|
||||
#define CONVERT_RGB(c) \
|
||||
( xbluecolors[((uae_u8*)(&c))[0]] | xgreencolors[((uae_u8*)(&c))[1]] | xredcolors[((uae_u8*)(&c))[2]] )
|
||||
#define CONVERT_RGB_16(c) \
|
||||
( xbluecolors[((uae_u8*)(&c))[0]] | xgreencolors[((uae_u8*)(&c))[1]] | xredcolors[((uae_u8*)(&c))[2]] )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
STATIC_INLINE xcolnr getxcolor (int c)
|
||||
{
|
||||
|
@ -240,7 +232,6 @@ extern int coord_native_to_amiga_y (int);
|
|||
extern int coord_native_to_amiga_x (int);
|
||||
|
||||
extern void hsync_record_line_state (int lineno);
|
||||
extern void partial_draw_frame(void);
|
||||
extern void halt_draw_frame(void);
|
||||
extern void vsync_handle_redraw (void);
|
||||
extern bool vsync_handle_check (void);
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
* UAE - The Un*x Amiga Emulator
|
||||
*
|
||||
* A "replacement" for a missing Kickstart
|
||||
*
|
||||
* (c) 1995 Bernd Schmidt
|
||||
*/
|
||||
|
||||
extern void init_ersatz_rom (uae_u8 *data);
|
||||
extern void ersatz_chipcopy (void);
|
||||
extern void ersatz_perform (uae_u16);
|
||||
extern void DISK_ersatz_read (int,int, uaecptr);
|
|
@ -1,64 +0,0 @@
|
|||
/*
|
||||
* UAE - The Un*x Amiga Emulator
|
||||
*
|
||||
* MC68881 emulation
|
||||
* Support functions for IEEE compatible host CPUs.
|
||||
* These functions use a GCC extension (type punning through unions) and
|
||||
* should only be compiled with compilers that support this.
|
||||
*
|
||||
* Copyright 1999 Sam Jordan
|
||||
*/
|
||||
|
||||
STATIC_INLINE double to_single (uae_u32 value)
|
||||
{
|
||||
union {
|
||||
float f;
|
||||
uae_u32 u;
|
||||
} val;
|
||||
|
||||
val.u = value;
|
||||
return val.f;
|
||||
}
|
||||
|
||||
STATIC_INLINE uae_u32 from_single (double src)
|
||||
{
|
||||
union {
|
||||
float f;
|
||||
uae_u32 u;
|
||||
} val;
|
||||
|
||||
val.f = src;
|
||||
return val.u;
|
||||
}
|
||||
|
||||
STATIC_INLINE double to_double(uae_u32 wrd1, uae_u32 wrd2)
|
||||
{
|
||||
union {
|
||||
double d;
|
||||
uae_u32 u[2];
|
||||
} val;
|
||||
|
||||
val.u[0] = wrd1;
|
||||
val.u[1] = wrd2;
|
||||
return val.d;
|
||||
}
|
||||
|
||||
STATIC_INLINE void from_double(double src, uae_u32 * wrd1, uae_u32 * wrd2)
|
||||
{
|
||||
union {
|
||||
double d;
|
||||
uae_u32 u[2];
|
||||
} val;
|
||||
|
||||
val.d = src;
|
||||
*wrd1 = val.u[0];
|
||||
*wrd2 = val.u[1];
|
||||
}
|
||||
|
||||
#define HAVE_from_double
|
||||
#define HAVE_to_double
|
||||
#define HAVE_from_single
|
||||
#define HAVE_to_single
|
||||
|
||||
/* Get the rest of the conversion functions defined. */
|
||||
#include "fpp-unknown.h"
|
|
@ -1,139 +0,0 @@
|
|||
/*
|
||||
* UAE - The Un*x Amiga Emulator
|
||||
*
|
||||
* MC68881 emulation
|
||||
*
|
||||
* Conversion routines for hosts with unknown floating point format.
|
||||
*
|
||||
* Copyright 1996 Herman ten Brugge
|
||||
*/
|
||||
|
||||
#ifndef HAVE_to_single
|
||||
STATIC_INLINE double to_single (uae_u32 value)
|
||||
{
|
||||
double frac;
|
||||
|
||||
if ((value & 0x7fffffff) == 0)
|
||||
return (0.0);
|
||||
frac = (double) ((value & 0x7fffff) | 0x800000) / 8388608.0;
|
||||
if (value & 0x80000000)
|
||||
frac = -frac;
|
||||
return (ldexp (frac, ((value >> 23) & 0xff) - 127));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_from_single
|
||||
STATIC_INLINE uae_u32 from_single (double src)
|
||||
{
|
||||
int expon;
|
||||
uae_u32 tmp;
|
||||
double frac;
|
||||
|
||||
if (src == 0.0)
|
||||
return 0;
|
||||
if (src < 0) {
|
||||
tmp = 0x80000000;
|
||||
src = -src;
|
||||
} else {
|
||||
tmp = 0;
|
||||
}
|
||||
frac = frexp (src, &expon);
|
||||
frac += 0.5 / 16777216.0;
|
||||
if (frac >= 1.0) {
|
||||
frac /= 2.0;
|
||||
expon++;
|
||||
}
|
||||
return (tmp | (((expon + 127 - 1) & 0xff) << 23) |
|
||||
(((int) (frac * 16777216.0)) & 0x7fffff));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_to_exten
|
||||
STATIC_INLINE double to_exten(uae_u32 wrd1, uae_u32 wrd2, uae_u32 wrd3)
|
||||
{
|
||||
double frac;
|
||||
|
||||
if ((wrd1 & 0x7fff0000) == 0 && wrd2 == 0 && wrd3 == 0)
|
||||
return 0.0;
|
||||
frac = (double) wrd2 / 2147483648.0 +
|
||||
(double) wrd3 / 9223372036854775808.0;
|
||||
if (wrd1 & 0x80000000)
|
||||
frac = -frac;
|
||||
return ldexp (frac, ((wrd1 >> 16) & 0x7fff) - 16383);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_from_exten
|
||||
STATIC_INLINE void from_exten(double src, uae_u32 * wrd1, uae_u32 * wrd2, uae_u32 * wrd3)
|
||||
{
|
||||
int expon;
|
||||
double frac;
|
||||
|
||||
if (src == 0.0) {
|
||||
*wrd1 = 0;
|
||||
*wrd2 = 0;
|
||||
*wrd3 = 0;
|
||||
return;
|
||||
}
|
||||
if (src < 0) {
|
||||
*wrd1 = 0x80000000;
|
||||
src = -src;
|
||||
} else {
|
||||
*wrd1 = 0;
|
||||
}
|
||||
frac = frexp (src, &expon);
|
||||
frac += 0.5 / 18446744073709551616.0;
|
||||
if (frac >= 1.0) {
|
||||
frac /= 2.0;
|
||||
expon++;
|
||||
}
|
||||
*wrd1 |= (((expon + 16383 - 1) & 0x7fff) << 16);
|
||||
*wrd2 = (uae_u32) (frac * 4294967296.0);
|
||||
*wrd3 = (uae_u32) (frac * 18446744073709551616.0 - *wrd2 * 4294967296.0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_to_double
|
||||
STATIC_INLINE double to_double(uae_u32 wrd1, uae_u32 wrd2)
|
||||
{
|
||||
double frac;
|
||||
|
||||
if ((wrd1 & 0x7fffffff) == 0 && wrd2 == 0)
|
||||
return 0.0;
|
||||
frac = (double) ((wrd1 & 0xfffff) | 0x100000) / 1048576.0 +
|
||||
(double) wrd2 / 4503599627370496.0;
|
||||
if (wrd1 & 0x80000000)
|
||||
frac = -frac;
|
||||
return ldexp (frac, ((wrd1 >> 20) & 0x7ff) - 1023);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_from_double
|
||||
STATIC_INLINE void from_double(double src, uae_u32 * wrd1, uae_u32 * wrd2)
|
||||
{
|
||||
int expon;
|
||||
int tmp;
|
||||
double frac;
|
||||
|
||||
if (src == 0.0) {
|
||||
*wrd1 = 0;
|
||||
*wrd2 = 0;
|
||||
return;
|
||||
}
|
||||
if (src < 0) {
|
||||
*wrd1 = 0x80000000;
|
||||
src = -src;
|
||||
} else {
|
||||
*wrd1 = 0;
|
||||
}
|
||||
frac = frexp (src, &expon);
|
||||
frac += 0.5 / 9007199254740992.0;
|
||||
if (frac >= 1.0) {
|
||||
frac /= 2.0;
|
||||
expon++;
|
||||
}
|
||||
tmp = (uae_u32) (frac * 2097152.0);
|
||||
*wrd1 |= (((expon + 1023 - 1) & 0x7ff) << 20) | (tmp & 0xfffff);
|
||||
*wrd2 = (uae_u32) (frac * 9007199254740992.0 - tmp * 4294967296.0);
|
||||
}
|
||||
#endif
|
|
@ -42,7 +42,8 @@ extern bool no_gui;
|
|||
#define LED_CPU 10
|
||||
#define LED_SND 11
|
||||
#define LED_MD 12
|
||||
#define LED_MAX 13
|
||||
#define LED_NET 13
|
||||
#define LED_MAX 14
|
||||
|
||||
struct gui_info
|
||||
{
|
||||
|
|
|
@ -42,8 +42,6 @@ struct strlist {
|
|||
#define MAX_INPUT_SUB_EVENT_ALL 9
|
||||
#define SPARE_SUB_EVENT 8
|
||||
|
||||
#define INTERNALEVENT_COUNT 1
|
||||
|
||||
struct uae_input_device {
|
||||
TCHAR *name;
|
||||
TCHAR *configname;
|
||||
|
@ -290,11 +288,9 @@ struct uae_prefs
|
|||
int sound_stereo_separation;
|
||||
int sound_mixed_stereo_delay;
|
||||
int sound_freq;
|
||||
int sound_maxbsiz;
|
||||
int sound_interpol;
|
||||
int sound_filter;
|
||||
int sound_filter_type;
|
||||
int sound_volume;
|
||||
int sound_volume_cd;
|
||||
|
||||
int cachesize;
|
||||
|
@ -416,7 +412,15 @@ struct uae_prefs
|
|||
TCHAR quit_amiberry[256];
|
||||
#endif
|
||||
|
||||
int statecapturerate, statecapturebuffersize;
|
||||
#ifdef PANDORA
|
||||
int pandora_vertical_offset;
|
||||
int pandora_cpu_speed;
|
||||
int pandora_hide_idle_led;
|
||||
|
||||
int pandora_tapDelay;
|
||||
int pandora_customControls;
|
||||
#endif
|
||||
|
||||
|
||||
/* input */
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/*
|
||||
* UAE - The Un*x Amiga Emulator
|
||||
*
|
||||
* OS emulation prototypes
|
||||
*
|
||||
* Copyright 1996 Bernd Schmidt
|
||||
*/
|
||||
|
||||
STATIC_INLINE char *raddr(uaecptr p)
|
||||
{
|
||||
return p == 0 ? NULL : (char *)get_real_address(p);
|
||||
}
|
||||
|
||||
extern void gfxlib_install(void);
|
||||
|
||||
/* graphics.library */
|
||||
|
||||
extern int GFX_WritePixel(uaecptr rp, int x, int y);
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
* UAE - The Un*x Amiga Emulator
|
||||
*
|
||||
* a SCSI device
|
||||
*
|
||||
* (c) 1995 Bernd Schmidt (hardfile.c)
|
||||
* (c) 1999 Patrick Ohly
|
||||
* (c) 2001-2005 Toni Wilen
|
||||
*/
|
||||
|
||||
uaecptr scsidev_startup (uaecptr resaddr);
|
||||
void scsidev_install (void);
|
||||
void scsidev_reset (void);
|
||||
void scsidev_start_threads (void);
|
||||
int scsi_do_disk_change (int unitnum, int insert, int *pollmode);
|
||||
int scsi_do_disk_device_change (void);
|
||||
uae_u32 scsi_get_cd_drive_mask (void);
|
||||
uae_u32 scsi_get_cd_drive_media_mask (void);
|
||||
|
||||
extern int log_scsi;
|
||||
|
||||
#ifdef _WIN32_
|
||||
#define UAESCSI_CDEMU 0
|
||||
#define UAESCSI_SPTI 1
|
||||
#define UAESCSI_SPTISCAN 2
|
||||
#define UAESCSI_LAST 2
|
||||
#endif
|
|
@ -205,6 +205,7 @@ extern TCHAR *au_fs_copy(TCHAR *dst, int maxlen, const char *src);
|
|||
extern char *uutf8(const TCHAR *s);
|
||||
extern TCHAR *utf8u(const char *s);
|
||||
extern void to_lower(TCHAR *s, int len);
|
||||
extern void to_upper (TCHAR *s, int len);
|
||||
|
||||
/* We can only rely on GNU C getting enums right. Mickeysoft VSC++ is known
|
||||
* to have problems, and it's likely that other compilers choke too. */
|
||||
|
@ -361,7 +362,11 @@ extern void gui_message(const TCHAR *, ...);
|
|||
#endif
|
||||
|
||||
#ifndef STATIC_INLINE
|
||||
#if __GNUC__ - 1 > 1 && __GNUC_MINOR__ - 1 >= 0
|
||||
#ifdef DEBUG
|
||||
#define STATIC_INLINE static __attribute__ ((noinline))
|
||||
#define NOINLINE __attribute__ ((noinline))
|
||||
#define NORETURN
|
||||
#elif __GNUC__ - 1 > 1 && __GNUC_MINOR__ - 1 >= 0
|
||||
#ifdef AMIBERRY
|
||||
#define STATIC_INLINE static __inline__
|
||||
#else
|
||||
|
@ -408,14 +413,7 @@ extern void gui_message(const TCHAR *, ...);
|
|||
* Byte-swapping functions
|
||||
*/
|
||||
|
||||
/* Try to use system bswap_16/bswap_32 functions. */
|
||||
#if defined HAVE_BSWAP_16 && defined HAVE_BSWAP_32
|
||||
# include <byteswap.h>
|
||||
# ifdef HAVE_BYTESWAP_H
|
||||
# include <byteswap.h>
|
||||
# endif
|
||||
#else
|
||||
# ifdef ARMV6_ASSEMBLY
|
||||
#ifdef ARMV6_ASSEMBLY
|
||||
STATIC_INLINE uae_u32 do_byteswap_32(uae_u32 v) {
|
||||
__asm__(
|
||||
"rev %0, %0"
|
||||
|
@ -430,6 +428,14 @@ STATIC_INLINE uae_u32 do_byteswap_16(uae_u32 v) {
|
|||
}
|
||||
#define bswap_16(x) do_byteswap_16(x)
|
||||
#define bswap_32(x) do_byteswap_32(x)
|
||||
#else
|
||||
|
||||
/* Try to use system bswap_16/bswap_32 functions. */
|
||||
#if defined HAVE_BSWAP_16 && defined HAVE_BSWAP_32
|
||||
# include <byteswap.h>
|
||||
# ifdef HAVE_BYTESWAP_H
|
||||
# include <byteswap.h>
|
||||
# endif
|
||||
# else
|
||||
/* Else, if using SDL, try SDL's endian functions. */
|
||||
# ifdef USE_SDL
|
||||
|
|
|
@ -65,20 +65,6 @@ extern unsigned int doMask256(int p, int bits, int shift);
|
|||
extern void alloc_colors64k(int, int, int, int, int, int, int);
|
||||
extern void alloc_colors_picasso(int rw, int gw, int bw, int rs, int gs, int bs, int rgbfmt);
|
||||
|
||||
/* The graphics code has a choice whether it wants to use a large buffer
|
||||
* for the whole display, or only a small buffer for a single line.
|
||||
* If you use a large buffer:
|
||||
* - set bufmem to point at it
|
||||
* - set linemem to 0
|
||||
* - if memcpy within bufmem would be very slow, i.e. because bufmem is
|
||||
* in graphics card memory, also set emergmem to point to a buffer
|
||||
* that is large enough to hold a single line.
|
||||
* - implement flush_line to be a no-op.
|
||||
* If you use a single line buffer:
|
||||
* - set bufmem and emergmem to 0
|
||||
* - set linemem to point at your buffer
|
||||
* - implement flush_line to copy a single line to the screen
|
||||
*/
|
||||
struct vidbuffer
|
||||
{
|
||||
uae_u8 *bufmem;
|
||||
|
|
|
@ -163,6 +163,7 @@ DEFEVENT(KEY_TAB,_T("Tab"),AM_K,0,0,AK_TAB)
|
|||
DEFEVENT(KEY_CTRL,_T("CTRL"),AM_K,0,0,AK_CTRL)
|
||||
DEFEVENT(KEY_CAPS_LOCK,_T("Caps Lock"),AM_K,0,0,AK_CAPSLOCK)
|
||||
DEFEVENT(KEY_SHIFT_LEFT,_T("Left Shift"),AM_K,0,0,AK_LSH)
|
||||
DEFEVENT(KEY_LTGT,_T("Lower Greater"),AM_K,0,0,AK_LTGT)
|
||||
DEFEVENT(KEY_ALT_LEFT,_T("Left Alt"),AM_K,0,0,AK_LALT)
|
||||
DEFEVENT(KEY_AMIGA_LEFT,_T("Left Amiga"),AM_K,0,0,AK_LAMI)
|
||||
DEFEVENT(KEY_AMIGA_RIGHT,_T("Right Amiga"),AM_K,0,0,AK_RAMI)
|
||||
|
|
|
@ -168,7 +168,7 @@ static blockinfo* hold_bi[MAX_HOLD_BI];
|
|||
blockinfo* active;
|
||||
blockinfo* dormant;
|
||||
|
||||
#ifdef AMIBERRY
|
||||
#ifndef WIN32
|
||||
#include <sys/mman.h>
|
||||
|
||||
void cache_free (uae_u8 *cache, int size)
|
||||
|
|
|
@ -1,131 +0,0 @@
|
|||
/*
|
||||
* UAE - The Un*x Amiga Emulator
|
||||
*
|
||||
* MC68881 emulation
|
||||
* Support functions for IEEE 754-compatible host CPUs.
|
||||
* These functions use a GCC extension (type punning through unions) and
|
||||
* should only be compiled with compilers that support this.
|
||||
*
|
||||
* Copyright 1999 Sam Jordan
|
||||
* Copyright 2007 Richard Drummond
|
||||
*/
|
||||
|
||||
#define FPCR_ROUNDING_MODE 0x00000030
|
||||
#define FPCR_ROUND_NEAR 0x00000000
|
||||
#define FPCR_ROUND_ZERO 0x00000010
|
||||
#define FPCR_ROUND_MINF 0x00000020
|
||||
#define FPCR_ROUND_PINF 0x00000030
|
||||
|
||||
#define FPCR_ROUNDING_PRECISION 0x000000c0
|
||||
#define FPCR_PRECISION_SINGLE 0x00000040
|
||||
#define FPCR_PRECISION_DOUBLE 0x00000080
|
||||
#define FPCR_PRECISION_EXTENDED 0x00000000
|
||||
|
||||
STATIC_INLINE void exten_zeronormalize(uae_u32 *pwrd1, uae_u32 *pwrd2, uae_u32 *pwrd3)
|
||||
{
|
||||
uae_u32 wrd1 = *pwrd1;
|
||||
uae_u32 wrd2 = *pwrd2;
|
||||
uae_u32 wrd3 = *pwrd3;
|
||||
int exp = (wrd1 >> 16) & 0x7fff;
|
||||
// Force zero if mantissa is zero but exponent is non-zero
|
||||
// M68k FPU automatically convert them to plain zeros.
|
||||
// x86 FPU considers them invalid values
|
||||
if (exp != 0 && exp != 0x7fff && !wrd2 && !wrd3) {
|
||||
*pwrd1 = (wrd1 & 0x80000000);
|
||||
}
|
||||
}
|
||||
|
||||
STATIC_INLINE double to_single (uae_u32 value)
|
||||
{
|
||||
union {
|
||||
float f;
|
||||
uae_u32 u;
|
||||
} val;
|
||||
|
||||
val.u = value;
|
||||
return val.f;
|
||||
}
|
||||
|
||||
STATIC_INLINE uae_u32 from_single (double src)
|
||||
{
|
||||
union {
|
||||
float f;
|
||||
uae_u32 u;
|
||||
} val;
|
||||
|
||||
val.f = (float) src;
|
||||
return val.u;
|
||||
}
|
||||
|
||||
STATIC_INLINE double to_double (uae_u32 wrd1, uae_u32 wrd2)
|
||||
{
|
||||
union {
|
||||
double d;
|
||||
uae_u32 u[2];
|
||||
} val;
|
||||
|
||||
val.u[0] = wrd2; // little endian
|
||||
val.u[1] = wrd1;
|
||||
return val.d;
|
||||
}
|
||||
|
||||
STATIC_INLINE void from_double (double src, uae_u32 * wrd1, uae_u32 * wrd2)
|
||||
{
|
||||
uae_u32 *longarray = (uae_u32 *)&src;
|
||||
|
||||
*wrd1 = longarray[1]; // little endian
|
||||
*wrd2 = longarray[0];
|
||||
}
|
||||
|
||||
static const double twoto32 = 4294967296.0;
|
||||
STATIC_INLINE void to_exten(fpdata *fpd, uae_u32 wrd1, uae_u32 wrd2, uae_u32 wrd3)
|
||||
{
|
||||
double frac;
|
||||
|
||||
exten_zeronormalize(&wrd1, &wrd2, &wrd3);
|
||||
if ((wrd1 & 0x7fff0000) == 0 && wrd2 == 0 && wrd3 == 0) {
|
||||
fpd->fp = (wrd1 & 0x80000000) ? -0.0 : +0.0;
|
||||
return;
|
||||
}
|
||||
frac = ((double)wrd2 + ((double)wrd3 / twoto32)) / 2147483648.0;
|
||||
if (wrd1 & 0x80000000)
|
||||
frac = -frac;
|
||||
fpd->fp = ldexp (frac, ((wrd1 >> 16) & 0x7fff) - 16383);
|
||||
}
|
||||
|
||||
STATIC_INLINE void from_exten(fpdata *fpd, uae_u32 * wrd1, uae_u32 * wrd2, uae_u32 * wrd3)
|
||||
{
|
||||
int expon;
|
||||
double frac;
|
||||
fptype v;
|
||||
|
||||
v = fpd->fp;
|
||||
if (v == 0.0) {
|
||||
*wrd1 = signbit(v) ? 0x80000000 : 0;
|
||||
*wrd2 = 0;
|
||||
*wrd3 = 0;
|
||||
return;
|
||||
}
|
||||
if (v < 0) {
|
||||
*wrd1 = 0x80000000;
|
||||
v = -v;
|
||||
} else {
|
||||
*wrd1 = 0;
|
||||
}
|
||||
frac = frexp (v, &expon);
|
||||
frac += 0.5 / (twoto32 * twoto32);
|
||||
if (frac >= 1.0) {
|
||||
frac /= 2.0;
|
||||
expon++;
|
||||
}
|
||||
*wrd1 |= (((expon + 16383 - 1) & 0x7fff) << 16);
|
||||
*wrd2 = (uae_u32) (frac * twoto32);
|
||||
*wrd3 = (uae_u32) ((frac * twoto32 - *wrd2) * twoto32);
|
||||
}
|
||||
|
||||
#define HAVE_from_double
|
||||
#define HAVE_to_double
|
||||
#define HAVE_from_exten
|
||||
#define HAVE_to_exten
|
||||
#define HAVE_from_single
|
||||
#define HAVE_to_single
|
32
src/main.cpp
32
src/main.cpp
|
@ -472,7 +472,34 @@ static TCHAR *parsetextpath(const TCHAR *s)
|
|||
return s3;
|
||||
}
|
||||
|
||||
static void parse_cmdline(int argc, TCHAR **argv)
|
||||
void print_usage()
|
||||
{
|
||||
printf("\nUsage:\n");
|
||||
printf(" -f <file> Load a configuration file.\n");
|
||||
printf(" -config=<file> Load a configuration file.\n");
|
||||
printf(" -statefile=<file> Load a save state file.\n");
|
||||
printf(" -s <config param>=<value> Set the configuration parameter with value.\n");
|
||||
printf(" Edit a configuration file in order to know valid parameters and settings.\n");
|
||||
printf("\nAdditional options:\n");
|
||||
printf(" -0 <filename> Set adf for drive 0.\n");
|
||||
printf(" -1 <filename> Set adf for drive 1.\n");
|
||||
printf(" -2 <filename> Set adf for drive 2.\n");
|
||||
printf(" -3 <filename> Set adf for drive 3.\n");
|
||||
printf(" -r <filename> Set kickstart rom file.\n");
|
||||
printf(" -G Start directly into emulation.\n");
|
||||
printf(" -c <value> Size of chip memory (in number of 512 KBytes chunks).\n");
|
||||
printf(" -F <value> Size of fast memory (in number of 1024 KBytes chunks).\n");
|
||||
printf("\nNote:\n");
|
||||
printf("Parameters are parsed from the beginning of command line, so in case of ambiguity for parameters, last one will be used.\n");
|
||||
printf("File names should be with absolute path.\n");
|
||||
printf("\nExample:\n");
|
||||
printf("uae4arm -config=conf/A500.uae -statefile=savestates/game.uss -s use_gui=no\n");
|
||||
printf("It will load A500.uae configuration with the save state named game.\n");
|
||||
printf("It will override use_gui to 'no' so that it enters emulation directly.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static void parse_cmdline (int argc, TCHAR **argv)
|
||||
{
|
||||
static bool started;
|
||||
bool firstconfig = true;
|
||||
|
@ -715,6 +742,9 @@ static int real_main2 (int argc, TCHAR **argv)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef PANDORA
|
||||
setCpuSpeed();
|
||||
#endif
|
||||
update_display(&currprefs);
|
||||
}
|
||||
memset(&gui_data, 0, sizeof gui_data);
|
||||
|
|
|
@ -41,6 +41,7 @@ extern FILE *debugfile;
|
|||
int quickstart_start = 1;
|
||||
int quickstart_model = 0;
|
||||
int quickstart_conf = 0;
|
||||
bool host_poweroff = false;
|
||||
|
||||
extern void signal_segv(int signum, siginfo_t* info, void*ptr);
|
||||
extern void signal_buserror(int signum, siginfo_t* info, void*ptr);
|
||||
|
@ -714,9 +715,17 @@ uae_u32 emulib_target_getcpurate(uae_u32 v, uae_u32 *low)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void target_shutdown(void)
|
||||
{
|
||||
system("sudo poweroff");
|
||||
}
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
struct sigaction action;
|
||||
|
||||
#ifdef AMIBERRY
|
||||
printf("Amiberry-SDL2 v2.5b, by Dimitris (MiDWaN) Panokostas and TomB\n");
|
||||
#endif
|
||||
max_uae_width = 1920;
|
||||
max_uae_height = 1080;
|
||||
|
||||
|
@ -762,7 +771,6 @@ int main(int argc, char* argv[])
|
|||
|
||||
alloc_AmigaMem();
|
||||
RescanROMs();
|
||||
keyboard_settrans();
|
||||
|
||||
#ifdef CAPSLOCK_DEBIAN_WORKAROUND
|
||||
// set capslock state based upon current "real" state
|
||||
|
@ -800,6 +808,8 @@ int main(int argc, char* argv[])
|
|||
|
||||
logging_cleanup();
|
||||
|
||||
if(host_poweroff)
|
||||
target_shutdown();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -823,6 +833,11 @@ int handle_msgpump()
|
|||
int got = 0;
|
||||
SDL_Event rEvent;
|
||||
int keycode;
|
||||
if(delayed_mousebutton) {
|
||||
--delayed_mousebutton;
|
||||
if(delayed_mousebutton == 0)
|
||||
setmousebuttonstate (0, 0, 1);
|
||||
}
|
||||
|
||||
if (currprefs.customControls)
|
||||
PopulateCustomControlMap();
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include "SDL.h"
|
||||
#include <SDL.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
|
@ -11,6 +11,9 @@
|
|||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "uae.h"
|
||||
#include "autoconf.h"
|
||||
#include "filesys.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
|
@ -11,6 +11,8 @@
|
|||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "memory.h"
|
||||
#include "uae.h"
|
||||
#include "autoconf.h"
|
||||
#include "filesys.h"
|
||||
#include "gui.h"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
|
@ -11,6 +11,8 @@
|
|||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "memory.h"
|
||||
#include "uae.h"
|
||||
#include "autoconf.h"
|
||||
#include "filesys.h"
|
||||
#include "gui.h"
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "custom.h"
|
||||
#include "xwin.h"
|
||||
#include "drawing.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
#include "amiberry_gfx.h"
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#include <guisan.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
typedef struct
|
||||
|
@ -42,62 +42,62 @@ static NavigationMap navMap[] =
|
|||
{ "Help", "Quit", "Start", "Savestates", "Paths" },
|
||||
{"Start", "Quit", "Reset", "Savestates", "Paths"},
|
||||
|
||||
// PanelPaths
|
||||
{"SystemROMs", "Paths", "Paths", "RescanROMs", "ConfigPath"},
|
||||
{"ConfigPath", "Paths", "Paths", "SystemROMs", "RescanROMs"},
|
||||
{"RescanROMs", "Paths", "Paths", "ConfigPath", "SystemROMs"},
|
||||
// PanelPaths
|
||||
{ "SystemROMs", "Paths", "Paths", "RescanROMs", "ConfigPath" },
|
||||
{ "ConfigPath", "Paths", "Paths", "SystemROMs", "RescanROMs" },
|
||||
{ "RescanROMs", "Paths", "Paths", "ConfigPath", "SystemROMs" },
|
||||
|
||||
// active move left move right move up move down
|
||||
// PanelQuickstart
|
||||
{ "AModel", "Quickstart", "qsNTSC", "qsMode", "AConfig" },
|
||||
{ "qsNTSC", "AModel", "Quickstart", "qsMode", "AConfig" },
|
||||
{ "AConfig", "Quickstart", "Quickstart", "AModel", "qscmdSel0" },
|
||||
{ "qsDF0", "Quickstart", "qsWP0", "AConfig", "qscboDisk0" },
|
||||
{ "qsWP0", "qsDF0", "qscmdEject0", "AConfig", "qscboDisk0" },
|
||||
// { "qsInfo0", "Quickstart", "", "", "" },
|
||||
{ "qscmdEject0", "qsWP0", "qscmdSel0", "AConfig", "qscboDisk0" },
|
||||
{ "qscmdSel0", "qscmdEject0", "Quickstart", "AConfig", "qscboDisk0" },
|
||||
{ "qscboDisk0", "Quickstart", "Quickstart", "qscmdSel0", "qscmdSel1" },
|
||||
{ "qsDF1", "Quickstart", "qsWP1", "qscboDisk0", "qscboDisk1" },
|
||||
{ "qsWP1", "qsDF1", "qscmdEject1", "qscboDisk0", "qscboDisk1" },
|
||||
// { "qsInfo1", "Quickstart", "", "", "" },
|
||||
{ "qscmdEject1", "qsWP1", "qscmdSel1", "qscboDisk0", "qscboDisk1" },
|
||||
{ "qscmdSel1", "qscmdEject1", "Quickstart", "qscboDisk0", "qscboDisk1" },
|
||||
{ "qscboDisk1", "Quickstart", "Quickstart", "qsDF1", "qsCDSelect" },
|
||||
{ "qsCD drive", "Quickstart", "qscdEject", "qscboDisk1", "qscboCD" },
|
||||
{ "qscdEject", "qsCD drive", "qsCDSelect", "qscboDisk1", "qscboCD" },
|
||||
{ "qsCDSelect", "qscdEject", "Quickstart", "qscboDisk1", "qscboCD" },
|
||||
{ "qscboCD", "Quickstart", "Quickstart", "qsCDSelect", "qsMode" },
|
||||
{ "qsMode", "Quickstart", "Quickstart", "qscboCD", "qsNTSC" },
|
||||
// active move left move right move up move down
|
||||
// PanelQuickstart
|
||||
{ "AModel", "Quickstart", "qsNTSC", "qsMode", "AConfig" },
|
||||
{ "qsNTSC", "AModel", "Quickstart", "qsMode", "AConfig" },
|
||||
{ "AConfig", "Quickstart", "Quickstart", "AModel", "qscmdSel0" },
|
||||
{ "qsDF0", "Quickstart", "qsWP0", "AConfig", "qscboDisk0" },
|
||||
{ "qsWP0", "qsDF0", "qscmdEject0", "AConfig", "qscboDisk0" },
|
||||
// { "qsInfo0", "Quickstart", "", "", "" },
|
||||
{ "qscmdEject0", "qsWP0", "qscmdSel0", "AConfig", "qscboDisk0" },
|
||||
{ "qscmdSel0", "qscmdEject0", "Quickstart", "AConfig", "qscboDisk0" },
|
||||
{ "qscboDisk0", "Quickstart", "Quickstart", "qscmdSel0", "qscmdSel1" },
|
||||
{ "qsDF1", "Quickstart", "qsWP1", "qscboDisk0", "qscboDisk1" },
|
||||
{ "qsWP1", "qsDF1", "qscmdEject1", "qscboDisk0", "qscboDisk1" },
|
||||
// { "qsInfo1", "Quickstart", "", "", "" },
|
||||
{ "qscmdEject1", "qsWP1", "qscmdSel1", "qscboDisk0", "qscboDisk1" },
|
||||
{ "qscmdSel1", "qscmdEject1", "Quickstart", "qscboDisk0", "qscboDisk1" },
|
||||
{ "qscboDisk1", "Quickstart", "Quickstart", "qsDF1", "qsCDSelect" },
|
||||
{ "qsCD drive", "Quickstart", "qscdEject", "qscboDisk1", "qscboCD" },
|
||||
{ "qscdEject", "qsCD drive", "qsCDSelect", "qscboDisk1", "qscboCD" },
|
||||
{ "qsCDSelect", "qscdEject", "Quickstart", "qscboDisk1", "qscboCD" },
|
||||
{ "qscboCD", "Quickstart", "Quickstart", "qsCDSelect", "qsMode" },
|
||||
{ "qsMode", "Quickstart", "Quickstart", "qscboCD", "qsNTSC" },
|
||||
|
||||
// PanelConfig
|
||||
{"ConfigList", "Configurations", "ConfigName", "", ""},
|
||||
{"ConfigName", "Configurations", "Configurations", "ConfigList", "ConfigDesc"},
|
||||
{"ConfigDesc", "Configurations", "Configurations", "ConfigName", "ConfigLoad"},
|
||||
{"ConfigLoad", "Configurations", "ConfigSave", "ConfigDesc", "ConfigList"},
|
||||
{"ConfigSave", "ConfigLoad", "CfgDelete", "ConfigDesc", "ConfigList"},
|
||||
{"CfgDelete", "ConfigSave", "Configurations", "ConfigDesc", "ConfigList"},
|
||||
// PanelConfig
|
||||
{ "ConfigList", "Configurations", "ConfigName", "", "" },
|
||||
{ "ConfigName", "Configurations", "Configurations", "ConfigList", "ConfigDesc" },
|
||||
{ "ConfigDesc", "Configurations", "Configurations", "ConfigName", "ConfigLoad" },
|
||||
{ "ConfigLoad", "Configurations", "ConfigSave", "ConfigDesc", "ConfigList" },
|
||||
{ "ConfigSave", "ConfigLoad", "CfgDelete", "ConfigDesc", "ConfigList" },
|
||||
{ "CfgDelete", "ConfigSave", "Configurations", "ConfigDesc", "ConfigList" },
|
||||
|
||||
// active move left move right move up move down
|
||||
// PanelCPU
|
||||
{ "68000", "CPU and FPU", "FPUnone", "JIT", "68010" },
|
||||
{ "68010", "CPU and FPU", "68881", "68000", "68020" },
|
||||
{ "68020", "CPU and FPU", "68882", "68010", "68030" },
|
||||
{ "68030", "CPU and FPU", "CPU internal", "68020", "68040" },
|
||||
{ "68040", "CPU and FPU", "FPUstrict", "68030", "CPU24Bit" },
|
||||
{ "CPU24Bit", "CPU and FPU", "SoftFloat", "68040", "CPUComp" },
|
||||
{ "CPUComp", "CPU and FPU", "SoftFloat", "CPU24Bit", "JIT" },
|
||||
{ "JIT", "CPU and FPU", "SoftFloat", "CPUComp", "68000" },
|
||||
{ "FPUnone", "68000", "7 Mhz", "SoftFloat", "68881" },
|
||||
{ "68881", "68010", "14 Mhz", "FPUnone", "68882" },
|
||||
{ "68882", "68020", "25 Mhz", "68881", "CPU internal" },
|
||||
{ "CPU internal", "68030", "Fastest", "68882", "FPUstrict" },
|
||||
{ "FPUstrict", "68040", "Fastest", "CPU internal", "SoftFloat" },
|
||||
{ "SoftFloat", "CPU24Bit", "Fastest", "FPUstrict", "FPUnone" },
|
||||
{ "7 Mhz", "FPUnone", "CPU and FPU", "Fastest", "14 Mhz" },
|
||||
{ "14 Mhz", "68881", "CPU and FPU", "7 Mhz", "25 Mhz" },
|
||||
{ "25 Mhz", "68882", "CPU and FPU", "14 Mhz", "Fastest" },
|
||||
{ "Fastest", "CPU internal", "CPU and FPU", "25 Mhz", "7 Mhz" },
|
||||
// active move left move right move up move down
|
||||
// PanelCPU
|
||||
{ "68000", "CPU and FPU", "FPUnone", "JIT", "68010" },
|
||||
{ "68010", "CPU and FPU", "68881", "68000", "68020" },
|
||||
{ "68020", "CPU and FPU", "68882", "68010", "68030" },
|
||||
{ "68030", "CPU and FPU", "CPU internal", "68020", "68040" },
|
||||
{ "68040", "CPU and FPU", "FPUstrict", "68030", "CPU24Bit" },
|
||||
{ "CPU24Bit", "CPU and FPU", "SoftFloat", "68040", "CPUComp" },
|
||||
{ "CPUComp", "CPU and FPU", "SoftFloat", "CPU24Bit", "JIT" },
|
||||
{ "JIT", "CPU and FPU", "SoftFloat", "CPUComp", "68000" },
|
||||
{ "FPUnone", "68000", "7 Mhz", "SoftFloat", "68881" },
|
||||
{ "68881", "68010", "14 Mhz", "FPUnone", "68882" },
|
||||
{ "68882", "68020", "25 Mhz", "68881", "CPU internal" },
|
||||
{ "CPU internal", "68030", "Fastest", "68882", "FPUstrict" },
|
||||
{ "FPUstrict", "68040", "Fastest", "CPU internal", "SoftFloat" },
|
||||
{ "SoftFloat", "CPU24Bit", "Fastest", "FPUstrict", "FPUnone" },
|
||||
{ "7 Mhz", "FPUnone", "CPU and FPU", "Fastest", "14 Mhz" },
|
||||
{ "14 Mhz", "68881", "CPU and FPU", "7 Mhz", "25 Mhz" },
|
||||
{ "25 Mhz", "68882", "CPU and FPU", "14 Mhz", "Fastest" },
|
||||
{ "Fastest", "CPU internal", "CPU and FPU", "25 Mhz", "7 Mhz" },
|
||||
|
||||
// PanelChipset
|
||||
{"OCS", "Chipset", "BlitNormal", "CollFull", "ECS Agnus"},
|
||||
|
@ -113,57 +113,57 @@ static NavigationMap navMap[] =
|
|||
{"CollPlay", "Chipset", "Chipset", "Sprites only", "CollFull"},
|
||||
{"CollFull", "Chipset", "Chipset", "CollPlay", "OCS"},
|
||||
|
||||
// active move left move right move up move down
|
||||
// PanelROM
|
||||
// active move left move right move up move down
|
||||
// PanelROM
|
||||
#ifdef ACTION_REPLAY
|
||||
{ "cboMainROM", "ROM", "MainROM", "cboCartROM", "cboExtROM" },
|
||||
{ "MainROM", "cboMainROM", "ROM", "CartROM", "ExtROM" },
|
||||
{ "cboExtROM", "ROM", "ExtROM", "cboMainROM", "cboCartROM" },
|
||||
{ "ExtROM", "cboExtROM", "ROM", "MainROM", "CartROM" },
|
||||
{ "cboCartROM", "ROM", "CartROM", "cboExtROM", "cboMainROM" },
|
||||
{ "CartROM", "cboCartROM", "ROM", "ExtROM", "MainROM" },
|
||||
{ "cboMainROM", "ROM", "MainROM", "cboCartROM", "cboExtROM" },
|
||||
{ "MainROM", "cboMainROM", "ROM", "CartROM", "ExtROM" },
|
||||
{ "cboExtROM", "ROM", "ExtROM", "cboMainROM", "cboCartROM" },
|
||||
{ "ExtROM", "cboExtROM", "ROM", "MainROM", "CartROM" },
|
||||
{ "cboCartROM", "ROM", "CartROM", "cboExtROM", "cboMainROM" },
|
||||
{ "CartROM", "cboCartROM", "ROM", "ExtROM", "MainROM" },
|
||||
#else
|
||||
{ "cboMainROM", "ROM", "MainROM", "cboExtROM", "cboExtROM" },
|
||||
{ "MainROM", "cboMainROM", "ROM", "ExtROM", "ExtROM" },
|
||||
{ "cboExtROM", "ROM", "ExtROM", "cboMainROM", "cboMainROM" },
|
||||
{ "ExtROM", "cboExtROM", "ROM", "MainROM", "MainROM" },
|
||||
{ "cboMainROM", "ROM", "MainROM", "cboExtROM", "cboExtROM" },
|
||||
{ "MainROM", "cboMainROM", "ROM", "ExtROM", "ExtROM" },
|
||||
{ "cboExtROM", "ROM", "ExtROM", "cboMainROM", "cboMainROM" },
|
||||
{ "ExtROM", "cboExtROM", "ROM", "MainROM", "MainROM" },
|
||||
#endif
|
||||
|
||||
//PanelRAM
|
||||
{ "Chipmem", "", "", "RAM", "Slowmem" },
|
||||
{ "Slowmem", "", "", "Chipmem", "Fastmem" },
|
||||
{ "Fastmem", "", "", "Slowmem", "Z3mem" },
|
||||
{ "Z3mem", "", "", "Fastmem", "Gfxmem" },
|
||||
{ "Gfxmem", "", "", "Z3mem", "A3000Low" },
|
||||
{ "A3000Low", "", "", "Gfxmem", "A3000High" },
|
||||
{ "A3000High", "", "", "A3000Low", "RAM" },
|
||||
//PanelRAM
|
||||
{ "Chipmem", "", "", "RAM", "Slowmem" },
|
||||
{ "Slowmem", "", "", "Chipmem", "Fastmem" },
|
||||
{ "Fastmem", "", "", "Slowmem", "Z3mem" },
|
||||
{ "Z3mem", "", "", "Fastmem", "Gfxmem" },
|
||||
{ "Gfxmem", "", "", "Z3mem", "A3000Low" },
|
||||
{ "A3000Low", "", "", "Gfxmem", "A3000High" },
|
||||
{ "A3000High", "", "", "A3000Low", "RAM" },
|
||||
|
||||
//PanelFloppy
|
||||
{"DF0:", "Floppy drives", "cboType0", "SaveForDisk", "cboDisk0"},
|
||||
{"cboType0", "DF0:", "cmdEject0", "SaveForDisk", "cboDisk0"},
|
||||
{"cmdEject0", "cboType0", "cmdSel0", "CreateHD", "cboDisk0"},
|
||||
{"cmdSel0", "cmdEject0", "Floppy drives", "CreateHD", "cboDisk0"},
|
||||
{"cboDisk0", "Floppy drives", "Floppy drives", "DF0:", "LoadDiskCfg"},
|
||||
{"LoadDiskCfg", "Floppy drives", "Floppy drives", "cboDisk0", "DF1:"},
|
||||
{"DF1:", "Floppy drives", "cboType1", "LoadDiskCfg", "cboDisk1"},
|
||||
{"cboType1", "DF1:", "cmdEject1", "LoadDiskCfg", "cboDisk1"},
|
||||
{"cmdEject1", "cboType1", "cmdSel1", "LoadDiskCfg", "cboDisk1"},
|
||||
{"cmdSel1", "cmdEject1", "Floppy drives", "LoadDiskCfg", "cboDisk1"},
|
||||
{"cboDisk1", "Floppy drives", "Floppy drives", "DF1:", "DF2:"},
|
||||
{"DF2:", "Floppy drives", "cboType2", "cboDisk1", "cboDisk2"},
|
||||
{"cboType2", "DF2:", "cmdEject2", "cboDisk1", "cboDisk2"},
|
||||
{"cmdEject2", "cboType2", "cmdSel2", "cboDisk1", "cboDisk2"},
|
||||
{"cmdSel2", "cmdEject2", "Floppy drives", "cboDisk1", "cboDisk2"},
|
||||
{"cboDisk2", "Floppy drives", "Floppy drives", "DF2:", "DF3:"},
|
||||
{"DF3:", "Floppy drives", "cboType3", "cboDisk2", "cboDisk3"},
|
||||
{"cboType3", "DF3:", "cmdEject3", "cboDisk2", "cboDisk3"},
|
||||
{"cmdEject3", "cboType3", "cmdSel3", "cboDisk2", "cboDisk3"},
|
||||
{"cmdSel3", "cmdEject3", "Floppy drives", "cboDisk2", "cboDisk3"},
|
||||
{"cboDisk3", "Floppy drives", "Floppy drives", "DF3:", "DriveSpeed"},
|
||||
{"DriveSpeed", "", "", "cboDisk3", "CreateDD"},
|
||||
{"SaveForDisk", "Floppy drives", "CreateDD", "DriveSpeed", "DF0:"},
|
||||
{"CreateDD", "SaveForDisk", "CreateHD", "DriveSpeed", "cboType0"},
|
||||
{"CreateHD", "CreateDD", "Floppy drives", "DriveSpeed", "cmdEject0"},
|
||||
//PanelFloppy
|
||||
{ "DF0:", "Floppy drives", "cboType0", "SaveForDisk", "cboDisk0" },
|
||||
{ "cboType0", "DF0:", "cmdEject0", "SaveForDisk", "cboDisk0" },
|
||||
{ "cmdEject0", "cboType0", "cmdSel0", "CreateHD", "cboDisk0" },
|
||||
{ "cmdSel0", "cmdEject0", "Floppy drives", "CreateHD", "cboDisk0" },
|
||||
{ "cboDisk0", "Floppy drives", "Floppy drives", "DF0:", "LoadDiskCfg" },
|
||||
{ "LoadDiskCfg", "Floppy drives", "Floppy drives", "cboDisk0", "DF1:" },
|
||||
{ "DF1:", "Floppy drives", "cboType1", "LoadDiskCfg", "cboDisk1" },
|
||||
{ "cboType1", "DF1:", "cmdEject1", "LoadDiskCfg", "cboDisk1" },
|
||||
{ "cmdEject1", "cboType1", "cmdSel1", "LoadDiskCfg", "cboDisk1" },
|
||||
{ "cmdSel1", "cmdEject1", "Floppy drives", "LoadDiskCfg", "cboDisk1" },
|
||||
{ "cboDisk1", "Floppy drives", "Floppy drives", "DF1:", "DF2:" },
|
||||
{ "DF2:", "Floppy drives", "cboType2", "cboDisk1", "cboDisk2" },
|
||||
{ "cboType2", "DF2:", "cmdEject2", "cboDisk1", "cboDisk2" },
|
||||
{ "cmdEject2", "cboType2", "cmdSel2", "cboDisk1", "cboDisk2" },
|
||||
{ "cmdSel2", "cmdEject2", "Floppy drives", "cboDisk1", "cboDisk2" },
|
||||
{ "cboDisk2", "Floppy drives", "Floppy drives", "DF2:", "DF3:" },
|
||||
{ "DF3:", "Floppy drives", "cboType3", "cboDisk2", "cboDisk3" },
|
||||
{ "cboType3", "DF3:", "cmdEject3", "cboDisk2", "cboDisk3" },
|
||||
{ "cmdEject3", "cboType3", "cmdSel3", "cboDisk2", "cboDisk3" },
|
||||
{ "cmdSel3", "cmdEject3", "Floppy drives", "cboDisk2", "cboDisk3" },
|
||||
{ "cboDisk3", "Floppy drives", "Floppy drives", "DF3:", "DriveSpeed" },
|
||||
{ "DriveSpeed", "", "", "cboDisk3", "CreateDD" },
|
||||
{ "SaveForDisk", "Floppy drives", "CreateDD", "DriveSpeed", "DF0:" },
|
||||
{ "CreateDD", "SaveForDisk", "CreateHD", "DriveSpeed", "cboType0" },
|
||||
{ "CreateHD", "CreateDD", "Floppy drives", "DriveSpeed", "cmdEject0" },
|
||||
|
||||
// active move left move right move up move down
|
||||
// PanelHD
|
||||
|
@ -177,10 +177,11 @@ static NavigationMap navMap[] =
|
|||
{"cmdDel3", "cmdProp3", "Hard drives/CD", "cmdDel2", "cmdDel4"},
|
||||
{"cmdProp4", "Hard drives/CD", "cmdDel4", "cmdProp3", "cmdAddDir"},
|
||||
{"cmdDel4", "cmdProp4", "Hard drives/CD", "cmdDel3", "cmdAddHDF"},
|
||||
{"cmdAddDir", "Hard drives/CD", "cmdAddHDF", "cmdProp4", "CD drive"},
|
||||
{"cmdAddHDF", "cmdAddDir", "cmdCreateHDF", "cmdDel4", "CD drive"},
|
||||
{"cmdCreateHDF", "cmdAddHDF", "Hard drives/CD", "cmdDel4", "CD drive"},
|
||||
{"CD drive", "Hard drives/CD", "cdEject", "cmdAddDir", "cboCD"},
|
||||
{"cmdAddDir", "Hard drives/CD", "cmdAddHDF", "cmdProp4", "chkHDRO"},
|
||||
{"cmdAddHDF", "cmdAddDir", "cmdCreateHDF", "cmdDel4", "chkHDRO"},
|
||||
{"cmdCreateHDF", "cmdAddHDF", "Hard drives/CD", "cmdDel4", "chkHDRO"},
|
||||
{ "chkHDRO", "Hard drives/CD", "Hard drives/CD", "cmdAddDir", "CD drive" },
|
||||
{"CD drive", "Hard drives/CD", "cdEject", "chkHDRO", "cboCD"},
|
||||
{"cdEject", "CD drive", "CDSelect", "cmdCreateHDF", "cboCD"},
|
||||
{"CDSelect", "cdEject", "Hard drives/CD", "cmdCreateHDF", "cboCD"},
|
||||
{"cboCD", "Hard drives/CD", "Hard drives/CD", "CD drive", "CDVol"},
|
||||
|
@ -192,38 +193,38 @@ static NavigationMap navMap[] =
|
|||
{ "Nearest Neighbor (pixelated)", "Display", "Display", "Auto", "Linear (smooth)"},
|
||||
{"Linear (smooth)", "Display", "Display", "Nearest Neighbor (pixelated)", "Frameskip"},
|
||||
|
||||
//PanelSound
|
||||
{"sndDisable", "Sound", "Mono", "sldStereoDelay", "sndDisEmu"},
|
||||
{"sndDisEmu", "Sound", "Stereo", "sndDisable", "sndEmulate"},
|
||||
{"sndEmulate", "Sound", "Stereo", "sndDisEmu", "sndEmuBest"},
|
||||
{"sndEmuBest", "Sound", "Stereo", "sndEmulate", "cboFrequency"},
|
||||
{"Mono", "sndDisable", "Sound", "sldStereoDelay", "Stereo"},
|
||||
{"Stereo", "sndDisEmu", "Sound", "Mono", "cboFrequency"},
|
||||
{"cboFrequency", "Sound", "Sound", "sndEmuBest", "cboInterpol"},
|
||||
{"cboInterpol", "Sound", "Sound", "cboFrequency", "cboFilter"},
|
||||
{"cboFilter", "Sound", "Sound", "cboInterpol", "sldSeparation"},
|
||||
{"sldSeparation", "", "", "cboFilter", "sldStereoDelay"},
|
||||
{"sldStereoDelay", "", "", "sldSeparation", "sndDisable"},
|
||||
//PanelSound
|
||||
{ "sndDisable", "Sound", "Mono", "sldStereoDelay", "sndDisEmu" },
|
||||
{ "sndDisEmu", "Sound", "Stereo", "sndDisable", "sndEmulate" },
|
||||
{ "sndEmulate", "Sound", "Stereo", "sndDisEmu", "sndEmuBest" },
|
||||
{ "sndEmuBest", "Sound", "Stereo", "sndEmulate", "cboFrequency" },
|
||||
{ "Mono", "sndDisable", "Sound", "sldStereoDelay", "Stereo" },
|
||||
{ "Stereo", "sndDisEmu", "Sound", "Mono", "cboFrequency" },
|
||||
{ "cboFrequency", "Sound", "Sound", "sndEmuBest", "cboInterpol" },
|
||||
{ "cboInterpol", "Sound", "Sound", "cboFrequency", "cboFilter" },
|
||||
{ "cboFilter", "Sound", "Sound", "cboInterpol", "sldSeparation" },
|
||||
{ "sldSeparation", "", "", "cboFilter", "sldStereoDelay" },
|
||||
{ "sldStereoDelay", "", "", "sldSeparation", "sndDisable" },
|
||||
|
||||
// active move left move right move up move down
|
||||
// PanelInput
|
||||
{"cboPort0", "Input", "Input", "cboLeft", "cboPort1"},
|
||||
{"cboPort1", "Input", "cboAutofire", "cboPort0", "MouseSpeed"},
|
||||
{"cboAutofire", "cboPort1", "Input", "cboPort0", "cboTapDelay"},
|
||||
{"MouseSpeed", "", "", "cboPort1", "MouseHack"},
|
||||
{"MouseHack", "Input", "cboTapDelay", "MouseSpeed", "CustomCtrl"},
|
||||
{"cboTapDelay", "MouseHack", "Input", "cboAutofire", "cboB"},
|
||||
{"CustomCtrl", "Input", "Input", "MouseHack", "cboA"},
|
||||
{"cboA", "Input", "cboB", "CustomCtrl", "cboX"},
|
||||
{"cboB", "cboA", "Input", "cboTapDelay", "cboY"},
|
||||
{"cboX", "Input", "cboY", "cboA", "cboL"},
|
||||
{"cboY", "cboX", "Input", "cboB", "cboR"},
|
||||
{"cboL", "Input", "cboR", "cboX", "cboUp"},
|
||||
{"cboR", "cboL", "Input", "cboY", "cboDown"},
|
||||
{"cboUp", "Input", "cboDown", "cboL", "cboLeft"},
|
||||
{"cboDown", "cboUp", "Input", "cboR", "cboRight"},
|
||||
{"cboLeft", "Input", "cboRight", "cboUp", "cboPort0"},
|
||||
{"cboRight", "cboLeft", "Input", "cboDown", "cboPort0"},
|
||||
// active move left move right move up move down
|
||||
// PanelInput
|
||||
{ "cboPort0", "Input", "Input", "cboLeft", "cboPort1" },
|
||||
{ "cboPort1", "Input", "cboAutofire", "cboPort0", "MouseSpeed" },
|
||||
{ "cboAutofire", "cboPort1", "Input", "cboPort0", "cboTapDelay" },
|
||||
{ "MouseSpeed", "", "", "cboPort1", "MouseHack" },
|
||||
{ "MouseHack", "Input", "cboTapDelay", "MouseSpeed", "CustomCtrl" },
|
||||
{ "cboTapDelay", "MouseHack", "Input", "cboAutofire", "cboB" },
|
||||
{ "CustomCtrl", "Input", "Input", "MouseHack", "cboA" },
|
||||
{ "cboA", "Input", "cboB", "CustomCtrl", "cboX" },
|
||||
{ "cboB", "cboA", "Input", "cboTapDelay", "cboY" },
|
||||
{ "cboX", "Input", "cboY", "cboA", "cboL" },
|
||||
{ "cboY", "cboX", "Input", "cboB", "cboR" },
|
||||
{ "cboL", "Input", "cboR", "cboX", "cboUp" },
|
||||
{ "cboR", "cboL", "Input", "cboY", "cboDown" },
|
||||
{ "cboUp", "Input", "cboDown", "cboL", "cboLeft" },
|
||||
{ "cboDown", "cboUp", "Input", "cboR", "cboRight" },
|
||||
{ "cboLeft", "Input", "cboRight", "cboUp", "cboPort0" },
|
||||
{ "cboRight", "cboLeft", "Input", "cboDown", "cboPort0" },
|
||||
|
||||
// PanelMisc
|
||||
{"StatusLine", "Miscellaneous", "Miscellaneous", "MasterWP", "HideIdle"},
|
||||
|
@ -254,29 +255,29 @@ static NavigationMap navMap[] =
|
|||
{"virtOK", "virtCancel", "virtCancel", "virtPath", "virtRW"},
|
||||
{"virtCancel", "virtOK", "virtOK", "virtPath", "virtRW"},
|
||||
|
||||
// EditFilesysHardfile
|
||||
{ "hdfDev", "hdfBootPri", "hdfRW", "hdfOK", "hdfPath" },
|
||||
{ "hdfRW", "hdfDev", "hdfAutoboot", "hdfOK", "hdfPath" },
|
||||
{ "hdfAutoboot", "hdfRW", "hdfBootPri", "hdfOK", "hdfPath" },
|
||||
{ "hdfBootPri", "hdfAutoboot", "hdfDev", "hdfCancel", "hdfPath" },
|
||||
{ "hdfSurface", "hdfReserved", "hdfReserved", "hdfPath", "hdfSectors" },
|
||||
{ "hdfReserved", "hdfSurface", "hdfSurface", "hdfPath", "hdfBlocksize" },
|
||||
{ "hdfSectors", "hdfBlocksize", "hdfBlocksize", "hdfSurface", "hdfController" },
|
||||
{ "hdfBlocksize", "hdfSectors", "hdfSectors", "hdfReserved", "hdfUnit" },
|
||||
{ "hdfPath", "", "", "hdfBootPri", "hdfReserved" },
|
||||
{ "hdfController", "hdfUnit", "hdfUnit", "hdfSectors", "hdfOK" },
|
||||
{ "hdfUnit", "hdfController", "hdfController", "hdfBlocksize", "hdfOK" },
|
||||
{ "hdfOK", "hdfCancel", "hdfCancel", "hdfUnit", "hdfBootPri" },
|
||||
{ "hdfCancel", "hdfOK", "hdfOK", "hdfUnit", "hdfBootPri" },
|
||||
// EditFilesysHardfile
|
||||
{ "hdfDev", "hdfBootPri", "hdfRW", "hdfOK", "hdfPath" },
|
||||
{ "hdfRW", "hdfDev", "hdfAutoboot", "hdfOK", "hdfPath" },
|
||||
{ "hdfAutoboot", "hdfRW", "hdfBootPri", "hdfOK", "hdfPath" },
|
||||
{ "hdfBootPri", "hdfAutoboot", "hdfDev", "hdfCancel", "hdfPath" },
|
||||
{ "hdfSurface", "hdfReserved", "hdfReserved", "hdfPath", "hdfSectors" },
|
||||
{ "hdfReserved", "hdfSurface", "hdfSurface", "hdfPath", "hdfBlocksize" },
|
||||
{ "hdfSectors", "hdfBlocksize", "hdfBlocksize", "hdfSurface", "hdfController" },
|
||||
{ "hdfBlocksize", "hdfSectors", "hdfSectors", "hdfReserved", "hdfUnit" },
|
||||
{ "hdfPath", "", "", "hdfBootPri", "hdfReserved" },
|
||||
{ "hdfController", "hdfUnit", "hdfUnit", "hdfSectors", "hdfOK" },
|
||||
{ "hdfUnit", "hdfController", "hdfController", "hdfBlocksize", "hdfOK" },
|
||||
{ "hdfOK", "hdfCancel", "hdfCancel", "hdfUnit", "hdfBootPri" },
|
||||
{ "hdfCancel", "hdfOK", "hdfOK", "hdfUnit", "hdfBootPri" },
|
||||
|
||||
// CreateFilesysHardfile
|
||||
{"createHdfDev", "createHdfBootPri", "createHdfAutoboot", "createHdfOK", "createHdfPath"},
|
||||
{"createHdfAutoboot", "createHdfDev", "createHdfBootPri", "createHdfOK", "createHdfPath"},
|
||||
{"createHdfBootPri", "createHdfAutoboot", "createHdfDev", "createHdfOK", "createHdfPath"},
|
||||
{"createHdfSize", "", "", "createHdfPath", "createHdfOK"},
|
||||
{"createHdfPath", "", "", "createHdfBootPri", "createHdfSize"},
|
||||
{"createHdfOK", "createHdfCancel", "createHdfCancel", "createHdfSize", "createHdfBootPri"},
|
||||
{"createHdfCancel", "createHdfOK", "createHdfOK", "createHdfSize", "createHdfBootPri"},
|
||||
// CreateFilesysHardfile
|
||||
{ "createHdfDev", "createHdfBootPri", "createHdfAutoboot", "createHdfOK", "createHdfPath" },
|
||||
{ "createHdfAutoboot", "createHdfDev", "createHdfBootPri", "createHdfOK", "createHdfPath" },
|
||||
{ "createHdfBootPri", "createHdfAutoboot", "createHdfDev", "createHdfOK", "createHdfPath" },
|
||||
{ "createHdfSize", "", "", "createHdfPath", "createHdfOK" },
|
||||
{ "createHdfPath", "", "", "createHdfBootPri", "createHdfSize" },
|
||||
{ "createHdfOK", "createHdfCancel", "createHdfCancel", "createHdfSize", "createHdfBootPri" },
|
||||
{ "createHdfCancel", "createHdfOK", "createHdfOK", "createHdfSize", "createHdfBootPri" },
|
||||
|
||||
{"END", "", "", "", ""}
|
||||
};
|
||||
|
@ -346,7 +347,7 @@ bool HandleNavigation(int direction)
|
|||
|
||||
if (focusTarget != nullptr)
|
||||
{
|
||||
if (!activeWidget->getId().substr(0, 3).compare("cbo"))
|
||||
if (!activeWidget->getId().substr(0, 3).compare("cbo") || !activeWidget->getId().substr(0, 5).compare("qscbo"))
|
||||
{
|
||||
gcn::UaeDropDown* dropdown = static_cast<gcn::UaeDropDown *>(activeWidget);
|
||||
if (dropdown->isDroppedDown() && (direction == DIRECTION_UP || direction == DIRECTION_DOWN))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeCheckBox.hpp"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeCheckBox.hpp"
|
||||
|
@ -30,6 +30,8 @@ static gcn::Window* grpBlitter;
|
|||
static gcn::UaeRadioButton* optBlitNormal;
|
||||
static gcn::UaeRadioButton* optBlitImmed;
|
||||
static gcn::UaeRadioButton* optBlitWait;
|
||||
static gcn::Window *grpCopper;
|
||||
static gcn::UaeCheckBox* chkFastCopper;
|
||||
static gcn::Window* grpCollisionLevel;
|
||||
static gcn::UaeRadioButton* optCollNone;
|
||||
static gcn::UaeRadioButton* optCollSprites;
|
||||
|
@ -133,12 +135,24 @@ public:
|
|||
changed_prefs.ntscmode = false;
|
||||
changed_prefs.chipset_refreshrate = 50;
|
||||
}
|
||||
RefreshPanelQuickstart();
|
||||
}
|
||||
};
|
||||
|
||||
static NTSCButtonActionListener* ntscButtonActionListener;
|
||||
|
||||
|
||||
class FastCopperActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
{
|
||||
changed_prefs.fast_copper = chkFastCopper->isSelected();
|
||||
}
|
||||
};
|
||||
static FastCopperActionListener* fastCopperActionListener;
|
||||
|
||||
|
||||
class BlitterButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
|
@ -212,7 +226,7 @@ void InitPanelChipset(const struct _ConfigCategory& category)
|
|||
grpChipset->add(cboChipset, 115 + lblChipset->getWidth() + 8, 10);
|
||||
|
||||
grpChipset->setMovable(false);
|
||||
grpChipset->setSize(120, 185);
|
||||
grpChipset->setSize(255, 185);
|
||||
grpChipset->setBaseColor(gui_baseCol);
|
||||
|
||||
category.panel->add(grpChipset);
|
||||
|
@ -241,6 +255,20 @@ void InitPanelChipset(const struct _ConfigCategory& category)
|
|||
|
||||
category.panel->add(grpBlitter);
|
||||
|
||||
fastCopperActionListener = new FastCopperActionListener();
|
||||
|
||||
chkFastCopper = new gcn::UaeCheckBox("Fast copper");
|
||||
chkFastCopper->addActionListener(fastCopperActionListener);
|
||||
|
||||
grpCopper = new gcn::Window("Copper");
|
||||
grpCopper->setPosition(DISTANCE_BORDER + grpChipset->getWidth() + DISTANCE_NEXT_X, grpBlitter->getY() + grpBlitter->getHeight() + DISTANCE_NEXT_Y);
|
||||
grpCopper->add(chkFastCopper, 5, 10);
|
||||
grpCopper->setMovable(false);
|
||||
grpCopper->setSize(120, 55);
|
||||
grpCopper->setBaseColor(gui_baseCol);
|
||||
|
||||
category.panel->add(grpCopper);
|
||||
|
||||
collisionButtonActionListener = new CollisionButtonActionListener();
|
||||
|
||||
optCollNone = new gcn::UaeRadioButton("None", "radioccollisiongroup");
|
||||
|
@ -294,6 +322,9 @@ void ExitPanelChipset()
|
|||
delete grpBlitter;
|
||||
delete blitterButtonActionListener;
|
||||
|
||||
delete chkFastCopper;
|
||||
delete grpCopper;
|
||||
delete fastCopperActionListener;
|
||||
delete optCollNone;
|
||||
delete optCollSprites;
|
||||
delete optCollPlayfield;
|
||||
|
@ -334,6 +365,8 @@ void RefreshPanelChipset()
|
|||
else
|
||||
optBlitNormal->setSelected(true);
|
||||
|
||||
chkFastCopper->setSelected(changed_prefs.fast_copper);
|
||||
|
||||
if (changed_prefs.collision_level == 0)
|
||||
optCollNone->setSelected(true);
|
||||
else if (changed_prefs.collision_level == 1)
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeListBox.hpp"
|
||||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "blkdev.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
#include "uae.h"
|
||||
|
||||
static char last_active_config[MAX_DPATH] = {'\0'};
|
||||
static int ensureVisible = -1;
|
||||
|
@ -33,6 +35,9 @@ bool LoadConfigByName(const char* name)
|
|||
ConfigFileInfo* config = SearchConfigInList(name);
|
||||
if (config != nullptr)
|
||||
{
|
||||
if(emulating) {
|
||||
uae_restart(-1, config->FullPath);
|
||||
} else {
|
||||
txtName->setText(config->Name);
|
||||
txtDesc->setText(config->Description);
|
||||
target_cfgfile_load(&changed_prefs, config->FullPath, 0, 0);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
|
@ -9,7 +9,10 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
|
@ -9,8 +9,11 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "disk.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
@ -40,7 +43,8 @@ static bool bIgnoreListChange = false;
|
|||
|
||||
class DriveTypeListModel : public gcn::ListModel
|
||||
{
|
||||
vector<string> types;
|
||||
private:
|
||||
std::vector<std::string> types;
|
||||
|
||||
public:
|
||||
DriveTypeListModel()
|
||||
|
@ -245,7 +249,7 @@ public:
|
|||
{
|
||||
if (diskfileList.getElementAt(idx).compare(changed_prefs.floppyslots[i].df))
|
||||
{
|
||||
strcpy(changed_prefs.floppyslots[i].df, diskfileList.getElementAt(idx).c_str());
|
||||
strncpy(changed_prefs.floppyslots[i].df, diskfileList.getElementAt(idx).c_str(), sizeof(changed_prefs.floppyslots[i].df));
|
||||
disk_insert(i, changed_prefs.floppyslots[i].df);
|
||||
lstMRUDiskList.erase(lstMRUDiskList.begin() + idx);
|
||||
lstMRUDiskList.insert(lstMRUDiskList.begin(), changed_prefs.floppyslots[i].df);
|
||||
|
@ -394,6 +398,8 @@ void InitPanelFloppy(const struct _ConfigCategory& category)
|
|||
|
||||
chkDFxWriteProtect[i] = new gcn::UaeCheckBox("Write-protected");
|
||||
chkDFxWriteProtect[i]->addActionListener(dfxCheckActionListener);
|
||||
snprintf(tmp, 20, "chkWP%d", i);
|
||||
chkDFxWriteProtect[i]->setId(tmp);
|
||||
|
||||
cmdDFxInfo[i] = new gcn::Button("?");
|
||||
cmdDFxInfo[i]->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
|
@ -9,7 +9,12 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "uae.h"
|
||||
#include "autoconf.h"
|
||||
#include "filesys.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
#include "keyboard.h"
|
||||
|
@ -28,6 +33,9 @@ static gcn::UaeDropDown* cboAutofire;
|
|||
static gcn::Label* lblMouseSpeed;
|
||||
static gcn::Label* lblMouseSpeedInfo;
|
||||
static gcn::Slider* sldMouseSpeed;
|
||||
static gcn::Label *lblTapDelay;
|
||||
static gcn::UaeDropDown* cboTapDelay;
|
||||
static gcn::UaeCheckBox* chkMouseHack;
|
||||
|
||||
static gcn::UaeCheckBox* chkCustomCtrl;
|
||||
static gcn::Label* lblA;
|
||||
|
@ -76,7 +84,8 @@ static gcn::Button* cmdPlay;
|
|||
|
||||
class StringListModel : public gcn::ListModel
|
||||
{
|
||||
vector<string> values;
|
||||
private:
|
||||
std::vector<std::string> values;
|
||||
public:
|
||||
StringListModel(const char* entries[], int count)
|
||||
{
|
||||
|
@ -109,6 +118,8 @@ StringListModel ctrlPortList(inputport_list, 5);
|
|||
const char* autofireValues[] = {"Off", "Slow", "Medium", "Fast"};
|
||||
StringListModel autofireList(autofireValues, 4);
|
||||
|
||||
const char *tapDelayValues[] = { "Normal", "Short", "None" };
|
||||
StringListModel tapDelayList(tapDelayValues, 3);
|
||||
const char* mappingValues[] =
|
||||
{
|
||||
"CD32 rwd", "CD32 ffw", "CD32 play", "CD32 yellow", "CD32 green",
|
||||
|
@ -249,6 +260,20 @@ public:
|
|||
RefreshPanelInput();
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cboTapDelay)
|
||||
{
|
||||
if(cboTapDelay->getSelected() == 0)
|
||||
changed_prefs.pandora_tapDelay = 10;
|
||||
else if (cboTapDelay->getSelected() == 1)
|
||||
changed_prefs.pandora_tapDelay = 5;
|
||||
else
|
||||
changed_prefs.pandora_tapDelay = 2;
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == chkMouseHack)
|
||||
{
|
||||
changed_prefs.input_tablet = chkMouseHack->isSelected() ? TABLET_MOUSEHACK : TABLET_OFF;
|
||||
}
|
||||
else if (actionEvent.getSource() == chkCustomCtrl)
|
||||
changed_prefs.customControls = chkCustomCtrl->isSelected();
|
||||
|
||||
|
@ -432,6 +457,18 @@ void InitPanelInput(const struct _ConfigCategory& category)
|
|||
sldMouseSpeed->addActionListener(inputActionListener);
|
||||
lblMouseSpeedInfo = new gcn::Label(".25");
|
||||
|
||||
lblTapDelay = new gcn::Label("Tap Delay:");
|
||||
lblTapDelay->setSize(100, LABEL_HEIGHT);
|
||||
lblTapDelay->setAlignment(gcn::Graphics::RIGHT);
|
||||
cboTapDelay = new gcn::UaeDropDown(&tapDelayList);
|
||||
cboTapDelay->setSize(80, DROPDOWN_HEIGHT);
|
||||
cboTapDelay->setBaseColor(gui_baseCol);
|
||||
cboTapDelay->setId("cboTapDelay");
|
||||
cboTapDelay->addActionListener(inputActionListener);
|
||||
|
||||
chkMouseHack = new gcn::UaeCheckBox("Enable mousehack");
|
||||
chkMouseHack->setId("MouseHack");
|
||||
chkMouseHack->addActionListener(inputActionListener);
|
||||
chkCustomCtrl = new gcn::UaeCheckBox("Custom Control");
|
||||
chkCustomCtrl->setId("CustomCtrl");
|
||||
chkCustomCtrl->addActionListener(inputActionListener);
|
||||
|
@ -596,6 +633,11 @@ void InitPanelInput(const struct _ConfigCategory& category)
|
|||
category.panel->add(lblMouseSpeedInfo, sldMouseSpeed->getX() + sldMouseSpeed->getWidth() + 12, posY);
|
||||
posY += sldMouseSpeed->getHeight() + DISTANCE_NEXT_Y * 2;
|
||||
|
||||
category.panel->add(chkMouseHack, DISTANCE_BORDER + lblA->getWidth() + 8, posY);
|
||||
category.panel->add(lblTapDelay, 300, posY);
|
||||
category.panel->add(cboTapDelay, 300 + lblTapDelay->getWidth() + 8, posY);
|
||||
posY += cboTapDelay->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
category.panel->add(chkCustomCtrl, DISTANCE_BORDER + lblA->getWidth() + 8, posY);
|
||||
posY += chkCustomCtrl->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(lblA, DISTANCE_BORDER, posY);
|
||||
|
@ -645,6 +687,9 @@ void ExitPanelInput()
|
|||
delete lblMouseSpeed;
|
||||
delete sldMouseSpeed;
|
||||
delete lblMouseSpeedInfo;
|
||||
delete lblTapDelay;
|
||||
delete cboTapDelay;
|
||||
delete chkMouseHack;
|
||||
|
||||
delete chkCustomCtrl;
|
||||
delete lblA;
|
||||
|
@ -740,6 +785,14 @@ void RefreshPanelInput()
|
|||
}
|
||||
}
|
||||
|
||||
if (changed_prefs.pandora_tapDelay == 10)
|
||||
cboTapDelay->setSelected(0);
|
||||
else if (changed_prefs.pandora_tapDelay == 5)
|
||||
cboTapDelay->setSelected(1);
|
||||
else
|
||||
cboTapDelay->setSelected(2);
|
||||
chkMouseHack->setSelected(changed_prefs.input_tablet == TABLET_MOUSEHACK);
|
||||
|
||||
chkCustomCtrl->setSelected(changed_prefs.customControls);
|
||||
|
||||
txtA->setText(changed_prefs.custom_a);
|
||||
|
@ -762,6 +815,12 @@ bool HelpPanelInput(std::vector<std::string> &helptext)
|
|||
helptext.push_back("");
|
||||
helptext.push_back("Set the emulated mouse speed to .25x, .5x, 1x, 2x and 4x to slow down or speed up the mouse.");
|
||||
helptext.push_back("");
|
||||
helptext.push_back("When \"Enable mousehack\" is activated, you can use the stylus to set the mouse pointer to the exact position.");
|
||||
helptext.push_back("This works very well on Workbench, but many games using there own mouse handling and will not profit from");
|
||||
helptext.push_back("this code.");
|
||||
helptext.push_back("");
|
||||
helptext.push_back("\"Tap Delay\" specifies the time between taping the screen and an emulated mouse button click.");
|
||||
helptext.push_back("");
|
||||
helptext.push_back("When you activate \"Custom Control\", you can define which Amiga key should be emulated by pressing one of the");
|
||||
helptext.push_back("ABXY- or D-pad buttons. Useful to setup controls for pinball games. During emulation, you can switch between");
|
||||
helptext.push_back("regular buttons and custom settings by pressing left shoulder button and 'c'.");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
|
@ -9,7 +9,12 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "uae.h"
|
||||
#include "autoconf.h"
|
||||
#include "filesys.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
@ -17,6 +22,11 @@
|
|||
static gcn::UaeCheckBox* chkStatusLine;
|
||||
static gcn::UaeCheckBox* chkHideIdleLed;
|
||||
static gcn::UaeCheckBox* chkShowGUI;
|
||||
#ifdef PANDORA
|
||||
static gcn::Label* lblPandoraSpeed;
|
||||
static gcn::Label* lblPandoraSpeedInfo;
|
||||
static gcn::Slider* sldPandoraSpeed;
|
||||
#endif
|
||||
static gcn::UaeCheckBox* chkBSDSocket;
|
||||
static gcn::UaeCheckBox* chkMasterWP;
|
||||
|
||||
|
@ -66,7 +76,10 @@ public:
|
|||
{
|
||||
if (actionEvent.getSource() == chkStatusLine)
|
||||
changed_prefs.leds_on_screen = chkStatusLine->isSelected();
|
||||
|
||||
#ifdef PANDORA
|
||||
else if (actionEvent.getSource() == chkHideIdleLed)
|
||||
changed_prefs.pandora_hide_idle_led = chkHideIdleLed->isSelected();
|
||||
#endif
|
||||
else if (actionEvent.getSource() == chkShowGUI)
|
||||
changed_prefs.start_gui = chkShowGUI->isSelected();
|
||||
|
||||
|
@ -98,6 +111,18 @@ public:
|
|||
strcpy(changed_prefs.quit_amiberry, key);
|
||||
}
|
||||
}
|
||||
#ifdef PANDORA
|
||||
else if (actionEvent.getSource() == sldPandoraSpeed)
|
||||
{
|
||||
int newspeed = (int) sldPandoraSpeed->getValue();
|
||||
newspeed = newspeed - (newspeed % 20);
|
||||
if(changed_prefs.pandora_cpu_speed != newspeed)
|
||||
{
|
||||
changed_prefs.pandora_cpu_speed = newspeed;
|
||||
RefreshPanelMisc();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
else if (actionEvent.getSource() == cboKBDLed_num)
|
||||
changed_prefs.kbd_led_num = cboKBDLed_num->getSelected();
|
||||
|
@ -126,6 +151,19 @@ void InitPanelMisc(const struct _ConfigCategory& category)
|
|||
chkShowGUI->setId("ShowGUI");
|
||||
chkShowGUI->addActionListener(miscActionListener);
|
||||
|
||||
#ifdef PANDORA
|
||||
lblPandoraSpeed = new gcn::Label("Pandora Speed:");
|
||||
lblPandoraSpeed->setSize(110, LABEL_HEIGHT);
|
||||
lblPandoraSpeed->setAlignment(gcn::Graphics::RIGHT);
|
||||
sldPandoraSpeed = new gcn::Slider(500, 1260);
|
||||
sldPandoraSpeed->setSize(200, SLIDER_HEIGHT);
|
||||
sldPandoraSpeed->setBaseColor(gui_baseCol);
|
||||
sldPandoraSpeed->setMarkerLength(20);
|
||||
sldPandoraSpeed->setStepLength(20);
|
||||
sldPandoraSpeed->setId("PandSpeed");
|
||||
sldPandoraSpeed->addActionListener(miscActionListener);
|
||||
lblPandoraSpeedInfo = new gcn::Label("1000 MHz");
|
||||
#endif
|
||||
chkBSDSocket = new gcn::UaeCheckBox("bsdsocket.library");
|
||||
chkBSDSocket->setId("BSDSocket");
|
||||
chkBSDSocket->addActionListener(miscActionListener);
|
||||
|
@ -185,7 +223,12 @@ void InitPanelMisc(const struct _ConfigCategory& category)
|
|||
posY += chkHideIdleLed->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(chkShowGUI, DISTANCE_BORDER, posY);
|
||||
posY += chkShowGUI->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
#ifdef PANDORA
|
||||
category.panel->add(lblPandoraSpeed, DISTANCE_BORDER, posY);
|
||||
category.panel->add(sldPandoraSpeed, DISTANCE_BORDER + lblPandoraSpeed->getWidth() + 8, posY);
|
||||
category.panel->add(lblPandoraSpeedInfo, sldPandoraSpeed->getX() + sldPandoraSpeed->getWidth() + 12, posY);
|
||||
posY += sldPandoraSpeed->getHeight() + DISTANCE_NEXT_Y;
|
||||
#endif
|
||||
category.panel->add(chkBSDSocket, DISTANCE_BORDER, posY);
|
||||
posY += chkBSDSocket->getHeight() + DISTANCE_NEXT_Y * 2;
|
||||
|
||||
|
@ -213,6 +256,11 @@ void ExitPanelMisc()
|
|||
delete chkStatusLine;
|
||||
delete chkHideIdleLed;
|
||||
delete chkShowGUI;
|
||||
#ifdef PANDORA
|
||||
delete lblPandoraSpeed;
|
||||
delete sldPandoraSpeed;
|
||||
delete lblPandoraSpeedInfo;
|
||||
#endif
|
||||
delete chkBSDSocket;
|
||||
delete chkMasterWP;
|
||||
|
||||
|
@ -233,7 +281,15 @@ void ExitPanelMisc()
|
|||
void RefreshPanelMisc()
|
||||
{
|
||||
chkStatusLine->setSelected(changed_prefs.leds_on_screen);
|
||||
#ifdef PANDORA
|
||||
chkHideIdleLed->setSelected(changed_prefs.pandora_hide_idle_led);
|
||||
#endif
|
||||
chkShowGUI->setSelected(changed_prefs.start_gui);
|
||||
#ifdef PANDORA
|
||||
sldPandoraSpeed->setValue(changed_prefs.pandora_cpu_speed);
|
||||
snprintf(tmp, 20, "%d MHz", changed_prefs.pandora_cpu_speed);
|
||||
lblPandoraSpeedInfo->setCaption(tmp);
|
||||
#endif
|
||||
chkBSDSocket->setSelected(changed_prefs.socket_emu);
|
||||
chkMasterWP->setSelected(changed_prefs.floppy_read_only);
|
||||
|
||||
|
@ -256,6 +312,11 @@ bool HelpPanelMisc(std::vector<std::string> &helptext)
|
|||
helptext.push_back("When you deactivate the option \"Show GUI on startup\" and use this configuration by specifying it with the");
|
||||
helptext.push_back("command line parameter \"-config=<file>\", the emulation starts directly without showing the GUI.");
|
||||
helptext.push_back("");
|
||||
#ifdef PANDORA
|
||||
helptext.push_back("Set the speed for the Pandora CPU to overclock it for games which need more power. Be careful with this");
|
||||
helptext.push_back("parameter.");
|
||||
helptext.push_back("");
|
||||
#endif
|
||||
helptext.push_back("\"bsdsocket.library\" enables network functions (i.e. for web browsers in OS3.9).");
|
||||
helptext.push_back("");
|
||||
helptext.push_back("\"Master floppy drive protection\" will disable all write access to floppy disks.");
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL/SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
|
@ -11,7 +11,7 @@
|
|||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "memory.h"
|
||||
#include "include/memory.h"
|
||||
#include "disk.h"
|
||||
#include "uae.h"
|
||||
#include "autoconf.h"
|
||||
|
@ -48,42 +48,42 @@ struct amigamodels {
|
|||
char configs[8][128];
|
||||
};
|
||||
static struct amigamodels amodels[] = {
|
||||
{ 4, "Amiga 500",{
|
||||
"1.3 ROM, OCS, 512 KB Chip + 512 KB Slow RAM (most common)",
|
||||
"1.3 ROM, ECS Agnus, 512 KB Chip RAM + 512 KB Slow RAM",
|
||||
"1.3 ROM, ECS Agnus, 1 MB Chip RAM",
|
||||
"1.3 ROM, OCS Agnus, 512 KB Chip RAM",
|
||||
"1.2 ROM, OCS Agnus, 512 KB Chip RAM",
|
||||
"1.2 ROM, OCS Agnus, 512 KB Chip RAM + 512 KB Slow RAM",
|
||||
"\0" } },
|
||||
{ 4, "Amiga 500+",{
|
||||
"Basic non-expanded configuration",
|
||||
"2 MB Chip RAM expanded configuration",
|
||||
"MB Fast RAM expanded configuration\n",
|
||||
"\0" } },
|
||||
{ 4, "Amiga 600",{
|
||||
"Basic non-expanded configuration",
|
||||
"2 MB Chip RAM expanded configuration",
|
||||
"n MB Fast RAM expanded configuration",
|
||||
"\0" } },
|
||||
{ 4, "Amiga 1200",{
|
||||
"Basic non-expanded configuration",
|
||||
"4 MB Fast RAM expanded configuration",
|
||||
"\0" } },
|
||||
// { 2, "Amiga 3000", {
|
||||
// "1.4 ROM, 2MB Chip + 8MB Fast",
|
||||
// "2.04 ROM, 2MB Chip + 8MB Fast",
|
||||
// "3.1 ROM, 2MB Chip + 8MB Fast",
|
||||
// "\0" } },
|
||||
{ 1, "Amiga 4000",{
|
||||
"68030, 3.1 ROM, 2MB Chip + 8MB Fast",
|
||||
"68040, 3.1 ROM, 2MB Chip + 8MB Fast",
|
||||
"\0" } },
|
||||
{ 3, "CD32",{
|
||||
"CD32",
|
||||
"CD32 with Full Motion Video cartridge",
|
||||
"\0" } },
|
||||
{ -1 }
|
||||
{ 4, "Amiga 500", {
|
||||
"1.3 ROM, OCS, 512 KB Chip + 512 KB Slow RAM (most common)",
|
||||
"1.3 ROM, ECS Agnus, 512 KB Chip RAM + 512 KB Slow RAM",
|
||||
"1.3 ROM, ECS Agnus, 1 MB Chip RAM",
|
||||
"1.3 ROM, OCS Agnus, 512 KB Chip RAM",
|
||||
"1.2 ROM, OCS Agnus, 512 KB Chip RAM",
|
||||
"1.2 ROM, OCS Agnus, 512 KB Chip RAM + 512 KB Slow RAM",
|
||||
"\0" } },
|
||||
{ 4, "Amiga 500+", {
|
||||
"Basic non-expanded configuration",
|
||||
"2 MB Chip RAM expanded configuration",
|
||||
"MB Fast RAM expanded configuration\n",
|
||||
"\0" } },
|
||||
{ 4, "Amiga 600", {
|
||||
"Basic non-expanded configuration",
|
||||
"2 MB Chip RAM expanded configuration",
|
||||
"n MB Fast RAM expanded configuration",
|
||||
"\0" } },
|
||||
{ 4, "Amiga 1200", {
|
||||
"Basic non-expanded configuration",
|
||||
"4 MB Fast RAM expanded configuration",
|
||||
"\0" } },
|
||||
// { 2, "Amiga 3000", {
|
||||
// "1.4 ROM, 2MB Chip + 8MB Fast",
|
||||
// "2.04 ROM, 2MB Chip + 8MB Fast",
|
||||
// "3.1 ROM, 2MB Chip + 8MB Fast",
|
||||
// "\0" } },
|
||||
{ 1, "Amiga 4000", {
|
||||
"68030, 3.1 ROM, 2MB Chip + 8MB Fast",
|
||||
"68040, 3.1 ROM, 2MB Chip + 8MB Fast",
|
||||
"\0" } },
|
||||
{ 3, "CD32", {
|
||||
"CD32",
|
||||
"CD32 with Full Motion Video cartridge",
|
||||
"\0" } },
|
||||
{ -1 }
|
||||
};
|
||||
|
||||
static const int numModels = 6;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
|
@ -9,11 +9,13 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "uae.h"
|
||||
#include "gfxboard.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
#include "gfxboard.h"
|
||||
|
||||
|
||||
static const char *ChipMem_list[] = { "512 K", "1 MB", "2 MB", "4 MB", "8 MB" };
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
|
@ -9,8 +9,11 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "rommgr.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
@ -63,7 +66,7 @@ public:
|
|||
idxToAvailableROMs.clear();
|
||||
|
||||
int currIdx = -1;
|
||||
if (ROMType & (ROMTYPE_EXTCDTV | ROMTYPE_EXTCD32))
|
||||
if (ROMType & (ROMTYPE_ALL_EXT | ROMTYPE_ALL_CART))
|
||||
{
|
||||
roms.push_back("");
|
||||
idxToAvailableROMs.push_back(-1);
|
||||
|
@ -209,8 +212,8 @@ void InitPanelROM(const struct _ConfigCategory& category)
|
|||
cartROMActionListener = new CartROMActionListener();
|
||||
#endif
|
||||
romButtonActionListener = new ROMButtonActionListener();
|
||||
mainROMList = new ROMListModel(ROMTYPE_KICK | ROMTYPE_KICKCD32);
|
||||
extROMList = new ROMListModel(ROMTYPE_EXTCDTV | ROMTYPE_EXTCD32);
|
||||
mainROMList = new ROMListModel(ROMTYPE_ALL_KICK);
|
||||
extROMList = new ROMListModel(ROMTYPE_ALL_EXT);
|
||||
#ifdef ACTION_REPLAY
|
||||
cartROMList = new ROMListModel(ROMTYPE_ALL_CART);
|
||||
#endif
|
||||
|
@ -306,7 +309,6 @@ void ExitPanelROM()
|
|||
#endif
|
||||
|
||||
delete romButtonActionListener;
|
||||
// delete chkMapROM;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,14 +2,23 @@
|
|||
#include <SDL_ttf.h>
|
||||
#include <SDL_image.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeCheckBox.hpp"
|
||||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "newcpu.h"
|
||||
#include "custom.h"
|
||||
#include "xwin.h"
|
||||
#include "drawing.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "autoconf.h"
|
||||
#include "savestate.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
@ -76,7 +85,7 @@ public:
|
|||
savestate_initsave(savestate_fname, 2, 0, false);
|
||||
save_state(savestate_fname, "...");
|
||||
savestate_state = STATE_DOSAVE; // Just to create the screenshot
|
||||
delay_savestate_frame = 1;
|
||||
delay_savestate_frame = 2;
|
||||
gui_running = false;
|
||||
}
|
||||
else
|
||||
|
@ -224,6 +233,7 @@ void RefreshPanelSavestate()
|
|||
target.h = rect.height;
|
||||
SDL_SoftStretch(loadedImage, &source, scaled, &target);
|
||||
SDL_FreeSurface(loadedImage);
|
||||
loadedImage = nullptr;
|
||||
imgSavestate = new gcn::SDLImage(scaled, true);
|
||||
icoSavestate = new gcn::Icon(imgSavestate);
|
||||
wndScreenshot->add(icoSavestate);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <guisan.hpp>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeCheckBox.hpp"
|
||||
|
@ -9,8 +9,13 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "include/memory.h"
|
||||
#include "newcpu.h"
|
||||
#include "custom.h"
|
||||
#include "gui_handling.h"
|
||||
#include "sounddep/sound.h"
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <sstream>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
|
||||
#include "sysconfig.h"
|
||||
|
@ -308,6 +308,7 @@ static void SelectFileLoop()
|
|||
lstFiles->requestFocus();
|
||||
else if (activeWidget == txtFilename)
|
||||
lstFiles->requestFocus();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -326,6 +327,7 @@ static void SelectFileLoop()
|
|||
lstFiles->requestFocus();
|
||||
else if (activeWidget == cmdOK)
|
||||
cmdCancel->requestFocus();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <sstream>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
|
||||
#include "sysconfig.h"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef GCN_SELECTORENTRY_HPP
|
||||
#define GCN_SELECTORENTRY_HPP
|
||||
|
||||
#include "guisan/basiccontainer.hpp"
|
||||
#include "guisan/platform.hpp"
|
||||
#include "guisan/widgetlistener.hpp"
|
||||
#include <guisan/basiccontainer.hpp>
|
||||
#include <guisan/platform.hpp>
|
||||
#include <guisan/widgetlistener.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace gcn
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <sstream>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
|
||||
#include "sysconfig.h"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <sstream>
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include <guisan/sdl/sdltruetypefont.hpp>
|
||||
#include "SelectorEntry.hpp"
|
||||
|
||||
#include "sysconfig.h"
|
||||
|
@ -169,6 +169,7 @@ static void ShowMessageLoop()
|
|||
cmdOK->requestFocus();
|
||||
else if (activeWidget == cmdOK)
|
||||
cmdCancel->requestFocus();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "UaeCheckBox.hpp"
|
||||
#include "guisan/widgets/checkbox.hpp"
|
||||
#include "guisan/graphics.hpp"
|
||||
#include <guisan/widgets/checkbox.hpp>
|
||||
#include <guisan/graphics.hpp>
|
||||
|
||||
|
||||
namespace gcn
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "guisan/platform.hpp"
|
||||
#include "guisan/widget.hpp"
|
||||
#include "guisan/widgets/checkbox.hpp"
|
||||
#include <guisan/platform.hpp>
|
||||
#include <guisan/widget.hpp>
|
||||
#include <guisan/widgets/checkbox.hpp>
|
||||
|
||||
|
||||
namespace gcn
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "UaeDropDown.hpp"
|
||||
#include "guisan/widgets/dropdown.hpp"
|
||||
#include "guisan/key.hpp"
|
||||
#include <guisan/widgets/dropdown.hpp>
|
||||
#include <guisan/key.hpp>
|
||||
|
||||
namespace gcn
|
||||
{
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "guisan/keylistener.hpp"
|
||||
#include "guisan/platform.hpp"
|
||||
#include "guisan/widget.hpp"
|
||||
#include "guisan/widgets/dropdown.hpp"
|
||||
#include <guisan/keylistener.hpp>
|
||||
#include <guisan/platform.hpp>
|
||||
#include <guisan/widget.hpp>
|
||||
#include <guisan/widgets/dropdown.hpp>
|
||||
|
||||
|
||||
namespace gcn
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include "UaeListBox.hpp"
|
||||
#include "guisan/widgets/listbox.hpp"
|
||||
#include "guisan/basiccontainer.hpp"
|
||||
#include "guisan/font.hpp"
|
||||
#include "guisan/graphics.hpp"
|
||||
#include "guisan/listmodel.hpp"
|
||||
#include <guisan/widgets/listbox.hpp>
|
||||
#include <guisan/basiccontainer.hpp>
|
||||
#include <guisan/font.hpp>
|
||||
#include <guisan/graphics.hpp>
|
||||
#include <guisan/listmodel.hpp>
|
||||
|
||||
namespace gcn
|
||||
{
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
#include <list>
|
||||
|
||||
#include "guisan/listmodel.hpp"
|
||||
#include "guisan/platform.hpp"
|
||||
#include "guisan/widget.hpp"
|
||||
#include "guisan/widgets/listbox.hpp"
|
||||
#include <guisan/listmodel.hpp>
|
||||
#include <guisan/platform.hpp>
|
||||
#include <guisan/widget.hpp>
|
||||
#include <guisan/widgets/listbox.hpp>
|
||||
|
||||
|
||||
namespace gcn
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "UaeRadioButton.hpp"
|
||||
#include "guisan/widgets/radiobutton.hpp"
|
||||
#include "guisan/graphics.hpp"
|
||||
#include <guisan/widgets/radiobutton.hpp>
|
||||
#include <guisan/graphics.hpp>
|
||||
|
||||
namespace gcn
|
||||
{
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "guisan/platform.hpp"
|
||||
#include "guisan/widget.hpp"
|
||||
#include "guisan/widgets/radiobutton.hpp"
|
||||
#include <guisan/platform.hpp>
|
||||
#include <guisan/widget.hpp>
|
||||
#include <guisan/widgets/radiobutton.hpp>
|
||||
|
||||
|
||||
namespace gcn
|
||||
|
|
|
@ -97,7 +97,7 @@ namespace widgets
|
|||
|
||||
/* Flag for changes in rtarea:
|
||||
Bit 0: any HD in config?
|
||||
Bit 1: force because add/remove HD was clicked
|
||||
Bit 1: force because add/remove HD was clicked or new config loaded
|
||||
Bit 2: socket_emu on
|
||||
Bit 3: mousehack on
|
||||
Bit 4: rtgmem on
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "memory.h"
|
||||
#include "include/memory.h"
|
||||
#include "newcpu.h"
|
||||
#include "custom.h"
|
||||
#include "xwin.h"
|
|
@ -1,336 +0,0 @@
|
|||
#define _MENU_CONFIG_CPP
|
||||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "autoconf.h"
|
||||
#include "options.h"
|
||||
#include "gui.h"
|
||||
#include "sounddep/sound.h"
|
||||
#include "memory.h"
|
||||
#include "newcpu.h"
|
||||
#include "custom.h"
|
||||
#include "uae.h"
|
||||
#include "disk.h"
|
||||
#include <SDL.h>
|
||||
|
||||
static int kickstart;
|
||||
|
||||
static void SetDefaultMenuSettings(struct uae_prefs* p)
|
||||
{
|
||||
kickstart = 1;
|
||||
}
|
||||
|
||||
static void replace(char* str, char replace, char toreplace)
|
||||
{
|
||||
while (*str)
|
||||
{
|
||||
if (*str == toreplace) *str = replace;
|
||||
str++;
|
||||
}
|
||||
}
|
||||
|
||||
int create_configfilename(char *dest, char *basename, int fromDir)
|
||||
{
|
||||
char *p;
|
||||
p = basename + strlen(basename) - 1;
|
||||
while (*p != '/')
|
||||
p--;
|
||||
p++;
|
||||
if (fromDir == 0)
|
||||
{
|
||||
int len = strlen(p) + 1;
|
||||
char filename[MAX_DPATH];
|
||||
strcpy(filename, p);
|
||||
char *pch = &filename[len];
|
||||
while (pch != filename && *pch != '.')
|
||||
pch--;
|
||||
if (pch)
|
||||
{
|
||||
*pch = '\0';
|
||||
snprintf(dest, MAX_DPATH, "%s/conf/%s.uae", start_path_data, filename);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(dest, MAX_DPATH, "%s/conf/%s.uae", start_path_data, p);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *kickstarts_rom_names[] = { "kick12.rom\0", "kick13.rom\0", "kick20.rom\0", "kick31.rom\0", "aros-amiga-m68k-rom.bin\0" };
|
||||
const char *extended_rom_names[] = { "\0", "\0", "\0", "\0", "aros-amiga-m68k-ext.bin\0" };
|
||||
const char *kickstarts_names[] = { "KS ROM v1.2\0", "KS ROM v1.3\0", "KS ROM v2.05\0", "KS ROM v3.1\0", "\0" };
|
||||
#ifdef ANDROIDSDL
|
||||
const char *af_kickstarts_rom_names[] = { "amiga-os-120.rom\0", "amiga-os-130.rom\0", "amiga-os-204.rom\0", "amiga-os-310-a1200.rom\0" };
|
||||
#endif
|
||||
|
||||
static bool CheckKickstart(struct uae_prefs *p)
|
||||
{
|
||||
char kickpath[MAX_DPATH];
|
||||
int i;
|
||||
|
||||
// Search via filename
|
||||
fetch_rompath(kickpath, MAX_DPATH);
|
||||
strncat(kickpath, kickstarts_rom_names[kickstart], MAX_DPATH);
|
||||
for (i = 0; i<lstAvailableROMs.size(); ++i)
|
||||
{
|
||||
if (!strcasecmp(lstAvailableROMs[i]->Path, kickpath))
|
||||
{
|
||||
// Found it
|
||||
strncpy(p->romfile, kickpath, sizeof(p->romfile));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Search via name
|
||||
if (strlen(kickstarts_names[kickstart]) > 0)
|
||||
{
|
||||
for (i = 0; i<lstAvailableROMs.size(); ++i)
|
||||
{
|
||||
if (!strncasecmp(lstAvailableROMs[i]->Name, kickstarts_names[kickstart], strlen(kickstarts_names[kickstart])))
|
||||
{
|
||||
// Found it
|
||||
strncpy(p->romfile, lstAvailableROMs[i]->Path, sizeof(p->romfile));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// In this procedure, we use changed_prefs
|
||||
int loadconfig_old(struct uae_prefs* p, const char* orgpath)
|
||||
{
|
||||
char path[MAX_PATH];
|
||||
int cpu_level;
|
||||
|
||||
strcpy(path, orgpath);
|
||||
char* ptr = strstr(path, ".uae");
|
||||
if (ptr > nullptr)
|
||||
{
|
||||
*(ptr + 1) = '\0';
|
||||
strcat(path, "conf");
|
||||
}
|
||||
|
||||
FILE* f = fopen(path, "rt");
|
||||
if (!f)
|
||||
{
|
||||
write_log("No config file %s!\n", path);
|
||||
return 0;
|
||||
}
|
||||
// Set everthing to default and clear HD settings
|
||||
default_prefs(p, 0);
|
||||
SetDefaultMenuSettings(p);
|
||||
|
||||
char filebuffer[MAX_PATH];
|
||||
int dummy;
|
||||
|
||||
fscanf(f, "kickstart=%d\n", &kickstart);
|
||||
#if defined(AMIBERRY) || defined(ANDROIDSDL)
|
||||
fscanf(f, "scaling=%d\n", &dummy);
|
||||
#else
|
||||
fscanf(f, "scaling=%d\n", &mainMenu_enableHWscaling);
|
||||
#endif
|
||||
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(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
|
||||
fscanf(f, "systemclock=%d\n", &mainMenu_throttle);
|
||||
fscanf(f, "syncthreshold=%d\n", ×lice_mode);
|
||||
#endif
|
||||
fscanf(f, "frameskip=%d\n", &p->gfx_framerate);
|
||||
fscanf(f, "sound=%d\n", &p->produce_sound);
|
||||
if (p->produce_sound >= 10)
|
||||
{
|
||||
p->sound_stereo = 1;
|
||||
p->produce_sound -= 10;
|
||||
if (p->produce_sound > 0)
|
||||
p->produce_sound += 1;
|
||||
}
|
||||
else
|
||||
p->sound_stereo = 0;
|
||||
fscanf(f, "soundrate=%d\n", &p->sound_freq);
|
||||
fscanf(f, "autosave=%d\n", &dummy);
|
||||
int joybuffer = 0;
|
||||
fscanf(f, "joyconf=%d\n", &joybuffer);
|
||||
fscanf(f, "autofireRate=%d\n", &p->input_autofire_linecnt);
|
||||
p->input_autofire_linecnt = p->input_autofire_linecnt * 312;
|
||||
fscanf(f, "autofire=%d\n", &dummy);
|
||||
fscanf(f, "stylusOffset=%d\n", &dummy);
|
||||
fscanf(f, "scanlines=%d\n", &dummy);
|
||||
#if defined(AMIBERRY) || defined(ANDROIDSDL)
|
||||
fscanf(f, "ham=%d\n", &dummy);
|
||||
#else
|
||||
fscanf(f, "ham=%d\n", &mainMenu_ham);
|
||||
#endif
|
||||
fscanf(f, "enableScreenshots=%d\n", &dummy);
|
||||
fscanf(f, "floppyspeed=%d\n", &p->floppy_speed);
|
||||
fscanf(f, "drives=%d\n", &p->nr_floppies);
|
||||
fscanf(f, "videomode=%d\n", &p->ntscmode);
|
||||
if (p->ntscmode)
|
||||
p->chipset_refreshrate = 60;
|
||||
else
|
||||
p->chipset_refreshrate = 50;
|
||||
fscanf(f, "displayedLines=%d\n", &p->gfx_size.height);
|
||||
fscanf(f, "screenWidth=%d\n", &p->gfx_size.width);
|
||||
fscanf(f, "amiberry.custom_controls=%d\n", &p->customControls);
|
||||
fscanf(f, "amiberry.custom_up=%d\n", &p->custom_up);
|
||||
fscanf(f, "amiberry.custom_down=%d\n", &p->custom_down);
|
||||
fscanf(f, "amiberry.custom_left=%d\n", &p->custom_left);
|
||||
fscanf(f, "amiberry.custom_right=%d\n", &p->custom_right);
|
||||
fscanf(f, "amiberry.custom_a=%d\n", &p->custom_a);
|
||||
fscanf(f, "amiberry.custom_b=%d\n", &p->custom_b);
|
||||
fscanf(f, "amiberry.custom_x=%d\n", &p->custom_x);
|
||||
fscanf(f, "amiberry.custom_y=%d\n", &p->custom_y);
|
||||
fscanf(f, "amiberry.custom_l=%d\n", &p->custom_l);
|
||||
fscanf(f, "amiberry.custom_r=%d\n", &p->custom_r);
|
||||
fscanf(f, "amiberry.custom_play=%d\n", &p->custom_play);
|
||||
fscanf(f, "cpu=%d\n", &cpu_level);
|
||||
if (cpu_level > 0) // M68000
|
||||
// Was old format
|
||||
cpu_level = 2; // M68020
|
||||
fscanf(f, "chipset=%d\n", &p->chipset_mask);
|
||||
p->immediate_blits = (p->chipset_mask & 0x100) == 0x100;
|
||||
switch (p->chipset_mask & 0xff)
|
||||
{
|
||||
case 1:
|
||||
p->chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE;
|
||||
break;
|
||||
case 2:
|
||||
p->chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE | CSMASK_AGA;
|
||||
break;
|
||||
default:
|
||||
p->chipset_mask = CSMASK_ECS_AGNUS;
|
||||
break;
|
||||
}
|
||||
fscanf(f, "cpu=%d\n", &p->m68k_speed);
|
||||
if (p->m68k_speed < 0)
|
||||
{
|
||||
// New version of this option
|
||||
p->m68k_speed = -p->m68k_speed;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Old version (500 5T 1200 12T 12T2)
|
||||
if (p->m68k_speed >= 2)
|
||||
{
|
||||
// 1200: set to 68020 with 14 MHz
|
||||
cpu_level = 2; // M68020
|
||||
p->m68k_speed--;
|
||||
if (p->m68k_speed > 2)
|
||||
p->m68k_speed = 2;
|
||||
}
|
||||
}
|
||||
if (p->m68k_speed == 1)
|
||||
p->m68k_speed = M68K_SPEED_14MHZ_CYCLES;
|
||||
if (p->m68k_speed == 2)
|
||||
p->m68k_speed = M68K_SPEED_25MHZ_CYCLES;
|
||||
p->cachesize = 0;
|
||||
p->cpu_compatible = false;
|
||||
switch (cpu_level)
|
||||
{
|
||||
case 0:
|
||||
p->cpu_model = 68000;
|
||||
p->fpu_model = 0;
|
||||
break;
|
||||
case 1:
|
||||
p->cpu_model = 68010;
|
||||
p->fpu_model = 0;
|
||||
break;
|
||||
case 2:
|
||||
p->cpu_model = 68020;
|
||||
p->fpu_model = 0;
|
||||
break;
|
||||
case 3:
|
||||
p->cpu_model = 68020;
|
||||
p->fpu_model = 68881;
|
||||
break;
|
||||
case 4:
|
||||
p->cpu_model = 68040;
|
||||
p->fpu_model = 68881;
|
||||
break;
|
||||
}
|
||||
|
||||
disk_eject(0);
|
||||
disk_eject(1);
|
||||
disk_eject(2);
|
||||
disk_eject(3);
|
||||
fscanf(f, "df0=%s\n", &filebuffer);
|
||||
replace(filebuffer, ' ', '|');
|
||||
if (DISK_validate_filename(p, filebuffer, 0, nullptr, nullptr, nullptr))
|
||||
strcpy(p->floppyslots[0].df, filebuffer);
|
||||
else
|
||||
p->floppyslots[0].df[0] = 0;
|
||||
disk_insert(0, filebuffer);
|
||||
if (p->nr_floppies > 1)
|
||||
{
|
||||
memset(filebuffer, 0, 256);
|
||||
fscanf(f, "df1=%s\n", &filebuffer);
|
||||
replace(filebuffer, ' ', '|');
|
||||
if (DISK_validate_filename(p, filebuffer, 0, nullptr, nullptr, nullptr))
|
||||
strcpy(p->floppyslots[1].df, filebuffer);
|
||||
else
|
||||
p->floppyslots[1].df[0] = 0;
|
||||
disk_insert(1, filebuffer);
|
||||
}
|
||||
if (p->nr_floppies > 2)
|
||||
{
|
||||
memset(filebuffer, 0, 256);
|
||||
fscanf(f, "df2=%s\n", &filebuffer);
|
||||
replace(filebuffer, ' ', '|');
|
||||
if (DISK_validate_filename(p, filebuffer, 0, nullptr, nullptr, nullptr))
|
||||
strcpy(p->floppyslots[2].df, filebuffer);
|
||||
else
|
||||
p->floppyslots[2].df[0] = 0;
|
||||
disk_insert(2, filebuffer);
|
||||
}
|
||||
if (p->nr_floppies > 3)
|
||||
{
|
||||
memset(filebuffer, 0, sizeof filebuffer);
|
||||
fscanf(f, "df3=%s\n", &filebuffer);
|
||||
replace(filebuffer, ' ', '|');
|
||||
if (DISK_validate_filename(p, filebuffer, 0, nullptr, nullptr, nullptr))
|
||||
strcpy(p->floppyslots[3].df, filebuffer);
|
||||
else
|
||||
p->floppyslots[3].df[0] = 0;
|
||||
disk_insert(3, filebuffer);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
if (i < p->nr_floppies)
|
||||
p->floppyslots[i].dfxtype = DRV_35_DD;
|
||||
else
|
||||
p->floppyslots[i].dfxtype = DRV_NONE;
|
||||
}
|
||||
|
||||
fscanf(f, "chipmemory=%d\n", &p->chipmem_size);
|
||||
if (p->chipmem_size < 10)
|
||||
// Was saved in old format
|
||||
p->chipmem_size = 0x80000 << p->chipmem_size;
|
||||
fscanf(f, "slowmemory=%d\n", &p->bogomem_size);
|
||||
if (p->bogomem_size > 0 && p->bogomem_size < 10)
|
||||
// Was saved in old format
|
||||
p->bogomem_size =
|
||||
(p->bogomem_size <= 2) ? 0x080000 << p->bogomem_size :
|
||||
(p->bogomem_size == 3) ? 0x180000 : 0x1c0000;
|
||||
fscanf(f, "fastmemory=%d\n", &p->fastmem_size);
|
||||
if (p->fastmem_size > 0 && p->fastmem_size < 10)
|
||||
// Was saved in old format
|
||||
p->fastmem_size = 0x080000 << p->fastmem_size;
|
||||
|
||||
fclose(f);
|
||||
|
||||
CheckKickstart(p);
|
||||
|
||||
return 1;
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -647,9 +647,7 @@ extern int p96hsync_counter;
|
|||
#endif
|
||||
void copy_screen_8bit(uae_u8 *dst, uae_u8 *src, int bytes, uae_u32 *clut);
|
||||
void copy_screen_16bit_swap(uae_u8 *dst, uae_u8 *src, int bytes);
|
||||
void copy_screen_16bit_swap_arm(uae_u8 *dst, uae_u8 *src, int bytes);
|
||||
void copy_screen_32bit_to_16bit_neon(uae_u8 *dst, uae_u8 *src, int bytes);
|
||||
void copy_screen_32bit_to_16bit_arm(uae_u8 *dst, uae_u8 *src, int bytes);
|
||||
void copy_screen_32bit_to_16bit(uae_u8 *dst, uae_u8 *src, int bytes);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -50,7 +50,7 @@ extern void invalidate_block(blockinfo* bi);
|
|||
extern void raise_in_cl_list(blockinfo* bi);
|
||||
|
||||
|
||||
#define SHOW_DETAILS 0
|
||||
#define SHOW_DETAILS 2
|
||||
|
||||
#ifdef WITH_LOGGING
|
||||
#define output_log write_log
|
||||
|
|
|
@ -30,7 +30,9 @@
|
|||
#define CD32 /* CD32 emulation */
|
||||
/* #define CDTV */ /* CDTV emulation */
|
||||
/* #define PARALLEL_PORT */ /* parallel port emulation */
|
||||
/* #define PARALLEL_DIRECT */ /* direct parallel port emulation */
|
||||
/* #define SERIAL_PORT */ /* serial port emulation */
|
||||
/* #define SERIAL_ENET */ /* serial port UDP transport */
|
||||
/* #define SCSIEMU */ /* uaescsi.device emulation */
|
||||
/* #define UAESERIAL */ /* uaeserial.device emulation */
|
||||
#define FPUEMU /* FPU emulation */
|
||||
|
@ -66,11 +68,26 @@
|
|||
/* #define LOGITECHLCD */ /* Logitech G15 LCD */
|
||||
#define SAVESTATE /* State file support */
|
||||
/* #define A2091 */ /* A590/A2091 SCSI */
|
||||
/* #define NCR */ /* A4000T/A4091 SCSI */
|
||||
/* #define A2065 */ /* A2065 Ethernet card */
|
||||
/* #define GFXBOARD */ /* Hardware graphics board */
|
||||
/* #define NCR */ /* A4000T/A4091, 53C710/53C770 SCSI */
|
||||
/* #define NCR9X */ /* 53C9X SCSI */
|
||||
/* #define SANA2 */ /* SANA2 network driver */
|
||||
/* #define AMAX */ /* A-Max ROM adapater emulation */
|
||||
/* #define RETROPLATFORM */ /* Cloanto RetroPlayer support */
|
||||
/* #define INPUT_RECORDER */ /* Use input recoder */
|
||||
/* #define WITH_CHD */
|
||||
/* #define WITH_LUA */ /* lua scripting */
|
||||
/* #define WITH_UAENATIVE */
|
||||
/* #define WITH_SLIRP */
|
||||
/* #define WITH_BUILTIN_SLIRP */
|
||||
/* #define WITH_TABLETLIBRARY */
|
||||
/* #define WITH_UAENET_PCAP */
|
||||
/* #define WITH_PPC */
|
||||
/* #define WITH_QEMU_CPU */
|
||||
/* #define WITH_TOCCATA */
|
||||
/* #define WITH_PCI */
|
||||
/* #define WITH_X86 */
|
||||
|
||||
/* #define CUSTOM_SIMPLE */ /* simplified custom chipset emulation */
|
||||
/* #define CPUEMU_68000_ONLY */ /* drop 68010+ commands from CPUEMU_0 */
|
||||
/* #define ADDRESS_SPACE_24BIT */
|
||||
|
@ -94,6 +111,8 @@
|
|||
#undef D3D
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define SIZEOF_VOID_P 4
|
||||
|
||||
#if !defined(AHI)
|
||||
|
@ -205,7 +224,7 @@ typedef long uae_atomic;
|
|||
|
||||
/* Define if statfs takes 2 args and struct statfs has a field named f_bsize.
|
||||
[4.3BSD, SunOS 4, HP-UX, AIX PS/2] */
|
||||
//#define STAT_STATFS2_BSIZE 1
|
||||
/* #define STAT_STATFS2_BSIZE 1 */
|
||||
|
||||
/* Define if statfs takes 2 args and struct statfs has a field named f_fsize.
|
||||
[4.4BSD, NetBSD] */
|
||||
|
@ -219,7 +238,7 @@ typedef long uae_atomic;
|
|||
/* #undef STAT_STATFS4 */
|
||||
|
||||
/* Define if there is a function named statvfs. [SVR4] */
|
||||
#define STAT_STATVFS
|
||||
#define STAT_STATVFS
|
||||
|
||||
/* Define if the block counts reported by statfs may be truncated to 2GB
|
||||
and the correct values may be stored in the f_spare array.
|
||||
|
@ -311,9 +330,6 @@ typedef long uae_atomic;
|
|||
/* Define if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define if you have the setitimer function. */
|
||||
#define HAVE_SETITIMER 1
|
||||
|
||||
/* Define if you have the sigaction function. */
|
||||
#define HAVE_SIGACTION 1
|
||||
|
||||
|
@ -482,6 +498,9 @@ typedef long uae_atomic;
|
|||
#define FSDB_DIR_SEPARATOR '/'
|
||||
#define FSDB_DIR_SEPARATOR_S "/"
|
||||
|
||||
/* Define to 1 if `S_un' is a member of `struct in_addr'. */
|
||||
/* #un#def HAVE_STRUCT_IN_ADDR_S_UN */
|
||||
|
||||
#ifdef _GCCRES_
|
||||
#undef _GCCRES_
|
||||
#endif
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
* UAE - The Un*x Amiga Emulator
|
||||
*
|
||||
* Target specific stuff, Amiberry version
|
||||
*
|
||||
* Copyright 1997 Bernd Schmidt
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
@ -36,14 +34,22 @@ unsigned long target_lastsynctime(void);
|
|||
extern int screen_is_picasso;
|
||||
|
||||
void saveAdfDir(void);
|
||||
bool SetVSyncRate(int hz);
|
||||
void setCpuSpeed(void);
|
||||
void resetCpuSpeed(void);
|
||||
void update_display(struct uae_prefs *);
|
||||
void black_screen_now(void);
|
||||
void graphics_subshutdown(void);
|
||||
void graphics_subshutdown (void);
|
||||
void moveVertical(int value);
|
||||
|
||||
void amiberry_stop_sound();
|
||||
|
||||
void keyboard_settrans();
|
||||
void translate_amiberry_keys(int symbol, int newstate);
|
||||
#ifdef PANDORA
|
||||
int translate_pandora_keys(int symbol, int *modifier);
|
||||
#endif
|
||||
|
||||
void SimulateMouseOrJoy(int code, int keypressed);
|
||||
|
||||
#define REMAP_MOUSEBUTTON_LEFT -1
|
||||
|
@ -62,6 +68,9 @@ void SimulateMouseOrJoy(int code, int keypressed);
|
|||
|
||||
extern void free_AmigaMem();
|
||||
extern void alloc_AmigaMem();
|
||||
#ifdef WITH_LOGGING
|
||||
extern void ShowLiveInfo(char *msg);
|
||||
#endif
|
||||
|
||||
extern void fetch_configurationpath(char *out, int size);
|
||||
extern void set_configurationpath(char *newpath);
|
||||
|
@ -104,6 +113,8 @@ extern void gui_force_rtarea_hdchange(void);
|
|||
extern void gui_restart(void);
|
||||
extern bool hardfile_testrdb(const char *filename);
|
||||
|
||||
extern bool host_poweroff;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
1258
src/rommgr.cpp
1258
src/rommgr.cpp
File diff suppressed because it is too large
Load diff
322
src/sounddep/pandora_sound.cpp
Normal file
322
src/sounddep/pandora_sound.cpp
Normal file
|
@ -0,0 +1,322 @@
|
|||
/*
|
||||
* 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 "sounddep/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)
|
||||
{
|
||||
config_changed = 1;
|
||||
|
||||
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)
|
||||
{
|
||||
config_changed = 1;
|
||||
|
||||
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)
|
||||
{
|
||||
config_changed = 1;
|
||||
}
|
|
@ -7,15 +7,13 @@
|
|||
#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 "config.h"
|
||||
#include "uae.h"
|
||||
#include "options.h"
|
||||
#include "memory.h"
|
||||
|
@ -24,10 +22,16 @@
|
|||
#include "audio.h"
|
||||
#include "gensound.h"
|
||||
#include "sounddep/sound.h"
|
||||
#include "savestate.h"
|
||||
#include "SDL.h"
|
||||
#include <SDL.h>
|
||||
|
||||
uae_u16 sndbuffer[4][(SNDBUFFER_LEN + 32)*DEFAULT_SOUND_CHANNELS];
|
||||
#ifdef ANDROIDSDL
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
// "consumer" means the actual SDL sound output, as opposed to
|
||||
#define SOUND_CONSUMER_BUFFER_LENGTH (SNDBUFFER_LEN * SOUND_BUFFERS_COUNT / 4)
|
||||
|
||||
uae_u16 sndbuffer[SOUND_BUFFERS_COUNT][(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;
|
||||
|
@ -41,7 +45,6 @@ static int cdwrcnt = 0;
|
|||
static int cdrdcnt = 0;
|
||||
|
||||
static int have_sound = 0;
|
||||
static int lastfreq;
|
||||
|
||||
void update_sound(float clk)
|
||||
{
|
||||
|
@ -49,58 +52,57 @@ void update_sound(float clk)
|
|||
scaled_sample_evtime = int(evtime);
|
||||
}
|
||||
|
||||
static int sounddev = -1, s_oldrate = 0, s_oldbits = 0, s_oldstereo = 0;
|
||||
static int 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 rdcnt = 0;
|
||||
static int wrcnt = 0;
|
||||
|
||||
static void *sound_thread(void *unused)
|
||||
static void sound_copy_produced_block(void *ud, Uint8 *stream, int len)
|
||||
{
|
||||
int cnt = 0, sem_val = 0;
|
||||
if (currprefs.sound_stereo)
|
||||
{
|
||||
if (cdaudio_active && currprefs.sound_freq == 44100 && cdrdcnt < cdwrcnt)
|
||||
{
|
||||
for (int i = 0; i < SNDBUFFER_LEN * 2; ++i)
|
||||
sndbuffer[rdcnt & (SOUND_BUFFERS_COUNT - 1)][i] += cdaudio_buffer[cdrdcnt & (CDAUDIO_BUFFERS - 1)][i];
|
||||
cdrdcnt++;
|
||||
}
|
||||
|
||||
memcpy(stream, sndbuffer[rdcnt & (SOUND_BUFFERS_COUNT - 1)], len);
|
||||
}
|
||||
else
|
||||
memcpy(stream, sndbuffer[rdcnt & (SOUND_BUFFERS_COUNT - 1)], len);
|
||||
|
||||
if (wrcnt - rdcnt >= (SOUND_BUFFERS_COUNT / 2))
|
||||
{
|
||||
rdcnt++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void sound_thread_mixer(void *ud, Uint8 *stream, int len)
|
||||
{
|
||||
if (sound_thread_exit)
|
||||
return;
|
||||
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);
|
||||
}
|
||||
int sample_size = currprefs.sound_stereo ? 4 : 2;
|
||||
|
||||
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);
|
||||
while (len > 0) {
|
||||
int l = len < SNDBUFFER_LEN * sample_size ? len : SNDBUFFER_LEN * sample_size;
|
||||
sound_copy_produced_block(ud, stream, l);
|
||||
stream += l;
|
||||
len -= l;
|
||||
}
|
||||
|
||||
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;
|
||||
rdcnt = 0;
|
||||
wrcnt = 0;
|
||||
|
||||
cdbufpt = cdaudio_buffer[0];
|
||||
|
@ -115,57 +117,41 @@ static int amiberry_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;
|
||||
if(SDL_GetAudioStatus() == SDL_AUDIO_STOPPED) {
|
||||
init_soundbuffer_usage();
|
||||
|
||||
init_soundbuffer_usage();
|
||||
|
||||
s_oldrate = 0;
|
||||
s_oldbits = 0;
|
||||
s_oldstereo = 0;
|
||||
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);
|
||||
SDL_AudioSpec as;
|
||||
memset(&as, 0, sizeof(as));
|
||||
|
||||
as.freq = rate;
|
||||
as.format = (bits == 8 ? AUDIO_S8 : AUDIO_S16);
|
||||
as.channels = (stereo ? 2 : 1);
|
||||
as.samples = SOUND_CONSUMER_BUFFER_LENGTH;
|
||||
as.callback = sound_thread_mixer;
|
||||
|
||||
if (SDL_OpenAudio(&as, NULL))
|
||||
printf("Error when opening SDL audio !\n");
|
||||
|
||||
s_oldrate = rate;
|
||||
s_oldbits = bits;
|
||||
s_oldstereo = stereo;
|
||||
usleep(100000);
|
||||
|
||||
clear_sound_buffers();
|
||||
clear_cdaudio_buffers();
|
||||
|
||||
SDL_PauseAudio(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -173,37 +159,27 @@ static int amiberry_start_sound(int rate, int bits, int stereo)
|
|||
// this is meant to be called only once on exit
|
||||
void amiberry_stop_sound(void)
|
||||
{
|
||||
int valuesem;
|
||||
if (sound_thread_exit)
|
||||
printf("don't call amiberry_stop_sound more than once!\n");
|
||||
SDL_PauseAudio(1);
|
||||
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;
|
||||
if(sound_thread_exit == 0) {
|
||||
SDL_PauseAudio(1);
|
||||
sound_thread_exit = 1;
|
||||
SDL_CloseAudio();
|
||||
}
|
||||
}
|
||||
|
||||
void finish_sound_buffer(void)
|
||||
{
|
||||
output_cnt = wrcnt;
|
||||
|
||||
sem_post(&sound_sem);
|
||||
sem_wait(&sound_out_sem);
|
||||
|
||||
wrcnt++;
|
||||
sndbufpt = render_sndbuff = sndbuffer[wrcnt & 3];
|
||||
sndbufpt = render_sndbuff = sndbuffer[wrcnt & (SOUND_BUFFERS_COUNT - 1)];
|
||||
|
||||
if (currprefs.sound_stereo)
|
||||
finish_sndbuff = sndbufpt + SNDBUFFER_LEN;
|
||||
finish_sndbuff = sndbufpt + SNDBUFFER_LEN * 2;
|
||||
else
|
||||
finish_sndbuff = sndbufpt + SNDBUFFER_LEN / 2;
|
||||
finish_sndbuff = sndbufpt + SNDBUFFER_LEN;
|
||||
|
||||
while ((wrcnt & (SOUND_BUFFERS_COUNT - 1)) == (rdcnt & (SOUND_BUFFERS_COUNT - 1)))
|
||||
{
|
||||
usleep(500);
|
||||
}
|
||||
}
|
||||
|
||||
void pause_sound_buffer(void)
|
||||
|
@ -213,11 +189,11 @@ void pause_sound_buffer(void)
|
|||
|
||||
void restart_sound_buffer(void)
|
||||
{
|
||||
sndbufpt = render_sndbuff = sndbuffer[wrcnt & 3];
|
||||
sndbufpt = render_sndbuff = sndbuffer[wrcnt & (SOUND_BUFFERS_COUNT - 1)];
|
||||
if (currprefs.sound_stereo)
|
||||
finish_sndbuff = sndbufpt + SNDBUFFER_LEN;
|
||||
finish_sndbuff = sndbufpt + SNDBUFFER_LEN * 2;
|
||||
else
|
||||
finish_sndbuff = sndbufpt + SNDBUFFER_LEN / 2;
|
||||
finish_sndbuff = sndbufpt + SNDBUFFER_LEN;
|
||||
|
||||
cdbufpt = render_cdbuff = cdaudio_buffer[cdwrcnt & (CDAUDIO_BUFFERS - 1)];
|
||||
finish_cdbuff = cdbufpt + CDAUDIO_BUFFER_LEN * 2;
|
||||
|
@ -227,7 +203,7 @@ void finish_cdaudio_buffer(void)
|
|||
{
|
||||
cdwrcnt++;
|
||||
cdbufpt = render_cdbuff = cdaudio_buffer[cdwrcnt & (CDAUDIO_BUFFERS - 1)];
|
||||
finish_cdbuff = cdbufpt + CDAUDIO_BUFFER_LEN;
|
||||
finish_cdbuff = cdbufpt + CDAUDIO_BUFFER_LEN * 2;
|
||||
audio_activate();
|
||||
}
|
||||
|
||||
|
@ -243,7 +219,7 @@ bool cdaudio_catchup(void)
|
|||
/* Try to determine whether sound is available. This is only for GUI purposes. */
|
||||
int setup_sound(void)
|
||||
{
|
||||
if (amiberry_start_sound(currprefs.sound_freq, 16, currprefs.sound_stereo) != 0)
|
||||
if (pandora_start_sound(currprefs.sound_freq, 16, currprefs.sound_stereo) != 0)
|
||||
return 0;
|
||||
|
||||
sound_available = 1;
|
||||
|
@ -252,6 +228,7 @@ int setup_sound(void)
|
|||
|
||||
static int open_sound(void)
|
||||
{
|
||||
config_changed = 1;
|
||||
if (amiberry_start_sound(currprefs.sound_freq, 16, currprefs.sound_stereo) != 0)
|
||||
return 0;
|
||||
|
||||
|
@ -268,14 +245,11 @@ static int open_sound(void)
|
|||
|
||||
void close_sound(void)
|
||||
{
|
||||
config_changed = 1;
|
||||
if (!have_sound)
|
||||
return;
|
||||
|
||||
// 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 AMIBERRY
|
||||
//amiberry_stop_sound();
|
||||
#endif
|
||||
amiberry_stop_sound();
|
||||
have_sound = 0;
|
||||
}
|
||||
|
||||
|
@ -287,12 +261,12 @@ int init_sound(void)
|
|||
|
||||
void pause_sound(void)
|
||||
{
|
||||
//SDL_PauseAudio(1);
|
||||
SDL_PauseAudio(1);
|
||||
}
|
||||
|
||||
void resume_sound(void)
|
||||
{
|
||||
//SDL_PauseAudio(0);
|
||||
SDL_PauseAudio(0);
|
||||
}
|
||||
|
||||
void reset_sound(void)
|
||||
|
|
|
@ -6,15 +6,12 @@
|
|||
* Copyright 1997 Bernd Schmidt
|
||||
*/
|
||||
|
||||
#if defined(AMIBERRY) || defined(ANDROIDSDL)
|
||||
#define DEFAULT_SOUND_CHANNELS 2
|
||||
#else
|
||||
#define DEFAULT_SOUND_CHANNELS 1
|
||||
#endif
|
||||
|
||||
#define SOUND_BUFFERS_COUNT 4
|
||||
#define SNDBUFFER_LEN 2048
|
||||
|
||||
extern uae_u16 sndbuffer[4][(SNDBUFFER_LEN+32)*DEFAULT_SOUND_CHANNELS];
|
||||
extern uae_u16 sndbuffer[SOUND_BUFFERS_COUNT][(SNDBUFFER_LEN+32)*DEFAULT_SOUND_CHANNELS];
|
||||
extern uae_u16 *sndbufpt;
|
||||
extern uae_u16 *render_sndbuff;
|
||||
extern uae_u16 *finish_sndbuff;
|
||||
|
@ -40,7 +37,7 @@ STATIC_INLINE void set_sound_buffers (void)
|
|||
|
||||
STATIC_INLINE void clear_sound_buffers (void)
|
||||
{
|
||||
memset (sndbuffer, 0, 4 * (SNDBUFFER_LEN + 32) * DEFAULT_SOUND_CHANNELS);
|
||||
memset(sndbuffer, 0, sizeof(sndbuffer));
|
||||
}
|
||||
|
||||
#define PUT_SOUND_WORD(b) do { *sndbufpt = b; sndbufpt = sndbufpt + 1; } while (0)
|
||||
|
@ -70,7 +67,7 @@ extern bool cdaudio_active;
|
|||
|
||||
STATIC_INLINE void clear_cdaudio_buffers (void)
|
||||
{
|
||||
memset (cdaudio_buffer, 0, CDAUDIO_BUFFERS * (CDAUDIO_BUFFER_LEN + 32) * 2);
|
||||
memset (cdaudio_buffer, 0, sizeof(cdaudio_buffer));
|
||||
}
|
||||
|
||||
#define PUT_CDAUDIO_WORD_STEREO(l,r) do { *((uae_u32 *)cdbufpt) = (r << 16) | (l & 0xffff); cdbufpt = cdbufpt + 2; } while (0)
|
||||
|
|
|
@ -64,15 +64,17 @@ void draw_status_line_single(uae_u8 *buf, int y, int totalwidth)
|
|||
|
||||
x = totalwidth - TD_PADX - VISIBLE_LEDS * TD_WIDTH;
|
||||
x += 100 - (TD_WIDTH * (currprefs.nr_floppies - 1)) - TD_WIDTH;
|
||||
if (nr_units() < 1)
|
||||
x += TD_WIDTH;
|
||||
if(nr_units() < 1)
|
||||
x += TD_WIDTH;
|
||||
if(currprefs.pandora_hide_idle_led)
|
||||
x += TD_WIDTH;
|
||||
|
||||
if (picasso_on)
|
||||
memset(buf + (x - 4) * 2, 0, (screen->w - x + 4) * 2);
|
||||
else
|
||||
memset(buf + (x - 4) * gfxvidinfo.drawbuffer.pixbytes, 0, (gfxvidinfo.drawbuffer.outwidth - x + 4) * gfxvidinfo.drawbuffer.pixbytes);
|
||||
if(picasso_on)
|
||||
memset (buf + (x - 4) * 2, 0, (prSDLScreen->w - x + 4) * 2);
|
||||
else
|
||||
memset (buf + (x - 4) * gfxvidinfo.drawbuffer.pixbytes, 0, (gfxvidinfo.drawbuffer.outwidth - x + 4) * gfxvidinfo.drawbuffer.pixbytes);
|
||||
|
||||
for (led = -1; led < (currprefs.nr_floppies + 1); led++) {
|
||||
for (led = (currprefs.pandora_hide_idle_led == 0) ? -2 : -1; led < (currprefs.nr_floppies+1); led++) {
|
||||
int num1 = -1, num2 = -1, num3 = -1;
|
||||
|
||||
if (led == 0 && nr_units() < 1)
|
||||
|
|
|
@ -107,7 +107,10 @@ unsigned int define_trap(TrapHandler handler_func, int flags, const TCHAR *name)
|
|||
target_startup_msg(_T("Internal error"), _T("Ran out of emulator traps."));
|
||||
uae_restart(1, nullptr);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
int i;
|
||||
unsigned int trap_num;
|
||||
struct Trap *trap;
|
||||
uaecptr addr = here();
|
||||
|
||||
for (int i = 0; i < trap_count; i++) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue