mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-08-04 11:17:14 -04:00
3DS: Try to generate CIA file, swap cstick behaviour, double command buffer size
This commit is contained in:
parent
02b068c7dc
commit
84fb814a35
6
.github/workflows/build_3ds.yml
vendored
6
.github/workflows/build_3ds.yml
vendored
@ -26,6 +26,12 @@ jobs:
|
|||||||
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
||||||
|
|
||||||
|
|
||||||
|
- uses: ./.github/actions/upload_build
|
||||||
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
|
with:
|
||||||
|
SOURCE_FILE: 'ClassiCube-3ds.cia'
|
||||||
|
DEST_NAME: 'ClassiCube-3ds.cia'
|
||||||
|
|
||||||
- uses: ./.github/actions/upload_build
|
- uses: ./.github/actions/upload_build
|
||||||
if: ${{ always() && steps.compile.outcome == 'success' }}
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
with:
|
with:
|
||||||
|
@ -28,6 +28,10 @@ BUILD := build-3ds
|
|||||||
SOURCES := src misc/3ds third_party/bearssl/src
|
SOURCES := src misc/3ds third_party/bearssl/src
|
||||||
INCLUDES := third_party/bearssl/inc
|
INCLUDES := third_party/bearssl/inc
|
||||||
|
|
||||||
|
CIA_BANNER_BIN := $(TOPDIR)/misc/3ds/banner.bin
|
||||||
|
CIA_ICON_BIN := $(TOPDIR)/misc/3ds/icon.bin
|
||||||
|
CIA_SPEC_RSF := $(TOPDIR)/misc/3ds/spec.rsf
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
@ -93,7 +97,7 @@ $(BUILD):
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
clean:
|
clean:
|
||||||
echo clean ...
|
echo clean ...
|
||||||
rm -fr $(BUILD) $(TARGET).3dsx $(OUTPUT).smdh $(TARGET).elf
|
rm -fr $(BUILD) $(TARGET).cia $(TARGET).3dsx $(OUTPUT).smdh $(TARGET).elf
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
else
|
else
|
||||||
@ -101,6 +105,14 @@ else
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# main targets
|
# main targets
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
$(OUTPUT).cia : $(OUTPUT).3dsx makerom
|
||||||
|
$(BUILD)/makerom -f cia -o "$(OUTPUT).cia" -elf "$(OUTPUT).elf" -rsf "$(CIA_SPEC_RSF)" -icon "$(CIA_ICON_BIN)" -banner "$(CIA_BANNER_BIN)" -exefslogo -target t
|
||||||
|
|
||||||
|
makerom:
|
||||||
|
wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.18.4/makerom-v0.18.4-ubuntu_x86_64.zip
|
||||||
|
unzip makerom-v0.18.4-ubuntu_x86_64.zip
|
||||||
|
chmod +x makerom
|
||||||
|
|
||||||
$(OUTPUT).3dsx : $(OUTPUT).elf $(OUTPUT).smdh
|
$(OUTPUT).3dsx : $(OUTPUT).elf $(OUTPUT).smdh
|
||||||
|
|
||||||
$(OUTPUT).elf : $(OFILES)
|
$(OUTPUT).elf : $(OFILES)
|
||||||
|
BIN
misc/3ds/audio.wav
Normal file
BIN
misc/3ds/audio.wav
Normal file
Binary file not shown.
BIN
misc/3ds/banner.bin
Normal file
BIN
misc/3ds/banner.bin
Normal file
Binary file not shown.
BIN
misc/3ds/icon.bin
Normal file
BIN
misc/3ds/icon.bin
Normal file
Binary file not shown.
5
misc/3ds/readme.md
Normal file
5
misc/3ds/readme.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Commands used to generate the .bin files:
|
||||||
|
|
||||||
|
`bannertool makebanner -i banner.png -a audio.wav -o banner.bin`
|
||||||
|
|
||||||
|
`bannertool makesmdh -s ClassiCube -l ClassiCube -p UnknownShadow200 -i icon.png -o icon.bin`
|
@ -129,7 +129,7 @@ static void SetDefaultState(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void InitCitro3D(void) {
|
static void InitCitro3D(void) {
|
||||||
C3D_Init(C3D_DEFAULT_CMDBUF_SIZE * 2);
|
C3D_Init(C3D_DEFAULT_CMDBUF_SIZE * 4);
|
||||||
|
|
||||||
topTarget = C3D_RenderTargetCreate(240, 400, GPU_RB_RGBA8, GPU_RB_DEPTH24_STENCIL8);
|
topTarget = C3D_RenderTargetCreate(240, 400, GPU_RB_RGBA8, GPU_RB_DEPTH24_STENCIL8);
|
||||||
C3D_RenderTargetSetOutput(topTarget, GFX_TOP, GFX_LEFT, DISPLAY_TRANSFER_FLAGS);
|
C3D_RenderTargetSetOutput(topTarget, GFX_TOP, GFX_LEFT, DISPLAY_TRANSFER_FLAGS);
|
||||||
|
@ -351,7 +351,6 @@ void Thread_Run(void** handle, Thread_StartFunc func, int stackSize, const char*
|
|||||||
extern int pthread_set_name_np(pthread_t thread, const char* name);
|
extern int pthread_set_name_np(pthread_t thread, const char* name);
|
||||||
pthread_set_name_np(*ptr, name);
|
pthread_set_name_np(*ptr, name);
|
||||||
#elif defined CC_BUILD_NETBSD
|
#elif defined CC_BUILD_NETBSD
|
||||||
extern int pthread_setname_np(pthread_t thread, const char* fmt, const char* arg);
|
|
||||||
pthread_setname_np(*ptr, "%s", name);
|
pthread_setname_np(*ptr, "%s", name);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -112,8 +112,8 @@ static void HandleButtons(u32 mods) {
|
|||||||
#define AXIS_SCALE 8.0f
|
#define AXIS_SCALE 8.0f
|
||||||
static void ProcessCircleInput(int axis, circlePosition* pos, double delta) {
|
static void ProcessCircleInput(int axis, circlePosition* pos, double delta) {
|
||||||
// May not be exactly 0 on actual hardware
|
// May not be exactly 0 on actual hardware
|
||||||
if (Math_AbsI(pos->dx) <= 16) pos->dx = 0;
|
if (Math_AbsI(pos->dx) <= 32) pos->dx = 0;
|
||||||
if (Math_AbsI(pos->dy) <= 16) pos->dy = 0;
|
if (Math_AbsI(pos->dy) <= 32) pos->dy = 0;
|
||||||
|
|
||||||
Gamepad_SetAxis(axis, pos->dx / AXIS_SCALE, -pos->dy / AXIS_SCALE, delta);
|
Gamepad_SetAxis(axis, pos->dx / AXIS_SCALE, -pos->dy / AXIS_SCALE, delta);
|
||||||
}
|
}
|
||||||
@ -145,13 +145,16 @@ void Window_ProcessEvents(double delta) {
|
|||||||
|
|
||||||
circlePosition hid_pos;
|
circlePosition hid_pos;
|
||||||
hidCircleRead(&hid_pos);
|
hidCircleRead(&hid_pos);
|
||||||
ProcessCircleInput(PAD_AXIS_RIGHT, &hid_pos, delta);
|
|
||||||
|
|
||||||
if (irrst_result == 0) {
|
if (irrst_result == 0) {
|
||||||
circlePosition stk_pos;
|
circlePosition stk_pos;
|
||||||
irrstScanInput();
|
irrstScanInput();
|
||||||
irrstCstickRead(&stk_pos);
|
irrstCstickRead(&stk_pos);
|
||||||
ProcessCircleInput(PAD_AXIS_LEFT, &stk_pos, delta);
|
|
||||||
|
ProcessCircleInput(PAD_AXIS_RIGHT, &stk_pos, delta);
|
||||||
|
ProcessCircleInput(PAD_AXIS_LEFT, &hid_pos, delta);
|
||||||
|
} else {
|
||||||
|
ProcessCircleInput(PAD_AXIS_RIGHT, &hid_pos, delta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,9 @@ void Window_Free(void) { }
|
|||||||
static void ApplyIcon(void) {
|
static void ApplyIcon(void) {
|
||||||
Atom net_wm_icon = XInternAtom(win_display, "_NET_WM_ICON", false);
|
Atom net_wm_icon = XInternAtom(win_display, "_NET_WM_ICON", false);
|
||||||
Atom xa_cardinal = XInternAtom(win_display, "CARDINAL", false);
|
Atom xa_cardinal = XInternAtom(win_display, "CARDINAL", false);
|
||||||
XChangeProperty(win_display, win_handle, net_wm_icon, xa_cardinal, 32, PropModeReplace, CCIcon_Data, CCIcon_Size);
|
|
||||||
|
XChangeProperty(win_display, win_handle, net_wm_icon, xa_cardinal, 32, PropModeReplace,
|
||||||
|
(unsigned char*)CCIcon_Data, CCIcon_Size);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void ApplyIcon(void) { }
|
static void ApplyIcon(void) { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user