FPU Compatible Software

General Discussion, STOS.

Moderator: troed

pixelpusher
Posts: 117
Joined: Fri Dec 27, 2019 9:01 pm

Re: FPU Compatible Software

Post by pixelpusher »

exxos wrote: Tue Jun 08, 2021 6:11 pm 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: 23437
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: FPU Compatible Software

Post by exxos »

pixelpusher wrote: Tue Jun 08, 2021 7:01 pm 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:
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
exxos
Site Admin
Site Admin
Posts: 23437
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

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
(47.67 KiB) Downloaded 98 times
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
pixelpusher
Posts: 117
Joined: Fri Dec 27, 2019 9:01 pm

Re: FPU Compatible Software

Post by pixelpusher »

exxos wrote: Tue Jun 08, 2021 7:46 pm 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: 23437
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: FPU Compatible Software

Post by exxos »

pixelpusher wrote: Tue Jun 08, 2021 8:41 pm That one prints out "LineF EMULATOR.". Thx!
Finally :)
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
exxos
Site Admin
Site Admin
Posts: 23437
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

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..
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
pixelpusher
Posts: 117
Joined: Fri Dec 27, 2019 9:01 pm

Re: FPU Compatible Software

Post by pixelpusher »

exxos wrote: Wed Jun 09, 2021 10:01 pm @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: 117
Joined: Fri Dec 27, 2019 9:01 pm

Re: FPU Compatible Software

Post by pixelpusher »

exxos wrote: Sun Jun 06, 2021 10:03 pm
pixelpusher wrote: Sun Jun 06, 2021 9:50 pm 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: Sun Jun 06, 2021 9:50 pm 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: 23437
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

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.
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
pixelpusher
Posts: 117
Joined: Fri Dec 27, 2019 9:01 pm

Re: FPU Compatible Software

Post by pixelpusher »

exxos wrote: Sat Jun 12, 2021 3:48 pm 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).
Post Reply

Return to “SOFTWARE”