Re: [hatari-devel] Problem with Hatari 1.6.2 and EmuTOS 192K ROMs

[ Thread Index | Date Index | More Archives ]

On 12/10/2012 20:56, Roger Burrows wrote:
Some kprintf's in the EmuTOS code makes me suspect that it's crashing on a call
to Gettime(), but I haven't tried to narrow it down further via EmuTOS.

Indeed, I had similar clue.

I ran the official Hatari 1.6.2 Windows binary with some debugger.
I crashes with an Access Violation exception due to a NULL pointer.

My magic wand indicates that it crashes just after the call to IKBD_AddKeyToKeyboardBufferWithDelay(0xFC, 32000) inside src/ikbd.c, function IKBD_Cmd_ReadClock().

The only pointer used there is SystemTime, which comes from localtime(&nTimeTicks). This would suggest that localtime() returned NULL. I let Hatari developers to investigate how this could be possible (bad nTimeOffset?).

By chance, I noticed that the EDI register value was 0x00FC4968, which is an address inside the EmuTOS ROM. It is the return address of ikbdws(), called by gettime(). This confirms both Roger's findings and mine.

Not that this crash does not occur with my non-standard Hatari build on Cygwin (which uses NewLib as libc, instead of MinGW). So probably different localtime() implementation.

Good luck.

Vincent Rivière

Mail converted by MHonArc 2.6.19+