Skip to content

decomp 2 sets of spu buffer loading funcs. 1 for mono, 1 for stereo. - #144

Open
david-martin wants to merge 1 commit into
Xeeynamo:mainfrom
david-martin:dc/akao-6
Open

decomp 2 sets of spu buffer loading funcs. 1 for mono, 1 for stereo.#144
david-martin wants to merge 1 commit into
Xeeynamo:mainfrom
david-martin:dc/akao-6

Conversation

@david-martin

Copy link
Copy Markdown
Contributor

Unable to find when these actually get called, if at all, while debugging.

@david-martin
david-martin force-pushed the dc/akao-6 branch 2 times, most recently from a94d5d1 to b60cd97 Compare September 6, 2026 14:17
Comment thread src/main/akao.c Outdated
SpuSetTransferStartAddr(0x77000);
func_80038F04(D_80062FE0, 0x1000);
SpuSetIRQ(0);
if ((u32)D_80063004 >= 0x1001U) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like type of D_80063004 should just be u32?

@Xeeynamo Xeeynamo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome back David :)

I left a few comments.

Comment thread src/main/akao.c Outdated
SpuSetTransferStartAddr(0x77000);
func_80038F04(D_80062FE0, 0x1000);
SpuSetIRQ(0);
if ((u32)D_80063004 >= 0x1001U) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((u32)D_80063004 >= 0x1001U) {
if (D_80063004 > 0x1000) {

I think D_80063004 was a real unsigned. You would need to change the type to u32

Comment thread src/main/akao.c Outdated
SpuSetIRQ(0);
if ((u32)D_80063004 >= 0x1001U) {
SpuSetIRQAddr(0x77000);
SpuSetIRQCallback(&AkaoStreamIrqCallbackMono1);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SpuSetIRQCallback(&AkaoStreamIrqCallbackMono1);
SpuSetIRQCallback(AkaoStreamIrqCallbackMono1);

Functions are already treated as pointers when passed as parameter, so & is not required. Same applies to the other proposed changes in this PR

Comment thread src/main/akao.c Outdated
SpuSetIRQ(0);
SpuSetVoiceLoopStartAddr(0x10, 0x77000);
SpuSetVoiceLoopStartAddr(0x11, 0x77800);
if ((u32)D_80063004 >= 0x1001U) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((u32)D_80063004 >= 0x1001U) {
if (D_80063004 >= 0x1000) {

see https://github.com/Xeeynamo/ff7-decomp/pull/144/changes#r3945485864

Comment thread src/main/akao.c Outdated
SpuSetIRQ(0);
SpuSetVoiceLoopStartAddr(0x10, 0x78000);
SpuSetVoiceLoopStartAddr(0x11, 0x78800);
if ((u32)D_80063004 >= 0x1001U) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((u32)D_80063004 >= 0x1001U) {
if (D_80063004 >= 0x1000) {

Signed-off-by: David Martin <irldavem@gmail.com>
@david-martin

Copy link
Copy Markdown
Contributor Author

Welcome back David :)

I left a few comments.

Thanks.
Addressed the feedback.
The unsigned makes sense, to avoid casting, and it would naturally be a postive number (how much has been read)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants