mirror of
https://github.com/libretro/Mu.git
synced 2026-02-13 05:35:02 +00:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b6c079ca8 | ||
|
|
841cff206b | ||
|
|
effb09edf0 | ||
|
|
e5829b6be0 | ||
|
|
c8311b11e6 | ||
|
|
a053b1f272 | ||
|
|
7ada4746df | ||
|
|
d7dd7e2a33 | ||
|
|
50d6108b3e | ||
|
|
85390f73b8 | ||
|
|
448cc6505e | ||
|
|
247d1d10a4 | ||
|
|
013f6e321a | ||
|
|
84e6732fe9 | ||
|
|
c3562082b1 | ||
|
|
784ef114a4 | ||
|
|
547d3ab65c | ||
|
|
5bd0d8760f | ||
|
|
91af9cc623 | ||
|
|
f7fb30a074 | ||
|
|
0fd1b56b6c |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -37,4 +37,5 @@ cmake-build-release-visual-studio-1/
|
||||
userdata-palmos41-en-m515.ram
|
||||
userdata-en-m515.ram
|
||||
palmos41-en-m515.rom
|
||||
default-palmos41-en-m515.ram
|
||||
default-palmos41-en-m515.ram
|
||||
/build/
|
||||
|
||||
199
.gitlab-ci.yml
199
.gitlab-ci.yml
@@ -12,93 +12,90 @@
|
||||
|
||||
# Inclusion templates, required for the build to work
|
||||
include:
|
||||
################################## DESKTOPS ################################
|
||||
# Windows 64-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/windows-x64-mingw.yml'
|
||||
|
||||
# Windows 32-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/windows-i686-mingw.yml'
|
||||
|
||||
# Windows msvc10 64-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/windows-x64-msvc10-msys2.yml'
|
||||
|
||||
# Windows msvc10 32-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/windows-i686-msvc10-msys2.yml'
|
||||
|
||||
# Windows msvc05 32-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/windows-i686-msvc05-msys2.yml'
|
||||
|
||||
# Linux 64-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/linux-x64.yml'
|
||||
|
||||
# MacOS 64-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/osx-x64.yml'
|
||||
|
||||
# MacOS ARM 64-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/osx-arm64.yml'
|
||||
|
||||
################################## CELLULAR ################################
|
||||
# Android
|
||||
file: '/android-cmake.yml'
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/android-jni.yml'
|
||||
|
||||
# iOS 9
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/ios9.yml'
|
||||
|
||||
# iOS
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/ios-arm64.yml'
|
||||
|
||||
# tvOS
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/tvos-arm64.yml'
|
||||
|
||||
################################## CONSOLES ################################
|
||||
# Dingux (GCW Zero)
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/dingux-mips32.yml'
|
||||
|
||||
# Nintendo 3DS
|
||||
file: '/ctr-static-cmake.yml'
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/ctr-static.yml'
|
||||
|
||||
# Nintendo GameCube
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/ngc-static.yml'
|
||||
|
||||
# Nintendo Wii
|
||||
file: '/dingux-cmake.yml'
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/wii-static.yml'
|
||||
|
||||
# Nintendo WiiU
|
||||
file: '/dingux-mips32.yml'
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/wiiu-static.yml'
|
||||
|
||||
# Nintendo Switch
|
||||
file: '/djgpp-static-cmake.yml'
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/libnx-static.yml'
|
||||
|
||||
# PLayStation 2
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/ps2-static.yml'
|
||||
|
||||
# PlayStation Vita
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/vita-static.yml'
|
||||
|
||||
#################################### MISC ##################################
|
||||
# Emscripten
|
||||
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:
|
||||
@@ -140,7 +137,13 @@ 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:
|
||||
@@ -159,6 +162,18 @@ libretro-build-osx-arm64:
|
||||
- .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:
|
||||
@@ -245,6 +260,12 @@ libretro-build-ps2:
|
||||
- .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:
|
||||
@@ -257,3 +278,29 @@ 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
|
||||
|
||||
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
@@ -1,5 +1,8 @@
|
||||
<?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>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
cmake_minimum_required (VERSION 3.13)
|
||||
project(Mu
|
||||
VERSION 1.3.2
|
||||
VERSION 1.3.3
|
||||
DESCRIPTION "Classic Palm OS Emulator."
|
||||
HOMEPAGE_URL https://github.com/libretro/Mu
|
||||
LANGUAGES C CXX)
|
||||
@@ -17,6 +17,92 @@ 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)
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
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
|
||||
@@ -15,14 +26,33 @@ add_library(mu_libretro SHARED
|
||||
set_target_properties(mu_libretro PROPERTIES PREFIX "")
|
||||
|
||||
# Bring all the sub-modules as needed
|
||||
target_link_libraries(mu_libretro
|
||||
MuCore)
|
||||
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)
|
||||
@@ -47,4 +77,9 @@ if(DEFINED MU_LIBRETRO_DIR)
|
||||
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()
|
||||
|
||||
@@ -126,9 +126,10 @@ 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_LT_MAVERICKS = $(shell (( $(OSXVER) <= 9)) && echo "YES")
|
||||
OSX_GT_MOJAVE = $(shell (( $(OSXVER) >= 14)) && echo "YES")
|
||||
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
|
||||
@@ -146,7 +147,7 @@ endif
|
||||
CFLAGS += $(TARGET_RULE)
|
||||
CPPFLAGS += $(TARGET_RULE)
|
||||
CXXFLAGS += $(TARGET_RULE)
|
||||
LDFLAGS += $(TARGET_RULE)
|
||||
LDFLAGS += $(TARGET_RULE) -lc++
|
||||
endif
|
||||
|
||||
# iOS
|
||||
@@ -188,6 +189,8 @@ ifeq ($(IOSSDK),)
|
||||
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)
|
||||
|
||||
@@ -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(__PS3__) || 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
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -213,7 +213,7 @@ void retro_get_system_info(struct retro_system_info *info){
|
||||
#ifndef GIT_VERSION
|
||||
#define GIT_VERSION ""
|
||||
#endif
|
||||
info->library_version = "v1.3.2" GIT_VERSION;
|
||||
info->library_version = "v1.3.3" GIT_VERSION;
|
||||
info->need_fullpath = true;
|
||||
info->valid_extensions = "prc|pqa|img|pdb|zip";
|
||||
|
||||
@@ -490,8 +490,10 @@ bool loadContentFileNonSRAM(uint32_t *error, uint8_t *contentData,
|
||||
continue;
|
||||
|
||||
// Not a PDB or PRC?
|
||||
if (0 != strcasecmp((lookStage == 0 ? ".pdb" : ".prc"),
|
||||
&stat.m_filename[fileNameLen - 4]))
|
||||
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
|
||||
@@ -506,8 +508,8 @@ bool loadContentFileNonSRAM(uint32_t *error, uint8_t *contentData,
|
||||
0, NULL, 0))
|
||||
{
|
||||
// Notice
|
||||
log_cb(RETRO_LOG_INFO, "Installing from ZIP: %s\n",
|
||||
stat.m_filename);
|
||||
log_cb(RETRO_LOG_INFO,
|
||||
"Installing from ZIP: %s\n", stat.m_filename);
|
||||
|
||||
// Install the file
|
||||
newError = launcherInstallFile(entryBuf,
|
||||
|
||||
@@ -5,7 +5,7 @@ supported_extensions = "prc|pqa|img|pdb|zip"
|
||||
corename = "Mu"
|
||||
license = "CC BY-NC 3.0 US (Non-commercial)"
|
||||
permissions = ""
|
||||
display_version = "v1.3.2"
|
||||
display_version = "v1.3.3"
|
||||
categories = "Emulator"
|
||||
|
||||
# Hardware Information
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Only include the sub-project if Qt was actually found
|
||||
find_package(Qt5 OPTIONAL_COMPONENTS Core Widgets)
|
||||
find_package(Qt5 COMPONENTS Core Gui Widgets Multimedia Svg)
|
||||
if(Qt5_FOUND EQUAL 0)
|
||||
message("Qt5 was not found by CMake, check readme.md!")
|
||||
message("Qt5 or one of their components were not found, check readme.md!")
|
||||
endif()
|
||||
|
||||
# Was this actually found now?
|
||||
|
||||
@@ -167,7 +167,7 @@ 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 += \
|
||||
|
||||
69
readme.md
69
readme.md
@@ -1,9 +1,9 @@
|
||||
# Mu, a Palm OS Emulator
|
||||
|
||||
The continuation of the Mu along with the RetroArch Core is dedicated to
|
||||
> The continuation of the Mu along with the RetroArch Core is dedicated to
|
||||
Emily (1998-2020), your friendship was very important to me and I hope
|
||||
that you are resting well.
|
||||
-- Your friend, Stephanie
|
||||
> -- _Your friend, Stephanie_
|
||||
|
||||
# The goal of this project
|
||||
|
||||
@@ -38,6 +38,12 @@ https://findicons.com/icon/164302/cursor (Libretro Port Joystick Cursor)
|
||||
|
||||
## Building
|
||||
|
||||
For systems supported by RetroArch, you may download builds
|
||||
directly from and install them manually, if not using the
|
||||
_Online Updater_ functionality:
|
||||
|
||||
* <https://git.libretro.com/libretro/Mu/-/pipelines>
|
||||
|
||||
#### Using CMake
|
||||
|
||||
Using CMake, you just need to do:
|
||||
@@ -48,6 +54,21 @@ Using CMake, you just need to do:
|
||||
|
||||
#### For RetroArch
|
||||
|
||||
There are two options available for RetroArch, you can use CMake
|
||||
to build the core, or you can use the older Makefile based setup.
|
||||
The Makefile based setup is for the older RetroArch build system.
|
||||
|
||||
##### CMake
|
||||
|
||||
Same as above for _CMake_, the RetroArch specific target is
|
||||
in this case `mu_libretro`. This will output a file accordingly.
|
||||
Note that if you are using a system which uses static binaries,
|
||||
such as the PS2 or 3DS, there are other steps you must complete,
|
||||
although it is recommended to just download from
|
||||
here <https://git.libretro.com/libretro/Mu/-/pipelines>.
|
||||
|
||||
##### Makefile
|
||||
|
||||
Make sure you have done all the steps here https://docs.libretro.com/ under "For Developers/Compilation" so you build environment works.
|
||||
|
||||
cd ./libretroBuildSystem
|
||||
@@ -58,12 +79,20 @@ load that ZIP file. PDBs will be installed first followed by PRC files.
|
||||
|
||||
#### For Qt
|
||||
|
||||
First install _Qt 5.14.2_, you may optional install as well _Qt Creator_.
|
||||
First install _Qt 5.14.2_, you may optionally install as well _Qt Creator_.
|
||||
|
||||
* Windows: <https://download.qt.io/archive/qt/5.14/5.14.2/qt-opensource-windows-x86-5.14.2.exe>
|
||||
* Mac: <https://download.qt.io/archive/qt/5.14/5.14.2/qt-opensource-mac-x64-5.14.2.dmg>
|
||||
* Linux: <https://download.qt.io/archive/qt/5.14/5.14.2/qt-opensource-linux-x64-5.14.2.run>
|
||||
|
||||
You need the following components of Qt5:
|
||||
|
||||
* Core
|
||||
* Gui
|
||||
* Widgets
|
||||
* Multimedia
|
||||
* Svg
|
||||
|
||||
When running _CMake_ you will need to pass `-DCMAKE_PREFIX_PATH` to the
|
||||
location of `Qt5Config.cmake`.
|
||||
|
||||
@@ -94,26 +123,42 @@ Install prc-tools from the below link(self compiled or prepackaged VM)
|
||||
./make.sh
|
||||
|
||||
## Running
|
||||
|
||||
#### Files
|
||||
palmos40-en-m500.rom: f50e4d5e4d98dc831f2c34a9107651eb (MD5)
|
||||
palmos41-en-m515.rom: 83cb1d1c76e568b916dc2e7c0bf669f6 (MD5)
|
||||
palmos52-en-t3.rom: de46ec84d9aabf655eabdf9b00a3845d (MD5)
|
||||
bootloader-dbvz.rom: 9da101cd2317830649a31f8fa46debec (MD5)
|
||||
|
||||
* `palmos40-en-m500.rom`:
|
||||
* `f50e4d5e4d98dc831f2c34a9107651eb` (MD5)
|
||||
* `palmos41-en-m515.rom`:
|
||||
* `83cb1d1c76e568b916dc2e7c0bf669f6` (MD5)
|
||||
* `palmos52-en-t3.rom`:
|
||||
* `de46ec84d9aabf655eabdf9b00a3845d` (MD5)
|
||||
* `bootloader-dbvz.rom`:
|
||||
* `9da101cd2317830649a31f8fa46debec` (MD5)
|
||||
|
||||
#### For Qt
|
||||
|
||||
1. Run once to create the directory tree
|
||||
2. Copy "palmos41-en-m515.rom" and "palmos52-en-t3.rom" to "~/Mu"
|
||||
3. (Optional)Copy "bootloader-en-m515.rom" to "~/Mu"
|
||||
4. Run emu and press start button
|
||||
|
||||
#### For RetroArch
|
||||
1. Download "Palm OS(Mu)" from "Online Updater->Core Updater"
|
||||
2. Go back, select "Load Core", select "Palm OS(Mu)"
|
||||
3. Copy "palmos41-en-m515.rom" and "palmos52-en-t3.rom" to the RetroArch system directory
|
||||
4. (Optional)Copy "bootloader-en-m515.rom" to the RetroArch system directory
|
||||
5. Run a .prc or .img file
|
||||
|
||||
1. Download "Palm OS(Mu)" from "Online Updater->Core Updater"
|
||||
1. Alternatively, you can install a locally compiled or
|
||||
downloaded core from another source and place it within
|
||||
RetroArch's `cores/` directory. If you do this, remember
|
||||
to also install `mu_libretro.info` (which is located
|
||||
in `libretroBuildSystem`) to the directory as well so
|
||||
it knows which files are supported.
|
||||
2. Go back, select _Load Core_, select _Palm OS (Mu)_
|
||||
3. Copy `palmos41-en-m515.rom` to the RetroArch system directory
|
||||
1. For experimental Palm OS 5 support: `palmos52-en-t3.rom`.
|
||||
4. (Optional) Copy "bootloader-en-m515.rom" to the RetroArch system directory
|
||||
5. Load a `.prc`, `.img`, or `.zip` file.
|
||||
|
||||
## Tools
|
||||
|
||||
[Prc-tools, Palm OS SDKs, pilrc, pilot-link](https://github.com/meepingsnesroms/prc-tools-remix)
|
||||
|
||||
## License
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Base Mu library
|
||||
add_library(MuCore STATIC
|
||||
add_library(MuCore ${MU_CORE_BUILD_TYPE}
|
||||
ads7846.c
|
||||
dbvz.c
|
||||
emulator.c
|
||||
@@ -10,19 +10,27 @@ add_library(MuCore STATIC
|
||||
sed1376.c
|
||||
silkscreen.c
|
||||
tps65010.c
|
||||
tsc2101.c
|
||||
w86l488.c)
|
||||
|
||||
# Make this position independent so it can be linked into shared libraries
|
||||
set_property(TARGET MuCore
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MU_FPIC)
|
||||
set_property(TARGET MuCore
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
# Bring all the sub-modules as needed
|
||||
target_link_libraries(MuCore
|
||||
MuCorePxa260Experimental
|
||||
MuCoreFileLauncher
|
||||
MuCoreAudio
|
||||
MuCoreM68k)
|
||||
if(MU_ARM)
|
||||
target_link_libraries(MuCore
|
||||
MuCorePxa260Experimental
|
||||
MuCoreFileLauncher
|
||||
MuCoreAudio
|
||||
MuCoreM68k)
|
||||
else()
|
||||
target_link_libraries(MuCore
|
||||
MuCoreFileLauncher
|
||||
MuCoreAudio
|
||||
MuCoreM68k)
|
||||
endif()
|
||||
|
||||
# Includes for the project
|
||||
target_include_directories(MuCore PUBLIC
|
||||
@@ -37,5 +45,7 @@ add_subdirectory(fileLauncher)
|
||||
add_subdirectory(m68k)
|
||||
|
||||
# Experimental ARM Cores
|
||||
add_subdirectory(armv5te)
|
||||
add_subdirectory(pxa260)
|
||||
if(MU_ARM)
|
||||
add_subdirectory(armv5te)
|
||||
add_subdirectory(pxa260)
|
||||
endif()
|
||||
@@ -14,8 +14,10 @@ add_library(MuCoreArmV5TEExperimental STATIC
|
||||
thumb_interpreter.cpp)
|
||||
|
||||
# Make this position independent so it can be linked into shared libraries
|
||||
set_property(TARGET MuCoreArmV5TEExperimental
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MU_FPIC)
|
||||
set_property(TARGET MuCoreArmV5TEExperimental
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
# Currently do not enable the dynamic recompiler
|
||||
set(NO_TRANSLATION)
|
||||
@@ -34,7 +36,7 @@ else()
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES arm)
|
||||
target_sources(MuCoreArmV5TEExperimental PUBLIC
|
||||
translate_arm.cpp)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(i386)")
|
||||
elseif(MU_IS_X86_32 OR CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(i386)")
|
||||
target_sources(MuCoreArmV5TEExperimental PUBLIC
|
||||
translate_x86.c)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(x86-64)|(amd64)|(AMD64)")
|
||||
|
||||
@@ -219,7 +219,7 @@ void cpu_int_check()
|
||||
cpu_events &= ~EVENT_FIQ;
|
||||
}
|
||||
|
||||
static const constexpr uint8_t exc_flags[] = {
|
||||
static const uint8_t exc_flags[] = {
|
||||
MODE_SVC | 0xC0, /* Reset */
|
||||
MODE_UND | 0x80, /* Undefined instruction */
|
||||
MODE_SVC | 0x80, /* Software interrupt */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "armv5te/debug.h"
|
||||
#include "armv5te/disasm.h"
|
||||
#include "armv5te/emu.h"
|
||||
|
||||
#include "armv5te/mmu.h"
|
||||
|
||||
char disasmReturnBuf[80];
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ enum Reg : uint8_t {
|
||||
static int8_t regmap_v2p[16];
|
||||
|
||||
/* R0 is used as scratch register. R10 is a pointer to struct arm_state, R11 contains flags. */
|
||||
static constexpr const uint8_t regmap_first_phys = R1, regmap_last_phys = R9;
|
||||
static const uint8_t regmap_first_phys = R1, regmap_last_phys = R9;
|
||||
|
||||
/* Shortcut. If anything has been mapped, this is true.
|
||||
Set by regmap_next_preg, unset by regmap_flush. */
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
# m68k Module
|
||||
add_library(MuCoreAudio STATIC
|
||||
add_library(MuCoreAudio ${MU_CORE_BUILD_TYPE}
|
||||
blip_buf.c)
|
||||
|
||||
# Make this position independent so it can be linked into shared libraries
|
||||
set_property(TARGET MuCoreAudio
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MU_FPIC)
|
||||
set_property(TARGET MuCoreAudio
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
# Includes for the project
|
||||
target_include_directories(MuCoreAudio PUBLIC
|
||||
|
||||
@@ -3,8 +3,10 @@ add_library(MuCoreFileLauncher STATIC
|
||||
launcher.c)
|
||||
|
||||
# Make this position independent so it can be linked into shared libraries
|
||||
set_property(TARGET MuCoreFileLauncher
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MU_FPIC)
|
||||
set_property(TARGET MuCoreFileLauncher
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
# Includes for the project
|
||||
target_include_directories(MuCoreFileLauncher PUBLIC
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# m68k Module
|
||||
add_library(MuCoreM68k STATIC
|
||||
add_library(MuCoreM68k ${MU_CORE_BUILD_TYPE}
|
||||
m68kcpu.c
|
||||
m68kdasm.c
|
||||
m68kopac.c
|
||||
@@ -8,8 +8,10 @@ add_library(MuCoreM68k STATIC
|
||||
m68kops.c)
|
||||
|
||||
# Make this position independent so it can be linked into shared libraries
|
||||
set_property(TARGET MuCoreM68k
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MU_FPIC)
|
||||
set_property(TARGET MuCoreM68k
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
# Includes for the project
|
||||
target_include_directories(MuCoreM68k PUBLIC
|
||||
|
||||
@@ -48,7 +48,7 @@ ifeq ($(EMU_SUPPORT_PALM_OS5), 1)
|
||||
$(EMU_PATH)/armv5te/mem.c \
|
||||
$(EMU_PATH)/armv5te/mmu.c \
|
||||
$(EMU_PATH)/tps65010.c \
|
||||
$(EMU_PATH)/tsc2101.c \
|
||||
$(EMU_PATH)/pxa260/tsc2101.c \
|
||||
$(EMU_PATH)/w86l488.c
|
||||
EMU_SOURCES_CXX += $(EMU_PATH)/armv5te/arm_interpreter.cpp \
|
||||
$(EMU_PATH)/armv5te/thumb_interpreter.cpp \
|
||||
|
||||
@@ -14,11 +14,14 @@ add_library(MuCorePxa260Experimental STATIC
|
||||
pxa260Memctrl.c
|
||||
pxa260Ssp.c
|
||||
pxa260Timing.c
|
||||
pxa260Udc.c)
|
||||
pxa260Udc.c
|
||||
tsc2101.c)
|
||||
|
||||
# Make this position independent so it can be linked into shared libraries
|
||||
set_property(TARGET MuCorePxa260Experimental
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MU_FPIC)
|
||||
set_property(TARGET MuCorePxa260Experimental
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
# Bring all the sub-modules as needed
|
||||
target_link_libraries(MuCorePxa260Experimental
|
||||
|
||||
Reference in New Issue
Block a user