@Hans There don't seem to be much communication with the card by the AmigaOS Radeon driver before setting up CCE but I don't have time to go through each of those now but maybe somebody can spot something. I get:
The above may be missing some lines as the forum engine just seems to drop them. Also the register names may be different from Radeon as it was originally for Rage128Pro but the addresses are mostly the same.
Edit: removed to avoid confusion. This methods only works on older Linux distros and pre 6.0 kernels
Edited by geennaam on 2023/6/29 15:06:15 Edited by geennaam on 2023/6/29 15:08:08 Edited by geennaam on 2023/6/29 15:08:46 Edited by geennaam on 2023/6/29 15:11:12 Edited by geennaam on 2023/6/29 15:25:05 Edited by geennaam on 2023/6/29 15:56:09 Edited by geennaam on 2023/7/3 19:00:51
@Hans MorphOS pokes the regs much more, it even seems to do weird stuff like accessing VGA paged memory for some reason but ends up doing similar things eventually:
Here I can see these are byte swapped compared to AmigaOS log. I've also noticed that MorphOS driver waits for the CCE FIFO to have empty slots befire writing and stops there as we report 0 but AmigaOS don't seem to care just write to the FIFO anyway. Not sure it checks in a different way or could overflow the FIFO on real card.
Which graphics cards are relevant here? I'm assuming if we're doing passthrough then it has to be something that OS4 natively supports? The only spare card I have, IF I can get hold of a power cable for it (thats the whole reason it's spare, I've lost it in a house move) is a Sapphire RX580 which I assume is far too modern?
to my understanding the above setup now works with MorophOS passing through the 9250 but does not get picture with AmigaOS.
Not quite correct. I do get an image for AmigaOS. The AmigaOS4.1 boot logo shows up fine. (This might be a simple framebuffer?) The workbench screen (desktop) is corrupted and has rendering issues. Probably because memory allocations are wrong and that it uses 2D GPU accelerations which do not work correctly.
So both MorphOS and amigaOS show pixels on the screen. MorphOS output is fine. AmigaOS4 is not.
Also AmigaOS4 doesn't show an image on the DVI output. Only on the VGA output. MotphOS can handle both outputs. I's sure that the OS4 driver can handle DVI, becausye it works for the same card in my sam440.
@geennaam Thanks for gathering these in one post for convenience. You say multifunction=on should be on function 0 but the command lines have it on function 1 (e.g. host=03:04.1,multifunction=on) which is correct? The qemu command has some garbage at the front. I did not follow what happens if you use VGA but I'd say using bochs-display and adding x-vga=on for the 9250 as well may be better otherwise there may be some mix up between the emulated VGA and the passed through card which also has VGA mode. Edit: Unless of course x-vga=on does not work with 9250 which could be based on the comment in source but I'm not sure it's even needed by AmigaOS, probably not as that only cares about the PCI BARs
Thanks - for now I only have OS4 CDs for classic and Pegasos2.
I'm wondering if I should try to find a second hand card and likely a bridge card as well since my PC only has PCIe. I do have an older motherboard that is I think has an i7 6700k in it. That has a PCI slot but it probably getting a bit slow and I'd have no idea if it supports pass-through. It certainly predates it being popular that's for sure.
I'm wondering if I should try to find a second hand card and likely a bridge card as well since my PC only has PCIe. I do have an older motherboard that is I think has an i7 6700k in it. That has a PCI slot but it probably getting a bit slow and I'd have no idea if it supports pass-through. It certainly predates it being popular that's for sure.
According to https://en.wikipedia.org/wiki/List_of_ ... ocessors#%22Skylake-S%22_(quad-core,_14_nm) i7-6700K has VT-d so it should be OK but the motherboard chipset and BIOS must also handle it. As for how fast it would be it may worth a try if you already have that machine before getting new one because if it works it might at least be a good start.
You've mentioned problems with network. What specifically? On macOS you can either use -netdev user or -netdev vmnet but the latter may need some setup or run as root, I'm not sure. I think @Maijestro had something on it in the guide published on amiga-nows.de. If you're interested in trying to write a driver looking at making an AmigaOS driver for virtio-net may be a good way to start and learn. Borh the virtio-net device and Amiga API for network drivers (is that SANA2?) should be documented and sample code should be available. Once you get understanding how this works all other virtio device use the same mechanism to talk to the device which is a memory mapped ring buffer not unlike what ATI cards use so it should be simple to interface to those.
@geennaam Sure, I'm aware. I already have OS4 fully up and running in Qemu using SM501 on a spare disk in my gaming PC and on my day-to-day Mac Mini. It runs very well mostly, better than under WinUAE or FS-UAE, but of course it runs like a snail, or not at all as soon as you hit it with something that needs real GPU capabilities.
I am indeed debating whether to follow along and experiment with GPU passthrough. When I first got my current gaming PC a few years back that's how I had it, a very slim linux boot and then either Windows or Linux via virtIO. The motherboard is extremely good at segmenting all the bits and allowing passthrough. Right now it's not setup that way.
-device VGA,romfile="" will show the Pegasos SmartFirmware output in the QEMU window
Does that mean when using this with 9250 on vfio-pci without x-vga=on you see output in the emulated VGA? That's odd because this card does not have ROM so it must be the ATI ROM that writes something there but in that case those writes should go to the ATI card so that's why I said you'd better use bochs-display,romfile="" with x-vga=on on the ATI card instead. Or I'm just completly missing what you say.
You read my mind somewhat on the networking! So when I say it's problematic, the RTL device will just stop working randomly. I noted from your web page that after the OS updates you may need to downgrade back to the version on the CD but it still does it. I used bridged mode by running qemu as root. I've built Qemu from source so I'm running on master, though I'm guessing that doesn't make a huge difference.
My NAS at home has a bridged interface which was doing a good job of upsetting OS4 (Roadshow?) because the MAC address would randomnly flick between the two ports on the interface. I changed that bridge to just be in standby / failover mode instead and I haven't checked to see if that has helped. I could certainly see it being problematic if it decided to switch half way through a big transfer. If that's even something that it would do.
I did also spend time reading through various documentation and notes, some of which may well have been from you (what you said sounds familiar) and I have to say, it didn't all fly miles over my head and I did end up thinking I could possibly take a look. That was probably a week or two back? I haven't ruled out looking into it. From memory I think I forumlated a plan in my head to see if I could implement some sort of stub driver that at least spits out some logging and if I get that far go from there.
Apologies if this is de-railing the main topic here!
@MartinW Some people reported problems with network but others not. I'm not sure why that happens or how to find out so if somebody has an idea how to debug that from the AmigaOS side that may help. I could only suggest to try emulating different network device for the guest, see -device help for what's available but I think most of those have no driver in AmigaOS. The ne2k_pci is NE2000/RTL8029 compatible but maybe the drivers are not any better. I can't do much about this problem so if anybody has any idea how to find out why it hangs please speak up.
Understood - it's not a big problem for what I'm doing with OS4 at the moment. I can experiment to see if any other kinds of card work better for me. I also like the idea of looking at a driver.
I also use Qemu Peg2 on my Mac M1, your line looks good so far. I also experimented with VMNET, but it was more unstable with the network connection. And I went back to the normal user.
With this the network runs stable most of the time, but every now and then it breaks down, unfortunately the error can't be reproduced because it happens randomly.
I would like to investigate why the network connection is lost from time to time. Maybe someone can help to solve this problem?
Also their audiodev line for core audio looks a bit different...their line:
***Note:However, I don't want to deviate from the last topic GPU passthrough as it is very exciting and maybe useful information will be gained for the future ati-vga emulation.
Edited by Maijestro on 2023/6/29 17:31:44 Edited by Maijestro on 2023/6/29 17:32:36
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE