[CDG5] ATI frozen mouse bug, cross-post from MacOS9Lives
Jd Lyons
lyons_dj at yahoo.com
Thu Oct 10 18:09:17 AWST 2019
Good work Elliot, looks like you had to dive pretty deep into the ATI Extensions for that.
> 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
More information about the cdg5
mailing list