Re: [hatari-devel] Hatari/EmuTOS Conflict

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


On Monday 10 June 2013 02:28, Vincent Rivière wrote:
> On 10/06/2013 01:06, David Savinkoff wrote:
> > On Sunday 09 June 2013 14:34, Nicolas Pomar�de wrote:
> >> I added the default 9600 bauds for the ACIA after a cold start (that I
> >> mentioned in an earlier thread).
>
> Good. I guess that the real ACIA 6850 hardware does the same (since
> Jean-Fran�ois had no trouble with the EmuTOS ROM on real STe), but we
> are not 100% sure. Unfortunately, without Jean-Fran�ois' special
> hardware, it's very difficult to make cold boot unit tests.
>
> Another possibility could be flashing emutos-cartridge (cold EmuTOS boot
> from cartridge ROM) on an flash Atari cartridge, but I don't know such
> hardware.
> NB: emutos-cartridge works fine with Hatari, when GEMDOS drive emulation
> is disabled. That 128k EmuTOS variant has no GEM, only EmuCON, but
> that's good enough to make BIOS tests.
>
> > That fixed the problem!
>
> Very good :-)
>
> For information: the CPU speed may matter.
> In very early EmuTOS initialization time, when the keyboard is
> initialized, we don't have a way to make accurate delays. So we do ugly
> CPU loops, based on theoretical CPU speed.
> This matters for the keyboard initialization: it might not work if the
> CPU speed is too much high from the original one.
>
> It is still mysterious why David experienced the problem before the
> Hatari fix, and why other people did not experienced it. The emulated
> CPU speed could be a difference.
>
(1)
I've been looking at the code in emutos/bios/ikbd.c (line 541) and
code in hatari/src/acia.c (line 279). It appears that Hatari somehow
doesn't succeed in performing the software ACIA reset when
EmuTOS writes 0x03 to 0xFFFFFC02 And the keyboard is attempting
to communicate with the ACIA.
(2)
I found that this problem was caused by my uncalibrated usb joystick
sending data.
(3)
I also found that the problem can be caused by moving the mouse
when Hatari is booting EmuTOS.
(4)
Nicolas' patch at hatari/src/acia.c (line 279) works so well that EmuTOS
code can be commented out as shown at emutos/bios/ikbd.c line 541:

    /* 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);




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