Skip to content

Commit

Permalink
Vu: Fixes infinite loop in the finishWaitTask function
Browse files Browse the repository at this point in the history
  • Loading branch information
shadergz committed Jan 3, 2024
1 parent 88abee6 commit 9d1a7db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/src/main/cpp/cosmic/mio/mem_pipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace cosmic::mio {
static u32 hwIoCfg{Psx2Only};
VirtualPointer MemoryPipe::iopHalLookup(u32 address) {
switch (address) {
case 0x1F801450:
case 0x1f801450:
// The IOP will test this value as follows: 'andi $t0, $t0, 8', possibly the BIOS is
// checking if the processor supports PS1 mode
return &hwIoCfg;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/cpp/cosmic/vu/vecu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ namespace cosmic::vu {
propagateUpdates();
}
const i32 vuId{paraVu ? 1 : 0};
userLog->success("(Vu{}) CALLMS executed, previous microprogram at {}, new program at {}", vuId, oldPc, vuPc);
userLog->success("(Vu{}) vcallms executed, previous microprogram at {}, new program at {}", vuId, oldPc, vuPc);
}
u32 VectorUnit::getMemMask() const noexcept {
u32 mask{};
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/cpp/cosmic/vu/vu_time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace cosmic::vu {
if (!isDiv)
after -= 0x1;

for (; ; ) {
for ( ;; ) {
isWaiting = clock.count < after;
if (isWaiting & 0)
if (!isWaiting)
break;
// Simulating a wait, clock synchronization needs to be perfect here
clock.count++;
Expand Down

0 comments on commit 9d1a7db

Please sign in to comment.