Welcome, Guest. Please login or register.

Author Topic: WhichAmiga crashes!  (Read 3500 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WhichAmiga crashes!
« on: April 08, 2007, 04:34:13 PM »
@boot_wb

You make it sound so simple. In order to ascertain what the hardware is, you have to ask it. For CPUs, this often involves peeking supervisor level registers. Which in turn implies your code has to run on that family of CPU to start with. A 68K executable would have difficulty peeking the PVR of a PowerPC that happened to be emulating it at the time ;-) You'd at least need versions compiled for each base platform. A single-executable-fits-all might be possible if you made it a warpup style mixed binary and relied on the host OS to provide the requisite library emulation.

As for detecting the native hardware present in the classic, well you are probably looking at a whole host of illegal access problems on non-classic hardware.

I'm not saying it's impossible, just a lot more difficult than you seem to imply.
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WhichAmiga crashes!
« Reply #1 on: April 08, 2007, 05:19:44 PM »
Quote

Piru wrote:
Fetching PVR is no problem. However, I will not add support for non-classic systems.


I assume you mean via ppc.library / powerpc.library for classics - if not, how does a 68K access that?
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WhichAmiga crashes!
« Reply #2 on: April 08, 2007, 05:50:56 PM »
Yes, but either way, it is the PPC fetching the PVR, not the 68K - which was my original point ;-)
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WhichAmiga crashes!
« Reply #3 on: April 08, 2007, 06:11:19 PM »
Ah, is this why it often misreports the hardware then (PUP, I mean, it often reported my 240MHz PPC as 160MHz, despite the fact the CPU is definately a 240MHz part)?

-edit-

- unless the value in the library base is hard coded, at some point during initialisation it must be read from the physical PVR, regardless of what happens on subsequent library calls...
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WhichAmiga crashes!
« Reply #4 on: April 09, 2007, 01:22:24 PM »
Quote

bloodline wrote:
In answer to the topic subject... They all do! :lol:


Ain't that the damn truth! :lol:
int p; // A