Skip to content

Commit

Permalink
Add joy.c source file
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOnlyZac authored Jul 2, 2024
1 parent 9675ea2 commit 54de34d
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 2 deletions.
8 changes: 6 additions & 2 deletions config/sly1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ segments:
#- [0x, asm, P2/jack]
#- [0x, asm, P2/jlo]

- [0x6f0b8, asm, P2/joy]
- [0x6f0b8, c, P2/joy]

- [0x70608, asm, P2/jt]
#- [0x, asm, P2/jp]
Expand Down Expand Up @@ -409,8 +409,12 @@ segments:
#- [0x, data,, P2/ik]
#- [0x, data,, P2/jack]
#- [0x, data,, P2/jlo]
#- [0x, data, P2/joy]

- [0x163a50, data, P2/joy]
- [0x163e10, data]

#- [0x, data, P2/jt]

#- [0x, data,, P2/jp]
#- [0x, data,, P2/jsg]
#- [0x, data, P2/jump]
Expand Down
30 changes: 30 additions & 0 deletions config/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,32 @@ CcharmMost__Fv = 0x160D98; // type:func
reload_post_death = 0x160DA0; // type:func


// P2/joy.c
StartupJoy__Fv = 0x16E0B8; // type:func
AddGrfusr__Fi = 0x16E0F0; // type:func
RemoveGrfusr__Fi = 0x16E118; // type:func
UpdateGrfjoytFromGrfusr__Fv = 0x16E148; // type:func
InitJoy__FP3JOYii = 0x16E1A0; // type:func
UpdateJoy__FP3JOY = 0x16E238; // type:func
SetJoyJoys__FP3JOY4JOYS4JOYK = 0x16E630; // type:func
GetJoyXYDeflection__FP3JOYUcUcPfN23PUcT6PiP2LM = 0x16E738; // type:func
FReadJoy__FP3JOY = 0x16E940; // type:func
SetJoyBtnHandled__FP3JOYUs = 0x16EC20; // type:func
rumble_related = 0x16EC38; // type:func
StartJoySelection__FP3JOY = 0x16EC88; // type:func
DxSelectionJoy__FP3JOY = 0x16EC98; // type:func
DySelectionJoy__FP3JOY = 0x16EED0; // type:func
UBtnpJoy__FP3JOY4BTNP = 0x16F108; // type:func
AddCode__FP4CODE = 0x16F188; // type:func
_ResetCodes__Fv = 0x16F1F8; // type:func
_MatchCodes__FP3JOYUs = 0x16F238; // type:func
UpdateCodes__Fv = 0x16F2E0; // type:func
remove_all_fchts = 0x16F408; // type:func
AddFcht__Fi = 0x16F430; // type:func
Chetkido__Fv = 0x16F478; // type:func
StartupCodes__Fv = 0x16F588; // type:func


// P2/main.c
main = 0x185758; // type:func
StartupVU0 = 0x185A58; // type:func
Expand Down Expand Up @@ -203,3 +229,7 @@ rand = 0x1F6708; // type:func
// gcc/dp-bit.c
dpcmp = 0x1FD308; // type:func
fptodp = 0x1FD868; // type:func


// misc
memset = 0x1F5C0C; // type:func
50 changes: 50 additions & 0 deletions src/P2/joy.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#include "common.h"

INCLUDE_ASM(const s32, "P2/joy", StartupJoy__Fv);

INCLUDE_ASM(const s32, "P2/joy", AddGrfusr__Fi);

INCLUDE_ASM(const s32, "P2/joy", RemoveGrfusr__Fi);

INCLUDE_ASM(const s32, "P2/joy", UpdateGrfjoytFromGrfusr__Fv);

INCLUDE_ASM(const s32, "P2/joy", InitJoy__FP3JOYii);

INCLUDE_ASM(const s32, "P2/joy", UpdateJoy__FP3JOY);

INCLUDE_ASM(const s32, "P2/joy", SetJoyJoys__FP3JOY4JOYS4JOYK);

INCLUDE_ASM(const s32, "P2/joy", GetJoyXYDeflection__FP3JOYUcUcPfN23PUcT6PiP2LM);

INCLUDE_ASM(const s32, "P2/joy", FReadJoy__FP3JOY);

INCLUDE_ASM(const s32, "P2/joy", SetJoyBtnHandled__FP3JOYUs);

INCLUDE_ASM(const s32, "P2/joy", rumble_related);
INCLUDE_ASM(const s32, "P2/joy", func_0016EC80);

INCLUDE_ASM(const s32, "P2/joy", StartJoySelection__FP3JOY);

INCLUDE_ASM(const s32, "P2/joy", DxSelectionJoy__FP3JOY);

INCLUDE_ASM(const s32, "P2/joy", DySelectionJoy__FP3JOY);

INCLUDE_ASM(const s32, "P2/joy", UBtnpJoy__FP3JOY4BTNP);

INCLUDE_ASM(const s32, "P2/joy", AddCode__FP4CODE);
INCLUDE_ASM(const s32, "P2/joy", func_0016F1F0);

INCLUDE_ASM(const s32, "P2/joy", _ResetCodes__Fv);

INCLUDE_ASM(const s32, "P2/joy", _MatchCodes__FP3JOYUs);

INCLUDE_ASM(const s32, "P2/joy", UpdateCodes__Fv);

INCLUDE_ASM(const s32, "P2/joy", remove_all_fchts);

INCLUDE_ASM(const s32, "P2/joy", AddFcht__Fi);
INCLUDE_ASM(const s32, "P2/joy", func_0016F470);

INCLUDE_ASM(const s32, "P2/joy", Chetkido__Fv);

INCLUDE_ASM(const s32, "P2/joy", StartupCodes__Fv);

0 comments on commit 54de34d

Please sign in to comment.