Skip to content

Commit f27d923

Browse files
committed
Implemented cheats support for Wii titles
1 parent 5cbb0e8 commit f27d923

28 files changed

+2952
-230
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ discloader/build
88
libGUI/build
99
bootloader/*.o
1010
dolbooter/*.o
11+
codehandler/*.asm
12+
codehandler/*.bin
1113
readROMPatch/*.o
1214
readROMPatch/*.elf.map
1315
readROMPatch/*.elf

.vscode/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
"utility": "cpp",
7070
"__verbose_abort": "cpp",
7171
"charconv": "cpp",
72-
"set": "cpp"
72+
"set": "cpp",
73+
"deque": "cpp",
74+
"stack": "cpp"
7375
}
7476
}

Makefile

+9-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ifeq ($(strip $(DEVKITPPC)),)
44
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
55
endif
66

7-
SUBPROJECTS := dolbooter bootloader installer discloader libGUI main copy
7+
SUBPROJECTS := dolbooter bootloader installer discloader codehandler libGUI main copy
88
.PHONY: all forced clean $(SUBPROJECTS)
99

1010
all: main
@@ -34,13 +34,19 @@ discloader:
3434
@echo " "
3535
$(MAKE) -C discloader
3636

37+
codehandler:
38+
@echo " "
39+
@echo "Building RVLoader codehandler"
40+
@echo " "
41+
$(MAKE) -C codehandler
42+
3743
libGUI:
3844
@echo " "
3945
@echo "Building RVLoader libGUI"
4046
@echo " "
4147
$(MAKE) -C libGUI install
4248

43-
main: dolbooter bootloader installer discloader
49+
main: dolbooter bootloader installer discloader codehandler
4450
@echo " "
4551
@echo "Building RVLoader main"
4652
@echo " "
@@ -62,5 +68,6 @@ clean:
6268
$(MAKE) -C bootloader clean
6369
$(MAKE) -C installer clean
6470
$(MAKE) -C discloader clean
71+
$(MAKE) -C codehandler clean
6572
$(MAKE) -C libGUI clean
6673
$(MAKE) -C main clean

bootloader/bootloader.elf

12 Bytes
Binary file not shown.

codehandler/Makefile

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#---------------------------------------------------------------------------------
2+
.SUFFIXES:
3+
ifeq ($(strip $(DEVKITPPC)),)
4+
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
5+
endif
6+
#---------------------------------------------------------------------------------
7+
TARGET := codehandler.bin codehandleronly.bin
8+
#---------------------------------------------------------------------------------
9+
PREFIX = $(DEVKITPPC)/bin/powerpc-eabi-
10+
11+
AR = $(PREFIX)ar
12+
AS = $(PREFIX)as
13+
CC = $(PREFIX)gcc
14+
CXX = $(PREFIX)g++
15+
LD = $(PREFIX)ld
16+
OBJCOPY = $(PREFIX)objcopy
17+
OBJDUMP = $(PREFIX)objdump
18+
RANLIB = $(PREFIX)ranlib
19+
STRIP = $(PREFIX)strip
20+
#---------------------------------------------------------------------------------
21+
CFLAGS := -nostartfiles -nodefaultlibs -Wl,-Ttext,0x80001900
22+
STRIPFLAGS := --strip-debug --strip-all --discard-all -F elf32-powerpc
23+
OCFLAGS := -I elf32-powerpc -O binary
24+
#---------------------------------------------------------------------------------
25+
.PHONY: all clean
26+
27+
all: $(TARGET)
28+
29+
%.bin : %.s
30+
@echo " COMPILE $<"
31+
@$(CC) $(CFLAGS) -o $@ $<
32+
@$(OBJDUMP) -S $@ > $(@:.bin=.asm)
33+
@echo " STRIP $<"
34+
@$(STRIP) $(STRIPFLAGS) $@
35+
@echo " OBJCOPY $<"
36+
@$(OBJCOPY) $(OCFLAGS) $@
37+
@cp $@ ../driveRoot/rvloader/Hiidra/
38+
clean:
39+
-$(RM) $(TARGET) $(TARGET:.h=.bin)

0 commit comments

Comments
 (0)