|Re: [hatari-devel] TT emulation crashes when there is no ACSI drive|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On 8/11/19 5:12 PM, Christian Zietz wrote:
Uwe Seimet schrieb:
I'm not familiar with what Hatari does with the cartridge code. Some
kind of initialization I assume that cannot be executed by different
means I assume?
Hatari needs to intercept and to emulate Pexec calls when the program is
on a GEMDOS drive. That's the main thing done in the cartridge code. (In
contrast, Steem afaik does this entirely on the host side.)
Thomas, please correct if I'm off...
I think it's for two reasons:
* TOS Pexec code doesn't do disk Fopen()/Fread() through GEMDOS ABI,
but directly, so GEMDOS HD wouldn't be able to catch them.
* 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.
PS: This is the line in TOS 3.06 or 2.06 where only 128 bytes of stack
(the unused command line part of the basepage) are provided for the
process that executes AUTO folder programs:
Christian Zietz - CHZ-Soft - czietz@xxxxxxx
PGP/GnuPG-Key-ID: 0x52CB97F66DA025CA / 0x6DA025CA