Re: [hatari-devel] Hatari/EmuTOS Conflict

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


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



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