Re: [hatari-devel] TT emulation crashes when there is no ACSI drive

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


On Montag, 12. August 2019 00:47:55 CEST Eero Tamminen wrote:
> * Pexec() code needs to do allocations etc from TOS, so that TOS
>    is aware where the executed program is and so on.  These are
>    much easier to do from native code than trying to somehow force
>    same from host side by manipulating regs, stack etc.

TOS executes programs in the AUTO-Folder by Pexec(0, ...). Hatari catches the 
call before actually emulating the trap instruction, so theoretically you can 
manipulate the mode to 5 (create basepage only). That way TOS will do the 
needed allocations. Then you have to find a way to get control in the emulator 
when that call returns, load the program directly, relocate it,  and pass a 
2nd call to TOS with mode 4 (just go). May look a bit strange, but it works 
(i'm doing similar things in my modified version of STonX, which does not need 
the cartridge code at all).






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