Re: [hatari-devel] Fastload from GEMDOS drive emulation

[ Thread Index | Date Index | More Archives ]

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:

	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?


Mail converted by MHonArc 2.6.19+