Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: Boot_WB on April 08, 2007, 02:09:23 PM

Title: WhichAmiga crashes!
Post by: Boot_WB on April 08, 2007, 02:09:23 PM
Whilst I wait for a legal copy of AOS4 I decided to finally install MOS on my Peg1, which has been on the back burner for a couple of months since moving house.

In going through my various backup CD's from previous installations I came across WhichAmiga - and decided to see what it would make of my Peg. Unfortunately it crashes without returning anything.

Piru, for shame!  :lol:  :lol: Surely the latest WhichAmiga should accurately report next gen Amigas (and next-gen amigas in all but name).

btw - on your Avatar you fail to mention that Finalnd is also the home of Moomins (by way of Tove Jansson)

Very happy with MOS so far on the Peg - easy to set up (with a bit of help through Google, and a bit of common sense), quick to boot, and that annoying "lag" on the right-click menus (which I found quite annoying on the MOSPUP version) - for example when showing all files in a directory - is much shorter.

I'm going to have to spend some time over the next few weeks transferring my original AOS (68k) software from floppy to CD (as I don't have a catweasel) to install various productivity stuff (for example - Wordsworth7).
Title: Re: WhichAmiga crashes!
Post by: Amigaz on April 08, 2007, 02:12:34 PM
Have you tried Piru's latest beta version of whichamiga?

lol, didn't know that Mumin trollen (moomins) was known in UK also  :-o
Title: Re: WhichAmiga crashes!
Post by: Boot_WB on April 08, 2007, 02:23:06 PM
Quote

AMIGAZ wrote:
Have you tried Piru's latest beta version of whichamiga?

Hmmm.. thought that was the version I had, obviously not.

Quote
lol, didn't know that Mumin trollen (moomins) was known in UK also  :-o

Yes, we had them on television when I was young (and had more hair :roll: ). I think they were a regular strip in one of the newspapers also.
Bought my partner the complete adventures (in book form) for Christmas just gone. Excellent artwork - expressive and atmospheric.

By the way, I'm installing a few bits on MOS - when offered a choice, which is the best cpu version to use for 68k apps (eg Ibrowse)?
Title: Re: WhichAmiga crashes!
Post by: Framiga on April 08, 2007, 02:28:57 PM
after some twaeking, i suggest you to use the 020f one (for IB2.4).

Which btw, are the one chosen by the installer IIRC.
Title: Re: WhichAmiga crashes!
Post by: itix on April 08, 2007, 02:30:31 PM
I always install 060 version but generally just pick up FPU version. 020+FPU, 040 or 060.
Title: Re: WhichAmiga crashes!
Post by: Framiga on April 08, 2007, 02:35:04 PM
i always install 060 version me too (when/if available) but with IB2.4, i've got some problems with the 060 one.

Title: Re: WhichAmiga crashes!
Post by: Piru on April 08, 2007, 02:38:21 PM
I'm afraid WhichAmiga pokes and peeks way too much low level HW to ever run on Pegasos. ;-)

Title: Re: WhichAmiga crashes!
Post by: Boot_WB on April 08, 2007, 03:49:08 PM
Wouldn't it be fairly easy to set up an initial loop which would identify - for example - the cpu.

Broadly something like:

If cpu>=G3
  check whether peg1, peg2, a1-se, a1-xe, uA1
Else
  Run the original whichamiga routines
Endif

It would be a nice update to the existing WhichAmiga.

Obviously it's a bit more complex than that, but shouldn't be too hard to identify between Peg 1/2, a1-XX, etc

Of course, if it's too much of a challenge..  :-P
Title: Re: WhichAmiga crashes!
Post by: Karlos 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.
Title: Re: WhichAmiga crashes!
Post by: Piru on April 08, 2007, 04:40:11 PM
Fetching PVR is no problem. However, I will not add support for non-classic systems.
Title: Re: WhichAmiga crashes!
Post by: Boot_WB on April 08, 2007, 04:49:42 PM
@Karlos

I have no doubt that you are not exaggerating the difficulty - however, rather than trying to be totally self-contained why not use a call to an external function - for example "version".
If version returns a particular kickstart version (eg 40.68) indicating a classic Amiga then whichamiga continues with its standard 68k classic-hardware-interrogation routines. If version returns, for example, kickstart 50.60 then whichamiga runs a set of routines interrogating the Peg hardware.

Not sure if kickstart is hardware dependent on MOS, or whether it is a file, but the analogy works - if not "version", then some other function - native to the OS - which returns a value useful in identifying the hardware.
Title: Re: WhichAmiga crashes!
Post by: Boot_WB on April 08, 2007, 04:50:56 PM
@Piru

Fair enough :-)
Title: Re: WhichAmiga crashes!
Post by: Karlos 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?
Title: Re: WhichAmiga crashes!
Post by: Piru on April 08, 2007, 05:40:21 PM
Quote
I assume you mean via ppc.library / powerpc.library for classics

For PUP it can use the query function in ppc.library.
For WOS it executes a small PPC routine with RunPPC. This routine in turn calls another routine in supervisor, which fetches the PVR.
Title: Re: WhichAmiga crashes!
Post by: Karlos 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 ;-)
Title: Re: WhichAmiga crashes!
Post by: Piru on April 08, 2007, 06:08:06 PM
Well, actually for PUP it just fetches the stored value from the library base, and with original ppc.library it's all pure m68k code.



Anyhoo, this hardly is any rocket science.
Title: Re: WhichAmiga crashes!
Post by: Karlos 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...
Title: Re: WhichAmiga crashes!
Post by: bloodline on April 08, 2007, 06:24:16 PM
In answer to the topic subject... They all do! :lol:
Title: Re: WhichAmiga crashes!
Post by: Piru on April 08, 2007, 06:24:56 PM
Quote
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)?

In most cases that was just applications being buggy. They assumed the PLL multiplier value was direct multiplier, instead of index to multiplier table specific to each CPU (well some CPUs share the PLL multiplier tables). For example some Doom version blasted "buggy ppc.library" for this, when in fact the app itself was broken.

But if your CPU speed appears randomly change between 240 and 160, then I have no clue.
Quote
- 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...

Sure, it's read at library init. However, your query doesn't trigger any PPC code execution... :-)
Title: Re: WhichAmiga crashes!
Post by: Karlos 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:
Title: Re: WhichAmiga crashes!
Post by: AmigaPapst on April 09, 2007, 02:32:26 PM
@AMIGAZ
I love your avatar, because I'm a fan of Bud Spencer and Terence Hill. :-)
Title: Re: WhichAmiga crashes!
Post by: Amigaz on April 09, 2007, 02:42:07 PM
Quote

AmigaPapst wrote:
@AMIGAZ
I love your avatar, because I'm a fan of Bud Spencer and Terence Hill. :-)


Me too, hehe

Grew up with their movies, seen them all  ;-)
Title: Re: WhichAmiga crashes!
Post by: AmigaPapst on April 21, 2007, 02:47:25 PM
@Amigaz
I too. :-)
In germany the movies are very popular. There is a nice german fansite at: http://www.budspencer.de