Page 6 of 7
Re: FPU Compatible Software
Posted: 08 Jun 2021 19:01
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.
Re: FPU Compatible Software
Posted: 08 Jun 2021 19:13
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:
Re: FPU Compatible Software
Posted: 08 Jun 2021 19:46
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
Re: FPU Compatible Software
Posted: 08 Jun 2021 20:41
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!
Re: FPU Compatible Software
Posted: 08 Jun 2021 20:46
by exxos
pixelpusher wrote: 08 Jun 2021 20:41
That one prints out "LineF EMULATOR.". Thx!
Finally :)
Re: FPU Compatible Software
Posted: 09 Jun 2021 22:01
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..
Re: FPU Compatible Software
Posted: 10 Jun 2021 06:44
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...
Re: FPU Compatible Software
Posted: 12 Jun 2021 13:37
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?
Re: FPU Compatible Software
Posted: 12 Jun 2021 15:48
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.
Re: FPU Compatible Software
Posted: 12 Jun 2021 19:30
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).