diff --git a/.gitattributes b/.gitattributes index bdb0cabc..930ec5fb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,14 @@ # Auto detect text files and perform LF normalization -* text=auto +#* text=auto + +# Declare files that will always have CRLF line endings on checkout. +*.sln text eol=crlf + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.ico binary +*.bmp binary +*.ttf binary # Custom for Visual Studio *.cs diff=csharp @@ -14,4 +23,4 @@ *.pdf diff=astextplain *.PDF diff=astextplain *.rtf diff=astextplain -*.RTF diff=astextplain +*.RTF diff=astextplain \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8f684a04..383b2536 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ conf/*.uae conf/*.conf kickstarts/*.rom +kickstarts/*.key *.db *.dep *.ast @@ -20,17 +21,34 @@ kickstarts/*.rom *.npa01 *.idx *.dat -Amiberry/VisualGDB/Debug/Amiberry -Amiberry/VisualGDB/Release/Amiberry +VisualGDB/VisualGDB/Debug/Amiberry +VisualGDB/VisualGDB/Release/Amiberry *.sqlite -Amiberry/VisualGDB/Release-rpi2/Amiberry *.ipch *.db-shm *.db-wal *.TMP -VSLinux/obj/ARM/Debug/Amiberry.tlog/unsuccessfulbuild -*.lastbuildstate -*.tlog -src/guisan/lib/libguisan.a +*.d +VisualGDB/VisualGDB/Release/Amiberry-sdl2 +*.npa00-cfdc2249 +*.a +*.npa00-f5145647 VisualGDB/VisualGDB/Debug/Amiberry-sdl2 -VSLinux/obj/ARM/Debug/amiberry-sdl2 +*.npa00-25509379 +*.npa00-01e2471b +*.npa00-d8f9b35e +VisualGDB/VisualGDB/Debug/build68k +VisualGDB/VisualGDB/Debug/genblitter +VisualGDB/VisualGDB/Release/build68k +VisualGDB/VisualGDB/Release/genblitter +VisualGDB/VisualGDB/Release/genlinetoscr +VisualGDB/VisualGDB/Release/gencpu +VisualGDB/VisualGDB/Release/gencomp +*.tlog +VSLinux/obj/ARM/Debug/amiberry-sdl2-dev +VisualGDB/VisualGDB/Debug/Amiberry-sdl2-dev +VSLinux/obj/ARM/Debug/ +VisualGDB/Amiberry/VisualGDB/Debug/Amiberry-sdl1 +VisualGDB/Amiberry/VisualGDB/Debug/Amiberry-sdl2 +VisualGDB/Amiberry/VisualGDB/ +/amiberry* diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 00000000..f8b48885 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": null +} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 00000000..39bc0a78 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\Makefile", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/AndroidAppSettings.cfg b/AndroidAppSettings.cfg new file mode 100644 index 00000000..d31d835a --- /dev/null +++ b/AndroidAppSettings.cfg @@ -0,0 +1,253 @@ +# The application settings for Android libSDL port + +AppSettingVersion=19 + +# libSDL version to use (1.2 or 1.3, specify 1.3 for SDL2) +LibSdlVersion=1.2 + +# Specify application name (e.x. My Application) +AppName="Amiberry" + +# Specify reversed site name of application (e.x. com.mysite.myapp) +AppFullName=com.blitterstudio.amiberry + +# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape +ScreenOrientation=h + +# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer +InhibitSuspend=y + +# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...' +# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu +# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped +# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir - +# these files are put inside .apk package by build system +# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS +AppDataDownloadUrl="!!Data files|data16092017.zip^!!blankdisks files|blankdisks.zip" + +# Video color depth - 16 BPP is the fastest and supported for all modes, 24 bpp is supported only +# with SwVideoMode=y, SDL_OPENGL mode supports everything. (16)/(24)/(32) +VideoDepthBpp=16 + +# Enable OpenGL depth buffer (needed only for 3-d applications, small speed decrease) (y) or (n) +NeedDepthBuffer=n + +# Enable OpenGL stencil buffer (needed only for 3-d applications, small speed decrease) (y) or (n) +NeedStencilBuffer=n + +# Try to use GLES 2.x context - will revert to GLES 1.X if unsupported by device +# you need this option only if you're developing 3-d app (y) or (n) +NeedGles2=n + +# Application uses software video buffer - you're calling SDL_SetVideoMode() without SDL_HWSURFACE and without SDL_OPENGL, +# this will allow small speed optimization. Enable this even when you're using SDL_HWSURFACE. (y) or (n) +SwVideoMode=y + +# Application video output will be resized to fit into native device screen (y)/(n) +SdlVideoResize=y + +# Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n) +SdlVideoResizeKeepAspect=n + +# Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread - +# enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n) +CompatibilityHacks=n + +# Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n) +CompatibilityHacksStaticInit=n + +# On-screen Android soft text input emulates hardware keyboard, this will only work with Hackers Keyboard app (y)/(n) +CompatibilityHacksTextInputEmulatesHwKeyboard=y +TextInputKeyboard=3 +# Hack for broken devices: prevent audio chopping, by sleeping a bit after pushing each audio chunk (y)/(n) +CompatibilityHacksPreventAudioChopping=n + +# Hack for broken apps: application ignores audio buffer size returned by SDL (y)/(n) +CompatibilityHacksAppIgnoresAudioBufferSize=n + +# Hack for VCMI: preload additional shared libraries before aplication start +CompatibilityHacksAdditionalPreloadedSharedLibraries="" + +# Hack for Free Heroes 2, which redraws the screen inside SDL_PumpEvents(): slow and compatible SDL event queue - +# do not use it with accelerometer/gyroscope, or your app may freeze at random (y)/(n) +CompatibilityHacksSlowCompatibleEventQueue=n + +# Save and restore OpenGL state when drawing on-screen keyboard for apps that use SDL_OPENGL +CompatibilityHacksTouchscreenKeyboardSaveRestoreOpenGLState=n + +# Application uses SDL_UpdateRects() properly, and does not draw in any region outside those rects. +# This improves drawing speed, but I know only one application that does that, and it's written by me (y)/(n) +CompatibilityHacksProperUsageOfSDL_UpdateRects=n + +# Application uses mouse (y) or (n), this will show mouse emulation dialog to the user +AppUsesMouse=y + +# Application needs two-button mouse, will also enable advanced point-and-click features (y) or (n) +AppNeedsTwoButtonMouse=y + +# Show SDL mouse cursor, for applications that do not draw cursor at all (y) or (n) +ShowMouseCursor=n + +# Force relative (laptop) mouse movement mode, useful when both on-screen keyboard and mouse are needed (y) or (n) +ForceRelativeMouseMode=y + +# Application needs arrow keys (y) or (n), will show on-screen dpad/joystick (y) or (n) +AppNeedsArrowKeys=y + +# Application needs text input (y) or (n), enables button for text input on screen +AppNeedsTextInput=y + +# Application uses joystick (y) or (n), the on-screen DPAD will be used as joystick 0 axes 0-1 +AppUsesJoystick=n + +# Application uses second on-screen joystick, as SDL joystick 0 axes 2-3 (y)/(n) +AppUsesSecondJoystick=n + +# Application uses accelerometer (y) or (n), the accelerometer will be used as joystick 1 axes 0-1 and 5-7 +AppUsesAccelerometer=n + +# Application uses gyroscope (y) or (n), the gyroscope will be used as joystick 1 axes 2-4 +AppUsesGyroscope=n + +# Application uses multitouch (y) or (n), multitouch events are passed as SDL_JOYBALLMOTION events for the joystick 0 +AppUsesMultitouch=y + +# Application records audio (it will use any available source, such a s microphone) +# API is defined in file SDL_android.h: int SDL_ANDROID_OpenAudioRecording(SDL_AudioSpec *spec); void SDL_ANDROID_CloseAudioRecording(void); +# This option will add additional permission to Android manifest (y)/(n) +AppRecordsAudio=n + +# Application needs to access SD card. If your data files are bigger than 5 Mb, enable it. (y) / (n) +AccessSdCard=y + +# Immersive mode - Android will hide on-screen Home/Back keys. Looks bad if you invoke Android keyboard. (y) / (n) +ImmersiveMode= + +# Application implements Android-specific routines to put to background, and will not draw anything to screen +# between SDL_ACTIVEEVENT lost / gained notifications - you should check for them +# rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n) +# This option is reported to be buggy, sometimes failing to restore video state +NonBlockingSwapBuffers=n + +# Redefine common hardware keys to SDL keysyms +# BACK hardware key is available on all devices, MENU is available on pre-ICS devices, other keys may be absent +# SEARCH and CALL by default return same keycode as DPAD_CENTER - one of those keys is available on most devices +# Use word NO_REMAP if you want to preserve native functionality for certain key (volume keys are 3-rd and 4-th) +# Keys: TOUCHSCREEN (works only when AppUsesMouse=n), DPAD_CENTER/SEARCH, VOLUMEUP, VOLUMEDOWN, MENU, BACK, CAMERA +RedefinedKeys="NO_REMAP RETURN NO_REMAP NO_REMAP F12 F12 NO_REMAP RETURN NO_REMAP NO_REMAP" + +# Number of virtual keyboard keys (currently 6 is maximum) +AppTouchscreenKeyboardKeysAmount=4 + +# Number of virtual keyboard keys that support autofire (currently 2 is maximum) +AppTouchscreenKeyboardKeysAmountAutoFire=2 + +# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right) +RedefinedKeysScreenKb="HOME END PAGEDOWN PAGEUP RCTRL F13 UNKNOWN UNKNOWN UNKNOWN" + +# Names for on-screen keyboard keys, such as Fire, Jump, Run etc, separated by spaces, they are used in SDL config menu +RedefinedKeysScreenKbNames="HOME END PAGEDOWN PAGEUP RCTRL F13 UNKNOWN UNKNOWN UNKNOWN" + +# On-screen keys theme +# 0 = Ultimate Droid by Sean Stieber (green, with gamepad joystick) +# 1 = Simple Theme by Beholder (white, with gamepad joystick) +# 2 = Sun by Sirea (yellow, with round joystick) +# 3 = Keen by Gerstrong (multicolor, with round joystick) +TouchscreenKeysTheme=2 + +# Redefine gamepad keys to SDL keysyms, button order is: +# A B X Y L1 R1 L2 R2 LThumb RThumb +RedefinedKeysGamepad="PAGEDOWN END HOME PAGEUP F13 RCTRL F11 F15 PAGEDOWN HOME F12" + +# How long to show startup menu button, in msec, 0 to disable startup menu +StartupMenuButtonTimeout=3000 + +# Menu items to hide from startup menu, available menu items: +# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout +HiddenMenuOptions='SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.JoystickMouseConfig' + +# Menu items to show at startup - this is Java code snippet, leave empty for default +# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration() +# Available menu items: +# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout +FirstStartMenuOptions='' + +# GCC version, or 'clang' for CLANG +NDK_TOOLCHAIN_VERSION=4.9 + +# Enable multi-ABI binary, with hardware FPU support - it will also work on old devices, +# but .apk size is 2x bigger (y) / (n) / (x86) / (all) +MultiABI='armeabi-v7a' + +# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower +AppMinimumRAM=256 + +# Application version code (integer) +AppVersionCode=010218 + +# Application user-visible version name (string) +AppVersionName="1.0.0.18" + +# Reset SDL config when updating application to the new version (y) / (n) +ResetSdlConfigForThisVersion=n + +# Delete application data files when upgrading (specify file/dir paths separated by spaces) +DeleteFilesOnUpgrade=" " + +# Optional shared libraries to compile - removing some of them will save space +# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed +# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2 +CompiledLibraries="vorbis flac ogg mpg123 mpeg2 xml2 sdl_image sdl_ttf guichan" + +# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n) +CustomBuildScript=y + +# Aditional CFLAGS for application +AppCflags='' + +# Additional LDFLAGS for application +AppLdflags='' + +# If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable +AppOverlapsSystemHeaders= + +# Build only following subdirs (empty will build all dirs, ignored with custom script) +AppSubdirsBuild='' + +# Exclude these files from build +AppBuildExclude='' + +# Application command line parameters, including app name as 0-th param +AppCmdline='uae4arm -f' + +# Here you may type readme text, which will be shown during startup. Format is: +# Text in English, use \\\\n to separate lines^de:Text in Deutsch^ru:Text in Russian, and so on (that's four backslashes, nice isn't it?) +ReadmeText='^You may press "Home" now - the data will be downloaded in background' + +# Screen size is used by Google Play to prevent an app to be installed on devices with smaller screens +# Minimum screen size that application supports: (s)mall / (m)edium / (l)arge +MinimumScreenSize=s + +# Your AdMob Publisher ID, (n) if you don't want advertisements +AdmobPublisherId=n + +# Your AdMob test device ID, to receive a test ad +AdmobTestDeviceId= + +# Your AdMob banner size (BANNER/IAB_BANNER/IAB_LEADERBOARD/IAB_MRECT/IAB_WIDE_SKYSCRAPER/SMART_BANNER) +AdmobBannerSize= + +# On-screen dpad/joystick will appear under finger when it touches the screen (y) or (n) +# Joystick always follows finger, so moving mouse requires touching the screen with other finger +FloatingScreenJoystick=n + +# Application does not call SDL_Flip() or SDL_UpdateRects() after mouse click (ScummVM and all Amiga emulators do that) - +# force screen update by moving mouse cursor a little after each click (y) or (n) +CompatibilityHacksForceScreenUpdateMouseClick=y + +# Hide Android system mouse cursor image when USB mouse is attached (y) or (n) - the app must draw it's own mouse cursor +HideSystemMousePointer=y + +# The app will open files with following extension, file path will be added to commandline params +AppOpenFileExtension='uae Uae UAE' + diff --git a/AndroidBuild.sh b/AndroidBuild.sh new file mode 100644 index 00000000..fbe2154d --- /dev/null +++ b/AndroidBuild.sh @@ -0,0 +1,13 @@ +#!/bin/sh + + +LOCAL_PATH=`dirname $0` +LOCAL_PATH=`cd $LOCAL_PATH && pwd` + +JOBS=4 + +ln -sf libsdl_ttf.so $LOCAL_PATH/../../../obj/local/$1/libSDL_ttf.so +ln -sf libguichan.so $LOCAL_PATH/../../../obj/local/$1/libguichan_sdl.so + +../setEnvironment-$1.sh sh -c "make -j$JOBS" && mv -f amiberry-android libapplication-$1.so + diff --git a/AndroidData/blankdisks.zip b/AndroidData/blankdisks.zip new file mode 100644 index 00000000..36cded7c Binary files /dev/null and b/AndroidData/blankdisks.zip differ diff --git a/AndroidData/data16092017.zip b/AndroidData/data16092017.zip new file mode 100644 index 00000000..4c121bea Binary files /dev/null and b/AndroidData/data16092017.zip differ diff --git a/Makefile b/Makefile index 822b48e0..32c75936 100644 --- a/Makefile +++ b/Makefile @@ -1,74 +1,227 @@ +# Default platform is rpi3 / SDL1 + ifeq ($(PLATFORM),) PLATFORM = rpi3 endif +# +# DispmanX Common flags for both SDL1 and SDL2 (RPI-specific) +# +DISPMANX_FLAGS = -DUSE_DISPMANX -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads +DISPMANX_LDFLAGS = -lbcm_host -lvchiq_arm -L/opt/vc/lib + +CPPFLAGS+= -MD -MP +#DEBUG=1 +#GCC_PROFILE=1 +#GEN_PROFILE=1 +#USE_PROFILE=1 +#WITH_LOGGING=1 +#SANITIZE=1 + +# +# SDL1 targets +# ifeq ($(PLATFORM),rpi3) - CPU_FLAGS += -march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard - MORE_CFLAGS += -DARMV6T2 -DUSE_ARMNEON + CPU_FLAGS += -march=armv8-a -mtune=cortex-a53 -mfpu=neon-fp-armv8 + CFLAGS += ${DISPMANX_FLAGS} -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL1 + LDFLAGS += ${DISPMANX_LDFLAGS} + HAVE_NEON = 1 + NAME = amiberry-rpi3-sdl1-dev + else ifeq ($(PLATFORM),rpi2) - CPU_FLAGS += -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard - MORE_CFLAGS += -DARMV6T2 -DUSE_ARMNEON + CPU_FLAGS += -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 + CFLAGS += ${DISPMANX_FLAGS} -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL1 + LDFLAGS += ${DISPMANX_LDFLAGS} + HAVE_NEON = 1 + NAME = amiberry-rpi2-sdl1-dev + else ifeq ($(PLATFORM),rpi1) - CPU_FLAGS += -march=armv6zk -mfpu=vfp -mfloat-abi=hard + CPU_FLAGS += -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp + CFLAGS += ${DISPMANX_FLAGS} -DUSE_SDL1 + LDFLAGS += ${DISPMANX_LDFLAGS} + NAME = amiberry-rpi1-sdl1-dev + +else ifeq ($(PLATFORM),xu4) + CPU_FLAGS += -march=armv7ve -mcpu=cortex-a15.cortex-a7 -mtune=cortex-a15.cortex-a7 -mfpu=neon-vfpv4 + CFLAGS += -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL1 -DMALI_GPU + HAVE_NEON = 1 + NAME = amiberry-xu4-sdl1-dev + ifdef DEBUG + # Otherwise we'll get compilation errors, check https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here + # quote: The assembly code in bn_mul.h is optimized for the ARM platform and uses some registers, including r7 to efficiently do an operation. GCC also uses r7 as the frame pointer under ARM Thumb assembly. + MORE_CFLAGS += -fomit-frame-pointer + endif + +else ifeq ($(PLATFORM),android) + CPU_FLAGS += -mfpu=neon -mfloat-abi=soft + DEFS += -DANDROIDSDL + ANDROID = 1 + HAVE_NEON = 1 + HAVE_SDL_DISPLAY = 1 + NAME = amiberry-android + +# +# SDL2 with DispmanX targets (RPI only) +# +else ifeq ($(PLATFORM),rpi3-sdl2-dispmanx) +USE_SDL2 = 1 + CPU_FLAGS += -march=armv8-a -mtune=cortex-a53 -mfpu=neon-fp-armv8 + CFLAGS += -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL2 ${DISPMANX_FLAGS} + LDFLAGS += ${DISPMANX_LDFLAGS} + HAVE_NEON = 1 + NAME = amiberry-rpi3-sdl2-dispmanx-dev + +else ifeq ($(PLATFORM),rpi2-sdl2-dispmanx) +USE_SDL2 = 1 + CPU_FLAGS += -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 + CFLAGS += -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL2 ${DISPMANX_FLAGS} + LDFLAGS += ${DISPMANX_LDFLAGS} + HAVE_NEON = 1 + NAME = amiberry-rpi2-sdl2-dispmanx-dev + +else ifeq ($(PLATFORM),rpi1-sdl2-dispmanx) +USE_SDL2 = 1 + CPU_FLAGS += -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp + CFLAGS += -DUSE_SDL2 ${DISPMANX_FLAGS} + LDFLAGS += ${DISPMANX_LDFLAGS} + NAME = amiberry-rpi1-sdl2-dispmanx-dev + +# +# SDL2 targets +# +else ifeq ($(PLATFORM),rpi3-sdl2) +USE_SDL2 = 1 + CPU_FLAGS += -march=armv8-a -mtune=cortex-a53 -mfpu=neon-fp-armv8 + CFLAGS += -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL2 + HAVE_NEON = 1 + NAME = amiberry-rpi3-sdl2-dev + +else ifeq ($(PLATFORM),rpi2-sdl2) +USE_SDL2 = 1 + CPU_FLAGS += -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 + CFLAGS += -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL2 + HAVE_NEON = 1 + NAME = amiberry-rpi2-sdl2-dev + +else ifeq ($(PLATFORM),rpi1-sdl2) +USE_SDL2 = 1 + CPU_FLAGS += -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp + CFLAGS += -DUSE_SDL2 + NAME = amiberry-rpi1-sdl2-dev + +else ifeq ($(PLATFORM),pine64) +USE_SDL2 = 1 + CPU_FLAGS += -march=armv7-a -mfpu=vfpv3-d16 + CFLAGS += -DARMV6T2 -D__arm__ -DUSE_SDL2 + CC = arm-linux-gnueabihf-gcc + CXX = arm-linux-gnueabihf-g++ + NAME = amiberry-pine64-sdl2-dev + +else ifeq ($(PLATFORM),xu4-sdl2) +USE_SDL2 = 1 + CPU_FLAGS += -march=armv7ve -mcpu=cortex-a15.cortex-a7 -mtune=cortex-a15.cortex-a7 -mfpu=neon-vfpv4 + CFLAGS += -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL2 -DMALI_GPU + HAVE_NEON = 1 + NAME = amiberry-xu4-sdl2-dev + ifdef DEBUG + # Otherwise we'll get compilation errors, check https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here + # quote: The assembly code in bn_mul.h is optimized for the ARM platform and uses some registers, including r7 to efficiently do an operation. GCC also uses r7 as the frame pointer under ARM Thumb assembly. + MORE_CFLAGS += -fomit-frame-pointer + endif + +else ifeq ($(PLATFORM),tinker) +USE_SDL2 = 1 + CPU_FLAGS += -march=armv7-a -mtune=cortex-a17 -mfpu=neon-vfpv4 + CFLAGS += -DARMV6T2 -DUSE_ARMNEON -DUSE_SDL2 -DTINKER -DUSE_RENDER_THREAD -DMALI_GPU -I/usr/local/include + LDFLAGS += -L/usr/local/lib + HAVE_NEON = 1 + NAME = amiberry-tinker-dev + +else ifeq ($(PLATFORM),android-sdl2) +USE_SDL2 = 1 + CPU_FLAGS += -mfpu=neon -mfloat-abi=soft + DEFS += -DANDROIDSDL + ANDROID = 1 + HAVE_NEON = 1 + HAVE_SDL_DISPLAY = 1 + NAME = amiberry-android endif -NAME = amiberry RM = rm -f CC = gcc CXX = g++ STRIP = strip - PROG = $(NAME) +# +# SDL1 options +# +ifndef USE_SDL2 all: $(PROG) -#DEBUG=1 -#TRACER=1 - -PANDORA=1 -#GEN_PROFILE=1 -#USE_PROFILE=1 - SDL_CFLAGS = `sdl-config --cflags` +LDFLAGS += -lSDL -lSDL_image -lSDL_ttf -lguichan_sdl -lguichan +endif -DEFS += `xml2-config --cflags` -DEFS += -DCPU_arm -DARMV6_ASSEMBLY -DPANDORA -DPICASSO96 -DEFS += -DWITH_INGAME_WARNING -DRASPBERRY -DCAPSLOCK_DEBIAN_WORKAROUND -DEFS += -DROM_PATH_PREFIX=\"./\" -DDATA_PREFIX=\"./data/\" -DSAVE_PREFIX=\"./saves/\" -DEFS += -DUSE_SDL +# +# SDL2 options +# +ifdef USE_SDL2 +all: guisan $(PROG) -MORE_CFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -MORE_CFLAGS += -Isrc -Isrc/osdep -Isrc/threaddep -Isrc/include -MORE_CFLAGS += -Wno-unused -Wno-format -DGCCCONSTFUNC="__attribute__((const))" -MORE_CFLAGS += -fexceptions -fpermissive +SDL_CFLAGS = `sdl2-config --cflags --libs` +CPPFLAGS += -Isrc/guisan/include +LDFLAGS += -lSDL2 -lSDL2_image -lSDL2_ttf -lguisan -Lsrc/guisan/lib +endif -LDFLAGS += -lSDL -lpthread -lm -lz -lSDL_image -lpng -lrt -lxml2 -lFLAC -lmpg123 -ldl -LDFLAGS += -lSDL_ttf -lguichan_sdl -lguichan -lbcm_host -L/opt/vc/lib +# +# Common options +# +CPPFLAGS += -Isrc -Isrc/osdep -Isrc/threaddep -Isrc/include -Isrc/archivers +DEFS += `xml2-config --cflags` +DEFS += -DAMIBERRY -DARMV6_ASSEMBLY ifndef DEBUG -MORE_CFLAGS += -Ofast -pipe + CFLAGS += -std=gnu++14 -Ofast -frename-registers else -MORE_CFLAGS += -g -DDEBUG -Wl,--export-dynamic - -ifdef TRACER -TRACE_CFLAGS = -DTRACER -finstrument-functions -Wall -rdynamic + CFLAGS += -std=gnu++14 -g -rdynamic -funwind-tables -mapcs-frame -DDEBUG -Wl,--export-dynamic endif +ifdef WITH_LOGGING + CFLAGS += -DWITH_LOGGING endif +ifdef GCC_PROFILE + CFLAGS += -pg + LDFLAGS += -pg +endif + +ifdef GEN_PROFILE + CFLAGS += -fprofile-generate -fprofile-arcs -fvpt + LDFLAGS += -lgcov +endif + +ifdef USE_PROFILE + CFLAGS += -fprofile-use -fprofile-correction -fbranch-probabilities -fvpt + LDFLAGS += -lgcov +endif + +ifdef SANITIZE + LDFLAGS += -lasan + CFLAGS += -fsanitize=leak -fsanitize-recover=address +endif + +LDFLAGS += -lpthread -lz -lpng -lrt -lxml2 -lFLAC -lmpg123 -ldl -lmpeg2convert -lmpeg2 + ASFLAGS += $(CPU_FLAGS) -CXXFLAGS += $(SDL_CFLAGS) $(CPU_FLAGS) $(DEFS) $(MORE_CFLAGS) +export CFLAGS += $(SDL_CFLAGS) $(CPU_FLAGS) $(DEFS) $(EXTRA_CFLAGS) -DGCCCONSTFUNC="__attribute__((const))" -pipe -Wno-unused -Wno-format +export CXXFLAGS += $(CFLAGS) -ifdef GEN_PROFILE -MORE_CFLAGS += -fprofile-generate=/home/pi/projects/amiberry -fprofile-arcs -fvpt -endif -ifdef USE_PROFILE -MORE_CFLAGS += -fprofile-use -fbranch-probabilities -fvpt -endif OBJS = \ src/akiko.o \ + src/ar.o \ src/aros.rom.o \ src/audio.o \ src/autoconf.o \ @@ -79,31 +232,42 @@ OBJS = \ src/blkdev_cdimage.o \ src/bsdsocket.o \ src/calc.o \ + src/cd32_fmv.o \ + src/cd32_fmv_genlock.o \ src/cdrom.o \ src/cfgfile.o \ src/cia.o \ src/crc32.o \ src/custom.o \ + src/def_icons.o \ + src/devices.o \ src/disk.o \ src/diskutil.o \ src/drawing.o \ src/events.o \ src/expansion.o \ + src/fdi2raw.o \ src/filesys.o \ + src/flashrom.o \ src/fpp.o \ src/fsdb.o \ src/fsdb_unix.o \ src/fsusage.o \ + src/gayle.o \ src/gfxboard.o \ src/gfxutil.o \ src/hardfile.o \ + src/hrtmon.rom.o \ + src/ide.o \ src/inputdevice.o \ src/keybuf.o \ src/main.o \ src/memory.o \ src/native2amiga.o \ src/rommgr.o \ + src/rtc.o \ src/savestate.o \ + src/scsi.o \ src/statusline.o \ src/traps.o \ src/uaelib.o \ @@ -111,18 +275,23 @@ OBJS = \ src/zfile.o \ src/zfile_archive.o \ src/archivers/7z/7zAlloc.o \ - src/archivers/7z/7zDecode.o \ - src/archivers/7z/7zExtract.o \ - src/archivers/7z/7zHeader.o \ - src/archivers/7z/7zIn.o \ - src/archivers/7z/7zItem.o \ src/archivers/7z/7zBuf.o \ src/archivers/7z/7zCrc.o \ + src/archivers/7z/7zCrcOpt.o \ + src/archivers/7z/7zDec.o \ + src/archivers/7z/7zIn.o \ src/archivers/7z/7zStream.o \ src/archivers/7z/Bcj2.o \ src/archivers/7z/Bra.o \ src/archivers/7z/Bra86.o \ src/archivers/7z/LzmaDec.o \ + src/archivers/7z/Lzma2Dec.o \ + src/archivers/7z/BraIA64.o \ + src/archivers/7z/Delta.o \ + src/archivers/7z/Sha256.o \ + src/archivers/7z/Xz.o \ + src/archivers/7z/XzCrc64.o \ + src/archivers/7z/XzDec.o \ src/archivers/dms/crc_csum.o \ src/archivers/dms/getbits.o \ src/archivers/dms/maketbl.o \ @@ -146,6 +315,7 @@ OBJS = \ src/archivers/lha/uae_lha.o \ src/archivers/lha/util.o \ src/archivers/lzx/unlzx.o \ + src/archivers/mp2/kjmp2.o \ src/archivers/wrp/warp.o \ src/archivers/zip/unzip.o \ src/machdep/support.o \ @@ -153,58 +323,71 @@ OBJS = \ src/osdep/cda_play.o \ src/osdep/charset.o \ src/osdep/fsdb_host.o \ - src/osdep/hardfile_pandora.o \ + src/osdep/amiberry_hardfile.o \ src/osdep/keyboard.o \ src/osdep/mp3decoder.o \ + src/osdep/picasso96.o \ src/osdep/writelog.o \ - src/osdep/pandora.o \ - src/osdep/pandora_filesys.o \ - src/osdep/pandora_input.o \ - src/osdep/pandora_gui.o \ - src/osdep/pandora_rp9.o \ - src/osdep/pandora_mem.o \ + src/osdep/amiberry.o \ + src/osdep/amiberry_filesys.o \ + src/osdep/amiberry_input.o \ + src/osdep/amiberry_gfx.o \ + src/osdep/amiberry_gui.o \ + src/osdep/amiberry_rp9.o \ + src/osdep/amiberry_mem.o \ src/osdep/sigsegv_handler.o \ - src/osdep/menu/menu_config.o \ - src/sounddep/sound_sdl_new.o \ + src/sounddep/sound.o \ src/osdep/gui/UaeRadioButton.o \ src/osdep/gui/UaeDropDown.o \ src/osdep/gui/UaeCheckBox.o \ src/osdep/gui/UaeListBox.o \ src/osdep/gui/InGameMessage.o \ src/osdep/gui/SelectorEntry.o \ + src/osdep/gui/ShowHelp.o \ src/osdep/gui/ShowMessage.o \ src/osdep/gui/SelectFolder.o \ src/osdep/gui/SelectFile.o \ src/osdep/gui/CreateFilesysHardfile.o \ src/osdep/gui/EditFilesysVirtual.o \ src/osdep/gui/EditFilesysHardfile.o \ + src/osdep/gui/PanelAbout.o \ src/osdep/gui/PanelPaths.o \ + src/osdep/gui/PanelQuickstart.o \ src/osdep/gui/PanelConfig.o \ src/osdep/gui/PanelCPU.o \ src/osdep/gui/PanelChipset.o \ + src/osdep/gui/PanelCustom.o \ src/osdep/gui/PanelROM.o \ src/osdep/gui/PanelRAM.o \ src/osdep/gui/PanelFloppy.o \ src/osdep/gui/PanelHD.o \ + src/osdep/gui/PanelInput.o \ src/osdep/gui/PanelDisplay.o \ src/osdep/gui/PanelSound.o \ - src/osdep/gui/PanelInput.o \ src/osdep/gui/PanelMisc.o \ src/osdep/gui/PanelSavestate.o \ src/osdep/gui/main_window.o \ src/osdep/gui/Navigation.o -OBJS += src/osdep/rasp_gfx.o - +ifndef USE_SDL2 OBJS += src/osdep/gui/sdltruetypefont.o -OBJS += src/osdep/picasso96.o - -ifeq ($(PLATFORM),rpi1) - OBJS += src/osdep/arm_helper.o -else - OBJS += src/osdep/neon_helper.o endif +ifeq ($(ANDROID), 1) +OBJS += src/osdep/gui/androidsdl_event.o +OBJS += src/osdep/gui/PanelOnScreen.o +endif + +ifdef HAVE_NEON +OBJS += src/osdep/neon_helper.o +src/osdep/neon_helper.o: src/osdep/neon_helper.s + $(CXX) $(CPU_FLAGS) -Wall -o src/osdep/neon_helper.o -c src/osdep/neon_helper.s +else +OBJS += src/osdep/arm_helper.o +src/osdep/arm_helper.o: src/osdep/arm_helper.s + $(CXX) $(CPU_FLAGS) -Wall -o src/osdep/arm_helper.o -c src/osdep/arm_helper.s +endif + OBJS += src/newcpu.o OBJS += src/newcpu_common.o OBJS += src/readcpu.o @@ -213,26 +396,89 @@ OBJS += src/cpustbl.o OBJS += src/cpuemu_0.o OBJS += src/cpuemu_4.o OBJS += src/cpuemu_11.o +OBJS += src/cpuemu_40.o +OBJS += src/cpuemu_44.o OBJS += src/jit/compemu.o OBJS += src/jit/compstbl.o OBJS += src/jit/compemu_fpp.o OBJS += src/jit/compemu_support.o -src/osdep/neon_helper.o: src/osdep/neon_helper.s - $(CXX) $(CPU_FLAGS) -Wall -o src/osdep/neon_helper.o -c src/osdep/neon_helper.s +-include $(OBJS:%.o=%.d) -src/osdep/arm_helper.o: src/osdep/arm_helper.s - $(CXX) $(CPU_FLAGS) -Wall -o src/osdep/arm_helper.o -c src/osdep/arm_helper.s - - -src/trace.o: src/trace.c - $(CC) $(MORE_CFLAGS) -c src/trace.c -o src/trace.o +src/jit/compemu_support.o: src/jit/compemu_support.cpp + $(CXX) $(CXXFLAGS) $(CPPFLAGS) -fomit-frame-pointer -o src/jit/compemu_support.o -c src/jit/compemu_support.cpp $(PROG): $(OBJS) - $(CXX) $(CXXFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS) + $(CXX) -o $(PROG) $(OBJS) $(LDFLAGS) ifndef DEBUG +# want to keep a copy of the binary before stripping? Then enable the below line +# cp $(PROG) $(PROG)-debug $(STRIP) $(PROG) endif +ASMS = \ + src/audio.s \ + src/autoconf.s \ + src/blitfunc.s \ + src/blitter.s \ + src/cia.s \ + src/custom.s \ + src/disk.s \ + src/drawing.s \ + src/events.s \ + src/expansion.s \ + src/filesys.s \ + src/fpp.s \ + src/fsdb.s \ + src/fsdb_unix.s \ + src/fsusage.s \ + src/gfxutil.s \ + src/hardfile.s \ + src/inputdevice.s \ + src/keybuf.s \ + src/main.s \ + src/memory.s \ + src/native2amiga.s \ + src/traps.s \ + src/uaelib.s \ + src/uaeresource.s \ + src/zfile.s \ + src/zfile_archive.s \ + src/machdep/support.s \ + src/osdep/picasso96.s \ + src/osdep/amiberry.s \ + src/osdep/amiberry_gfx.s \ + src/osdep/amiberry_mem.s \ + src/osdep/sigsegv_handler.s \ + src/sounddep/sound.s \ + src/newcpu.s \ + src/newcpu_common.s \ + src/readcpu.s \ + src/cpudefs.s \ + src/cpustbl.s \ + src/cpuemu_0.s \ + src/cpuemu_4.s \ + src/cpuemu_11.s \ + src/jit/compemu.s \ + src/jit/compemu_fpp.s \ + src/jit/compstbl.s \ + src/jit/compemu_support.s + +genasm: $(ASMS) + clean: - $(RM) $(PROG) $(OBJS) + $(RM) $(PROG) $(PROG)-debug $(OBJS) $(ASMS) $(OBJS:%.o=%.d) + $(MAKE) -C src/guisan clean + +cleanprofile: + $(RM) $(OBJS:%.o=%.gcda) + +delasm: + $(RM) $(ASMS) + +bootrom: + od -v -t xC -w8 src/filesys |tail -n +5 | sed -e "s,^.......,," -e "s,[0123456789abcdefABCDEF][0123456789abcdefABCDEF],db(0x&);,g" > src/filesys_bootrom.cpp + touch src/filesys.cpp + +guisan: + $(MAKE) -C src/guisan diff --git a/README.md b/README.md index a551ef2f..7a081cf5 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,50 @@ -# Amiga emulator for Raspberry Pi +# Amiga emulator for the Raspberry Pi and other ARM SoC -# History (newest first) -- Added more Picasso resolutions -- Added NetBeans project -- Added Visual Studio solution using VC++ for Linux -- Fixed bugs related to video and audio glitches -- Renamed folder structure according to the WinUAE standard -- The emulator now changes screen resolution on the host dynamically instead of always scaling to the native one (improves performance a lot) -- Added mapping option for keyboard key to Quit the emulator directly -- Added mapping option for game controller button to a) Enter GUI and b) Quit the emulator -- Added Shutdown button, to power off the (host) computer -- Added Visual Studio solution (requires VisualGDB), so we can compile and debug from Windows PC -- Fixed bugs and crashes in GUI keyboard navigation -- Loading the Configuration file now respects the input settings -- Removed Pandora specific keyboard shortcuts which caused crashes -- Pi Zero / Pi 1 version now has full Picasso96 support (up to 1080p 24bit) -- FullHD (1080p) resolution supported in Picasso96 mode on all Pi models -- Code formatting and cleanup -- Added support for custom functions assignable to keyboard LEDs (e.g. HD activity) -- Pi 3 is now the default target if no Platform is specified -- Optimizations for Pi 3 added -- New target platform: Pi 3 -- Forked from Uae4Arm-rpi project +Warning: this branch is where Development takes place. It may be unstable, crash, not work from time to time - If you're looking for the latest "stable" version, please use the master branch for now. -Binary package dependencies (install these if you only want to run the binary): +# Compiling SDL2 +If you want to run the SDL2 version, you currently need to compile SDL2 from source on the Raspberry Pi, to get support for launching full screen applications from the console. The version bundled with Stretch is not compiled with support for the "rpi" driver, so it only works under X11. - sudo apt-get install libsdl1.2debian libsdl-image1.2 libsdl-gfx1.2-5 libsdl-ttf2.0-0 libmpg123-0 libguichan-sdl-0.8.1-1 libxml2 mpeg2dec +Follow these steps to download, compile and install SDL2 from source: -How to compile from source (on Raspbian Jessie): +https://github.com/midwan/amiberry/wiki/Compile-SDL2-from-source + +With SDL2 installed, you can proceed to install Amiberry as follows: - Install following packages: +# Pre-requisites +Install the following packages: - sudo apt-get install libsdl-dev libguichan-dev libsdl-ttf2.0-dev libsdl-gfx1.2-dev libxml2-dev libflac-dev libmpg123-dev libmpeg2-4-dev + sudo apt-get install libxml2-dev libflac-dev libmpg123-dev libpng-dev libmpeg2-4-dev - Then for Raspberry Pi 3: +# Compiling Amiberry +Clone this repo: + + cd ~ + git clone https://github.com/midwan/amiberry -b dev amiberry-dev + cd amiberry-dev + +The default platform is currently "rpi3", so for Raspberry Pi 3 (SDL1) you can just type: - make + make all - For Raspberry Pi 2: +For Raspberry Pi 2 (SDL1): - make PLATFORM=rpi2 + make all PLATFORM=rpi2 - For Raspberry Pi 1/Zero: +For Raspberry Pi 1/Zero (SDL1): - make PLATFORM=rpi1 + make all PLATFORM=rpi1 + +And for the SDL2 versions, you can use the following: + + make all PLATFORM=rpi3-sdl2 + +Or for Raspberry Pi 2 (SDL2): + + make all PLATFORM=rpi2-sdl2 + +Or for Raspberry Pi 1/Zero (SDL2): + + make all PLATFORM=rpi1-sdl2 + +You can check the Makefile for a full list of supported platforms! diff --git a/Readme_Pandora.txt b/Readme_Pandora.txt deleted file mode 100644 index d6cf1304..00000000 --- a/Readme_Pandora.txt +++ /dev/null @@ -1,331 +0,0 @@ -UAE4ARM - Pandora edition - -Version 1.0.0.12 - -Thanks to all for working on the different versions of UAE this emulator based on: - - Toni Wilen - - Chui for the UAE4all emulator - - Notaz for the GP2X port - - Pickle for the Wiz port - - john4p for his work on the Pandora version - - tuki_cat for improved keyboard gfx and betatesting - - lubomyr for the Android version - - all people from aranym project for the ARM JIT - - -Description - -A fast and optimized Amiga Emulator - -Features: AGA/OCS/ECS, 68000, 68020 and 68040 emulation, harddisk-support, WHDLoad-support, Chip/Slow/Fast-mem settings, -savestates, vsync, most games (not AGA) run fullspeed at 600 MHz with no frameskip and lot of AGA games run fullspeed -at 1000 MHz, smooth 50Hz scrolling, custom controls, custom screen modes, screen positioning, heavy/medium/light manual -autofire, nub mouse input, support for stylus input - -This version based on UAE4ALL for Pandora. Instead of implement the changes in UAE4ALL, I decided to start a new project. -UAE4ALL is in a stable state and there are fundamental changes like switching to a new 68000 core for the new version -which may cause new bugs, performance losses and breaks compatibility to few games. - -The main differences to UAE4ALL: - - Different 68000 core (newcpu instead of FAME/C) with support for 32 bit addressing mode - - Support for 68030 and 68040 cpus - - FPU (68881, 68882 and internal 68040) - - JIT - - Autodetect Amiga ROMs - - Up to 5 HDDs - - Lot of new audio options - - Picasso96 - - GUI - - bsdsockets - - RDB hardfiles - - Support for rp9 - - CD32 support - -What's missing compared to WinUAE: - - Cycle exact emulation of cpu and blitter - - SCSI support - - AHI - - Builtin debugger -and some more... - - -Index - -1. Setup - -2. Controls - 2.1 General and quick keys (outside of GUI) - 2.2 Nubs as mouse - 2.3 dPad as mouse - 2.4 Mousehack enabled - 2.5 Specific controls inside GUI - -3. GUI - 3.1 Paths - 3.2 Configurations - 3.3 CPU and FPU - 3.4 Chipset - 3.5 ROM - 3.6 RAM - 3.7 Floppy drives - 3.8 Hard drives / CD - 3.9 Display - 3.10 Sound - 3.11 Input - 3.12 Miscellaneous - 3.13 Savestates - - ------------------------------------- - -1. Setup - -Place the UAE4ARM PND in the required directory (menu, desktop or apps). Running it for the first time will create the -necessary folders in pandora/appdata on you SD card. - -In order to use UAE4ARM you need an Amiga Bios image (kickstart rom). Place all your roms and the keyfiles (if required) -in the appdata folder of UAE4ARM and select this folder with the GUI (goto page Paths, choose folder in option "System ROMS" -and click on "Rescan ROMs"). - -To use rp9, you have to copy the rp9 files and the files workbench-135.hdf, workbench-211.hdf and workbench-311.hdf from -the AmigaForever data folder to appdata/uae4arm/rp9. - - ------------------------------------- - -2. Controls - -2.1 General & Quick Keys (outside of GUI) - -SELECT: Open GUI -START: Play button of CD32 -Pandora Key: pressing this at any time (inside or outside the GUI) and it will minimise UAE4ARM -Hold L+R + D-pad up/down: Move displayed gfx vertically -Hold L+R + 1/2/3/4/5/6/7/8: select preset screenmode -Hold L+R + 9/0: set number of displayed lines -Hold L+R + w: change Amiga displayed width -Hold L+R + r: toggle lores/hires -L+START: RWD button of CD32 -R+START: FFW button of CD32 -L+c: Toggle custom controls -L+d: Toggle status line -L+f: Toggle frameskip -L+l: Quick load -L+s: Quick save -R+D-pad: Arrow keys in all control modes - - -2.2 Nubs as mouse - -D-pad: Joystick movement -X: 1st Joystick button / RED button on CD32 controller -B: 2nd Joystick button / BLUE button on CD32 controller -A: GREEN button on CD32 controller -Y: Space bar / YELLOW button on CD32 controller -R+D-pad: Arrow keys -R+A: Ctrl -R+B: left Alt -R+X: Help - - -2.3 dPad as mouse - -D-pad: Move mouse pointer -A: left mouse click -B: right mouse click -Y: Space bar -D-pad left or right: Left flipper (Pinball Dreams/Fantasies) -A/B: Right flipper (Pinball Dreams/Fantasies) -X: Pull spring (Pinball Dreams/Fantasies) - - -2.4 Mousehack enabled - -Tap screen: left click -L/R: Hold and tap with stylus performs right click - -Other buttons same as in 2.1. - - -2.5 Specific controls inside GUI - -Q: Quits the emulator. -R: Reset Amiga -SELECT: Continue emulation - - ------------------------------------- - -3. GUI - -You can navigate through the controls with the D-pad and select an option by pressing X. - -There are always three buttons visible: - - Reset: Reset the Amiga - - Quit: Quit emulator - - Start/Resume: Start of emulation / resume emulation - - -3.1 Paths - -Specify the location of your kickstart roms and the folder where the configurations files should be stored. -After changing the location of the kickstart roms, click on "Rescan ROMS" to refresh the list of the available ROMs. - - -3.2 Configurations - -To load a configuration, select the entry in the list and then click on "Load". If you doubleclick on an entry in the list, -the emulation starts with this configuration. -If you want to create a new configuration, setup all options, enter a new name in "Name", provide a short description and -then click on "Save". -"Delete" will delete the selected configuration. - - -3.3 CPU and FPU - -Select the required Amiga CPU (68000 - 68040). - -If you select 68020, you can choose between 24-bit addressing (68EC020) or 32-bit addressing (68020). - -The option "More compatible" is only available if 68000 is selected and emulates simple prefetch of the 68000. This may -improve compatibility in few situations but it's not required for most games and demos. - -JIT enables the Just-in-time compiler. This may breaks compatibility in some games. You will not notice a big performance -improvement as long as you didn't select "Fastest" in "CPU Speed". - -What options are available for FPU depends on the selected CPU. - -Note: In current version, you will not see a difference in the performance for 68020, 68030 and 68040. The cpu cycles for -the opcodes are based on 68020. The different cycles for 68030 and 68040 will come in a later version. - - -3.4 Chipset - -If you want to emulate an Amiga 1200, select AGA. For most Amiga 500 games, select "Full ECS". Some older Amiga games -requires "OCS" or "ECS Agnus". You have to play with these options if a game won't work as expected. -For some games you have to switch to "NTSC" (60 Hz instead of 50 Hz) for correct timing. - -When you see some graphic issues in a game, try "Immediate" for blitter and/or disable "Fast copper". -"Fast copper" uses a prediction algorithm instead of checking the copper state on a more regular basis. This may cause -issues but brings a big performance improvement. The option was removed in WinUAE in an early state, but for most games, -it works fine and the better performance is helpful for 600 MHz Pandoras. - -For "Collision Level", select "Sprites and Sprites vs. Playfield" which is fine for nearly all games. - - -3.5 ROM - -Select the required kickstart ROM for the Amiga you want to emulate. - -"Extended ROM File" is required for CD32. - - -3.6 RAM - -Select the amount of RAM for each type you want in your Amiga. -"Slow" is the simple memory extension of an Amiga 500. -"Z3 fast" and "RTG" are only available when a 32-bit CPU is selected. -"RTG" is the graphics memory used by Picasso96. - - -3.7 Floppy drives - -You can enable/disable each drive by clicking the checkbox next to DFx or select the drive type in the dropdown control. -"3.5'' DD" is the right choose for nearly all ADF and ADZ files. -The option "Write-protected" indicates if the emulator can write to the ADF. -The button "..." opens a dialog to select the required disk file. -With the big dropdown control, you can select one of the disks you recently used. - -You can reduce the loading time for lot of games by increasing the floppy drive emulation speed. A few games will not load -with higher drive speed and you have to select 100%. - -"Save config for disk" will create a new configuration file with the name of the disk in DF0. This configuration will be -loaded each time you select the disk and have the option "Load config with same name as disk" enabled. - - -3.8 Hard drives / CD - -Use "Add Directory" to add a folder or "Add Hardfile" to add a HDF file as a hard disk. - -To edit the settings of a HDD, click on "..." left to the entry in the list. - -With "Create Hardfile", you can create a new formatted HDF file up to 2 GB. For large files, it will take some time to -create the new hard disk. You have to format the new HDD in Amiga via the Workbench. - -Select "CD drive" to emulate CD for CD32. Use "Eject"" to remove currentCD and click on "..." to open a dialog to select -the iso/cue file for CD emulation. -Note: in current version, only WAV is supported for audio tracks. MP3 and FLAC may be supported in a later version. - - -3.9 Display - -Select the required width and height of the Amiga screen. -If you select "NTSC", a value greater than 240 for "Height" makes no sense. -When the game, demo or workbench uses Hires mode and you selected a "Width" lower than 640, you will only see half of the -pixels. -With "Vert. offset" you can adjust the position of the first drawn line of the Amiga screen. You can also change this during -emulation with L+R + dpad up/down. -When you activate "Frameskip", only every second frame is drawn. This will improve performance and some more games are -playable. - - -3.10 Sound - -You can turn on sound emulation with different levels of accuracy and choose between mono and stereo. - -The different types of interpolation have different impact on the performance. Play with the settings to find the type you -like most. You may need headphones the really hear the differences between the interpolations. - -With "Filter", you can select the type of the Amiga audio filter. - -With "Stereo separation" and "Stereo delay" you can adjust how the left and right audio channels of the Amiga are mixed to -the left and right channels of the Pandora. A value of 70% for separation and no delay is a good start. - - -3.11 Input - -You can select the control type for both ports. -Set the emulated mouse speed to .25x, .5x, 1x 2x and 4x to slow down or speed up the mouse. -When "Enable mousehack" is activated, you can use the stylus to set the mouse pointer to the exact position. This works -very well on Workbench, but many games using there own mouse handling and will not profit from this code. -"Tap Delay" specifies the time between taping the screen and an emulated mouse button click. - -When enabling "Custom Control", you can define which Amiga key should be emulated by pressing one of the ABXY- or D-pad -buttons. Useful to setup controls for pinball games. During emulation, you can switch between regular behaviour of the -buttons and custom settings by pressing left shoulder button and 'c'. - - -3.12 Miscellaneous - -"Status Line" shows/hides the status line indicator. During emulation, you can show/hide this by pressing left shoulder -button and 'd'. The first value in the status line shows the idle time of the Pandora CPU in %, the second value is the -current frame rate. When you have a HDD in your Amiga emulation, the HD indicator shows read (blue) and write (red) access -to the HDD. The next values are showing the track number for each disk drive and indicates disk access. - -When you deactivate the option "Show GUI on startup" and use this configuration by specifying it with the command line -parameter "-config=", the emulations starts directly without showing the GUI. - -Set the speed for the Pandora CPU to overclock it for games which need more power. Be careful with this parameter. - -"bsdsocket.library" enables network functions (i.e. for web browsers in OS3.9). - - -3.13 Savestates - -Savestates are stored with the name of the disk in drive DF0 attached with the selected number. - -Note: Savestates will not work with HDDs. - - ------------------------------------- - -4. Command line options - --config= -or --f - Start emulator with specified configuration file instead of the default file. - --s