Re: [hatari-devel] asm56000.ttp problem

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


Am Mon, 1 Oct 2018 22:36:47 +0200
schrieb Miro Kropáček <miro.kropacek@xxxxxxxxx>:

> On Mon, 1 Oct 2018 at 22:02, Eero Tamminen <oak@xxxxxxxxxxxxxx> wrote:
> 
> > On 10/1/18 10:28 PM, Thomas Huth wrote:  
> >  > This could also happen with real TOS if it uses bigger file
> >  > handles for some reasons. I don't think there is a clean way to
> >  > fix this on the Hatari side, since Hatari certainly has to stay
> >  > out of area that TOS uses for its file handles.  
> >
> > I'll add a note about it to Hatari compatibility document.
> >  
> Thank you for taking a look at it! Finally we know the culprit.
> 
> However I beg you to think about a workaround here - without this
> fixed cross-platform development in Hatari suffers a lot (sure, we
> can use wine and/or windows binary but...). Even a fix like if
> program_name == "asm56000.ttp" would be better than nothing.

No, sorry, in this case this simply can not work reliably. Even if
such a hack would work for you in one case, the next user might use a
different shell or environment where some more file handles are
already opened and then everything breaks again.

So instead of working around this buggy program in Hatari, I'd rather
suggest that someone disassembles that TTP, fixes the problem there and
assembles it again. This will also fix the issue in case someone tries
to run this program with BigDOS, MetaDOS or another GEMDOS extension.

> To be honest, I don't understand why Hatari forces such big file
> handles in the first place?

If Hatari uses a file handle in the same range as TOS uses, and the TOS
program decides to open another file that is not on the GEMDOS HD, then
there is a clash between the file handle that has been assigned by
Hatari and the one that has been assigned by TOS. Thus Hatari clearly
has to stay away from the range that TOS uses.

> GEMDOS HD emulation should behave the
> same as normal IDE emulation, there's no way one can have 40 opened
> file handles in plain TOS when running asm56000.ttp.

Why not? When you run it from a shell or other environment that has
already opened a bunch of files, it is certainly possible to have that
many opened file.

 Thomas



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