Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 62 additions & 63 deletions .github/workflows/ci-workflow.yml

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions .github/workflows/metric-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ jobs:
runs-on: ubuntu-24.04-arm
steps:
- name: Install dependencies
run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config
run: sudo apt-get update && sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config
- name: Install ARM toolchain
run: sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi
- name: Checkout PR base
uses: actions/checkout@v5
uses: actions/checkout@main
with:
submodules: recursive
ref: ${{ github.event.pull_request.base.sha }}
path: base
- name: Build base
run: make -j2 -C base MODEL=n0110 epsilon.elf
- name: Checkout PR head
uses: actions/checkout@v5
uses: actions/checkout@main
with:
submodules: recursive
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -34,7 +34,7 @@ jobs:
echo EOF
} >> "$GITHUB_ENV"
- name: Add comment
uses: actions/github-script@v8
uses: actions/github-script@v9
with:
script: |
await github.rest.issues.createComment({
Expand Down
18 changes: 10 additions & 8 deletions README.fr.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p align="center"><img src="https://github.com/Laporte12974/UpsilonDesign/blob/89a15953ae128aef8aa7d066dcaaf8d5c70f02a5/UPSILogo.png" /></p>
<p align="center"><img src="https://github.com/TildeEthDoUsPart/UpsilonDesign/blob/89a15953ae128aef8aa7d066dcaaf8d5c70f02a5/UPSILogo.png" /></p>

<p align="center">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="cc by-nc-sa 4.0" src="https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-525252.svg?labelColor=292929&logo=creative%20commons&style=for-the-badge" /></a>
<a href="https://github.com/UpsilonNumworks/Upsilon/issues"><img alt="Issues" src="https://img.shields.io/github/issues/Lauryy06/Upsilon.svg?labelColor=292929&logo=git&style=for-the-badge" /></a>
<a href="https://github.com/UpsilonNumworks/Upsilon/issues"><img alt="Issues" src="https://img.shields.io/github/issues/UpsilonNumworks/Upsilon.svg?labelColor=292929&logo=git&style=for-the-badge" /></a>
<br/>
<a href="https://discord.gg/sbGvhWETAd"><img alt="Discord" src="https://img.shields.io/discord/663420259851567114?color=blue&labelColor=292929&label=chat%20-%20discord&logo=discord&style=for-the-badge" /></a>
</p>
Expand Down Expand Up @@ -106,7 +106,9 @@ nix-env -p gcc libpng libjpeg xorg.libX11 pkg-config freetype xorg.libXext pytho
Il est recommandé d'utiliser [Homebrew](https://brew.sh/). Une fois installé, utilisez :

```bash
brew install numworks/tap/epsilon-sdk
brew install freetype imagemagick libpng libusb pkg-config python3
python3 -m venv .venv
.venv/bin/pip3 install setuptools lz4 pypng stringcase
```

Et toutes les dépendances seront installées.
Expand Down Expand Up @@ -398,8 +400,8 @@ D'abord, installez emsdk :
```bash
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 1.40.1
./emsdk activate 1.40.1
./emsdk install 4.0.22
./emsdk activate 4.0.22
source emsdk_env.sh
```

Expand All @@ -419,18 +421,18 @@ Le simulateur se trouve dans `output/release/simulator/web/simulator.zip`
<summary><b>Simulateur Android</b></summary>

Assurez-vous d'avoir JDK 25 d'installé.
Ensuite, téléchargez la toolchain Android version r21e comme suit :
Ensuite, téléchargez la toolchain Android version r27d comme suit :
```
export ANDROID_HOME=$PWD/android-sdk
wget -nv https://gitlab.com/fdroid/sdkmanager/-/raw/master/sdkmanager.py
python3 sdkmanager.py --licenses
python3 sdkmanager.py --install "ndk-bundle;r21e"
python3 sdkmanager.py --install "ndk-bundle;r27d"
```
Il ne vous reste plus qu'à lancer cette commande pour compiler Upsilon.
```
make -j$(nproc) PLATFORM=simulator TARGET=android
```
Le fichier compilé nommé `epsilon.apk` sera celui à installer sur le téléphone depuis votre gestionnaire de fichier. Fonctionne normalement à partir de Android 4.
Le fichier compilé nommé `epsilon.apk` sera celui à installer sur le téléphone depuis votre gestionnaire de fichier. Fonctionne normalement à partir de Android 5.

</details>

Expand Down
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p align="center"><img src="https://github.com/Laporte12974/UpsilonDesign/blob/89a15953ae128aef8aa7d066dcaaf8d5c70f02a5/UPSILogo.png" /></p>
<p align="center"><img src="https://github.com/TildeEthDoUsPart/UpsilonDesign/blob/89a15953ae128aef8aa7d066dcaaf8d5c70f02a5/UPSILogo.png" /></p>

<p align="center">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="cc by-nc-sa 4.0" src="https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-525252.svg?labelColor=292929&logo=creative%20commons&style=for-the-badge" /></a>
Expand Down Expand Up @@ -110,10 +110,12 @@ nix-shell -p gcc libpng libjpeg xorg.libX11 pkg-config freetype xorg.libXext pyt
It's recommended to use [Homebrew](https://brew.sh/). Once it's installed, just run:

```bash
brew install numworks/tap/epsilon-sdk
brew install freetype imagemagick libpng libusb pkg-config python3
python3 -m venv .venv
.venv/bin/pip3 install setuptools lz4 pypng stringcase
```

and it will install all dependencies.
and all dependencies will be installed.

<br>

Expand Down Expand Up @@ -405,8 +407,8 @@ First, install emsdk :
```bash
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 1.40.1
./emsdk activate 1.40.1
./emsdk install 4.0.22
./emsdk activate 4.0.22
source emsdk_env.sh
```

Expand Down Expand Up @@ -447,18 +449,18 @@ You can then put epsilon.3dsx on a SD card to run it from the HBC or use 3dslink
<summary><b>Android Simulator</b></summary>

Make sure you have JDK 25 installed.
Then, download the Android toolchain r21e as following :
Then, download the Android toolchain r27d as following :
```
export ANDROID_HOME=$PWD/android-sdk
wget -nv https://gitlab.com/fdroid/sdkmanager/-/raw/master/sdkmanager.py
python3 sdkmanager.py --licenses
python3 sdkmanager.py --install "ndk-bundle;r21e"
python3 sdkmanager.py --install "ndk-bundle;r27d"
```
All you have to do is run this command to compile Upsilon.
```
make -j$(nproc) PLATFORM=simulator TARGET=android
```
The compiled file named `epsilon.apk` will be the one to install on the phone from your file manager. Shoudl work on Android 4.1+.
The compiled file named `epsilon.apk` will be the one to install on the phone from your file manager. Should work on Android 5+.

</details>

Expand All @@ -470,7 +472,7 @@ First, install gint and fxsdk along with a cross compiler for the calculator. Th
Next:
```bash
git clone --recursive https://github.com/UpsilonNumworks/Upsilon.git
cd Omega
cd Upsilon
git checkout upsilon-dev
make PLATFORM=simulator TARGET=fxcg -j$(nproc)
```
Expand Down
8 changes: 1 addition & 7 deletions build/toolchain.android.mak
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,16 @@ endif

NDK_TOOLCHAIN_PATH = $(NDK_PATH)/toolchains/llvm/prebuilt/$(NDK_HOST_TAG)/bin

# No 64 bit device has ever shipped with an API level < 21. Consequently, there
# is no toolchain for those archs on those API levels. Let's enforce NDK_VERSION
# at 21 for these archs, and 16 for the others.
NDK_VERSION = 21

ifeq ($(ARCH),armeabi-v7a)
NDK_TARGET = armv7a-linux-androideabi
NDK_VERSION = 16
else ifeq ($(ARCH),arm64-v8a)
NDK_TARGET = aarch64-linux-android
NDK_VERSION = 21
else ifeq ($(ARCH),x86)
NDK_TARGET = i686-linux-android
NDK_VERSION = 16
else ifeq ($(ARCH),x86_64)
NDK_TARGET = x86_64-linux-android
NDK_VERSION = 21
endif

ifdef NDK_TARGET
Expand Down
4 changes: 4 additions & 0 deletions ion/src/shared/storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

namespace Ion {

#ifdef __APPLE__
uint32_t __attribute__((section("__DATA,.static_storage"))) staticStorageArea[sizeof(Storage)/sizeof(uint32_t)] = {0};
#else
uint32_t __attribute__((section(".static_storage"))) staticStorageArea[sizeof(Storage)/sizeof(uint32_t)] = {0};
#endif

Storage * Storage::sharedStorage() {
static Storage * storage = new (staticStorageArea) Storage();
Expand Down
Binary file modified ion/src/simulator/3ds/assets/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ion/src/simulator/3ds/assets/icon.icn
Binary file not shown.
Binary file modified ion/src/simulator/3ds/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ion/src/simulator/3ds/assets/logo24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 9 additions & 7 deletions ion/src/simulator/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.13.0'
classpath 'com.android.tools.build:gradle:9.2.0'
}
}

Expand All @@ -32,12 +32,11 @@ apply plugin: 'com.android.application'

android {
namespace = "io.github.upsilon.simulator"
compileSdkVersion 36
compileSdkVersion 37
defaultConfig {
applicationId "io.github.upsilon.simulator"
minSdkVersion 16
minSdkVersion 21
targetSdkVersion 33
def d=new Date()
versionCode Instant.now().getEpochSecond().toInteger()
versionName LocalDate.now().format("yyyyMMdd")+'-'+System.getenv('UPSILON_VERSION')
}
Expand All @@ -52,7 +51,7 @@ android {
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt')
//proguardFiles getDefaultProguardFile('proguard-android.txt')
if (projectVariable('SIGNING_STORE_FILE')) {
signingConfig = signingConfigs.environment
} else {
Expand All @@ -73,12 +72,15 @@ android {
abortOnError = false
checkReleaseBuilds = false
}
compileOptions { // currently Kotlin JVM doesn't support target 25
sourceCompatibility JavaVersion.VERSION_24
targetCompatibility JavaVersion.VERSION_24
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:1.6.0"
implementation(platform("org.jetbrains.kotlin:kotlin-bom:2.2.21"))
implementation "androidx.appcompat:appcompat:1.7.1"
}

java{toolchain{languageVersion=JavaLanguageVersion.of(25)}}
1 change: 0 additions & 1 deletion ion/src/simulator/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
android.enableJetifier=true
android.useAndroidX=true
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ SDL_PROC(void, glPixelStorei, (GLenum, GLint))
SDL_PROC(void, glReadPixels, (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*))
SDL_PROC(void, glScissor, (GLint, GLint, GLsizei, GLsizei))
SDL_PROC(void, glShaderBinary, (GLsizei, const GLuint *, GLenum, const void *, GLsizei))
#if __NACL__ || __ANDROID__
SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar **, const GLint *))
#else
#if __NACL__ || __ANDROID__ || __APPLE__
SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar* const*, const GLint *))
#else
SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar **, const GLint *))
#endif
SDL_PROC(void, glTexImage2D, (GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *))
SDL_PROC(void, glTexParameteri, (GLenum, GLenum, GLint))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ SDL_ANDROID_SensorUpdate(SDL_Sensor *sensor)
ASensorEvent event;
struct android_poll_source* source;

if (ALooper_pollAll(0, NULL, &events, (void**)&source) == LOOPER_ID_USER) {
if (ALooper_pollOnce(0, NULL, &events, (void**)&source) == LOOPER_ID_USER) {
SDL_zero(event);
while (ASensorEventQueue_getEvents(sensor->hwdata->eventqueue, &event, 1) > 0) {
SDL_PrivateSensorUpdate(sensor, event.data, SDL_arraysize(event.data));
Expand Down
2 changes: 1 addition & 1 deletion ion/src/simulator/fxcg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ion_src := $(filter-out $(sdl_simu_needs_to_be_removed),$(ion_src))

SFLAGS := $(filter-out -Iion/src/simulator/external/sdl/include,$(SFLAGS))

SFLAGS += -DFXCG50 -DTARGET_FXCG50 -m4-nofpu -mb -ffreestanding -nostdlib -Wa,--dsp -fstrict-volatile-bitfields -g -Os
SFLAGS += -DFXCG50 -DTARGET_FXCG50 -m4-nofpu -mb -nostdlib -Wa,--dsp -fstrict-volatile-bitfields -g -Os
LDFLAGS += -nostdlib -Wl,--no-warn-rwx-segments -lgint-cg -lc -lgint-cg -lc -lgcc -lopenlibm -lstdc++ -lgcc

ifdef FASTLOAD
Expand Down
15 changes: 8 additions & 7 deletions python/port/port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,6 @@ void nlr_jump_fail(void *val) {


#if defined _FXCG || defined NSPIRE_NEWLIB
void do_mp_lexer_new_from_file(const char * filename,mp_lexer_t ** res) {
mp_reader_t reader;
mp_reader_new_file(&reader, filename);
*res=mp_lexer_new(qstr_from_str(filename), reader);
}

// Code from MicroPython's reader.c
#include <sys/stat.h>
Expand All @@ -439,7 +434,7 @@ typedef struct _mp_reader_posix_t {
byte buf[20];
} mp_reader_posix_t;

STATIC mp_uint_t mp_reader_posix_readbyte(void *data) {
static mp_uint_t mp_reader_posix_readbyte(void *data) {
mp_reader_posix_t *reader = (mp_reader_posix_t *)data;
if (reader->pos >= reader->len) {
if (reader->len == 0) {
Expand All @@ -459,7 +454,7 @@ STATIC mp_uint_t mp_reader_posix_readbyte(void *data) {
return reader->buf[reader->pos++];
}

STATIC void mp_reader_posix_close(void *data) {
static void mp_reader_posix_close(void *data) {
mp_reader_posix_t *reader = (mp_reader_posix_t *)data;
if (reader->close_fd) {
MP_THREAD_GIL_EXIT();
Expand Down Expand Up @@ -498,6 +493,12 @@ void mp_reader_new_file(mp_reader_t *reader, const char *filename) {
}
mp_reader_new_file_from_fd(reader, fd, true);
}

void do_mp_lexer_new_from_file(const char * filename,mp_lexer_t ** res) {
mp_reader_t reader;
mp_reader_new_file(&reader, filename);
*res=mp_lexer_new(qstr_from_str(filename), reader);
}
#endif

mp_lexer_t * mp_lexer_new_from_file(qstr file_qstr) {
Expand Down
Loading