Re: [hatari-devel] Re: Feature request: allow to specify "-d" with autostart

[ Thread Index | Date Index | More Archives ]


On 04/03/2017 01:16 AM, Miro Kropáček wrote:
I tried following:
hatari -m --acsi hd80mb.image -d hddr904/ --gemdos-drive k --auto

I.e. HDDRUTIL from HD Driver v9.04, and it autostarted fine
with all the TOS versions & machine types I tested.  Same
thing with 9.02 demo version.

Autostarted, yes. Working after that -- not really. The use case is:
- start any app using the command line with your new code
- the app will run and behave as usual
- quit the app (or let it quit by itself)
- press any 'meaningful' key (i.e. not shift/alt but 'A', ALT+'A' and so on)
- crash

Works fine with EmuTOS, and when using STE as machine
with TOS 2.06de.

It's not related to opening folders or anything, it's purely about
keyboard. Reproduced on the basic (created after start) Hatari + TOS 2.06de
+ the command line above.

With TOS 2.06de and *ST* as machine type, I get bus error
after autostarted program exits, on every keypress and
mouse click:
Bus Error at address $ffff8a00, PC=$e014f6 addr_e3=e014f8 op_e3=4a68
> r
  D0 00000000   D1 00E02300   D2 00000001   D3 00000020
  D4 00000000   D5 00000000   D6 00011A16   D7 00000003
  A0 00000000   A1 02E010E2   A2 00009AD6   A3 00008C72
  A4 000069D2   A5 00000000   A6 00009AEA   A7 00009AD6
USP  000102C6 ISP  00009AD6
T=00 S=1 M=0 X=0 N=0 Z=0 V=0 C=0 IMASK=7 STP=0
Prefetch 8a00 (OR) 4a68 (TST) Chip latch 00000000
00E014F6 4a68 8a00                TST.W (A0, -$7600) == $ffff8a00

Error happens in this TOS function:
$00e014dc : 40c1                 move      sr,d1
$00e014de : 303c 0000            move.w    #0,d0
$00e014e2 : 91c8                 suba.l    a0,a0
$00e014e4 : 244f                 movea.l   sp,a2
$00e014e6 : 007c 0700            ori       #$700,sr
$00e014ea : 2268 0008            movea.l   8(a0),a1
$00e014ee : 217c 00e0 14fc 0008  move.l    #$e014fc,8(a0)
$00e014f6 : 4a68 8a00            tst.w     $8a00(a0)     <== ***
$00e014fa : 7002                 moveq     #2,d0
$00e014fc : 2149 0008            move.l    a1,8(a0)
$00e01500 : 46c1                 move      d1,sr
$00e01502 : 2e4a                 movea.l   a2,sp
$00e01504 : 4e75                 rts

Failing address is blitter halftone register, so obviously
it will give errors on ST.  Does above function have
something to do with screen updates, and with autostarting
TOS 2 somehow mistaking ST for STE?  Or is NULL in A0
when the function is called just TOS 2 bug?

Note that this isn't related to Hatari's autostarting
feature, but TOS.

If one manually does similar desktop.inf file & setup,
same issue happens, whether Hatari has just GEMDOS HD,
or ACSI drive.

PS. With TOS 1.04uk I get double bus error / and or reset
right after autostarted program exits, but that also happens
without Hatari autostart feature or GEMDOS HD.

Whether the started program uses AES/VDI or not, doesn't
seem to affect anything.

Nicolas / Thomas, any comments about the --auto option
patch?  From my point, it seems fine to go in.

	- Eero

Mail converted by MHonArc 2.6.19+