On Feb 9, 2016, at 10:05 AM, Alyssa Milburn wrote:
On Tue, Feb 09, 2016 at 09:47:57AM -0500, Programmingkid wrote:
You can assign addresses for serial DMA and even OS 9 will try poking at the dbdma controller, so this is just a question of hooking up the qemu side. I can try doing this later today if it's useful..
It is definitely useful. The ability to run Mac OS 9 in QEMU depends on it.
After a few days spent poking through the startup process in MacsBug, I'm not sure this is true. But I'll hook it up later (if someone else doesn't do it first).
You may be right. This code on Mac OS X does not allow the driver to work because of DMA issues. It is from the PPCSerialPort.cpp file.
// Calls the DMA function that knows how to // handle all the different hardware: SccSetDMARegisters(&Port, provider); if ((Port.TxDBDMAChannel.dmaChannelAddress == NULL) || (Port.TxDBDMAChannel.dmaBase == NULL) || (Port.RxDBDMAChannel.dmaChannelAddress == NULL) || (Port.RxDBDMAChannel.dmaBase == NULL)) return false;
Which version of OS X are you using for testing this?
Mac OS 10.2.8 is running as the guest.
Thanks, I'll see if I can go install 10.2 myself later too..
No probably. If you want I could send you a custom AppleSCCSerial kernel extension with a lot of debugging statements added to it. It will tell you what expectations are being missed.
I don't know if your string would work, but you are right that the first four bytes are just skipped. So it doesn't really matter what they are.
The first four bytes are the slot bitmask (as a 32-bit BE integer), followed by one string per slot (so, one string for each set bit). I don't know whether any OS cares about this or not, another thing to look into..
For the ch-a node, setting the 32-bit number to 1 would be right since it is only one port.
Is there an issue with strlen()? I thought it was a good idea because it makes the code more self-documenting, meaning you understand what the last argument expects.
It fails if you have null bytes in your string (as you would if you encoded the integer in it). Otherwise, yes, it's much clearer than using a constant.
Ok. When I remake the patch constants will be used.
I don't know. But I do know my G3 iMac's value for this property is this:
00000001 Modem
The PowerMac3,1 probably has the same value.
In any case, it makes sense as a value. (Does anyone have an OF dump from a PowerMac3,1?)
I was thinking about this and what Mark told me should definitely be applied. We are building a emulator as opposed to a simulator. A simulator will have almost all variables as close as possible to the real thing. With an emulator we are allowed to make changes as long as these changes work. So we may not need to know what the PowerMac3,1 has in its escc/ch-a node.