# MAME imgtool



## garaksarr (Jun 20, 2022)

Hello,

MAME comes with imgtool; an image manipulation program. Somehow, the pkg version of mame does not seem to include imgtool at all. Is there a way to install it separately?

Thank you


----------



## Phishfry (Jun 20, 2022)

The Makefile for the port seems aware of imgtool. I am not sure how a subtarget is built.





						[ports] Contents of /head/emulators/mame/Makefile
					






					svnweb.freebsd.org
				



emulators/mame/


----------



## SirDice (Jun 20, 2022)

It's apparently only saved with emulators/mess (slave port of emulators/mame). I've done several attempts at redoing the MAME port, it's not the easiest port to work with. The MESS port should really be removed, it's been integrated in the main MAME port a really long time ago.

The idea I had was to integrate everything and use FLAVOR to select 'arcade-only' or 'full'.


----------



## garaksarr (Jun 22, 2022)

Phishfry said:


> The Makefile for the port seems aware of imgtool. I am not sure how a subtarget is built.
> 
> 
> 
> ...


After hours of compiling, I finally have a usable imgtool binary. A package would have been easier, but eh, it works. Now, it's time for some 6809 assembly coding.

Thank you


----------



## SirDice (Jun 22, 2022)

garaksarr said:


> After hours of compiling,


Yes, it's a fairly big and complex port to build. Not helped by the fact it uses a bunch of embedded tools and libraries that are available as ports nowadays. 



garaksarr said:


> A package would have been easier,


`pkg install mess`


```
root@williscorto:~ # pkg info -l mess | grep libexec
        /usr/local/libexec/mess/castool
        /usr/local/libexec/mess/chdman
        /usr/local/libexec/mess/floptool
        /usr/local/libexec/mess/imgtool
        /usr/local/libexec/mess/jedutil
        /usr/local/libexec/mess/ldresample
        /usr/local/libexec/mess/ldverify
        /usr/local/libexec/mess/nltool
        /usr/local/libexec/mess/nlwav
        /usr/local/libexec/mess/pngcmp
        /usr/local/libexec/mess/regrep
        /usr/local/libexec/mess/romcmp
        /usr/local/libexec/mess/split
        /usr/local/libexec/mess/srcclean
        /usr/local/libexec/mess/unidasm
```


----------



## astyle (Jun 22, 2022)

SirDice said:


> Yes, it's a fairly big and complex port to build. Not helped by the fact it uses a bunch of embedded tools and libraries that are available as ports nowadays.


Ah, the chicken-and-egg problem of assuming that the wheel does not need to be re-invented.  Kind of like expecting metal wheels, but the only ones available externally are made out of wood.


----------



## SirDice (Jun 22, 2022)

Well, at the time the port was first added some of the required libraries weren't available 'natively'. So the embedded one got built instead, it made sense back then. Nowadays many of those actually do have working ports. The MAME port didn't have a maintainer for a very long time.


----------



## garaksarr (Jun 22, 2022)

SirDice said:


> Yes, it's a fairly big and complex port to build. Not helped by the fact it uses a bunch of embedded tools and libraries that are available as ports nowadays.
> 
> 
> `pkg install mess`
> ...


Doh! I will know better next time. Thanks!


----------

