[CDG5] ATI frozen mouse bug, cross-post from MacOS9Lives
Jd Lyons
lyons_dj at yahoo.com
Wed Oct 16 19:47:30 AWST 2019
Sadly, no, PPC asm is all Greek to me.
> On Oct 16, 2019, at 7:41 AM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
>
> Remind me, have you got much PowerPC asm experience? Happy to help if you want to have a go at this...
>
>> On 16 Oct 2019, at 7:34 pm, Jd Lyons <lyons_dj at yahoo.com> wrote:
>>
>> Maybe a bit loud, but not too much so.
>>
>>> On Oct 16, 2019, at 7:24 AM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
>>>
>>> Does yours run loud? Mine does, I wondered if I was neglecting to patch something.
>>>
>>>> On 16 Oct 2019, at 7:20 pm, Jd Lyons <lyons_dj at yahoo.com> wrote:
>>>>
>>>> I’d love to figure out the secrets of the nVidia Driver for OS 9, my iMac runs OS 9 very well, except for the unsupported NV18:-(
>>>>
>>>>> On Oct 14, 2019, at 3:50 AM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
>>>>>
>>>>> I looked at the Mac OS X “NVDA,NVMac” ndrvs and the NVIDIA extensions in Mac OS 9.2.2. The only fragment that calls ExpMgrConfigRead* is the “NVIDIA Resource Manager” fragment in the data fork of the “NVIDIA Driver” extension. This fragment is big, close to a megabyte, and does not seem to access the first four bytes of config space.
>>>>>
>>>>> Odd that acceleration doesn’t work when you supply a driver.
>>>>>
>>>>>> 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
>>>>
>>>> _______________________________________________
>>>> 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
>
> _______________________________________________
> 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