25 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
25 changed files with 540 additions and 214 deletions

3
.gitignore vendored
View File

@@ -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/

View File

@@ -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
View File

@@ -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>

View File

@@ -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)

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

@@ -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()

View File

@@ -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)

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(__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

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

@@ -8,6 +8,10 @@
#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>
@@ -213,7 +217,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";
@@ -297,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){
@@ -320,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();
@@ -415,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)
@@ -490,8 +571,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 +589,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,
@@ -713,10 +796,11 @@ bool retro_load_game(const struct retro_game_info *info){
strlcat(saveRamPath, ".ram", PATH_MAX_LENGTH);
saveRamFile = filestream_open(saveRamPath, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
// There is now always SRAM because it gets initialized to garbage
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));

View File

@@ -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.4"
categories = "Emulator"
# Hardware Information

View File

@@ -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?

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

@@ -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

View File

@@ -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()

View File

@@ -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)")

View File

@@ -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 */

View File

@@ -3,7 +3,7 @@
#include "armv5te/debug.h"
#include "armv5te/disasm.h"
#include "armv5te/emu.h"
#include "armv5te/mmu.h"
char disasmReturnBuf[80];

View File

@@ -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. */

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 \

View File

@@ -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