[CDG5] HID1 Bit 9

Jd Lyons lyons_dj at yahoo.com
Fri Mar 1 19:46:07 AWST 2019


The code I have now is:


;  We do this for Apple portable systems to disable DFS mode.

   mfspr  r31, 1009
   rlwinm  r31, r31, 0, 10, 8
   mtspr  1009, 31

But I can’t seem to find a place to insert it that changes anything, seems a good place would be in the NKPowerCalls.s, but I’m unsure where to put it to have it do what we want?

BTW, on another note, I was able to insert the ATY,VIA ‘NDRV’ into the Mac OS ROM and get it to load, not really useful, or more useful than the one in the Extension folder, but I also tried it for the NVDA ‘NDRV’ with no success. The NVDA ‘NDRV’ seems to rely on the ResMan, sadly I haven’t figured that all out yet for OS 9.

> On Feb 24, 2019, at 9:49 AM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
> 
> Yeah, my reversed sources are a bit average there. This is a better
> reversal of an earlier version of the same code:
> 
> https://github.com/elliotnunn/NanoKernel/blob/master/ProcessorInfo.s#L601
> 
> In this much nicer version, are no macros to obscure the purpose of
> those bytes: they are a lookup table, to decide which HID0 bit to set
> when the upper OS makes a "power" call. They don't affect HID1. In fact,
> it's been a while, but I'm pretty sure no version of the NanoKernel ever
> touched HID1. You know the history better, but it seems to be a very
> late-G4 thing.
> 
> I suspect that you want to slip this into the init code somewhere:
> 
>    mfspr   r31, 1009               ; HID1
>    oris    r31, r31, 0x0400        ; bit 9
>    mtspr   1009, r31
> 
> I am seeing a similar error with empw quite frequently. Try trashing
> your SourceForEmulator *and* your MPW-VM.dmg, and then running `empw -b`
> with no other arguments. If the second disk is mounted in the emulator,
> just run `:EasyBuild` (you need to type command-return) from the MPW
> window.
> 
> I'm sorry, that repo is a mess. I am progressively reversing every known
> NK version in a separate repo that builds much more reliably, but
> process is slow.
> 
>> On 24 Feb 2019, at 10:27 pm, Jd Lyons <lyons_dj at yahoo.com> wrote:
>> 
>> Thanks Elliot, still getting some errors trying to get the build going:
>> 
>> + NanoKernel/NanoKernel.s
>> ### Set - Too many parameters were specified.
>> # Usage - Set [name [value]]
>> ### MPW Shell - Execution of EasyBuild terminated.
>> ### MPW Shell - Execution of MPW-VM:AutoGenInner terminated.
>> 
>> Please explain what this bit of code does?
>> 
>> It looks like 0x23 is setting bit 10(sleep) bit 14(XAEN) and bit 15(NHR), then something is done with the L2CR.
>> 
>> PflgTblEnt      0x23,   HID0_NHR_and_sleep,             1<< hasL2CR | 1<< hasPLRUL1 | 1<< hasTAU | 1<< hasVMX | 1<< hasMSSregs  ; 8**3 like 7450 but better
>> 
>> If I wanted to set bit 9 of the HID1 my code would need to be something like:
>> 
>> PflgTblEnt      0x04,   HID1_DFS_only,                  0                                                                                                               
>> 
>> ???
>>> On Feb 23, 2019, at 9:08 PM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
>>> 
>>> git show 4f95ec6
>> 
> 



More information about the cdg5 mailing list