[hatari-devel] DTA fix patch

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


Am Tue, 14 Apr 2020 10:34:15 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:

> If you have time, could you check also my DTA fix
> patch?

Looks sane to me at a quick glance.

> It seems to work fine, but I'm wondering e.g. whether Hatari should
> still start cycling DTAs a bit earlier than at 32k.  Based on the
> Hatari user's testing, 2k is enough, at that point TOS limits start
> getting hit.

Yeah, 32k sounds quite a lot already ... I'd maybe go with 4k or 8k
first. Also, do you really want to grow that InternalDTA region
exponentially when it is running out of entries? Adding 16 or 32
entries at a time sounds more reasonable to me (I think it's rather
unusual that a program really needs so many DTAs...).

A completely diffent topic, while reviewing your patch, I came accross
this code in GemDOS_SNext() :

	if (!InternalDTAs[Index].bUsed)
	{
		/* Invalid handle, TOS returns ENMFIL
		 * (if Fsetdta() has been used by any process)
		 */
		Log_Printf(LOG_WARN, "GEMDOS Fsnext(): Invalid DTA\n");
		Regs[REG_D0] = GEMDOS_ENMFIL;
	}

Shouldn't there be a "return true;" at the end of this if-statement?
IMHO it doesn't make sense to continue with the function here?

 Thomas



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