Waiting for feedback: Disassembly support for Motorola 68K

Wishlists for new functionality and features.
Post Reply
flype
Posts: 6
Joined: 18 Sep 2018 17:29

Waiting for feedback: Disassembly support for Motorola 68K

Post 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).
Maël
Site Admin
Posts: 1454
Joined: 12 Mar 2005 14:15

Re: Disassembly support for Motorola 68K

Post 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?
flype
Posts: 6
Joined: 18 Sep 2018 17:29

Re: Disassembly support for Motorola 68K

Post 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)
flype
Posts: 6
Joined: 18 Sep 2018 17:29

Re: Disassembly support for Motorola 68K

Post 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 ?
Maël
Site Admin
Posts: 1454
Joined: 12 Mar 2005 14:15

Re: Disassembly support for Motorola 68K

Post 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.
Maël
Site Admin
Posts: 1454
Joined: 12 Mar 2005 14:15

Re: Disassembly support for Motorola 68K

Post 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?
Maël
Site Admin
Posts: 1454
Joined: 12 Mar 2005 14:15

Re: Waiting for feedback: Disassembly support for Motorola 68K

Post by Maël »

There is a plugin framework now:
https://github.com/maelh/hxd-plugin-framework

Greg Clare implemented a disassembler for the MOS/WDC 65xx and Motorola 6800 family:
https://github.com/DigicoolThings/HxD_D ... ctorPlugin

See if you want to contribute there.
Post Reply