Yes, I know it’s kinda pointless as it’s horribly out of date, but I’m still having fun. Anyways now it’ll integrate with dynamips!
So yeah, in this example, instead of the usual “-net user” and the built in SLiRP stack, this uses UDP to talk to a stand-alone SLiRP stack. This will let you plug your Qemu into virtual Ethernet switches/hubs and interfaces of virtual routers. Even mixing and matching connections to different emulators that use UDP to exchange packets.
In this case I have a VMDK loaded with a NE2K-PCI driver, and QuakeWorld for MS-DOS. I also made the MPU401 external although it’s hanging on a secondary flag…
qemu.exe -L pc-bios -m 64 -soundhw sb16,adlib -mpu401 xx -net nic,model=ne2k_pci -net socket,udp=127.0.0.1:4000,remote=127.0.0.1:4001 -hda qworld.vmdk
This has the Qemu instance listen on UDP port 4000, and connect to the same physical host on port 4001.
The recipical for the SLiRP stack from my bashed Dynamips is:
slirp_rdr.exe 4001 127.0.0.1 4000
Which in this case listens on port 4001, and connects back on port 4000.
Hopefully it makes some sense to someone.
Download it, if you want!
Should fit nicely with the original Dynamips/Dynagen combo! I can’t remember at what point udp made it into Qemu (0.11?) but I recall there were some patches for earlier versions and the command syntax for the udp tunnels changed too. Have you ever looked at Pemu, the PIX emulator which is basically a hacked Qemu? I could never get this to build on anything later than GCC 3.4 which is why I keep an old Slackware 11 VM around for tinkering with it.
Yes that is my intention of being able to mix simh, dynampis and qemu. Might do previous too!
The pix is just a PC with a bios set to output to the serial port.. Is there a diff set for pemu?
It’s probably also reliant on the old IO model like NetWare and NeXTSTEP of 0.90 and so on. The source diff wasn’t too involved but I think I messed something up on git as it’s convinced there was entire file changes…
The pemu source is in the gns-3 archive on Sourceforge. URL follows if it doesn’t get spam-filtered…
According to the README it is based on 0.9.0 and it has udp tunnels, due to the nature of the PIX OS it also pegs your CPU core at 100% unless you use cpulimit or something similar. Hope you find it interesting!
Interesting support of compressed roms, flash & yes the UDP.
Also the IDLE is disabled… I guess there is a reason why. Although it does do this:
I don’t have any old PIX images anymore, so I have to assume there is a reason they do things the way they do.
Is your UDP patch included in the sourceforge repo? I’d like to build it on Linux. Thanks.
Yes, look for ‘net_socket_udp_init’ in vl.c and you can find it there. Although I’m pretty sure I’ve probably broken the ability to build on Linux along the way with all kinds of changes I’ve done.
I’m not sure what I screwed up but when I put it in, this diff thinks it’s a wholesale file replacement. :'(
But once you find what I changed, it’s really small. The UDP stuff didn’t come in until version 1.something, much much later. I hacked in the CLI reading bit, but the network section of net_socket_udp_init is pretty much intact with a bit of massaging to fit into 0.90.
Well it’s close – I can build the original 090. I grabbed your snapshot and the only file that fails to build with multiple errors is hw/mpu401.c – maybe I’m missing a header file somewhere. I eventually got it to built by removing references to mpu401 in Makefile.target and hw/pc.c. Target is i386-softmmu, compiler is gcc 3.4.6 on a Centos 6 i686 VM.
Now I’ll go find something to test it with.
not surprising on the mpu401 it includes windows specific stuff with no #ifdef’s….
I pushed an update that may isolate the Win32 code, let me know if that does the trick.
Unfortunately it still tries to compile mpu401.c and fails.
Ok, I installed Debian 4, which is easy to install GCC-3.4 and I made some minor changes and now it’ll build on Linux. I just did the doom test, and quakeworld for MS-DOS although I’m using the normal built in SLiRP.
I have another variation of 0.9.0 I downloaded from somewhere a few years back, the zip is qemu-0.9.1-windows.zip and it contains source, binaries and some patches referred to as Mr.Kazu’s qemu-0.9.0-patches that link back to a defunct .jp website.
If you can find it, I’d be interested!
I assume you got the latest thing to build? I think I broke the source. again. lol
Looks like it’s available from here: lassauge.free.fr/qemu/release/
I’ll try another build later and let you know!
After applying my previous fixes (removing references to mpu401 in Makefile.target and hw/pc.c) it now fails with this.
So after I commented out those two lines it builds and runs. Tested with:
Cool. the big change was printing out what it is doing instead of dead silence.