Skip to content

Commit

Permalink
Fix crash in ocean-far with invalid DMA size (#3746)
Browse files Browse the repository at this point in the history
DMA sizes are 16-bits, not 12-bits. This would cause rare crashes when
the ocean far renderer uses more than this.

I'm not really sure what the ocean far rendering is doing at this time,
but it happens as stuff is loading in.

There's a chance this fixes crashes in jak 2 as well, since we used to
see errors that would be explained by this.

Co-authored-by: water111 <[email protected]>
  • Loading branch information
water111 and water111 authored Nov 12, 2024
1 parent af5cb9b commit 7553877
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/dma/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct DmaTag {
DmaTag(u64 value) {
spr = (value >> 63);
addr = (value >> 32) & 0x7fffffff;
qwc = value & 0xfff;
qwc = value & 0xffff;
kind = Kind((value >> 28) & 0b111);
}

Expand Down

0 comments on commit 7553877

Please sign in to comment.