Skip to content
Snippets Groups Projects
Commit 668d5417 authored by Geo Ster's avatar Geo Ster
Browse files

Don't write out of bounds

* VU0 tries to access address 0x4210 which maps to the VU1 I/O registers.
Currently we don't have VU1 support so abort when trying to write to these
locations
parent 0cde5eb1
No related branches found
No related tags found
No related merge requests found
......@@ -94,9 +94,14 @@ namespace vu
/* VI[is] contains the address divided by 16 */
uint32_t address = regs.vi[is] * 16;
fmt::print("[VU0] VISWR Writing VI[{}] = {:#x} to address {:#x} (", it, regs.vi[it], address);
/* HACK */
if (address > 0xff0)
return;
auto ptr = (uint32_t*)&data[address];
fmt::print("[VU0] VISWR Writing VI[{}] = {:#x} to address {:#x} (", it, regs.vi[it], address);
for (int i = 0; i < 4; i++)
{
/* If the component is set in the dest mask */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment