mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
Fix 3DS simulator (#243)
* [CI] Fix 3DS try 1
* [CI] Fix 3DS try 2
* [CI] Fix 3DS try 3
* [CI] Fix 3DS try 4
* [CI] Fix 3DS try 5
* [CI] Fix 3DS try 6
* [CI] Fix 3DS try 7
* [CI] Fix 3DS try 8
* [CI] Fix 3DS try 9
* [CI] Fix 3DS try 10
* [CI] Fix 3DS try 11
* [CI] Fix 3DS try 12
* [CI] Fix 3DS try 13
* [CI] Fix 3DS try 14
* [CI] Fix 3DS try 15
* [CI] Fix 3DS try 16
* [CI] Fix 3DS try 17
* [CI] Fix 3DS try 18
* [CI] Fix 3DS try 19
* [CI] Make other simulators than 3DS working
* [CI] Fix 3DS without breaking others simulators try 1
* Apply suggestions from code review
* Improve SDL assert
* Fix SDL assert
* Fix SDL assert 2
* [CI] Enable iOS, macOS and 3DS tests by default
* [CI] Change epsilon-sdk tap url
* Revert "[CI] Change epsilon-sdk tap url"
This reverts commit 9516607aba.
This commit is contained in:
28
.github/workflows/ci-workflow.yml
vendored
28
.github/workflows/ci-workflow.yml
vendored
@@ -8,30 +8,32 @@ on:
|
||||
triggerIos:
|
||||
description: 'Run iOS tests'
|
||||
required: true
|
||||
default: 'no'
|
||||
default: 'yes'
|
||||
triggerMacos:
|
||||
description: 'Run macOS tests'
|
||||
required: true
|
||||
default: 'no'
|
||||
default: 'yes'
|
||||
trigger3DS:
|
||||
description: 'Run 3DS tests'
|
||||
required: true
|
||||
default: 'no'
|
||||
default: 'yes'
|
||||
jobs:
|
||||
nintendo_3ds:
|
||||
if: github.event.inputs.trigger3DS == 'yes'
|
||||
if: github.event.inputs.trigger3DS == 'yes' || github.event.inputs.trigger3DS == ''
|
||||
runs-on: ubuntu-latest
|
||||
container: devkitpro/devkitarm:latest
|
||||
steps:
|
||||
- run: wget https://github.com/devkitPro/pacman/releases/download/v1.0.2/devkitpro-pacman.amd64.deb -O /tmp/devkitpro-pacman.deb
|
||||
- run: yes | sudo dpkg -i /tmp/devkitpro-pacman.deb
|
||||
- run: yes | sudo dkp-pacman -Syu --needed devkitARM 3dstools libctru
|
||||
- run: echo ::set-env name=DEVKITPRO::/opt/devkitpro
|
||||
- run: echo ::set-env name=DEVKITARM::/opt/devkitpro/devkitARM
|
||||
- run: echo ::set-env name=PATH::$DEVKITPRO/tools/bin:$DEVKITARM/bin:$PATH
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config -y
|
||||
- run: yes | sudo dkp-pacman -S --needed devkitARM 3dstools libctru
|
||||
- run: wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.18.3/makerom-v0.18.3-ubuntu_x86_64.zip
|
||||
- run: unzip makerom-v0.18.3-ubuntu_x86_64.zip
|
||||
- run: rm makerom-v0.18.3-ubuntu_x86_64.zip
|
||||
- run: chmod +x ./makerom
|
||||
- run: echo "PATH=.:$PATH" >> $GITHUB_ENV
|
||||
- run: make -j2 PLATFORM=simulator TARGET=3ds
|
||||
- run: make -j2 PLATFORM=simulator TARGET=3ds epsilon.cia
|
||||
- uses: actions/upload-artifact@master
|
||||
@@ -278,7 +280,7 @@ jobs:
|
||||
name: epsilon-linux.bin
|
||||
path: output/release/simulator/linux/epsilon.bin
|
||||
macos:
|
||||
if: github.event.inputs.triggerMacos == 'yes'
|
||||
if: github.event.inputs.triggerMacos == 'yes' || github.event.inputs.triggerMacos == ''
|
||||
runs-on: macOS-latest
|
||||
steps:
|
||||
- run: brew install numworks/tap/epsilon-sdk
|
||||
@@ -293,7 +295,7 @@ jobs:
|
||||
name: epsilon-macos.zip
|
||||
path: output/release/simulator/macos/epsilon.app
|
||||
ios:
|
||||
if: github.event.inputs.triggerIos == 'yes'
|
||||
if: github.event.inputs.triggerIos == 'yes' || github.event.inputs.triggerIos == ''
|
||||
runs-on: macOS-latest
|
||||
steps:
|
||||
- run: brew install numworks/tap/epsilon-sdk
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
TOOLCHAIN = devkitarm
|
||||
EXE = elf
|
||||
|
||||
EPSILON_TELEMETRY ?= 0
|
||||
|
||||
HANDY_TARGETS_EXTENSIONS = 3dsx cia
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
%.smdh: ion/src/simulator/3ds/assets/logo.png
|
||||
$(Q) echo "SMDH $(notdir $@)"
|
||||
$(Q) smdhtool --create "Epsilon" "A Numworks in your 3DS!" "Numworks" $< $@
|
||||
$(Q) smdhtool --create "Upsilon" "A Numworks in your 3DS!" "Numworks" $< $@
|
||||
|
||||
$(BUILD_DIR)/%.3dsx: $(BUILD_DIR)/%.elf $(BUILD_DIR)/%.smdh
|
||||
$(Q) echo "3DSX $(notdir $@)"
|
||||
|
||||
@@ -31,7 +31,7 @@ LIBDIRS := $(DEVKITPRO)/libctru
|
||||
INCLUDE = $(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||
-I$(CURDIR)/$(BUILD)
|
||||
|
||||
CFLAGS += $(INCLUDE) -DARM11 -D_3DS
|
||||
CFLAGS += $(INCLUDE) -DARM11 -D_3DS -D__3DS__
|
||||
|
||||
CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
|
||||
|
||||
@@ -19,22 +19,29 @@ ion_src += $(addprefix ion/src/simulator/3ds/, \
|
||||
|
||||
ion_src += ion/src/shared/collect_registers.cpp
|
||||
|
||||
sdl_simu_needs_to_be_removed += $(addprefix ion/src/simulator/shared/, \
|
||||
sdl_simu_needs_to_be_removed += $(addprefix ion/src/shared/, \
|
||||
dummy/display.cpp \
|
||||
dummy/led.cpp \
|
||||
dummy/usb.cpp \
|
||||
dummy/battery.cpp \
|
||||
dummy/store_script.cpp \
|
||||
)
|
||||
|
||||
sdl_simu_needs_to_be_removed += $(addprefix ion/src/simulator/shared/, \
|
||||
clipboard.cpp \
|
||||
display.cpp:-headless \
|
||||
events_keyboard.cpp:-headless \
|
||||
events.cpp \
|
||||
events_platform.cpp \
|
||||
framebuffer_base.cpp \
|
||||
framebuffer.cpp \
|
||||
keyboard_sdl.cpp:-headless \
|
||||
keyboard.cpp \
|
||||
main_sdl.cpp:-headless \
|
||||
main.cpp \
|
||||
layout.cpp:-headless \
|
||||
dummy/store_script.cpp \
|
||||
timing.cpp \
|
||||
)
|
||||
|
||||
# Remove the dummy display (re-implemented) and the SDL simulator stuff.
|
||||
ion_src := $(filter-out $(sdl_simu_needs_to_be_removed),$(ion_src))
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@ void Ion::Timing::msleep(uint32_t ms) {
|
||||
svcSleepThread((s64) ms * 1000);
|
||||
}
|
||||
|
||||
uint64_t Ion::Timing::millis() {
|
||||
return svcGetSystemTick() / (1000 * 1000);
|
||||
}
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
Ion::Simulator::Main::init();
|
||||
|
||||
|
||||
@@ -309,8 +309,13 @@ typedef uint64_t Uint64;
|
||||
#endif
|
||||
#endif /* SDL_DISABLE_ANALYZE_MACROS */
|
||||
|
||||
#ifndef __3DS__
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) \
|
||||
typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
|
||||
typedef int SDL_dummy_ ## name[(x) * 2 - 1]
|
||||
#else
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) \
|
||||
typedef int SDL_dummy_ ## name[0]
|
||||
#endif
|
||||
/** \cond */
|
||||
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
|
||||
SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
|
||||
|
||||
Reference in New Issue
Block a user