Re: [hatari-devel] compiling with ahcc from Hatari and command line ?

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


Le 12/09/2023 à 15:06, Thomas Huth a écrit :
On 12/09/2023 12.40, Nicolas Pomarède wrote:
Le 10/09/2023 à 23:53, Eero Tamminen a écrit :
Hi,

On 10.9.2023 16.33, Nicolas Pomarède wrote:
I'd like to check a change in some program included in Hatari's test directory. .c files are compiled with ahcc and I wondered if there's a way to run the compilation from linux through hatari using the .TTP binary maybe ?

for example I'd like to change/compile "scc_ser.c" from tests/serial and it would be much faster if I could do it from my pc with command line and not interacting with editor/menus.

Assuming AHCC, project file and sources are in same directory, you can use something like this: $ hatari-prg-args -m --cpulevel 3 --trace os_base  -- ahcc_p.ttp mfp_ser.prj

(With AHCC ST version, you can "drop --cpulevel 3".)


Hi

thanks for the infos, it worked.

So, I added a sleep to scc_ser.c in main() :

         Super(sp);

+        sleep(2);

         return 0;

Why do you need a sleep here?

because in my tests I see that some bytes (1 or 2) can still be transferring by the SCC at the time scc_ser.prg exits, we need to wait a little to be sure all pending transfer are completed


The VBL counter at $466 is maintained by TOS - i.e. this won't work with FakeTOS. If you really need a delay, your best bet is likely to use " stop #$2300 " to wait for VBLs in a loop.


I could use stop #$2300, but it's not very convenient from a .C program

So I committed a change to faketos.s to support a minimal VBL counter at $462 (will write in a different mail to keep track of this)

Nicolas



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