[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] CF .PRG recognition
Paul Wratt wrote:
is there any way to tell if a binary .PRG (.TOS, .APP, .TTP, etc) is a
CF native app?
Assuming that CF means ColdFire (I really hate abbreviations).
No, there is no clean flag in .PRG which indicates the required CPU or FPU.
But we could agree to design such specification. Those flags could be
put in extended MiNT header in the executables, there is plenty of room.
However, as an heuristic, you could search for the "This program
requires a ColdFire V4e" string in a .PRG and assume that it is a
ColdFire binary if you find it.
and do CF native apps "degrade gracefully" on m68k platforms?
First, this question depends on the compiler.
Basically, the answer is No.
For software built with binutils/GCC/MiNTLib, at the beginning there is
a CPU check based on the presence of the _CF_ cookie. If that cookie is
not present (on 680x0 systems), the application displays an explicit
message "This program requires a ColdFire V4e processor and cannot be
run on this machine." and cleanly exits.
For software built with AHCC for ColdFire, they run on both 68020+ and
ColdFire systems, using only instructions common to both processors. The
resulting binary is almost 99% optimal for ColdFire, but there is more
performance loss on 68020+ (to be benchmarked).
If I'm not wrong, software built with AHCC for ColdFire crashes on plain
68000... To be tested further.
--
Vincent Rivière