public override void Discompile(Program p,int address,bool direct) { //p.WriteLine("ZZ_ONCEBRANCH(0x{0:X},{1});",address,p.Clocks);return; if (!direct) throw new PSXException(); Word nextword = p[address + 4]; Word branchword = p[address + offset * 4 + 4]; if (rs == Register.R0) { nextword.Discompile(false); p.WriteClocks(1,branchword.Address); p.WriteLine("goto {0};",branchword.Label); } else { p.WriteLine("if ((int32_t){0} >= 0)",rs); p.WriteLine("{{"); p.Indent(); nextword.Discompile(false); p.WriteClocks(1,branchword.Address); p.WriteLine("goto {0};",branchword.Label); p.Unindent(); p.WriteLine("}}"); } }
public override void Discompile(Program p, int address, bool direct) { //p.WriteLine("ZZ_ONCEBRANCH(0x{0:X},{1});",address,p.Clocks);return; if (!direct) { throw new PSXException(); } Word nextword = p[address + 4]; Word branchword = p[address + offset * 4 + 4]; if (rs == Register.R0) { nextword.Discompile(false); p.WriteClocks(1, branchword.Address); p.WriteLine("goto {0};", branchword.Label); } else { p.WriteLine("if ((int32_t){0} >= 0)", rs); p.WriteLine("{{"); p.Indent(); nextword.Discompile(false); p.WriteClocks(1, branchword.Address); p.WriteLine("goto {0};", branchword.Label); p.Unindent(); p.WriteLine("}}"); } }
public override void Discompile(Program p,int address,bool direct) { //p.WriteLine("ZZ_ONCEBRANCH(0x{0:X},{1});",address,p.Clocks);return; if (!direct) throw new PSXException(); Word nextword = p[address + 4]; Word branchword = p[(address & ~0xFFFFFFF) | target << 2]; nextword.Discompile(false); p.WriteClocks(1,branchword.Address); p.WriteLine("goto {0};",branchword.Label); }
public override void Discompile(Program p, int address, bool direct) { //p.WriteLine("ZZ_ONCEBRANCH(0x{0:X},{1});",address,p.Clocks);return; if (!direct) { throw new PSXException(); } Word nextword = p[address + 4]; Word branchword = p[(address & ~0xFFFFFFF) | target << 2]; nextword.Discompile(false); p.WriteClocks(1, branchword.Address); p.WriteLine("goto {0};", branchword.Label); }