(CTR/3DS) add .cia building
update dist-cores.sh
186
Makefile.ctr
@ -1,9 +1,94 @@
|
|||||||
TARGET := retroarch_3ds
|
TARGET := retroarch_3ds
|
||||||
OBJS :=
|
LIBRETRO = gambatte
|
||||||
OBJS += gfx/drivers/ctr_sprite.o griffin/griffin.o
|
|
||||||
#NO_SMDH = 1
|
|
||||||
DEBUG = 0
|
DEBUG = 0
|
||||||
|
|
||||||
|
APP_TITLE = Retroarch 3DS
|
||||||
|
APP_DESCRIPTION = Retroarch 3DS
|
||||||
|
APP_AUTHOR = Team Libretro
|
||||||
|
APP_PRODUCT_CODE = RETROARCH-3DS
|
||||||
|
APP_UNIQUE_ID = 0xBAC00
|
||||||
|
APP_ICON = ctr/default.png
|
||||||
|
APP_BANNER = ctr/libretro_banner.png
|
||||||
|
APP_AUDIO = ctr/silent.wav
|
||||||
|
|
||||||
|
ifeq ($(LIBRETRO), gambatte)
|
||||||
|
APP_TITLE = Gambatte Libretro
|
||||||
|
#APP_DESCRIPTION = Retroarch 3DS
|
||||||
|
#APP_AUTHOR = Team Libretro
|
||||||
|
APP_PRODUCT_CODE = RARCH-GAMBATTE
|
||||||
|
APP_UNIQUE_ID = 0xBAC01
|
||||||
|
APP_ICON = ctr/gambatte.png
|
||||||
|
#APP_BANNER = ctr/libretro_banner.png
|
||||||
|
#APP_AUDIO = ctr/silent.wav
|
||||||
|
|
||||||
|
else ifeq ($(LIBRETRO), gpsp)
|
||||||
|
APP_TITLE = gpSP Libretro
|
||||||
|
#APP_DESCRIPTION = Retroarch 3DS
|
||||||
|
#APP_AUTHOR = Team Libretro
|
||||||
|
APP_PRODUCT_CODE = RARCH-GPSP
|
||||||
|
APP_UNIQUE_ID = 0xBAC02
|
||||||
|
APP_ICON = ctr/gpsp.png
|
||||||
|
#APP_BANNER = ctr/libretro_banner.png
|
||||||
|
#APP_AUDIO = ctr/silent.wav
|
||||||
|
|
||||||
|
else ifeq ($(LIBRETRO), fceumm)
|
||||||
|
APP_TITLE = FCeumm Libretro
|
||||||
|
#APP_DESCRIPTION = Retroarch 3DS
|
||||||
|
#APP_AUTHOR = Team Libretro
|
||||||
|
APP_PRODUCT_CODE = RARCH-FCEUMM
|
||||||
|
APP_UNIQUE_ID = 0xBAC03
|
||||||
|
APP_ICON = ctr/fceumm.png
|
||||||
|
#APP_BANNER = ctr/libretro_banner.png
|
||||||
|
#APP_AUDIO = ctr/silent.wav
|
||||||
|
|
||||||
|
else ifeq ($(LIBRETRO), nestopia)
|
||||||
|
APP_TITLE = Nestopia Libretro
|
||||||
|
#APP_DESCRIPTION = Retroarch 3DS
|
||||||
|
#APP_AUTHOR = Team Libretro
|
||||||
|
APP_PRODUCT_CODE = RARCH-NESTOPIA
|
||||||
|
APP_UNIQUE_ID = 0xBAC04
|
||||||
|
APP_ICON = ctr/nestopia.png
|
||||||
|
#APP_BANNER = ctr/libretro_banner.png
|
||||||
|
#APP_AUDIO = ctr/silent.wav
|
||||||
|
|
||||||
|
else ifeq ($(LIBRETRO), nxengine)
|
||||||
|
APP_TITLE = NXengine Libretro
|
||||||
|
#APP_DESCRIPTION = Retroarch 3DS
|
||||||
|
#APP_AUTHOR = Team Libretro
|
||||||
|
APP_PRODUCT_CODE = RARCH-NXENGINE
|
||||||
|
APP_UNIQUE_ID = 0xBAC05
|
||||||
|
APP_ICON = ctr/nxengine.png
|
||||||
|
#APP_BANNER = ctr/libretro_banner.png
|
||||||
|
#APP_AUDIO = ctr/silent.wav
|
||||||
|
|
||||||
|
else ifeq ($(LIBRETRO), genesis_plus_gx)
|
||||||
|
APP_TITLE = Genesis Plus GX Libretro
|
||||||
|
#APP_DESCRIPTION = Retroarch 3DS
|
||||||
|
#APP_AUTHOR = Team Libretro
|
||||||
|
APP_PRODUCT_CODE = RARCH-GENPLUSGX
|
||||||
|
APP_UNIQUE_ID = 0xBAC06
|
||||||
|
APP_ICON = ctr/gambatte.png
|
||||||
|
#APP_BANNER = ctr/libretro_banner.png
|
||||||
|
#APP_AUDIO = ctr/silent.wav
|
||||||
|
|
||||||
|
else ifeq ($(LIBRETRO), catsfc)
|
||||||
|
APP_TITLE = CATSFC Libretro
|
||||||
|
#APP_DESCRIPTION = Retroarch 3DS
|
||||||
|
#APP_AUTHOR = Team Libretro
|
||||||
|
APP_PRODUCT_CODE = RARCH-CATSFC
|
||||||
|
APP_UNIQUE_ID = 0xBAC07
|
||||||
|
APP_ICON = ctr/gambatte.png
|
||||||
|
#APP_BANNER = ctr/libretro_banner.png
|
||||||
|
#APP_AUDIO = ctr/silent.wav
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
OBJS :=
|
||||||
|
OBJS += gfx/drivers/ctr_sprite.o
|
||||||
|
OBJS += griffin/griffin.o
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(DEVKITARM)),)
|
ifeq ($(strip $(DEVKITARM)),)
|
||||||
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
|
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
|
||||||
@ -17,11 +102,20 @@ ifeq ($(strip $(AEMSTRO)),)
|
|||||||
$(error "Please set AEMSTRO in your environment. export AEMSTRO=<path to>aemstro")
|
$(error "Please set AEMSTRO in your environment. export AEMSTRO=<path to>aemstro")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
APP_TITLE := $(shell echo "$(APP_TITLE)" | cut -c1-128)
|
||||||
|
APP_DESCRIPTION := $(shell echo "$(APP_DESCRIPTION)" | cut -c1-256)
|
||||||
|
APP_AUTHOR := $(shell echo "$(APP_AUTHOR)" | cut -c1-128)
|
||||||
|
APP_PRODUCT_CODE := $(shell echo $(APP_PRODUCT_CODE) | cut -c1-16)
|
||||||
|
APP_UNIQUE_ID := $(shell echo $(APP_UNIQUE_ID) | cut -c1-7)
|
||||||
|
|
||||||
|
|
||||||
INCDIRS := -I$(CTRULIB)/include
|
INCDIRS := -I$(CTRULIB)/include
|
||||||
LIBDIRS := -L. -L$(CTRULIB)/lib
|
LIBDIRS := -L. -L$(CTRULIB)/lib
|
||||||
|
|
||||||
|
|
||||||
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard
|
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -marm -mfpu=vfp
|
||||||
|
|
||||||
CFLAGS += -mword-relocations \
|
CFLAGS += -mword-relocations \
|
||||||
-fomit-frame-pointer -ffast-math \
|
-fomit-frame-pointer -ffast-math \
|
||||||
@ -45,8 +139,9 @@ CFLAGS += -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DHAVE_BUILTIN_AUTOCONFIG
|
|||||||
|
|
||||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||||
|
|
||||||
ASFLAGS := -g $(ARCH)
|
ASFLAGS := -g $(ARCH) -O3
|
||||||
LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||||
|
|
||||||
CFLAGS += -std=gnu99 -ffast-math
|
CFLAGS += -std=gnu99 -ffast-math
|
||||||
|
|
||||||
|
|
||||||
@ -56,34 +151,16 @@ LIBS := -lretro_ctr -lctru -lm
|
|||||||
|
|
||||||
.PHONY: $(BUILD) clean all
|
.PHONY: $(BUILD) clean all
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
clean:
|
$(TARGET): $(TARGET).3dsx $(TARGET).smdh $(TARGET).cia
|
||||||
rm -f $(OBJS)
|
|
||||||
rm -f $(TARGET).3dsx
|
|
||||||
rm -f $(TARGET).elf
|
|
||||||
|
|
||||||
|
|
||||||
$(TARGET): $(TARGET).3dsx
|
|
||||||
$(TARGET).3dsx: $(TARGET).elf
|
$(TARGET).3dsx: $(TARGET).elf
|
||||||
$(TARGET).elf : $(OBJS)
|
$(TARGET).elf: $(OBJS) libretro_ctr.a
|
||||||
|
|
||||||
ifeq ($(strip $(APP_TITLE)),)
|
ctr_sprite_shader_shbin.h: gfx/drivers/ctr_sprite.o
|
||||||
APP_TITLE := $(notdir $(TARGET))
|
gfx/drivers/ctr_gfx.c: ctr_sprite_shader_shbin.h
|
||||||
endif
|
griffin/griffin.c: gfx/drivers/ctr_gfx.c
|
||||||
|
|
||||||
ifeq ($(strip $(APP_DESCRIPTION)),)
|
|
||||||
APP_DESCRIPTION := Built with devkitARM & libctru
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(APP_AUTHOR)),)
|
|
||||||
APP_AUTHOR := Unspecified Author
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(APP_ICON)),)
|
|
||||||
APP_ICON := $(CTRULIB)/default_icon.png
|
|
||||||
endif
|
|
||||||
|
|
||||||
PREFIX := $(DEVKITARM)/bin/arm-none-eabi-
|
PREFIX := $(DEVKITARM)/bin/arm-none-eabi-
|
||||||
|
|
||||||
@ -96,10 +173,19 @@ STRIP := $(PREFIX)strip
|
|||||||
NM := $(PREFIX)nm
|
NM := $(PREFIX)nm
|
||||||
LD := $(CXX)
|
LD := $(CXX)
|
||||||
|
|
||||||
|
ifneq ($(findstring Linux,$(shell uname -a)),)
|
||||||
|
MAKEROM = ctr/tools/makerom-linux
|
||||||
|
BANNERTOOL = ctr/tools/bannertool-linux
|
||||||
|
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||||
|
MAKEROM = ctr/tools/makerom-mac
|
||||||
|
BANNERTOOL = ctr/tools/bannertool-mac
|
||||||
|
else
|
||||||
|
MAKEROM = ctr/tools/makerom.exe
|
||||||
|
BANNERTOOL = ctr/tools/bannertool.exe
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
%.o: %.shader
|
%.o: %.shader
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
@echo $(notdir $<)
|
|
||||||
python $(AEMSTRO)/aemstro_as.py $< $(notdir $<).shbin
|
python $(AEMSTRO)/aemstro_as.py $< $(notdir $<).shbin
|
||||||
$(DEVKITARM)/bin/bin2s $(notdir $<).shbin | $(PREFIX)as -o $@
|
$(DEVKITARM)/bin/bin2s $(notdir $<).shbin | $(PREFIX)as -o $@
|
||||||
echo "extern const u8" `(echo $(notdir $<).shbin | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(notdir $<).shbin | tr . _)`.h
|
echo "extern const u8" `(echo $(notdir $<).shbin | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(notdir $<).shbin | tr . _)`.h
|
||||||
@ -125,22 +211,42 @@ LD := $(CXX)
|
|||||||
|
|
||||||
%.vsh:
|
%.vsh:
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
%.smdh: $(APP_ICON)
|
||||||
%.smdh: $(APP_ICON) $(MAKEFILE_LIST)
|
|
||||||
@echo building ... $(notdir $@)
|
|
||||||
smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
%.3dsx: %.elf
|
%.3dsx: %.elf
|
||||||
@echo building ... $(notdir $@)
|
-3dsxtool $< $@ $(_3DSXFLAGS)
|
||||||
3dsxtool $< $@ $(_3DSXFLAGS)
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
%.elf:
|
||||||
%.elf: .FORCE
|
|
||||||
@echo linking $(notdir $@)
|
|
||||||
$(LD) $(LDFLAGS) $(OBJS) $(LIBDIRS) $(LIBS) -o $@
|
$(LD) $(LDFLAGS) $(OBJS) $(LIBDIRS) $(LIBS) -o $@
|
||||||
$(NM) -CSn $@ > $(notdir $*.lst)
|
$(NM) -CSn $@ > $(notdir $*.lst)
|
||||||
|
|
||||||
|
$(TARGET).bnr: $(APP_BANNER) $(APP_AUDIO)
|
||||||
|
$(BANNERTOOL) makebanner -i "$(APP_BANNER)" -a "$(APP_AUDIO)" -o $@
|
||||||
|
|
||||||
.PHONY: .FORCE
|
$(TARGET).icn: $(APP_ICON)
|
||||||
|
$(BANNERTOOL) makesmdh -s "$(APP_TITLE)" -l "$(APP_TITLE)" -p "$(APP_AUTHOR)" -i $(APP_ICON) -o $@
|
||||||
|
|
||||||
|
$(TARGET).rsf: ctr/tools/template-cia.rsf
|
||||||
|
cat ctr/tools/template-cia.rsf | sed 's/{APP_TITLE}/$(APP_TITLE)/' | sed 's/{APP_PRODUCT_CODE}/$(APP_PRODUCT_CODE)/' | sed 's/{APP_UNIQUE_ID}/$(APP_UNIQUE_ID)/' > $@
|
||||||
|
|
||||||
|
$(TARGET)_stripped.elf: $(TARGET).elf
|
||||||
|
cp $(TARGET).elf $@
|
||||||
|
$(STRIP) $@
|
||||||
|
|
||||||
|
$(TARGET).cia: $(TARGET)_stripped.elf $(TARGET).bnr $(TARGET).icn $(TARGET).rsf
|
||||||
|
$(MAKEROM) -f cia -o $@ -rsf $(TARGET).rsf -target t -exefslogo -elf $(TARGET)_stripped.elf -icon $(TARGET).icn -banner $(TARGET).bnr
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(OBJS)
|
||||||
|
rm -f $(TARGET).3dsx
|
||||||
|
rm -f $(TARGET).elf
|
||||||
|
rm -f $(TARGET)_stripped.elf
|
||||||
|
rm -f $(TARGET).cia
|
||||||
|
rm -f $(TARGET).bnr
|
||||||
|
rm -f $(TARGET).icn
|
||||||
|
rm -f $(TARGET).rsf
|
||||||
|
rm -f *_shader_shbin.h
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
|
||||||
|
BIN
ctr/catsfc.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
ctr/default.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
ctr/fceumm.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
ctr/gambatte.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
ctr/genesis_plus_gx.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
ctr/gpsp.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
ctr/libretro_banner.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
ctr/mgba.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
ctr/nestopia.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
ctr/nxengine.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
ctr/silent.wav
Normal file
BIN
ctr/tools/bannertool-linux
Executable file
BIN
ctr/tools/bannertool-mac
Executable file
BIN
ctr/tools/bannertool.exe
Executable file
BIN
ctr/tools/makerom-linux
Executable file
BIN
ctr/tools/makerom-mac
Executable file
BIN
ctr/tools/makerom.exe
Executable file
235
ctr/tools/template-3ds.rsf
Normal file
@ -0,0 +1,235 @@
|
|||||||
|
BasicInfo:
|
||||||
|
Title : "{APP_TITLE}"
|
||||||
|
CompanyCode : "00"
|
||||||
|
ProductCode : "{APP_PRODUCT_CODE}"
|
||||||
|
ContentType : Application
|
||||||
|
Logo : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem
|
||||||
|
|
||||||
|
#Rom:
|
||||||
|
# Specifies the root path of the file system to include in the ROM.
|
||||||
|
# HostRoot : "romfs"
|
||||||
|
|
||||||
|
|
||||||
|
TitleInfo:
|
||||||
|
UniqueId : {APP_UNIQUE_ID}
|
||||||
|
Category : Application
|
||||||
|
|
||||||
|
CardInfo:
|
||||||
|
MediaSize : 128MB # 128MB / 256MB / 512MB / 1GB / 2GB / 4GB / 8GB / 16GB / 32GB
|
||||||
|
MediaType : Card1 # Card1 / Card2
|
||||||
|
CardDevice : None # NorFlash(Pick this if you use savedata) / None
|
||||||
|
|
||||||
|
|
||||||
|
Option:
|
||||||
|
FreeProductCode : true # Removes limitations on ProductCode
|
||||||
|
MediaFootPadding : false # If true CCI files are created with padding
|
||||||
|
EnableCrypt : true # Enables encryption for NCCH and CIA
|
||||||
|
EnableCompress : true # Compresses exefs code
|
||||||
|
|
||||||
|
|
||||||
|
ExeFs: # these are the program segments from the ELF, check your elf for the appropriate segment names
|
||||||
|
ReadOnly:
|
||||||
|
- .rodata
|
||||||
|
- RO
|
||||||
|
ReadWrite:
|
||||||
|
- .data
|
||||||
|
- RO
|
||||||
|
Text:
|
||||||
|
- .init
|
||||||
|
- .text
|
||||||
|
- STUP_ENTRY
|
||||||
|
|
||||||
|
PlainRegion: # only used with SDK ELFs
|
||||||
|
- .module_id
|
||||||
|
|
||||||
|
AccessControlInfo:
|
||||||
|
# UseExtSaveData : true
|
||||||
|
# ExtSaveDataId: 0xff3ff
|
||||||
|
# UseExtendedSaveDataAccessControl: true
|
||||||
|
# AccessibleSaveDataIds: [0x101, 0x202, 0x303, 0x404, 0x505, 0x606]
|
||||||
|
|
||||||
|
SystemControlInfo:
|
||||||
|
SaveDataSize: 128KB
|
||||||
|
RemasterVersion: 0
|
||||||
|
StackSize: 0x40000
|
||||||
|
|
||||||
|
# DO NOT EDIT BELOW HERE OR PROGRAMS WILL NOT LAUNCH (most likely)
|
||||||
|
|
||||||
|
AccessControlInfo:
|
||||||
|
FileSystemAccess:
|
||||||
|
- Debug
|
||||||
|
- DirectSdmc
|
||||||
|
- DirectSdmcWrite
|
||||||
|
|
||||||
|
IdealProcessor : 0
|
||||||
|
AffinityMask : 1
|
||||||
|
|
||||||
|
Priority : 16
|
||||||
|
|
||||||
|
MaxCpu : 0x9E # Default
|
||||||
|
|
||||||
|
CoreVersion : 2
|
||||||
|
DescVersion : 2
|
||||||
|
|
||||||
|
ReleaseKernelMajor : "02"
|
||||||
|
ReleaseKernelMinor : "33"
|
||||||
|
MemoryType : Application
|
||||||
|
HandleTableSize: 512
|
||||||
|
IORegisterMapping:
|
||||||
|
- 1ff50000-1ff57fff
|
||||||
|
- 1ff70000-1ff77fff
|
||||||
|
MemoryMapping:
|
||||||
|
- 1f000000-1f5fffff:r
|
||||||
|
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
|
||||||
|
InterruptNumbers:
|
||||||
|
ServiceAccessControl:
|
||||||
|
- APT:U
|
||||||
|
- $hioFIO
|
||||||
|
- $hostio0
|
||||||
|
- $hostio1
|
||||||
|
- ac:u
|
||||||
|
- boss:U
|
||||||
|
- cam:u
|
||||||
|
- cecd:u
|
||||||
|
- cfg:u
|
||||||
|
- dlp:FKCL
|
||||||
|
- dlp:SRVR
|
||||||
|
- dsp::DSP
|
||||||
|
- frd:u
|
||||||
|
- fs:USER
|
||||||
|
- gsp::Gpu
|
||||||
|
- hid:USER
|
||||||
|
- http:C
|
||||||
|
- mic:u
|
||||||
|
- ndm:u
|
||||||
|
- news:u
|
||||||
|
- nwm::UDS
|
||||||
|
- ptm:u
|
||||||
|
- pxi:dev
|
||||||
|
- soc:U
|
||||||
|
- ssl:C
|
||||||
|
- y2r:u
|
||||||
|
- ldr:ro
|
||||||
|
- ir:USER
|
||||||
|
|
||||||
|
|
||||||
|
SystemControlInfo:
|
||||||
|
Dependency:
|
||||||
|
ac: 0x0004013000002402L
|
||||||
|
am: 0x0004013000001502L
|
||||||
|
boss: 0x0004013000003402L
|
||||||
|
camera: 0x0004013000001602L
|
||||||
|
cecd: 0x0004013000002602L
|
||||||
|
cfg: 0x0004013000001702L
|
||||||
|
codec: 0x0004013000001802L
|
||||||
|
csnd: 0x0004013000002702L
|
||||||
|
dlp: 0x0004013000002802L
|
||||||
|
dsp: 0x0004013000001a02L
|
||||||
|
friends: 0x0004013000003202L
|
||||||
|
gpio: 0x0004013000001b02L
|
||||||
|
gsp: 0x0004013000001c02L
|
||||||
|
hid: 0x0004013000001d02L
|
||||||
|
http: 0x0004013000002902L
|
||||||
|
i2c: 0x0004013000001e02L
|
||||||
|
ir: 0x0004013000003302L
|
||||||
|
mcu: 0x0004013000001f02L
|
||||||
|
mic: 0x0004013000002002L
|
||||||
|
ndm: 0x0004013000002b02L
|
||||||
|
news: 0x0004013000003502L
|
||||||
|
nim: 0x0004013000002c02L
|
||||||
|
nwm: 0x0004013000002d02L
|
||||||
|
pdn: 0x0004013000002102L
|
||||||
|
ps: 0x0004013000003102L
|
||||||
|
ptm: 0x0004013000002202L
|
||||||
|
ro: 0x0004013000003702L
|
||||||
|
socket: 0x0004013000002e02L
|
||||||
|
spi: 0x0004013000002302L
|
||||||
|
ssl: 0x0004013000002f02L
|
||||||
|
CommonHeaderKey:
|
||||||
|
D: |
|
||||||
|
jL2yO86eUQnYbXIrzgFVMm7FVze0LglZ2f5g+c42hWoEdnb5BOotaMQPBfqt
|
||||||
|
aUyAEmzQPaoi/4l4V+hTJRXQfthVRqIEx27B84l8LA6Tl5Fy9PaQaQ+4yRfP
|
||||||
|
g6ylH2l0EikrIVjy2uMlFgl0QJCrG+QGKHftxhaGCifdAwFNmiZuyJ/TmktZ
|
||||||
|
0RCb66lYcr2h/p2G7SnpKUliS9h9KnpmG+UEgVYQUK+4SCfByUa9PxYGpT0E
|
||||||
|
nw1UcRz0gsBmdOqcgzwnAd9vVqgb42hVn6uQZyAl+j1RKiMWywZarazIR/k5
|
||||||
|
Lmr4+groimSEa+3ajyoIho9WaWTDmFU3mkhA2tUDIQ==
|
||||||
|
Exponent: |
|
||||||
|
AQAB
|
||||||
|
Modulus: |
|
||||||
|
zwCcsyCgMkdlieCgQMVXA6X2jmb1ICjup0Q+jk/AydPkOgsx7I/MjUymFEkU
|
||||||
|
vgXBtCKtzh3NKXtFFuW51tJ60GPOabLKuG0Qm5li+UXALrWhzWuvd5vv2FZI
|
||||||
|
dTQCbrq/MFS/M02xNtwqzWiBjE/LwqIdbrDAAvX4HGy0ydaQJ1DKYeQeph5D
|
||||||
|
lAGBw2nQ4izXhhuLaU3w8VQkIJHdhxIKI5gJY/20AGkG0vHD553Mh5kBINrWp
|
||||||
|
CRYmmJS8DCYbAiQtKbkeUfzHViGTZuj6PwaY8Mv39PGO47a++pt45IUyCEs4/
|
||||||
|
LjMS72cyfo8tU4twRGp76SFGYejYj3wGC1f/POQw==
|
||||||
|
Signature: |
|
||||||
|
BOPR0jL0BOV5Zx502BuPbOvi/hvOq5ID8Dz1MQfOjkey6FKP/6cb4f9YXpm6c
|
||||||
|
ZCHAZLo0GduKdMepiKPUq1rsbbAxkRdQdjOOusEWoxNA58x3E4373tCAhlqM2
|
||||||
|
DvuQERrIIQ/XnYLV9C3uw4efZwhFqog1jvVyoEHpuvs8xnYtGbsKQ8FrgLwXv
|
||||||
|
pOZYy9cSgq+jqLy2D9IxiowPcbq2cRlbW9d2xlUfpq0AohyuXQhpxn7d9RUor
|
||||||
|
9veoARRAdxRJK12EpcSoEM1LhTRYdJnSRCY3x3p6YIV3c+l1sWvaQwKt0sZ/U
|
||||||
|
8TTDx2gb9g7r/+U9icneu/zlqUpSkexCS009Q==
|
||||||
|
Descriptor: |
|
||||||
|
AP///wAABAACAAAAAAAFGJ4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAiIAAAAAAAABBUFQ6VQAAACRo
|
||||||
|
aW9GSU8AJGhvc3RpbzAkaG9zdGlvMWFjOnUAAAAAYm9zczpVAABjYW06dQAA
|
||||||
|
AGNlY2Q6dQAAY2ZnOnUAAABkbHA6RktDTGRscDpTUlZSZHNwOjpEU1BmcmQ6
|
||||||
|
dQAAAGZzOlVTRVIAZ3NwOjpHcHVoaWQ6VVNFUmh0dHA6QwAAbWljOnUAAABu
|
||||||
|
ZG06dQAAAG5ld3M6dQAAbndtOjpVRFNwdG06dQAAAHB4aTpkZXYAc29jOlUA
|
||||||
|
AABzc2w6QwAAAHkycjp1AAAAbGRyOnJvAABpcjpVU0VSAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAABOn/rw/7//8ec/APIA8JH/APaR/1D/gf9Y/4H/cP+B/3j/gf8B
|
||||||
|
AQD/AAIA/iECAPz/////////////////////////////////////////////
|
||||||
|
////////////////////////////////////////AAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAADAAAAAAAAAAAAAAAAAAI=
|
239
ctr/tools/template-cia.rsf
Normal file
@ -0,0 +1,239 @@
|
|||||||
|
BasicInfo:
|
||||||
|
Title : "{APP_TITLE}"
|
||||||
|
CompanyCode : "00"
|
||||||
|
ProductCode : "{APP_PRODUCT_CODE}"
|
||||||
|
ContentType : Application
|
||||||
|
Logo : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem
|
||||||
|
|
||||||
|
#Rom:
|
||||||
|
# Specifies the root path of the file system to include in the ROM.
|
||||||
|
# HostRoot : "romfs"
|
||||||
|
|
||||||
|
TitleInfo:
|
||||||
|
UniqueId : {APP_UNIQUE_ID}
|
||||||
|
Category : Application
|
||||||
|
|
||||||
|
CardInfo:
|
||||||
|
MediaSize : 128MB # 128MB / 256MB / 512MB / 1GB / 2GB / 4GB / 8GB / 16GB / 32GB
|
||||||
|
MediaType : Card1 # Card1 / Card2
|
||||||
|
CardDevice : None # NorFlash(Pick this if you use savedata) / None
|
||||||
|
|
||||||
|
|
||||||
|
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 exefs code
|
||||||
|
|
||||||
|
ExeFs: # these are the program segments from the ELF, check your elf for the appropriate segment names
|
||||||
|
ReadOnly:
|
||||||
|
- .rodata
|
||||||
|
- RO
|
||||||
|
ReadWrite:
|
||||||
|
- .data
|
||||||
|
- RO
|
||||||
|
Text:
|
||||||
|
- .init
|
||||||
|
- .text
|
||||||
|
- STUP_ENTRY
|
||||||
|
|
||||||
|
PlainRegion: # only used with SDK ELFs
|
||||||
|
# - .module_id
|
||||||
|
|
||||||
|
AccessControlInfo:
|
||||||
|
# UseOtherVariationSaveData : true
|
||||||
|
# UseExtSaveData : true
|
||||||
|
# ExtSaveDataId: 0xffffffff
|
||||||
|
# SystemSaveDataId1: 0x220
|
||||||
|
# SystemSaveDataId2: 0x00040010
|
||||||
|
# OtherUserSaveDataId1: 0x220
|
||||||
|
# OtherUserSaveDataId2: 0x330
|
||||||
|
# OtherUserSaveDataId3: 0x440
|
||||||
|
# UseExtendedSaveDataAccessControl: true
|
||||||
|
# AccessibleSaveDataIds: [0x101, 0x202, 0x303, 0x404, 0x505, 0x606]
|
||||||
|
FileSystemAccess:
|
||||||
|
# - CategorySystemApplication
|
||||||
|
# - CategoryHardwareCheck
|
||||||
|
# - CategoryFileSystemTool
|
||||||
|
- Debug
|
||||||
|
# - TwlCardBackup
|
||||||
|
# - TwlNandData
|
||||||
|
# - Boss
|
||||||
|
- DirectSdmc
|
||||||
|
# - Core
|
||||||
|
# - CtrNandRo
|
||||||
|
# - CtrNandRw
|
||||||
|
# - CtrNandRoWrite
|
||||||
|
# - CategorySystemSettings
|
||||||
|
# - CardBoard
|
||||||
|
# - ExportImportIvs
|
||||||
|
- DirectSdmcWrite
|
||||||
|
# - SwitchCleanup
|
||||||
|
# - SaveDataMove
|
||||||
|
# - Shop
|
||||||
|
# - Shell
|
||||||
|
# - CategoryHomeMenu
|
||||||
|
IoAccessControl:
|
||||||
|
# - FsMountNand
|
||||||
|
# - FsMountNandRoWrite
|
||||||
|
# - FsMountTwln
|
||||||
|
# - FsMountWnand
|
||||||
|
# - FsMountCardSpi
|
||||||
|
# - UseSdif3
|
||||||
|
# - CreateSeed
|
||||||
|
# - UseCardSpi
|
||||||
|
|
||||||
|
IdealProcessor : 0
|
||||||
|
AffinityMask : 1
|
||||||
|
|
||||||
|
Priority : 16
|
||||||
|
|
||||||
|
MaxCpu : 0x9E # Default
|
||||||
|
|
||||||
|
DisableDebug : false
|
||||||
|
EnableForceDebug : false
|
||||||
|
CanWriteSharedPage : true
|
||||||
|
CanUsePrivilegedPriority : false
|
||||||
|
CanUseNonAlphabetAndNumber : true
|
||||||
|
PermitMainFunctionArgument : true
|
||||||
|
CanShareDeviceMemory : true
|
||||||
|
RunnableOnSleep : false
|
||||||
|
SpecialMemoryArrange : true
|
||||||
|
|
||||||
|
CoreVersion : 2
|
||||||
|
DescVersion : 2
|
||||||
|
|
||||||
|
ReleaseKernelMajor : "02"
|
||||||
|
ReleaseKernelMinor : "33"
|
||||||
|
MemoryType : Application # Application / System / Base
|
||||||
|
HandleTableSize: 512
|
||||||
|
IORegisterMapping:
|
||||||
|
- 1ff50000-1ff57fff
|
||||||
|
- 1ff70000-1ff77fff
|
||||||
|
MemoryMapping:
|
||||||
|
- 1f000000-1f5fffff:r
|
||||||
|
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
|
||||||
|
InterruptNumbers:
|
||||||
|
ServiceAccessControl:
|
||||||
|
- APT:U
|
||||||
|
- $hioFIO
|
||||||
|
- $hostio0
|
||||||
|
- $hostio1
|
||||||
|
- ac:u
|
||||||
|
- am:u
|
||||||
|
- boss:U
|
||||||
|
- cam:u
|
||||||
|
- cecd:u
|
||||||
|
- cfg:u
|
||||||
|
- dlp:FKCL
|
||||||
|
- dlp:SRVR
|
||||||
|
- dsp::DSP
|
||||||
|
- frd:u
|
||||||
|
- fs:USER
|
||||||
|
- gsp::Gpu
|
||||||
|
- hid:USER
|
||||||
|
- http:C
|
||||||
|
- mic:u
|
||||||
|
- ndm:u
|
||||||
|
- news:u
|
||||||
|
- nwm::UDS
|
||||||
|
- ptm:u
|
||||||
|
- pxi:dev
|
||||||
|
- soc:U
|
||||||
|
- ssl:C
|
||||||
|
- y2r:u
|
||||||
|
- ldr:ro
|
||||||
|
- ir:USER
|
||||||
|
- ir:u
|
||||||
|
- csnd:SND
|
||||||
|
|
||||||
|
|
||||||
|
SystemControlInfo:
|
||||||
|
SaveDataSize: 0KB # It doesn't use any save data.
|
||||||
|
RemasterVersion: 2
|
||||||
|
StackSize: 0x40000
|
||||||
|
# JumpId: 0
|
||||||
|
Dependency:
|
||||||
|
ac: 0x0004013000002402L
|
||||||
|
am: 0x0004013000001502L
|
||||||
|
boss: 0x0004013000003402L
|
||||||
|
camera: 0x0004013000001602L
|
||||||
|
cecd: 0x0004013000002602L
|
||||||
|
cfg: 0x0004013000001702L
|
||||||
|
codec: 0x0004013000001802L
|
||||||
|
csnd: 0x0004013000002702L
|
||||||
|
dlp: 0x0004013000002802L
|
||||||
|
dsp: 0x0004013000001a02L
|
||||||
|
friends: 0x0004013000003202L
|
||||||
|
gpio: 0x0004013000001b02L
|
||||||
|
gsp: 0x0004013000001c02L
|
||||||
|
hid: 0x0004013000001d02L
|
||||||
|
http: 0x0004013000002902L
|
||||||
|
i2c: 0x0004013000001e02L
|
||||||
|
ir: 0x0004013000003302L
|
||||||
|
mcu: 0x0004013000001f02L
|
||||||
|
mic: 0x0004013000002002L
|
||||||
|
ndm: 0x0004013000002b02L
|
||||||
|
news: 0x0004013000003502L
|
||||||
|
nim: 0x0004013000002c02L
|
||||||
|
nwm: 0x0004013000002d02L
|
||||||
|
pdn: 0x0004013000002102L
|
||||||
|
ps: 0x0004013000003102L
|
||||||
|
ptm: 0x0004013000002202L
|
||||||
|
ro: 0x0004013000003702L
|
||||||
|
socket: 0x0004013000002e02L
|
||||||
|
spi: 0x0004013000002302L
|
||||||
|
ssl: 0x0004013000002f02L
|
@ -27,6 +27,9 @@ EXT=a
|
|||||||
elif [ $PLATFORM = "ctr" ] ; then
|
elif [ $PLATFORM = "ctr" ] ; then
|
||||||
platform=ctr
|
platform=ctr
|
||||||
EXT=a
|
EXT=a
|
||||||
|
mkdir -p ../pkg/3ds/elf
|
||||||
|
mkdir -p ../pkg/3ds/cia
|
||||||
|
mkdir -p ../pkg/3ds/3ds
|
||||||
|
|
||||||
# Emscripten
|
# Emscripten
|
||||||
elif [ $PLATFORM = "emscripten" ] ; then
|
elif [ $PLATFORM = "emscripten" ] ; then
|
||||||
@ -137,6 +140,8 @@ for f in *_${platform}.${EXT} ; do
|
|||||||
make -C ../ -f Makefile.griffin platform=${platform} $whole_archive $big_stack -j3 || exit 1
|
make -C ../ -f Makefile.griffin platform=${platform} $whole_archive $big_stack -j3 || exit 1
|
||||||
elif [ $PLATFORM = "emscripten" ]; then
|
elif [ $PLATFORM = "emscripten" ]; then
|
||||||
make -C ../ -f Makefile.emscripten LTO=$lto -j7 || exit 1
|
make -C ../ -f Makefile.emscripten LTO=$lto -j7 || exit 1
|
||||||
|
elif [ $PLATFORM = "ctr" ]; then
|
||||||
|
make -C ../ -f Makefile.${platform} LIBRETRO=$name $whole_archive $big_stack -j3 || exit 1
|
||||||
else
|
else
|
||||||
make -C ../ -f Makefile.${platform} $whole_archive $big_stack -j3 || exit 1
|
make -C ../ -f Makefile.${platform} $whole_archive $big_stack -j3 || exit 1
|
||||||
fi
|
fi
|
||||||
@ -162,8 +167,11 @@ for f in *_${platform}.${EXT} ; do
|
|||||||
elif [ $PLATFORM = "vita" ] ; then
|
elif [ $PLATFORM = "vita" ] ; then
|
||||||
mv -f ../retroarch_${platform}.velf ../pkg/${platform}/${name}_libretro_${platform}.velf
|
mv -f ../retroarch_${platform}.velf ../pkg/${platform}/${name}_libretro_${platform}.velf
|
||||||
elif [ $PLATFORM = "ctr" ] ; then
|
elif [ $PLATFORM = "ctr" ] ; then
|
||||||
mkdir -p ../pkg/3ds/${name}_libretro
|
mv -f ../retroarch_3ds.cia ../pkg/3ds/cia/${name}_libretro.cia
|
||||||
mv -f ../retroarch_3ds.3dsx ../pkg/3ds/${name}_libretro/${name}_libretro.3dsx
|
mv -f ../retroarch_3ds.elf ../pkg/3ds/elf/${name}_libretro.elf
|
||||||
|
mkdir -p ../pkg/3ds/3ds/${name}_libretro
|
||||||
|
mv -f ../retroarch_3ds.3dsx ../pkg/3ds/3ds/${name}_libretro/${name}_libretro.3dsx
|
||||||
|
mv -f ../retroarch_3ds.smdh ../pkg/3ds/3ds/${name}_libretro/${name}_libretro.smdh
|
||||||
elif [ $PLATFORM = "ngc" ] ; then
|
elif [ $PLATFORM = "ngc" ] ; then
|
||||||
mv -f ../retroarch_${platform}.dol ../pkg/${platform}/${name}_libretro_${platform}.dol
|
mv -f ../retroarch_${platform}.dol ../pkg/${platform}/${name}_libretro_${platform}.dol
|
||||||
elif [ $PLATFORM = "wii" ] ; then
|
elif [ $PLATFORM = "wii" ] ; then
|
||||||
@ -180,7 +188,10 @@ for f in *_${platform}.${EXT} ; do
|
|||||||
elif [ $PLATFORM = "vita" ] ; then
|
elif [ $PLATFORM = "vita" ] ; then
|
||||||
rm -f ../retroarch_${platform}.velf ../retroarch_${platform}.elf
|
rm -f ../retroarch_${platform}.velf ../retroarch_${platform}.elf
|
||||||
elif [ $PLATFORM = "ctr" ] ; then
|
elif [ $PLATFORM = "ctr" ] ; then
|
||||||
rm -f ../retroarch_3ds.elf
|
rm -f ../retroarch_3ds_stripped.elf
|
||||||
|
rm -f ../retroarch_3ds.rsf
|
||||||
|
rm -f ../retroarch_3ds.bnr
|
||||||
|
rm -f ../retroarch_3ds.icn
|
||||||
elif [ $PLATFORM = "ngc" ] ; then
|
elif [ $PLATFORM = "ngc" ] ; then
|
||||||
rm -f ../retroarch_${platform}.dol ../retroarch_${platform}.elf ../retroarch_${platform}.elf.map
|
rm -f ../retroarch_${platform}.dol ../retroarch_${platform}.elf ../retroarch_${platform}.elf.map
|
||||||
elif [ $PLATFORM = "wii" ] ; then
|
elif [ $PLATFORM = "wii" ] ; then
|
||||||
|