diff --git a/configure.py b/configure.py index d7abac0..2ed45e1 100755 --- a/configure.py +++ b/configure.py @@ -222,7 +222,6 @@ def build_stuff( cpp = Path("tools") / "cc" / COMPILER / "mwccps2.exe" print({cpp}) - print({common_includes}) ninja.rule( "as", @@ -237,14 +236,13 @@ def build_stuff( f"s_in=$$(echo $in.S | sed 's,^[^/]*/[^/]*/,cc-src/,') && " # .............. 1) remove ../../ from path + prefix with cc-src/ + suffix with .S and store it into s_in var: ../src/file.c -> s_in=cc-src/src/file.c.S f'mkdir -p $$(dirname "$$s_in") && ' # ..................................... 2) create directory from s_in var: s_in=cc-src/src/path/to/file.c.S -> mkdir -p cc-src/src/path/to/ f"{game_compile_cmd} $$s_in -o $out && " # ................................. 5) compile assembly file into object - f"{ld}strip $out -N dummy-symbol-name" # ................................ 6) strip 'dummy-symbol-name' from object ), ) ninja.rule( "cc", description="cc $in", - command=f"{game_compile_cmd} $in -o $out && {ld}strip $out -N dummy-symbol-name", + command=f"{game_compile_cmd} $in -o $out", ) #ninja.rule( diff --git a/include/common.h b/include/common.h index 1ab5da8..96480c8 100644 --- a/include/common.h +++ b/include/common.h @@ -1,8 +1,6 @@ #ifndef COMMON_H #define COMMON_H -#include "include_asm.h" - typedef char s8; typedef short s16; typedef int s32; diff --git a/include/ee/registers.h b/include/ee/registers.h index 3a5c9df..6e4a159 100644 --- a/include/ee/registers.h +++ b/include/ee/registers.h @@ -5,4 +5,5 @@ #define REG_RCNT0_MODE (volatile u_int *)0x10000010 #define REG_RCNT1_COUNT (volatile u_int *)0x10000800 #define REG_RCNT1_MODE (volatile u_int *)0x10000810 +#define REG_RCNT0_TARGET (volatile u_int *)0x10000020 #endif // EE_REGISTERS_H \ No newline at end of file diff --git a/src/cs4/Seimei/src/File.h b/src/cs4/Seimei/src/File.h index 3fa7a54..dd81bc5 100644 --- a/src/cs4/Seimei/src/File.h +++ b/src/cs4/Seimei/src/File.h @@ -3,6 +3,7 @@ void InitFileRead(); void InitFileSystem(); +void ReadRootPath(); +unsigned char * GetRootPath(); - -#endif // FILE_H \ No newline at end of file +#endif // FILE_H diff --git a/src/cs4/Seimei/src/Main.c b/src/cs4/Seimei/src/Main.c index 3399b48..fdba495 100644 --- a/src/cs4/Seimei/src/Main.c +++ b/src/cs4/Seimei/src/Main.c @@ -6,10 +6,15 @@ #include "Font.h" #include "Game.h" #include "Load.h" +#include "Memory.h" +#include "Pad.h" #include "Scene.h" #include "Script.h" +#include "Sound/Snd.h" +#include "String.h" #include "TexEffect.h" #include "Title.h" +#include "Unk.h" #include "common.h" #include "ee/eekernel.h" #include "ee/registers.h" @@ -19,6 +24,7 @@ int gTime; int GoToEndingFlag; int GoToTitleFlag; +struct _TMP_MENU_MNG_ST g_TmpMenuMng; void SetGoToEndingFade(void) { SetFadeMng(1, (sceVu0IVECTOR){0}, 30, NULL, SetGoToEndingFlag, 0, 0); diff --git a/src/cs4/Seimei/src/Memory.h b/src/cs4/Seimei/src/Memory.h new file mode 100644 index 0000000..5fec60c --- /dev/null +++ b/src/cs4/Seimei/src/Memory.h @@ -0,0 +1,5 @@ +#ifndef MEMORY_H +#define MEMORY_H +void MemInit(); + +#endif diff --git a/src/cs4/Seimei/src/Pad.h b/src/cs4/Seimei/src/Pad.h new file mode 100644 index 0000000..d71d865 --- /dev/null +++ b/src/cs4/Seimei/src/Pad.h @@ -0,0 +1,6 @@ +#ifndef PAD_H +#define PAD_H + +void SetPadVibFlag(unsigned char bFlag /* r2 */); + +#endif // PAD_H diff --git a/src/cs4/Seimei/src/Sound/Snd.h b/src/cs4/Seimei/src/Sound/Snd.h new file mode 100644 index 0000000..3f5f02a --- /dev/null +++ b/src/cs4/Seimei/src/Sound/Snd.h @@ -0,0 +1,6 @@ +#ifndef SND_H +#define SND_H + +void SND_RemoveSound(); + +#endif //SND_H diff --git a/src/cs4/Seimei/src/String.h b/src/cs4/Seimei/src/String.h new file mode 100644 index 0000000..bd96675 --- /dev/null +++ b/src/cs4/Seimei/src/String.h @@ -0,0 +1,7 @@ +#ifndef STRING_H +#define STRING_H + + +void StringCorrectPath4Disc(char * lpStrTop /* r2 */, signed int mode /* r18 */); + +#endif // STRING_H diff --git a/src/cs4/Seimei/src/Unk.h b/src/cs4/Seimei/src/Unk.h new file mode 100644 index 0000000..9d7313b --- /dev/null +++ b/src/cs4/Seimei/src/Unk.h @@ -0,0 +1,36 @@ +#ifndef UNK_H +#define UNK_H + +struct _MNG_STATE_ST { + // Members + signed int state; // offset 0x0, size 0x4 + unsigned int flag; // offset 0x4, size 0x4 + unsigned int calc_total_time; // offset 0x8, size 0x4 + unsigned int total_time; // offset 0xC, size 0x4 + unsigned int get_time; // offset 0x10, size 0x4 + unsigned int dmy[3]; // offset 0x14, size 0xC +}; + +struct _TMP_MENU_MNG_ST { + // Members + struct _MNG_STATE_ST mng_state; // offset 0x0, size 0x20 + signed int DrawState; // offset 0x20, size 0x4 + unsigned char * * pTmpMenuFileBuf; // offset 0x24, size 0x4 + float draw_up_rate; // offset 0x28, size 0x4 + unsigned char dmy[12]; // offset 0x2C, size 0xC +}; + +extern struct _TMP_MENU_MNG_ST g_TmpMenuMng; // size: 0x38, address: 0xA00C70 + +struct /* @anon0 */ { + // Members + unsigned char bLoad; // offset 0x0, size 0x1 + unsigned char movie_id; // offset 0x1, size 0x1 + unsigned char unused[2]; // offset 0x2, size 0x2 + unsigned short scene_id; // offset 0x4, size 0x2 + unsigned short cam_id; // offset 0x6, size 0x2 +} * lpSceneLoad; // size: 0x4, address: 0x257530 + + + +#endif // UNK_H