[CDG5] ATI frozen mouse bug, cross-post from MacOS9Lives
Daniel B-J
danielbj314 at verizon.net
Fri Oct 11 03:31:06 AWST 2019
It would be interesting to make a patch to the ExpMgrConfigReadXXXX routines, so that you can make any device ID appear to be any other device ID without patching individual drivers.
> On Oct 10, 2019, at 9:33 AM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
>
> Very likely! I have a few newly acquired iMac G4s, so I might even be able to do tests on the exact model. Link me to an EveryMac page?
>
>> On 10 Oct 2019, at 6:29 pm, Jd Lyons <lyons_dj at yahoo.com> wrote:
>>
>> On that note, do you think we could patch the Mac OS ROM to support the NV18 GPU this way?
>>
>> I have a iMac G4 with the NV18, just a Geforce 4MX with 8x AGP support. It should work with OS 9’s nVidia drivers(NV17), but because the device ID is unknown to OS 9 it doesn’t.
>>
>>> On Oct 10, 2019, at 6:22 AM, Jd Lyons <lyons_dj at yahoo.com> wrote:
>>>
>>> It’s interesting you were able to patch the device ID, normally OS 9 style drivers are not fooled by Device ID patching, such as:
>>>
>>> dev agp/@0
>>> 00005960 encode-int “ device-id” property
>>>
>>> As most OS 9 style drivers don’t read the device ID from name space, they read it directly from the PCI Registers.
>>>
>>> OS X, however, seems to read all PCI devices from name space, but not the CPU PVR.
>>>
>>> nVidia FCode ROM's after the FX series can append the last half byte of the device ID in the NVStrap, but I’m not sure how OS 9 deals with that, as I’ve never been able to figure out how to hack nVidia driver support for OS 9.
>>>
>>>> On Oct 9, 2019, at 11:44 PM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
>>>>
>>>> I have fixed the frozen mouse bug!
>>>>
>>>> It was, as darthnVader hinted earlier, caused by the ATI extensions. So I took a
>>>> deep dive into the ATI driver architecture. This is the typical "life cycle" of
>>>> an ATI card in a NewWorld Mac:
>>>>
>>>> 1. If the card firmware lacks an ndrv (e.g. the Radeon 9200 in the mini), the
>>>> MacOS uses its generic "COFB" ndrv to get basic video.
>>>> 2. Extensions are loaded from disk. The ATI ROM Xtender or iMic's hacked "ATI
>>>> Via Driver" extension can replace the previously loaded ndrv. No graphical
>>>> acceleration yet.
>>>> 3. The complex array of ATI extensions steps in, asks the loaded ndrv about the
>>>> card using some private Status calls, and loads some acceleration code if the
>>>> card is recognised. Accelerated 2D requires "ATI Resource Manager" and "ATI
>>>> Graphics Accelerator" at minimum.
>>>>
>>>> This was darthnVader's solution to get graphics acceleration working:
>>>>
>>>> 1. Insert a Mac OS X ndrv into iMic "ATI Via Driver" (better called "ATI
>>>> RockHopper2 Driver" after the change).
>>>> 2. Replace all or most occurrences of the 5961 device ID in the other extensions
>>>> with 5962. Both IDs refer to the Radeon 9200, but the extensions only knew about
>>>> the 5961 ID. (Occurrences of 5960 were also replaced -- see below.)
>>>>
>>>> DarthnVader effectively turned our minis into Mac OS 9 gaming rigs!
>>>> Unfortunately, one of the binary patches intermittently broke hardware cursor
>>>> support. It might be due to the way that the PowerPC compiler optimised
>>>> select/case blocks. Sometimes I also experienced a black screen when the ATI
>>>> extensions loaded, which I think was related.
>>>>
>>>> This is my solution:
>>>>
>>>> 1. Insert the same Mac OS X ndrv (ATY,RockHopper2 v1.0.1f63, from Mac OS X
>>>> 10.3.6) into the Mac OS ROM as an ndrv parcel, to mimic a firmware driver.
>>>>
>>>> 2. Patch that ndrv to replace 5962 with 5961 whenever it reads from PCI
>>>> Configuration Space.
>>>> - To achieve this, I got sidetracked and wrote a single-file PowerPC assembler
>>>> script (ppcasm.py) and PEF dump/rebuild script (cfmtool.py):
>>>> https://github.com/elliotnunn/tbxi-patches/
>>>>
>>>> 3. Use the unmodified ATI extensions from January 2005.
>>>> - The extensions that we host in "9200os9.sit", supposedly from the rare July
>>>> 2005 release, do not work.
>>>> - I think that they were binary-patched to enable support for the DVI-I Radeon
>>>> 9200 card, ID 5960. Specifically, the accl 4 resource of the "ATI Graphics
>>>> Accelerator" is an identical build to January 2005, including the build
>>>> date, but has 2/2 occurrences of 5961 replaced with 5960. It would be good
>>>> to find the originals.
>>>>
>>>> So here is my first ROM release of the year. It was derived from the
>>>> "OS9General" Mac OS ROM (v9.6.1) using my portable Mac mini patching system:
>>>> https://github.com/elliotnunn/tbxi-patches/blob/7a5d179/macmini.py
>>>>
>>>> My ATALoad patch has also been applied, to allow Mac OS 9 to boot from volumes
>>>> that were formatted for Mac OS X, without first wiping the disk with "Mac OS 9
>>>> Drivers". I think that this is especially useful on machines that were formerly
>>>> Mac OS X-only.
>>>>
>>>> I recommend that this ROM be included in a new release of the Mac mini ISO. It
>>>> should be combined with the unmodified ATI extensions from January 2005.
>>>>
>>>> _______________________________________________
>>>> cdg5 mailing list
>>>> cdg5 at ucc.asn.au
>>>> https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5
>>>
>>
>> _______________________________________________
>> cdg5 mailing list
>> cdg5 at ucc.asn.au
>> https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5
>
> _______________________________________________
> cdg5 mailing list
> cdg5 at ucc.asn.au
> https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5
More information about the cdg5
mailing list