Re: [hatari-devel] Hatari/EmuTOS Conflict |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Hatari/EmuTOS Conflict
- From: Vincent Rivière <vincent.riviere@xxxxxxxxxxx>
- Date: Wed, 12 Jun 2013 00:23:48 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=S/4IUOsHFxfcAMwOvvuCCq7dHWsLuY65N3D9Oy/rI0g=; b=nHkKV/oeBk+Jx56XECaIWcqgJ2gVRlex3q/1X4M3EcJ/TR9siBWVFC/Rrgbz0JGvS0 k4k4nFCJBtWV+HinjPxsmSSXqvUFSvDO+J7zKACDp4ER/q2oTBStR+669VaW4wVrWFNz 2cjdzYn0biBRKnUYuWIvF0/M8NwZhii5in5G3Kmie2cZR7p0AQ9/QV8hq0ZnqGkhK1Ce 1bCOwXvBti0bh2iFA992+3vsdJ/rjdf95aeUYo0je6bhjrKeeBJNEwiMastbV7y26aLw PDlzqAKb7diVZG1l173Wl2/DiVC2XbxULERVnT2jPNmwkrHloZ0qHHsgBKrQGtJr+q/t pOeg==
Thanks to all of you for your investigation.
On 10/06/2013 15:34, Nicolas Pomarède wrote:
/* On Hatari, it is *mandatory* to wait for the IKBD Reset to complete
* before sending the next command bytes. Otherwise, on cold boot
* no further data will be received.
* This is why we read the IKBD version byte below.
*/
// ikbd_version = ikbd_readb(); /* Usually 0xf1, or 0xf0 for antique
STs */
//#if DBG_KBD
// kprintf("ikbd_version = 0x%02x\n", ikbd_version);
//#endif
// UNUSED(ikbd_version);
No, this should not be commented. I disagree with the comment in the code :
it is mandatory to wait for 0xf0/0xf1 after the IKBD reset in all cases,
whether it's under an emulator or under real HW.
My intention was to say "unlike other inaccurate emulators, Hatari...". I
will fix the comment.
Sending commands to the ikbd before receiving 0xf0 or 0xf1 is an
undocumented behaviour, that will likely result in those commands to be
ignored.
This is why I fixed EmuTOS, after you told me that critical information.
A real TOS waits for 0xf0/0xf1 after sending reset, and it's the correct
thing to do.
I see that TOS 1.2 sends the IKBD reset at 0xfc03ba. After that, it waits in
a CPU delay loop, then does not read anything. I guess that the actual
returned value will be read later by the interrupt routine, when interrupts
are enabled.
--
Vincent Rivière