Getting software to work on 68LC060

News & updates for the upcoming 68060 accelerator

Moderators: terriblefire, Terriblefire Moderator

alenppc
Moderator Team
Moderator Team
Posts: 750
Joined: Thu Nov 08, 2018 12:59 pm

Getting software to work on 68LC060

Post by alenppc » Wed Aug 26, 2020 9:26 pm

The 68LC060 (rev4) is super cheap right now, it clocks really high (same as rev6), it would be a shame not being able to use it. But how to get software to run on it?

Unfortunately almost everything crashes, including Stephen's own CPUSPEED command. The forced FPU code is coming out of somewhere but I can't figure out from where. What's really weird is that the same setup runs fine on 030 without FPU, so it's probably some component of AmigaOS that detects an 040+ and forces FPU instructions. But which part?

amimjf
Posts: 62
Joined: Sun Mar 22, 2020 8:25 am

Re: Getting software to work on 68LC060

Post by amimjf » Wed Aug 26, 2020 10:53 pm

Hi,

I guess this might be obvious, but the OS can't force FPU instructions unless they are generated by the compiler or present in inline assembly. Likewise if the program loads a dynamic library or links against a static library that has no FPU instructions there are none for the FPU to execute. Question is where are FPU instructions coming from ?

An FPU instruction on an LC will probably produce an illigal instruction trap in a debugger.

Combination of a resident debugger like COP and SnoopDOS will let you see where the FPU instruction is loaded from.

At a guess some library is deciding 060 is always full, as that was always the case on historical accelerators.

terriblefire
Moderator Team
Moderator Team
Posts: 3895
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK
Contact:

Re: Getting software to work on 68LC060

Post by terriblefire » Wed Aug 26, 2020 11:01 pm

The 680x0 series can trap all unrecognised instructions and emulate them.

Because AmigaOS is stupid you have to create separate binaries for 6888x emulation (via a library), real 68881/2 and 68040/68060 FPU. All three are different need different binaries. IMHO the code should always do the same and the OS should handle the absence of an FPU. I'd call this hardfloat on ARM.

Either that or the runtime linker should patch up things at runtime. But the current state of not having a single binary that can run on all setups is very irrirating.

My cpuspeed C code does float math so it needs to be recompiled for no-fpu. I'll get around to it.
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."

alenppc
Moderator Team
Moderator Team
Posts: 750
Joined: Thu Nov 08, 2018 12:59 pm

Re: Getting software to work on 68LC060

Post by alenppc » Wed Aug 26, 2020 11:22 pm

Ok I get the explanation for cpuspeed, makes sense. But what doesn’t make sense is all the other software happily crashing away while the same software runs without issue on the 030 without fpu.

amimjf
Posts: 62
Joined: Sun Mar 22, 2020 8:25 am

Re: Getting software to work on 68LC060

Post by amimjf » Wed Aug 26, 2020 11:32 pm

Well if you compile for no-fpu and don't link against any libraries that have fpu code in them it will work on any 060.

Problem of course is that most/all 060 exe's where compiled for FPU, not even sure if you can specify 060 + no-fpu code generation in most compilers as it was never a historically available combination.

Simplest option would probably be an LC aware 060 library that handled trapped 060 fpu instructions and emulated them in software, just like standard 060 libraries do with 040 instructions not present on the 060.

Problem is that it would be pretty slow for any fpu intensive stuff

terriblefire
Moderator Team
Moderator Team
Posts: 3895
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK
Contact:

Re: Getting software to work on 68LC060

Post by terriblefire » Thu Aug 27, 2020 7:46 am

amimjf wrote:
Wed Aug 26, 2020 11:32 pm
Well if you compile for no-fpu and don't link against any libraries that have fpu code in them it will work on any 060
It doesnt thought. Tried it.. its infuriating.
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."

juz400
Posts: 29
Joined: Wed Sep 11, 2019 8:18 pm

Re: Getting software to work on 68LC060

Post by juz400 » Thu Aug 27, 2020 11:50 am

Could this be of any help in your diagnosis?
I think it might be for the missing FPU instructions from 68882 though.

http://aminet.net/package/dev/debug/FPSPSnoop
This debugging tool intercepts the traps generated by a 68040 or 68060
processor as soon as it detects an instruction that is valid, but not
implemented in hardware. It is the job of the 68040 or 68060.library to
emulate these instructions in software. FPSPSnoop disassembles these
instructions, and prints the user status of the CPU and FPU at the
time the emulation is entered.

terriblefire
Moderator Team
Moderator Team
Posts: 3895
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK
Contact:

Re: Getting software to work on 68LC060

Post by terriblefire » Thu Aug 27, 2020 1:19 pm

Try this... its compiled as -lmieee
cpuspeed.zip
(7.01 KiB) Downloaded 57 times
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."

User avatar
supaduper
Posts: 331
Joined: Thu Nov 08, 2018 12:05 pm

Re: Getting software to work on 68LC060

Post by supaduper » Thu Aug 27, 2020 2:03 pm

Just tried CPUSPEED LC on an LC 060 on the TF360 and it all looks good here fella
Attachments
CPUSPEED LC.jpg
CPUSPEED LC.jpg (353.92 KiB) Viewed 1394 times

User avatar
32Bits
Posts: 19
Joined: Mon Jan 21, 2019 7:57 pm

Re: Getting software to work on 68LC060

Post by 32Bits » Thu Aug 27, 2020 3:18 pm

This is great news. Thanks for the recompile will test with my LC.

Post Reply

Return to “TF360”