88 Commits

Author SHA1 Message Date
Stephanie Gawroriski
d9766f139e Use the correct alloca for MSVC. 2025-08-14 18:46:21 -04:00
Stephanie Gawroriski
b7f7715e75 When loading content when there is no pre-existing SRAM do not indicate that there is SRAM as otherwise the device will not be able to handle data that gets injected into the RAM directly accordingly, thanks to natanprog for the bisect!; Add a bouncing pixel indicator for when the LCD is off but the device is still on in sleep mode. 2025-08-11 18:53:12 -04:00
Stephanie Gawroriski
acc21071c6 Merge pull request #36 from natanprog/fix/qt-update-paths
qt: update Mu.pro paths following project reorganization
2025-08-11 17:41:24 -04:00
Natan Lopes
427b59b1b6 qt: update Mu.pro paths following project reorganization
The Qt project file qtBuildSystem/Mu/Mu.pro referenced many files using the previous layout (../../src/...). Commit 5a86c5c re-organized the repository, adding CMake and splitting headers into an include/ tree, so the old paths no longer resolve. This commit updates the file references in Mu.pro to match the new layout (e.g. ../../include/...), restoring qmake/make functionality for the Qt frontend.

No source code logic was changed — only path references in the project file were adjusted (~65 entries updated).

Signed-off-by: Natan Lopes <natan10@ymail.com>
2025-08-11 14:12:14 -03:00
Stephanie Gawroriski
2b6c079ca8 Correct bug where prc/pdb and PRC/PDB were both required to be valid when only one should have been (OR to AND). 2025-05-20 19:48:16 -04:00
Stephanie Gawroriski
841cff206b Merge remote-tracking branch 'refs/remotes/origin/master' 2025-01-21 17:44:40 -05:00
Stephanie Gawroriski
effb09edf0 Check for uppercase PRC and PDB extensions as well in ZIP files. 2025-01-21 17:43:40 -05:00
Stephanie Gawroriski
e5829b6be0 Merge pull request #33 from warmenhoven/warmenhoven/pr/tvos13
tvos: properly set min supported version
2024-10-20 22:05:30 -04:00
Eric Warmenhoven
c8311b11e6 tvos: properly set min supported version 2024-10-16 21:18:04 -04:00
LibretroAdmin
a053b1f272 Merge pull request #32 from warmenhoven/warmenhoven/pr/osx
Fix osx build
2024-10-09 22:33:12 -05:00
Eric Warmenhoven
7ada4746df Fix osx build 2024-10-09 23:07:35 -04:00
Stephanie Gawroriski
d7dd7e2a33 Hopefully correct x86 macOS build. 2024-06-25 17:45:15 -04:00
Stephanie Gawroriski
50d6108b3e More build corrections. 2024-06-25 17:31:41 -04:00
Stephanie Gawroriski
85390f73b8 Move over tsc2101.c since that is for PXA260 (ARM) and not in the general build. 2024-06-25 17:27:22 -04:00
Stephanie Gawroriski
448cc6505e Build fixes, hopefully, for RetroArch. 2024-06-25 17:18:28 -04:00
Stephanie Gawroriski
247d1d10a4 Include required header. 2024-06-25 17:13:37 -04:00
Stephanie Gawroriski
013f6e321a Update memmap.c, also include DJGPP as excluded. 2024-06-25 13:21:36 -04:00
Stephanie Gawroriski
84e6732fe9 Correct libretro output library name for targets. 2024-06-25 12:57:34 -04:00
Stephanie Gawroriski
c3562082b1 Remove some usages of constexpr. 2024-06-25 12:53:51 -04:00
Stephanie Gawroriski
784ef114a4 Do not include ARM core for PSP. 2024-06-25 12:51:30 -04:00
Stephanie Gawroriski
547d3ab65c All the Qt5 components are required, not optional. 2024-06-25 12:50:17 -04:00
Stephanie Gawroriski
5bd0d8760f Do not include experimental ARM core for DJGPP. 2024-06-25 12:47:43 -04:00
Stephanie Gawroriski
91af9cc623 Various build fixes. 2024-06-25 12:42:19 -04:00
Stephanie Gawroriski
f7fb30a074 Pipeline and README updates. 2024-06-18 23:04:08 -04:00
Stephanie Gawroriski
0fd1b56b6c Add additional infrastructure pipelines that were added over the past year. 2024-06-18 22:28:22 -04:00
Stephanie Gawroriski
45154c0c73 Bump version to 1.3.2. 2024-06-16 19:47:29 -04:00
Stephanie Gawroriski
5e5e21e302 Move up definition. 2024-06-14 19:13:52 -04:00
Stephanie Gawroriski
8223b6fd76 No longer crash the Qt interface if it could not initialize audio. 2024-06-14 18:56:56 -04:00
Stephanie Gawroriski
dee65d0d1a Fill initial RAM with garbage so PalmOS is much more likely to find it invalid; Add RetroArch run command if it exists in PATH. 2024-06-14 18:49:21 -04:00
LibretroAdmin
865acf3a28 Update Makefile.libretro 2023-11-01 19:20:58 -07:00
Stephanie Gawroriski
15bb26daa5 Merge pull request #29 from warmenhoven/dev/warmenhoven/tvos
Add tvos build
2023-05-27 18:38:29 -04:00
Eric Warmenhoven
dc854cef9e Add tvos build 2023-05-27 17:43:15 -04:00
Stephanie Gawroriski
91a46734dd Merge pull request #28 from libretro/wip-macosarmfix
Attempt fix of macOS ARM build (Fixes #27).
2023-01-23 08:55:17 -05:00
Stephanie Gawroriski
d0651a450d Attempt fix of macOS ARM build. 2023-01-22 17:01:37 -05:00
Stephanie Gawroriski
4a3fee96e7 README updates. 2022-10-02 17:58:21 -04:00
Stephanie Gawroriski
4d084a03d7 RetroArch CMake corrections; Implement loading from ZIP files which contain PRCs and PDBs. 2022-10-02 17:34:57 -04:00
Stephanie Gawroriski
aadb0a29ff Include miniz library; Make all CMake builds PIC. 2022-10-02 16:25:53 -04:00
Stephanie Gawroriski
90a9a94257 Update valid extensions to everything in the core info; Disallow libRetro from looking into ZIP files, we will be handling it ourself so that we can load all PRCs and PDBs. 2022-10-02 00:14:01 -04:00
Stephanie Gawroriski
679626b58f Add build for Mac OS ARM. 2022-10-01 23:41:38 -04:00
Stephanie Gawroriski
1361da0401 Merge pull request #19 from phcoder/patch-1
Fix dingux compilation name
2022-03-17 17:53:24 -04:00
Vladimir Serbinenko
c13324e9c7 Fix dingux compilation name 2022-03-16 06:53:55 +01:00
Stephanie Gawroriski
9d23f9bb67 Merge pull request #18 from crystalct/master
PS3/PSL1GHT build fix
2022-02-26 13:42:47 -05:00
CrystalCT
f16e54e879 PS3/PSL1GHT build fix 2022-02-21 13:47:56 +01:00
Stephanie Gawroriski
2954a42bba Merge pull request #17 from TyroneSlothrop/master
Add iOS ARM64 build
2022-01-25 18:16:49 -05:00
Tyrone Slothrop
b066eb856d Add iOS ARM64 build 2022-01-22 00:25:51 +00:00
Stephanie Gawroriski
be844bf74d Add pdb to the extensions list. 2021-11-27 10:53:45 -05:00
Stephanie Gawroriski
7ead066572 Update RetroArch core info. 2021-07-16 08:27:07 -04:00
Stephanie Gawroriski
304c0855c1 Add license file; Add Windows icon resource. 2021-07-16 08:03:14 -04:00
Stephanie Gawroriski
932f224580 Add threads to build (needed for mingw-64 POSIX and Linux); Dedication within CMake. 2021-07-15 23:50:01 -04:00
Stephanie Gawroriski
6fd0600446 Add instructions. 2021-07-15 23:40:07 -04:00
Stephanie Gawroriski
ebd397f5ba Merge branch 'master' of github.com:libretro/Mu 2021-07-15 23:27:50 -04:00
Stephanie Gawroriski
f631649bf7 Bring in the Qt interface into CMake; Fixes for Visual Studio build. 2021-07-15 23:27:00 -04:00
Autechre
5795ade531 Update .gitlab-ci.yml 2021-03-17 15:30:24 +01:00
twinaphex
ff746b8196 Fix MSVC builds - embed MSVCRT runtime 2021-02-14 22:09:34 +01:00
twinaphex
e053b170d2 Add MSVC 2005 / 2010 cores 2021-02-13 01:47:51 +01:00
Autechre
df5a0c63bc Merge pull request #9 from fjtrujy/PS2NewToolchain
[PS2] Update bins for new toolchain
2021-01-15 00:51:48 +01:00
Francisco Javier Trujillo Mata
d93c8c0efc Update bins for new toolchain 2021-01-15 00:16:07 +01:00
Autechre
62a7f6f2b3 Update .gitlab-ci.yml 2021-01-10 23:34:35 +01:00
Autechre
e4209e1044 Update .gitlab-ci.yml 2021-01-09 16:52:52 +01:00
Autechre
e140a25c5b Merge pull request #8 from webgeek1234/master
Fix multiple definitions of pxa260Framebuffer
2021-01-03 01:16:28 +01:00
Autechre
3d408f3b37 Update .gitlab-ci.yml 2021-01-03 01:16:19 +01:00
Autechre
5a7750163f Update .gitlab-ci.yml 2021-01-03 01:15:56 +01:00
Aaron Kling
c9af673bf4 Fix multiple definitions of pxa260Framebuffer 2021-01-02 15:48:58 -06:00
Autechre
cb2dcc1740 Update Makefile.libretro 2020-12-29 07:07:42 +01:00
Autechre
bda022c63a Update Makefile.libretro 2020-12-29 02:37:58 +01:00
Autechre
5022d08ffb Update .gitlab-ci.yml 2020-12-29 01:41:16 +01:00
Stephanie Gawroriski
95ebb37e5f Merge branch 'master' of github.com:libretro/Mu 2020-12-28 19:13:43 -05:00
Stephanie Gawroriski
ec3ba7e2cd Add Wii U. 2020-12-28 19:10:00 -05:00
Autechre
41e0edcaa3 Update .gitlab-ci.yml 2020-12-28 23:47:19 +01:00
Stephanie Gawroriski
223255e2e1 Add Dingux, Nintendo 3DS, Nintendo GameCube, and Nintendo Wii. 2020-12-04 19:18:49 -05:00
Stephanie Gawroriski
1705a0ddd6 Merge pull request #7 from webgeek1234/master
libretro: Update gitlab ci extends ordering
2020-12-02 07:41:14 -05:00
Aaron Kling
6ffa4d1d66 libretro: Update gitlab ci extends ordering 2020-12-01 19:25:53 -06:00
Stephanie Gawroriski
9057820fbc Make sure our include flags are included when compiling C++ code. 2020-11-06 21:21:35 -05:00
Stephanie Gawroriski
254212a229 Define UINTMAX_MAX for PS2. 2020-11-06 21:13:26 -05:00
Stephanie Gawroriski
87c8cfce6b Correct includes in translators. 2020-11-06 21:03:28 -05:00
Stephanie Gawroriski
96e70d964f Include standard headers (for PS2). 2020-11-06 20:59:36 -05:00
Stephanie Gawroriski
855504f180 Correct Linux OS build. 2020-11-06 20:57:13 -05:00
Stephanie Gawroriski
6870d8b7ab Correct includes. 2020-11-06 20:55:05 -05:00
Stephanie Gawroriski
be386ff05d For CMake disable dynamic recompilation for now. 2020-11-06 20:43:59 -05:00
Stephanie Gawroriski
5a86c5ccf9 Add CMake and re-organize project, keeping includes separated from sources. 2020-11-06 20:29:40 -05:00
Stephanie Gawroriski
3e4829f443 Include missing include. 2020-11-06 18:56:59 -05:00
Stephanie Gawroriski
f6c7944c64 Import PS2 build from SquirrelJME. 2020-11-06 18:54:13 -05:00
Stephanie Gawroriski
d9437c28cb Correct CI/CD config. 2020-11-06 18:48:03 -05:00
Stephanie Gawroriski
1a6d22086d Add GitLab CI/CD for RetroArch building. 2020-11-06 18:43:51 -05:00
Stephanie Gawroriski
46b29248dc Add dedication to Emily, I hope that you are resting in peace. 2020-11-06 18:38:54 -05:00
Stephanie Gawroriski
e7da587071 Remove CircleCI config as it is not used; Add CLion project. 2020-11-06 18:31:08 -05:00
meepingsnesroms
4ac406874c Merge pull request #97 from meepingsnesroms/tungstenT3Support
Remove Android armv5/6
2019-11-29 14:32:57 -08:00
meepingsnesroms
d29d1978ee Merge pull request #96 from meepingsnesroms/tungstenT3Support
Tungsten t3 support
2019-11-29 13:24:04 -08:00
153 changed files with 11338 additions and 526 deletions

View File

@@ -1,15 +0,0 @@
# Use the latest 2.1 version of CircleCI pipeline processing engine, see https://circleci.com/docs/2.0/configuration-reference/
version: 2.1
# Use a package of configuration called an orb, see https://circleci.com/docs/2.0/orb-intro/
orbs:
# Declare a dependency on the welcome-orb
welcome: circleci/welcome-orb@0.3.1
# Orchestrate or schedule a set of jobs, see https://circleci.com/docs/2.0/workflows/
workflows:
# Name the workflow "Welcome"
Welcome:
# Run the welcome/run job in its own container
jobs:
- welcome/run

23
.gitignore vendored
View File

@@ -17,4 +17,25 @@
/tools/palm/hwTestSuite/TstSuite-sections.ld
/tools/desktop/build-BufferGraphViewer-*
/tools/desktop/build-MakePalmBitmap-*
/tools/desktop/export16BitImageProperly/convert
/tools/desktop/export16BitImageProperly/convert
# CLion
.idea/workspace.xml
.idea/discord.xml
# CMake
cmake-build-debug/
cmake-build-release/
cmake-build-debug-mingw/
cmake-build-release-mingw/
cmake-build-debug-visual-studio/
cmake-build-release-visual-studio/
cmake-build-debug-visual-studio-1/
cmake-build-release-visual-studio-1/
# Test ROM
userdata-palmos41-en-m515.ram
userdata-en-m515.ram
palmos41-en-m515.rom
default-palmos41-en-m515.ram
/build/

306
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,306 @@
##############################################################################
################################# BOILERPLATE ################################
##############################################################################
# Core definitions
.core-defs:
variables:
CORENAME: mu
JNI_PATH: libretroBuildSystem
MAKEFILE_PATH: libretroBuildSystem
MAKEFILE: Makefile.libretro
# Inclusion templates, required for the build to work
include:
- project: 'libretro-infrastructure/ci-templates'
file: '/android-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/android-jni.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/ctr-static-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/ctr-static.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/dingux-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/dingux-mips32.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/djgpp-static-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/emscripten-static-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/emscripten-static.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/ios-arm64.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/ios-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/ios9.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/libnx-static-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/libnx-static.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/linux-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/linux-x64.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/ngc-static-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/ngc-static.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/orbis-static-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-arm64.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-cmake-arm64.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-cmake-ppc.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-cmake-x86.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-x64.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/ps2-static-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/ps2-static.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/psp-static-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/tvos-arm64.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/tvos-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/vita-static-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/vita-static.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/wii-static-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/wii-static.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/wiiu-static-cmake.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/wiiu-static.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-cmake-mingw.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-cmake-msvc19.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-i686-mingw.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-i686-msvc05-msys2.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-i686-msvc10-msys2.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-x64-mingw.yml'
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-x64-msvc10-msys2.yml'
# Stages for building
stages:
- build-prepare
- build-shared
- build-static
##############################################################################
#################################### STAGES ##################################
##############################################################################
################################### DESKTOPS #################################
# Windows 64-bit
libretro-build-windows-x64:
extends:
- .libretro-windows-x64-mingw-make-default
- .core-defs
# Windows 32-bit
libretro-build-windows-i686:
extends:
- .libretro-windows-i686-mingw-make-default
- .core-defs
# Windows msvc10 64-bit
libretro-build-windows-msvc10-x64:
extends:
- .libretro-windows-x64-msvc10-msys2-make-default
- .core-defs
# Windows msvc10 32-bit
libretro-build-windows-msvc10-i686:
extends:
- .libretro-windows-i686-msvc10-msys2-make-default
- .core-defs
# Windows msvc05 32-bit
libretro-build-windows-msvc05-i686:
extends:
- .libretro-windows-i686-msvc05-msys2-make-default
- .core-defs
# linux-cmake.yml
libretro-build-linux-i686:
extends:
- .libretro-linux-cmake-x86
- .core-defs
# Linux 64-bit
libretro-build-linux-x64:
extends:
- .libretro-linux-x64-make-default
- .core-defs
# MacOS 64-bit
libretro-build-osx-x64:
extends:
- .libretro-osx-x64-make-default
- .core-defs
# MacOS ARM 64-bit
libretro-build-osx-arm64:
extends:
- .libretro-osx-arm64-make-default
- .core-defs
# osx-cmake-ppc.yml
libretro-build-osx-ppc:
extends:
- .libretro-osx-cmake-ppc
- .core-defs
# osx-cmake-x86.yml
libretro-build-osx-x86: # TODO: What should this be called?
extends:
- .libretro-osx-cmake-x86
- .core-defs
################################### CELLULAR #################################
# Android ARMv7a
android-armeabi-v7a:
extends:
- .libretro-android-jni-armeabi-v7a
- .core-defs
# Android ARMv8a
android-arm64-v8a:
extends:
- .libretro-android-jni-arm64-v8a
- .core-defs
# Android 64-bit x86
android-x86_64:
extends:
- .libretro-android-jni-x86_64
- .core-defs
# Android 32-bit x86
android-x86:
extends:
- .libretro-android-jni-x86
- .core-defs
# iOS 9
libretro-build-ios9:
extends:
- .libretro-ios9-make-default
- .core-defs
# iOS
libretro-build-ios-arm64:
extends:
- .libretro-ios-arm64-make-default
- .core-defs
# tvOS
libretro-build-tvos-arm64:
extends:
- .libretro-tvos-arm64-make-default
- .core-defs
################################### CONSOLES #################################
# Dingux (GCW Zero)
libretro-build-dingux-mips32:
extends:
- .libretro-dingux-mips32-make-default
- .core-defs
# Nintendo 3DS
libretro-build-ctr:
extends:
- .libretro-ctr-static-retroarch-master
- .core-defs
# Nintendo GameCube
libretro-build-ngc:
extends:
- .libretro-ngc-static-retroarch-master
- .core-defs
# Nintendo Wii
libretro-build-wii:
extends:
- .libretro-wii-static-retroarch-master
- .core-defs
# Nintendo Wii U
libretro-build-wiiu:
extends:
- .libretro-wiiu-static-retroarch-master
- .core-defs
# Nintendo Switch
libretro-build-libnx-aarch64:
extends:
- .libretro-libnx-static-retroarch-master
- .core-defs
# PlayStation 2
libretro-build-ps2:
extends:
- .libretro-ps2-static-retroarch-master
- .core-defs
# psp-static-cmake.yml
libretro-build-psp:
extends:
- .libretro-psp-static-cmake-retroarch-master
- .core-defs
# PlayStation Vita
libretro-build-vita:
extends:
- .libretro-vita-static-retroarch-master
- .core-defs
#################################### MISC ##################################
# Emscripten
libretro-build-emscripten:
extends:
- .libretro-emscripten-static-retroarch-master
- .core-defs
libretro-build-dingux-odbeta-mips32:
extends:
- .libretro-dingux-odbeta-cmake-mips32
- .core-defs
libretro-build-miyoo-arm32:
extends:
- .libretro-miyoo-cmake-arm32
- .core-defs
libretro-build-retrofw-mips32:
extends:
- .libretro-retrofw-odbeta-cmake-mips32
- .core-defs
libretro-build-rs90-odbeta-mips32:
extends:
- .libretro-rs90-odbeta-cmake-mips32
- .core-defs
# djgpp-static-cmake.yml
libretro-build-djgpp: # TODO: What should this be called?
extends:
- .libretro-djgpp-static-cmake-retroarch-master
- .core-defs

0
.idea/.gitignore generated vendored Normal file
View File

2
.idea/Mu.iml generated Normal file
View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />

22
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakePythonSetting">
<option name="pythonIntegrationState" value="YES" />
</component>
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
<component name="CidrRootsConfiguration">
<sourceRoots>
<file path="$PROJECT_DIR$/include" />
<file path="$PROJECT_DIR$/src" />
</sourceRoots>
<excludeRoots>
<file path="$PROJECT_DIR$/.github" />
<file path="$PROJECT_DIR$/.idea" />
<file path="$PROJECT_DIR$/bugs" />
<file path="$PROJECT_DIR$/cmake-build-debug-visual-studio-1" />
<file path="$PROJECT_DIR$/debugDumps" />
<file path="$PROJECT_DIR$/images" />
<file path="$PROJECT_DIR$/tools" />
</excludeRoots>
</component>
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Mu.iml" filepath="$PROJECT_DIR$/.idea/Mu.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

113
CMakeLists.txt Normal file
View File

@@ -0,0 +1,113 @@
cmake_minimum_required (VERSION 3.13)
project(Mu
VERSION 1.3.3
DESCRIPTION "Classic Palm OS Emulator."
HOMEPAGE_URL https://github.com/libretro/Mu
LANGUAGES C CXX)
# Requires C99
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
# To Emily...
message("******************************")
message("The continuation of the Mu along with the RetroArch Core is dedicated to")
message("Emily (1998-2020), your friendship was very important to me and I hope")
message("that you are resting well.")
message(" -- Your friend, Stephanie")
message("******************************")
# Is this x86_32?
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "X86" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_32" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86-32" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i386" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i486" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i586" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686" OR
"${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ia32" OR
"$ENV{ARCH}" STREQUAL "x86")
set(MU_IS_X86_32 YES)
endif()
# Some platforms cannot use FPIC code
if(DJGPP OR PLATFORM_PSP OR PSP)
set(MU_FPIC OFF)
else()
set(MU_FPIC ON)
endif()
# Do not include experimental ARM core for some platforms
if(DJGPP OR PLATFORM_PSP OR PSP OR (APPLE AND MU_IS_X86_32))
set(MU_ARM OFF)
else()
set(MU_ARM ON)
endif()
# RetroArch must be static
if(DJGPP OR PLATFORM_PSP OR PSP)
set(MU_LIBRETRO_OBJECT_LIB ON)
else()
set(MU_LIBRETRO_OBJECT_LIB OFF)
endif()
if(MU_LIBRETRO_OBJECT_LIB)
set(MU_CORE_BUILD_TYPE OBJECT)
else()
set(MU_CORE_BUILD_TYPE STATIC)
endif()
# Where should dynamic libraries go when output?
if(NOT DEFINED MU_DYLIB_OUTPUT_DIR)
set(MU_DYLIB_OUTPUT_DIR
"${CMAKE_BINARY_DIR}")
endif()
# Force a specific name for the output resultant binary
macro(mu_target_binary_name target what)
# Base properties
set_target_properties(${target} PROPERTIES
RUNTIME_OUTPUT_NAME "${what}"
LIBRARY_OUTPUT_NAME "${what}"
ARCHIVE_OUTPUT_NAME "${what}")
# Then for each configuration
foreach(outputConfig ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${outputConfig}" outputConfig)
set_target_properties(${target} PROPERTIES
RUNTIME_OUTPUT_NAME_${outputConfig} "${what}"
LIBRARY_OUTPUT_NAME_${outputConfig} "${what}"
ARCHIVE_OUTPUT_NAME_${outputConfig} "${what}")
endforeach()
endmacro()
# Need to set specific locations for output libraries?
# Note that RUNTIME_OUTPUT_DIRECTORY is needed for the Windows build to output
# directories since .DLL files are output there and not where shared libraries
# go??? No idea really.
macro(mu_target_binary_output target where)
set_target_properties(${target} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${where}"
LIBRARY_OUTPUT_DIRECTORY "${where}"
ARCHIVE_OUTPUT_DIRECTORY "${where}")
foreach(outputConfig ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${outputConfig}" outputConfig)
set_target_properties(${target} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_${outputConfig} "${where}"
LIBRARY_OUTPUT_DIRECTORY_${outputConfig} "${where}"
ARCHIVE_OUTPUT_DIRECTORY_${outputConfig} "${where}")
endforeach()
endmacro()
# Main project sources
add_subdirectory(src)
# LibRetro Build
add_subdirectory(libretroBuildSystem)
# QT Build
add_subdirectory(qtBuildSystem)

334
LICENSE Normal file
View File

@@ -0,0 +1,334 @@
Creative Commons Legal Code
Attribution-NonCommercial 3.0 Unported
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
DAMAGES RESULTING FROM ITS USE.
License
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
CONDITIONS.
1. Definitions
a. "Adaptation" means a work based upon the Work, or upon the Work and
other pre-existing works, such as a translation, adaptation,
derivative work, arrangement of music or other alterations of a
literary or artistic work, or phonogram or performance and includes
cinematographic adaptations or any other form in which the Work may be
recast, transformed, or adapted including in any form recognizably
derived from the original, except that a work that constitutes a
Collection will not be considered an Adaptation for the purpose of
this License. For the avoidance of doubt, where the Work is a musical
work, performance or phonogram, the synchronization of the Work in
timed-relation with a moving image ("synching") will be considered an
Adaptation for the purpose of this License.
b. "Collection" means a collection of literary or artistic works, such as
encyclopedias and anthologies, or performances, phonograms or
broadcasts, or other works or subject matter other than works listed
in Section 1(f) below, which, by reason of the selection and
arrangement of their contents, constitute intellectual creations, in
which the Work is included in its entirety in unmodified form along
with one or more other contributions, each constituting separate and
independent works in themselves, which together are assembled into a
collective whole. A work that constitutes a Collection will not be
considered an Adaptation (as defined above) for the purposes of this
License.
c. "Distribute" means to make available to the public the original and
copies of the Work or Adaptation, as appropriate, through sale or
other transfer of ownership.
d. "Licensor" means the individual, individuals, entity or entities that
offer(s) the Work under the terms of this License.
e. "Original Author" means, in the case of a literary or artistic work,
the individual, individuals, entity or entities who created the Work
or if no individual or entity can be identified, the publisher; and in
addition (i) in the case of a performance the actors, singers,
musicians, dancers, and other persons who act, sing, deliver, declaim,
play in, interpret or otherwise perform literary or artistic works or
expressions of folklore; (ii) in the case of a phonogram the producer
being the person or legal entity who first fixes the sounds of a
performance or other sounds; and, (iii) in the case of broadcasts, the
organization that transmits the broadcast.
f. "Work" means the literary and/or artistic work offered under the terms
of this License including without limitation any production in the
literary, scientific and artistic domain, whatever may be the mode or
form of its expression including digital form, such as a book,
pamphlet and other writing; a lecture, address, sermon or other work
of the same nature; a dramatic or dramatico-musical work; a
choreographic work or entertainment in dumb show; a musical
composition with or without words; a cinematographic work to which are
assimilated works expressed by a process analogous to cinematography;
a work of drawing, painting, architecture, sculpture, engraving or
lithography; a photographic work to which are assimilated works
expressed by a process analogous to photography; a work of applied
art; an illustration, map, plan, sketch or three-dimensional work
relative to geography, topography, architecture or science; a
performance; a broadcast; a phonogram; a compilation of data to the
extent it is protected as a copyrightable work; or a work performed by
a variety or circus performer to the extent it is not otherwise
considered a literary or artistic work.
g. "You" means an individual or entity exercising rights under this
License who has not previously violated the terms of this License with
respect to the Work, or who has received express permission from the
Licensor to exercise rights under this License despite a previous
violation.
h. "Publicly Perform" means to perform public recitations of the Work and
to communicate to the public those public recitations, by any means or
process, including by wire or wireless means or public digital
performances; to make available to the public Works in such a way that
members of the public may access these Works from a place and at a
place individually chosen by them; to perform the Work to the public
by any means or process and the communication to the public of the
performances of the Work, including by public digital performance; to
broadcast and rebroadcast the Work by any means including signs,
sounds or images.
i. "Reproduce" means to make copies of the Work by any means including
without limitation by sound or visual recordings and the right of
fixation and reproducing fixations of the Work, including storage of a
protected performance or phonogram in digital form or other electronic
medium.
2. Fair Dealing Rights. Nothing in this License is intended to reduce,
limit, or restrict any uses free from copyright or rights arising from
limitations or exceptions that are provided for in connection with the
copyright protection under copyright law or other applicable laws.
3. License Grant. Subject to the terms and conditions of this License,
Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
perpetual (for the duration of the applicable copyright) license to
exercise the rights in the Work as stated below:
a. to Reproduce the Work, to incorporate the Work into one or more
Collections, and to Reproduce the Work as incorporated in the
Collections;
b. to create and Reproduce Adaptations provided that any such Adaptation,
including any translation in any medium, takes reasonable steps to
clearly label, demarcate or otherwise identify that changes were made
to the original Work. For example, a translation could be marked "The
original work was translated from English to Spanish," or a
modification could indicate "The original work has been modified.";
c. to Distribute and Publicly Perform the Work including as incorporated
in Collections; and,
d. to Distribute and Publicly Perform Adaptations.
The above rights may be exercised in all media and formats whether now
known or hereafter devised. The above rights include the right to make
such modifications as are technically necessary to exercise the rights in
other media and formats. Subject to Section 8(f), all rights not expressly
granted by Licensor are hereby reserved, including but not limited to the
rights set forth in Section 4(d).
4. Restrictions. The license granted in Section 3 above is expressly made
subject to and limited by the following restrictions:
a. You may Distribute or Publicly Perform the Work only under the terms
of this License. You must include a copy of, or the Uniform Resource
Identifier (URI) for, this License with every copy of the Work You
Distribute or Publicly Perform. You may not offer or impose any terms
on the Work that restrict the terms of this License or the ability of
the recipient of the Work to exercise the rights granted to that
recipient under the terms of the License. You may not sublicense the
Work. You must keep intact all notices that refer to this License and
to the disclaimer of warranties with every copy of the Work You
Distribute or Publicly Perform. When You Distribute or Publicly
Perform the Work, You may not impose any effective technological
measures on the Work that restrict the ability of a recipient of the
Work from You to exercise the rights granted to that recipient under
the terms of the License. This Section 4(a) applies to the Work as
incorporated in a Collection, but this does not require the Collection
apart from the Work itself to be made subject to the terms of this
License. If You create a Collection, upon notice from any Licensor You
must, to the extent practicable, remove from the Collection any credit
as required by Section 4(c), as requested. If You create an
Adaptation, upon notice from any Licensor You must, to the extent
practicable, remove from the Adaptation any credit as required by
Section 4(c), as requested.
b. You may not exercise any of the rights granted to You in Section 3
above in any manner that is primarily intended for or directed toward
commercial advantage or private monetary compensation. The exchange of
the Work for other copyrighted works by means of digital file-sharing
or otherwise shall not be considered to be intended for or directed
toward commercial advantage or private monetary compensation, provided
there is no payment of any monetary compensation in connection with
the exchange of copyrighted works.
c. If You Distribute, or Publicly Perform the Work or any Adaptations or
Collections, You must, unless a request has been made pursuant to
Section 4(a), keep intact all copyright notices for the Work and
provide, reasonable to the medium or means You are utilizing: (i) the
name of the Original Author (or pseudonym, if applicable) if supplied,
and/or if the Original Author and/or Licensor designate another party
or parties (e.g., a sponsor institute, publishing entity, journal) for
attribution ("Attribution Parties") in Licensor's copyright notice,
terms of service or by other reasonable means, the name of such party
or parties; (ii) the title of the Work if supplied; (iii) to the
extent reasonably practicable, the URI, if any, that Licensor
specifies to be associated with the Work, unless such URI does not
refer to the copyright notice or licensing information for the Work;
and, (iv) consistent with Section 3(b), in the case of an Adaptation,
a credit identifying the use of the Work in the Adaptation (e.g.,
"French translation of the Work by Original Author," or "Screenplay
based on original Work by Original Author"). The credit required by
this Section 4(c) may be implemented in any reasonable manner;
provided, however, that in the case of a Adaptation or Collection, at
a minimum such credit will appear, if a credit for all contributing
authors of the Adaptation or Collection appears, then as part of these
credits and in a manner at least as prominent as the credits for the
other contributing authors. For the avoidance of doubt, You may only
use the credit required by this Section for the purpose of attribution
in the manner set out above and, by exercising Your rights under this
License, You may not implicitly or explicitly assert or imply any
connection with, sponsorship or endorsement by the Original Author,
Licensor and/or Attribution Parties, as appropriate, of You or Your
use of the Work, without the separate, express prior written
permission of the Original Author, Licensor and/or Attribution
Parties.
d. For the avoidance of doubt:
i. Non-waivable Compulsory License Schemes. In those jurisdictions in
which the right to collect royalties through any statutory or
compulsory licensing scheme cannot be waived, the Licensor
reserves the exclusive right to collect such royalties for any
exercise by You of the rights granted under this License;
ii. Waivable Compulsory License Schemes. In those jurisdictions in
which the right to collect royalties through any statutory or
compulsory licensing scheme can be waived, the Licensor reserves
the exclusive right to collect such royalties for any exercise by
You of the rights granted under this License if Your exercise of
such rights is for a purpose or use which is otherwise than
noncommercial as permitted under Section 4(b) and otherwise waives
the right to collect royalties through any statutory or compulsory
licensing scheme; and,
iii. Voluntary License Schemes. The Licensor reserves the right to
collect royalties, whether individually or, in the event that the
Licensor is a member of a collecting society that administers
voluntary licensing schemes, via that society, from any exercise
by You of the rights granted under this License that is for a
purpose or use which is otherwise than noncommercial as permitted
under Section 4(c).
e. Except as otherwise agreed in writing by the Licensor or as may be
otherwise permitted by applicable law, if You Reproduce, Distribute or
Publicly Perform the Work either by itself or as part of any
Adaptations or Collections, You must not distort, mutilate, modify or
take other derogatory action in relation to the Work which would be
prejudicial to the Original Author's honor or reputation. Licensor
agrees that in those jurisdictions (e.g. Japan), in which any exercise
of the right granted in Section 3(b) of this License (the right to
make Adaptations) would be deemed to be a distortion, mutilation,
modification or other derogatory action prejudicial to the Original
Author's honor and reputation, the Licensor will waive or not assert,
as appropriate, this Section, to the fullest extent permitted by the
applicable national law, to enable You to reasonably exercise Your
right under Section 3(b) of this License (right to make Adaptations)
but not otherwise.
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Termination
a. This License and the rights granted hereunder will terminate
automatically upon any breach by You of the terms of this License.
Individuals or entities who have received Adaptations or Collections
from You under this License, however, will not have their licenses
terminated provided such individuals or entities remain in full
compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
survive any termination of this License.
b. Subject to the above terms and conditions, the license granted here is
perpetual (for the duration of the applicable copyright in the Work).
Notwithstanding the above, Licensor reserves the right to release the
Work under different license terms or to stop distributing the Work at
any time; provided, however that any such election will not serve to
withdraw this License (or any other license that has been, or is
required to be, granted under the terms of this License), and this
License will continue in full force and effect unless terminated as
stated above.
8. Miscellaneous
a. Each time You Distribute or Publicly Perform the Work or a Collection,
the Licensor offers to the recipient a license to the Work on the same
terms and conditions as the license granted to You under this License.
b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
offers to the recipient a license to the original Work on the same
terms and conditions as the license granted to You under this License.
c. If any provision of this License is invalid or unenforceable under
applicable law, it shall not affect the validity or enforceability of
the remainder of the terms of this License, and without further action
by the parties to this agreement, such provision shall be reformed to
the minimum extent necessary to make such provision valid and
enforceable.
d. No term or provision of this License shall be deemed waived and no
breach consented to unless such waiver or consent shall be in writing
and signed by the party to be charged with such waiver or consent.
e. This License constitutes the entire agreement between the parties with
respect to the Work licensed here. There are no understandings,
agreements or representations with respect to the Work not specified
here. Licensor shall not be bound by any additional provisions that
may appear in any communication from You. This License may not be
modified without the mutual written agreement of the Licensor and You.
f. The rights granted under, and the subject matter referenced, in this
License were drafted utilizing the terminology of the Berne Convention
for the Protection of Literary and Artistic Works (as amended on
September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996
and the Universal Copyright Convention (as revised on July 24, 1971).
These rights and subject matter take effect in the relevant
jurisdiction in which the License terms are sought to be enforced
according to the corresponding provisions of the implementation of
those treaty provisions in the applicable national law. If the
standard suite of rights granted under applicable copyright law
includes additional rights not granted under this License, such
additional rights are deemed to be included in the License; this
License is not intended to restrict the license of any rights under
applicable law.
Creative Commons Notice
Creative Commons is not a party to this License, and makes no warranty
whatsoever in connection with the Work. Creative Commons will not be
liable to You or any party on any legal theory for any damages
whatsoever, including without limitation any general, special,
incidental or consequential damages arising in connection to this
license. Notwithstanding the foregoing two (2) sentences, if Creative
Commons has expressly identified itself as the Licensor hereunder, it
shall have all rights and obligations of Licensor.
Except for the limited purpose of indicating to the public that the
Work is licensed under the CCPL, Creative Commons does not authorize
the use by either party of the trademark "Creative Commons" or any
related trademark or logo of Creative Commons without the prior
written consent of Creative Commons. Any permitted use will be in
compliance with Creative Commons' then-current trademark usage
guidelines, as may be published on its website or otherwise made
available upon request from time to time. For the avoidance of doubt,
this trademark restriction does not form part of the License.
Creative Commons may be contacted at https://creativecommons.org/.

View File

@@ -7,10 +7,16 @@
#include <stdint.h>
#include <string.h>
#include "fixings.h"
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_MSC_VER)
__pragma(pack(push, 1))
#endif
typedef struct arm_state { // Remember to update asmcode.S if this gets rearranged
uint32_t reg[16]; // Registers for current mode.
@@ -41,10 +47,16 @@ typedef struct arm_state { // Remember to update asmcode.S if this gets rearran
uint8_t interrupts;
uint32_t cpu_events_state; // Only used for suspend and resume!
}
#ifndef __EMSCRIPTEN__
#if !defined(__EMSCRIPTEN__) && !defined(_MSC_VER)
__attribute__((packed))
#endif
arm_state;
#if defined(_MSC_VER)
__pragma(pack(pop))
#endif
extern struct arm_state arm __asm__("arm");
#define MODE_USR 0x10

View File

@@ -9,7 +9,7 @@ struct LiteralRef {
uintptr_t value;
};
static constexpr size_t MAX_LITERALS = 1024;
static size_t MAX_LITERALS = 1024;
static LiteralRef literals[MAX_LITERALS];
static size_t literals_count = 0;

View File

@@ -6,16 +6,31 @@
#include <stdbool.h>
#include <stdint.h>
#include "fixings.h"
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_MSC_VER)
__pragma(pack(push, 1))
#endif
struct translation {
uintptr_t unused;
void** jump_table;
uint32_t *start_ptr;
uint32_t *end_ptr;
} __attribute__((packed));
}
#if !defined(_MSC_VER)
__attribute__((packed))
#endif
;
#if defined(_MSC_VER)
__pragma(pack(pop))
#endif
extern struct translation translation_table[] __asm__("translation_table");
#define INSN_BUFFER_SIZE 0x1000000

View File

@@ -45,13 +45,15 @@ static void debugLog(char* str, ...){};
//config options
#define EMU_FPS 60
#define DBVZ_SYSCLK_PRECISION 2000000//the amount of cycles to run before adding SYSCLKs, higher = faster, higher values may skip timer events and lower audio accuracy
#define AUDIO_SAMPLE_RATE 48000
#define AUDIO_SAMPLES_PER_FRAME (AUDIO_SAMPLE_RATE / EMU_FPS)
#define AUDIO_SPEAKER_RANGE 0x6000//prevent hitting the top or bottom of the speaker when switching direction rapidly
#define SD_CARD_NCR_BYTES 1//how many 0xFF bytes come before the R1 response
#define SAVE_STATE_VERSION 0x00000001
//shared constants
#define AUDIO_SAMPLES_PER_FRAME (AUDIO_SAMPLE_RATE / EMU_FPS)
#define SD_CARD_BLOCK_SIZE 512//all newer SDSC cards have this fixed at 512
#define SD_CARD_BLOCK_DATA_PACKET_SIZE (1 + SD_CARD_BLOCK_SIZE + 2)
#define SD_CARD_RESPONSE_FIFO_SIZE (SD_CARD_BLOCK_DATA_PACKET_SIZE * 3)

18
include/fixings.h Normal file
View File

@@ -0,0 +1,18 @@
//
// Created by xer on 2021-07-15.
//
#ifndef MU_FIXINGS_H
#define MU_FIXINGS_H
/* Fixes for Visual Studio. */
#if defined(_MSC_VER)
/* Prevent any assembly references from being used. */
#define __asm__(what)
/* GCC's __builtin_popcount */
#include <intrin.h>
#define __builtin_popcount __popcnt
#endif
#endif // MU_FIXINGS_H

0
src/flx68000.h → include/flx68000.h Executable file → Normal file
View File

0
src/m68k/m68k.h → include/m68k/m68k.h Executable file → Normal file
View File

0
src/m68k/m68kconf.h → include/m68k/m68kconf.h Executable file → Normal file
View File

0
src/m68k/m68kcpu.h → include/m68k/m68kcpu.h Executable file → Normal file
View File

View File

0
src/m68k/m68kops.h → include/m68k/m68kops.h Executable file → Normal file
View File

View File

@@ -1,8 +1,10 @@
#ifndef PORTABILITY_H
#define PORTABILITY_H
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <limits.h>
//threads
#if defined(EMU_MULTITHREADED)
@@ -25,6 +27,15 @@
#define likely_equal(x, y) x
#endif
// PS2 is lacking intmax_t and uintmax_t!
#if !defined(UINTMAX_MAX)
typedef intmax_t signed long long int;
typedef uintmax_t unsigned long long int;
#define INTMAX_MAX LONG_LONG_MAX
#define UINTMAX_MAX ULONG_LONG_MAX
#endif
//endian
#define SWAP_16(x) ((uint16_t)((((uint16_t)(x) & 0x00FF) << 8) | (((uint16_t)(x) & 0xFF00) >> 8)))
#define SWAP_32(x) ((uint32_t)((((uint32_t)(x) & 0x000000FF) << 24) | (((uint32_t)(x) & 0x0000FF00) << 8) | (((uint32_t)(x) & 0x00FF0000) >> 8) | (((uint32_t)(x) & 0xFF000000) >> 24)))

View File

@@ -18,6 +18,7 @@
#if !defined(EMU_NO_SAFETY)
extern ArmCpu pxa260CpuState;
#endif
extern uint16_t* pxa260Framebuffer;
extern Pxa260pwrClk pxa260PwrClk;
extern Pxa260ic pxa260Ic;

View File

@@ -1,3 +1,5 @@
#include "../w86l488.h"
static uint8_t pxa260_io_read_byte(uint32_t addr){
debugLog("Invalid 8 bit PXA260 register read:0x%08X, PC:0x%08X\n", addr, pxa260GetPc());
return 0x00;

View File

@@ -4,7 +4,7 @@
#include "pxa260_CPU.h"
#include "pxa260_IC.h"
uint16_t* pxa260Framebuffer;
extern uint16_t* pxa260Framebuffer;
/*
PXA260 OS LCD controller

View File

@@ -0,0 +1,85 @@
if(MU_LIBRETRO_OBJECT_LIB)
set(MU_LIBRETRO_OBJECT_LIB_USE
$<TARGET_OBJECTS:MuCore>
$<TARGET_OBJECTS:MuCoreFileLauncher>
$<TARGET_OBJECTS:MuCoreAudio>
$<TARGET_OBJECTS:MuCoreM68k>)
else()
set(MU_LIBRETRO_OBJECT_LIB_USE)
endif()
add_library(mu_libretro SHARED
${MU_LIBRETRO_OBJECT_LIB_USE}
libretro.c
cursors.c
miniz.c
libretro-common/compat/compat_strl.c
libretro-common/compat/compat_posix_string.c
libretro-common/compat/fopen_utf8.c
libretro-common/encodings/encoding_utf.c
libretro-common/memmap/memmap.c
libretro-common/streams/file_stream.c
libretro-common/string/stdstring.c
libretro-common/vfs/vfs_implementation.c)
# Remove the "lib" prefix always, RetroArch does not name in this way
set_target_properties(mu_libretro PROPERTIES PREFIX "")
# Bring all the sub-modules as needed
if(NOT MU_LIBRETRO_OBJECT_LIB)
target_link_libraries(mu_libretro
MuCore)
endif()
# Include the required includes
target_include_directories(mu_libretro PUBLIC
"${PROJECT_SOURCE_DIR}/include"
"libretro-common/include")
# Name must be specifically set for RetroArch for it to work properly
if(ANDROID OR (DEFINED ANDROID_PLATFORM AND ANDROID_PLATFORM))
mu_target_binary_name(mu_libretro
"mu_libretro_android")
else()
mu_target_binary_name(mu_libretro
"mu_libretro${LIBRETRO_SUFFIX}")
endif()
# Library location must be placed in the build output for the RetroArch
# build system to pick up the library
# Note that RUNTIME_OUTPUT_DIRECTORY is needed for the Windows build to output
# directories since .DLL files are output there and not where shared libraries
# go??? No idea really.
mu_target_binary_output(mu_libretro
"${MU_DYLIB_OUTPUT_DIR}")
# Custom launching the core, tries to find RetroArch on the system
## Determine RetroArch directory
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
set(MU_LIBRETRO_EXTENSION ".exe")
if (EXISTS "$ENV{APPDATA}/RetroArch")
set(MU_LIBRETRO_DIR "$ENV{APPDATA}/RetroArch")
endif()
else()
find_program(RETROARCH_APP retroarch)
if(RETROARCH_APP)
get_filename_component(MU_LIBRETRO_DIR "${RETROARCH_APP}" DIRECTORY)
endif()
set(MU_LIBRETRO_EXTENSION "")
endif()
## Target to run RetroArch with the Mu Core
if(DEFINED MU_LIBRETRO_DIR)
add_custom_target(RetroArch
DEPENDS mu_libretro
COMMAND "${MU_LIBRETRO_DIR}/retroarch${MU_LIBRETRO_EXTENSION}" "-v" "-L" "$<TARGET_FILE:mu_libretro>"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
COMMENT "Starting RetroArch with Mu")
# Do not try running this by default
set_target_properties(RetroArch PROPERTIES
EXCLUDE_FROM_ALL TRUE
EXCLUDE_FROM_DEFAULT_BUILD TRUE)
endif()

View File

@@ -126,14 +126,30 @@ else ifeq ($(platform), osx)
ifeq ($(arch),ppc)
CFLAGS += -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1
endif
OSXVER = $(shell sw_vers -productVersion | cut -d. -f 2)
OSX_GT_MOJAVE = $(shell (( $(OSXVER) >= 14)) && echo "YES")
ifneq ($(OSX_GT_MOJAVE),YES)
#this breaks compiling on Mac OS Mojave
fpic += -mmacosx-version-min=10.1
endif
OSXMAJVER = $(shell sw_vers -productVersion | cut -d. -f 1)
OSXMINVER = $(shell sw_vers -productVersion | cut -d. -f 2)
OSX_LT_MAVERICKS = $(shell (( $(OSXMAJVER) == 10 )) && (( $(OSXMINVER) <= 9)) && echo "YES")
OSX_GT_MOJAVE = $(shell (( $(OSXMAJVER) > 10 )) || (( $(OSXMINVER) >= 14)) && echo "YES")
ifeq ($(OSX_LT_MAVERICKS),"YES")
fpic += -mmacosx-version-min=10.5
else
ifneq ($(OSX_GT_MOJAVE),YES)
#this breaks compiling on Mac OS Mojave
fpic += -mmacosx-version-min=10.1
endif
endif
SHARED := -dynamiclib
ifeq ($(CROSS_COMPILE),1)
TARGET_RULE = -target $(LIBRETRO_APPLE_PLATFORM) -isysroot $(LIBRETRO_APPLE_ISYSROOT)
CFLAGS += $(TARGET_RULE)
CPPFLAGS += $(TARGET_RULE)
CXXFLAGS += $(TARGET_RULE)
LDFLAGS += $(TARGET_RULE) -lc++
endif
# iOS
else ifneq (,$(findstring ios,$(platform)))
EXT ?= dylib
@@ -171,6 +187,10 @@ else ifeq ($(platform), tvos-arm64)
ifeq ($(IOSSDK),)
IOSSDK := $(shell xcodebuild -version -sdk appletvos Path)
endif
CC = clang -arch arm64 -isysroot $(IOSSDK)
CXX = clang++ -arch arm64 -isysroot $(IOSSDK)
CC += -mappletvos-version-min=11.0
CFLAGS += -mappletvos-version-min=11.0
# Theos iOS
else ifeq ($(platform), theos_ios)
@@ -193,33 +213,15 @@ else ifeq ($(platform), qnx)
AR = qcc -Vgcc_ntoarmv7le
CFLAGS += -D__BLACKBERRY_QNX__
# PS3
else ifeq ($(platform), ps3)
EXT = a
TARGET := $(TARGET_NAME)_libretro_ps3.$(EXT)
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
CFLAGS += -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# PS3 (SNC)
else ifeq ($(platform), sncps3)
EXT = a
TARGET := $(TARGET_NAME)_libretro_ps3.$(EXT)
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
CFLAGS += -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# Lightweight PS3 Homebrew SDK
else ifeq ($(platform), psl1ght)
EXT = a
TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT)
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
CFLAGS += -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1
else ifneq (,$(filter $(platform), ps3 psl1ght))
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)gcc$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)ar$(EXE_EXT)
ifeq ($(platform), psl1ght)
CFLAGS += -D__PSL1GHT__
endif
CFLAGS += -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1 -D__PS3__
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
@@ -394,7 +396,9 @@ else ifneq (,$(findstring armv,$(platform)))
# Emscripten
else ifeq ($(platform), emscripten)
TARGET := $(TARGET_NAME)_libretro_emscripten.bc
AR=emar
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# GCW0
else ifeq ($(platform), gcw0)
@@ -451,6 +455,16 @@ else ifeq ($(platform), xbox1_msvc2003)
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# PlayStation 2
else ifeq ($(platform), ps2)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = mips64r5900el-ps2-elf-gcc$(EXE_EXT)
CXX = mips64r5900el-ps2-elf-g++$(EXE_EXT)
AR = mips64r5900el-ps2-elf-ar$(EXE_EXT)
CFLAGS += -Wall -DPS2 -DABGR1555
STATIC_LINKING = 1
STATIC_LINKING_LINK = 1
# Windows
else
EXT ?= dll
@@ -528,9 +542,7 @@ all: $(TARGET)
$(TARGET): $(OBJECTS)
@echo "** BUILDING $(TARGET) FOR PLATFORM $(platform) **"
ifeq ($(platform), emscripten)
$(CC) $(CFLAGS) $(OBJOUT)$@ $^
else ifeq ($(STATIC_LINKING_LINK), 1)
ifeq ($(STATIC_LINKING_LINK), 1)
ifneq (,$(findstring msvc,$(platform)))
$(LD) $(LINKOUT)$@ $(OBJECTS)
else

View File

@@ -5,7 +5,7 @@ COREDEFINES :=
# my first make function!!!
CHECK_ALL = $(strip $(foreach v,$(2),$(if $(findstring $(v),$(1)),$(v),)))
INCFLAGS := -I$(LIBRETRO_COMM_DIR)/include
INCFLAGS := -I$(CORE_DIR)/../include -I$(LIBRETRO_COMM_DIR)/include
ifeq ($(DEBUG), 1)
COREDEFINES += -DEMU_DEBUG
@@ -109,6 +109,7 @@ COREDEFINES += $(EMU_DEFINES)
SOURCES_C := $(CORE_DIR)/libretro.c \
$(CORE_DIR)/cursors.c \
$(CORE_DIR)/miniz.c \
$(EMU_SOURCES_C)
SOURCES_CXX := $(EMU_SOURCES_CXX)
SOURCES_ASM := $(EMU_SOURCES_ASM)
@@ -123,3 +124,6 @@ ifneq ($(STATIC_LINKING), 1)
$(LIBRETRO_COMM_DIR)/string/stdstring.c \
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.c
endif
# Make sure C++ shares our include flags!
CXXFLAGS += $(INCFLAGS)

View File

@@ -53,9 +53,8 @@ SOEXT = .dll
# Platform setup
STATIC_LINKING = 0
platform = win
PLATDEFS =
PLATCFLAGS = -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DWIN32 -DCORRECT_VRAM_READS -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -DMSVC2010_EXPORTS -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
PLATCFLAGS = -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DWIN32 -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
PLATCXXFLAGS = $(PLATCFLAGS)
#PLATLDFLAGS = -shared -lm
#PLATLDXFLAGS = -shared -lm
@@ -82,13 +81,17 @@ LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS)
# Tuning
ifeq ($(DEBUG),1)
CFLAGS += -Od -Zi -D_DEBUG
CXXFLAGS += -Od -Zi -D_DEBUG
LDFLAGS += -DEBUG -DLL
CFLAGS += -Od -Zi -D_DEBUG
CXXFLAGS += -Od -Zi -D_DEBUG
CFLAGS += -MTd
CXXFLAGS += -MTd
LDFLAGS += -DEBUG -DLL
else
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
LDFLAGS += -DLL
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
CFLAGS += -MT
CXXFLAGS += -MT
LDFLAGS += -DLL
endif
ifneq ($(LOG_PERFORMANCE),)

View File

@@ -37,10 +37,17 @@ PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../IDE")
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/include")
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/lib")
WindowsSdkDir := $(INETSDK)
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3" -v "Install Dir" | grep -o '[A-Z]:\\.*')
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)/Include;libretro/msvc/msvc-2005
export LIB := $(LIB);$(WindowsSdkDir);$(INETSDK)/Lib
WindowsSDKIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include")
WindowsSDKAtlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\atl")
WindowsSDKCrtIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\crt")
WindowsSDKGlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\gl")
WindowsSDKMfcIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\mfc")
WindowsSDKLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib")
export INCLUDE := $(INCLUDE);$(WindowsSDKIncludeDir);$(WindowsSDKAtlIncludeDir);$(WindowsSDKCrtIncludeDir);$(WindowsSDKGlIncludeDir);$(WindowsSDKMfcIncludeDir);libretro-common/include/compat/msvc
export LIB := $(LIB);$(WindowsSDKLibDir)
############
# Extensions
@@ -52,9 +59,8 @@ SOEXT = .dll
# Platform setup
STATIC_LINKING = 0
platform = win
PLATDEFS =
PLATCFLAGS = -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DWIN32 -DCORRECT_VRAM_READS -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -DMSVC2010_EXPORTS -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
PLATCFLAGS = -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DWIN32 -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
PLATCXXFLAGS = $(PLATCFLAGS)
#PLATLDFLAGS = -shared -lm
#PLATLDXFLAGS = -shared -lm
@@ -81,13 +87,17 @@ LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS)
# Tuning
ifeq ($(DEBUG),1)
CFLAGS += -Od -Zi -D_DEBUG
CXXFLAGS += -Od -Zi -D_DEBUG
LDFLAGS += -DEBUG -DLL
CFLAGS += -Od -Zi -D_DEBUG
CXXFLAGS += -Od -Zi -D_DEBUG
CFLAGS += -MTd
CXXFLAGS += -MTd
LDFLAGS += -DEBUG -DLL
else
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
LDFLAGS += -DLL
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
CFLAGS += -MT
CXXFLAGS += -MT
LDFLAGS += -DLL
endif
ifneq ($(LOG_PERFORMANCE),)

View File

@@ -52,9 +52,8 @@ SOEXT = .dll
# Platform setup
STATIC_LINKING = 0
platform = win
PLATDEFS =
PLATCFLAGS = -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DWIN32 -DCORRECT_VRAM_READS -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -DMSVC2010_EXPORTS -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
PLATCFLAGS = -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DWIN32 -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
PLATCXXFLAGS = $(PLATCFLAGS)
#PLATLDFLAGS = -shared -lm
#PLATLDXFLAGS = -shared -lm
@@ -81,13 +80,17 @@ LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS)
# Tuning
ifeq ($(DEBUG),1)
CFLAGS += -Od -Zi -D_DEBUG
CXXFLAGS += -Od -Zi -D_DEBUG
LDFLAGS += -DEBUG -DLL
CFLAGS += -Od -Zi -D_DEBUG
CXXFLAGS += -Od -Zi -D_DEBUG
CFLAGS += -MTd
CXXFLAGS += -MTd
LDFLAGS += -DEBUG -DLL
else
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
LDFLAGS += -DLL
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
CFLAGS += -MT
CXXFLAGS += -MT
LDFLAGS += -DLL
endif
ifneq ($(LOG_PERFORMANCE),)

View File

@@ -37,11 +37,16 @@ PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../IDE")
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/include")
LIB := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/lib/amd64")
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)Include
export LIB := $(LIB);$(WindowsSdkDir)Lib/x64
WindowsSDKIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include")
WindowsSDKGlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\gl")
WindowsSDKLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib\x64")
INCFLAGS_PLATFORM = -I"$(WindowsSdkDirInc)"
export INCLUDE := $(INCLUDE);$(WindowsSDKIncludeDir);$(WindowsSDKGlIncludeDir)
export LIB := $(LIB);$(WindowsSDKLibDir)
############
# Extensions
@@ -53,9 +58,8 @@ SOEXT = .dll
# Platform setup
STATIC_LINKING = 0
platform = win
PLATDEFS =
PLATCFLAGS = -DWIN32 -DCORRECT_VRAM_READS -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -DMSVC2010_EXPORTS -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
PLATCFLAGS = -DWIN32 -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -DMSVC2010_EXPORTS -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
PLATCXXFLAGS = $(PLATCFLAGS)
#PLATLDFLAGS = -shared -lm
#PLATLDXFLAGS = -shared -lm
@@ -82,13 +86,17 @@ LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS)
# Tuning
ifeq ($(DEBUG),1)
CFLAGS += -Od -Zi -D_DEBUG
CXXFLAGS += -Od -Zi -D_DEBUG
LDFLAGS += -DEBUG -DLL
CFLAGS += -Od -Zi -D_DEBUG
CXXFLAGS += -Od -Zi -D_DEBUG
CFLAGS += -MTd
CXXFLAGS += -MTd
LDFLAGS += -DEBUG -DLL
else
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
LDFLAGS += -DLL
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
CFLAGS += -MT
CXXFLAGS += -MT
LDFLAGS += -DLL
endif
ifneq ($(LOG_PERFORMANCE),)

View File

@@ -37,11 +37,16 @@ PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../IDE")
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/include")
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS100COMNTOOLS)../../VC/lib")
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)Include
export LIB := $(LIB);$(WindowsSdkDir)Lib
WindowsSDKIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include")
WindowsSDKGlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\gl")
WindowsSDKLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib")
INCFLAGS_PLATFORM = -I"$(WindowsSdkDirInc)"
export INCLUDE := $(INCLUDE);$(WindowsSDKIncludeDir);$(WindowsSDKGlIncludeDir)
export LIB := $(LIB);$(WindowsSDKLibDir)
############
# Extensions
@@ -53,9 +58,8 @@ SOEXT = .dll
# Platform setup
STATIC_LINKING = 0
platform = win
PLATDEFS =
PLATCFLAGS = -DWIN32 -DCORRECT_VRAM_READS -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -DMSVC2010_EXPORTS -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
PLATCFLAGS = -DWIN32 -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -DMSVC2010_EXPORTS -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
PLATCXXFLAGS = $(PLATCFLAGS)
#PLATLDFLAGS = -shared -lm
#PLATLDXFLAGS = -shared -lm
@@ -82,13 +86,17 @@ LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS)
# Tuning
ifeq ($(DEBUG),1)
CFLAGS += -Od -Zi -D_DEBUG
CXXFLAGS += -Od -Zi -D_DEBUG
LDFLAGS += -DEBUG -DLL
CFLAGS += -Od -Zi -D_DEBUG
CXXFLAGS += -Od -Zi -D_DEBUG
CFLAGS += -MTd
CXXFLAGS += -MTd
LDFLAGS += -DEBUG -DLL
else
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
LDFLAGS += -DLL
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
CFLAGS += -MT
CXXFLAGS += -MT
LDFLAGS += -DLL
endif
ifneq ($(LOG_PERFORMANCE),)

View File

@@ -61,9 +61,8 @@ SOEXT = .dll
# Platform setup
STATIC_LINKING = 0
platform = win
PLATDEFS =
PLATCFLAGS = -DWIN32 -DCORRECT_VRAM_READS -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -DMSVC2010_EXPORTS -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
PLATCFLAGS = -DWIN32 -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
PLATCXXFLAGS = $(PLATCFLAGS)
#PLATLDFLAGS = -shared -lm
#PLATLDXFLAGS = -shared -lm
@@ -90,13 +89,17 @@ LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS)
# Tuning
ifeq ($(DEBUG),1)
CFLAGS += -Od -Zi -D_DEBUG
CXXFLAGS += -Od -Zi -D_DEBUG
LDFLAGS += -DEBUG -DLL
CFLAGS += -Od -Zi -D_DEBUG
CXXFLAGS += -Od -Zi -D_DEBUG
CFLAGS += -MTd
CXXFLAGS += -MTd
LDFLAGS += -DEBUG -DLL
else
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
LDFLAGS += -DLL
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
CFLAGS += -MT
CXXFLAGS += -MT
LDFLAGS += -DLL
endif
ifneq ($(LOG_PERFORMANCE),)

View File

@@ -69,7 +69,7 @@ extern "C" {
# endif
# endif
# else
# if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__CELLOS_LV2__)
# if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__PS3__)
# define RETRO_API RETRO_CALLCONV __attribute__((__visibility__("default")))
# else
# define RETRO_API RETRO_CALLCONV

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 2010-2018 The RetroArch team
/* Copyright (C) 2010-2020 The RetroArch team
*
* ---------------------------------------------------------------------------------------
* The following license statement only applies to this file (memmap.h).
@@ -26,7 +26,7 @@
#include <stdio.h>
#include <stdint.h>
#if defined(__CELLOS_LV2__) || defined(PSP) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH)
#if defined(PSP) || defined(PS2) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH) || defined(HAVE_LIBNX) || defined(__PS3__) || defined(__PSL1GHT__) || defined(DJGPP)
/* No mman available */
#elif defined(_WIN32) && !defined(_XBOX)
#include <windows.h>
@@ -49,4 +49,4 @@ int memsync(void *start, void *end);
int memprotect(void *addr, size_t len);
#endif
#endif

View File

@@ -39,7 +39,7 @@
#include <Xtl.h>
#endif
#if defined(__CELLOS_LV2__)
#if defined(__PS3__)
#include <sys/fs_external.h>
#endif
@@ -75,8 +75,8 @@ static INLINE bool bits_any_set(uint32_t* ptr, uint32_t count)
}
#ifndef PATH_MAX_LENGTH
#if defined(__CELLOS_LV2__)
#define PATH_MAX_LENGTH CELL_FS_MAX_FS_PATH_LENGTH
#if defined(__PS3__)
#define PATH_MAX_LENGTH 1024
#elif defined(_XBOX1) || defined(_3DS) || defined(PSP) || defined(GEKKO)|| defined(WIIU)
#define PATH_MAX_LENGTH 512
#else

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 2010-2018 The RetroArch team
/* Copyright (C) 2010-2020 The RetroArch team
*
* ---------------------------------------------------------------------------------------
* The following license statement only applies to this file (memmap.c).
@@ -21,6 +21,7 @@
*/
#include <stdint.h>
#include <stdlib.h>
#include <memmap.h>
#ifndef PROT_READ
@@ -130,14 +131,14 @@ int mprotect(void *addr, size_t len, int prot)
#endif
#if defined(__MACH__) && defined(__arm__)
#if defined(__MACH__) && (defined(__arm__) || defined(__arm64__))
#include <libkern/OSCacheControl.h>
#endif
int memsync(void *start, void *end)
{
size_t len = (char*)end - (char*)start;
#if defined(__MACH__) && defined(__arm__)
#if defined(__MACH__) && (defined(__arm__) || defined(__arm64__))
sys_dcache_flush(start ,len);
sys_icache_invalidate(start, len);
return 0;
@@ -160,4 +161,4 @@ int memsync(void *start, void *end)
int memprotect(void *addr, size_t len)
{
return mprotect(addr, len, PROT_READ | PROT_WRITE | PROT_EXEC);
}
}

View File

@@ -55,7 +55,7 @@
# include <unistd.h>
#endif
#ifdef __CELLOS_LV2__
#ifdef __PS3__
#include <cell/cell_fs.h>
#define O_RDONLY CELL_FS_O_RDONLY
#define O_WRONLY CELL_FS_O_WRONLY
@@ -123,7 +123,7 @@ int64_t retro_vfs_file_seek_internal(libretro_vfs_implementation_file *stream, i
/* VC2005 and up have a special 64-bit fseek */
#ifdef ATLEAST_VC2005
return _fseeki64(stream->fp, offset, whence);
#elif defined(__CELLOS_LV2__) || defined(_MSC_VER) && _MSC_VER <= 1310
#elif defined(__PS3__) || defined(_MSC_VER) && _MSC_VER <= 1310
return fseek(stream->fp, (long)offset, whence);
#else
return fseeko(stream->fp, (off_t)offset, whence);

View File

@@ -8,17 +8,21 @@
#include <stdbool.h>
#include <time.h>
#if defined(_MSC_VER)
#include <malloc.h>
#endif
#include <compat/strl.h>
#include <retro_miscellaneous.h>
#include <streams/file_stream.h>
#include <string/stdstring.h>
#include "../src/emulator.h"
#include "../src/portability.h"
#include "../src/silkscreen.h"
#include "../src/fileLauncher/launcher.h"
#include "emulator.h"
#include "portability.h"
#include "silkscreen.h"
#include "fileLauncher/launcher.h"
#include "cursors.h"
#include "miniz.h"
#define JOYSTICK_DEADZONE 4000
#define JOYSTICK_MULTIPLIER 0.0001
@@ -213,9 +217,13 @@ void retro_get_system_info(struct retro_system_info *info){
#ifndef GIT_VERSION
#define GIT_VERSION ""
#endif
info->library_version = "v1.1.0" GIT_VERSION;
info->library_version = "v1.3.3" GIT_VERSION;
info->need_fullpath = true;
info->valid_extensions = "prc|pqa|img";
info->valid_extensions = "prc|pqa|img|pdb|zip";
// Prevent RetroArch from looking within ZIP files, so we can grab all
// the PRCs and PDBs accordingly as a single group
info->block_extract = true;
}
void retro_get_system_av_info(struct retro_system_av_info *info){
@@ -293,7 +301,7 @@ void retro_set_environment(retro_environment_t cb){
}
void retro_set_audio_sample(retro_audio_sample_t cb){
}
void retro_set_audio_sample_batch(retro_audio_sample_batch_t cb){
@@ -316,6 +324,70 @@ void retro_reset(void){
emulatorSoftReset();
}
/**
* Animation to play when the device is asleep.
*
* @param video_cb The output callback.
* @param width The width of the framebuffer.
* @param height The height of the framebuffer.
* @return If the sleep animation was successful.
* @since 2025/08/11
*/
static bool sleepAnimation(retro_video_refresh_t video_cb,
int32_t width, int32_t height) {
static int32_t bump;
uint16_t* buf;
uint16_t color;
size_t bufLen, area;
int32_t point;
// Allocate buffer to render
area = width * height;
bufLen = area * sizeof(uint16_t);
#if defined(_MSC_VER)
buf = _alloca(bufLen);
#else
buf = alloca(bufLen);
#endif
if (buf == NULL) {
return false;
}
// Wipe everything
memset(buf, 0, bufLen);
if (palmMisc.greenLed) {
color = 0x01F1;
} else {
color = 0xFFFF;
#if defined(EMU_SUPPORT_PALM_OS5)
if (palmMisc.redLed) {
color = 0xF700;
}
#endif
}
// Set a "random" pixel to the color
point = (int32_t)palmCycleCounter + palmClockMultiplier +
palmMisc.dataPort + palmSdCard.responseReadPositionBit + (++bump);
if (point < 0)
point = -point;
point %= width * 2;
if (point >= width) {
point = width - (point - width);
}
// Set color
buf[point] = color;
// Render the buffer
video_cb(buf,
width, height, width * sizeof(uint16_t));
return true;
}
void retro_run(void){
input_poll_cb();
@@ -411,9 +483,22 @@ void retro_run(void){
//draw mouse
if(useJoystickAsMouse)
renderMouseCursor(touchCursorX, touchCursorY);
video_cb(palmFramebuffer, palmFramebufferWidth, screenYEnd, palmFramebufferWidth * sizeof(uint16_t));
// If the LCD is off, try an animation
if (palmMisc.lcdOn == false) {
if (!sleepAnimation(video_cb, palmFramebufferWidth, screenYEnd)) {
video_cb(palmFramebuffer,
palmFramebufferWidth, screenYEnd,
palmFramebufferWidth * sizeof(uint16_t));
}
} else {
video_cb(palmFramebuffer,
palmFramebufferWidth, screenYEnd,
palmFramebufferWidth * sizeof(uint16_t));
}
audio_cb(palmAudio, AUDIO_SAMPLES_PER_FRAME);
if(led_cb){
led_cb(0, palmMisc.greenLed);
#if defined(EMU_SUPPORT_PALM_OS5)
@@ -426,6 +511,200 @@ void retro_run(void){
unrenderMouseCursor(touchCursorX, touchCursorY);
}
/**
* Tries to load a non-SRAM based content file, it will be installed into the
* system. This will handle the case where the content is a ZIP file in which
* if it is then it will load all of the contained PRCs and PDBs accordingly.
*
* @param error The error possibly.
* @param contentData The data being loaded.
* @param contentSize The size of the loaded content.
* @since 2022/10/02
*/
bool loadContentFileNonSRAM(uint32_t *error, uint8_t *contentData,
uint32_t contentSize) {
mz_zip_archive zipArchive;
mz_zip_archive_file_stat stat;
uint32_t appId = 0, maybeAppId, newError;
uint32_t numFiles, index, lookStage;
uint32_t fileNameLen;
void* entryBuf;
// Detect if this is a ZIP file, if it is
memset(&zipArchive, 0, sizeof(zipArchive));
if (mz_zip_reader_init_mem(&zipArchive,
contentData, contentSize,
MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY |
MZ_ZIP_FLAG_ASCII_FILENAME))
{
// Notice
log_cb(RETRO_LOG_INFO, "Loading from ZIP...\n");
// Process every file in the ZIP looking for PDBs, then PRCs
numFiles = mz_zip_reader_get_num_files(&zipArchive);
for (lookStage = 0; lookStage < 2; lookStage++)
for (index = 0; index < numFiles; index++)
{
// If we are failing then just fail here
if ((*error) != EMU_ERROR_NONE)
{
lookStage = 9999;
index = numFiles;
break;
}
// Get file information, only care about valid ones
memset(&stat, 0, sizeof(stat));
if (!mz_zip_reader_file_stat(&zipArchive,
index, &stat))
continue;
// Ignore directories and anything MiniZ does not support
if (!stat.m_is_supported || stat.m_is_directory)
continue;
// How long is the file name?
fileNameLen = strlen(stat.m_filename);
// Too short?
if (fileNameLen < 4)
continue;
// Not a PDB or PRC?
if ((0 != strcasecmp((lookStage == 0 ? ".pdb" : ".prc"),
&stat.m_filename[fileNameLen - 4])) &&
(0 != strcasecmp((lookStage == 0 ? ".PDB" : ".PRC"),
&stat.m_filename[fileNameLen - 4])))
continue;
// Allocate buffer for the data
entryBuf = malloc(stat.m_uncomp_size);
if (entryBuf == NULL)
return false;
// Load in data
memset(entryBuf, 0, stat.m_uncomp_size);
if (mz_zip_reader_extract_to_mem_no_alloc(&zipArchive,
index, entryBuf, stat.m_uncomp_size,
0, NULL, 0))
{
// Notice
log_cb(RETRO_LOG_INFO,
"Installing from ZIP: %s\n", stat.m_filename);
// Install the file
newError = launcherInstallFile(entryBuf,
stat.m_uncomp_size);
// Fill in error state
if (newError != EMU_ERROR_NONE)
(*error) = newError;
// If we are loading a PRC, get the appId of it so that we
// can launch it accordingly
if (lookStage == 1)
{
maybeAppId = launcherGetAppId(entryBuf,
stat.m_uncomp_size);
if (maybeAppId != 0)
appId = maybeAppId;
}
}
// Clear allocated data
free(entryBuf);
}
// Stop reading the ZIP
mz_zip_end(&zipArchive);
}
// Otherwise, not a ZIP at all... load it directly
else
{
// Notice
log_cb(RETRO_LOG_INFO, "Loading single PRC/PDB...\n");
// Install the file
(*error) = launcherInstallFile(contentData, contentSize);
// Get the app ID to launch
appId = launcherGetAppId(contentData, contentSize);
}
// Notice
log_cb(RETRO_LOG_INFO, "Completed load!\n");
// Try to the launch the app, if it even is one...
if ((*error) == EMU_ERROR_NONE && appId != 0)
(*error) = launcherExecute(appId);
}
bool loadContentFile(bool hasSram, uint32_t* error) {
struct RFILE *contentFile;
uint8_t *contentData;
uint32_t contentSize;
contentFile = filestream_open(contentPath, RETRO_VFS_FILE_ACCESS_READ,
RETRO_VFS_FILE_ACCESS_HINT_NONE);
if (contentFile) {
contentSize = filestream_get_size(contentFile);
contentData = malloc(contentSize);
if (contentData)
filestream_read(contentFile, contentData, contentSize);
else
return false;
filestream_close(contentFile);
} else {
//no content at path, fail time
return false;
}
launcherBootInstantly(hasSram);
if (runningImgFile) {
char infoPath[PATH_MAX_LENGTH];
struct RFILE *infoFile;
uint8_t *infoData = NULL;
uint32_t infoSize = 0;
sd_card_info_t sdInfo;
memset(&sdInfo, 0x00, sizeof(sdInfo));
strlcpy(infoPath, contentPath, PATH_MAX_LENGTH);
infoPath[strlen(infoPath) - 4] = '\0';//chop off ".img"
strlcat(infoPath, ".info", PATH_MAX_LENGTH);
infoFile = filestream_open(infoPath, RETRO_VFS_FILE_ACCESS_READ,
RETRO_VFS_FILE_ACCESS_HINT_NONE);
if (infoFile) {
infoSize = filestream_get_size(infoFile);
infoData = malloc(infoSize);
if (infoData)
filestream_read(infoFile, infoData, infoSize);
filestream_close(infoFile);
}
if (infoData)
launcherGetSdCardInfoFromInfoFile(infoData, infoSize, &sdInfo);
(*error) = emulatorInsertSdCard(contentData, contentSize,
infoData ? &sdInfo : NULL);
if (infoData)
free(infoData);
} else {
if (!hasSram)
loadContentFileNonSRAM(error, contentData, contentSize);
}
free(contentData);
if ((*error) != EMU_ERROR_NONE)
return false;
return true;
}
bool retro_load_game(const struct retro_game_info *info){
uint8_t* romData;
uint32_t romSize;
@@ -516,12 +795,17 @@ bool retro_load_game(const struct retro_game_info *info){
strlcat(saveRamPath, osVersion, PATH_MAX_LENGTH);
strlcat(saveRamPath, ".ram", PATH_MAX_LENGTH);
saveRamFile = filestream_open(saveRamPath, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
if(saveRamFile){
hasSram = true;
// Load SRAM from the RAM file (save state), if it happens to fail or
// none was loaded then memory has just been filled with garbage
if(saveRamFile) {
hasSram = true;
if(filestream_get_size(saveRamFile) == emulatorGetRamSize()){
filestream_read(saveRamFile, palmRam, emulatorGetRamSize());
swap16BufferIfLittle(palmRam, emulatorGetRamSize() / sizeof(uint16_t));
}
filestream_close(saveRamFile);
}
@@ -551,68 +835,10 @@ bool retro_load_game(const struct retro_game_info *info){
emulatorSetRtc(timeInfo->tm_yday, timeInfo->tm_hour, timeInfo->tm_min, timeInfo->tm_sec);
//see if RetroArch wants something launched
if(info && !string_is_empty(info->path)){
struct RFILE* contentFile;
uint8_t* contentData;
uint32_t contentSize;
contentFile = filestream_open(contentPath, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
if(contentFile){
contentSize = filestream_get_size(contentFile);
contentData = malloc(contentSize);
if(contentData)
filestream_read(contentFile, contentData, contentSize);
else
return false;
filestream_close(contentFile);
}
else{
//no content at path, fail time
return false;
}
launcherBootInstantly(hasSram);
if(runningImgFile){
char infoPath[PATH_MAX_LENGTH];
struct RFILE* infoFile;
uint8_t* infoData = NULL;
uint32_t infoSize;
sd_card_info_t sdInfo;
memset(&sdInfo, 0x00, sizeof(sdInfo));
strlcpy(infoPath, contentPath, PATH_MAX_LENGTH);
infoPath[strlen(infoPath) - 4] = '\0';//chop off ".img"
strlcat(infoPath, ".info", PATH_MAX_LENGTH);
infoFile = filestream_open(infoPath, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
if(infoFile){
infoSize = filestream_get_size(infoFile);
infoData = malloc(infoSize);
if(infoData)
filestream_read(infoFile, infoData, infoSize);
filestream_close(infoFile);
}
if(infoData)
launcherGetSdCardInfoFromInfoFile(infoData, infoSize, &sdInfo);
error = emulatorInsertSdCard(contentData, contentSize, infoData ? &sdInfo : NULL);
if(infoData)
free(infoData);
}
else{
if(!hasSram)
error = launcherInstallFile(contentData, contentSize);
if(error == EMU_ERROR_NONE)
error = launcherExecute(launcherGetAppId(contentData, contentSize));
}
free(contentData);
if(error != EMU_ERROR_NONE)
return false;
if(info && !string_is_empty(info->path)) {
if (!loadContentFile(hasSram, &error)) {
return false;
}
}
//set the time callback

7733
libretroBuildSystem/miniz.c Normal file

File diff suppressed because it is too large Load Diff

1350
libretroBuildSystem/miniz.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
Copyright 2013-2014 RAD Game Tools and Valve Software
Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC
All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -1,21 +1,28 @@
# Software Information
display_name = "Palm OS (Mu)"
authors = "guicrith / meepingsnesroms"
supported_extensions = "prc|pqa|img"
authors = "guicrith / meepingsnesroms; Stephanie Gawroriski (Xer Shadow Tail)"
supported_extensions = "prc|pqa|img|pdb|zip"
corename = "Mu"
manufacturer = "Palm"
categories = "Emulator"
systemname = "Palm OS"
license = "Non-commercial"
license = "CC BY-NC 3.0 US (Non-commercial)"
permissions = ""
display_version = "v1.1.0"
display_version = "v1.3.4"
categories = "Emulator"
# Hardware Information
manufacturer = "Palm"
systemname = "Palm OS"
# Libretro Features
supports_no_game = "true"
# BIOS/Firmware
firmware_count = 5
firmware0_desc = "palmos40-en-m500.rom (Palm OS 4.0)"
firmware0_path = "palmos40-en-m500.rom"
firmware0_opt = "true"
firmware1_desc = "palmos41-en-m515.rom (Palm OS 4.1)"
firmware1_path = "palmos41-en-m515.rom"
firmware1_opt = "true"
firmware1_opt = "false"
firmware2_desc = "palmos52-en-t3.rom (Palm OS 5.2.1)"
firmware2_path = "palmos52-en-t3.rom"
firmware2_opt = "true"
@@ -25,3 +32,5 @@ firmware3_opt = "true"
firmware4_desc = "bootloader-dbvz.rom (MC68VZ328 UART Bootloader)"
firmware4_path = "bootloader-dbvz.rom"
firmware4_opt = "true"
description = "An emulator for the Palm m515 OS ported to libretro. It is intended to avoid hacks like those used by the POSE emulator, where API calls are intercepted and replaced with those that don't use the actual hardware."

View File

@@ -0,0 +1,14 @@
# Only include the sub-project if Qt was actually found
find_package(Qt5 COMPONENTS Core Gui Widgets Multimedia Svg)
if(Qt5_FOUND EQUAL 0)
message("Qt5 or one of their components were not found, check readme.md!")
endif()
# Was this actually found now?
if(NOT Qt5_FOUND EQUAL 0)
# Information!
message("Found Qt5, so including the interface as an option.")
# Where the project really exists
add_subdirectory(Mu)
endif()

View File

@@ -0,0 +1,81 @@
# We use these to automatically generate UI headers and otherwise in Qt
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
# We need all the Qt5 libraries
find_package(Qt5 OPTIONAL_COMPONENTS Core Gui Widgets Multimedia Svg)
# Application Icon for Mu
if(WIN32)
set(MU_APP_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/windows/app.rc")
else()
set(MU_APP_RESOURCES)
endif()
# Setup executable for running
add_executable(QtMu
debugviewer.cpp
debugviewer.h
debugviewer.ui
emuwrapper.cpp
emuwrapper.h
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.qrc
mainwindow.ui
settingsmanager.cpp
settingsmanager.h
settingsmanager.ui
statemanager.cpp
statemanager.ui
touchscreen.h
touchscreen.cpp
${MU_APP_RESOURCES})
# The Qt build requires modern-ish C++11
set_target_properties(QtMu PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS YES)
# Include the required includes
target_include_directories(QtMu PUBLIC
"${PROJECT_SOURCE_DIR}/include"
# When we auto-generate the UI code, we refer to includes that are in
# the Qt source directory
"${PROJECT_SOURCE_DIR}/qtBuildSystem/Mu")
# Used to indicate some things for compatibility
add_definitions(-DBUILT_FROM_CMAKE)
# Annoying Visual Studio Warnings
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
# Needed for GCC
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
# Need to link into all these Qt components
target_link_libraries(QtMu
MuCore Threads::Threads
Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Multimedia Qt5::Svg)
# Deployment for Windows
if(WIN32)
# Retrieve the absolute path to qmake and then use that path to find
# the windeployqt executable
get_target_property(QMAKE_EXE Qt5::qmake IMPORTED_LOCATION)
get_filename_component(QT_BIN_DIR "${QMAKE_EXE}" DIRECTORY)
find_program(WINDEPLOYQT_ENV_SETUP qtenv2.bat HINTS "${QT_BIN_DIR}")
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${QT_BIN_DIR}")
# Run windeployqt immediately after build
add_custom_command(TARGET QtMu
POST_BUILD
COMMAND "${WINDEPLOYQT_ENV_SETUP}" && "${WINDEPLOYQT_EXECUTABLE}" \"$<TARGET_FILE:QtMu>\"
)
endif()

View File

@@ -167,54 +167,54 @@ support_palm_os5{
../../src/armv5te/mem.c \
../../src/armv5te/mmu.c \
../../src/tps65010.c \
../../src/tsc2101.c \
../../src/pxa260/tsc2101.c \
../../src/w86l488.c
HEADERS += \
../../src/pxa260/pxa260_CPU.h \
../../src/pxa260/pxa260_DMA.h \
../../src/pxa260/pxa260_DSP.h \
../../src/pxa260/pxa260_GPIO.h \
../../src/pxa260/pxa260_IC.h \
../../src/pxa260/pxa260_LCD.h \
../../src/pxa260/pxa260_PwrClk.h \
../../src/pxa260/pxa260_RTC.h \
../../src/pxa260/pxa260_TIMR.h \
../../src/pxa260/pxa260_UART.h \
../../src/pxa260/pxa260I2c.h \
../../src/pxa260/pxa260Memctrl.h \
../../src/pxa260/pxa260Timing.h \
../../src/pxa260/pxa260Ssp.h \
../../src/pxa260/pxa260Udc.h \
../../src/pxa260/pxa260_types.h \
../../src/pxa260/pxa260_math64.h \
../../src/pxa260/pxa260Accessors.c.h \
../../src/pxa260/pxa260.h \
../../src/armv5te/os/os.h \
../../src/armv5te/uArm/CPU_2.h \
../../src/armv5te/uArm/icache.h \
../../src/armv5te/uArm/uArmGlue.h \
../../src/armv5te/asmcode.h \
../../src/armv5te/bitfield.h \
../../src/armv5te/cpu.h \
../../src/armv5te/disasm.h \
../../src/armv5te/emu.h \
../../src/armv5te/mem.h \
../../src/armv5te/translate.h \
../../src/armv5te/cpudefs.h \
../../src/armv5te/debug.h \
../../src/armv5te/mmu.h \
../../src/armv5te/armsnippets.h \
../../src/armv5te/literalpool.h \
../../src/tungstenT3Bus.h \
../../src/tps65010.h \
../../src/tsc2101.h \
../../src/w86l488.h
../../include/pxa260/pxa260_CPU.h \
../../include/pxa260/pxa260_DMA.h \
../../include/pxa260/pxa260_DSP.h \
../../include/pxa260/pxa260_GPIO.h \
../../include/pxa260/pxa260_IC.h \
../../include/pxa260/pxa260_LCD.h \
../../include/pxa260/pxa260_PwrClk.h \
../../include/pxa260/pxa260_RTC.h \
../../include/pxa260/pxa260_TIMR.h \
../../include/pxa260/pxa260_UART.h \
../../include/pxa260/pxa260I2c.h \
../../include/pxa260/pxa260Memctrl.h \
../../include/pxa260/pxa260Timing.h \
../../include/pxa260/pxa260Ssp.h \
../../include/pxa260/pxa260Udc.h \
../../include/pxa260/pxa260_types.h \
../../include/pxa260/pxa260_math64.h \
../../include/pxa260/pxa260Accessors.c.h \
../../include/pxa260/pxa260.h \
../../include/armv5te/os/os.h \
../../include/armv5te/uArm/CPU_2.h \
../../include/armv5te/uArm/icache.h \
../../include/armv5te/uArm/uArmGlue.h \
../../include/armv5te/asmcode.h \
../../include/armv5te/bitfield.h \
../../include/armv5te/cpu.h \
../../include/armv5te/disasm.h \
../../include/armv5te/emu.h \
../../include/armv5te/mem.h \
../../include/armv5te/translate.h \
../../include/armv5te/cpudefs.h \
../../include/armv5te/debug.h \
../../include/armv5te/mmu.h \
../../include/armv5te/armsnippets.h \
../../include/armv5te/literalpool.h \
../../include/tungstenT3Bus.h \
../../include/tps65010.h \
../../include/tsc2101.h \
../../include/w86l488.h
}
CONFIG += c++11
INCLUDEPATH += $$PWD/qt-common/include
INCLUDEPATH += $$PWD/../../include
SOURCES += \
../../src/ads7846.c \
@@ -243,32 +243,32 @@ SOURCES += \
settingsmanager.cpp
HEADERS += \
../../src/ads7846.h \
../../src/audio/blip_buf.h \
../../src/dbvz.h \
../../src/dbvzRegisterAccessors.c.h \
../../src/dbvzRegisterNames.c.h \
../../src/dbvzTiming.c.h \
../../src/emulator.h \
../../src/fileLauncher/launcher.h \
../../src/flx68000.h \
../../src/m5XXBus.h \
../../src/m68k/m68k.h \
../../src/m68k/m68kconf.h \
../../src/m68k/m68kcpu.h \
../../src/m68k/m68kexternal.h \
../../src/m68k/m68kops.h \
../../src/pdiUsbD12.h \
../../src/pdiUsbD12CommandNames.c.h \
../../src/portability.h \
../../src/sdCard.h \
../../src/sdCardAccessors.c.h \
../../src/sdCardCommandNames.c.h \
../../src/sdCardCrcTables.c.h \
../../src/sed1376.h \
../../src/sed1376Accessors.c.h \
../../src/sed1376RegisterNames.c.h \
../../src/silkscreen.h \
../../include/ads7846.h \
../../include/audio/blip_buf.h \
../../include/dbvz.h \
../../include/dbvzRegisterAccessors.c.h \
../../include/dbvzRegisterNames.c.h \
../../include/dbvzTiming.c.h \
../../include/emulator.h \
../../include/fileLauncher/launcher.h \
../../include/flx68000.h \
../../include/m5XXBus.h \
../../include/m68k/m68k.h \
../../include/m68k/m68kconf.h \
../../include/m68k/m68kcpu.h \
../../include/m68k/m68kexternal.h \
../../include/m68k/m68kops.h \
../../include/pdiUsbD12.h \
../../include/pdiUsbD12CommandNames.c.h \
../../include/portability.h \
../../include/sdCard.h \
../../include/sdCardAccessors.c.h \
../../include/sdCardCommandNames.c.h \
../../include/sdCardCrcTables.c.h \
../../include/sed1376.h \
../../include/sed1376Accessors.c.h \
../../include/sed1376RegisterNames.c.h \
../../include/silkscreen.h \
debugviewer.h \
emuwrapper.h \
mainwindow.h \

View File

@@ -8,6 +8,7 @@
#include <QDate>
#include <QTime>
#include <thread>
#include <new>
#include <chrono>
#include <thread>
@@ -17,14 +18,27 @@
#include <time.h>
#include "emuwrapper.h"
#include "../../src/emulator.h"
#include "../../src/fileLauncher/launcher.h"
extern "C"{
#include "../../src/flx68000.h"
#include "../../src/m68k/m68k.h"
#include "../../src/pxa260/pxa260.h"
#include "../../src/armv5te/disasm.h"
#if defined(BUILT_FROM_CMAKE)
#include "emulator.h"
#include "fileLauncher/launcher.h"
#else
#include "../../include/emulator.h"
#include "../../include/fileLauncher/launcher.h"
#endif
extern "C" {
#if defined(BUILT_FROM_CMAKE)
#include "flx68000.h"
#include "m68k/m68k.h"
#include "pxa260/pxa260.h"
#include "armv5te/disasm.h"
#else
#include "../../include/flx68000.h"
#include "../../include/m68k/m68k.h"
#include "../../include/pxa260/pxa260.h"
#include "../../include/armv5te/disasm.h"
#endif
}

View File

@@ -9,7 +9,11 @@
#include <atomic>
#include <stdint.h>
#include "../../src/emulator.h"
#if defined(BUILT_FROM_CMAKE)
#include "emulator.h"
#else
#include "../../include/emulator.h"
#endif
class EmuWrapper{
private:

Some files were not shown because too many files have changed in this diff Show More