Re: [hatari-devel] Fastload from GEMDOS drive emulation |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Fastload from GEMDOS drive emulation
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Mon, 10 Jun 2019 08:11:42 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1560147104; bh=cts7CbAv4FtQH/TZMMFhP7Z2roi96+5HRSFk50A8FPI=; h=Date:From:To:Subject:From; b=ZKyKJCXOYOuGcBdEob0zHcFnCH4/sggpNNLsWQALaUfczJpw7M7/ZQPxeR7/xqC6C oCmfy9hC/WjuWa9nJMDyKdicxMCWabmBoU9RRpUd99MLJ0aqw+TtjSbiPny9zGz5QL poySEKWDh9iaMGU9W56LJKHtVVNlw3/wqenohAGJz/MirGoYriWbiXRuMQaqgZtP5R EmavN7923CaTsfM4PUoWU9mViiHE+SuT0QaeZLsyFHvrxJG5AUiTvSWBFkR1C4HQmu j4BAdWdtnLOQ16aBKi5oB21uCi1yqOAf7Lid1VnEzsCI7u+0Jm9IZnODbvPqHMxYGT PLvKKRwAy/RcQ==
Am Mon, 10 Jun 2019 00:56:54 +0200
schrieb Vincent Rivière <vincent.riviere@xxxxxxxxxxx>:
> Hello.
>
> It seems that Hatari GEMDOS drive emulation forces the Fastload
> behaviour. Am I right? And is this expected behaviour?
>
> For example, if I put a program *without Fastload bit set* on floppy,
> its startup time takes more time when there is a lot of RAM in the
> system. This is very visible with 14 MB of ST-RAM, there is a pause
> of at least 3 seconds after the program has loaded. This does not
> happen when the Fastload bit is set, as expected.
> But this does not happen either from emulated C:, even if the
> Fastload bit is not set.
>
> Bug or feature?
I think it should work if you use a TOS version that supports
Pexec(7)... you can find the corresponding code in cart_asm.s:
hdr_magic_ok:
clr.w -(sp)
move.w d6,-(sp)
move.l #22,-(sp) ; offset of the program flags
move.w #66,-(sp) ; Fseek
trap #1 ; Gemdos: Seek to program flags
lea 10(sp),sp
cmp.l #22,d0
bne load_reloc_error
clr.l -(sp) ; Temporary space for program flags
move.l sp,-(sp)
move.l #4,-(sp)
move d6,-(sp)
move #$3f,-(sp) ; Fread
trap #1 ; Gemdos: Read program flags
lea 12(sp),sp
move.l (sp)+,a3 ; Program flags now in a3
cmp.l #4,d0
bne load_reloc_error
; Let's call Pexec now to create the basepage, first try
; Pexec(7) and if that does not work fall back to mode 5
move.l 10(a6),-(sp)
move.l 6(a6),-(sp)
move.l a3,-(sp) ; program flags in program header
move.w #7,-(sp) ; Create basepage wrt program flags
move.w #$4b,-(sp) ; Pexec (mode 7)
trap #1 ; Gemdos
lea 16(sp),sp
tst.l d0
bpl.s pexec_ok
move.l 10(a6),-(sp)
move.l 6(a6),-(sp)
clr.l -(sp)
move.w #5,-(sp) ; Create basepage
move.w #$4b,-(sp) ; Pexec (mode 5)
trap #1 ; Gemdos
lea 16(sp),sp
tst.l d0
bmi load_reloc_error
.... that looks ok to me - or can you spot something wrong here?
Thomas