ImHex - absolutely wonderful disassembler and data analyser for m68k

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

Post Reply
mikro
Hardware Guru
Hardware Guru
Posts: 3003
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by mikro »

I wish this was my thing to announce. :-) There are people in favour of Ghidra or IDA Pro but every time I wanted to try any of those, I felt really uncomfortable, can't even say why exactly - they are powerful tools, no doubt. And then I found ImHex: https://imhex.werwolv.net

With just two clicks I was able to get this:
imhex.png
Wonderful, wonderful disassembler and hex editor, everything works with mouse selection, realtime offsets and conversions to all possible formats.

hexedit, Ghidra, Okteta, m68k-atari-mint-objdump ... bye-bye, never going to see you ever again. ;)
You do not have the required permissions to view the files attached to this post.
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2370
Joined: Sun Aug 03, 2014 5:54 pm

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by ThorstenOtto »

Quite nice GUI, but i usually prefer to convert whole files to assembler source, then work on the text files.

Ghidra is nice when working on foreign programs. Although it has some quirks, its ability to convert the assembler code back to C is invaluable to get a quick understanding what the code does.
User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 843
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by Anima »

Nice. Interesting tool for sure as it shows entropy graphs as well. Thanks.
User avatar
tOri
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 109
Joined: Thu Jun 18, 2020 4:30 pm
Location: Poland
Contact:

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by tOri »

:cheers:

Thank you mikro for info!

Regards
tOri
http://atari.myftp.org ATARI - Power without price and necessary elements
various varieties for Atari and not only - useful or not, but it's worth a look ...
User avatar
TheNameOfTheGame
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2203
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by TheNameOfTheGame »

Nice, downloaded!

I was just reading about advances in OpenAI the other day and thought what if it can learn Atari programming? It could probably fix a lot of bugs, maybe every bug in every Atari program if it learned. :lol:
User avatar
dhedberg
Atari God
Atari God
Posts: 1361
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by dhedberg »

Oh, great discovery! Played around with it for a few minutes and it's a keeper for sure! Thanks!
Daniel, New Beat - http://newbeat.atari.org.
Like demos? Have a look at our new Falcon030 demo It's that time of the year again, or click here to feel the JOY.
User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2675
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by lp »

Got all excited to try it and then my old mac refused to start it. lol
URL noted, will give it a go in the near future after my machine is replaced. :wink:
User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 843
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by Anima »

lp wrote: Wed Aug 03, 2022 12:17 pm Got all excited to try it and then my old mac refused to start it. lol
URL noted, will give it a go in the near future after my machine is replaced. :wink:
I've got no problems running the tool on my MBP (late 2013 model, Monterey). IDK if it counts as an old Mac, though. :D
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2370
Joined: Sun Aug 03, 2014 5:54 pm

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by ThorstenOtto »

Had some problems too running it on linux. The executables require glibc 2.34, but i have only 2.33 installed. Recompiling from source doesn't work either, because that requires gcc 12. I find it a bit strange that compiling from source requires a gcc version which has only been released a few weeks ago.
ijor
Hardware Guru
Hardware Guru
Posts: 4347
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by ijor »

mikro wrote: Wed Aug 03, 2022 6:37 am I wish this was my thing to announce. :-) There are people in favour of Ghidra or IDA Pro but every time I wanted to try any of those, I felt really uncomfortable, can't even say why exactly - they are powerful tools, no doubt. And then I found ImHex: https://imhex.werwolv.net
The big advantage of Ida Pro (may be Ghidra as well, not used it too much), is that it can automatically detect the compiler, and then identify and label library calls by their original name, and even decompile. Can ImHex do something like that? Of course, that works only for programs that used a well known compiler version, not for ST programs.
Fx Cast: Atari St cycle accurate fpga core
User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 843
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by Anima »

ijor wrote: Wed Aug 03, 2022 2:42 pm The big advantage of Ida Pro (may be Ghidra as well, not used it too much), is that it can automatically detect the compiler, and then identify and label library calls by their original name, and even decompile. Can ImHex do something like that? Of course, that works only for programs that used a well known compiler version, not for ST programs.
The feature "graphical node-based data processor to pre-process values before they're displayed" looks like the IDO PRO Control Flow Graph. Maybe this was a bit misleading!?
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2370
Joined: Sun Aug 03, 2014 5:54 pm

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by ThorstenOtto »

ijor wrote: Wed Aug 03, 2022 2:42 pm Of course, that works only for programs that used a well known compiler version, not for ST programs.
You can use that feature also for ST programs compiled by gcc. For programs compiled by Pure-C it is more work, because of the register calling convention. I've already created once a function-id database that can identify most of the standard-library, and with a script you can then modify those library calls to use the expected registers. For functions used by the program, you have to do that manually however. But it's possible.
ijor
Hardware Guru
Hardware Guru
Posts: 4347
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by ijor »

ThorstenOtto wrote: Wed Aug 03, 2022 3:26 pm You can use that feature also for ST programs compiled by gcc. For programs compiled by Pure-C it is more work, because of the register calling convention.
Interesting. But honestly, how many times you would this feature? I would expect most ST programs compiled with gcc to be open source :)
Fx Cast: Atari St cycle accurate fpga core
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2370
Joined: Sun Aug 03, 2014 5:54 pm

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by ThorstenOtto »

Sometimes the source code is lost ;) And i sometimes use it to check the code gcc actually produces. In more complex routines, its useful to have a rough outline of the C-code, so you will see where you are when click in the dissassembly.

But all i wanted to say is that this is a feature of Ghidra that generally works for any code, no matter which compiler produced it.
ijor
Hardware Guru
Hardware Guru
Posts: 4347
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by ijor »

ThorstenOtto wrote: Wed Aug 03, 2022 6:16 pm But all i wanted to say is that this is a feature of Ghidra that generally works for any code, no matter which compiler produced it.
Right, but you need the specific compiler library database. And not just for the compiler "brand", but for the specific version. These come builtin for the PC, of course. May be nowadays also for Mac and some ARM platforms?
Fx Cast: Atari St cycle accurate fpga core
User avatar
TheNameOfTheGame
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2203
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by TheNameOfTheGame »

TheNameOfTheGame wrote: Wed Aug 03, 2022 10:57 am Nice, downloaded!

I was just reading about advances in OpenAI the other day and thought what if it can learn Atari programming? It could probably fix a lot of bugs, maybe every bug in every Atari program if it learned. :lol:
Hmm, found a neat article on the web where just this sort of thing is being done, wow.

https://www.economist.com/science-and-t ... r-programs

From the article:

Code: Select all

Bugs and the system

Nor are those who write code the only beneficiaries. Developers spend nearly as much time searching
for bugs in what they have written as they do writing it in the first place. A machine-learning model
being built by Brendan Dolan-Gavitt of New York University may speed up the debugging process.

Code: Select all

Machines, it turns out, are now able to write even longish sequences of functioning code.
As John Carmack, a noted American computer engineer, has tweeted, pondering this development
“does generate a slight shiver”. Unsurprisingly, a number of firms see an opportunity.
I think within a decade, some version of AI, for example, will be able to take say an Amiga game and convert it to Atari AGTools or such in a short time.

It is an interesting possibility. Maybe we will finally get some of those games that were never released on Atari :lol:.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: ImHex - absolutely wonderful disassembler and data analyser for m68k

Post by dml »

Have not tried this one, looks interesting.

And visually it looks like it is using ImGui? I guess that's where the 'Im' prefix comes in :)
Post Reply

Return to “Coding”