You know somewhere, someone has actually done this.
From my googling around this is at least from 2010. Â But I bet it’s way way older. Â The cartoon is from 2011,
You know somewhere, someone has actually done this.
From my googling around this is at least from 2010. Â But I bet it’s way way older. Â The cartoon is from 2011,
A long long time ago, back when I got a Pentium 100 the wonderful world of emulation was really starting to be possible with such a high powered CPU. First was the simple Game Boy emulators, then a Commodore 64 emulator, the incredible Amiga Emulator, the beginnings of SIMH (back when it was only a PDP-11 emulator), and then I found the SEGA emulator, System 16.
It was really cool being able to play 16bit arcade games on the desktop, although rather slowly. From there everyone knows the rise of MAME. But while looking around for a small 68000 C compiler, I came across the source code to an older version of System 16, 0.53 on archive.org. Naturally it’s for MS-DOS, as was everything back in the day. Also slightly interesting is the 68000 emulation, written by Bernd Schmitd of UAE fame. So for the heck of it, I set about getting Thierry Lescot’s System 16 building again. I’ve never used allegro before, so it was a bit of a fight to get a version of it to actually build. It turns out that I should have been building version 2.11 with tools of that era (why on earth was I using GCC 4, and binutils 2.18?) and instead stick with GCC 2.7.2.2 and some much older binutils. And in no time I had build the library, and it’s examples. With that done, I was able to re-build System 16 with GCC 4.1.2 and get a binary!
Back in the day, I actually did have an Altered Beast arcade board. Sadly, it died in a move, someone near and dear just saw the PCB as “garbage” and tossed it. Sigh, but I did have ROM dumps, as I did a refresh of it forever ago. Anyways I still have the ROM files, so I guess that is nice.
Anyways I fired up the emulator and got what is known as the “jail bar” effect, which is from a bad ROM.
The System 16 splits it’s memory into a program space, a sprite memory bank, a tile memory bank, and RAM for stack and things like the palette. As you can see the program is certainly running, and the sprites are good. I did some poking around a bit later, and noticed that due to a logic bug, the texture ROMs are actually never loaded!
So, a quick patch, and now we get Altered Beast up and running!
Well, now isn’t that great!
Not that I would imagine anyone would really care, I mean MAME is a thing, and even from the readme:
Altered Beast : No sound emulation
So it’s pretty quiet. Additionally, the source is pretty restrictive:
These sources can’t be used for commercial purpose, any new version of the
emulator done with these sources must specify my name somewhere on the screen
et docs and I must be informed about any new release of the emulator.
For anyone interested you can find the source & binaries out on sourceforge.
Wow.. time flies.
Since there has been an update over on the github project, I thought this was a good time to take my existing port, and basically dump it, and make it integrate a lot better. Â So this time I did a lot of #ifdef’ing and the code should still compile on UNIX like systems.
I need to go through all the reboot/reload scenarios an try to either find out why it crashes, or just comment out dangerous paths.
So yes there is a good chance on a reload it’ll crash right now.
I also had issues with the new vty code, so I’m still using the old file from an ancient version of dynamips that I seem to have massaged well enough to behave for a primative console at the command prompt.
I put it on Sourceforge, because I’m rebellious like that.
OpenBSD 5.9 released early! Â This marks the 39th release.
Major changes include (from undeadly.org)
As we all know the VAX that was used to build OpenBSD died, and the platform was removed.
But it’s still cool that OpenBSD is going strong, wherever there is support.
Platforms that still made the cut:
Well back in the day, before the hardware visualization craze of the 2000’s back in the dark days of 1999, there was UML, or better known as User Mode Linux. Sadly the freshmeat announcement is all but lost, but sourceforge is still with us so we have the archives.
UML, simply put is a Linux kernel that has been modified to run in user space. So to the OS, it is just another usermode program. Because it runs in user space, there is no kernel dependencies, or special hardware required, as UML is just a user program. Much in the way Qemu emulates a full machine, UML instead is the kernel process running with paravirtualized drivers so it should give overall a better/faster experience than hosting via Qemu. Keeping in mind that VMware was a 1.0 launch product in may of 1999, and Bochs was back from 1994.
So what happened to UML? The market was just too young to understand the power of hosted virtual machines, although there were some at the time. Overall the market was in the idea of large servers that could ‘share’ thousands of websites, and most people didn’t either want to run root in their own little world, or didn’t even know there were other options besides getting an entire physical box. I used to rent some UML VM out from a Canadian outfit back when I’d stream audio out on shoutcast, as I found my crappy connection at home couldn’t handle more than 5 listeners, but I could stream to the UML instance, and have it advertise out on shoutcast, and handle the 20-30 users I’d get back then. Now that we live in the gated walled world of corporate hosting, I don’t think most people would even imagine going through the hell of building their own hosting infrastructure.
So it’s 2016, who cares today?
Well this… ‘friend’ of a ‘friend’ bought what they thought was a dedicated machine in a one year contract. Except it turned out to be a KVM VM, with ‘dedicated’ processors to the instance. Ouch. They also got a bunch of ip addresses, but the idea of being able to run their web servers in VMs, along with an OpenVPN concentrator seemed to become an impossibility. Obviously user mode Qemu is an option but it would be far too slow. So I figured this would be a good time to use something from the past, UML.
So the ‘base’ host is running Debian 8.1. So the first thing to do is to install the 2 neeed packages for networking, the bridge & uml utilities.
apt-get install bridge-utils uml-utilities
apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
And with that in place I want to run 32bit UML kernels, which means I need the 32bit ‘runtime’ so the Debian way to enable 32bit exe’s is:
dpkg –add-architecture i386
apt-get update
apt-get upgrade
apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
One thing to keep in mind about UML, or x86 Linux in general is that you cannot mix a 64bit kernel with a 32bit userland, the 64 bit kernel can run 32bit executables and libraries, but it really needs a full 64bit userland. So from the UML page, to get going I went with the kernel linux-2.6.24-rc7.bz2 and an ancient copy of Debian 4.0 I found here.
For anyone interested in more ‘modern’ kernels and filesystems, be sure to check out uml.devloop.org.uk & fs.devloop.org.uk.
Ok, now we want to add a bridge interface for this type of setup. The idea is that the UML’s will have ONLY an internal connection to the bridge, as the base machine owns all the physical addresses.
So it being Debian we modify the /etc/network/interfaces file to add:
auto br0
iface br0 inet static
address 10.13.0.1
netmask 255.255.255.0
network 10.13.0.0
broadcast 10.13.0.255
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
pre-up brctl addbr br0
post-down brctl delbr br0
The choice of 10.13.0.0/24 is 100% up to you. You can use any RFC 1918 address without any issues. Â Now I put this stuff in a script to fire up a UML host that will create my tap0 interface, bring it up, add it to the bridge, and fire up the UML. On termination it’ll remove the tap from the bridge, and delete the interface.
tunctl -t tap0
ifconfig tap0 0.0.0.0 promisc up
brctl addif br0 tap0
./linux-2.6.24-rc7 ubda=test_fs eth0=tuntap,tap0 mem=512M
brctl delif br0 tap0
tunctl -d tap0
And once UML has booted up, a simple ifconfig can bring up the network, and I should be able to ping the bridge address
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
(none):~# ifconfig eth0 10.13.0.10 netmask 255.255.255.0
(none):~# ping 10.13.0.1
PING 10.13.0.1 (10.13.0.1) 56(84) bytes of data.
64 bytes from 10.13.0.1: icmp_seq=1 ttl=64 time=0.043 ms
64 bytes from 10.13.0.1: icmp_seq=2 ttl=64 time=0.067 ms
You get the idea.
Because I’m running some ancient debian root filesystem, I had to set the /etc/apt/sources to include the official archive to at least install things like ssh.
deb http://archive.debian.org/debian etch main
But that is pretty much that.
Now for the real fun part, putting it on the internet! I’ve found that this is a simple way to redirect in port 80 on the registered address I want to use, and it allows the UML instance to NAT out the same address.
/sbin/iptables -t nat -A POSTROUTING -s 10.13.0.10/32 -o eth0 -j SNAT –to 1.2.3.4
/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 80 -d 1.2.3.4 -j DNAT –to 10.13.0.10:80
/sbin/iptables -t nat -A POSTROUTING -s 10.13.0.10/32 -o eth0:0 -j MASQUERADE
Remember that you’ll also need to enable ipv4 forwarding for this to work! You’ll need to run:
sysctl -w net.ipv4.ip_forward=1
or add it to /etc/rc.local
And with all that done, the 32bit web server is now talking. It’s not what everyone was hoping for, but at least it’s a solution.
As an update, for those who don’t have the option of TUN/TAP bridging, there is always SLiRP, as covered here.
I saw this and had to chuckle, but no it really is a real want ad.
Wanted:Â PIGEON BOTHERER
Salary: £30,000 + benefits
After a numerous amount of complaints from residents and visitors over recent months, the city council is looking for a unique individual to fill the position of ‘Pidgeon Botherer’ during peak shopping hours in order to keep the flying vermin off of the main high street.
With a competitive salary, a pigeon costume and a poking device all provided by the council, the ideal applicant will be able to show that they can successfully scare the pigeons enough to never return to the area. Creativity and innovation in scaring pigeons is a must.
Open auditions for the role will commence at 9:00am. Costume is optional but very welcome.
You seriously can’t make this stuff up.
For anyone interested, the job is in Polham.
Finally!
Yes, I know about cygwin, but why run on top of Win32, when it can be a kernel subsystem? Â I don’t know why they scalled back, and killed SUA/SFU when it was viable, but I guess it being more Linux compatible makes it more friendly for users.
Plus it’s 64bit! yay!
Even though I started off on CGA, I never knew that the composite was much better. Â Oh well the things you learn far too late. Â But to be honest, EGA looked so much better, and sharper. Â Not to mention the Commodore Amiga on composite sets.
Introducing DtZ’s computer research. Â It’s pretty impressive, he’s built his own 68008 board, and booted CP/M on it!
What led me there was a search for the Sozobon compiler running on different platforms, and how he has JAS running on CP/M, via cross compiling and native linking.
It really is cool stuff.