This is probably the best way to go... I'll start working on this and see if I can get that implemented.
Maybe consider using dingusppc to test your decompression algorithm.
I use a script named run to start dingusppc:
#!/bin/bash
cd /Volumes/Work/Programming/dingusppc/joevt-dingusppc/build/bin
thewindow="$(osascript -e '
tell application "Terminal"
set currenttab to do script ""
tell currenttab
tell current settings
set custom title to "dingusppc Modem Port"
set title displays device name to false
set title displays shell path to false
set title displays window size to false
set title displays settings name to false
set number of columns to 140
set number of rows to 80
end tell
do script "clear; sleep 2; cd /Volumes/Work/Programming/dingusppc/joevt-dingusppc/build/bin; socat UNIX-CLIENT:dingussocket -,cs8,parenb=0,echo=0,icanon=0,isig=0,icrnl=0" in currenttab
end tell
return currenttab
end tell
')"
# 2.4
./dingusppc -d -b "/Volumes/Work/Open Firmware and Name Registry/ROM PowerPC Mac/ROM PM G3/ROMs/@FFC00000 len-400000" --serial_backend=socket --rambank1_size=256 --rambank2_size=256 --rambank3_size=256 --fdd_img=FATFLOPPY.img --pci_B1=Nv47
sleep 1
osascript -e 'tell app "Terminal" to close '"${thewindow#*of }"
Then I execute it using ./run
Include -d for debug. When you start dingusppc, it will show the debug prompt, then you can printenv and setenv and nvedit to modify Open Firmware settings. I set input and output device to ttya and auto-boot? to false so it will enter Open Firmware after you leave debug mode by typing go
Include --serial_backend=socket so that serial port will go to a socket (not available for Windows).
The run script uses AppleScript to automatically open that socket into a new Terminal.app window. Or you could manually enter the socat command in a new Terminal.app window that you create yourself.
Use my fork at
https://github.com/joevt/dingusppc Use the xcode-project fork.
It requires installing sdl2 which you can do with homebrew.
Create code for the sata pci card similar to promise20269.c This implementation doesn't handle any of the registers but it is enough to load the rom. Since it doesn't handle the registers, the fcode takes a while to complete but it does complete. Another option is to just replace the rom (since I didn't include it in the fork) because you just want to test decompression of the ndrv.
To add a PCI card to slot C1, add to the command line:
--pci_C1=PCIDeviceName