04 November 2022, 18:17 | #201 |
Registered User
Join Date: Jul 2014
Location: Finland
Posts: 1,175
|
I wonder if the handles system makes uncaught memory access violations better or worse in applications developed at the time, as it sounds like you need to validate every pointer of each memory allocation your application has each time you access them.
....i kiiiinda see what this was trying to solve without a MMU.... and it shows this was architected with very little future prospect to it, oh well captain hindsight and all that. |
05 November 2022, 02:18 | #202 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
Handles are necessary when your OS moves an application (and any memory allocated for it) around in memory at will. It took me awhile to get the hang of it - "now, this is not an address - this is pointer to a pointer!"
There is psuedo memory protection, but it just throws up a bomb unless you have trapped this. There were a few programs (like MacBugs) that did this. I supported a couple of them, and actually used this feature a couple of times to figure out what the Mac was trying to walk on... mostly null/$4 issues. |
06 November 2022, 20:27 | #203 | ||
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,214
|
Quote:
The trouble is, and this is a correct observation, that you need to be very disciplined when using this system. You cannot pass pointers around, you need to pass handles around, well noting that handles can become invalid. There are a couple of Os functions to help you there (LockHandle - to avoid migrating the resource associated to a handle, or MoveHandleHi to avoid that a locked handle blocks defragmentation), but this is very tedious and error-prone. The good part is that every application consists of (in principle) disk-based resources that can be loaded into memory or migrated if short of memory, which allows a global system application ("ResEdit") to modify applications and its menus, buttons, dialogs and other GUI elements without even having source code available. "ResEdit" and its principles are certainly the better part of MacOs. The memory manager not so much, though the two are of course closely coupled and one wouldn't work without the other. Quote:
As said, it didn't age well. The problems it tried to solve could have been solved better by a MMU similar to what Unix offered already, though - obviously - the CPUs required for this were not available at the time the Mac was designed, or were simply not attractive due to their price. |
||
06 November 2022, 23:02 | #204 | |
Registered User
Join Date: Jul 2014
Location: Finland
Posts: 1,175
|
Quote:
I never knew what MacOS used those upper bits for, but that makes sense even. That's quite similar to tagged memory architectures on Burroughs mainframes and LISP machines, of course with those you'd have something like a 32bit pointer with another 4 bits of tags. |
|
25 November 2022, 07:23 | #205 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
I didn't "claim" anything.. I stated a fact. The FPU in the Vampire does not meet the 80 bit precision requirement that Apple relies on for their OS, especially OS8.x.
Apple uses the FPU to do everything from real intense math calculations to simple things like determining the slider position in a window. The slider issue is a dead give away that you don't have full 80 bit precision. For WinUAE this requires that you select the "Soft float" option, which emulates the FPU correctly. Otherwise, you need to turn off the FPU with the Vampire which use to be (I am not sure now) an option that you could do. At that point, the Mac uses software FPU emulation and it works fine, but extremely slow! |
25 November 2022, 13:50 | #206 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,214
|
You can't. That's the sad part, the FPU stays always on. The only thing you can turn off is the support for the transcendental functions, but it stays double-only. That's what you find on FPGAs today.
|
27 November 2022, 00:46 | #207 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
Hmmm... you use to be able to turn off the FPU completely using one of the custom registers. I wonder why that went away? If that is true then it validates my decision to abandon custom support for FPGA based Amiga emulations. A non-working FPU on a Mac makes it pretty much useless for compatibility.
|
20 December 2022, 22:47 | #208 |
Gimmemore Commodore
Join Date: Apr 2016
Location: Australia
Posts: 339
|
You can turn the FPU off in the Vampire still today. When you do that then the soft-FPU kicks in on MacOS.
|
21 December 2022, 13:43 | #209 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,214
|
No, you cannot. You can disable the "minicode" that implements the transcendental functions, but you cannot disable the 64bit-limited FPU instructions for elementary algebra.
|
21 December 2022, 22:05 | #210 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
|
22 December 2022, 09:46 | #211 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,214
|
For the 68060 FPU, yes. But again, as far as I understand - this is not how the Vampire FPU works. I had this discussion during testing of SoftIEEE, the AmigaOs implementation of a software FPU. The elementary FPU algebra cannot be disabled AFAIK, unlike on the 68060. FPU disable bit in the PCR works differently.
Last edited by Thomas Richter; 22 December 2022 at 09:53. |
22 December 2022, 10:21 | #212 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
We are talking about the Vampire's FPU support... not the 68060. There is a function to disable the FPU completely. The Mac pokes at the FPU directly to see if it can do certain FPU functions to know there is an FPU present or not. When this fails the OS then invokes the software FPU functions which support the industry standard IEEE 80 bit precision.
To disable the FPU on the Vampire so that it works with FUSION you need to run the VControl program and disable the FPU with this line from a CLI: VControl FP=0 |
22 December 2022, 12:46 | #213 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,214
|
Happy if it works, but I received contradicting informations from other parties, see above.
|
22 December 2022, 15:16 | #214 |
Registered User
Join Date: Jan 2019
Location: Finland
Posts: 634
|
If software FPU is built-in to MacOS, then why is there a third party extension for it? https://macintoshgarden.org/apps/softwarefpu-307
Last edited by Aardvark; 22 December 2022 at 19:04. |
23 December 2022, 04:51 | #215 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
Several companies made a "SoftwareFPU" for the Mac. Apple's math libraries use the FPU if present, otherwise it is software emulated and you MUST call their libraries (which Apple said you were suppose to do). Many functions like transcendentals are not available via the library.
The software FPU programs actually patch the FPU exception vectors and emulates the FPU exactly in software so you can issue standard FPU commands at a low level. A lot of programs don't call Apple's math libraries and poke at the FPU directly. Those won't work if you don't have a real (or a software emulated) FPU. By running one of the software FPU programs you can basically run everything that requires a real FPU. There were several Mac machines that used the 68LC040, which is the FPU-less version. ALL Macs had a MMU, even the 020 versions using the 68851, but not all had a FPU. Software FPU programs were necessary for the machines that never had a FPU if they required a FPU (because using actual FPU instructions instead of Apple's library). I replaced Apple's math packages with my own, which is why math under FUSION is anywhere from 25% to 250% faster than any equiv speed Mac (or other emulator). Its also the reason why A4000's w/EMPLANT boards replaced real Mac AVID video post production systems in Hollywood in the mid-90's. You could render and edit way faster with an Amiga setup than any Mac on the planet at the time. Last edited by JimDrew; 23 December 2022 at 05:07. |
23 December 2022, 10:32 | #216 | |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,214
|
Quote:
Unfortunately, and like on the Amiga, some software existed that used the FPU directly and did not call through Apple SANE, and for that software you could get this patch, which again is roughly comparable to SoftIEEE on the Amiga. |
|
05 March 2023, 18:40 | #217 |
Registered User
Join Date: Oct 2013
Location: Wrocław, Poland
Posts: 202
|
Hi Guys,
is there a reason why Fusion 3.2 hangs Amiga just before going into Mac emulation on AmigaOS 3.9, while is working perfectly OK with same config on AmigaOS 3.5? SnoopDOS detects no warnings too. |
05 March 2023, 22:48 | #218 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
FUSION doesn't officially support AmigaOS3.9... I have never even tried that version (or AmigaOS 3.5 for that matter).
|
07 March 2023, 21:40 | #219 |
Registered User
Join Date: May 2007
Location: Austria
Posts: 67
|
I can definitely confirm that Fusion is working fine with OS 3.9.
Maybe you should carefully compare the "Startup-Sequence"s of both setups. Also mind SYS:Expansion and SYS:WbStartup. CPU-related libraries (e.g. 68060.library, 68040.library, MuLib-related libraries, or FPU-related libraries) may also be different on your two setups. You could also check if RTG-related libraries (if you use RTG) are differring. |
08 March 2023, 01:46 | #220 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
Thanks for confirming!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fusion MAC emul back to wb keys | clauddio | support.Apps | 0 | 15 March 2012 02:35 |
Fusion Mac emu | DDNI | request.Apps | 47 | 12 March 2009 01:21 |
Mac emulator Fusion | panos_pit | request.Apps | 2 | 26 October 2008 15:58 |
Were to get Mac os for emulator? | adonay | request.Other | 12 | 28 February 2008 16:07 |
Damn Mac games fly in Fusion!! | DDNI | Amiga scene | 1 | 04 June 2007 01:44 |
|
|