mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
Merge pull request #462 from M4xi1m3/3ds-simu-fix
[ion/3ds] Works again, added CIA target
This commit is contained in:
5
.github/workflows/ci-workflow.yml
vendored
5
.github/workflows/ci-workflow.yml
vendored
@@ -34,10 +34,15 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
- run: make -j2 PLATFORM=simulator TARGET=3ds
|
||||
- run: make -j2 PLATFORM=simulator TARGET=3ds epsilon.cia
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: epsilon-3ds.3dsx
|
||||
path: output/release/simulator/3ds/epsilon.3dsx
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: epsilon-3ds.cia
|
||||
path: output/release/simulator/3ds/epsilon.cia
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
TOOLCHAIN = devkitarm
|
||||
EXE = elf
|
||||
|
||||
HANDY_TARGETS_EXTENSIONS = 3dsx
|
||||
HANDY_TARGETS_EXTENSIONS = 3dsx cia
|
||||
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
|
||||
%.smdh: ion/src/simulator/3ds/assets/logo.png
|
||||
$(Q) echo "SMDH $(notdir $@)"
|
||||
$(Q) smdhtool --create "Epsilon" "A Numworks in your 3DS!" "Numworks" ion/src/simulator/3ds/assets/logo.png $@
|
||||
$(Q) smdhtool --create "Epsilon" "A Numworks in your 3DS!" "Numworks" $< $@
|
||||
|
||||
$(BUILD_DIR)/%.3dsx: $(BUILD_DIR)/%.elf $(BUILD_DIR)/%.smdh
|
||||
$(Q) echo "3DSX $(notdir $@)"
|
||||
$(Q) 3dsxtool $< $@ --smdh=$(word 2,$^)
|
||||
|
||||
cia_version_tuple := $(subst ., ,$(OMEGA_VERSION))
|
||||
|
||||
cia_version_major := $(word 1,$(cia_version_tuple))
|
||||
cia_version_minor := $(word 2,$(cia_version_tuple))
|
||||
cia_version_micro := $(word 3,$(cia_version_tuple))
|
||||
|
||||
|
||||
$(BUILD_DIR)/%.cxi: $(BUILD_DIR)/%.elf ion/src/simulator/3ds/assets/app.rsf ion/src/simulator/3ds/assets/banner.bnr ion/src/simulator/3ds/assets/icon.icn
|
||||
$(Q) echo "CXI $(notdir $@)"
|
||||
$(Q) makerom -o $@ -rsf ion/src/simulator/3ds/assets/app.rsf -target t -elf $< -icon ion/src/simulator/3ds/assets/icon.icn -banner ion/src/simulator/3ds/assets/banner.bnr -desc app:4
|
||||
|
||||
$(BUILD_DIR)/%.cia: $(BUILD_DIR)/%.cxi
|
||||
$(Q) echo "CIA $(notdir $@)"
|
||||
$(Q) makerom -f cia -o $@ -target t -i $<:0:0
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
ion_src += $(addprefix ion/src/simulator/3ds/, \
|
||||
main.cpp \
|
||||
callback.cpp \
|
||||
clipboard.cpp \
|
||||
display.cpp \
|
||||
framebuffer.cpp \
|
||||
telemetry_init.cpp \
|
||||
keyboard.cpp \
|
||||
events_keyboard.cpp \
|
||||
events.cpp \
|
||||
driver/display.cpp \
|
||||
driver/language.cpp \
|
||||
driver/led.cpp \
|
||||
@@ -22,8 +24,10 @@ sdl_simu_needs_to_be_removed += $(addprefix ion/src/simulator/shared/, \
|
||||
dummy/led.cpp \
|
||||
dummy/usb.cpp \
|
||||
dummy/battery.cpp \
|
||||
clipboard.cpp \
|
||||
display.cpp:-headless \
|
||||
events_keyboard.cpp:-headless \
|
||||
events.cpp \
|
||||
framebuffer_base.cpp \
|
||||
keyboard_sdl.cpp:-headless \
|
||||
main_sdl.cpp:-headless \
|
||||
|
||||
224
ion/src/simulator/3ds/assets/app.rsf
Normal file
224
ion/src/simulator/3ds/assets/app.rsf
Normal file
@@ -0,0 +1,224 @@
|
||||
BasicInfo:
|
||||
Title : Omega
|
||||
CompanyCode : "00"
|
||||
ProductCode : CTR-E-OMEGA
|
||||
Logo : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem
|
||||
|
||||
RomFs:
|
||||
# Specifies the root path of the read only file system to include in the ROM.
|
||||
#RootPath : romfs
|
||||
|
||||
TitleInfo:
|
||||
Category : Application
|
||||
UniqueId : 0x069420
|
||||
|
||||
Option:
|
||||
UseOnSD : true # true if App is to be installed to SD
|
||||
FreeProductCode : true # Removes limitations on ProductCode
|
||||
MediaFootPadding : false # If true CCI files are created with padding
|
||||
EnableCrypt : false # Enables encryption for NCCH and CIA
|
||||
EnableCompress : true # Compresses where applicable (currently only exefs:/.code)
|
||||
|
||||
AccessControlInfo:
|
||||
CoreVersion : 2
|
||||
|
||||
# Exheader Format Version
|
||||
DescVersion : 2
|
||||
|
||||
# Minimum Required Kernel Version (below is for 4.5.0)
|
||||
ReleaseKernelMajor : "02"
|
||||
ReleaseKernelMinor : "33"
|
||||
|
||||
# ExtData
|
||||
UseExtSaveData : false # enables ExtData
|
||||
#ExtSaveDataId : 0x300 # only set this when the ID is different to the UniqueId
|
||||
|
||||
# FS:USER Archive Access Permissions
|
||||
# Uncomment as required
|
||||
FileSystemAccess:
|
||||
#- CategorySystemApplication
|
||||
#- CategoryHardwareCheck
|
||||
#- CategoryFileSystemTool
|
||||
#- Debug
|
||||
#- TwlCardBackup
|
||||
#- TwlNandData
|
||||
#- Boss
|
||||
- DirectSdmc
|
||||
#- Core
|
||||
#- CtrNandRo
|
||||
#- CtrNandRw
|
||||
#- CtrNandRoWrite
|
||||
#- CategorySystemSettings
|
||||
#- CardBoard
|
||||
#- ExportImportIvs
|
||||
#- DirectSdmcWrite
|
||||
#- SwitchCleanup
|
||||
#- SaveDataMove
|
||||
#- Shop
|
||||
#- Shell
|
||||
#- CategoryHomeMenu
|
||||
|
||||
# Process Settings
|
||||
MemoryType : Application # Application/System/Base
|
||||
SystemMode : 64MB # 64MB(Default)/96MB/80MB/72MB/32MB
|
||||
IdealProcessor : 0
|
||||
AffinityMask : 1
|
||||
Priority : 16
|
||||
MaxCpu : 0 # Let system decide
|
||||
HandleTableSize : 0x200
|
||||
DisableDebug : false
|
||||
EnableForceDebug : false
|
||||
CanWriteSharedPage : true
|
||||
CanUsePrivilegedPriority : false
|
||||
CanUseNonAlphabetAndNumber : true
|
||||
PermitMainFunctionArgument : true
|
||||
CanShareDeviceMemory : true
|
||||
RunnableOnSleep : false
|
||||
SpecialMemoryArrange : true
|
||||
|
||||
# New3DS Exclusive Process Settings
|
||||
SystemModeExt : Legacy # Legacy(Default)/124MB/178MB Legacy:Use Old3DS SystemMode
|
||||
CpuSpeed : 268MHz # 268MHz(Default)/804MHz
|
||||
EnableL2Cache : false # false(default)/true
|
||||
CanAccessCore2 : false
|
||||
|
||||
# Virtual Address Mappings
|
||||
IORegisterMapping:
|
||||
- 1ff00000-1ff7ffff # DSP memory
|
||||
MemoryMapping:
|
||||
- 1f000000-1f5fffff:r # VRAM
|
||||
|
||||
# Accessible SVCs, <Name>:<ID>
|
||||
SystemCallAccess:
|
||||
ArbitrateAddress: 34
|
||||
Break: 60
|
||||
CancelTimer: 28
|
||||
ClearEvent: 25
|
||||
ClearTimer: 29
|
||||
CloseHandle: 35
|
||||
ConnectToPort: 45
|
||||
ControlMemory: 1
|
||||
CreateAddressArbiter: 33
|
||||
CreateEvent: 23
|
||||
CreateMemoryBlock: 30
|
||||
CreateMutex: 19
|
||||
CreateSemaphore: 21
|
||||
CreateThread: 8
|
||||
CreateTimer: 26
|
||||
DuplicateHandle: 39
|
||||
ExitProcess: 3
|
||||
ExitThread: 9
|
||||
GetCurrentProcessorNumber: 17
|
||||
GetHandleInfo: 41
|
||||
GetProcessId: 53
|
||||
GetProcessIdOfThread: 54
|
||||
GetProcessIdealProcessor: 6
|
||||
GetProcessInfo: 43
|
||||
GetResourceLimit: 56
|
||||
GetResourceLimitCurrentValues: 58
|
||||
GetResourceLimitLimitValues: 57
|
||||
GetSystemInfo: 42
|
||||
GetSystemTick: 40
|
||||
GetThreadContext: 59
|
||||
GetThreadId: 55
|
||||
GetThreadIdealProcessor: 15
|
||||
GetThreadInfo: 44
|
||||
GetThreadPriority: 11
|
||||
MapMemoryBlock: 31
|
||||
OutputDebugString: 61
|
||||
QueryMemory: 2
|
||||
ReleaseMutex: 20
|
||||
ReleaseSemaphore: 22
|
||||
SendSyncRequest1: 46
|
||||
SendSyncRequest2: 47
|
||||
SendSyncRequest3: 48
|
||||
SendSyncRequest4: 49
|
||||
SendSyncRequest: 50
|
||||
SetThreadPriority: 12
|
||||
SetTimer: 27
|
||||
SignalEvent: 24
|
||||
SleepThread: 10
|
||||
UnmapMemoryBlock: 32
|
||||
WaitSynchronization1: 36
|
||||
WaitSynchronizationN: 37
|
||||
Backdoor: 123
|
||||
|
||||
# Service List
|
||||
# Maximum 34 services (32 if firmware is prior to 9.3.0)
|
||||
ServiceAccessControl:
|
||||
- cfg:u
|
||||
- fs:USER
|
||||
- gsp::Gpu
|
||||
- hid:USER
|
||||
- ndm:u
|
||||
- pxi:dev
|
||||
- APT:U
|
||||
- ac:u
|
||||
- act:u
|
||||
- am:net
|
||||
- boss:U
|
||||
- cam:u
|
||||
- cecd:u
|
||||
- csnd:SND
|
||||
- frd:u
|
||||
- http:C
|
||||
- ir:USER
|
||||
- ir:u
|
||||
- ir:rst
|
||||
- ldr:ro
|
||||
- mic:u
|
||||
- news:u
|
||||
- nfc:u
|
||||
- nim:aoc
|
||||
- nwm::UDS
|
||||
- ptm:u
|
||||
- qtm:u
|
||||
- soc:U
|
||||
- ssl:C
|
||||
- y2r:u
|
||||
|
||||
|
||||
SystemControlInfo:
|
||||
SaveDataSize: 0K
|
||||
RemasterVersion: 0
|
||||
StackSize: 0x40000
|
||||
|
||||
# Modules that run services listed above should be included below
|
||||
# Maximum 48 dependencies
|
||||
# If a module is listed that isn't present on the 3DS, the title will get stuck at the logo (3ds waves)
|
||||
# So act, nfc and qtm are commented for 4.x support. Uncomment if you need these.
|
||||
# <module name>:<module titleid>
|
||||
Dependency:
|
||||
ac: 0x0004013000002402
|
||||
#act: 0x0004013000003802
|
||||
am: 0x0004013000001502
|
||||
boss: 0x0004013000003402
|
||||
camera: 0x0004013000001602
|
||||
cecd: 0x0004013000002602
|
||||
cfg: 0x0004013000001702
|
||||
codec: 0x0004013000001802
|
||||
csnd: 0x0004013000002702
|
||||
dlp: 0x0004013000002802
|
||||
dsp: 0x0004013000001a02
|
||||
friends: 0x0004013000003202
|
||||
gpio: 0x0004013000001b02
|
||||
gsp: 0x0004013000001c02
|
||||
hid: 0x0004013000001d02
|
||||
http: 0x0004013000002902
|
||||
i2c: 0x0004013000001e02
|
||||
ir: 0x0004013000003302
|
||||
mcu: 0x0004013000001f02
|
||||
mic: 0x0004013000002002
|
||||
ndm: 0x0004013000002b02
|
||||
news: 0x0004013000003502
|
||||
#nfc: 0x0004013000004002
|
||||
nim: 0x0004013000002c02
|
||||
nwm: 0x0004013000002d02
|
||||
pdn: 0x0004013000002102
|
||||
ps: 0x0004013000003102
|
||||
ptm: 0x0004013000002202
|
||||
#qtm: 0x0004013020004202
|
||||
ro: 0x0004013000003702
|
||||
socket: 0x0004013000002e02
|
||||
spi: 0x0004013000002302
|
||||
ssl: 0x0004013000002f02
|
||||
BIN
ion/src/simulator/3ds/assets/banner.bnr
Normal file
BIN
ion/src/simulator/3ds/assets/banner.bnr
Normal file
Binary file not shown.
BIN
ion/src/simulator/3ds/assets/banner.png
Normal file
BIN
ion/src/simulator/3ds/assets/banner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.6 KiB |
BIN
ion/src/simulator/3ds/assets/icon.icn
Normal file
BIN
ion/src/simulator/3ds/assets/icon.icn
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 9.8 KiB |
BIN
ion/src/simulator/3ds/assets/logo24.png
Normal file
BIN
ion/src/simulator/3ds/assets/logo24.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.8 KiB |
18
ion/src/simulator/3ds/clipboard.cpp
Normal file
18
ion/src/simulator/3ds/clipboard.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <ion/clipboard.h>
|
||||
#include <ion.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace Ion {
|
||||
namespace Clipboard {
|
||||
|
||||
uint32_t localClipboardVersion;
|
||||
|
||||
void write(const char * text) {
|
||||
}
|
||||
|
||||
const char * read() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ bool Ion::USB::isEnumerated() {
|
||||
void Ion::USB::clearEnumerationInterrupt() {
|
||||
}
|
||||
|
||||
void Ion::USB::DFU() {
|
||||
void Ion::USB::DFU(bool) {
|
||||
}
|
||||
|
||||
void Ion::USB::enable() {
|
||||
|
||||
23
ion/src/simulator/3ds/events.cpp
Normal file
23
ion/src/simulator/3ds/events.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "events.h"
|
||||
#include <ion/events.h>
|
||||
|
||||
namespace Ion {
|
||||
namespace Events {
|
||||
|
||||
void didPressNewKey() {
|
||||
}
|
||||
|
||||
char * sharedExternalTextBuffer() {
|
||||
static char buffer[sharedExternalTextBufferSize];
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const char * Event::text() const {
|
||||
if (*this == ExternalText) {
|
||||
return const_cast<const char *>(sharedExternalTextBuffer());
|
||||
}
|
||||
return defaultText();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
24
ion/src/simulator/3ds/events.h
Normal file
24
ion/src/simulator/3ds/events.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef ION_SIMULATOR_EVENTS_H
|
||||
#define ION_SIMULATOR_EVENTS_H
|
||||
|
||||
#include <ion/events.h>
|
||||
|
||||
namespace Ion {
|
||||
namespace Simulator {
|
||||
namespace Events {
|
||||
|
||||
void dumpEventCount(int i);
|
||||
void logAfter(int numberOfEvents);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
namespace Events {
|
||||
|
||||
static constexpr int sharedExternalTextBufferSize = 0;
|
||||
char * sharedExternalTextBuffer();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user