[graphics] MERC (#1124)

* merc dma generation

* wip very early version of merc

* small fixes

* fix

* fix more merc bugs

* derp fixed min

* oops we did need something weird on max

* merc for everything

* program optimization 1

* more optimization

* windows

* windows 2

* clean up

* fix test

* BLERC
This commit is contained in:
water111
2022-02-03 22:45:41 -05:00
committed by GitHub
parent 3d7228ec77
commit 2342b6fb0f
41 changed files with 8811 additions and 111 deletions
+14
View File
@@ -159,4 +159,18 @@ TEST(VuDisasm, Merc) {
VuDisassembler disasm(VuDisassembler::VuKind::VU1);
auto prog = disasm.disassemble(data.data(), data.size() * 4, false);
EXPECT_EQ(disasm.to_string(prog), get_expected("merc"));
}
TEST(VuDisasm, MercToC) {
auto data = get_test_data("merc");
VuDisassembler disasm(VuDisassembler::VuKind::VU1);
disasm.add_label_with_name(0x1a1, "JUMP_1A1");
disasm.add_label_with_name(0x48e, "JUMP_48E");
disasm.add_label_with_name(0x539, "JUMP_539");
disasm.add_label_with_name(0x243, "JUMP_243");
disasm.add_label_with_name(20, "ENTER_20");
disasm.add_label_with_name(35, "ENTER_35");
auto prog = disasm.disassemble(data.data(), data.size() * 4, false);
// fmt::print("{}\n", disasm.to_string_with_cpp(prog));
// EXPECT_EQ(disasm.to_string_with_cpp(prog), get_expected("merc"));
}