FPU Compatible Software

General Discussion, STOS.
pixelpusher
Posts: 144
Joined: 27 Dec 2019 21:01

Re: FPU Compatible Software

Post by pixelpusher »

exxos wrote: 08 Jun 2021 18:11 This *should* work...


GB6B33.zip
Float test starts now (and crashes later on RTS). Will have to see on the weekend if I find something.

What's missing atm is displaying a present LineF emulation (via SFP-004). Currently it just pretends "FPU is not present" in the "System" section of GB's main dialog.
User avatar
exxos
Site Admin
Site Admin
Posts: 28344
Joined: 16 Aug 2017 23:19
Location: UK

Re: FPU Compatible Software

Post by exxos »

pixelpusher wrote: 08 Jun 2021 19:01 What's missing atm is displaying a present LineF emulation (via SFP-004). Currently it just pretends "FPU is not present" in the "System" section of GB's main dialog.
Hmm it should say linef emu in system already :roll:
User avatar
exxos
Site Admin
Site Admin
Posts: 28344
Joined: 16 Aug 2017 23:19
Location: UK

Re: FPU Compatible Software

Post by exxos »

I can't see why it would not display the info as it needs the info to be passed as LINEF to actually run the test in the first place.

I wasn't sure if the cookie was being read in the code in the right order, so i've swapped some stuff around to make sure the info is set.. but not sure that is the problem anyway.

GB6B33.zip
You do not have the required permissions to view the files attached to this post.
pixelpusher
Posts: 144
Joined: 27 Dec 2019 21:01

Re: FPU Compatible Software

Post by pixelpusher »

exxos wrote: 08 Jun 2021 19:46 I can't see why it would not display the info as it needs the info to be passed as LINEF to actually run the test in the first place.

I wasn't sure if the cookie was being read in the code in the right order, so i've swapped some stuff around to make sure the info is set.. but not sure that is the problem anyway.


GB6B33.zip
That one prints out "LineF EMULATOR.". Thx!
User avatar
exxos
Site Admin
Site Admin
Posts: 28344
Joined: 16 Aug 2017 23:19
Location: UK

Re: FPU Compatible Software

Post by exxos »

pixelpusher wrote: 08 Jun 2021 20:41 That one prints out "LineF EMULATOR.". Thx!
Finally :)
User avatar
exxos
Site Admin
Site Admin
Posts: 28344
Joined: 16 Aug 2017 23:19
Location: UK

Re: FPU Compatible Software

Post by exxos »

@pixelpusher My be useful if you can do a "save defaults" and then send me DEFAULT.DAT so I and included in future releases of GB6 as there is no reference files for particular FPU system you have setup..
pixelpusher
Posts: 144
Joined: 27 Dec 2019 21:01

Re: FPU Compatible Software

Post by pixelpusher »

exxos wrote: 09 Jun 2021 22:01 @pixelpusher My be useful if you can do a "save defaults" and then send me DEFAULT.DAT so I and included in future releases of GB6 as there is no reference files for particular FPU system you have setup..
Will do once I understand and fixed the crash...
pixelpusher
Posts: 144
Joined: 27 Dec 2019 21:01

Re: FPU Compatible Software

Post by pixelpusher »

exxos wrote: 06 Jun 2021 22:03
pixelpusher wrote: 06 Jun 2021 21:50 For the lower word (that your code always checks to be zero) it says:

The lower WORD is reserved for information about software support via the Line-F trap, and is at present not yet in use. According to Atari, a non-zero value indicates that Line-F support is present.
I haven't been following this thread too closely and not sure what the software emulation is exactly doing.. I can add a bit0 check for =1 (is that regardless of all other bits ?) if you're saying it will run LINEF type instructions, but that could crash GB6 if it's not emulating exactly like a real FPU via LINEF. Of course IO mapped isn't supported at all.

pixelpusher wrote: 06 Jun 2021 21:50 Can you spill some info what fpu code is called in your test?

Code: Select all

*-----------------------------------------------------------------------------*
*	Float FMUL,FDIV,FADD,FNEG,FSQRT,FCMP,FABS,FREM combined speed test
*-----------------------------------------------------------------------------*
fprim_test:
*-----------------------------------------------------------------------------*
	move.l		bas_params(pc),d2
	subq.l		#1,d2
	bmi.s		.err
	fmovem		fp0-fp7,-(sp)
.fprim_outer_loop:
	fmove.s		#1.001,fp0
	fmove.x		fp0,fp1
	fmove.x		fp0,fp2
	fmove.x		fp0,fp3
	fmove.x		fp0,fp4
	fmove.x		fp0,fp5
	move.w		#(1024/8)-1,d1 ; 1024 loops
.fprim_loop:
	;
	fmul.x		fp2,fp3
	fdiv.x		fp4,fp5
	fadd.x		fp0,fp1
	fneg.x		fp5
	fsqrt.x		fp3
	fcmp.x		fp4,fp5
	fabs.x		fp1
	frem.x		fp3,fp4
	;
	dbra		d1,.fprim_loop
	dbra 		d2,.fprim_outer_loop
	fmovem		(sp)+,fp0-fp7
.err:	rts
Two questions regarding the calling of this assembler routine:
  • How is it linked/executed? Is this an object file linked to your code or in an external file?
  • How much stack (initial size) is setup (and available) before calling this code?
User avatar
exxos
Site Admin
Site Admin
Posts: 28344
Joined: 16 Aug 2017 23:19
Location: UK

Re: FPU Compatible Software

Post by exxos »

It just runs the asm code wherever it's loaded into ram. It calls alltest.o which gets loaded into ram while GB6 is loaded. The stack size I don't remember offhand, but think I doubled its size over the default allocation size. Maybe 8k iirc. All CPU related tests are run from asm code in fact.

I think the asm code does the RTS then it just goes back to where it was called from in GB6. Call and return pretty much.
pixelpusher
Posts: 144
Joined: 27 Dec 2019 21:01

Re: FPU Compatible Software

Post by pixelpusher »

exxos wrote: 12 Jun 2021 15:48 It just runs the asm code wherever it's loaded into ram. It calls alltest.o which gets loaded into ram while GB6 is loaded. The stack size I don't remember offhand, but think I doubled its size over the default allocation size. Maybe 8k iirc. All CPU related tests are run from asm code in fact.

I think the asm code does the RTS then it just goes back to where it was called from in GB6. Call and return pretty much.
Thx. Have tracked down the false instruction implementation in the emulator (fmovem (an)+, ...; most likely the pre decrement variant isn't working properly either - doesn't crash though). Your test code would have worked without those instructions (but none the less, bad bug in the emulation code).

Return to “SOFTWARE”

Who is online

Users browsing this forum: ClaudeBot, OAI-Search [Bot] and 4 guests