Open djipi opened 3 years ago
M68KDisassemble() function in m68kdasm.c is a good start to look at the problem. Problem has been spoted in the function ShowEA() within case imm1.
Depend the situation HandleMovem(buffer, offset, 1) is correct but for our case it should be 0 instead of 1.
Exemple of correct usage with parameter as 1: 48E7 7880 MVMLE.L D1-D4/A0, -(A7) 48E7 C080 MVMLE.L D0-D1/A0, -(A7) And as 0: 4CDF 011E MVMEL.L (A7)+, D1-D4/A0 4CDF 0103 MVMEL.L (A7)+, D0-D1/A0
moveq
and move sr,dx
are also wrong disassembled.
This is good to know, and I guess it occurs also in the original Virtual Jaguar 2.1.2 / 2.1.3. Could you provide a (small) binary using moveq and move sr,dx? It can help to investigate.
I will make one this evening.
Sorry, to tired. Anyway here the source and cof for the moveq and move ..,sr problem. disass.zip
Sorry, to tired. Anyway here the source and cof for the moveq and move ..,sr problem. disass.zip
No problems, thank you for the file. I do not promise a fix but I will look at it for sure.
No problem. Just collecting issues ;-) It is not the most urgent one.
Looked at the moveq issue and to make it "short", 2 problems arise. 1) The dasm is looking for .B, .W or .L to handle the move, so moveq will require a specific treatment for the dasm. -- The dasm considers the moveq as move.l because it simplify the treatment. 2) It will require an additional dasm type size to represent the moveq instruction.
It is possible to fix the moveq in the dasm within a cautious approach. At time of writing, 2 functions needs to be modified: M68KDisassemble & build_insn
Looked into the 68000 folder, wow, this is not an easy change :(
Looked into the 68000 folder, wow, this is not an easy change :(
VJ's 68000 emulation has been ported from the UAE 68000 cpu core. May be their Amiga emulator got updates since then.
Just checked https://github.com/tonioni/WinUAE/blob/master/table68k and I see no chance to merge it unless you want to spend a lot of time testing if nothing is broken.
James Hammons did the port for the Atari Jaguar many years ago, but unsure if he is still active on the console.
User reports a display disassembly error but the opcode is correct and correctly executed. Problem occurs also in the M68K Disassembly Browser, available in the debug Alpine mode. It is also a legacy issue, occuring in Virtual Jaguar 2.1.2.
Source code: move.l d0,(a0)+ move.l d1,(a0)+ movem.l d0-d1,bmpupdate
Disassembly: MOVE.L D0, (A0)+ MOVE.L D1, (A0)+ MVMLE.L A6-A7, $9108
Listing 8021EC: 20C0 | MOVE.L D0, (A0)+ 8021EE: 20C1 | MOVE.L D1, (A0)+ 8021F0: 48F9 0003 0001 6C28 |
MVMLE.L A6-A7, bmpupdate