Re: [hatari-devel] asm56000.ttp problem

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


Hi,

On 10/3/18 3:41 PM, Christian Zietz wrote:
Thorsten Otto schrieb:
Yes, there is an assert in that function, but if the library was compiled with
NDEBUG it will just continue. Current mintlib seems to be safe in that regard.

And if you look at _write: that function rejects handles >= __NHANDLES. That
explains why the file is created, but nothing written to it. So my previous
assumption was wrong: the bug is in the library.

In the meantime, I have come to the same conclusion. read() and close()
will more or less work with handles >= 40, while write() rejects them
and open() (without the assert) writes past the end of the array.

I have thus patched open() and write() with a hex-editor. With the
attached ASM56000.TTP the compilation process runs through without
errors or crashes on Hatari's GEMDOS HD. I'll let Miro judge whether the
output is as expected.

Note that this is a very dirty patch of ASM56000.TTP. After all,
__open_stat is used for a reason. E.g. my patched write() function will
fail with O_APPEND.

This also means that there will be more programs (using the same
standard library) with a similar problem.

It doesn't seem to be much of a problem in practice.

From 15 years of Hatari usage, only following programs are still listed
as not working from GEMDOS HD in the Hatari compatibility list:
* asm56000.ttp
* Ufo War Falcon game (does invalid Fread())
* GFA Basic 3.6 menu.prg
* CrackArt

The last two were last tested with Hatari <v1.0, so they might
actually work nowadays.

Additionally following programs are listed as having minor
issues when run from GEMDOS HD:
* Kronos (FS tests really slow with GEMDOS HD)
* Pacemaker STE demo end screen (minor screen corruption)


	- Eero

PS. In addition to these, there are of course a lot of floppy-only
programs, but those don't work with hard disk images either.



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