Skip to content

Commit

Permalink
Misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
snesrev committed Jul 15, 2023
1 parent c5905ff commit de17193
Show file tree
Hide file tree
Showing 11 changed files with 351 additions and 74 deletions.
3 changes: 3 additions & 0 deletions smb1/smb1_08.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ void UploadMainSampleData() {
}

void HandleSPCUploads_Main() {
if (g_use_my_apu_code)
RtlApuUpload(RomPtr(load24(R0_)));

return;
uint16 v0; // di
uint16 v1; // ax
Expand Down
7 changes: 6 additions & 1 deletion smb1/smb1_cpu_infra.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ static const uint32 kPatchedCarrys_SMB1[] = {
};

uint32 PatchBugs_SMB1(void) {
if (FixBugHook(0x088054) || FixBugHook(0x088007) || FixBugHook(0x088039) || FixBugHook(0x8827D)) {
if (FixBugHook(0x088054)) {
if (g_use_my_apu_code)
return 0x88AEA; // ret
RtlSetUploadingApu(true);
} else if (FixBugHook(0x088007) || FixBugHook(0x088039) || FixBugHook(0x8827D)) {
RtlSetUploadingApu(true);
} else if (FixBugHook(0x880C2)) {
RtlSetUploadingApu(false);
Expand Down Expand Up @@ -126,6 +130,7 @@ void Smb1RunOneFrameOfGame(void) {

if (snes->cpu->pc == 0x8000) {
RESET_GAME:
snes->cpu->pc = 0x8001;
Smb1VectorReset();
}
Smb1RunOneFrameOfGame_Internal();
Expand Down
Loading

0 comments on commit de17193

Please sign in to comment.