copy homebuttonLib from oot-vc (#2960)

* initial copy of hbm from sdk_2009-12-11

* some more nw4hbm cleanup

* nw4hbm db mostly done

* nw4hbm snd copied from oot-vc

* nw4hbm ut copied

* nw4hbm lyt copied

* nw4hbm copied, mostly matching usa 1.0

* setup nw4hbm debug define

* fix HBMDataInfo struct

* add rvl sdk card lib
This commit is contained in:
TakaRikka
2025-12-16 16:55:07 +02:00
committed by GitHub
parent c8104b6d62
commit 8185d87f85
235 changed files with 32438 additions and 320 deletions
+39 -39
View File
@@ -2345,7 +2345,7 @@ revolution/gf/GFPixel.cpp:
revolution/gf/GFTev.cpp:
.text start:0x802B20AC end:0x802B210C
revolution/hbm/HBMBase.cpp:
revolution/homebuttonLib/HBMBase.cpp:
.text start:0x802B210C end:0x802BA91C
.rodata start:0x803EF1C8 end:0x803EF478
.data start:0x804253D8 end:0x80426308
@@ -2354,125 +2354,125 @@ revolution/hbm/HBMBase.cpp:
.sbss start:0x8053B090 end:0x8053B098
.sdata2 start:0x8053FCD0 end:0x8053FD30
revolution/hbm/HBMAnmController.cpp:
revolution/homebuttonLib/HBMAnmController.cpp:
.text start:0x802BA91C end:0x802BAA3C
.data start:0x80426308 end:0x80426318
revolution/hbm/HBMFrameController.cpp:
revolution/homebuttonLib/HBMFrameController.cpp:
.text start:0x802BAA3C end:0x802BABDC
.sdata2 start:0x8053FD30 end:0x8053FD38
revolution/hbm/HBMGUIManager.cpp:
revolution/homebuttonLib/HBMGUIManager.cpp:
.text start:0x802BABDC end:0x802BC260
.data start:0x80426318 end:0x804264F8
.sdata start:0x8053A118 end:0x8053A120
.sbss start:0x8053B098 end:0x8053B0A0
.sdata2 start:0x8053FD38 end:0x8053FD48
revolution/hbm/HBMController.cpp:
revolution/homebuttonLib/HBMController.cpp:
.text start:0x802BC260 end:0x802BCAB8
.bss start:0x804C2448 end:0x804C25D8
.sbss start:0x8053B0A0 end:0x8053B0A8
.sdata2 start:0x8053FD48 end:0x8053FD58
revolution/hbm/HBMRemoteSpk.cpp:
revolution/homebuttonLib/HBMRemoteSpk.cpp:
.text start:0x802BCAB8 end:0x802BD2B8
.data start:0x804264F8 end:0x80426568
.sbss start:0x8053B0A8 end:0x8053B0B0
revolution/db/db_assert.cpp:
revolution/homebuttonLib/nw4hbm/db/db_assert.cpp:
.text start:0x802BD2B8 end:0x802BD8C8
.data start:0x80426568 end:0x80426618
.bss start:0x804C25D8 end:0x804C2608
.sdata start:0x8053A120 end:0x8053A128
.sbss start:0x8053B0B0 end:0x8053B0C0
revolution/db/db_console.cpp:
revolution/homebuttonLib/nw4hbm/db/db_console.cpp:
.text start:0x802BD8C8 end:0x802BE1C8
.data start:0x80426618 end:0x80426738
.bss start:0x804C2608 end:0x804C2A20
.sdata start:0x8053A128 end:0x8053A130
revolution/db/db_DbgPrintBase.cpp:
revolution/homebuttonLib/nw4hbm/db/db_DbgPrintBase.cpp:
.text start:0x802BE1C8 end:0x802BE208
revolution/db/db_directPrint.cpp:
revolution/homebuttonLib/nw4hbm/db/db_directPrint.cpp:
.text start:0x802BE208 end:0x802BEC18
.rodata start:0x803EF478 end:0x803EF730
.data start:0x80426738 end:0x804267E8
.bss start:0x804C2A20 end:0x804C2A60
.sbss start:0x8053B0C0 end:0x8053B0C8
revolution/db/db_mapFile.cpp:
revolution/homebuttonLib/nw4hbm/db/db_mapFile.cpp:
.text start:0x802BEC18 end:0x802BF52C
.data start:0x804267E8 end:0x804269F0
.bss start:0x804C2A60 end:0x804C2CA0
.sdata start:0x8053A130 end:0x8053A138
.sbss start:0x8053B0C8 end:0x8053B0D8
revolution/homebuttonLib/lyt_animation.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_animation.cpp:
.text start:0x802BF52C end:0x802C049C
.data start:0x804269F0 end:0x80426E60
.sdata start:0x8053A138 end:0x8053A140
.sdata2 start:0x8053FD58 end:0x8053FD78
revolution/homebuttonLib/lyt_arcResourceAccessor.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_arcResourceAccessor.cpp:
.text start:0x802C049C end:0x802C0BA0
.data start:0x80426E60 end:0x804270D8
.sdata start:0x8053A140 end:0x8053A148
revolution/homebuttonLib/lyt_bounding.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_bounding.cpp:
.text start:0x802C0BA0 end:0x802C0CB8
.ctors start:0x803CE384 end:0x803CE388
.data start:0x804270D8 end:0x80427140
.sbss start:0x8053B0D8 end:0x8053B0E8
revolution/homebuttonLib/lyt_common.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_common.cpp:
.text start:0x802C0CB8 end:0x802C1B38
.data start:0x80427140 end:0x804271B0
.bss start:0x804C2CA0 end:0x804C2CC0
.sdata2 start:0x8053FD78 end:0x8053FD88
revolution/homebuttonLib/lyt_drawInfo.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_drawInfo.cpp:
.text start:0x802C1B38 end:0x802C1BEC
.data start:0x804271B0 end:0x804271C0
.sdata2 start:0x8053FD88 end:0x8053FD90
revolution/homebuttonLib/lyt_group.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_group.cpp:
.text start:0x802C1BEC end:0x802C2094
.data start:0x804271C0 end:0x804272C0
revolution/homebuttonLib/lyt_layout.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_layout.cpp:
.text start:0x802C2094 end:0x802C3048
.data start:0x804272C0 end:0x80427528
.sbss start:0x8053B0E8 end:0x8053B0F0
.sdata2 start:0x8053FD90 end:0x8053FD98
revolution/homebuttonLib/lyt_material.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_material.cpp:
.text start:0x802C3048 end:0x802C6768
.data start:0x80427528 end:0x80427B28
.sdata2 start:0x8053FD98 end:0x8053FDB8
.sbss2 start:0x80540BD0 end:0x80540BE8
revolution/homebuttonLib/lyt_pane.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_pane.cpp:
.text start:0x802C6768 end:0x802C7AC0
.ctors start:0x803CE388 end:0x803CE38C
.data start:0x80427B28 end:0x80427EB8
.sbss start:0x8053B0F0 end:0x8053B0F8
.sdata2 start:0x8053FDB8 end:0x8053FDD8
revolution/homebuttonLib/lyt_picture.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_picture.cpp:
.text start:0x802C7AC0 end:0x802C81E0
.ctors start:0x803CE38C end:0x803CE390
.data start:0x80427EB8 end:0x804280E0
.sbss start:0x8053B0F8 end:0x8053B100
.sdata2 start:0x8053FDD8 end:0x8053FDE0
revolution/homebuttonLib/lyt_resourceAccessor.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_resourceAccessor.cpp:
.text start:0x802C81E0 end:0x802C8238
.data start:0x804280E0 end:0x804280F8
revolution/homebuttonLib/lyt_textBox.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_textBox.cpp:
.text start:0x802C8238 end:0x802CB080
.ctors start:0x803CE390 end:0x803CE394
.data start:0x804280F8 end:0x80428770
@@ -2480,74 +2480,74 @@ revolution/homebuttonLib/lyt_textBox.cpp:
.sbss start:0x8053B100 end:0x8053B108
.sdata2 start:0x8053FDE0 end:0x8053FDF8
revolution/homebuttonLib/lyt_window.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_window.cpp:
.text start:0x802CB080 end:0x802CD954
.ctors start:0x803CE394 end:0x803CE398
.data start:0x80428770 end:0x804289D0
.sbss start:0x8053B108 end:0x8053B114
.sdata2 start:0x8053FDF8 end:0x8053FE10
revolution/homebuttonLib/math_triangular.cpp:
revolution/homebuttonLib/nw4hbm/math/math_triangular.cpp:
.text start:0x802CD954 end:0x802CDBC4
.data start:0x804289D0 end:0x80429AE8
.sdata2 start:0x8053FE10 end:0x8053FE30
revolution/homebuttonLib/snd_SoundArchivePlayer.cpp:
revolution/homebuttonLib/nw4hbm/snd/snd_SoundArchivePlayer.cpp:
.text start:0x802CDBC4 end:0x802CDC34
.data start:0x80429AE8 end:0x80429B48
revolution/homebuttonLib/snd_SoundHandle.cpp:
revolution/homebuttonLib/nw4hbm/snd/snd_SoundHandle.cpp:
.text start:0x802CDC34 end:0x802CDC84
revolution/homebuttonLib/snd_SoundPlayer.cpp:
revolution/homebuttonLib/nw4hbm/snd/snd_SoundPlayer.cpp:
.text start:0x802CDC84 end:0x802CDD74
.data start:0x80429B48 end:0x80429BB8
.sdata2 start:0x8053FE30 end:0x8053FE38
revolution/homebuttonLib/snd_SoundStartable.cpp:
revolution/homebuttonLib/nw4hbm/snd/snd_SoundStartable.cpp:
.text start:0x802CDD74 end:0x802CDDE0
revolution/homebuttonLib/ut_binaryFileFormat.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_binaryFileFormat.cpp:
.text start:0x802CDDE0 end:0x802CE038
.data start:0x80429BB8 end:0x80429D08
revolution/homebuttonLib/ut_CharStrmReader.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_CharStrmReader.cpp:
.text start:0x802CE038 end:0x802CE998
.data start:0x80429D08 end:0x80429E50
revolution/homebuttonLib/ut_CharWriter.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_CharWriter.cpp:
.text start:0x802CE998 end:0x802D2EF4
.data start:0x80429E50 end:0x8042A130
.bss start:0x804C2CC0 end:0x804C2CE0
.sbss start:0x8053B114 end:0x8053B118
.sdata2 start:0x8053FE38 end:0x8053FE58
revolution/homebuttonLib/ut_Font.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_Font.cpp:
.text start:0x802D2EF4 end:0x802D30B8
.data start:0x8042A130 end:0x8042A1A8
revolution/homebuttonLib/ut_LinkList.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_LinkList.cpp:
.text start:0x802D30B8 end:0x802D3528
.data start:0x8042A1A8 end:0x8042A350
revolution/homebuttonLib/ut_list.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_list.cpp:
.text start:0x802D3528 end:0x802D38D0
.data start:0x8042A350 end:0x8042A3B0
revolution/homebuttonLib/ut_ResFont.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_ResFont.cpp:
.text start:0x802D38D0 end:0x802D48E8
.data start:0x8042A3B0 end:0x8042AC68
revolution/homebuttonLib/ut_ResFontBase.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_ResFontBase.cpp:
.text start:0x802D48E8 end:0x802D80C8
.data start:0x8042AC68 end:0x8042AF80
revolution/homebuttonLib/ut_TagProcessorBase.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_TagProcessorBase.cpp:
.text start:0x802D80C8 end:0x802D92D0
.data start:0x8042AF80 end:0x8042B058
.sdata2 start:0x8053FE58 end:0x8053FE60
revolution/homebuttonLib/ut_TextWriterBase.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_TextWriterBase.cpp:
.text start:0x802D92D0 end:0x802E1FB4
.ctors start:0x803CE398 end:0x803CE39C
.data start:0x8042B058 end:0x8042B680
+35 -35
View File
@@ -2348,7 +2348,7 @@ revolution/gf/GFPixel.cpp:
revolution/gf/GFTev.cpp:
.text start:0x802B1D5C end:0x802B1DBC
revolution/hbm/HBMBase.cpp:
revolution/homebuttonLib/HBMBase.cpp:
.text start:0x802B1DBC end:0x802BA3D4
.rodata start:0x803DA7C8 end:0x803DAA78
.data start:0x804107F0 end:0x80411398
@@ -2357,95 +2357,95 @@ revolution/hbm/HBMBase.cpp:
.sbss start:0x805210B0 end:0x805210B8
.sdata2 start:0x80525D58 end:0x80525DB8
revolution/hbm/HBMAnmController.cpp:
revolution/homebuttonLib/HBMAnmController.cpp:
.text start:0x802BA3D4 end:0x802BA4E0
.data start:0x80411398 end:0x804113A8
revolution/hbm/HBMFrameController.cpp:
revolution/homebuttonLib/HBMFrameController.cpp:
.text start:0x802BA4E0 end:0x802BA680
.sdata2 start:0x80525DB8 end:0x80525DC0
revolution/hbm/HBMGUIManager.cpp:
revolution/homebuttonLib/HBMGUIManager.cpp:
.text start:0x802BA680 end:0x802BBAB8
.data start:0x804113A8 end:0x80411500
.sbss start:0x805210B8 end:0x805210C0
.sdata2 start:0x80525DC0 end:0x80525DD0
revolution/hbm/HBMController.cpp:
revolution/homebuttonLib/HBMController.cpp:
.text start:0x802BBAB8 end:0x802BC310
.bss start:0x804A8B78 end:0x804A8D08
.sbss start:0x805210C0 end:0x805210C8
.sdata2 start:0x80525DD0 end:0x80525DE0
revolution/hbm/HBMRemoteSpk.cpp:
revolution/homebuttonLib/HBMRemoteSpk.cpp:
.text start:0x802BC310 end:0x802BCA6C
.data start:0x80411500 end:0x80411510
.sbss start:0x805210C8 end:0x805210D0
revolution/db/db_DbgPrintBase.cpp:
revolution/homebuttonLib/nw4hbm/db/db_DbgPrintBase.cpp:
.text start:0x802BCA6C end:0x802BCAAC
revolution/homebuttonLib/lyt_animation.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_animation.cpp:
.text start:0x802BCAAC end:0x802BD61C
.data start:0x80411510 end:0x80411530
.sdata2 start:0x80525DE0 end:0x80525E00
revolution/homebuttonLib/lyt_arcResourceAccessor.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_arcResourceAccessor.cpp:
.text start:0x802BD61C end:0x802BD990
.data start:0x80411530 end:0x80411548
.sdata start:0x80520160 end:0x80520168
revolution/homebuttonLib/lyt_bounding.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_bounding.cpp:
.text start:0x802BD990 end:0x802BDAA8
.ctors start:0x803B8DC8 end:0x803B8DCC
.data start:0x80411548 end:0x804115B0
.sbss start:0x805210D0 end:0x805210E0
revolution/homebuttonLib/lyt_common.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_common.cpp:
.text start:0x802BDAA8 end:0x802BE8A0
.bss start:0x804A8D08 end:0x804A8D28
.sdata2 start:0x80525E00 end:0x80525E10
revolution/homebuttonLib/lyt_drawInfo.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_drawInfo.cpp:
.text start:0x802BE8A0 end:0x802BE954
.data start:0x804115B0 end:0x804115C0
.sdata2 start:0x80525E10 end:0x80525E18
revolution/homebuttonLib/lyt_group.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_group.cpp:
.text start:0x802BE954 end:0x802BEC74
.data start:0x804115C0 end:0x804115D0
revolution/homebuttonLib/lyt_layout.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_layout.cpp:
.text start:0x802BEC74 end:0x802BF8E4
.data start:0x804115D0 end:0x80411608
.sbss start:0x805210E0 end:0x805210E8
.sdata2 start:0x80525E18 end:0x80525E20
revolution/homebuttonLib/lyt_material.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_material.cpp:
.text start:0x802BF8E4 end:0x802C2CB8
.data start:0x80411608 end:0x80411670
.sdata2 start:0x80525E20 end:0x80525E40
.sbss2 start:0x80526C50 end:0x80526C68
revolution/homebuttonLib/lyt_pane.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_pane.cpp:
.text start:0x802C2CB8 end:0x802C3BEC
.ctors start:0x803B8DCC end:0x803B8DD0
.data start:0x80411670 end:0x804116D8
.sbss start:0x805210E8 end:0x805210F0
.sdata2 start:0x80525E40 end:0x80525E60
revolution/homebuttonLib/lyt_picture.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_picture.cpp:
.text start:0x802C3BEC end:0x802C410C
.ctors start:0x803B8DD0 end:0x803B8DD4
.data start:0x804116D8 end:0x80411748
.sbss start:0x805210F0 end:0x805210F8
.sdata2 start:0x80525E60 end:0x80525E68
revolution/homebuttonLib/lyt_resourceAccessor.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_resourceAccessor.cpp:
.text start:0x802C410C end:0x802C4164
.data start:0x80411748 end:0x80411760
revolution/homebuttonLib/lyt_textBox.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_textBox.cpp:
.text start:0x802C4164 end:0x802C5794
.ctors start:0x803B8DD4 end:0x803B8DD8
.data start:0x80411760 end:0x804117D8
@@ -2453,66 +2453,66 @@ revolution/homebuttonLib/lyt_textBox.cpp:
.sbss start:0x805210F8 end:0x80521100
.sdata2 start:0x80525E68 end:0x80525E80
revolution/homebuttonLib/lyt_window.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_window.cpp:
.text start:0x802C5794 end:0x802C7C10
.ctors start:0x803B8DD8 end:0x803B8DDC
.data start:0x804117D8 end:0x80411890
.sbss start:0x80521100 end:0x8052110C
.sdata2 start:0x80525E80 end:0x80525E98
revolution/homebuttonLib/math_triangular.cpp:
revolution/homebuttonLib/nw4hbm/math/math_triangular.cpp:
.text start:0x802C7C10 end:0x802C7E80
.data start:0x80411890 end:0x804129A8
.sdata2 start:0x80525E98 end:0x80525EB8
revolution/homebuttonLib/snd_SoundArchivePlayer.cpp:
revolution/homebuttonLib/nw4hbm/snd/snd_SoundArchivePlayer.cpp:
.text start:0x802C7E80 end:0x802C7E90
revolution/homebuttonLib/snd_SoundHandle.cpp:
revolution/homebuttonLib/nw4hbm/snd/snd_SoundHandle.cpp:
.text start:0x802C7E90 end:0x802C7EE0
revolution/homebuttonLib/snd_SoundPlayer.cpp:
revolution/homebuttonLib/nw4hbm/snd/snd_SoundPlayer.cpp:
.text start:0x802C7EE0 end:0x802C7F50
revolution/homebuttonLib/snd_SoundStartable.cpp:
revolution/homebuttonLib/nw4hbm/snd/snd_SoundStartable.cpp:
.text start:0x802C7F50 end:0x802C7FBC
revolution/homebuttonLib/ut_binaryFileFormat.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_binaryFileFormat.cpp:
.text start:0x802C7FBC end:0x802C8030
revolution/homebuttonLib/ut_CharStrmReader.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_CharStrmReader.cpp:
.text start:0x802C8030 end:0x802C8140
revolution/homebuttonLib/ut_CharWriter.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_CharWriter.cpp:
.text start:0x802C8140 end:0x802C9BC4
.bss start:0x804A8D28 end:0x804A8D48
.sbss start:0x8052110C end:0x80521110
.sdata2 start:0x80525EB8 end:0x80525ED8
revolution/homebuttonLib/ut_Font.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_Font.cpp:
.text start:0x802C9BC4 end:0x802C9C6C
.data start:0x804129A8 end:0x804129D8
revolution/homebuttonLib/ut_LinkList.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_LinkList.cpp:
.text start:0x802C9C6C end:0x802C9D64
revolution/homebuttonLib/ut_list.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_list.cpp:
.text start:0x802C9D64 end:0x802C9EC4
revolution/homebuttonLib/ut_ResFont.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_ResFont.cpp:
.text start:0x802C9EC4 end:0x802CA1C8
.data start:0x804129D8 end:0x80412A30
revolution/homebuttonLib/ut_ResFontBase.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_ResFontBase.cpp:
.text start:0x802CA1C8 end:0x802CA798
.data start:0x80412A30 end:0x80412AF0
revolution/homebuttonLib/ut_TagProcessorBase.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_TagProcessorBase.cpp:
.text start:0x802CA798 end:0x802CAF58
.data start:0x80412AF0 end:0x80412B48
.sdata2 start:0x80525ED8 end:0x80525EE0
revolution/homebuttonLib/ut_TextWriterBase.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_TextWriterBase.cpp:
.text start:0x802CAF58 end:0x802CC984
.ctors start:0x803B8DDC end:0x803B8DE0
.bss start:0x804A8D48 end:0x804A8D60
+35 -35
View File
@@ -2348,7 +2348,7 @@ revolution/gf/GFPixel.cpp:
revolution/gf/GFTev.cpp:
.text start:0x802B387C end:0x802B38DC
revolution/hbm/HBMBase.cpp:
revolution/homebuttonLib/HBMBase.cpp:
.text start:0x802B38DC end:0x802BBEF4
.rodata start:0x803D8788 end:0x803D8A38
.data start:0x8040E670 end:0x8040F218
@@ -2357,95 +2357,95 @@ revolution/hbm/HBMBase.cpp:
.sbss start:0x8051EF20 end:0x8051EF28
.sdata2 start:0x80523BB0 end:0x80523C10
revolution/hbm/HBMAnmController.cpp:
revolution/homebuttonLib/HBMAnmController.cpp:
.text start:0x802BBEF4 end:0x802BC000
.data start:0x8040F218 end:0x8040F228
revolution/hbm/HBMFrameController.cpp:
revolution/homebuttonLib/HBMFrameController.cpp:
.text start:0x802BC000 end:0x802BC1A0
.sdata2 start:0x80523C10 end:0x80523C18
revolution/hbm/HBMGUIManager.cpp:
revolution/homebuttonLib/HBMGUIManager.cpp:
.text start:0x802BC1A0 end:0x802BD5D8
.data start:0x8040F228 end:0x8040F380
.sbss start:0x8051EF28 end:0x8051EF30
.sdata2 start:0x80523C18 end:0x80523C28
revolution/hbm/HBMController.cpp:
revolution/homebuttonLib/HBMController.cpp:
.text start:0x802BD5D8 end:0x802BDE30
.bss start:0x804A69F8 end:0x804A6B88
.sbss start:0x8051EF30 end:0x8051EF38
.sdata2 start:0x80523C28 end:0x80523C38
revolution/hbm/HBMRemoteSpk.cpp:
revolution/homebuttonLib/HBMRemoteSpk.cpp:
.text start:0x802BDE30 end:0x802BE58C
.data start:0x8040F380 end:0x8040F390
.sbss start:0x8051EF38 end:0x8051EF40
revolution/db/db_DbgPrintBase.cpp:
revolution/homebuttonLib/nw4hbm/db/db_DbgPrintBase.cpp:
.text start:0x802BE58C end:0x802BE5CC
revolution/homebuttonLib/lyt_animation.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_animation.cpp:
.text start:0x802BE5CC end:0x802BF13C
.data start:0x8040F390 end:0x8040F3B0
.sdata2 start:0x80523C38 end:0x80523C58
revolution/homebuttonLib/lyt_arcResourceAccessor.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_arcResourceAccessor.cpp:
.text start:0x802BF13C end:0x802BF4B0
.data start:0x8040F3B0 end:0x8040F3C8
.sdata start:0x8051DFD0 end:0x8051DFD8
revolution/homebuttonLib/lyt_bounding.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_bounding.cpp:
.text start:0x802BF4B0 end:0x802BF5C8
.ctors start:0x803BA888 end:0x803BA88C
.data start:0x8040F3C8 end:0x8040F430
.sbss start:0x8051EF40 end:0x8051EF50
revolution/homebuttonLib/lyt_common.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_common.cpp:
.text start:0x802BF5C8 end:0x802C03C0
.bss start:0x804A6B88 end:0x804A6BA8
.sdata2 start:0x80523C58 end:0x80523C68
revolution/homebuttonLib/lyt_drawInfo.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_drawInfo.cpp:
.text start:0x802C03C0 end:0x802C0474
.data start:0x8040F430 end:0x8040F440
.sdata2 start:0x80523C68 end:0x80523C70
revolution/homebuttonLib/lyt_group.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_group.cpp:
.text start:0x802C0474 end:0x802C0794
.data start:0x8040F440 end:0x8040F450
revolution/homebuttonLib/lyt_layout.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_layout.cpp:
.text start:0x802C0794 end:0x802C1404
.data start:0x8040F450 end:0x8040F488
.sbss start:0x8051EF50 end:0x8051EF58
.sdata2 start:0x80523C70 end:0x80523C78
revolution/homebuttonLib/lyt_material.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_material.cpp:
.text start:0x802C1404 end:0x802C47D8
.data start:0x8040F488 end:0x8040F4F0
.sdata2 start:0x80523C78 end:0x80523C98
.sbss2 start:0x80524A90 end:0x80524AA8
revolution/homebuttonLib/lyt_pane.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_pane.cpp:
.text start:0x802C47D8 end:0x802C570C
.ctors start:0x803BA88C end:0x803BA890
.data start:0x8040F4F0 end:0x8040F558
.sbss start:0x8051EF58 end:0x8051EF60
.sdata2 start:0x80523C98 end:0x80523CB8
revolution/homebuttonLib/lyt_picture.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_picture.cpp:
.text start:0x802C570C end:0x802C5C2C
.ctors start:0x803BA890 end:0x803BA894
.data start:0x8040F558 end:0x8040F5C8
.sbss start:0x8051EF60 end:0x8051EF68
.sdata2 start:0x80523CB8 end:0x80523CC0
revolution/homebuttonLib/lyt_resourceAccessor.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_resourceAccessor.cpp:
.text start:0x802C5C2C end:0x802C5C84
.data start:0x8040F5C8 end:0x8040F5E0
revolution/homebuttonLib/lyt_textBox.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_textBox.cpp:
.text start:0x802C5C84 end:0x802C72B4
.ctors start:0x803BA894 end:0x803BA898
.data start:0x8040F5E0 end:0x8040F658
@@ -2453,66 +2453,66 @@ revolution/homebuttonLib/lyt_textBox.cpp:
.sbss start:0x8051EF68 end:0x8051EF70
.sdata2 start:0x80523CC0 end:0x80523CD8
revolution/homebuttonLib/lyt_window.cpp:
revolution/homebuttonLib/nw4hbm/lyt/lyt_window.cpp:
.text start:0x802C72B4 end:0x802C9730
.ctors start:0x803BA898 end:0x803BA89C
.data start:0x8040F658 end:0x8040F710
.sbss start:0x8051EF70 end:0x8051EF7C
.sdata2 start:0x80523CD8 end:0x80523CF0
revolution/homebuttonLib/math_triangular.cpp:
revolution/homebuttonLib/nw4hbm/math/math_triangular.cpp:
.text start:0x802C9730 end:0x802C99A0
.data start:0x8040F710 end:0x80410828
.sdata2 start:0x80523CF0 end:0x80523D10
revolution/homebuttonLib/snd_SoundArchivePlayer.cpp:
revolution/homebuttonLib/nw4hbm/snd/snd_SoundArchivePlayer.cpp:
.text start:0x802C99A0 end:0x802C99B0
revolution/homebuttonLib/snd_SoundHandle.cpp:
revolution/homebuttonLib/nw4hbm/snd/snd_SoundHandle.cpp:
.text start:0x802C99B0 end:0x802C9A00
revolution/homebuttonLib/snd_SoundPlayer.cpp:
revolution/homebuttonLib/nw4hbm/snd/snd_SoundPlayer.cpp:
.text start:0x802C9A00 end:0x802C9A70
revolution/homebuttonLib/snd_SoundStartable.cpp:
revolution/homebuttonLib/nw4hbm/snd/snd_SoundStartable.cpp:
.text start:0x802C9A70 end:0x802C9ADC
revolution/homebuttonLib/ut_binaryFileFormat.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_binaryFileFormat.cpp:
.text start:0x802C9ADC end:0x802C9B50
revolution/homebuttonLib/ut_CharStrmReader.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_CharStrmReader.cpp:
.text start:0x802C9B50 end:0x802C9C60
revolution/homebuttonLib/ut_CharWriter.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_CharWriter.cpp:
.text start:0x802C9C60 end:0x802CB6E4
.bss start:0x804A6BA8 end:0x804A6BC8
.sbss start:0x8051EF7C end:0x8051EF80
.sdata2 start:0x80523D10 end:0x80523D30
revolution/homebuttonLib/ut_Font.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_Font.cpp:
.text start:0x802CB6E4 end:0x802CB78C
.data start:0x80410828 end:0x80410858
revolution/homebuttonLib/ut_LinkList.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_LinkList.cpp:
.text start:0x802CB78C end:0x802CB884
revolution/homebuttonLib/ut_list.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_list.cpp:
.text start:0x802CB884 end:0x802CB9E4
revolution/homebuttonLib/ut_ResFont.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_ResFont.cpp:
.text start:0x802CB9E4 end:0x802CBCE8
.data start:0x80410858 end:0x804108B0
revolution/homebuttonLib/ut_ResFontBase.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_ResFontBase.cpp:
.text start:0x802CBCE8 end:0x802CC2B8
.data start:0x804108B0 end:0x80410970
revolution/homebuttonLib/ut_TagProcessorBase.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_TagProcessorBase.cpp:
.text start:0x802CC2B8 end:0x802CCA78
.data start:0x80410970 end:0x804109C8
.sdata2 start:0x80523D30 end:0x80523D38
revolution/homebuttonLib/ut_TextWriterBase.cpp:
revolution/homebuttonLib/nw4hbm/ut/ut_TextWriterBase.cpp:
.text start:0x802CCA78 end:0x802CE4A4
.ctors start:0x803BA89C end:0x803BA8A0
.bss start:0x804A6BC8 end:0x804A6BE0
+72
View File
@@ -496,6 +496,14 @@ def RevolutionLib(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
"progress_category": "sdk",
"objects": objects,
}
elif config.version == "RZDE01_00":
return {
"lib": lib_name,
"mw_version": "GC/3.0a3",
"cflags": [*cflags_revolution_retail, "-DSDK_SEP2006", "-DNW4HBM_DEBUG"],
"progress_category": "sdk",
"objects": objects,
}
else:
return {
"lib": lib_name,
@@ -1614,6 +1622,25 @@ config.libs = [
Object(NonMatching, "revolution/dsp/dsp_task.c"),
],
),
RevolutionLib(
"card",
[
Object(NonMatching, "revolution/card/CARDBios.c"),
Object(NonMatching, "revolution/card/CARDUnlock.c"),
Object(NonMatching, "revolution/card/CARDRdwr.c"),
Object(NonMatching, "revolution/card/CARDBlock.c"),
Object(NonMatching, "revolution/card/CARDDir.c"),
Object(NonMatching, "revolution/card/CARDCheck.c"),
Object(NonMatching, "revolution/card/CARDMount.c"),
Object(NonMatching, "revolution/card/CARDFormat.c"),
Object(NonMatching, "revolution/card/CARDOpen.c", extra_cflags=["-char signed"]),
Object(NonMatching, "revolution/card/CARDCreate.c"),
Object(NonMatching, "revolution/card/CARDRead.c"),
Object(NonMatching, "revolution/card/CARDWrite.c"),
Object(NonMatching, "revolution/card/CARDStat.c"),
Object(NonMatching, "revolution/card/CARDNet.c"),
],
),
RevolutionLib(
"hio2",
[
@@ -1693,6 +1720,51 @@ config.libs = [
Object(NonMatching, "revolution/gd/GDGeometry.c"),
],
),
RevolutionLib(
"homebuttonLib",
[
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/db/db_assert.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/db/db_console.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/db/db_DbgPrintBase.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/db/db_directPrint.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/db/db_mapFile.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_animation.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_arcResourceAccessor.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_bounding.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_common.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_drawInfo.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_group.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_layout.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_material.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_pane.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_picture.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_resourceAccessor.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_textBox.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/lyt/lyt_window.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/math/math_triangular.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/snd/snd_SoundArchivePlayer.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/snd/snd_SoundHandle.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/snd/snd_SoundPlayer.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/snd/snd_SoundStartable.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/ut/ut_binaryFileFormat.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/ut/ut_CharStrmReader.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/ut/ut_CharWriter.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/ut/ut_Font.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/ut/ut_LinkList.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/ut/ut_list.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/ut/ut_ResFont.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/ut/ut_ResFontBase.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/ut/ut_TagProcessorBase.cpp"),
Object(NonMatching, "revolution/homebuttonLib/nw4hbm/ut/ut_TextWriterBase.cpp"),
Object(NonMatching, "revolution/homebuttonLib/HBMBase.cpp"),
Object(NonMatching, "revolution/homebuttonLib/HBMAnmController.cpp"),
Object(NonMatching, "revolution/homebuttonLib/HBMFrameController.cpp"),
Object(NonMatching, "revolution/homebuttonLib/HBMGUIManager.cpp"),
Object(NonMatching, "revolution/homebuttonLib/HBMController.cpp"),
Object(NonMatching, "revolution/homebuttonLib/HBMRemoteSpk.cpp"),
],
),
{
"lib": "Runtime.PPCEABI.H",
"mw_version": MWVersion(config.version),
+4
View File
@@ -1,6 +1,9 @@
#ifndef _DOLPHIN_CARD_H_
#define _DOLPHIN_CARD_H_
#ifdef __REVOLUTION_SDK__
#include <revolution/card.h>
#else
#include <dolphin/os.h>
#include <dolphin/dsp.h>
#include <dolphin/dvd.h>
@@ -320,3 +323,4 @@ s32 CARDWrite(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset);
#endif
#endif
#endif
+15
View File
@@ -45,6 +45,10 @@
#define ROUND(n, a) (((u32)(n) + (a)-1) & ~((a)-1))
#define TRUNC(n, a) (((u32)(n)) & ~((a)-1))
#ifndef decltype
#define decltype __decltype__
#endif
#define JUT_EXPECT(...)
#define _SDA_BASE_(dummy) 0
@@ -77,6 +81,9 @@ void* __memcpy(void*, const void*, int);
#define SQUARE(x) ((x) * (x))
#define POINTER_ADD_TYPE(type_, ptr_, offset_) ((type_)((unsigned long)(ptr_) + (unsigned long)(offset_)))
#define POINTER_ADD(ptr_, offset_) POINTER_ADD_TYPE(__typeof__(ptr_), ptr_, offset_)
// floating-point constants
#define _HUGE_ENUF 1e+300
#define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF))
@@ -91,6 +98,14 @@ static const float INF = 2000000000.0f;
#define READU32_BE(ptr, offset) \
(((u32)ptr[offset] << 24) | ((u32)ptr[offset + 1] << 16) | ((u32)ptr[offset + 2] << 8) | (u32)ptr[offset + 3]);
#ifndef NO_INLINE
#ifdef __MWERKS__
#define NO_INLINE __attribute__((never_inline))
#else
#define NO_INLINE
#endif
#endif
// Hack to trick the compiler into not inlining functions that use this macro.
#define FORCE_DONT_INLINE \
(void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; \
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef M_DO_M_DO_PRINTF_H
#define M_DO_M_DO_PRINTF_H
#include "__va_arg.h"
#include <dolphin/os.h>
void my_PutString(const char*);
void mDoPrintf_vprintf_Interrupt(char const*, va_list);
+67
View File
@@ -0,0 +1,67 @@
#ifndef _REVOLUTION_ARC_H_
#define _REVOLUTION_ARC_H_
#include <revolution/types.h>
#ifdef __cplusplus
extern "C" {
#endif
#define ARC_ENTRY_NUM_INVALID (-1)
typedef struct {
unsigned int magic;
int fstStart;
int fstSize;
int fileStart;
int pad[4];
} ARCHeader;
typedef struct {
void* archiveStartAddr; // 0x0
void* FSTStart; // 0x4
void* fileStart; // 0x8
u32 entryNum; // 0xC
char* FSTStringStart; // 0x10
u32 FSTLength; // 0x14
u32 currDir; // 0x18
} ARCHandle;
typedef struct {
ARCHandle* handle;
u32 startOffset;
u32 length;
} ARCFileInfo;
typedef struct {
ARCHandle* handle;
u32 entryNum;
u32 location;
u32 next;
} ARCDir;
typedef struct {
ARCHandle* handle;
u32 entryNum;
BOOL isDir;
char* name;
} ARCDirEntry;
BOOL ARCInitHandle(void*, ARCHandle*);
BOOL ARCFastOpen(ARCHandle*, s32, ARCFileInfo*);
s32 ARCConvertPathToEntrynum(ARCHandle*, const char*);
void* ARCGetStartAddrInMem(ARCFileInfo*);
u32 ARCGetLength(ARCFileInfo*);
BOOL ARCClose(ARCFileInfo*);
BOOL ARCChangeDir(ARCHandle*, const char*);
BOOL ARCGetCurrentDir(ARCHandle*, char*, u32);
BOOL ARCOpenDir(ARCHandle*, const char*, ARCDir*);
BOOL ARCReadDir(ARCDir*, ARCDirEntry*);
BOOL ARCCloseDir(ARCDir*);
#ifdef __cplusplus
}
#endif
#endif // _REVOLUTION_ARC_H_
+49 -1
View File
@@ -7,6 +7,16 @@
extern "C" {
#endif
#define AX_SAMPLE_RATE 32000
#define AX_SAMPLES_PER_FRAME 96
#define AX_SAMPLE_DEPTH_BYTES sizeof(u32)
#define AX_SAMPLES_PER_FRAME_RMT 18
#define AX_FRAME_SIZE (AX_SAMPLES_PER_FRAME * AX_SAMPLE_DEPTH_BYTES)
#define AX_MAX_VOLUME 32768
#define AX_VOICE_STOP 0
#define AX_VOICE_RUN 1
typedef struct _AXPBMIX {
/* 0x00 */ u16 vL;
/* 0x02 */ u16 vDeltaL;
@@ -210,7 +220,45 @@ typedef struct AX_AUX_DATA_DPL2 {
/* 0x00 */ s32* rs;
} AX_AUX_DATA_DPL2;
typedef struct _AXPBRMTMIX {
/* 0x0 */ u16 vMain0;
/* 0x2 */ u16 vDeltaMain0;
/* 0x4 */ u16 vAux0;
/* 0x6 */ u16 vDeltaAux0;
/* 0x8 */ u16 vMain1;
/* 0xA */ u16 vDeltaMain1;
/* 0xC */ u16 vAux1;
/* 0xE */ u16 vDeltaAux1;
/* 0x10 */ u16 vMain2;
/* 0x12 */ u16 vDeltaMain2;
/* 0x14 */ u16 vAux2;
/* 0x16 */ u16 vDeltaAux2;
/* 0x18 */ u16 vMain3;
/* 0x1A */ u16 vDeltaMain3;
/* 0x1C */ u16 vAux3;
/* 0x1E */ u16 vDeltaAux3;
} AXPBRMTMIX;
typedef struct _AXPBBIQUAD {
/* 0x0 */ u16 on;
/* 0x2 */ u16 xn1;
/* 0x4 */ u16 xn2;
/* 0x6 */ u16 yn1;
/* 0x8 */ u16 yn2;
/* 0xA */ u16 b0;
/* 0xC */ u16 b1;
/* 0xE */ u16 b2;
/* 0x10 */ u16 a1;
/* 0x12 */ u16 a2;
} AXPBBIQUAD;
typedef union __AXPBRMTIIR {
AXPBLPF lpf;
AXPBBIQUAD biquad;
} AXPBRMTIIR;
typedef void (*AXCallback)();
typedef void (*AXAuxCallback)(void* chans, void* context);
#define AX_DSP_SLAVE_LENGTH 0xF80
#define AX_MAX_VOICES 64
@@ -268,7 +316,7 @@ AXVPB* AXAcquireVoice(u32 priority, void (*callback)(void *), u32 userContext);
void AXSetVoicePriority(AXVPB* p, u32 priority);
// AXAux
void AXRegisterAuxACallback(void (*callback)(void*, void*), void* context);
void AXRegisterAuxACallback(AXAuxCallback callback, void* context);
void AXRegisterAuxBCallback(void (*callback)(void*, void*), void* context);
// AXCL
+21 -3
View File
@@ -2,6 +2,7 @@
#define _REVOLUTION_AXFX_H_
#include <revolution/types.h>
#include <revolution/ax.h>
#ifdef __cplusplus
extern "C" {
@@ -158,6 +159,9 @@ typedef struct AXFX_CHORUS {
/* 0x98 */ u32 period;
} AXFX_CHORUS;
typedef void* (*AXFXAllocFunc)(u32);
typedef void (*AXFXFreeFunc)(void*);
// chorus
int AXFXChorusInit(AXFX_CHORUS* c);
int AXFXChorusShutdown(AXFX_CHORUS* c);
@@ -168,14 +172,13 @@ void AXFXChorusCallback(AXFX_BUFFERUPDATE* bufferUpdate, AXFX_CHORUS* chorus);
void AXFXDelayCallback(AXFX_BUFFERUPDATE* bufferUpdate, AXFX_DELAY* delay);
int AXFXDelaySettings(AXFX_DELAY* delay);
int AXFXDelayInit(AXFX_DELAY* delay);
int AXFXDelayShutdown(AXFX_DELAY* delay);
int AXFXDelayShutdown(AXFX_DELAY* delay);
// reverb_hi
void DoCrossTalk(s32* l, s32* r, f32 cross, f32 invcross);
int AXFXReverbHiInit(AXFX_REVERBHI* rev);
int AXFXReverbHiShutdown(AXFX_REVERBHI* rev);
int AXFXReverbHiSettings(AXFX_REVERBHI* rev);
void AXFXReverbHiCallback(AXFX_BUFFERUPDATE* bufferUpdate, AXFX_REVERBHI* reverb);
// reverb_hi_4ch
int AXFXReverbHiInitDpl2(AXFX_REVERBHI_DPL2* reverb);
@@ -189,8 +192,23 @@ int AXFXReverbStdShutdown(AXFX_REVERBSTD* rev);
int AXFXReverbStdSettings(AXFX_REVERBSTD* rev);
void AXFXReverbStdCallback(AXFX_BUFFERUPDATE* bufferUpdate, AXFX_REVERBSTD* reverb);
void AXFXReverbHiCallback(void *data, void *context);
void AXGetAuxACallback(AXAuxCallback* cbOut, void** contextOut);
void AXFXSetHooks(AXFXAllocFunc alloc, AXFXFreeFunc free);
void AXFXGetHooks(AXFXAllocFunc* allocOut, AXFXFreeFunc* freeOut);
BOOL AXFXReverbHiInit(AXFX_REVERBHI* reverbHi);
BOOL AXFXReverbHiShutdown(AXFX_REVERBHI* reverbHi);
u16 AXGetAuxAReturnVolume(void);
u16 AXGetAuxBReturnVolume(void);
u16 AXGetAuxCReturnVolume(void);
void AXSetAuxAReturnVolume(u16 volume);
void AXSetAuxBReturnVolume(u16 volume);
void AXSetAuxCReturnVolume(u16 volume);
void AXSetMasterVolume(u16 volume);
u16 AXGetMasterVolume(void);
#ifdef __cplusplus
}
#endif
#endif // _REVOLUTION_AXFX_H_
#endif // _REVOLUTION_AXFX_H_
+322
View File
@@ -0,0 +1,322 @@
#ifndef _REVOLUTION_CARD_H_
#define _REVOLUTION_CARD_H_
#include <revolution/os.h>
#include <revolution/dsp.h>
#include <revolution/dvd.h>
#ifdef __cplusplus
extern "C" {
#endif
#define CARD_FILENAME_MAX 32
#define CARD_MAX_FILE 127
#define CARD_ICON_MAX 8
typedef void (*CARDCallback)(s32 chan, s32 result);
typedef struct CARDFileInfo {
s32 chan;
s32 fileNo;
s32 offset;
s32 length;
u16 iBlock;
} CARDFileInfo;
typedef struct CARDDir {
u8 gameName[4];
u8 company[2];
u8 _padding0;
u8 bannerFormat;
u8 fileName[CARD_FILENAME_MAX];
u32 time; // seconds since 01/01/2000 midnight
u32 iconAddr; // 0xffffffff if not used
u16 iconFormat;
u16 iconSpeed;
u8 permission;
u8 copyTimes;
u16 startBlock;
u16 length;
u8 _padding1[2];
u32 commentAddr; // 0xffffffff if not used
} CARDDir;
typedef struct CARDControl {
/* 0x000 */ BOOL attached;
/* 0x004 */ s32 result;
/* 0x008 */ u16 size;
/* 0x00A */ u16 pageSize;
/* 0x00C */ s32 sectorSize;
/* 0x010 */ u16 cBlock;
/* 0x012 */ u16 vendorID;
/* 0x014 */ s32 latency;
/* 0x018 */ u8 id[12];
/* 0x024 */ int mountStep;
/* 0x028 */ int formatStep;
/* 0x028 */ u32 scramble;
/* 0x02C */ DSPTaskInfo task;
/* 0x080 */ void* workArea;
/* 0x084 */ CARDDir *currentDir;
/* 0x088 */ u16* currentFat;
/* 0x08C */ OSThreadQueue threadQueue;
/* 0x094 */ u8 cmd[9];
/* 0x0A0 */ s32 cmdlen;
/* 0x0A4 */ volatile u32 mode;
/* 0x0A8 */ int retry;
/* 0x0AC */ int repeat;
/* 0x0B0 */ u32 addr;
/* 0x0B4 */ void* buffer;
/* 0x0B8 */ s32 xferred;
/* 0x0BC */ u16 freeNo;
/* 0x0BE */ u16 startBlock;
/* 0x0C0 */ CARDFileInfo* fileInfo;
/* 0x0C4 */ CARDCallback extCallback;
/* 0x0C8 */ CARDCallback txCallback;
/* 0x0CC */ CARDCallback exiCallback;
/* 0x0D0 */ CARDCallback apiCallback;
/* 0x0D4 */ CARDCallback xferCallback;
/* 0x0D8 */ CARDCallback eraseCallback;
/* 0x0DC */ CARDCallback unlockCallback;
/* 0x0E0 */ OSAlarm alarm;
/* 0x108 */ u32 cid;
/* 0x10C */ const DVDDiskID* diskID;
} CARDControl;
typedef struct CARDDecParam {
/* 0x00 */ u8* inputAddr;
/* 0x04 */ u32 inputLength;
/* 0x08 */ u32 aramAddr;
/* 0x0C */ u8* outputAddr;
} CARDDecParam;
typedef struct CARDID {
/* 0x000 */ u8 serial[32];
/* 0x020 */ u16 deviceID;
/* 0x022 */ u16 size;
/* 0x024 */ u16 encode;
/* 0x026 */ u8 padding[470];
/* 0x1FC */ u16 checkSum;
/* 0x1FE */ u16 checkSumInv;
} CARDID;
typedef struct CARDDirCheck {
/* 0x00 */ u8 padding0[56];
/* 0x38 */ u16 padding1;
/* 0x3A */ s16 checkCode;
/* 0x3C */ u16 checkSum;
/* 0x3E */ u16 checkSumInv;
} CARDDirCheck;
typedef struct CARDStat {
/* 0x00 */ char fileName[CARD_FILENAME_MAX];
/* 0x20 */ u32 length;
/* 0x24 */ u32 time;
/* 0x28 */ u8 gameName[4];
/* 0x2C */ u8 company[2];
/* 0x2E */ u8 bannerFormat;
/* 0x30 */ u32 iconAddr;
/* 0x34 */ u16 iconFormat;
/* 0x36 */ u16 iconSpeed;
/* 0x38 */ u32 commentAddr;
/* 0x3C */ u32 offsetBanner;
/* 0x40 */ u32 offsetBannerTlut;
/* 0x44 */ u32 offsetIcon[CARD_ICON_MAX];
/* 0x64 */ u32 offsetIconTlut;
/* 0x68 */ u32 offsetData;
} CARDStat;
#define CARD_ATTR_PUBLIC 0x04u
#define CARD_ATTR_NO_COPY 0x08u
#define CARD_ATTR_NO_MOVE 0x10u
#define CARD_ATTR_GLOBAL 0x20u
#define CARD_ATTR_COMPANY 0x40u
#define CARD_FAT_AVAIL 0x0000u
#define CARD_FAT_CHECKSUM 0x0000u
#define CARD_FAT_CHECKSUMINV 0x0001u
#define CARD_FAT_CHECKCODE 0x0002u
#define CARD_FAT_FREEBLOCKS 0x0003u
#define CARD_FAT_LASTSLOT 0x0004u
#define CARD_WORKAREA_SIZE (5 * 8 * 1024)
#define CARD_SEG_SIZE 0x200u
#define CARD_PAGE_SIZE 0x80u
#define CARD_MAX_SIZE 0x01000000U
#define CARD_NUM_SYSTEM_BLOCK 5
#define CARD_SYSTEM_BLOCK_SIZE (8 * 1024u)
#define CARD_MAX_MOUNT_STEP (CARD_NUM_SYSTEM_BLOCK + 2)
#define CARD_STAT_SPEED_END 0
#define CARD_STAT_SPEED_FAST 1
#define CARD_STAT_SPEED_MIDDLE 2
#define CARD_STAT_SPEED_SLOW 3
#define CARD_STAT_SPEED_MASK 3
#define CARD_STAT_ANIM_LOOP 0
#define CARD_STAT_ANIM_BOUNCE 4
#define CARD_STAT_ANIM_MASK 0x4
#define CARD_RESULT_UNLOCKED 1
#define CARD_RESULT_READY 0
#define CARD_RESULT_BUSY -1
#define CARD_RESULT_WRONGDEVICE -2
#define CARD_RESULT_NOCARD -3
#define CARD_RESULT_NOFILE -4
#define CARD_RESULT_IOERROR -5
#define CARD_RESULT_BROKEN -6
#define CARD_RESULT_EXIST -7
#define CARD_RESULT_NOENT -8
#define CARD_RESULT_INSSPACE -9
#define CARD_RESULT_NOPERM -10
#define CARD_RESULT_LIMIT -11
#define CARD_RESULT_NAMETOOLONG -12
#define CARD_RESULT_ENCODING -13
#define CARD_RESULT_CANCELED -14
#define CARD_RESULT_FATAL_ERROR -128
#define CARDIsValidBlockNo(card, blockNo) ((blockNo) >= CARD_NUM_SYSTEM_BLOCK && (blockNo) < (card)->cBlock)
#define CARD_READ_SIZE 512
#define CARD_COMMENT_SIZE 64
#define CARD_ICON_WIDTH 32
#define CARD_ICON_HEIGHT 32
#define CARD_BANNER_WIDTH 96
#define CARD_BANNER_HEIGHT 32
#define CARD_STAT_ICON_NONE 0
#define CARD_STAT_ICON_C8 1
#define CARD_STAT_ICON_RGB5A3 2
#define CARD_STAT_ICON_MASK 3
#define CARD_STAT_BANNER_NONE 0
#define CARD_STAT_BANNER_C8 1
#define CARD_STAT_BANNER_RGB5A3 2
#define CARD_STAT_BANNER_MASK 3
#define CARD_ENCODE_ANSI 0
#define CARD_ENCODE_SJIS 1
#define CARDGetDirCheck(dir) ((CARDDirCheck*)&(dir)[CARD_MAX_FILE])
#define CARDGetBannerFormat(stat) (((stat)->bannerFormat) & CARD_STAT_BANNER_MASK)
#define CARDGetIconAnim(stat) (((stat)->bannerFormat) & CARD_STAT_ANIM_MASK)
#define CARDGetIconFormat(stat, n) (((stat)->iconFormat >> (2 * (n))) & CARD_STAT_ICON_MASK)
#define CARDGetIconSpeed(stat, n) (((stat)->iconSpeed >> (2 * (n))) & CARD_STAT_SPEED_MASK)
#define CARDSetBannerFormat(stat, f) \
((stat)->bannerFormat = (u8)(((stat)->bannerFormat & ~CARD_STAT_BANNER_MASK) | (f)))
#define CARDSetIconAnim(stat, f) \
((stat)->bannerFormat = (u8)(((stat)->bannerFormat & ~CARD_STAT_ANIM_MASK) | (f)))
#define CARDSetIconFormat(stat, n, f) \
((stat)->iconFormat = \
(u16)(((stat)->iconFormat & ~(CARD_STAT_ICON_MASK << (2 * (n)))) | ((f) << (2 * (n)))))
#define CARDSetIconSpeed(stat, n, f) \
((stat)->iconSpeed = \
(u16)(((stat)->iconSpeed & ~(CARD_STAT_SPEED_MASK << (2 * (n)))) | ((f) << (2 * (n)))))
#define CARDSetIconAddress(stat, addr) ((stat)->iconAddr = (u32)(addr))
#define CARDSetCommentAddress(stat, addr) ((stat)->commentAddr = (u32)(addr))
#define CARDGetFileNo(fileInfo) ((fileInfo)->fileNo)
extern u32 __CARDFreq;
#if DEBUG
#define CARDFreq __CARDFreq
#else
#define CARDFreq EXI_FREQ_16M
#endif
void CARDInit(void);
s32 CARDGetResultCode(s32 chan);
s32 CARDCheckAsync(s32 chan, CARDCallback callback);
s32 CARDFreeBlocks(s32 chan, s32* byteNotUsed, s32* filesNotUsed);
s32 CARDRenameAsync(s32 chan, const char* oldName, const char* newName, CARDCallback callback);
// CARDBios
void CARDInit(void);
s32 CARDGetResultCode(s32 chan);
s32 CARDFreeBlocks(s32 chan, s32* byteNotUsed, s32* filesNotUsed);
s32 CARDGetEncoding(s32 chan, u16* encode);
s32 CARDGetMemSize(s32 chan, u16* size);
s32 CARDGetSectorSize(s32 chan, u32* size);
const DVDDiskID* CARDGetDiskID(s32 chan);
s32 CARDSetDiskID(s32 chan, const DVDDiskID* diskID);
BOOL CARDSetFastMode(BOOL enable);
BOOL CARDGetFastMode(void);
s32 CARDGetCurrentMode(s32 chan, u32* mode);
// CARDCheck
s32 CARDCheckExAsync(s32 chan, s32* xferBytes, CARDCallback callback);
s32 CARDCheckAsync(s32 chan, CARDCallback callback);
s32 CARDCheckEx(s32 chan, s32* xferBytes);
s32 CARDCheck(s32 chan);
// CARDCreate
s32 CARDCreateAsync(s32 chan, const char* fileName, u32 size, CARDFileInfo* fileInfo, CARDCallback callback);
s32 CARDCreate(s32 chan, const char* fileName, u32 size, CARDFileInfo* fileInfo);
// CARDDelete
s32 CARDFastDeleteAsync(s32 chan, s32 fileNo, CARDCallback callback);
s32 CARDFastDelete(s32 chan, s32 fileNo);
s32 CARDDeleteAsync(s32 chan, const char* fileName, CARDCallback callback);
s32 CARDDelete(s32 chan, const char* fileName);
// CARDErase
s32 CARDEraseAsync(CARDFileInfo* fileInfo, s32 length, s32 offset, CARDCallback callback);
s32 CARDErase(CARDFileInfo* fileInfo, s32 length, s32 offset);
// CARDFormat
s32 CARDFormat(s32 chan);
// CARDMount
int CARDProbe(s32 chan);
s32 CARDProbeEx(s32 chan, s32* memSize, s32* sectorSize);
s32 CARDMountAsync(s32 chan, void* workArea, CARDCallback detachCallback, CARDCallback attachCallback);
s32 CARDMount(s32 chan, void* workArea, CARDCallback detachCallback);
s32 CARDUnmount(s32 chan);
// CARDNet
u16 CARDSetVendorID(u16 vendorID);
u16 CARDGetVendorID();
s32 CARDGetSerialNo(s32 chan, u64* serialNo);
s32 CARDGetUniqueCode(s32 chan, u64* uniqueCode);
s32 CARDGetAttributes(s32 chan, s32 fileNo, u8* attr);
s32 CARDSetAttributesAsync(s32 chan, s32 fileNo, u8 attr, CARDCallback callback);
s32 CARDSetAttributes(s32 chan, s32 fileNo, u8 attr);
// CARDOpen
s32 CARDFastOpen(s32 chan, s32 fileNo, CARDFileInfo* fileInfo);
s32 CARDOpen(s32 chan, const char* fileName, CARDFileInfo* fileInfo);
s32 CARDClose(CARDFileInfo* fileInfo);
// CARDProgram
s32 CARDProgramAsync(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset, CARDCallback callback);
s32 CARDProgram(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset);
// CARDRdwr
s32 CARDGetXferredBytes(s32 chan);
// CARDRead
s32 CARDReadAsync(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset, CARDCallback callback);
s32 CARDRead(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset);
s32 CARDCancel(CARDFileInfo* fileInfo);
// CARDRename
s32 CARDRename(s32 chan, const char* oldName, const char* newName);
// CARDStat
s32 CARDGetStatus(s32 chan, s32 fileNo, CARDStat* stat);
s32 CARDSetStatusAsync(s32 chan, s32 fileNo, CARDStat* stat, CARDCallback callback);
s32 CARDSetStatus(s32 chan, s32 fileNo, CARDStat* stat);
// CARDWrite
s32 CARDWriteAsync(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset, CARDCallback callback);
s32 CARDWrite(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset);
#ifdef __cplusplus
}
#endif
#endif
+48 -7
View File
@@ -2,10 +2,14 @@
#define _REVOLUTION_HBM_H_
#include <revolution/kpad.h>
#include <revolution/mem.h>
#ifdef __cplusplus
extern "C" {
#endif
#define NW4HBM_VERSION(major, minor) ((major & 0xFF) << 8 | minor & 0xFF)
typedef enum HBMSelectBtnNum {
HBM_SELECT_NULL = -1,
@@ -18,8 +22,45 @@ typedef enum HBMSelectBtnNum {
HBM_SELECT_MAX
} HBMSelectBtnNum;
// TODO: move this later
typedef struct MEMAllocator MEMAllocator;
enum HBMSoundEvent_et {
HBM_SOUND_EVENT_0, // StartInitSound? and then num would not matter
HBM_SOUND_EVENT_1, // EndInitSound? and then num would not matter
HBM_SOUND_EVENT_2, // Fadeout, num = ms? see calc_fadeoutAnm
HBM_SOUND_EVENT_3, // Blackout, num = ms? from various
HBM_SOUND_EVENT_4, // ShutdownSound? and then num would not matter
HBM_SOUND_EVENT_PLAY, /* num = HBMSound_et (see below) */
};
enum HBMSound_et {
HBM_SOUND_HOME_BUTTON,
HBM_SOUND_RETURN_APP,
HBM_SOUND_GOTO_MENU,
HBM_SOUND_RESET_APP,
HBM_SOUND_FOCUS,
HBM_SOUND_SELECT,
HBM_SOUND_CANCEL,
HBM_SOUND_OPEN_CONTROLLER,
HBM_SOUND_CLOSE_CONTROLLER,
HBM_SOUND_VOLUME_PLUS,
HBM_SOUND_VOLUME_MINUS,
HBM_SOUND_VOLUME_PLUS_LIMIT,
HBM_SOUND_VOLUME_MINUS_LIMIT,
HBM_SOUND_NOTHING_DONE,
HBM_SOUND_VIBE_ON,
HBM_SOUND_VIBE_OFF,
HBM_SOUND_START_CONNECT_WINDOW,
HBM_SOUND_CONNECTED1,
HBM_SOUND_CONNECTED2,
HBM_SOUND_CONNECTED3,
HBM_SOUND_CONNECTED4,
HBM_SOUND_END_CONNECT_WINDOW,
HBM_SOUND_MANUAL_OPEN,
HBM_SOUND_MANUAL_FOCUS,
HBM_SOUND_MANUAL_SELECT,
HBM_SOUND_MANUAL_SCROLL,
HBM_SOUND_MANUAL_CANCEL,
HBM_SOUND_MANUAL_RETURN_APP
};
typedef int HBMSoundCallback(int evt, int num);
typedef struct HBMDataInfo {
@@ -32,11 +73,11 @@ typedef struct HBMDataInfo {
/* 0x18 */ int backFlag;
/* 0x1C */ int region;
/* 0x20 */ int cursor;
/* 0x24 */ u32 memSize;
/* 0x28 */ f32 frameDelta;
/* 0x2C */ Vec2 adjust;
/* 0x34 */ MEMAllocator* pAllocator;
} HBMDataInfo; // size 0x38
/* 0x28 */ u32 memSize;
/* 0x2C */ f32 frameDelta;
/* 0x30 */ Vec2 adjust;
/* 0x38 */ MEMAllocator* pAllocator;
} HBMDataInfo; // size 0x3C
typedef struct HBMKPadData {
KPADStatus* kpad;
+8
View File
@@ -0,0 +1,8 @@
#ifndef _REVOLUTION_MEM_H_
#define _REVOLUTION_MEM_H_
#include <revolution/mem/allocator.h>
#include <revolution/mem/expHeap.h>
#include <revolution/mem/heapCommon.h>
#endif // _REVOLUTION_MEM_H_
+37
View File
@@ -0,0 +1,37 @@
#ifndef _REVOLUTION_MEM_ALLOCATOR_H_
#define _REVOLUTION_MEM_ALLOCATOR_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <revolution/mem/heapCommon.h>
#include <revolution/types.h>
typedef struct MEMAllocator MEMAllocator;
typedef void* (*MEMFuncAllocatorAlloc)(MEMAllocator* pAllocator, u32 size);
typedef void (*MEMFuncAllocatorFree)(MEMAllocator* pAllocator, void* memBlock);
typedef struct MEMAllocatorFunc MEMAllocatorFunc;
struct MEMAllocatorFunc {
MEMFuncAllocatorAlloc pfAlloc;
MEMFuncAllocatorFree pfFree;
};
struct MEMAllocator {
const MEMAllocatorFunc* pFunc;
void* pHeap;
u32 heapParam1;
u32 heapParam2;
};
void* MEMAllocFromAllocator(MEMAllocator*, u32);
void MEMFreeToAllocator(MEMAllocator*, void*);
void MEMInitAllocatorForExpHeap(MEMAllocator*, MEMHeapHandle, int);
void MEMInitAllocatorForFrmHeap(MEMAllocator* allocator, struct MEMiHeapHead* heap, s32 align);
#ifdef __cplusplus
}
#endif
#endif // _REVOLUTION_MEM_ALLOCATOR_H_
+50
View File
@@ -0,0 +1,50 @@
#ifndef _REVOLUTION_MEM_EXPHEAP_H_
#define _REVOLUTION_MEM_EXPHEAP_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <revolution/mem/heapCommon.h>
typedef struct MEMiExpHeapMBlockHead MEMiExpHeapMBlockHead;
struct MEMiExPheapMBlockHead {
u16 signature;
union {
u16 val;
struct {
u16 allocDir : 1;
u16 alignment : 7;
u16 groupID : 8;
} fields;
} attribute;
u32 blockSize;
MEMiExpHeapMBlockHead* prev;
MEMiExpHeapMBlockHead* next;
};
MEMHeapHandle MEMCreateExpHeapEx(void*, u32, u16);
void* MEMDestroyExpHeap(MEMHeapHandle);
void* MEMAllocFromExpHeapEx(MEMHeapHandle, u32, int);
void MEMFreeToExpHeap(MEMHeapHandle, void*);
u32 MEMGetAllocatableSizeForExpHeapEx(MEMHeapHandle, int);
MEMHeapHandle MEMCreateFrmHeapEx(void* start, u32 size, u16 opt);
MEMHeapHandle MEMDestroyFrmHeap(MEMHeapHandle heap);
static inline MEMHeapHandle MEMCreateExpHeap(void* start, u32 size) {
return MEMCreateExpHeapEx(start, size, 0);
}
static inline void* MEMAllocFromExpHeap(MEMHeapHandle heap, u32 size) {
return MEMAllocFromExpHeapEx(heap, size, 4);
}
#ifdef __cplusplus
}
#endif
#endif // _REVOLUTION_MEM_EXPHEAP_H_
+43
View File
@@ -0,0 +1,43 @@
#ifndef _REVOLUTION_MEM_HEAPCOMMON_H_
#define _REVOLUTION_MEM_HEAPCOMMON_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <revolution/mem/list.h>
#include <revolution/os.h>
typedef struct MEMiHeapHead MEMiHeapHead;
struct MEMiHeapHead {
u32 signature;
MEMLink link;
MEMList childList;
void* heapStart;
void* heapEnd;
OSMutex mutex;
union {
u32 val;
struct {
u32 reserved : 24;
u32 optFlag : 8;
} fields;
} attribute;
};
typedef MEMiHeapHead* MEMHeapHandle;
typedef u32 UIntPtr;
static inline UIntPtr GetUIntPtr(const void* ptr) {
return (UIntPtr)(ptr);
}
#ifdef __cplusplus
}
#endif
#endif // _REVOLUTION_MEM_HEAPCOMMON_H_
+31
View File
@@ -0,0 +1,31 @@
#ifndef _REVOLUTION_MEM_LIST_H_
#define _REVOLUTION_MEM_LIST_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <revolution/types.h>
typedef struct {
void* prev;
void* next;
} MEMLink;
typedef struct {
void* head;
void* tail;
u16 num;
u16 offs;
} MEMList;
void MEMInitList(MEMList*, u16);
void MEMAppendListObject(MEMList*, void*);
void MEMRemoveListObject(MEMList*, void*);
void* MEMGetNextListObject(MEMList*, void*);
#ifdef __cplusplus
}
#endif
#endif // _REVOLUTION_MEM_LIST_H_
+2
View File
@@ -11,6 +11,8 @@ typedef struct Vec {
f32 x, y, z;
} Vec, *VecPtr, Point3d, *Point3dPtr;
typedef const VecPtr CVecPtr;
typedef struct {
s16 x, y, z;
} S16Vec, *S16VecPtr;
+84 -32
View File
@@ -320,46 +320,98 @@ extern BOOL __OSInReboot;
#define ASSERT(cond) ASSERTLINE(__LINE__, cond)
inline s16 __OSf32tos16(__REGISTER f32 inF) {
#ifdef __MWERKS__
register s16 out;
u32 tmp;
register u32* tmpPtr = &tmp;
// clang-format off
static inline u8 __OSf32tou8(register f32 in) {
f32 a;
register f32* ptr = &a;
u8 r;
asm {
psq_st inF, 0(tmpPtr), 0x1, 5
lha out, 0(tmpPtr)
}
// clang-format on
return out;
#if defined(__MWERKS__)
asm { psq_st in, 0(ptr), 1, 2 };
#else
# pragma unused(in)
#endif
r = *(u8 *)ptr;
return r;
}
inline void OSf32tos16(f32* f, s16* out) {
*out = __OSf32tos16(*f);
}
static inline u16 __OSf32tou16(register f32 in) {
f32 a;
register f32* ptr = &a;
u16 r;
inline u8 __OSf32tou8(__REGISTER f32 inF) {
#ifdef __MWERKS__
register u8 out;
u32 tmp;
register u32* tmpPtr = &tmp;
// clang-format off
asm {
psq_st inF, 0(tmpPtr), 0x1, 2
lbz out, 0(tmpPtr)
}
// clang-format on
return out;
#if defined(__MWERKS__)
asm { psq_st in, 0(ptr), 1, 3 };
#else
# pragma unused(in)
#endif
r = *(u16 *)ptr;
return r;
}
inline void OSf32tou8(f32* f, u8* out) {
*out = __OSf32tou8(*f);
static inline s16 __OSf32tos16(register f32 in) {
f32 a;
register f32* ptr = &a;
s16 r;
#if defined(__MWERKS__)
asm { psq_st in, 0(ptr), 1, 5 };
#else
# pragma unused(in)
#endif
r = *(s16*)ptr;
return r;
}
static inline f32 __OSu16tof32(register u16 const* arg) {
register f32 ret;
#if defined(__MWERKS__)
asm { psq_l ret, 0(arg), 1, 3 };
#else
# pragma unused(arg)
ret = 0;
#endif
return ret;
}
static inline f32 __OSs16tof32(register s16 const* arg) {
register f32 ret;
#if defined(__MWERKS__)
asm { psq_l ret, 0(arg), 1, 5 };
#else
# pragma unused(arg)
ret = 0;
#endif
return ret;
}
static inline void OSf32tou8(f32 const* in, u8* out) {
*out = __OSf32tou8(*in);
}
static inline void OSf32tou16(f32 const* in, u16* out) {
*out = __OSf32tou16(*in);
}
static inline void OSf32tos16(f32 const* in, s16* out) {
*out = __OSf32tos16(*in);
}
static inline void OSs16tof32(s16 const* in, f32* out) {
*out = __OSs16tof32(in);
}
static inline void OSu16tof32(u16 const* in, f32* out) {
*out = __OSu16tof32(in);
}
static inline void OSInitFastCast(void) {
+52
View File
@@ -0,0 +1,52 @@
#ifndef _REVOLUTION_TPL_H_
#define _REVOLUTION_TPL_H_
#include <revolution/gx.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
u16 numEntries;
u8 unpacked;
u8 _4;
GXTlutFmt format;
char* data;
} TPLClutHeader, *TPLClutHeaderPtr;
typedef struct {
u16 height;
u16 width;
u32 format;
char* data;
GXTexWrapMode wrapS;
GXTexWrapMode wrapT;
GXTexFilter minFilter;
GXTexFilter magFilter;
f32 LODBias;
u8 edgeLODEnable;
u8 minLOD;
u8 maxLOD;
u8 unpacked;
} TPLHeader, *TPLHeaderPtr;
typedef struct {
TPLHeaderPtr textureHeader;
TPLClutHeaderPtr CLUTHeader;
} TPLDescriptor, *TPLDescriptorPtr;
typedef struct {
u32 versionNumber;
u32 numDescriptors;
TPLDescriptorPtr descriptorArray;
} TPLPalette, *TPLPalettePtr;
void TPLBind(TPLPalettePtr);
TPLDescriptorPtr TPLGet(TPLPalettePtr, u32);
#ifdef __cplusplus
}
#endif
#endif // _REVOLUTION_TPL_H_

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