Page 1 of 1

Waiting for feedback: Disassembly support for Motorola 68K

Posted: 18 Sep 2018 19:53
by flype
For consistency with other features that the program already supports,

it would be welcomed to have Disassembly for the Motorola processor family.

(i personally use it and can help on this topic).

Re: Disassembly support for Motorola 68K

Posted: 18 Sep 2018 20:09
by Maël
I am using NASM for the x86 disassembly (so that I don't need to keep track of the changes to the instruction set myself). Do you know of a good project that does that for the 68k?

Re: Disassembly support for Motorola 68K

Posted: 19 Sep 2018 07:43
by flype
Hmm, i will look at it, there are some,
but not sure which would be easier to interface, and the more lightweight.



You use that i guess ?

http://repo.or.cz/nasm.git/blob/HEAD:/disasm/disasm.h

disasm(uint8_t *data, char *output, int outbufsize, int segsize, int64_t offset, int autosync, iflag_t *prefer)

Re: Disassembly support for Motorola 68K

Posted: 19 Sep 2018 08:11
by flype
Some of the most up to date / maintained are :

One possible choice, the most maintained 68K assembler is "VASM" by Frank Wille,
which do not comes with a disassembler in the package, but aside of it there is either "vda68k", full C, easy to compile,
or "IRA" which is a fully featured Disassembler / Reassembler but probably not best suited for our case.

http://sun.hasenbraten.de/vasm/
http://sun.hasenbraten.de/~frank/projects/
http://aminet.net/package/dev/asm/vda68k (use 7zip to extract .LHA for example)
http://sun.hasenbraten.de/~frank/projec ... 68k.tar.gz

--

Another possible choice, from a well know Amiga emulator heavily maintained by Tony Wilen

https://github.com/tonioni/WinUAE/blob/ ... .cpp#L7508

--




How you do with NASM ? You'd need/prefer a precompiled library or you embed & compile the C code ?

Re: Disassembly support for Motorola 68K

Posted: 19 Sep 2018 10:24
by Maël
flype wrote:
19 Sep 2018 07:43
You use that i guess ?

http://repo.or.cz/nasm.git/blob/HEAD:/disasm/disasm.h

disasm(uint8_t *data, char *output, int outbufsize, int segsize, int64_t offset, int autosync, iflag_t *prefer)
Yes, exactly,I use this part of NASM. Another key part I forgot to mention is the license. NASM is under BSD, which allows me to include it in HxD (which is closed source).
flype wrote:
19 Sep 2018 08:11
How you do with NASM ? You'd need/prefer a precompiled library or you embed & compile the C code ?
I compile the relevant code with VC++ and link to the obj files. With some careful measures, it works nicely with Delphi.

Re: Disassembly support for Motorola 68K

Posted: 19 Sep 2018 10:37
by Maël
WinUAE is an excellent software, I couldn't find a license for it, though. The file you linked to appears to come from UAE, which is under GPL, so I can not use it, unfortunately.

Ideally the same package would allow assembly as well, so that in future I could add editing of instructions, not just displaying them in the data inspector.

Another question: As far as I can tell the Motorola 68K instruction set is fixed now, as there are no new models based on this architecture, right?