Port symbols for 4.3E, J and K

This commit is contained in:
koopthekoopa
2024-11-10 13:57:58 +00:00
parent ec611c65fe
commit 5766e10eeb
107 changed files with 71218 additions and 1069 deletions

4
.flake8 Normal file
View File

@@ -0,0 +1,4 @@
[flake8]
# E203: whitespace before ':'
# E501: line too long
extend-ignore = E203,E501

7
.gitattributes vendored
View File

@@ -1,4 +1,5 @@
* text=auto
*.txt text
* text=auto
config/**/*.txt text eol=lf
*.sh text eol=lf
*.json text eol=lf
*.bat text eol=lf

19
.gitignore vendored
View File

@@ -35,6 +35,16 @@
# Exclusive for decomp
ctx.c
*.bat
*.sh
*.sln
*.7z
*.dump
*.idb
*.id0
*.id1
*.id2
*.nam
.private/*
build/*
data/*
@@ -42,9 +52,15 @@ tools/GC/*
tools/Wii/*
tools/src/*
tools/PPC/*
tools/*.exe
tools/*.txt
tools/makesel
tools/ipl2dtk
tools/elf2bs
.vscode/settings.json
*.filters
*.vcxproj
*.user
.DS_Store
*.bat
*.img
*.bin
@@ -56,6 +72,7 @@ tools/*.txt
*.dtk
objdiff.json
*.lnk
*.wad
# Scrapped :(
.web/*

View File

@@ -9,6 +9,7 @@ IPL_OUTFILE = ipl.$(VERSION).app
# Directory defines (must be here)
BUILD_ROOT = build
BUILD_INPUT_ROOT = $(BUILD_ROOT)/inputs
CONFIG_ROOT = config/$(VERSION)
DATA_ROOT = data/$(VERSION)
DATA_OUT_ROOT = $(DATA_ROOT)/build
@@ -41,9 +42,6 @@ EZITEXT_ROOT = $(LIBRARIES_ROOT)/RVLMiddleware/eZiText
TMCJPEG_ROOT = $(LIBRARIES_ROOT)/RVLMiddleware/TMC_JPEG
# Checks
ifneq ($(VERSION),43U)
$(error Only Wii Menu 4.3U is currently supported. Sorry)
endif
ifeq (,$(wildcard $(IPL_INFILE)))
$(error Obtain the Wii Menu's Executable file, place it in this directory and rename it to $(IPL_INFILE))
@@ -64,6 +62,8 @@ all: $(SPLIT_ROOT) $(BUILD_ROOT)/$(IPL_OUTFILE)
# Split
$(SPLIT_ROOT): $(SPLIT_FILE) $(SPLIT_UNITS) $(SPLIT_SYMBOLS)
@echo Splitting IPL executable...
@mkdir -p $(BUILD_INPUT_ROOT)
@$(TOOLS_ROOT)/$(IPL2DTK) $(IPL_INFILE) $(BUILD_INPUT_ROOT)/$(IPL_DTKFILE)
@$(DTK) dol split $(SPLIT_FILE) $(SPLIT_ROOT)
# Link

View File

@@ -5,6 +5,7 @@
This work in progress repository aims to a full 1:1 decompilation of version 4.3 of the Wii Menu.
Currenty supported versions:
- 4.3U (USA)
- 4.3E (Europe)
This repository requires a WAD of the Wii Menu.
@@ -63,23 +64,16 @@ Here are a list of tools that get downloaded when you run `make prepare`:
- Make sure the version on the filename does not include the decimal at the middle (for example `4.3U` should be `43U`)
- Check to make sure the file matches with the [SHA-1 Sums](#sums)!
- You will need to prepare for build. To do that you need to type in:
```
make prepare VERSION=<version>
```
where `<version>` is the chosen version to compile. (If you do not define `VERSION`, it will compile 4.3U by default)
- You are now ready to build! To build you need to type in:
```
make VERSION=<version>
```
- Where `<version>` is the chosen version to compile. (If you do not define `VERSION`, it will compile 4.3U by default)
- The output should be `ipl.<version>.app` in the build folder.
> If you want to compile another version, you will have run `make prepare` again to do so.
## Sums
|File|SHA-1|
|-------------------------------|-----------------------------|
|`ipl.43J.app` (Wii Menu 4.3J)|`c94c8e671854d56fa2abd4c4c886e6c62a2c7f0e`|
|`ipl.43U.app` (Wii Menu 4.3U)|`26116613f624061ba99c8d1a299aaa6efa85670d`|
|`ipl.43E.app` (Wii Menu 4.3E)|`2ebea6ed22473857ed64b12daa71ae2d1ed61708`|

16
config/43E/dtkconfig.yml Normal file
View File

@@ -0,0 +1,16 @@
object: 'build/inputs/base.43E.dtk'
symbols: 'config/43E/symbols.txt'
splits: 'config/43E/splits.txt'
ldscript_template: ldscript_ipl2.lcf
export_all: true
fill_gaps: false
# fix up bss nightmare from the generated dol
block_relocations:
- target: .bss:0x811B1498
end: .bss:0x8132FFFF

11
config/43E/extract.csv Normal file
View File

@@ -0,0 +1,11 @@
ipl_error_eng.bmg,0x30A0E0,0x3E0
ipl_error_fra.bmg,0x30A4C0,0x420
ipl_error_ger.bmg,0x30A8E0,0x460
ipl_error_ita.bmg,0x30AD40,0x460
ipl_error_jpn.bmg,0x30B1A0,0x280
ipl_error_ned.bmg,0x30B420,0x3A0
ipl_error_spa.bmg,0x30B7C0,0x420
ipl_error_kor.bmg,0x30BBE0,0x220
ipl_error_chn.bmg,0x30BE00,0x1C0
fatalDlg.ash,0x30BFC0,0x5A08
backToWiiMenu.arc,0x318FC0,0x2720
1 ipl_error_eng.bmg 0x30A0E0 0x3E0
2 ipl_error_fra.bmg 0x30A4C0 0x420
3 ipl_error_ger.bmg 0x30A8E0 0x460
4 ipl_error_ita.bmg 0x30AD40 0x460
5 ipl_error_jpn.bmg 0x30B1A0 0x280
6 ipl_error_ned.bmg 0x30B420 0x3A0
7 ipl_error_spa.bmg 0x30B7C0 0x420
8 ipl_error_kor.bmg 0x30BBE0 0x220
9 ipl_error_chn.bmg 0x30BE00 0x1C0
10 fatalDlg.ash 0x30BFC0 0x5A08
11 backToWiiMenu.arc 0x318FC0 0x2720

2824
config/43E/splits.txt Normal file

File diff suppressed because it is too large Load Diff

22283
config/43E/symbols.txt Normal file

File diff suppressed because it is too large Load Diff

16
config/43J/dtkconfig.yml Normal file
View File

@@ -0,0 +1,16 @@
object: 'build/inputs/base.43J.dtk'
symbols: 'config/43J/symbols.txt'
splits: 'config/43J/splits.txt'
ldscript_template: ldscript_ipl2.lcf
export_all: true
fill_gaps: false
# fix up bss nightmare from the generated dol
block_relocations:
- target: .bss:0x811C10D8
end: .bss:0x8132FFFF

11
config/43J/extract.csv Normal file
View File

@@ -0,0 +1,11 @@
ipl_error_eng.bmg,0x33A700,0x3E0
ipl_error_fra.bmg,0x33AAE0,0x420
ipl_error_ger.bmg,0x33AF00,0x460
ipl_error_ita.bmg,0x33B360,0x460
ipl_error_jpn.bmg,0x33B7C0,0x280
ipl_error_ned.bmg,0x33BA40,0x3A0
ipl_error_spa.bmg,0x33BDE0,0x420
ipl_error_kor.bmg,0x33C200,0x220
ipl_error_chn.bmg,0x33C420,0x1C0
fatalDlg.ash,0x33C5E0,0x5A08
backToWiiMenu.arc,0x3495E0,0x2720
1 ipl_error_eng.bmg 0x33A700 0x3E0
2 ipl_error_fra.bmg 0x33AAE0 0x420
3 ipl_error_ger.bmg 0x33AF00 0x460
4 ipl_error_ita.bmg 0x33B360 0x460
5 ipl_error_jpn.bmg 0x33B7C0 0x280
6 ipl_error_ned.bmg 0x33BA40 0x3A0
7 ipl_error_spa.bmg 0x33BDE0 0x420
8 ipl_error_kor.bmg 0x33C200 0x220
9 ipl_error_chn.bmg 0x33C420 0x1C0
10 fatalDlg.ash 0x33C5E0 0x5A08
11 backToWiiMenu.arc 0x3495E0 0x2720

18
config/43J/splits.txt Normal file
View File

@@ -0,0 +1,18 @@
Sections:
.bss type:bss align:4
.init type:code align:4
extab type:rodata align:32
extabindex type:rodata align:16
.text type:code align:16
.ctors type:rodata align:4
.dtors type:rodata align:4
.rodata type:rodata align:16
.data type:data align:16
.sdata2 type:rodata align:16
.sbss2 type:bss align:16
.sdata type:data align:16
.sbss type:bss align:16
# Todo!!

22366
config/43J/symbols.txt Normal file

File diff suppressed because it is too large Load Diff

16
config/43K/dtkconfig.yml Normal file
View File

@@ -0,0 +1,16 @@
object: 'build/inputs/base.43K.dtk'
symbols: 'config/43K/symbols.txt'
splits: 'config/43K/splits.txt'
ldscript_template: ldscript_ipl2.lcf
export_all: true
fill_gaps: false
# fix up bss nightmare from the generated dol
block_relocations:
- target: .bss:0x811AF814
end: .bss:0x8132FFFF

11
config/43K/extract.csv Normal file
View File

@@ -0,0 +1,11 @@
ipl_error_eng.bmg,0x2E1F60,0x3E0
ipl_error_fra.bmg,0x2E2340,0x420
ipl_error_ger.bmg,0x2E2760,0x460
ipl_error_ita.bmg,0x2E2BC0,0x460
ipl_error_jpn.bmg,0x2E3020,0x280
ipl_error_ned.bmg,0x2E32A0,0x3A0
ipl_error_spa.bmg,0x2E3640,0x420
ipl_error_kor.bmg,0x2E3A60,0x220
ipl_error_chn.bmg,0x2E3C80,0x1C0
fatalDlg.ash,0x2E3E40,0x2780
backToWiiMenu.arc,0x2EDBC0,0x2720
1 ipl_error_eng.bmg 0x2E1F60 0x3E0
2 ipl_error_fra.bmg 0x2E2340 0x420
3 ipl_error_ger.bmg 0x2E2760 0x460
4 ipl_error_ita.bmg 0x2E2BC0 0x460
5 ipl_error_jpn.bmg 0x2E3020 0x280
6 ipl_error_ned.bmg 0x2E32A0 0x3A0
7 ipl_error_spa.bmg 0x2E3640 0x420
8 ipl_error_kor.bmg 0x2E3A60 0x220
9 ipl_error_chn.bmg 0x2E3C80 0x1C0
10 fatalDlg.ash 0x2E3E40 0x2780
11 backToWiiMenu.arc 0x2EDBC0 0x2720

1
config/43K/sha1.txt Normal file
View File

@@ -0,0 +1 @@
98496cc8467f0749d7605fc175b1911827aa1fd0 build/ipl.43K.app

18
config/43K/splits.txt Normal file
View File

@@ -0,0 +1,18 @@
Sections:
.bss type:bss align:4
.init type:code align:4
extab type:rodata align:32
extabindex type:rodata align:16
.text type:code align:16
.ctors type:rodata align:4
.dtors type:rodata align:4
.rodata type:rodata align:16
.data type:data align:16
.sdata2 type:rodata align:16
.sbss2 type:bss align:16
.sdata type:data align:16
.sbss type:bss align:16
# Todo!!

21835
config/43K/symbols.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
object: 'base.43U.dtk'
object: 'build/inputs/base.43U.dtk'
symbols: 'config/43U/symbols.txt'
splits: 'config/43U/splits.txt'

View File

@@ -1,23 +1,23 @@
Sections:
.bss type:bss align:32
.init type:code align:32
.bss type:bss align:4
.init type:code align:4
extab type:rodata align:32
extabindex type:rodata align:16
.text type:code align:16
.ctors type:rodata align:32
.dtors type:rodata align:16
.rodata type:rodata align:64
.data type:data align:32
.sdata2 type:rodata align:32
.sbss2 type:bss align:32
.sdata type:data align:32
.sbss type:bss align:32
.ctors type:rodata align:4
.dtors type:rodata align:4
.rodata type:rodata align:16
.data type:data align:16
.sdata2 type:rodata align:16
.sbss2 type:bss align:16
.sdata type:data align:16
.sbss type:bss align:16
system/rvl_dec.c:
.bss start:0x81080000 end:0x81089008
.text start:0x81332120 end:0x81332B48
system/enctable_stuff.c:
system/enc_table.c:
.sbss start:0x81698640 end:0x81698680
system/RIPL_BoardRecord.c:
@@ -145,12 +145,13 @@ system/iplDialogWindow.cpp:
.data start:0x81635510 end:0x81635A70
.sdata2 start:0x81694510 end:0x81694540
.sdata start:0x81696130 end:0x81696198
.sbss start:0x816986C0 end:0x816986D8
.sbss start:0x816986C0 end:0x816986D0
system/iplHomeButtonMenu.cpp:
.text start:0x81347AD0 end:0x813483EC
.data start:0x81635A70 end:0x81635A88
.sdata2 start:0x81694540 end:0x81694570
.sbss start:0x816986D0 end:0x816986D8
system/iplNandSDWorker.cpp:
.text start:0x813483EC end:0x81354CD0
@@ -468,7 +469,7 @@ BS2/BS2Reset.c:
.bss start:0x810B38E0 end:0x810B6EE0
.text start:0x8138049C end:0x81380A34
.data start:0x81646EC8 end:0x81646F08
.sdata start:0x816965B0 end:0x816965C0
.sdata start:0x816965B0 end:0x816965B8
BS2/BS2Fatal.c:
.bss start:0x810B6EE0 end:0x810B71C0
@@ -476,6 +477,7 @@ BS2/BS2Fatal.c:
.rodata start:0x8160F628 end:0x8160F650
.data start:0x81646F08 end:0x81647538
.sdata2 start:0x81694788 end:0x816947D0
.sdata start:0x816965B8 end:0x816965C0
.sbss start:0x81698B48 end:0x81698B50
scene/address/iplAddress.cpp:
@@ -583,13 +585,14 @@ scene/channelEdit/iplChanAppBox.cpp:
.text start:0x813A4710 end:0x813A54DC
.rodata start:0x8160FC70 end:0x8160FC80
.data start:0x8164D108 end:0x8164D2E8
.sdata2 start:0x81694900 end:0x81694938
.sdata2 start:0x81694900 end:0x81694910
.sdata start:0x81696848 end:0x81696860
scene/channelEdit/iplChanAppEdit.cpp:
.text start:0x813A54DC end:0x813A6F04
.rodata start:0x8160FC80 end:0x8160FCA8
.data start:0x8164D2E8 end:0x8164D7C0
.sdata2 start:0x81694910 end:0x81694938
.sdata start:0x81696860 end:0x816968A8
scene/channelEdit/iplAnmController.cpp:
@@ -644,7 +647,7 @@ scene/faceSelect/iplFaceSelect.cpp:
.sdata2 start:0x81694A10 end:0x81694A30
.sdata start:0x81696B00 end:0x81696B30
scene/health/iplSkHealth.cpp:
scene/health/iplHealth.cpp:
.text start:0x813BD5D8 end:0x813BE010
.data start:0x8164F8B8 end:0x8164FB08
.sdata start:0x81696B30 end:0x81696B60
@@ -807,44 +810,44 @@ scene/sceneMisc/iplRootScene.cpp:
.text start:0x813DA8E8 end:0x813DAB08
.data start:0x81654038 end:0x81654088
scene/sdChannelMenu/iplSDChannelSelect.cpp:
scene/sdChannelSelect/iplSDChannelSelect.cpp:
.text start:0x813DAB08 end:0x813E2F2C
.rodata start:0x816105C8 end:0x81610608
.data start:0x81654088 end:0x81654B38
.sdata2 start:0x81694AC8 end:0x81694B18
.sdata start:0x81696D80 end:0x81696DD0
scene/sdChannelMenu/iplSDChannelObj.cpp:
scene/sdChannelSelect/iplSDChannelObj.cpp:
.text start:0x813E2F2C end:0x813E4BBC
.rodata start:0x81610608 end:0x81610918
.data start:0x81654B38 end:0x81654F98
.sdata2 start:0x81694B18 end:0x81694B60
.sdata start:0x81696DD0 end:0x81696E40
scene/sdChannelMenu/iplSDChannelTitle.cpp:
scene/sdChannelSelect/iplSDChannelTitle.cpp:
.text start:0x813E4BBC end:0x813E947C
.rodata start:0x81610918 end:0x81610948
.data start:0x81654F98 end:0x81655638
.sdata2 start:0x81694B60 end:0x81694B88
.sdata start:0x81696E40 end:0x81696EF0
scene/sdChannelMenu/iplSDButton.cpp:
scene/sdChannelSelect/iplSDButton.cpp:
.text start:0x813E947C end:0x813EA88C
.data start:0x81655638 end:0x81655A70
.sdata2 start:0x81694B88 end:0x81694BA0
.sdata start:0x81696EF0 end:0x81696F30
scene/sdChannelMenu/iplSDArrow.cpp:
scene/sdChannelSelect/iplSDArrow.cpp:
.text start:0x813EA88C end:0x813EA9BC
.data start:0x81655A70 end:0x81655AC0
scene/sdChannelMenu/iplSDMenuButton.cpp:
scene/sdChannelSelect/iplSDMenuButton.cpp:
.text start:0x813EA9BC end:0x813EB5EC
.data start:0x81655AC0 end:0x81655CA0
.sdata2 start:0x81694BA0 end:0x81694BD0
.sdata start:0x81696F30 end:0x81696F50
scene/sdChannelMenu/iplSDMemory.cpp:
scene/sdChannelSelect/iplSDMemory.cpp:
.text start:0x813EB5EC end:0x813F0774
.data start:0x81655CA0 end:0x816568E8
.sdata2 start:0x81694BD0 end:0x81694C00
@@ -970,6 +973,7 @@ bannerSound/AxAdpcmPlayer.cpp:
.sbss start:0x81698CE0 end:0x81698CF0
bannerSound/BannerSoundPlayer.cpp:
.bss start:0x810C2580 end:0x810C6580
.text start:0x8140E63C end:0x8140EC60
.sdata2 start:0x81694CC0 end:0x81694CD0
.sbss start:0x81698CF0 end:0x81698CF8
@@ -1035,11 +1039,15 @@ keyboard/signwindow.cpp:
.data start:0x8165EAA8 end:0x8165F518
.sdata start:0x81697400 end:0x81697408
keyboard/stringbase.cpp:
.text start:0x81432618 end:0x814339C4
.data start:0x8165F518 end:0x8165F638
keyboard/zistring.cpp:
.bss start:0x810C2580 end:0x810C8270
.text start:0x81432618 end:0x81434FD0
.bss start:0x810C65F0 end:0x810C8270
.text start:0x814339C4 end:0x81434FD0
.rodata start:0x81615E50 end:0x816163B0
.data start:0x8165F518 end:0x8165F780
.data start:0x8165F638 end:0x8165F780
keyboard/textdrawer.cpp:
.bss start:0x810C8270 end:0x810C87F0
@@ -1259,7 +1267,7 @@ channelScript/iplCSSound.cpp:
channelScript/iplCSImage.cpp:
.text start:0x8145EF88 end:0x8145EFD4
libs/RVLMiddleware/eZiText/zi8etx.c:
libs/RVLMiddleware/eZiText/zi8ezt.c:
.text start:0x8145EFD4 end:0x8145F07C
.rodata start:0x816178B0 end:0x81617900
.data start:0x8166AA20 end:0x8166AA58
@@ -2547,33 +2555,268 @@ libs/RVL_SDK/os/OSCache.c:
.text start:0x8152D8F4 end:0x8152DCEC
.data start:0x81672118 end:0x81672350
libs/RVL_SDK/os/OSContext.c:
.text start:0x8152DCEC end:0x8152E6A0
.data start:0x81672350 end:0x81672530
libs/RVL_SDK/os/OSError.c:
.bss start:0x81115230 end:0x81115280
.text start:0x8152E6A0 end:0x8152EDD4
.data start:0x81672530 end:0x81672850
.sdata start:0x81697E48 end:0x81697E50
libs/RVL_SDK/os/OSExec.c:
.text start:0x8152EDD4 end:0x8152FB68
.data start:0x81672850 end:0x81672BA0
.sdata start:0x81697E50 end:0x81697E58
.sbss start:0x81699040 end:0x81699048
libs/RVL_SDK/os/OSFont.c:
.text start:0x8152FB68 end:0x81530884
.data start:0x81672BA0 end:0x816736B0
.sdata2 start:0x816955D0 end:0x816955D8
.sdata start:0x81697E58 end:0x81697E60
.sbss start:0x81699048 end:0x81699058
libs/RVL_SDK/os/OSInterrupt.c:
.text start:0x81530884 end:0x81531008
.data start:0x816736B0 end:0x816736E0
.sbss start:0x81699058 end:0x81699070
libs/RVL_SDK/os/OSLink.c:
.text start:0x81531008 end:0x81531020
libs/RVL_SDK/os/OSMessage.c:
.text start:0x81531020 end:0x815312F4
libs/RVL_SDK/os/OSMemory.c:
.text start:0x815312F4 end:0x81531BD0
.data start:0x816736E0 end:0x816736F0
libs/RVL_SDK/os/OSMutex.c:
.text start:0x81531BD0 end:0x81532160
libs/RVL_SDK/os/OSReset.c:
.text start:0x81532160 end:0x8153267C
.data start:0x816736F0 end:0x81673978
.sdata start:0x81697E60 end:0x81697E68
.sbss start:0x81699070 end:0x81699080
libs/RVL_SDK/os/OSRtc.c:
.bss start:0x81115280 end:0x811152D8
.text start:0x8153267C end:0x81533AB0
libs/RVL_SDK/os/OSSemaphore.c:
.text start:0x81533AB0 end:0x81533BD8
libs/RVL_SDK/os/OSSync.c:
.text start:0x81533BD8 end:0x81533C58
libs/RVL_SDK/os/OSThread.c:
.bss start:0x811152D8 end:0x81115CE0
.text start:0x81533C58 end:0x81535C80
.data start:0x81673978 end:0x81674188
.sdata start:0x81697E68 end:0x81697E70
.sbss start:0x81699080 end:0x81699090
libs/RVL_SDK/os/OSTime.c:
.text start:0x81535C80 end:0x815363CC
.data start:0x81674188 end:0x816741E8
libs/RVL_SDK/os/OSUtf.c:
.text start:0x815363CC end:0x81536604
.data start:0x816741E8 end:0x81680028
libs/RVL_SDK/os/OSIpc.c:
.text start:0x81536604 end:0x8153662C
.sdata start:0x81697E70 end:0x81697E78
.sbss start:0x81699090 end:0x81699098
libs/RVL_SDK/os/OSStateTM.c:
.bss start:0x81115CE0 end:0x81115DA0
.text start:0x8153662C end:0x81536D78
.data start:0x81680028 end:0x816800F0
.sbss start:0x81699098 end:0x816990B8
libs/RVL_SDK/os/time.dolphin.c:
.text start:0x81536D78 end:0x81536DC4
libs/RVL_SDK/os/OSPlayRecord.c:
.bss start:0x81115DA0 end:0x81115FA0
.text start:0x81536DC4 end:0x815376B4
.data start:0x816800F0 end:0x81680138
.sbss start:0x816990B8 end:0x816990D8
libs/RVL_SDK/os/OSStateFlags.c:
.bss start:0x81115FA0 end:0x81115FC0
.text start:0x815376B4 end:0x8153792C
.data start:0x81680138 end:0x81680160
libs/RVL_SDK/os/OSNet.c:
.text start:0x8153792C end:0x815379E8
.data start:0x81680160 end:0x816802C8
libs/RVL_SDK/os/OSNandbootInfo.c:
.text start:0x815379E8 end:0x81537D88
.data start:0x816802C8 end:0x816802E8
libs/RVL_SDK/os/OSPlayTime.c:
.bss start:0x81115FC0 end:0x81115FF0
.text start:0x81537D88 end:0x81538608
.data start:0x816802E8 end:0x81680328
.sdata2 start:0x816955D8 end:0x816955E8
.sdata start:0x81697E78 end:0x81697E88
.sbss start:0x816990D8 end:0x816990F0
libs/RVL_SDK/os/__ppc_eabi_init.cpp:
.init start:0x813301D8 end:0x81330230
.text start:0x81538608 end:0x815386BC
libs/RVL_SDK/exi/EXIBios.c:
.bss start:0x81115FF0 end:0x811160B0
.text start:0x815386BC end:0x8153A154
.data start:0x81680328 end:0x81680370
.sdata start:0x81697E88 end:0x81697E90
.sbss start:0x816990F0 end:0x816990F8
libs/RVL_SDK/exi/EXIUart.c:
.text start:0x8153A154 end:0x8153A488
.sbss start:0x816990F8 end:0x81699108
libs/RVL_SDK/exi/EXICommon.c:
.text start:0x8153A488 end:0x8153A614
.sdata2 start:0x816955E8 end:0x816955F0
libs/RVL_SDK/si/SIBios.c:
.bss start:0x811160B0 end:0x811162D0
.text start:0x8153A614 end:0x8153BB84
.data start:0x81680370 end:0x816803E0
.sdata start:0x81697E90 end:0x81697E98
.sbss start:0x81699108 end:0x81699118
libs/RVL_SDK/si/SISamplingRate.c:
.text start:0x8153BB84 end:0x8153BC64
.data start:0x816803E0 end:0x81680478
.sbss start:0x81699118 end:0x81699120
libs/RVL_SDK/db/db.c:
.text start:0x8153BC64 end:0x8153BD4C
.data start:0x81680478 end:0x81680490
.sbss start:0x81699120 end:0x81699128
libs/RVL_SDK/vi/vi.c:
.bss start:0x811162D0 end:0x81116440
.text start:0x8153BD4C end:0x8153E96C
.data start:0x81680490 end:0x816809E8
.sdata start:0x81697E98 end:0x81697EB8
.sbss start:0x81699128 end:0x816991D8
libs/RVL_SDK/vi/i2c.c:
.text start:0x8153E96C end:0x8153F2F0
.sdata start:0x81697EB8 end:0x81697EC0
.sbss start:0x816991D8 end:0x816991E0
libs/RVL_SDK/vi/vi3in1.c:
.bss start:0x81116440 end:0x81116460
.text start:0x8153F2F0 end:0x81540E30
.data start:0x816809E8 end:0x81680F80
.sdata start:0x81697EC0 end:0x81697ED8
.sbss start:0x816991E0 end:0x816991F8
libs/RVL_SDK/mtx/mtx.c:
.text start:0x81540E30 end:0x815414BC
.sdata2 start:0x816955F0 end:0x816955F8
.sdata start:0x81697ED8 end:0x81697EE0
libs/RVL_SDK/mtx/mtxvec.c:
.text start:0x815414BC end:0x81541510
libs/RVL_SDK/mtx/mtx44.c:
.text start:0x81541510 end:0x81541694
.sdata2 start:0x816955F8 end:0x81695610
libs/RVL_SDK/mtx/vec.c:
.text start:0x81541694 end:0x81541714
.sdata2 start:0x81695610 end:0x81695618
libs/RVL_SDK/gx/GXInit.c:
.bss start:0x81116460 end:0x81116AE0
.text start:0x81541714 end:0x815428E0
.data start:0x81680F80 end:0x816811C0
.sdata2 start:0x81695618 end:0x81695640
.sdata start:0x81697EE0 end:0x81697EE8
.sbss start:0x816991F8 end:0x81699220
libs/RVL_SDK/gx/GXFifo.c:
.bss start:0x81116AE0 end:0x81116B28
.text start:0x815428E0 end:0x8154348C
.data start:0x816811C0 end:0x816811F0
.sbss start:0x81699220 end:0x81699240
libs/RVL_SDK/gx/GXAttr.c:
.text start:0x8154348C end:0x81543F80
.data start:0x816811F0 end:0x81681350
.sdata start:0x81697EE8 end:0x81697EF8
libs/RVL_SDK/gx/GXMisc.c:
.text start:0x81543F80 end:0x8154477C
.sbss start:0x81699240 end:0x81699258
libs/RVL_SDK/gx/GXGeometry.c:
.text start:0x8154477C end:0x81544D3C
libs/RVL_SDK/gx/GXFrameBuf.c:
.text start:0x81544D3C end:0x8154577C
.data start:0x81681350 end:0x81681440
.sdata2 start:0x81695640 end:0x81695650
libs/RVL_SDK/gx/GXLight.c:
.text start:0x8154577C end:0x81545A8C
libs/RVL_SDK/gx/GXTexture.c:
.text start:0x81545A8C end:0x8154694C
.data start:0x81681440 end:0x81681668
.sdata2 start:0x81695650 end:0x81695678
.sdata start:0x81697EF8 end:0x81697F38
libs/RVL_SDK/gx/GXBump.c:
.text start:0x8154694C end:0x81546D98
.sdata2 start:0x81695678 end:0x81695680
libs/RVL_SDK/gx/GXTev.c:
.text start:0x81546D98 end:0x81547418
.data start:0x81681668 end:0x816816E0
libs/RVL_SDK/gx/GXPixel.c:
.text start:0x81547418 end:0x81547A1C
.data start:0x816816E0 end:0x81681700
.sdata2 start:0x81695680 end:0x816956B8
libs/RVL_SDK/gx/GXDisplayList.c:
.bss start:0x81116B28 end:0x81117240
.text start:0x81547A1C end:0x81547BEC
libs/RVL_SDK/gx/GXTransform.c:
.text start:0x81547BEC end:0x81548144
.sdata2 start:0x816956B8 end:0x816956D0
libs/RVL_SDK/gx/GXPerf.c:
.text start:0x81548144 end:0x81548980
.data start:0x81681700 end:0x816817F0
libs/RVL_SDK/dvd/dvdfs.c:
.text start:0x81548980 end:0x815497D4
.data start:0x816817F0 end:0x81681990
.sdata start:0x81697F38 end:0x81697F48
libs/Runtime/__mem.c:
.init start:0x81330230 end:0x81330364
.text start:0x815F8EFC end:0x815F8F18
libs/Runtime/__va_arg.c:
.text start:0x815F8F18 end:0x815F8FE0
libs/Runtime/global_destructor_chain.c:
.text start:0x815F8FE0 end:0x815F9040
.sbss start:0x816997D0 end:0x816997D8
libs/Runtime/NMWException.c:
extab start:0x81330CC8 end:0x81330D08
extabindex start:0x81331CBC end:0x81331CEC
.text start:0x815F9040 end:0x815F9370
libs/Runtime/ptmf.c:
.text start:0x815F9370 end:0x815F9398
libs/Runtime/runtime.c:
.text start:0x815F9398 end:0x815F9D08
.rodata start:0x81632FA0 end:0x81632FB8
libs/Runtime/__init_cpp_exceptions.cpp:
.text start:0x815F9D08 end:0x815F9D78
.ctors start:0x8160D1C0 end:0x8160D1C4

File diff suppressed because it is too large Load Diff

View File

@@ -8,22 +8,22 @@ extern "C" {
#endif
typedef struct BS2UpdateEntry {
// Update metadata
// Update Meta Data
u32 type; // 0x00
u32 attr; // 0x04
u32 size; // 0x08
u32 depend; // 0x0C
char path[0x40]; // 0x10
// Title metadata
// Title Meta Data
u64 titleId; // 0x50
u16 titleVersion; // 0x58
u8 padding[6]; // 0x5A
// Update Data
// Update Data
char dataName[0x40]; // 0x60
char dataInfo[0x160]; // 0xA0
char dataMeta[0x160]; // 0xA0
} BS2UpdateEntry;
int BS2UpdateState();
@@ -36,10 +36,11 @@ BS2UpdateEntry* BS2GetCurrentEntry();
void BS2StartUpdate();
#define BS2_UPDATE_ADDR 0x80400000
#define BS2_UPDATE_LEN 0x00100000
#define BS2_UPDATE_ADDRESS 0x80400000
#define BS2_UPDATE_IMPORT_ADDRESS 0x804C0000
#define BS2_UPDATE_LENGTH 0x00100000
#define BS2_ENTRY_COUNT 0x00040000
#define BS2_ENTRY_COUNT 512
#ifdef __cplusplus
}

View File

@@ -3,7 +3,7 @@
#include "channelScript/CHANSVm.h"
#define VmMagic "RCHE" /* Revolution Channel Script Engine */
#define VmMagic "RCHE" /* Revolution Channel Script Engine? */
#define VmCreateMethod(name) BOOL VmMethod_##name(CHANSVm* pVm, CHANSVmObjHdr* pObj0, CHANSVmObjHdr* pObj1)

View File

@@ -1,18 +1,14 @@
#ifndef IPL_CONFIG_H
#define IPL_CONFIG_H
/**
* @brief Unblocks the Twilight Hack and Bannerbomb exploits.
*/
// #define UNBLOCK_HOMEBREW_EXPLOITS
/**
* @brief Enables OSReport for IPLWWWReport and IPLWWWVReport
* @note Macro unused for now.
*/
/** @brief Enables OSReport for IPL's WWW */
// #define ENABLE_IPL_WWW_REPORT
/**
* @brief Enables OSReport for BS2
* @note Macro unused for now.
*/
// #define ENABLE_BS2_REPORT
#define SYSMENU_TITLE_ID 0x0000000100000002

8
include/iplMath.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef IPL_MATH_H
#define IPL_MATH_H
#include "math/iplMathTypes.h"
#endif // IPL_MATH_H

View File

@@ -9,7 +9,17 @@ namespace ext_ead {
namespace www {
namespace print {
void IPLWWWReport(int type, const char* format, ...);
void IPLWWWVReport(int type, const char* format, __va_list_struct* args);
void IPLWWWVReport(int type, const char* format, va_list args);
// maybe this was defined in the header?
char* Message[] = {
"[TickTimer]",
"[Warning]",
"[Info]",
"[Debug]",
"[[Event]]",
NULL,
};
}
}
}

View File

@@ -23,8 +23,10 @@ namespace ext_ead {
static void* ThreadMain_(void* param);
OSThread mThread; // 0x08
void* mpStack; // 0x320
u32 mStackSize; // 0x324
int mPriority; // 0x328
};
}

View File

@@ -39,7 +39,7 @@ namespace ipl {
/** @brief Bind animation to layout */
void start(int lytId = -1);
/**
* Bind an animation to the layout
* @brief Bind an animation to the layout
* @param fileName The file name of the Layout animation.
*/
void bind(const char* fileName, bool unk = true);
@@ -50,7 +50,7 @@ namespace ipl {
/** @brief Draws the Layout. */
void draw();
/**
* Bind an animation to a specific group from the layout
* @brief Bind an animation to a specific group from the layout
* @param fileName The file name of the Layout animation.
* @param groupName The group name to bind the animation to.
*/

View File

@@ -0,0 +1,34 @@
#ifndef IPL_MATH_TYPES_H
#define IPL_MATH_TYPES_H
#include <revolution.h>
#include <nw4r/math.h>
namespace ipl {
namespace math {
#define IPL_MATH_CLAMP(x, min, max) x < min ? min : (x > max ? max : x)
template<typename T> inline T abs(const T& x) {
return nw4r::math::FAbs(x);
}
typedef struct VEC2 : nw4r::math::VEC2 {
VEC2() {}
VEC2(const f32* pF) { x = pF[0]; y = pF[1]; }
VEC2(f32 fx, f32 fy) { x = fx; y = fy; }
};
typedef struct VEC3 : nw4r::math::VEC3 {
VEC3() {}
VEC3(const f32* pF) { x = pF[0]; y = pF[1]; z = pF[2]; }
VEC3(f32 fx, f32 fy, f32 fz) { x = fx; y = fy; z = fz; }
};
}
}
#endif // IPL_MATH_TYPES_H

View File

@@ -13,6 +13,15 @@ namespace ipl {
/* Onto the next scene `calc` function */
SCENE_DONE,
};
enum {
FADE_STATE_FADE_IN = 0,
FADE_STATE_INIT_NORMAL,
FADE_STATE_NORMAL,
FADE_STATE_INIT_FADE_OUT,
FADE_STATE_FADE_OUT,
FADE_STATE_DONE,
};
SCENE_CLASS(FaderSceneBase) {
public:
@@ -31,6 +40,8 @@ namespace ipl {
virtual SceneReturn calcFadeout() { return SCENE_DONE; } // 0x60
virtual void calcCommonAfter(); // 0x64
int getState() { return mState; }
private:
int mState; // 0x54

View File

@@ -9,7 +9,7 @@ namespace ipl {
public:
SettingBg(EGG::Heap* pHeap, int unk);
virtual ~SettingBg();
virtual void prepare();
virtual void create();
virtual void calc();
@@ -17,10 +17,9 @@ namespace ipl {
private:
int unkID; // 0x54
layout::Object* mpLayout; // 0x58
nand::LayoutFile* mpLayoutFile; // 0x5C
};
}
}

View File

@@ -9,16 +9,16 @@ namespace ipl {
public:
System();
virtual void fn_815F6278(); // 0x08
virtual void calc(); // 0x0C
virtual void fn_815F6278(); // 0x08
virtual void calc(); // 0x0C
void stopAllSound(BOOL unk = FALSE);
void stopBannerSound(BOOL unk = FALSE);
void startSE(const char* sndName);
int startBGM(const char* bgmName);
void stopAllSound(BOOL unk = FALSE);
void stopBannerSound(BOOL unk = FALSE);
void startSE(const char* sndName);
int startBGM(const char* bgmName);
private:
undefined4 unk_0x00[0x638];
undefined4 unk_0x00[0x638];
};
extern System sSystem;

View File

@@ -1,15 +1,55 @@
#ifndef IPL_MESSAGE_ENTRIES
#define IPL_MESSAGE_ENTRIES
#ifndef IPL_MESSAGE_ENTRIES_H
#define IPL_MESSAGE_ENTRIES_H
/* Common text */
/* Play Time Log */
#define MESG_CMN_OK 46
#define MESG_PLAYTIME_TITLE 132
#define MESG_PLAYTIME_TOTAL 135
#define MESG_PLAYTIME_HEADER 136
#define MESG_PLAYTIME_MISC_TITLES 137
#define MESG_PLAYTIME_COLON 138
#define MESG_PLAYTIME_SENT 144
#define MESG_PLAYTIME_AND 145
#define MESG_PLAYTIME_MORE 146
/* Warning text */
/* Warning Handler */
#define MESG_WARN_SAFE_MODE 27
#define MESG_WARN_NAND_FULL 154
#define MESG_WARN_ACCEPT 46
#endif // IPL_MESSAGE_ENTRIES
/* Address */
#define MESG_ADDRESS_WII_ID 66
#define MESG_ADDRESS_CHOOSE 78
/* Friend List Cache (awaiting friends) */
#define MESG_FRIEND_CACHE_TITLE 385
#define MESG_FRIEND_CACHE_BODY 386
/* Channel Edit */
#define MESG_CHAN_EDIT_BLOCKS_OPEN 156
#define MESG_CHAN_EDIT_BLANK 242
/* Channel Select */
#define MESG_CHAN_SEL_SAFE_MODE 27
#define MESG_CHAN_SEL_NAND_FULL 154
/* Error Messages */
#define MESG_ERROR_CODE 400
#define MESG_ERROR_UPD_SERVER 401
#define MESG_ERROR_UPD_INTERNET 402
#define MESG_ERROR_UPD_NAND_FULL 403
#define MESG_ERROR_UPD_UNKNOWN 404
#define MESG_ERROR_NCD_INTERNET 405
#define MESG_ERROR_NCD_NOSETUP 406
#define MESG_ERROR_NCD_INVALID 407
#define MESG_ERROR_NCD_LAN_INVALID 408
#define MESG_ERROR_NCD_WL_INVALID 409
#define MESG_ERROR_NCD_UNKNOWN 410
#endif // IPL_MESSAGE_ENTRIES_H

View File

@@ -1,5 +1,5 @@
#ifndef RIPL_BOARDRECORD_H
#define RIPL_BOARDRECORD_H
#ifndef IPL_MESSAGE_BOARD_H
#define IPL_MESSAGE_BOARD_H
#include <revolution/types.h>
@@ -19,13 +19,13 @@ extern const char* RBRFileType_Odh;
extern const char* RBRFileType_Dat;
extern const char* RBRFileType_Log;
extern u8* RBRGetPicture(u32* pRbrData, s32* dataSize);
extern u8* RBRGetPicture(u32* rbrData, s32* dataSize);
extern void RBRGetPosRect(f32* left, f32* right, f32* top, f32* bottom);
#ifdef __cplusplus
}
#endif
#endif // RIPL_BOARDRECORD_H
#endif // IPL_MESSAGE_BOARD_H

23
include/system/TVRC.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef TV_REMOTE_CONTROL_H
#define TV_REMOTE_CONTROL_H
#include <revolution.h>
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
BOOL TVRCInit(void* pRsrc);
BOOL TVRCSetModelType(int makerID, int typeNo, void* pFileData, int length);
void TVRCSetRepeatTimeout(u32 value);
BOOL TVRCSendStopAsync();
BOOL TVRCIsActive();
BOOL TVRCIsValidCommand(int cmd);
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // TV_REMOTE_CONTROL_H

View File

@@ -19,35 +19,53 @@ namespace ipl {
Manager(EGG::Heap* pHeap);
virtual ~Manager();
int update();
void startUpdate();
/** @brief Initialize Disc Update */
void startUpdate();
/** @brief Start Disc Update */
int update();
u32 getDiskBannerBuffer(void** pBuffer);
/**
* @brief Get buffer length of a game disc's banner.
* @param pBuffer Disc banner data.
*/
u32 getDiskBannerBuffer(void** pBuffer);
void reserveRVLGame();
void reserveGCGame();
void reserveRVLGame();
void reserveGCGame();
void startRVLGame();
void startGCGame();
/** @brief Start Wii Game (same as `startGCGame`) */
void startRVLGame();
/** @brief Start Game Cube Game (same as `startRVLGame`) */
void startGCGame();
void abort();
void restart();
/** @brief Abort Game Disk? */
void abort();
/** @brief Restart Game Disk? */
void restart();
bool checkParentalControl();
/** @brief Wrapper for `BS2CheckParentalControl` */
bool checkParentalControl();
void getDiskInfo(char** diskID, char** diskMaker);
BOOL isTitleAvailable(ESTitleId titleId) const;
s32 getTicketFromNand(ESTitleId titleId, ESTicketView* pTicketView) const;
void loadLockedTitleAsync(ESTitleId titleId, ESTicketView& ticketView);
/**
* @brief Gets the information of the game disc.
* @param diskID Output title ID of disc.
* @param diskMaker Output maker ID of disc.
*/
void getDiskInfo(char** diskID, char** diskMaker);
void splashTick(BS2State state);
void execTick(BS2State state);
void updateTick();
/** @brief Check is disc title is available? */
BOOL isTitleAvailable(ESTitleId titleId) const;
/** @brief Get disc's ticket from NAND? */
s32 getTicketFromNand(ESTitleId titleId, ESTicketView* pTicketView) const;
void loadLockedTitleAsync(ESTitleId titleId, ESTicketView& ticketView);
void bootNewSystem();
void splashTick(BS2State state);
void execTick(BS2State state);
void updateTick();
private:
void bootNewSystem();
u32 unk_0x04;
volatile BS2State mState; // 0x08
bool unk_0x0C;
@@ -57,7 +75,7 @@ namespace ipl {
bool mbIsDiagDisc; // 0x10
bool unk_0x11;
u8* mpBannerBuffer; // 0x14
BOOL mHasBanner; // 0x18
BOOL mbHasBanner; // 0x18
BS2State unk_0x1C;
// For Update

View File

@@ -0,0 +1,16 @@
#ifndef IPL_CHANNEL_MANAGER_H
#define IPL_CHANNEL_MANAGER_H
#include <revolution/es.h>
namespace ipl {
typedef struct {
u32 unk0; // 0x00
u32 unk1; // 0x04
ESTitleId titleId; // 0x08
} ChanEntry;
}
#endif // IPL_CHANNEL_MANAGER_H

View File

@@ -17,7 +17,6 @@ namespace ipl {
virtual void* Run(); // 0x0C
/** @brief Start the Banner RSO Thread. */
void start();
/** @param func The new loop function. */
void setCalcFunc(CalcFunc func);

View File

@@ -8,7 +8,7 @@
#include <egg/core.h>
#include "utility/iplMath.h"
#include "iplMath.h"
namespace ipl {
namespace controller {
@@ -43,13 +43,11 @@ namespace ipl {
virtual int unk_0x54();
/**
* @brief Gets the IR sensor position of the Wii Remote.
*
* @return The IR sensor X and Y as `ipl::math::VEC2`.
*/
virtual math::VEC2 getDpdProjectionPos() const; // 0x58
/**
* @brief Gets the Horizon of the Wii Remote.
*
* @return The Horizon X and Y as `ipl::math::VEC2`.
*/
virtual math::VEC2 getHorizon() const; // 0x5C
@@ -59,7 +57,6 @@ namespace ipl {
virtual int unk_0x6C();
/**
* @brief If the Wii Remote is pointing to the IR sensor bar.
*
* @return Whether it is pointing or not.
*/
virtual bool isValidDpd() const; // 0x70

View File

@@ -13,32 +13,23 @@ namespace ipl {
*/
DialogWindow(EGG::Heap* pHeap);
/**
* @brief Update the Dialog Window.
*/
void calc();
/**
* @brief Draw the Dialog Window.
*/
void draw();
/**
* @brief Create Dialog Window with one button
*
* @brief Create Dialog Window with one button.
* @param messageStringID The Message String ID.
* @param buttonStringID The Button String ID.
*/
void callBtn1(u32 messageStringID, u32 buttonStringID);
/**
* @brief Check if the Dialog is available.
*/
BOOL isActive() { return mActive; }
/** @brief Check if the Dialog is available. */
BOOL isActive() { return mpActive; }
private:
u8 unk_0x00[0x24];
BOOL mActive; // 0x24
BOOL mpActive; // 0x24
u8 unk_0x28[0x73];
};

View File

@@ -47,13 +47,16 @@ namespace ipl {
* @param result The result it thrown.
*/
void log(const char* type, int result, const char* file, int line);
/** @return Whenether the error handler is readty. */
BOOL isReady() { return mbReady; }
private:
void draw();
void check();
void calc();
BOOL mReady; // 0x00
BOOL mbReady; // 0x00
Type mType; // 0x04

View File

@@ -10,8 +10,13 @@
namespace ipl {
class Exception {
public:
/**
* @param pHeap The memory heap used.
* @param rMode Render mode used.
*/
Exception(EGG::Heap* pHeap, const GXRenderModeObj& rMode);
/* @note pretty please, unless you wanna crash the ipl, dont run this . */
void exception_callback(nw4r::db::ConsoleHandle console);
private:

View File

@@ -0,0 +1 @@
// nothing to see here... yet

View File

@@ -28,26 +28,26 @@ namespace ipl {
private:
typedef struct {
u32 signatureMsg; // 0x00 (unused)
u32 signatureBmg; // 0x04 (unused)
u32 size; // 0x08 (unused)
u32 signatureMsg; // 0x00 (unused in IPL)
u32 signatureBmg; // 0x04 (unused in IPL)
u32 size; // 0x08 (unused in IPL)
u32 sectionCount; // 0x0C
u8 encoding; // 0x10 (unused)
u8 padding[15]; // 0x11 (unused)
u8 encoding; // 0x10 (unused in IPL)
u8 padding[15]; // 0x11 (unused in IPL)
} MESGHeader;
typedef struct {
u32 signature; // 0x00
u32 size; // 0x04
u16 msgCount; // 0x08
u16 infoSize; // 0x0A (unused)
u32 padding; // 0x0C (unused)
u16 infoSize; // 0x0A (unused in IPL)
u32 padding; // 0x0C (unused in IPL)
} MESGInfoHeader;
typedef struct {
u32 offset; // 0x00
u32 flags; // 0x04 (unused)
u32 unk; // 0x08 (unused)
u32 flags; // 0x04 (unused in IPL)
u32 unk; // 0x08 (unused in IPL)
} MESGInfoBlock;
typedef struct {
@@ -56,9 +56,9 @@ namespace ipl {
} MESGDataHeader;
MESGInfoHeader* mpInfoHeader; // 0x00
MESGInfoBlock* mpInfoData; // 0x04
MESGInfoBlock* mpInfoData; // 0x04
u8* mspMessageData; // 0x08
u8* mspMessageData; // 0x08
};
}
}

View File

@@ -11,9 +11,7 @@ namespace ipl {
public:
Manager(EGG::Heap* pHeap);
/**
* @return The message data in use.
*/
/** @return The message data in use. */
Message* getMessage() { return mpMessage; }
private:
@@ -24,6 +22,6 @@ namespace ipl {
}
}
#endif // IPL_MESSAGE_H
#endif // IPL_MESSAGE_MANAGER_H

View File

@@ -13,7 +13,7 @@
namespace ipl {
namespace nand {
enum IPLNandResult {
enum NandErrResult {
IPL_NAND_RESULT_NONE = 0,
IPL_NAND_RESULT_SUCCESS,
IPL_NAND_RESULT_VERIFY_ERROR,
@@ -25,7 +25,7 @@ namespace ipl {
Base();
virtual ~Base(); // 0x08
virtual void read() {} // 0x0C
virtual void read() {} // 0x0C
virtual void write(); // 0x10
virtual bool isFinished() { return false; } // 0x14
@@ -46,8 +46,10 @@ namespace ipl {
virtual bool checkData(); // 0x18 (0x06)
virtual bool isFatalError(); // 0x1C (0x07)
u8* getBuffer() { return mpBuffer; }
u32 getLength() { return mpLength; }
u8* getBuffer() { return mpBuffer; }
u32 getLength() { return mpLength; }
bool isFullForTask() { return mbIsFullForTask; }
protected:
virtual BOOL open_(u8 attr); // 0x20 (0x08)
@@ -72,7 +74,7 @@ namespace ipl {
virtual void callback_(); // 0x50 (0x14)
protected:
IPLNandResult calcMD5_(const u8* sum, const u8* buffer, u32 length) const;
NandErrResult calcMD5_(const u8* sum, const u8* buffer, u32 length) const;
BOOL nand_error_handling(int errcode);
@@ -85,14 +87,14 @@ namespace ipl {
int mFileOffset; // 0x94
u32 mpLength; // 0x98
bool mInit; // 0x9C
bool mbInit; // 0x9C
u8 mFilePerms;
u8* mpBuffer; // 0xA0
u8* mpCmpBuffer; // 0xA4
IPLNandResult mResult; // 0xA8
volatile BOOL mDoneTask; // 0xAC
NandErrResult mResult; // 0xA8
volatile BOOL mbDoneTask; // 0xAC
ARCFileInfo mArcFile; // 0xB0
@@ -100,9 +102,9 @@ namespace ipl {
NANDFileInfo mNandFile; // 0xF8
int mLastError; // 0x184
bool mFatalError; // 0x188
bool mIsNandFull; // 0x189
BOOL mIsInNand; // 0x18C
bool mbFatalError; // 0x188
bool mbIsFullForTask; // 0x189
BOOL mbIsNandFile; // 0x18C
};
class LangFile : Base {
@@ -139,7 +141,7 @@ namespace ipl {
/**
* @brief Reads an ASH compressed Layout File.
* @param pHeap The memory heap used for the function.
* @param pHeap The memory heap used.
* @param archiveName The file name of the ASH compressed archive.
* @param unk Unkown boolean.
* @return The Layout File Data as `ipl::nand::LayoutFile`.

View File

@@ -8,7 +8,7 @@
namespace ipl {
namespace nand {
class MetaFile : File {
typedef void (*UnkCallback)(void*);
typedef void (*MetaCallback)(void*);
public:
MetaFile(EGG::Heap* pHeap, const char* fileName, ARCHandle* arc, ESTitleId titleId, int offset, u32 length, UnkCallback callBack, void* callBackWork, int ticketIdx);
@@ -27,8 +27,10 @@ namespace ipl {
private:
BOOL openNandFile_();
BOOL openTicketFile_();
void readNandBlock_(void* bufferOut, int length, int offset);
void readTicketBlock_(void* bufferOut, int length, int offset);
BOOL closeNandFile_();
BOOL closeTicketFile_();
@@ -37,9 +39,9 @@ namespace ipl {
ESTitleId mTitleId; // 0x198
ESTicketView* mTicket; // 0x19C
int mTicketIdx; // 0x1A0
bool mMetaInNand; // 0x1A4
bool mbMetaInNand; // 0x1A4
UnkCallback mCallback; // 0x1A8
MetaCallback mCallback; // 0x1A8
void* mCallbackWork; // 0x1AC
};
}

View File

@@ -15,11 +15,8 @@ namespace ipl {
private:
/**
* @brief Verifies if the banner header is valid.
*
* @param pBnrData The buffer containing the banner data.
* @param hashOut Save the hash of the banner as a `u32`.
*
* @return Boolean telling if the header is valid.
*/
BOOL check_header_base(const u8 *pBnrData, u32 *hashOut);
};

View File

@@ -19,7 +19,6 @@ namespace ipl {
private:
BOOL openTicketFile_();
BOOL closeTicketFile_();
u32 mContentIdx; // 0x190
int mDescriptor; // 0x194

View File

@@ -13,7 +13,6 @@ namespace ipl {
BOOL isNandCapacity();
/**
* @brief Gets the amount of free blocks and free i-nodes(?)
*
* @param freeBlocks The free blocks returned.
* @param freeBlocks The free i-nodes returned.
* @param pStatus The status used.

View File

@@ -23,7 +23,7 @@ namespace ipl {
void init(EGG::Heap* pHeap, int width, int height);
void make_icon();
BOOL created() { return mCreated; }
BOOL created() { return mbCreated; }
u8* mpIconTex; // 0x00
u32 mIconSize; // 0x04
@@ -40,7 +40,7 @@ namespace ipl {
void* mpCallBackWork; // 0x44
undefined4 unk_0x48;
undefined4 unk_0x4C;
bool mCreated; // 0x50
bool mbCreated; // 0x50
friend class Manager;
};

View File

@@ -19,8 +19,8 @@ namespace ipl {
private:
u8 unk_0x00[0xA31];
bool unk_0x0A31;
u8 unk_0x0A32[0x02];
bool unk_0xA31;
u8 unk_0xA32[0x02];
};
}
}

View File

@@ -11,7 +11,7 @@
#include "system/iplNand.h"
#include "system/iplController.h"
#include "utility/iplMath.h"
#include "iplMath.h"
#include "layout/iplLayout.h"
@@ -112,7 +112,7 @@ namespace ipl {
*/
layout::Object* get_layout(int chan, int type);
void setVisible(bool value) { mVisible = value; }
void setVisible(bool value) { mbVisible = value; }
private:
nand::LayoutFile* mpLayoutArchive; // 0x00
@@ -124,8 +124,8 @@ namespace ipl {
f32 mArrowLength; // 0x34
int mPointDirection; // 0x38
bool mScrolling; // 0x3C
bool mVisible; // 0x3D
bool mbScrolling; // 0x3C
bool mbVisible; // 0x3D
u8 unk_0x3E;
u8 unk_0x3F;

View File

@@ -34,12 +34,12 @@ namespace ipl {
* This tells the reset handler to return to the system menu when resetting (calling `OSReturnToMenu()`)
* instead of rebooting the system (calling `OSRebootSystem()`)
*/
void enableResetToMenu(BOOL value) { mToMenu = value; }
void enableResetToMenu(BOOL value) { mbReturnToMenu = value; }
/**
* Returns whether the reset handler to return to the system menu when resetting (calling `OSReturnToMenu()`)
* instead of rebooting the system (calling `OSRebootSystem()`)
*/
BOOL willResetToMenu() { return mToMenu; }
BOOL willResetToMenu() { return mbReturnToMenu; }
private:
static void cbReset();
@@ -52,7 +52,7 @@ namespace ipl {
u32 mState;
u32 mType;
BOOL mToMenu;
BOOL mbReturnToMenu;
u32 mFatalState;
};

View File

@@ -46,11 +46,10 @@ namespace ipl {
EGG::Heap* mpTreasureHeap; // 0x2C
u8 unk_0x30[0x34];
scene::Manager* mpSceneManager; // 0x64
undefined4* unk_0x68;
nigaoe::Manager* mpNigaoeManager; // 0x6C
nand::Manager* mpNandManager; // 0x70
undefined unk_0x74[0x0C];
message::Message* mUnkMsg; // 0x80
nigaoe::Manager* mpNigaoeManager; // 0x68
nand::Manager* mpNandManager; // 0x6C
undefined unk_0x74[0x10];
message::Message* mpMessage; // 0x80
undefined4 unk_0x84;
undefined4 unk_0x88;
nwc24::Manager* mpNwc24Manager; // 0x8C
@@ -65,7 +64,7 @@ namespace ipl {
Pointer* mpPointer; // 0xB0
HomeButtonMenu* mpHomeButton; // 0xB4
undefined4* unk_0xB8;
message::Manager* mpMessage; // 0xBC
message::Manager* mpMesgMgr; // 0xBC
EGG::Thread* mpUnkThread; // 0xC0
EGG::ColorFader* mpFader; // 0xC4
EGG::ColorFader* pResetFader; // 0xC8
@@ -150,8 +149,8 @@ namespace ipl {
static DialogWindow* getDialog() { return smArg.mpDialog; }
/** @return The Pointer object. */
static Pointer* getPointer() { return smArg.mpPointer; }
/** @return The Message object. */
static message::Message* getMessage() { return smArg.mpMessage->getMessage(); }
/** @return The Message Manager object. */
static message::Manager* getMessageManager() { return smArg.mpMesgMgr; }
/** @return something */
static EGG::Thread* getUnkThread() { return smArg.mpUnkThread; }
/** @return The Fader object */
@@ -199,6 +198,7 @@ namespace ipl {
static bool isUnk_0x2BF() { return smArg.unk_0x2BF; }
static void setUnk_0x2BF(bool val) { smArg.unk_0x2BF = val; }
// TODO investigate this madness
/** @return Whether the system resources have loaded */
static bool isRsrcLoaded() { return smArg.mbResLoaded && smArg.mbFontResLoaded && smArg.mbSndResLoaded && smArg.mbDictResLoaded; }
/** @remark This is just another `isRsrcLoaded` */

View File

@@ -1,27 +0,0 @@
#ifndef IPL_MATH_H
#define IPL_MATH_H
#include <revolution.h>
#include <nw4r/math.h>
namespace ipl {
namespace math {
typedef struct VEC2 : nw4r::math::VEC2 {
VEC2() {}
VEC2(const f32* pF) { x = pF[0]; y = pF[1]; }
VEC2(f32 fx, f32 fy) { x = fx; y = fy; }
};
typedef struct VEC3 : nw4r::math::VEC3 {
VEC3() {}
VEC3(const f32* pF) { x = pF[0]; y = pF[1]; z = pF[2]; }
VEC3(f32 fx, f32 fy, f32 fz) { x = fx; y = fy; z = fz; }
};
}
}
#endif // IPL_MATH_H

View File

@@ -24,8 +24,10 @@ namespace ipl {
static void* ThreadMain_(void* param);
OSThread mThread; // 0x08
void* mpStack; // 0x320
u32 mStackSize; // 0x324
int mPriority; // 0x328
};
}

View File

@@ -6,9 +6,7 @@
#include <revolution.h>
#include <revolution/wpad.h>
#include "utility/iplMath.h"
#define UTILITY_CLAMP(x, min, max) x < min ? min : (x > max ? max : x)
#include "iplMath.h"
namespace ipl {
namespace utility {

View File

@@ -3,6 +3,11 @@ A decompilation of NintendoWare for Revolution (NW4R) from the Wii Menu.
This version of NW4R is a bit unique compare to other applications using the library (hence is why it is dubbed the IPL version)
- It seems to be a mix of NW4R 2006 and 2007 or above.
- Every assert message were replaced with the `Error#004` screen.
- Every assert message were replaced with the `Error#004` screen.
The Wii Menu has the following libraries linked:
* Core (db, math, ut)
* Sound (snd)
* Layout (lyt)

View File

@@ -1,4 +1,4 @@
# Revolution Face Library Decompilation
A decompilation of the RVLFaceLib Mii library from the Wii Menu.
A decompilation of the Revolution Face library (RVLFaceLib) from the Wii Menu. Used for Miis.

View File

@@ -1,6 +1,9 @@
# Revolution Middleware
A decompilation of Revolution Middleware (RVL_MWM) Libraries from the Wii Menu.
The Wii Menu has the following middleware linked:
- eZiText (Dictionary Library; for 4.3U and 4.3E only)
- TMC_JPEG (JPEG Library; only contains decoding API)
* **ATOKDict** (JustSystem's Dictionary Library; for 4.3J only)
* **eZiText** (Zi Corporation's Dictionary Library; for 4.3U and 4.3E )
* **TMC_JPEG** (JPEG Library; only for decoding)

View File

@@ -1,4 +1,4 @@
# Techno Mathematical's JPEG Library Decompilation
A decompilation of the TMC JPEG Library from the Wii Menu.
A decompilation of the TMC JPEG Library (TMCC_JPEG) from the Wii Menu.

View File

@@ -1,4 +1,4 @@
# Zi Corporation's eZiText Library Decompilation
A decompilation of the eZiText Dictionary Library from the Wii Menu.
A decompilation of the eZiText Dictionary Library (ZI_EZITEXT) from the Wii Menu.

View File

@@ -6,7 +6,7 @@ ZI8_INC_PATHS = $(COMMON_INCLUDES)
ZI8_CFLAGS = -O4,p -enum int -inline auto -Cpp_exceptions on -proc gekko -fp hardware -RTTI off
ZI8_CCPATH = $(CW_GC_30A52)
ZI8_OBJECTS = $(ZI8_SPLIT_PATH)/zi8etx.o \
ZI8_OBJECTS = $(ZI8_SPLIT_PATH)/zi8ezt.o \
$(ZI8_SPLIT_PATH)/zi8address.o \
$(ZI8_SPLIT_PATH)/zi8convert.o \
$(ZI8_SPLIT_PATH)/zi8letter.o \
@@ -36,10 +36,10 @@ DEPENDENCIES += $(ZI8_OBJECTS:.o=.d)
$(ZI8_OBJ_PATH)/%.o: $(ZI8_SRC_PATH)/%.c
$(call BuildCSources,$(ZI8_CCPATH),$(ZI8_CFLAGS),$(ZI8_INC_PATHS),$(INCLUDE_ROOT))
$(ZI8_BLD_PATH)/zi8clib.a: $(ZI8_OBJECTS)
$(ZI8_BLD_PATH)/zi8_ezitext.a: $(ZI8_OBJECTS)
$(call LinkLibrary,$(ZI8_CCPATH),$^,$@)
eZiText: $(ZI8_BLD_PATH)/zi8clib.a
eZiText: $(ZI8_BLD_PATH)/zi8_ezitext.a
clean_eZiText:
@echo Cleaning eZiText Dictionary...
@rm -rf $(ZI8_BLD_PATH)

View File

@@ -1,8 +1,47 @@
# Revolution SDK Decompilation
A decompilation of the RVL_SDK from the Wii Menu.
A decompilation of the Revolution SDK (RVL_SDK) from the Wii Menu.
Libraries included:
* BASE
* OS
The Wii Menu has the following libraries linked:
* **AI** (Audio Interface Library)
* **ARC** (Archive Library; for reading "U8 files")
* **AX** (Audio Library)
* **AXFX** (Audio Effects Library)
* **BASE** (PowerPC architecture Library)
* **BTE** (BroadCom's Bluetooth Driver Library)
* **CARD** (GameCube Memory Card Library)
* **CNT** (Title Content API Library)
* **CNTCACHE** (SD Title Content Library; for SD Card Menu)
* **CX** (Compression Library)
* **DB** (Debug Library)
* **DSP** (DSP Library)
* **DVD** (DVD Drive Library)
* **ENC** (Character Encoding Library)
* **ES** (Private ES Library)
* **ESP** (Public ES Library)
* **EUART** (Externel Interface Bus UART Library; by Hudson Soft)
* **EXI** (Externel Interface Bus Library)
* **FA** (File Allocation Library; for SD Card. Small left overs for USB support)
* **GX** (Graphics Library)
* **IPC** (IPC Driver and IOS Library)
* **ISFS** (NAND ISFS Library)
* **KBD** (Keyboard Library)
* **KPAD** (High Level Wii Remote Library)
* **KPR** (Key Processor Library)
* **MEM** (Memory Manager Library)
* **MTX** (Matrix and Vector Library)
* **NAND** (NAND Library; Wii System Memory)
* **NUP** (Wii NUS Library)
* **OS** (Operating System Library)
* **PAD** (GameCube Controller Library)
* **RSO** (RSO Module Library)
* **SC** (System Configuration Library)
* **SDI** (SD Card Driver API)
* **SI** (Serial Interface Library)
* **TPL** (Texture Pallete Library)
* **USB** (IUSB I/O API; written by Hudson Soft)
* **VI** (Video Interface Library)
* **WAD** (WAD Package Library)
* **WPAD** (Low Level Wii Remote Library)
* **WUD** (Wireless Driver Library)

View File

@@ -2,6 +2,7 @@
#define REVOLUTION_DVD_H
#include <revolution/types.h>
#include <revolution/os/OSAlarm.h>
#ifdef __cplusplus
extern "C" {

View File

@@ -20,6 +20,7 @@ extern "C" {
#define SC_LANG_SIMP_CHINESE 7
#define SC_LANG_TRAD_CHINESE 8
#define SC_LANG_KOREAN 9
#define SC_LANG_MAX 10
u8 SCGetLanguage();

View File

@@ -0,0 +1,11 @@
DB_OBJECTS = $(SDK_OBJ_PATH)/db/db.o
DEPENDENCIES += $(DB_OBJECTS:.o=.d)
$(SDK_OBJ_PATH)/db/%.o: $(SDK_SRC_PATH)/db/%.c
$(call BuildCSources,$(SDK_CCPATH),$(SDK_CFLAGS),$(SDK_INC_PATHS),$(INCLUDE_ROOT))
$(SDK_BLD_PATH)/db.a: $(DB_OBJECTS)
$(call LinkLibrary,$(SDK_CCPATH),$^,$@)

View File

@@ -0,0 +1,13 @@
EXI_OBJECTS = $(SDK_OBJ_PATH)/exi/EXIBios.o \
$(SDK_OBJ_PATH)/exi/EXIUart.o \
$(SDK_OBJ_PATH)/exi/EXICommon.o
DEPENDENCIES += $(EXI_OBJECTS:.o=.d)
$(SDK_OBJ_PATH)/exi/%.o: $(SDK_SRC_PATH)/exi/%.c
$(call BuildCSources,$(SDK_CCPATH),$(SDK_CFLAGS),$(SDK_INC_PATHS),$(INCLUDE_ROOT))
$(SDK_BLD_PATH)/exi.a: $(EXI_OBJECTS)
$(call LinkLibrary,$(SDK_CCPATH),$^,$@)

View File

@@ -0,0 +1,24 @@
GX_OBJECTS = $(SDK_OBJ_PATH)/gx/GXInit.o \
$(SDK_OBJ_PATH)/gx/GXFifo.o \
$(SDK_OBJ_PATH)/gx/GXAttr.o \
$(SDK_OBJ_PATH)/gx/GXMisc.o \
$(SDK_OBJ_PATH)/gx/GXGeometry.o \
$(SDK_OBJ_PATH)/gx/GXFrameBuf.o \
$(SDK_OBJ_PATH)/gx/GXLight.o \
$(SDK_OBJ_PATH)/gx/GXTexture.o \
$(SDK_OBJ_PATH)/gx/GXBump.o \
$(SDK_OBJ_PATH)/gx/GXTev.o \
$(SDK_OBJ_PATH)/gx/GXPixel.o \
$(SDK_OBJ_PATH)/gx/GXDisplayList.o \
$(SDK_OBJ_PATH)/gx/GXTransform.o \
$(SDK_OBJ_PATH)/gx/GXPerf.o
DEPENDENCIES += $(GX_OBJECTS:.o=.d)
$(SDK_OBJ_PATH)/gx/%.o: $(SDK_SRC_PATH)/gx/%.c
$(call BuildCSources,$(SDK_CCPATH),$(SDK_CFLAGS),$(SDK_INC_PATHS),$(INCLUDE_ROOT))
$(SDK_BLD_PATH)/gx.a: $(GX_OBJECTS)
$(call LinkLibrary,$(SDK_CCPATH),$^,$@)

View File

@@ -0,0 +1,14 @@
MTX_OBJECTS = $(SDK_OBJ_PATH)/mtx/mtx.o \
$(SDK_OBJ_PATH)/mtx/mtxvec.o \
$(SDK_OBJ_PATH)/mtx/mtx44.o \
$(SDK_OBJ_PATH)/mtx/vec.o
DEPENDENCIES += $(MTX_OBJECTS:.o=.d)
$(SDK_OBJ_PATH)/mtx/%.o: $(SDK_SRC_PATH)/mtx/%.c
$(call BuildCSources,$(SDK_CCPATH),$(SDK_CFLAGS),$(SDK_INC_PATHS),$(INCLUDE_ROOT))
$(SDK_BLD_PATH)/mtx.a: $(MTX_OBJECTS)
$(call LinkLibrary,$(SDK_CCPATH),$^,$@)

View File

@@ -1,14 +1,16 @@
OS_OBJECTS = $(SDK_OBJ_PATH)/os/OSAlarm.o \
$(SDK_OBJ_PATH)/os/stubs.o \
$(SDK_OBJ_PATH)/os/__ppc_eabi_init.o
OS_OBJECTS = $(SDK_OBJ_PATH)/os/OSAlarm.o \
$(SDK_OBJ_PATH)/os/stubs.o \
$(SDK_OBJ_PATH)/os/__ppc_eabi_init.o
DEPENDENCIES += $(OS_OBJECTS:.o=.d)
$(SDK_OBJ_PATH)/os/%.o: $(SDK_SRC_PATH)/os/%.c
$(call BuildCSources,$(SDK_CCPATH),$(SDK_CFLAGS),$(SDK_INC_PATHS),$(INCLUDE_ROOT))
$(SDK_OBJ_PATH)/os/%.o: $(SDK_SRC_PATH)/os/%.cpp
$(call BuildCPPSources,$(SDK_CCPATH),$(SDK_CFLAGS),$(SDK_INC_PATHS),$(INCLUDE_ROOT))
$(SDK_BLD_PATH)/os.a: $(OS_OBJECTS)
$(call LinkLibrary,$(SDK_CCPATH),$^,$@)

View File

@@ -0,0 +1,12 @@
SI_OBJECTS = $(SDK_OBJ_PATH)/si/SIBios.o \
$(SDK_OBJ_PATH)/si/SISamplingRate.o
DEPENDENCIES += $(SI_OBJECTS:.o=.d)
$(SDK_OBJ_PATH)/si/%.o: $(SDK_SRC_PATH)/si/%.c
$(call BuildCSources,$(SDK_CCPATH),$(SDK_CFLAGS),$(SDK_INC_PATHS),$(INCLUDE_ROOT))
$(SDK_BLD_PATH)/si.a: $(SI_OBJECTS)
$(call LinkLibrary,$(SDK_CCPATH),$^,$@)

View File

@@ -0,0 +1,13 @@
VI_OBJECTS = $(SDK_OBJ_PATH)/vi/vi.o \
$(SDK_OBJ_PATH)/vi/i2c.o \
$(SDK_OBJ_PATH)/vi/vi3in1.o
DEPENDENCIES += $(VI_OBJECTS:.o=.d)
$(SDK_OBJ_PATH)/vi/%.o: $(SDK_SRC_PATH)/vi/%.c
$(call BuildCSources,$(SDK_CCPATH),$(SDK_CFLAGS),$(SDK_INC_PATHS),$(INCLUDE_ROOT))
$(SDK_BLD_PATH)/vi.a: $(VI_OBJECTS)
$(call LinkLibrary,$(SDK_CCPATH),$^,$@)

View File

@@ -9,9 +9,21 @@ SDK_CFLAGS = -O4,p -ipa file $(COMMON_CCFLAGS)
-include $(REVOLUTION_SDK_ROOT)/$(RULES_ROOT)/RVLSDKLibs/base.mak
-include $(REVOLUTION_SDK_ROOT)/$(RULES_ROOT)/RVLSDKLibs/os.mak
-include $(REVOLUTION_SDK_ROOT)/$(RULES_ROOT)/RVLSDKLibs/exi.mak
-include $(REVOLUTION_SDK_ROOT)/$(RULES_ROOT)/RVLSDKLibs/si.mak
-include $(REVOLUTION_SDK_ROOT)/$(RULES_ROOT)/RVLSDKLibs/db.mak
-include $(REVOLUTION_SDK_ROOT)/$(RULES_ROOT)/RVLSDKLibs/vi.mak
-include $(REVOLUTION_SDK_ROOT)/$(RULES_ROOT)/RVLSDKLibs/mtx.mak
-include $(REVOLUTION_SDK_ROOT)/$(RULES_ROOT)/RVLSDKLibs/gx.mak
RVL_SDK: $(SDK_BLD_PATH)/base.a \
$(SDK_BLD_PATH)/os.a
$(SDK_BLD_PATH)/os.a \
$(SDK_BLD_PATH)/exi.a \
$(SDK_BLD_PATH)/si.a \
$(SDK_BLD_PATH)/db.a \
$(SDK_BLD_PATH)/vi.a \
$(SDK_BLD_PATH)/mtx.a \
$(SDK_BLD_PATH)/gx.a
clean_RVL_SDK:
@echo Cleaning RVL_SDK...

View File

@@ -1,4 +1,15 @@
# Revolution Extension Decompilation
A decompilation of Revolution Extension (RevoEX) from the Wii Menu.
A decompilation of Revolution Extension (RevoEX) from the Wii Menu.
The Wii Menu has the following libraries linked:
* **CDB** (Message Board FileSystem Library)
* **NCD** (Network setting Library)
* **NET** (Basic Network Library)
* **NHTTP** (HTTP Library)
* **NWC24** (WiiConnect24 Library)
* **SO** (Socket Library)
* **SSL** (SSL Library)
* **VF** (Virtual FileSystem Library)
* **WD** (Wireless Driver Library)

View File

@@ -1,4 +1,4 @@
HEALTH_OBJECTS = $(BS2_SPLIT_PATH)/scene/health/iplSkHealth.o
HEALTH_OBJECTS = $(BS2_SPLIT_PATH)/scene/health/iplHealth.o
DEPENDENCIES += $(HEALTH_OBJECTS:.o=.d)

View File

@@ -1,18 +0,0 @@
SD_MENU_OBJS = $(BS2_SPLIT_PATH)/scene/sdChannelMenu/iplSDChannelSelect.o \
$(BS2_SPLIT_PATH)/scene/sdChannelMenu/iplSDChannelObj.o \
$(BS2_SPLIT_PATH)/scene/sdChannelMenu/iplSDChannelTitle.o \
$(BS2_SPLIT_PATH)/scene/sdChannelMenu/iplSDButton.o \
$(BS2_SPLIT_PATH)/scene/sdChannelMenu/iplSDArrow.o \
$(BS2_SPLIT_PATH)/scene/sdChannelMenu/iplSDMenuButton.o \
$(BS2_SPLIT_PATH)/scene/sdChannelMenu/iplSDMemory.o
DEPENDENCIES += $(SD_MENU_OBJS:.o=.d)
$(BS2_OBJ_PATH)/scene/sdChannelMenu/%.o: $(BS2_SRC_PATH)/scene/sdChannelMenu/%.cpp
$(call BuildCPPSources,$(BS2_CMN_CCPATH),$(BS2_CMN_CFLAGS),$(BS2_INC_PATHS),$(INCLUDE_ROOT))
$(BS2_BLD_PATH)/scene/sdChannelMenu.a: $(SD_MENU_OBJS)
$(call LinkLibrary,$(BS2_CMN_CCPATH),$^,$@)

View File

@@ -0,0 +1,18 @@
SD_MENU_OBJS = $(BS2_SPLIT_PATH)/scene/sdChannelSelect/iplSDChannelSelect.o \
$(BS2_SPLIT_PATH)/scene/sdChannelSelect/iplSDChannelObj.o \
$(BS2_SPLIT_PATH)/scene/sdChannelSelect/iplSDChannelTitle.o \
$(BS2_SPLIT_PATH)/scene/sdChannelSelect/iplSDButton.o \
$(BS2_SPLIT_PATH)/scene/sdChannelSelect/iplSDArrow.o \
$(BS2_SPLIT_PATH)/scene/sdChannelSelect/iplSDMenuButton.o \
$(BS2_SPLIT_PATH)/scene/sdChannelSelect/iplSDMemory.o
DEPENDENCIES += $(SD_MENU_OBJS:.o=.d)
$(BS2_OBJ_PATH)/scene/sdChannelSelect/%.o: $(BS2_SRC_PATH)/scene/sdChannelSelect/%.cpp
$(call BuildCPPSources,$(BS2_CMN_CCPATH),$(BS2_CMN_CFLAGS),$(BS2_INC_PATHS),$(INCLUDE_ROOT))
$(BS2_BLD_PATH)/scene/sdChannelSelect.a: $(SD_MENU_OBJS)
$(call LinkLibrary,$(BS2_CMN_CCPATH),$^,$@)

View File

@@ -1,4 +1,4 @@
SYSTEM_OBJECTS = $(BS2_SPLIT_PATH)/system/enctable_stuff.o \
SYSTEM_OBJECTS = $(BS2_SPLIT_PATH)/system/enc_table.o \
$(BS2_SPLIT_PATH)/system/rvl_dec.o \
$(BS2_OBJ_PATH)/system/RIPL_BoardRecord.o \
$(BS2_SPLIT_PATH)/system/iplSystem.o \

View File

@@ -46,7 +46,7 @@ BS2_CMN_CCPATH = $(CW_GC_30A52)
-include $(RULES_ROOT)/BS2Libs/scene/nakamuraTest.mak
-include $(RULES_ROOT)/BS2Libs/scene/parentalDialog.mak
-include $(RULES_ROOT)/BS2Libs/scene/sceneMisc.mak
-include $(RULES_ROOT)/BS2Libs/scene/sdChannelMenu.mak
-include $(RULES_ROOT)/BS2Libs/scene/sdChannelSelect.mak
-include $(RULES_ROOT)/BS2Libs/scene/setting.mak
-include $(RULES_ROOT)/BS2Libs/scene/sceneSystem.mak
-include $(RULES_ROOT)/BS2Libs/scene/textWriter.mak
@@ -79,14 +79,14 @@ BS2_ELF_LIBRARIES = $(BS2_BLD_PATH)/system.a \
$(BS2_BLD_PATH)/scene/nakamuraTest.a \
$(BS2_BLD_PATH)/scene/parentalDialog.a \
$(BS2_BLD_PATH)/scene/sceneMisc.a \
$(BS2_BLD_PATH)/scene/sdChannelMenu.a \
$(BS2_BLD_PATH)/scene/setting.a \
$(BS2_BLD_PATH)/scene/sdChannelSelect.a \
$(BS2_BLD_PATH)/scene/sceneSystem.a \
$(BS2_BLD_PATH)/scene/setting.a \
$(BS2_BLD_PATH)/scene/textWriter.a \
$(BS2_BLD_PATH)/bannerSound.a \
$(BS2_BLD_PATH)/keyboard.a \
$(BS2_BLD_PATH)/channelScript.a \
$(EZITEXT_ROOT)/$(BUILD_ROOT)/zi8clib.a \
$(EZITEXT_ROOT)/$(BUILD_ROOT)/zi8_ezitext.a \
$(REVOLUTION_EXT_ROOT)/$(BUILD_ROOT)/cdb.a \
$(REVOLUTION_EXT_ROOT)/$(BUILD_ROOT)/ncd.a \
$(REVOLUTION_EXT_ROOT)/$(BUILD_ROOT)/net.a \

View File

@@ -47,20 +47,12 @@ DownloadTools: $(TOOLS_ROOT)/GC $(PPC_ROOT) $(WIBO) $(DTK)
# Extract data
$(DATA_ROOT): $(CONFIG_ROOT)/extract.txt
$(DATA_ROOT): $(CONFIG_ROOT)/extract.csv
@echo Extracting Data...
@$(PY) $(TOOLS_ROOT)/$(EXTRACT_DATA) -i $< -o $(DATA_ROOT) -ib $(IPL_INFILE) -oc $(OBJCOPY)
# Convert to DTK compatible DOL file
$(IPL_DTKFILE): $(TOOLS_ROOT)/$(IPL2DTK) $(IPL_INFILE)
@echo Prepare executable for splitting...
@$(TOOLS_ROOT)/$(IPL2DTK) $(IPL_INFILE) $(IPL_DTKFILE)
# Prepare
PrepareDecomp: $(TOOLS) DownloadTools $(DATA_ROOT) $(IPL_DTKFILE)
@echo Prepared for Building!
PrepareDecomp: $(TOOLS) DownloadTools $(DATA_ROOT)

9
src/BS2/BS2Update.c Normal file
View File

@@ -0,0 +1,9 @@
#include "BS2/BS2Update.h"
#include "BS2/BS2.h"
#include <revolution.h>
static BS2UpdateEntry Entries[BS2_ENTRY_COUNT] : BS2_UPDATE_ADDRESS;
static BS2UpdateEntry EntriesToImport[BS2_ENTRY_COUNT] : BS2_UPDATE_IMPORT_ADDRESS;

View File

@@ -1,10 +1,14 @@
#include "iplwww/www_print.h"
#include <config.h>
#include "config.h"
#include <stdio.h>
namespace ext_ead {
namespace www {
namespace print {
#define WWW_REPORT_LENGTH 1022
/**
* @note Address: 0x8136E894
* @note Size: 0x68
@@ -14,7 +18,9 @@ namespace ext_ead {
va_list args;
va_start(args, format);
// stub
#ifdef ENABLE_IPL_WWW_REPORT
IPLWWWVReport(type, format, args);
#endif // ENABLE_IPL_WWW_REPORT
va_end(args);
}
@@ -23,8 +29,16 @@ namespace ext_ead {
* @note Size: 0x4
* @note Was stubbed out for release
*/
void IPLWWWVReport(int type, const char* format, __va_list_struct* args) {
// stub
void IPLWWWVReport(int type, const char* format, va_list args) {
#ifdef ENABLE_IPL_WWW_REPORT
char str[WWW_REPORT_LENGTH + 2];
vsnprintf(str, WWW_REPORT_LENGTH, format, args);
str[WWW_REPORT_LENGTH + 1] = str[WWW_REPORT_LENGTH] = 0;
OSReport("[%s] %s", Message, str);
#endif // ENABLE_IPL_WWW_REPORT
}
}
}

View File

@@ -1,6 +1,6 @@
#define UNIT_DOESNT_MATCH
#include "scene/health/iplSkHealth.h"
#include "scene/health/iplHealth.h"
#include <revolution/os.h>
#include <revolution/sc.h>
@@ -287,7 +287,7 @@ namespace ipl {
}
if (finish_safe_mode_check()) {
if (System::getMasterController()->downTrg(0x500C00)
if (System::getMasterController()->downTrg(((WPAD_BUTTON_CL_A | WPAD_BUTTON_CL_B) * 0x10000 /* ? */) | WPAD_BUTTON_B | WPAD_BUTTON_A)
|| mWpadMask != newWpadMask
|| OSTicksToMilliseconds(OSDiffTick(OSGetTick(), mPushTick)) > 60000
|| mbDoneSafeMode) {

View File

@@ -2,64 +2,55 @@
namespace ipl {
namespace scene {
enum {
STATE_FADE_IN = 0,
STATE_INIT_NORMAL,
STATE_NORMAL,
STATE_INIT_FADE_OUT,
STATE_FADE_OUT,
STATE_DONE,
};
/**
* @note Address: 0x8140B208 (4.3U)
* @note Size: 0x4C
*/
FaderSceneBase::FaderSceneBase(EGG::Heap* pHeap) :
Base(pHeap),
mState(STATE_FADE_IN) {}
mState(FADE_STATE_FADE_IN) {}
/**
* @note Address: 0x8140B254 (4.3U)
* @note Size: 0x14C
*/
void FaderSceneBase::calc() {
if (mState != STATE_DONE) {
if (mState != FADE_STATE_DONE) {
calcCommon();
}
switch(mState) {
case STATE_FADE_IN: {
case FADE_STATE_FADE_IN: {
if (calcFadein() != SCENE_CONTINUE) {
mState = STATE_INIT_NORMAL;
mState = FADE_STATE_INIT_NORMAL;
}
break;
}
case STATE_INIT_NORMAL: {
case FADE_STATE_INIT_NORMAL: {
initCalcNormal();
mState = STATE_NORMAL;
mState = FADE_STATE_NORMAL;
}
case STATE_NORMAL: {
case FADE_STATE_NORMAL: {
if (calcNormal() != SCENE_CONTINUE) {
mState = STATE_INIT_FADE_OUT;
mState = FADE_STATE_INIT_FADE_OUT;
}
break;
}
case STATE_INIT_FADE_OUT: {
case FADE_STATE_INIT_FADE_OUT: {
initCalcFadeout();
mState = STATE_FADE_OUT;
mState = FADE_STATE_FADE_OUT;
}
case STATE_FADE_OUT: {
case FADE_STATE_FADE_OUT: {
if (calcFadeout() != SCENE_CONTINUE) {
u32 result = unk_0x2C | 2;
mState = STATE_DONE;
mState = FADE_STATE_DONE;
unk_0x2C = result;
}
break;
}
}
if (mState != STATE_DONE) {
if (mState != FADE_STATE_DONE) {
calcCommonAfter();
}
}

View File

@@ -16,28 +16,28 @@ const char* RBRFileType_Log = "log";
* @note Address: 0x813321E8 (4.3J)
* @note Size: 0x98
*/
u8* RBRGetPicture(u32* pRbrData, s32* dataSize) {
u8* pPictureData = NULL;
u8* RBRGetPicture(u32* rbrData, s32* dataSize) {
u8* picData = NULL;
if (pRbrData[0] == RBR_SIGNATURE && pRbrData[(RBR_HEADER_SIZE / sizeof(pRbrData[0]))] == NETCalcCRC32(pRbrData, RBR_HEADER_SIZE)) {
if (rbrData[0] == RBR_SIGNATURE && rbrData[(RBR_HEADER_SIZE / sizeof(rbrData[0]))] == NETCalcCRC32(rbrData, RBR_HEADER_SIZE)) {
u32 index = 0;
u32 count = 2;
while(count--) {
RBRSomeData* pData = (RBRSomeData*)&pRbrData[index];
RBRSomeData* data = (RBRSomeData*)&rbrData[index];
if (pData->type == RBR_IMAGE_TYPE) {
pPictureData = (u8*)pRbrData + pData->dataOffset;
*dataSize = pData->dataSize;
if (data->type == RBR_IMAGE_TYPE) {
picData = (u8*)rbrData + data->dataOffset;
*dataSize = data->dataSize;
break;
}
index += 3;
};
}
return pPictureData;
return picData;
}
/**
@@ -49,15 +49,12 @@ void RBRGetPosRect(f32* left, f32* right, f32* top, f32* bottom) {
if (left != NULL) {
*left = -230;
}
if (right != NULL) {
*right = 230;
}
if (top != NULL) {
*top = 180;
}
if (bottom != NULL) {
*bottom = -80;
}

151
src/system/TVRC.cpp Normal file
View File

@@ -0,0 +1,151 @@
#include "system/TVRC.h"
#include <decomp.h>
#include <revolution/wpad.h>
#include <revolution/arc.h>
#include <cstdio>
#include <cstring>
namespace LibTVRC {
const char* TVRC_FILE_HEADER = "TVR0";
u32 __tienHoseiNsec = 1100;
u32 _limitMilli = 400;
ARCHandle _database ALIGN32;
OSAlarm _alarm;
BOOL _isRepeatActive;
BOOL _isUseRepeatCode;
u32 _lastError;
void* _tvrcFile;
undefined4 _Hz;
undefined4 _onTimeRatio;
int _makerID;
int _typeNo;
BOOL _isUseCustomParams;
BOOL _isInitialized;
BOOL _isActive;
BOOL _isReserveDeactive;
OSTime _unitStartTime;
OSTime _unitLastTime;
OSTime _totalStartTime;
BOOL _isOnOff;
BOOL _isLastOnOff;
int _ctCombo;
int _func0state;
int _loop0count;
int _func1state;
u32 _bitLength;
u32 _bitArray;
u32 _repeatBitLength;
u32 _repeatBitArray;
OSTime _tickT;
OSTime _tickWait[2];
}
using namespace LibTVRC;
BOOL TVRCInit(void* pRsrc) {
if (_isInitialized) {
_lastError = 0;
return FALSE;
}
if (ARCInitHandle(pRsrc, &_database) == FALSE) {
_lastError = 4;
return FALSE;
}
_makerID = -1;
_typeNo = 0;
OSCreateAlarm(&_alarm);
_isInitialized = TRUE;
WPADSetSensorBarPower(TRUE);
return FALSE;
}
BOOL TVRCSetModelType(int makerID, int typeNo, void* pFileData, int length) {
ARCDir dir;
ARCDirEntry dirEntry;
char dirName[16];
ARCFileInfo file;
int fileLen;
if (_isInitialized == FALSE || _database.archiveStartAddr == NULL) {
return FALSE;
}
if (*(u32*)_database.archiveStartAddr != ARC_MAGIC) {
return FALSE;
}
if (makerID == _makerID && typeNo == _typeNo) {
return TRUE;
}
sprintf(dirName, "/%04d", makerID);
if (ARCOpenDir(&_database, dirName, &dir) == FALSE) {
_lastError = 6;
return FALSE;
}
for (; typeNo != 0; typeNo--) {
if (ARCReadDir(&dir, &dirEntry) == FALSE) {
break;
}
}
ARCCloseDir(&dir);
if (ARCFastOpen(&_database, dirEntry.entryNum, &file) == FALSE) {
_lastError = 6;
return FALSE;
}
fileLen = ARCGetLength(&file);
if (fileLen > length) {
_lastError = 7;
return FALSE;
}
memcpy(pFileData, ARCGetStartAddrInMem(&file), fileLen);
_tvrcFile = pFileData;
_makerID = makerID;
_typeNo = typeNo;
_database.archiveStartAddr = NULL;
return TRUE;
}
void TVRCSetRepeatTimeout(u32 value) {
_limitMilli = value;
}
BOOL TVRCSendStopAsync() {
if (!_isInitialized || !_isActive) {
return FALSE;
}
else {
_isReserveDeactive = TRUE;
return TRUE;
}
}
BOOL TVRCIsActive() {
return _isActive;
}

View File

@@ -24,7 +24,7 @@ namespace ipl {
unk_0x0F(false),
mbIsDiagDisc(false),
unk_0x11(false),
mHasBanner(FALSE),
mbHasBanner(FALSE),
unk_0x1C(BS2_STATE_52),
mbStartUpdate(false),
mEntries(NULL),
@@ -233,7 +233,7 @@ namespace ipl {
break;
}
case BS2_RUN_APP: {
mHasBanner = BS2IsBannerAvailable();
mbHasBanner = BS2IsBannerAvailable();
unk_0x04 = 5;
if (BS2IsDiagDisc()) {
mbIsDiagDisc = true;
@@ -245,7 +245,7 @@ namespace ipl {
break;
}
case BS2_STATE_69: {
mHasBanner = BS2IsBannerAvailable();
mbHasBanner = BS2IsBannerAvailable();
unk_0x1C = BS2_STATE_69;
unk_0x04 = 5;
break;

View File

@@ -31,11 +31,10 @@ namespace ipl {
* @note Size: 0xBC
*/
ErrorHandler::ErrorHandler(EGG::Heap* pHeap) :
mReady(FALSE),
mbReady(FALSE),
mType(NONE),
mMessageID(MESG_ERR_GENERIC),
mpArcData(NULL) {
// Decompress the archive file.
mArcSize = Rvl_decode_ash_size(fatalDlg_ash);
mpArcData = new(pHeap, BUFFER_HEAP) u8[mArcSize];
@@ -57,7 +56,7 @@ namespace ipl {
mType = type;
mMessageID = msgId;
// Debug related?
// Debug related? (never used when calling this function and seems to be incomplete)
unk_0x0C = arg2;
unk_0x10 = arg3;
if (arg1) {
@@ -150,12 +149,12 @@ namespace ipl {
* @note Size: 0x90
*/
void ErrorHandler::calc() {
if (mReady == FALSE && System::getFader()->getStatus() == EGG::Fader::STATUS_PREPARE_IN) {
if (mbReady == FALSE && System::getFader()->getStatus() == EGG::Fader::STATUS_PREPARE_IN) {
System::getFader()->fadeIn();
mReady = TRUE;
mbReady = TRUE;
}
if (mReady == TRUE) {
if (mbReady == TRUE) {
mpLayout->calc();
}
}
@@ -165,7 +164,7 @@ namespace ipl {
* @note Size: 0x44
*/
void ErrorHandler::draw() {
if (mReady == TRUE) {
if (mbReady == TRUE) {
utility::Graphics::setDefaultOrtho();
mpLayout->draw();
}

View File

@@ -37,7 +37,7 @@ namespace ipl {
mConsole = NULL;
unk_0x04 = 0;
mpBuffer = NULL;
unk_0x0C = 0;
unk_0x0C = *(sKeyInputs);
nw4r::db::Exception_Init();
nw4r::db::DirectPrint_Init();

View File

@@ -32,12 +32,12 @@ namespace ipl {
#define CURRENT_SECTION ((MESGDataHeader*)(msgData))
switch (CURRENT_SECTION->signature) {
case 'INF1': { // The information section
case 'INF1': { // Meta Data section
mpInfoHeader = (MESGInfoHeader*)(msgData);
mpInfoData = (MESGInfoBlock*)(msgData + sizeof(MESGInfoHeader));
break;
}
case 'DAT1': { // The data section
case 'DAT1': { // Data section
mspMessageData = (u8*)(msgData + sizeof(MESGDataHeader));
break;
}
@@ -55,8 +55,9 @@ namespace ipl {
* @note Size: 0x18
*/
wchar_t* Message::getMessage(u32 id) const {
u32 addr = (&mpInfoData->offset)[(u16)id];
return (wchar_t*)(mspMessageData + addr);
// Get data from offset
u32 off = (&mpInfoData->offset)[(u16)id];
return (wchar_t*)(mspMessageData + off);
}
}
}

View File

@@ -53,7 +53,9 @@ namespace ipl {
mpMessage->setResource(System::getChnMsg()->getBuffer());
break;
}
// Traditional chinese is unused?
case SC_LANG_KOREAN: {
mpMessage->setResource(System::getKorMsg()->getBuffer());
break;

View File

@@ -4,8 +4,8 @@
#include "config.h"
#include "system/iplSystem.h"
#include "system/rvl_dec.h"
#include "system/iplSystem.h"
#include "system/iplErrorHandler.h"
#include "system/iplNandWall.h"
#include "system/iplNandWrapper.h"
@@ -48,21 +48,21 @@ namespace ipl {
* @note Size: 0xC0
*/
// https://decomp.me/scratch/fOAdi
File::File(EGG::Heap* pHeap, const char* fileName, ARCHandle* arc, const char* unk2, int offset, u32 length, bool isInNand) : Base() {
File::File(EGG::Heap* pHeap, const char* fileName, ARCHandle* arc, const char* unk2, int offset, u32 length, bool isNandFile) : Base() {
mDoneTask = FALSE;
mLastError = NAND_RESULT_OK;
mpHeap = pHeap;
mpArc = arc;
mFileOffset = offset;
mpLength = length;
mInit = true;
mbInit = true;
mFilePerms = NAND_ACCESS_NONE;
mpBuffer = NULL;
mpCmpBuffer = NULL;
mResult = IPL_NAND_RESULT_NONE;
mFatalError = false;
mIsNandFull = false;
mIsInNand = isInNand;
mbFatalError = false;
mbIsFullForTask = false;
mbIsNandFile = isNandFile;
strncpy(msFileName, fileName, NAND_MAX_PATH + 1);
if (unk2) {
@@ -83,14 +83,14 @@ namespace ipl {
mpArc = NULL;
mFileOffset = 0;
mpLength = length;
mInit = true;
mbInit = true;
mFilePerms = perms;
mpBuffer = buffer;
mpCmpBuffer = NULL;
mResult = IPL_NAND_RESULT_NONE;
mFatalError = false;
mIsNandFull = false;
mIsInNand = TRUE;
mbFatalError = false;
mbIsFullForTask = false;
mbIsNandFile = TRUE;
strncpy(msFileName, fileName, NAND_MAX_PATH + 1);
@@ -105,7 +105,7 @@ namespace ipl {
* @note Size: 0x78
*/
File::~File() {
if (mInit == true && mpBuffer) {
if (mbInit == true && mpBuffer) {
delete[] mpBuffer;
}
}
@@ -118,7 +118,7 @@ namespace ipl {
ARCHandle* handle;
if (mpArc) {
if (mIsInNand) {
if (mbIsNandFile) {
// This part seems to be never used.
s32 result = wrapper::PrivateOpen(msUnkFileName, &mNandFile, attr);
if (nand_error_handling(result) == FALSE) {
@@ -128,7 +128,7 @@ namespace ipl {
return ARCOpen(mpArc, msFileName, &mArcFile) == TRUE;
}
else {
if (mIsInNand) {
if (mbIsNandFile) {
s32 result = wrapper::PrivateOpen(msFileName, &mNandFile, attr);
return nand_error_handling(result);
}
@@ -156,7 +156,7 @@ namespace ipl {
if (mpArc) {
arcOffset = ARCGetStartOffset(&mArcFile);
if (mIsInNand) {
if (mbIsNandFile) {
result = wrapper::Seek(&mNandFile, mFileOffset + arcOffset + offset, 0);
nand_error_handling(result);
@@ -165,7 +165,7 @@ namespace ipl {
}
}
else {
if (mIsInNand) {
if (mbIsNandFile) {
result = wrapper::Seek(&mNandFile, mFileOffset + offset, 0);
nand_error_handling(result);
@@ -220,7 +220,7 @@ namespace ipl {
length = ARCGetLength(&mArcFile);
}
else {
if (mIsInNand) {
if (mbIsNandFile) {
s32 result = wrapper::GetLength(&mNandFile, &length);
nand_error_handling(result);
}
@@ -407,7 +407,7 @@ namespace ipl {
* @note Address: 0x8133BE64 (4.3U)
* @note Size: 0x90
*/
IPLNandResult File::calcMD5_(const u8* sum, const u8* buffer, u32 length) const {
NandErrResult File::calcMD5_(const u8* sum, const u8* buffer, u32 length) const {
u8 calcSum[NET_MD5_DIGEST_SIZE];
NETCalcMD5(calcSum, buffer, length);
@@ -429,7 +429,7 @@ namespace ipl {
s32 result;
if (mpArc) {
if (mIsInNand) {
if (mbIsNandFile) {
result = wrapper::Close(&mNandFile);
return nand_error_handling(result);
}
@@ -438,7 +438,7 @@ namespace ipl {
}
}
else {
if (mIsInNand) {
if (mbIsNandFile) {
result = wrapper::Close(&mNandFile);
return nand_error_handling(result);
}
@@ -460,7 +460,7 @@ namespace ipl {
* @note Address: 0x8133BFB0 (4.3U)
* @note Size: 0x194
*/
LangFile::LangFile(EGG::Heap* pHeap, const char* dirName, const char* fileName, ARCHandle* arc, bool isInNand) {
LangFile::LangFile(EGG::Heap* pHeap, const char* dirName, const char* fileName, ARCHandle* arc, bool isNandFile) {
char fullName[NAND_MAX_PATH + 1];
cmnFile = NULL;
@@ -470,7 +470,7 @@ namespace ipl {
strncat(fullName, "/common/", (NAND_MAX_PATH + 1) - strlen(fullName));
strncat(fullName, fileName, (NAND_MAX_PATH + 1) - strlen(fullName));
cmnFile = new(pHeap, CLASS_HEAP) File(pHeap, fullName, arc, NULL, 0, 0, isInNand);
cmnFile = new(pHeap, CLASS_HEAP) File(pHeap, fullName, arc, NULL, 0, 0, isNandFile);
char* langPath = utility::Language::getPath();
@@ -480,7 +480,7 @@ namespace ipl {
strncat(fullName, "/", (NAND_MAX_PATH + 1) - strlen(fullName));
strncat(fullName, fileName, (NAND_MAX_PATH + 1) - strlen(fullName));
langFile = new(pHeap, CLASS_HEAP) File(pHeap, fullName, arc, NULL, 0, 0, isInNand);
langFile = new(pHeap, CLASS_HEAP) File(pHeap, fullName, arc, NULL, 0, 0, isNandFile);
}
/**
@@ -582,7 +582,7 @@ done:
}
case NAND_RESULT_MAXFILES:
case NAND_RESULT_MAXBLOCKS: {
mIsNandFull = true;
mbIsFullForTask = true;
break;
}
case NAND_RESULT_AUTHENTICATION:
@@ -591,12 +591,12 @@ done:
break;
}
case NAND_RESULT_CORRUPT: {
mFatalError = true;
mbFatalError = true;
System::err_display(MESG_ERR_NAND);
break;
}
default: {
mFatalError = true;
mbFatalError = true;
System::err_log(NAND, errcode, 808);
System::err_display(MESG_ERR_CONTENT);
}
@@ -641,7 +641,7 @@ done:
* @note Size: 0x8
*/
bool File::isFatalError() {
return mFatalError;
return mbFatalError;
}
/**

View File

@@ -19,7 +19,7 @@ namespace ipl {
mTitleId(titleId),
mTicket(NULL),
mTicketIdx(ticketIdx),
mMetaInNand(false),
mbMetaInNand(false),
mCallback(callBack),
mCallbackWork(callBackWork) {}
@@ -102,13 +102,13 @@ namespace ipl {
line = 146;
}
else {
// Open up the meta file from content index 0 (the 00000000.app files)
// Open up the meta file from content index 0 (the 00000000.app file)
result = ES_OpenTitleContentFile(mTitleId, mTicket, 0);
mDescriptor = result;
// If it does not exist, load the meta file from the NAND instead (from the meta folder).
if (result == -1026) {
mMetaInNand = true;
mbMetaInNand = true;
return openNandFile_();
}
@@ -125,7 +125,7 @@ namespace ipl {
// Failed to do that? Close the file and abort.
result = ES_CloseContentFile(mDescriptor);
// In case it was unlucky and it failed to even do that.
// In case if it was unlucky and failed to even do that.
if (result < ES_ERR_OK) {
line = 178;
goto failed;
@@ -201,7 +201,7 @@ failed:
* @note Size: 0x14
*/
BOOL MetaFile::close_() {
if (mMetaInNand) {
if (mbMetaInNand) {
return closeNandFile_();
}
else {
@@ -222,7 +222,7 @@ failed:
* @note Size: 0x14
*/
void MetaFile::readBlock_(void* buffer, int length, int offset) {
if (mMetaInNand) {
if (mbMetaInNand) {
readNandBlock_(buffer, length, offset);
}
else {

View File

@@ -10,7 +10,7 @@ typedef struct {
u8 sig[4]; // 0x00
u32 hash; // 0x04
u32 version; // 0x08 (always 3)
} IMETHdr;
} METABlockHeader;
namespace ipl {
/**
@@ -18,7 +18,7 @@ namespace ipl {
* @note Size 0xAC
*/
BOOL NandSDWorker::check_header_base(const u8 *bnrData, u32 *hashOut) {
IMETHdr* header = (IMETHdr*)(bnrData);
METABlockHeader* header = (METABlockHeader*)(bnrData);
u32 hash = header->hash;
if (hashOut != NULL) {

View File

@@ -12,10 +12,10 @@ namespace ipl {
namespace nandwall {
using namespace nand::wrapper;
u32 user_used_fsblocks; /** @note Address: 0x816986B0 (4.3U), Size: 0x4 */
u32 user_used_inodes; /** @note Address: 0x816986B4 (4.3U), Size: 0x4 */
u32 global_free_fsblock; /** @note Address: 0x816986B8 (4.3U), Size: 0x4 */
u32 global_free_inode; /** @note Address: 0x816986BC (4.3U), Size: 0x4 */
u32 user_used_fsblocks;
u32 user_used_inodes;
u32 global_free_fsblock;
u32 global_free_inode;
/**
* @note Address: 0x8133DC0C (4.3U)

Some files were not shown because too many files have changed in this diff Show More