reckes / mupen64plus

Automatically exported from code.google.com/p/mupen64plus
0 stars 0 forks source link

Some disassembler bugs #199

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Describe your system:
 - Machine type: 32-bit
 - Mupen64Plus version: r1282

Describe the problem:
Some opcodes are not showing correct in the disassembler window. The
attached patch will solve some of these.

To verify the changes I have started Super Mario Super Mario 64 (U) [!] in
Nemu64 and put a break on the changed opcodes. After that I made breakpoint
on the same addresses in Mupen and compared.

Address    In Nemu64           Mupen(patched)         Mupen (trunk)
0x80327CD0 CFC1 K1,F31         cfc1 $k1,$f31          $k1,$ra
0x80327E2C CTC1 K1,F31         ctc1 $k1,$f31          $k1,$ra
0x80319D1C MFC1 A1,F0          mfc1 $a1,$f0           $a1,$f0
0x80319CD0 MTC1 T8,F4          mtc1 $t8,$f4           $f2,$a0
0x8031FE48 LWC1 F20,0x9738(AT) lwc1 $f20,0x9738($at)  $s4,0x9738($at)
0x80267F94 LDC1 F20,0x0018(SP) ldc1 $f20,0x0018($sp)  $s4,0x0018($sp)
0x8031B09C SWC1 F4,0x0034(V0)  swc1 $f4,0x0034($v0)   $a0,0x0034($v0)

Original issue reported on code.google.com by olejl77@gmail.com on 15 Jan 2009 at 7:04

Attachments:

GoogleCodeExporter commented 8 years ago
The opcodes: BGTZL, BLEZL, DMTC1, and LLD didn't occur when I played around with
Super Mario for a short time, so they are not verified.

Original comment by olejl77@gmail.com on 15 Jan 2009 at 8:09

GoogleCodeExporter commented 8 years ago
Ok I have checked the last 4 opcodes:

Memory addr   Memory value   In Nemu64             Mupen(patched)
0x80000184    0x5C200000     BGTZL AT,0x80000188   bgtzl $at,$ro,0x80000188 
0x80000194    0x58200000     BLEZL AT,0x80000198   blezl $at,$ro,0x80000198
0x800001A4    0x44A10800     DMTC1 AT,F1           dmtc1 $f1,$at
0x800001B4    0xD0210000     ?     (52)            lld $at, 0x0000($at)

The last 2 are a little different from nemu. Some modifications to the patch is
required. To be continued...

Original comment by olejl77@gmail.com on 16 Jan 2009 at 1:22

GoogleCodeExporter commented 8 years ago
I made a mistake in my previous comment (#2). The Mupen(patched) results is 
really
Mupen (trunk). Here are the results after applying the patch:

Memory addr   Memory value   In Nemu64             Mupen(patched)
0x80000184    0x5C200000     BGTZL AT,0x80000188   bgtzl $at,0x80000188 
0x80000194    0x58200000     BLEZL AT,0x80000198   blezl $at,0x80000198
0x800001A4    0x44A10800     DMTC1 AT,F1           dmtc1 $at,$f1
0x800001B4    0xD0210000     ?     (52)            lld $at, 0x0000($at)

As far as I can see that should verify all the patched opcodes.

Original comment by olejl77@gmail.com on 16 Jan 2009 at 3:59

GoogleCodeExporter commented 8 years ago

Original comment by jezte...@gmail.com on 18 Jan 2009 at 8:54