Re: [hatari-devel] Cartridge help text

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Sun, 8 Jan 2017 23:42:33 +0100
schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:

> Le 08/01/2017 à 21:56, Eero Tamminen a écrit :
> > Hi,
> >
> > Hatari cartridge image contains program that shows some
> > Hatari help text.  I noticed that it's a bit out of date.
> >
> > Attached patch adds few missing keyboard shortcuts,
> > shortens other text so that they hopefully fit, and
> > makes the texts more consistent (all start with lower
> > case etc).
> >
> > Thomas or Nicolas, if you have the setup to convert
> > the cartridge asm to data file, could apply my patch
> > or something similar and update the cart image?
> >
> >
> >     - Eero  
> 
> Hi
> 
> I see in cartData.c that the program was generated with TurboAss,
> which exist only under Atari IIRC.
> Using the attached patch, it's possible to compile it with vasm which
> is available for any OS (sources are available).
>
> The binary file corresponding to cart_asm.s can then be assembled
> with :
> 
> vasmm68k_mot -devpac -showopt -o cart_asm.bin -Fbin cart_asm.s
> 
> As noted, hexdump will convert to some text data :
> 
> hexdump -v -e ' 16/1 "0x%02x," "\n" ' cart_asm.bin > cart_asm.txt
> 
> Then one just needs to add a C header to cart_asm.txt + manually edit 
> the last line to remove empty 0x and you can create a similar
> cartData.c as the one shipped today with Hatari.
> 
> Thomas, what do you think ? Maybe we should remove the turboass
> specific directives and use devpac ones compatibles with vasm ?

AFAIK TurboAss can deal with both syntaxes, so I'm fine with that
change.
 
> It might even be possible to create a CMake rule for all of this.

Instead of going through the hexdump detour, it might also be feasible
to use ld instead:

 http://gareus.org/wiki/embedding_resources_in_executables#binary_linking

Not sure whether it works with all non-GNU linkers out there, too,
though. So considering that we also only change the cartridge very
seldomly, we should IMHO keep the manual process with hexdump.

 Thomas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/