Skip to content

Commit

Permalink
hoshino: A few fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
entriphy committed Jul 18, 2024
1 parent 9243809 commit f1b74a6
Show file tree
Hide file tree
Showing 12 changed files with 97 additions and 43 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set_target_properties(PS2_CRT0 PROPERTIES OUTPUT_NAME "crt0.o")
set(EXECUTABLES)

# C files
set(SUBDIRS abe harada hato hoshino kazuya nakano okanoyo taka take okanoyo/debug vtusr hoshino/kit vtusr/taro okanoyo/linux)
set(SUBDIRS abe harada hato hoshino kazuya nakano okanoyo taka take okanoyo/debug vtusr hoshino/kit hoshino/take vtusr/taro okanoyo/linux)
foreach (SUBDIR IN LISTS SUBDIRS)
file(GLOB files src/${SUBDIR}/*.c)
foreach (file ${files})
Expand Down
8 changes: 8 additions & 0 deletions src/hoshino/h_cdvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ void hCdCueFlushBGM2() {
}
}

void hCdCallback(s32 cb_reason) {
// Empty function
}

s32 hCdRead(u32 lsn, u32 sectors, void *buff, sceCdRMode *mode) {
sceCdDiskReady(0);
if (sceCdRead(lsn, sectors, buff, mode) == 0) {
Expand Down Expand Up @@ -214,6 +218,10 @@ s32 hCdReadSync() {
return 0;
}

s32 hCdDataStat() {
return cD->dataStat;
}

void hCdInit() {
u32 *buff;

Expand Down
1 change: 1 addition & 0 deletions src/hoshino/h_cdvd.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ extern s32 hCdGetSize(s32 no);
extern void hCdReadDataBlock(s32 no, s32 buff);
extern void hCdReadData(s32 no, s32 buff);
extern s32 hCdReadSync();
extern s32 hCdDataStat();
extern void hCdInit();
extern void hCdMain();
extern s32 hCdDiscStatOK();
Expand Down
6 changes: 3 additions & 3 deletions src/hoshino/h_debug.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "h_debug.h"
#include "hoshino/h_debug.h"

void HsDeb2PtblInit() {
void HsDeb2PTblInit() {
// Empty function
}

void HsDeb2Ptbl() {
void HsDeb2PTbl() {
// Empty function
}
4 changes: 2 additions & 2 deletions src/hoshino/h_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "hoshino.h"

extern void HsDeb2PtblInit();
extern void HsDeb2Ptbl();
extern void HsDeb2PTblInit();
extern void HsDeb2PTbl();

#endif
4 changes: 2 additions & 2 deletions src/hoshino/h_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ void hSetTEXnDefault() {
*pk->p++ = c + SCE_GS_TEX1_1;
*pk->p++ = SCE_GS_SET_CLAMP(1, 1, 0, 0, 0, 0);
*pk->p++ = c + SCE_GS_CLAMP_1;
*pk->p++ = SCE_GS_SET_TEXA(0, 1, 1);
*pk->p++ = SCE_GS_SET_TEXA(0, 1, 128);
*pk->p++ = SCE_GS_TEXA;
*pk->p++ = SCE_GS_SET_ALPHA(0, 1, 0, 1, 1);
*pk->p++ = SCE_GS_SET_ALPHA(0, 1, 0, 1, 128);
*pk->p++ = c + SCE_GS_ALPHA_1;
*pk->p++ = SCE_GS_SET_TEST(0, 0, 0, 0, 0, 0, 1, 2);
*pk->p++ = c + SCE_GS_TEST_1;
Expand Down
20 changes: 11 additions & 9 deletions src/hoshino/h_sound.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#include "h_sound.h"
#include "h_rpc.h"
#include "h_gamesnd.h"
#include "h_menu.h"
#include "h_str.h"
#include "h_util.h"
#include "h_cdvd.h"
#include <eetypes.h>
#include <libsdr.h>
#include "hoshino/h_sound.h"
#include "hoshino/h_rpc.h"
#include "hoshino/h_gamesnd.h"
#include "hoshino/h_menu.h"
#include "hoshino/h_str.h"
#include "hoshino/h_util.h"
#include "hoshino/h_cdvd.h"
#include "hoshino/h_file.h"
#include "okanoyo/okio.h"
#include "h_file.h"

EFXSE efdm[1] = {
{4, 0.1f, 0, 0, 1, 0.05f, 0.0f, 0, 0}
Expand Down Expand Up @@ -716,7 +718,7 @@ void hSndPkSetPitch(s32 voice, s32 pitch) {
*sD->Pk++ = pitch >> 8;
}

void hSndPkSetPalPitch(s32 voice) {
void hSndPkPalPitch(s32 voice) {
sD->PkNum++;
*sD->Pk++ = SNDCMD_PALPITCH;
*sD->Pk++ = voice;
Expand Down
16 changes: 9 additions & 7 deletions src/hoshino/h_str.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#include "h_str.h"
#include "h_sound.h"
#include "h_cdvd.h"
#include "h_game.h"
#include "h_rpc.h"
#include "h_menu.h"
#include "h_test.h"
#include <eetypes.h>
#include <libsdr.h>
#include "hoshino/h_str.h"
#include "hoshino/h_sound.h"
#include "hoshino/h_cdvd.h"
#include "hoshino/h_game.h"
#include "hoshino/h_rpc.h"
#include "hoshino/h_menu.h"
#include "hoshino/h_test.h"

KLTABLE *KlTable = NULL; // ?
PPTTABLE *PptTable = NULL;
Expand Down
5 changes: 5 additions & 0 deletions src/hoshino/take/t_vu0work.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "hoshino/take/t_vu0work.h"

void TransVu0Prog() {
// Empty function
}
6 changes: 6 additions & 0 deletions src/hoshino/take/t_vu0work.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef TAKE_VU0WORK_H
#define TAKE_VU0WORK_H

extern void TransVu0Prog();

#endif
23 changes: 20 additions & 3 deletions tools/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4315,12 +4315,27 @@ setSprayEnv = 0x0022A7F8; // type:func
endSprayEnv = 0x0022A888; // type:func
aoWaveInit = 0x0022A8E8; // type:func
aoExecWave = 0x0022AAB0; // type:func
aoWaveEnd = 0x0022AB10; // type:func
aoVu0ViewClipMatrix = 0x0022AB18; // type:func
DrawParticle = 0x0022ABA8; // type:func
set_common_data = 0x0022AE80; // type:func
set_particle = 0x0022B0B0; // type:func
increment_ptcl = 0x0022B2A8; // type:func
check_timing = 0x0022B4B0; // type:func
sort_obj = 0x0022B5C0; // type:func
combsort = 0x0022B720; // type:func
SetParam = 0x0022B800; // type:func
calc_dist_vu0 = 0x0022B9A0; // type:func
print_vu1_Mem = 0x0022B9D0; // type:func
print_vu1_Micro = 0x0022BA70; // type:func
print_vu1_FloatRegister = 0x0022BB28; // type:func
print_vu1_IntRegister = 0x0022BC20; // type:func
print_vu1_ControlRegister = 0x0022BCA0; // type:func
print_pkt = 0x0022BDE0; // type:func
Init_CarSel_White = 0x0022CC40; // type:func
kitSetFireCpu = 0x0022CEF0; // type:func
kitChangeFireCpu = 0x0022D258; // type:func
kitExecFireMovieSend = 0x0022FD90; // type:func
kitWaveInit = 0x00234140; // type:func
kitExecWave = 0x00234368; // type:func
kitInitWaveTable = 0x00234C28; // type:func
Expand Down Expand Up @@ -4878,14 +4893,14 @@ thunk_FUN_002cee58 = 0x002CDA10; // type:func
freemem = 0x002CEE48; // type:func
CSwitchManager::Initialize = 0x002CEF90; // type:func
CSwitchManager::Update = 0x002CF2A8; // type:func
hSeKeyOn = 0x002CFB68; // type:func
hSeKeyOn2 = 0x002CFB68; // type:func
AbSys::Initialize = 0x002CFB70; // type:func
AbSys::Update = 0x002CFC50; // type:func
CParticleTakiA::Func = 0x002D04E8; // type:func
abSetTakiA = 0x002D0C20; // type:func
abDeleteTakiA = 0x002D0CF8; // type:func
abLoadTakiA = 0x002D0D00; // type:func
hSeKeyOn = 0x002D3098; // type:func
hSeKeyOn3 = 0x002D3098; // type:func
abRotTransPers = 0x002D30A0; // type:func
sceVu0OuterProduct = 0x002D30A8; // type:func
CObjTakiB::Init = 0x002D30B0; // type:func
Expand Down Expand Up @@ -6250,7 +6265,7 @@ ta_best = 0x003BC578; // type:symbol size:0x18
ObjGimTrain = 0x003BC590; // type:symbol size:0x4
ObjGimViking = 0x003BC598; // type:symbol size:0x8
__nkYume150FlearTbl = 0x003BC5B8; // type:symbol size:0x8
g_AoData_data = 0x003BC5D0; // type:symbol size:0xB8
data = 0x003BC5D0; // type:symbol size:0xB8
ObjFuncTbl = 0x003BC770; // type:symbol size:0x4
m_instance = 0x003BC7A0; // type:symbol size:0x4
__abJigenAnimeTbl = 0x003BC860; // type:symbol size:0xC
Expand Down Expand Up @@ -8094,6 +8109,8 @@ ViewMode = 0x003FBDAC; // type:symbol size:0x4
ViewSubMode = 0x003FBDB0; // type:symbol size:0x4
DirNum = 0x003FBDB4; // type:symbol size:0x4
ChrNum = 0x003FBDB8; // type:symbol size:0x4
param = 0x003FBE10; // type:symbol size:0x4
p_param = 0x003FBE20; // type:symbol size:0x4
dmaStat = 0x003FBE5C; // type:symbol size:0x2
_ipuTimeout = 0x003FBE5E; // type:symbol size:0x2
m_instance = 0x003FBE74; // type:symbol size:0x4
Expand Down
45 changes: 29 additions & 16 deletions tools/symbol_addrs_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4805,23 +4805,28 @@ setSprayEnv = 0x0022A7F8; // type:func
endSprayEnv = 0x0022A888; // type:func
aoWaveInit = 0x0022A8E8; // type:func
aoExecWave = 0x0022AAB0; // type:func
func_0022AB18 = 0x0022AB18; // type:func
aoWaveEnd = 0x0022AB10; // type:func
aoVu0ViewClipMatrix = 0x0022AB18; // type:func
DrawParticle = 0x0022ABA8; // type:func
func_0022AE80 = 0x0022AE80; // type:func
func_0022B0B0 = 0x0022B0B0; // type:func
set_common_data = 0x0022AE80; // type:func
set_particle = 0x0022B0B0; // type:func
increment_ptcl = 0x0022B2A8; // type:func
func_0022B4B0 = 0x0022B4B0; // type:func
func_0022B5C0 = 0x0022B5C0; // type:func
func_0022B720 = 0x0022B720; // type:func
check_timing = 0x0022B4B0; // type:func
sort_obj = 0x0022B5C0; // type:func
combsort = 0x0022B720; // type:func
SetParam = 0x0022B800; // type:func
func_0022B9A0 = 0x0022B9A0; // type:func
func_0022B9D0 = 0x0022B9D0; // type:func
func_0022BB28 = 0x0022BB28; // type:func
func_0022BC20 = 0x0022BC20; // type:func
func_0022BCA0 = 0x0022BCA0; // type:func
func_0022BDE0 = 0x0022BDE0; // type:func
calc_dist_vu0 = 0x0022B9A0; // type:func
print_vu1_Mem = 0x0022B9D0; // type:func
print_vu1_Micro = 0x0022BA70; // type:func
print_vu1_FloatRegister = 0x0022BB28; // type:func
print_vu1_IntRegister = 0x0022BC20; // type:func
print_vu1_ControlRegister = 0x0022BCA0; // type:func
print_pkt = 0x0022BDE0; // type:func
func_0022BE70 = 0x0022BE70; // type:func
func_0022BF18 = 0x0022BF18; // type:func
func_0022BF48 = 0x0022BF48; // type:func
func_0022BFC8 = 0x0022BFC8; // type:func
func_0022BFF8 = 0x0022BFF8; // type:func
func_0022C028 = 0x0022C028; // type:func
func_0022C098 = 0x0022C098; // type:func
func_0022C3A8 = 0x0022C3A8; // type:func
Expand All @@ -4835,6 +4840,7 @@ func_0022C968 = 0x0022C968; // type:func
func_0022CA30 = 0x0022CA30; // type:func
func_0022CAF8 = 0x0022CAF8; // type:func
func_0022CB98 = 0x0022CB98; // type:func
func_0022CBC0 = 0x0022CBC0; // type:func
func_0022CBF8 = 0x0022CBF8; // type:func
Init_CarSel_White = 0x0022CC40; // type:func
func_0022CC78 = 0x0022CC78; // type:func
Expand All @@ -4860,8 +4866,11 @@ func_0022F328 = 0x0022F328; // type:func
func_0022F670 = 0x0022F670; // type:func
func_0022F690 = 0x0022F690; // type:func
func_0022F9F8 = 0x0022F9F8; // type:func
func_0022FC60 = 0x0022FC60; // type:func
func_0022FCA8 = 0x0022FCA8; // type:func
func_0022FCF0 = 0x0022FCF0; // type:func
func_0022FD38 = 0x0022FD38; // type:func
func_0022FD90 = 0x0022FD90; // type:func
kitExecFireMovieSend = 0x0022FD90; // type:func
func_0022FE08 = 0x0022FE08; // type:func
func_002305B8 = 0x002305B8; // type:func
func_00230B30 = 0x00230B30; // type:func
Expand Down Expand Up @@ -6460,7 +6469,7 @@ func_002CF9A8 = 0x002CF9A8; // type:func
func_002CF9F8 = 0x002CF9F8; // type:func
func_002CFB18 = 0x002CFB18; // type:func
func_002CFB58 = 0x002CFB58; // type:func
hSeKeyOn = 0x002CFB68; // type:func
hSeKeyOn2 = 0x002CFB68; // type:func
AbSys::Initialize = 0x002CFB70; // type:func
AbSys::Update = 0x002CFC50; // type:func
func_002D00C8 = 0x002D00C8; // type:func
Expand All @@ -6483,7 +6492,7 @@ func_002D1FC0 = 0x002D1FC0; // type:func
func_002D24C8 = 0x002D24C8; // type:func
func_002D2FD8 = 0x002D2FD8; // type:func
func_002D3078 = 0x002D3078; // type:func
hSeKeyOn = 0x002D3098; // type:func
hSeKeyOn3 = 0x002D3098; // type:func
abRotTransPers = 0x002D30A0; // type:func
sceVu0OuterProduct = 0x002D30A8; // type:func
CObjTakiB::Init = 0x002D30B0; // type:func
Expand Down Expand Up @@ -6584,10 +6593,12 @@ nkGetPlooks = 0x002DB730; // type:func
nkGetPad = 0x002DB750; // type:func
func_002DB760 = 0x002DB760; // type:func
func_002DB928 = 0x002DB928; // type:func
func_002DB9D0 = 0x002DB9D0; // type:func
func_002DBA00 = 0x002DBA00; // type:func
func_002DBA60 = 0x002DBA60; // type:func
func_002DBB68 = 0x002DBB68; // type:func
func_002DBC08 = 0x002DBC08; // type:func
func_002DBC90 = 0x002DBC90; // type:func
func_002DBE80 = 0x002DBE80; // type:func
func_002DC068 = 0x002DC068; // type:func
func_002DC0D8 = 0x002DC0D8; // type:func
Expand Down Expand Up @@ -8461,7 +8472,7 @@ ta_best = 0x003BC578; // type:symbol size:0x18
ObjGimTrain = 0x003BC590; // type:symbol size:0x4
ObjGimViking = 0x003BC598; // type:symbol size:0x8
__nkYume150FlearTbl = 0x003BC5B8; // type:symbol size:0x8
g_AoData_data = 0x003BC5D0; // type:symbol size:0xB8
data = 0x003BC5D0; // type:symbol size:0xB8
ObjFuncTbl = 0x003BC770; // type:symbol size:0x4
m_instance = 0x003BC7A0; // type:symbol size:0x4
__abJigenAnimeTbl = 0x003BC860; // type:symbol size:0xC
Expand Down Expand Up @@ -10305,6 +10316,8 @@ ViewMode = 0x003FBDAC; // type:symbol size:0x4
ViewSubMode = 0x003FBDB0; // type:symbol size:0x4
DirNum = 0x003FBDB4; // type:symbol size:0x4
ChrNum = 0x003FBDB8; // type:symbol size:0x4
param = 0x003FBE10; // type:symbol size:0x4
p_param = 0x003FBE20; // type:symbol size:0x4
dmaStat = 0x003FBE5C; // type:symbol size:0x2
_ipuTimeout = 0x003FBE5E; // type:symbol size:0x2
m_instance = 0x003FBE74; // type:symbol size:0x4
Expand Down

0 comments on commit f1b74a6

Please sign in to comment.