Re: [hatari-devel] asm56000.ttp problem

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


Hi,

On 10/1/18 10:28 PM, Thomas Huth wrote:
Am Mon, 1 Oct 2018 21:31:03 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
[...]

Why 56000 would do those extra Fseek()s *only* with GEMDOS HD?


The only differences in GEMDOS (and XBIOS) calls I had noticed
were:

* GEMDOS HD returning higher FD indexes from Fopen(), to avoid
    conflicting with TOS internal FD values.

Well, guess what: That's exactly the issue with this program: It
expects small file handles. I guess the author blindly assumed that
file handles would always be less than 40 or something similar ... it
seems to work if you decrease BASE_FILEHANDLE in gemdos.c for example
to 12 instead of 64. ==> IMHO it's a bug in the program, not in Hatari.

Thanks for checking this!

Returning smaller file handle values from GEMDOS HD indeed
gets asm56000.ttp working:
* It doesn't anymore do extra Fseek()s
* It will create DECODER.CLD
* It Fopen()s correct input file the second time
* And rest works too

What a broken tool...


> 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.


	- Eero



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