Who's Online |
45 user(s) are online ( 34 user(s) are browsing Forums)
Members: 1
Guests: 44
skynet,
more...
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/7 15:51
#221
|
Not too shy to talk
|
@balaton
Just so we're on the same page, and it might amount to the same thing anyway, but on Sam460 the VGA is recognised and the whole boot process plays out on the screen connected to passthrough GPU but once the kickstart roms have been loaded and OS4 starts to boot we just get DMA errors reported in the qemu window and the screen stays on the kickstart load screen. I'm not saying qemu is throwing the errors, it may be the sam460, but something is not happy about DMA errors.
Hmm. I tested that before I realised DVI was the output that was being activated for OS4. Maybe i'll try that again now that I have the DVI port connected! But all the same, there are still the errors so it's probably still a non-worker.
I believe geennaam reported this some way back so this isn't new info at all. I'm just not sure if it got missed as there's a lot in this thread now.
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/7 15:27
#222
|
Not too shy to talk
|
@balaton I mean, in pseudo-code terms, it goes something like this:
find device
add open word
open device and assign to self
open reg property - this will return false, a length and address on stack
length should be multiple of 20
drop return code
decod-phys (returns hi, mid, low, maybe opposite order)
save them or write them down
3drop
decode-int
save it or write it down
drop
decode-int
save it or write it down
drop
repeat until length on stack = 0
open assigned-addresses property and repeat
using all the values attained, encode them back having flipped the required bits of any addrHi values (I'm not typing that out again)
device-end
boot
What I really meant by how far do I want to go, is do I pursue passing through more devices, or do I pursue real hardware. And independently of that, do I pursue furthering the Mac side of things. Right now, I'm finding this extremely interesting so it's probably a mix of all three! If I pursue real hardware then that will have to be at the expense of this hardware as I simply don't have the room for a big box Amiga and a big box gaming PC.
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/7 15:15
#223
|
Not too shy to talk
|
@derfs Ohhh. Thanks. That's interesting and gives me something to go back and look at on mine as I didn't check the values with / without rom file. OR, mine didn't add an extra region. I'm not sure which now. I keep calling them regions. They might be BARs. Frankly, at that point, to me, they're just numbers
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/7 15:06
#224
|
Not too shy to talk
|
@derfs Hang on, that's just changed - there's a new entry there now! A 32bit memory region. Was the first one with romfile="" and the second one without? Or did something else change?
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/7 14:57
#225
|
Not too shy to talk
|
@derfs
Yes, and not only do I think that's worth trying, but I'd like you to give it a go as it is in between the 5450 and my RX580 so a good next step. Your figures look almost identical to mine so I should be able to send you something this evening. It won't be until 8 or 9 BST though.
[edit] Do you have a ROM entry listed? I don't need to know what's in it, but it does need to be there, it seems.
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/7 14:54
#226
|
Not too shy to talk
|
@Maijestro
Thank you.
It's not massively high-end hardware, but it's no slug either. I built it in June 2020. It has an AMD Ryzen7 3700X cpu 3.6Ghz, 8/16 cores, Boost to 4.4Ghz. I think the host OS is just running off an old 256GB sata ssd I had lying around because the main use of the machine is gaming so the main OS is on some super-fast NVMe drive. Host has 32GB of DDR4 3200 memory.
Main GPU is an RX6700, although that is completely invisible to OS4 and that's just seeing an old HD5450 I scored off eBay.
If qemu is only using a single core for the emulation then really, I'd consider the host to be mediocre in terms of modern PCs. For the record, none of the fans in the case ramp up when running the emulation so it is to all intents, silent.
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/7 14:38
#227
|
Not too shy to talk
|
@kas1e First of all, my currently passed through GPU has no 3D support. That is a known thing, it's too old. 2D only as far as I know. I can download that demo tonight and try, but if it's really Quake3 then I imagine it will be a slide-show. Remember for now this is a Radeon HD5450 only. As for changing the mapping then it might be just as easy if you post the output from the properties of the device in OpenFirmware and I can create the commands. Hmm... it's not what we really want but I'm sure I could create a utility to generate an OF patch script from the device output on Mac / Linux, far, far quicker than I could learn how to do it in Forth. So, find your graphics card in OpenFirmware. It's going to be something like "/pci/display@2" - if you have more than one, make sure it's the right one. Then, at the of prompt, type the following (this is from memory, apologies if there are errors):
dev /pci/display@2
.properties
Paste the output here. I'm particularly interested in the Reg property and the Assigned Addresses property. Please note, people, that I'm not prepared to sit here and do it dozens of times. But I can do it once or twice before I write something to do it if it helps people with real hardware. I hadn't quite grasped that this effort was potentially benefitting physical Pegasos2 owners as well! For now I have work to crack on with. [edit] It's a shame you're not in the UK - I'm about to send a PCI-PCIe bridge back to Amazon as it's not what I need :D
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/7 14:26
#228
|
Not too shy to talk
|
@derfs Well, that saves some effort I think I can just not pass that device through as they are mapped as independent devices I believe. I am reaching the point of just how far do I want to go with this now.
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/7 14:06
#229
|
Not too shy to talk
|
@balaton Quote: The errors you see with the ROM is not actually from QEMU but from the BIOS emulator in the pegasos2 firmware. OK, understood. Obviously before all of this, Qemu was a bit of a black box to me. It's gradually opening up. Quote: Do the network card and GPU share an interrupt? Is there a way to list that under AmigaOS? If you boot a ppc linux on pegasos2 with passed through card you could get these info with lspci -v and cat /proc/interrupts I think. That is something I will need to investigate. Morphos might tell me something there as well. I can probably access that quicker than I can get a linux guest setup. I'll take a look. I also need to properly map the audio side of the card as well.
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/7 13:56
#230
|
Not too shy to talk
|
@balaton
Yes, and right now all I really know is that as soon as I try to transfer a file it only gets a packet or two in and freezes the transfer. If I then try to interact with a window the whole OS freezes and I have to kill the emulator.
At the end of the day, I was intending to look at writing a driver for the qemu card rather than using an emulated rtl8139 but that's months away if I can even get my head round it at all.
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/7 13:49
#231
|
Not too shy to talk
|
@balaton At the moment I'm not blocking the ROM with romfile="" and qemu does spit out a lot of errors on boot. Further I have to type blind, either the failsafe command or just the boot command since everything else needs no intervention now. It gets there. I just tried to boot with the rom blocked (romfile="") and OS4 cannot init the card, although there are enough manual steps here that I need to be sure I'm typing the correct thing each time. I think I did! :
booting default
Trying to boot configuration AmigaOS_4.1_Final_Edition
graphics.library AltiVec/VMX enabled##################################] 100 %
graphics.library PPC74xx optimizations enabled
RadeonHD.card (0): RadeonHD.chip 3.7 (19.11.2019)
RadeonHD (2): Graphics card name is: Radeon HD 5000M Series
RadeonHD (2): Identified the chipset as: CEDAR
RadeonHD (2): If - and only if - your card does not work or does not work optimally
please submit a bug report at:
http://www.amiga.org/developer/bugreports
Remember to include the driver version, and the following card details:
0x68E1:0x174B:0x3000: <name of board>
and *please* describe the problems you are seeing in detail.
RadeonHD.chip (0): ERROR: PCI BIOS ROM signature not found
RadeonHD.chip (0): ERROR: Could not obtain the AtomBIOS
RadeonHD.chip (0): RadeonHD card closed
graphics.library cannot configure your graphics board!
Either your board is not supported or there's a configuration problem.
Did you install PCIGraphics.kmod?
Network is completely unusable with GPU passthrough. Seems fine without. So clearly there is more work needed here. [EDIT] I should actually read what I post! Yes, the debug info clearly says it cannot find the ROM signature and so closes. So that begs the question, does it just need the signature to be somewhere, or does it need the actual ROM? If it's just the signature then that might be able to be supplied without actually loading it. Not that it's really a problem to load it, it just makes the boot process that bit more awkward.
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/7 12:35
#232
|
Not too shy to talk
|
OK, just to update, I think this is fully working using a Sapphire HD5450. I had to purchase Enhancer 2.2 for the drivers. Without them I could tell stuff was booted and running but I had no video, but now it seems good.
Resolution is 1920x1080@32bit, frame rates seem OK and Mace Demo fully works at a decent frame rate. This is the first time I've seen that game properly on OS4. I own it on Steam but under FE Classic emulation it was always missing sprites and stuff. Bear in mind, this is considered a low-end GPU.
I've had a couple of system freezes but each time it was when I was doing something network intensive. If I can work out how you do screenshots on OS4 I'll post some screenshots of the PCI resources as OS4 sees it.
There's still quite a bit I need to do. I haven't changed the mapping for the integrated audio. I don't know if that would work if I did and clearly this isn't an end-user friendly solution by any stretch of the imagination.
I would like to work out how to enable the HDMI output from the card, if that's possible because my DVI to HDMI isn't long enough and I've had to raise the machine up on blocks of wood for the cable to reach :D
I'll consider passing through a network card too if I have a supported one and see if that helps with the freezes I've been seeing. I will also see if I can get my RX580 passed through as well but I'm unsure what to do on the addressing for that as one of the memory regions is within 64bit. I need to read the documentation.
|
Amiga x5040 ı 16GB ı RX580 GB-A1000 060@100, A1200 PiStorm32-Lite CM4
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/6 22:22
#233
|
Not too shy to talk
|
Leave this with me - I need to do some work on my OS4 install but it's looking promising!
|
Amiga x5040 ı 16GB ı RX580 GB-A1000 060@100, A1200 PiStorm32-Lite CM4
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/6 22:07
#234
|
Not too shy to talk
|
So I'm battling with a number of different issues now, most of which lie with the potatoe pressing the keys on the keyboard! So far, I haven't worked out how to get monitor output AND serial output. I mean, I can get monitor output but it's in a tiny window and any info command just scrolls off the screen. Maybe I can be specific about which PCI device I want info on. Hmmm. I do currently have SM501 device as well but the guest isn't initialising it. It would be a good idea now for me to throw my config in here in case I have something wrong as my brain is a bit fried right now.
QEMU_CMD="sudo $QEMU_BIN \
-L pc-bios \
-M pegasos2 \
-m 1024 \
-cpu 7447 \
-accel tcg \
-rtc base=localtime \
-bios pegasos2.rom \
\
-vga none \
-device sm501 \
-device vfio-pci,host=0d:00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=0d:00.1 \
\
-device rtl8139,netdev=mynet0 \
-netdev user,id=mynet0 \
\
-drive if=none,id=hd0,file=os41_pegasos2.img,format=raw \
-device ide-hd,drive=hd0,bus=ide.0 \
-drive if=none,id=hd1,file=os41_data.qcow2,format=raw \
-device ide-hd,drive=hd1,bus=ide.0 \
\
-device es1370,audiodev=snd0 \
-audiodev id=snd0,driver=alsa,out.try-poll=off \
\
-serial stdio \
"
|
Amiga x5040 ı 16GB ı RX580 GB-A1000 060@100, A1200 PiStorm32-Lite CM4
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/6 21:54
#235
|
Not too shy to talk
|
@kas1e Unfortunately, at this point it's not a script as such so not going to be a lot of use to anyone else, I've basically typed in forth commands at the Open Firmware prompt to get it to spit out the numbers, pasted them into a code editor, modified the relevant bits and then added Forth commands to push them back in in their modified form. If this were to work then we can look at scripting it. But with my lack of Forth knowledge that's not going to happen overnight. Anyway, without comments:
\ Fixup Script for Radeon HD5450 in 0d:00
\
s" /pci/display@2" find-device
: open ( -- ) true ;
s" /pci/display@2" open-dev to my-self
\ reg
0 0 h# 00001000 encode-phys 0 encode-int encode+ 0 encode-int encode+
0 0 h# 42001010 encode-phys 0 encode-int encode+ h# 10000000 encode-int encode+
0 0 h# 02001018 encode-phys 0 encode-int encode+ h# 20000 encode-int encode+
0 0 h# 01001020 encode-phys 0 encode-int encode+ h# 100 encode-int encode+
encode+ encode+ encode+ " reg" property
\ assigned-addresses
h# 90000000 0 h# 42001010 encode-phys 0 encode-int encode+ h# 10000000 encode-int encode+
h# 84200000 0 h# 02001018 encode-phys 0 encode-int encode+ h# 00020000 encode-int encode+
h# fe001100 0 h# 01001020 encode-phys 0 encode-int encode+ h# 00000100 encode-int encode+
encode+ encode+ " assigned-addresses" property
device-end
This is exactly the same but with all the raw numbers in comments
\ Fixup Script for Radeon HD5450 in Gaming PC
\
s" /pci/display@2" find-device
: open ( -- ) true ;
s" /pci/display@2" open-dev to my-self
\ assigned-addresses
\ 1-------------------------------
\ xp2,0,10,90000000:10000000
\ from 0100 0011 0000 0000 0001 0000 0001 0000
\ to 0100 0010 0000 0000 0001 0000 0001 0000
\
\ HI [0x43001010] 1124077584
\ MD [0x00000000] 0
\ LO [0x90000000] -1879048192
\
\ INT [0x00000000] 0
\ INT [0x10000000] 268435456
h# 90000000 0 h# 42001010 encode-phys 0 encode-int encode+ h# 10000000 encode-int encode+
\ 2-------------------------------
\
\ x2,0,18,84200000:20000
\ HI [0x03001018] 50335768
\ MD [0x00000000] 0
\ LO [0x84200000] -2078277632
\
\ INT [0x00000000] 0
\ INT [0x00020000] 131072
h# 84200000 0 h# 02001018 encode-phys 0 encode-int encode+ h# 00020000 encode-int encode+
\ 3-------------------------------
\
\ i2,0,20,FE001100:100
\ HI [0x01001020] 16781344
\ MD [0x00000000] 0
\ LO [0xFE001100] -33550080
\
\ INT [0x00000000] 0
\ INT [0x00000100] 256
h# fe001100 0 h# 01001020 encode-phys 0 encode-int encode+ h# 00000100 encode-int encode+
encode+ encode+ " assigned-addresses" property
\ reg
\ 2:0
\ HI [0x00001000] 4096
\ MD [0x00000000] 0
\ LO [0x00000000] 0
\
\ INT [0x00000000] 0
\ INT [0x00000000] 0
0 0 h# 00001000 encode-phys 0 encode-int encode+ 0 encode-int encode+
\ xp2,0,10,0:10000000
\ from 0100 0011 0000 0000 0001 0000 0001 0000
\ to 0100 0010 0000 0000 0001 0000 0001 0000
\
\ HI [0x43001010] 1124077584
\ MD [0x00000000] 0
\ LO [0x00000000] 0
\
\ INT [0x00000000] 0
\ INT [0x10000000] 268435456
0 0 h# 42001010 encode-phys 0 encode-int encode+ h# 10000000 encode-int encode+
\ x2,0,18,0:20000
\ from 0100 0011 0000 0000 0001 0000 0001 0000
\ to 0100 0010 0000 0000 0001 0000 0001 0000
\
\ HI [0x03001018] 50335768
\ MD [0x00000000] 0
\ LO [0x00000000] 0
\
\ INT [0x00000000] 0
\ INT [0x00020000] 131072
0 0 h# 02001018 encode-phys 0 encode-int encode+ h# 20000 encode-int encode+
\ i2,0,20,0:100
\
\ HI [0x01001020] 16781344
\ MD [0x00000000] 0
\ LO [0x00000000] 0
\
\ INT [0x00000000] 0
\ INT [0x00000100] 256
0 0 h# 01001020 encode-phys 0 encode-int encode+ h# 100 encode-int encode+
encode+ encode+ encode+ " reg" property
device-end
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/6 21:40
#236
|
Not too shy to talk
|
At the moment all I'm doing is attempting to address the 32 vs 64bit as mentioned here: #630So with my script, I can now boot and I know the system is booted because I can see alsa errors where I would expect to hear sound if my alsa setup worked on this computer (something for another time), but as you can tell, I don't have a picture on the screen. But I think this now looks reasonable:
reg 2:0
mp2,0,10,0:10000000
m2,0,18,0:20000
i2,0,20,0:100
assigned-addresses mp2,0,10,90000000:10000000
m2,0,18,84200000:20000
i2,0,20,FE001100:100
Thats the same as before the script but with the 64bit flag not set.
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/6 20:54
#237
|
Not too shy to talk
|
@LiveForIt Quote: Well, things are typical addresses do not have odd values, its typical aligned by 2, 4 or 8. I think you messed it up
You can safely ignore the numbers there they are utterly meaningless, that was just me working out the forth syntax to modify the array which I've now done. For the record, I'm really not convinced this is going to work, but sometime shortly we'll have the answer to that [EDIT] Actually, looking at the numbers I have in front of me, I can see why we're at least testing it because on this older video card, even though the bars are being probed as 64bit all the numbers are within the first 32bit, so yeah, maybe. On my RX580, the ranges spanned the 32bit boundary and were actually 64bit numbers so in that instance I don't really see how it would physically work, I mean, the memory regions and the registers have to actually be where we're saying they are don't they? But honestly, don't take my word for it.
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/6 20:05
#238
|
Not too shy to talk
|
reg 3:0
x3,0,10,0:4000
assigned-addresses x3,0,10,84204111:4000
x3,0,10,84204111:4000
x3,0,10,84204111:4000
OK, I guess I know how to add multiple address ranges (bars?) then. @balaton do I need to flip the 64bit entries in the reg too or just the assigned addresses?
|
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/6 19:57
#239
|
Not too shy to talk
|
This is still just a simple test Before:
ok .properties
vendor-id 0x1B36 (6966)
device-id 0xD (13)
revision-id 0x1 (1)
class-code 0xC0330 (787248)
subsystem-id 0x1AF4 (6900)
subsystem-vendor-id 0x1100 (4352)
interrupts 0x1 (1)
devsel-speed 0x0 (0)
min-grant 0x0 (0)
max-latency 0x0 (0)
name "usb"
reg 3:0
x3,0,10,0:4000
assigned-addresses x3,0,10,84204000:4000
After:
ok .properties
vendor-id 0x1B36 (6966)
device-id 0xD (13)
revision-id 0x1 (1)
class-code 0xC0330 (787248)
subsystem-id 0x1AF4 (6900)
subsystem-vendor-id 0x1100 (4352)
interrupts 0x1 (1)
devsel-speed 0x0 (0)
min-grant 0x0 (0)
max-latency 0x0 (0)
name "usb"
reg 3:0
x3,0,10,0:4000
assigned-addresses x3,0,10,84204111:4000
What you're seeing here is, I've (manually) decoded the single entry in "assigned-addresses", modified the low 32bits to 0x84204111 instead of 0x84204000 and put it back in it's place. So now I need to work out how to do it for multiple addresses and also the reg. Or at least I think I need to do the reg. I don't know how to wrap it all up in a script just yet but given I didn't know anything about PCI or Forth until this week, one step at a time!! [edit] And just to be clear, yes, I know those aren't the bits I'm meant to be flipping, I'm just messing right now.
|
Amiga x5040 ı 16GB ı RX580 GB-A1000 060@100, A1200 PiStorm32-Lite CM4
|
|
|
Re: What the fastest possible x64 emulation way of OS4 today ?
|
Posted on: 2023/7/6 19:30
#240
|
Not too shy to talk
|
Lol! Sorry, got to work too you know :D
|
Amiga x5040 ı 16GB ı RX580 GB-A1000 060@100, A1200 PiStorm32-Lite CM4
|
|
|