[hatari-devel] DTA fix patch |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: [hatari-devel] DTA fix patch
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Fri, 17 Apr 2020 08:11:35 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1587103898; bh=CCXbW11hwPFLOzznEgzCRDHCodhDBFmo2oUkSZSIm7w=; h=Date:From:To:Subject:From; b=XjVoO104M7DSQF0AICrhRS/WecKVmyk365qI9UWsK5wiYrs0itz+wLzAs5hJo5kC5 iIFTLl8NQiii7JnpACgZD9WgB2YxVBS6J7N0oDAazKcQcOPPmXnXP90r60rGNSKU8E hM9csLJyq7Q97UHdtjJTHYoJjKi1e+qkG5Goa3wYVv3R6v/vUQ4mHHLN2Dk/lO5ZD7 ielpil18G6cVD7rr71rfJ+fw7zydzLb9eZqIaGcLt6bURUMM1BmgZEMZRqtf9jFDSQ 3IegRe+UQ0YD1L7F1rhBIiWHspCAjEjkwWwxOq1pAYELn9zq8q6os4xofhvWO2LuuI Eafh8EVJAuRew==
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