-
Parker: Casino Verite on Linux
(If you're not running Linux and/or have no interest in doing so, you can skip this one. Otherwise, read on.)
I spent some time playing with emulation software this weekend, with mixed results.
In the past I have experimented with WINE, with very little success. I have been curious about commercial products such as Vmware and Win4Lin, but could not justify their purchase for something that may well not work. Besides, I'm a big proponent of FOSS (Free Open Source Software), and would like to find an open source alternative.
Enter QEMU, an emulator that fits the above description. Like Vmware and Win4Lin, this actually emulates the PC itself, rather than the operating system. A copy of Windows is needed, which is then installed on this "virtual PC" in more or less the usual manner, and then the applications are installed on the guest OS.
Getting QEMU was as easy as typing "apt-get install qemu" on my Mepis Linux box that I use for experiments like this (Althon XP2200, 512 MB RAM). Like many open source projects, documentation is a bit sketchy, and generally aimed at someone higher on the geek scale than me.
Still, after a little Googling, I was able to create a "virtual hard drive" (juat a file, actually), and get my Windows 2000 CD to boot and install.
Emulated systems take a perfomance hit, and this became immediately apparent, with the install taking over 2 hours, not including the time I spent solving a couple of bugs along the way. Fortunately, the install does not require a lot of attention, so I was able to spend the time doing other things, occasionally checking on it when I happened to walk by.
Soon, I was looking at the familiar Windows 2K desktop, running on Linux system, Excited now, I loaded the Casino Verite CD and started the installation. It installed normally, as did CVCX.
Unfortunately, my success ended here. Neither application would boot, with both giving me one of the usual Windows cryptic error messages. Something about a floating point exception with CV, and a disconnect with CVCX.
So the experiment was a failure, right? Not quite. I installed BJRM2000, and it worked perfectly. Cool.
On a hunch, I dug up my Casino Verite version 2.1 CD, and ran the install. Success! It runs perfectly.
Version 2.1 does not have all the bells and whistles of the current version (no Cassie - sigh), but it still has the excellent graphics and is far superior to anything else on the market.
So, I now have the 16-bit version of CV and BJRM running on Linux. The applications boot up noticeably slower than on similar hardware running Windows natively, but they run at acceptable speeds. OTOH, Windows itself boots up much faster, in less than a minute.
I intend to experiment more, when I have the time, as I still have not given up on getting the current version of CV. as well as CVCX to run. But first, I want to try this on my aging Toshiba laptop (P3 650 Mhz, 320 MB RAM).
Call it a work in progress. :-)
If anyone is interested in trying this, let me know. As I said, I encountered a few bugs along the way, and can probably save you some head-scratching and Googling.
-
Cacarulo: Re: Casino Verite on Linux
> (If you're not running Linux and/or have no
> interest in doing so, you can skip this one.
> Otherwise, read on.)
> I spent some time playing with emulation
> software this weekend, with mixed results.
> In the past I have experimented with WINE,
> with very little success. I have been
> curious about commercial products such as
> Vmware and Win4Lin, but could not justify
> their purchase for something that may well
> not work. Besides, I'm a big proponent of
> FOSS (Free Open Source Software), and would
> like to find an open source alternative.
> Enter QEMU, an emulator that fits the above
> description. Like Vmware and Win4Lin, this
> actually emulates the PC itself, rather than
> the operating system. A copy of Windows is
> needed, which is then installed on this
> "virtual PC" in more or less the
> usual manner, and then the applications are
> installed on the guest OS.
> Getting QEMU was as easy as typing
> "apt-get install qemu" on my Mepis
> Linux box that I use for experiments like
> this (Althon XP2200, 512 MB RAM). Like many
> open source projects, documentation is a bit
> sketchy, and generally aimed at someone
> higher on the geek scale than me.
> Still, after a little Googling, I was able
> to create a "virtual hard drive"
> (juat a file, actually), and get my Windows
> 2000 CD to boot and install.
> Emulated systems take a perfomance hit, and
> this became immediately apparent, with the
> install taking over 2 hours, not including
> the time I spent solving a couple of bugs
> along the way. Fortunately, the install does
> not require a lot of attention, so I was
> able to spend the time doing other things,
> occasionally checking on it when I happened
> to walk by.
> Soon, I was looking at the familiar Windows
> 2K desktop, running on Linux system, Excited
> now, I loaded the Casino Verite CD and
> started the installation. It installed
> normally, as did CVCX.
> Unfortunately, my success ended here.
> Neither application would boot, with both
> giving me one of the usual Windows cryptic
> error messages. Something about a floating
> point exception with CV, and a disconnect
> with CVCX.
> So the experiment was a failure, right? Not
> quite. I installed BJRM2000, and it worked
> perfectly. Cool.
> On a hunch, I dug up my Casino Verite
> version 2.1 CD, and ran the install.
> Success! It runs perfectly.
> Version 2.1 does not have all the bells and
> whistles of the current version (no Cassie -
> sigh), but it still has the excellent
> graphics and is far superior to anything
> else on the market.
> So, I now have the 16-bit version of CV and
> BJRM running on Linux. The applications boot
> up noticeably slower than on similar
> hardware running Windows natively, but they
> run at acceptable speeds. OTOH, Windows
> itself boots up much faster, in less than a
> minute.
> I intend to experiment more, when I have the
> time, as I still have not given up on
> getting the current version of CV. as well
> as CVCX to run. But first, I want to try
> this on my aging Toshiba laptop (P3 650 Mhz,
> 320 MB RAM).
> Call it a work in progress. :-)
> If anyone is interested in trying this, let
> me know. As I said, I encountered a few bugs
> along the way, and can probably save you
> some head-scratching and Googling.
Very interesting Parker! If I get some time I will give it try. I do also run Mepis as you know and fortunately all my home-made software was written in C for Unix. However, I had the same success when I tried with Wine and BJRM2000. I couldn't make CVBJ or SBA to work. Maybe and old version as you did could work as well.
Sincerely,
Cac
-
Parker: Wine
> Very interesting Parker! If I get some time
> I will give it try. I do also run Mepis as
> you know and fortunately all my home-made
> software was written in C for Unix. However,
> I had the same success when I tried with
> Wine and BJRM2000. I couldn't make CVBJ or
> SBA to work. Maybe and old version as you
> did could work as well.
I figured you'd be interested in this. :-)
I was never able to get either version of CVBJ to even install using Wine. I was able to install BJRM2000 and get it to boot, but it had rendering problems and crashed frequently. OTOH, Stanford Wong's little BJEdge program (calculates off-the-top house edge for different rules) ran so well that I wrote a little shell script to automatically invoke wine and added an icon to my desktop, where it runs just like a native Linux app.
-
Cacarulo: Re: Wine
> I figured you'd be interested in this. :-)
> I was never able to get either version of
> CVBJ to even install using Wine. I was able
> to install BJRM2000 and get it to boot, but
> it had rendering problems and crashed
> frequently. OTOH, Stanford Wong's little
> BJEdge program (calculates off-the-top house
> edge for different rules) ran so well that I
> wrote a little shell script to automatically
> invoke wine and added an icon to my desktop,
> where it runs just like a native Linux app.
I have downloaded QEMU but I'm too lazy to read the man pages ![Smile](images/smilies/smile.gif)
Could you give me some tips for a quick startup?
Sincerely,
Cac
-
Parker: Qemu Quickie
> I have downloaded QEMU but I'm too lazy to
> read the man pages ![Smile](images/smilies/smile.gif)
> Could you give me some tips for a quick
> startup?
Sure. As I mentioned before, the documentation is somewhat sparse and cryptic.
I'll assume that you were able to install QEMU, either with apt-get/Synaptec, untarring a tarball, or compiling from source. You can check to see if it installed properly simply by opening a terminal and typing "qemu" (without the quotes) with no arguments. You should get the version number and a help page, which you might want to look over. Pay particular attention to the key bindings, especially the "control + alt" combinations, as you use these to shift from the virtual Windows machine to your real Linux system.
First, we need to create a virtual hard drive on which to install Windows. This is just a big file. There are a number of ways to do this, I used dd:
From the command prompt:
~$ dd of=hd.img bs=1024 seek 4000000 count =0
This will create a 4 GB (more or less) file called hd.img in your home directory.
Note that all of this is done from the user prompt, NOT as root. This way, the virtual Windows system will run with only user privileges, rather than with admin privileges like a native Windows box. I like this a lot from a security viewpoint.
Next, put the Windows install disk in your cdrom drive and type:
~$ qemu -boot d -cdrom /dev/cdrom -hda hd.img
Assuming, of course that your cdrom drive is at /dev/cdrom.
This should open a window on your desktop in which a normal Windows install will begin, and you can proceed to install Windows in the usual manner. This will take a LOT longer than a native Windows install, 2-3 hours or so.
Once the installation is complete, you start the virtual Windows system with the command:
~$ qemu -hda hd.img -boot c
If you want to install an application, put it in the cdrom drive before starting qemu, and add the cdrom drive to the command:
~$ qemu -hda hd.img -boot c -cdrom /dev/cdrom
You can then open the cdrom drive from within Windows and run the setup program in the usual manner.
Note that the first time you click on the Windows window, the curser will now be inside Windows. To get back out, hit Ctrl + Alt.
Once you get Windows working, you may want to create a backup of the image before you try to install any apps:
~$ cp hd.img windowsbackup.img
This way, if you happen to totally screw up Windows while trying to get the apps to run, you can just overwrite hd.img with the backup and start over, rather than having to do the whole Windows installation again. I wish that I had figured this out sooner! :-)
A couple of problems I encountered:
The first time I tried the install, I created a 2GB hd.img file. I got a "hard disk full" error message during the install, despite the fact that Windows 2K doesn't take up anywhere near 2GB of space. I started over, making hd.img 4GB and everything went okay.
I ran into one other problem, which will only happen if you are trying to install a Service Pack 3 edition of Windows 2000 (which is what I have). When I first tried to boot Windows, I got an error message:
"msgina.dll did not load"
And everything came to a screeching halt. :-P
Some googling revealed that this is actually a documented problem with Service Pack 3, although I had never encountered it on a native Windows install.
I got around it by copying msgina.dll from my Windows box (which has Service Pack 4 installed), and then updating the file in the virtual system by putting the new file on a floppy and booting the Windows cdrom with the command:
~$ qemu -boot d -cdrom /dev/cdrom -hda hd.img -fda /dev/fdo
I was then able to use the Windows emergency recovery console to overwrite the offending .dll (which is found in the c:\WINNT\system32\ directory).
After that, Windows booted normally, and I was subsequently able to install Casino Verite version 2.1 and BJRM2000. My next project will be trying this on my laptop.
Have fun!
-
Cacarulo: Re: Qemu Quickie
> Sure. As I mentioned before, the
> documentation is somewhat sparse and
> cryptic.
> I'll assume that you were able to install
> QEMU, either with apt-get/Synaptec,
> untarring a tarball, or compiling from
> source. You can check to see if it installed
> properly simply by opening a terminal and
> typing "qemu" (without the quotes)
> with no arguments. You should get the
> version number and a help page, which you
> might want to look over. Pay particular
> attention to the key bindings, especially
> the "control + alt" combinations,
> as you use these to shift from the virtual
> Windows machine to your real Linux system.
> First, we need to create a virtual hard
> drive on which to install Windows. This is
> just a big file. There are a number of ways
> to do this, I used dd:
> From the command prompt:
> ~$ dd of=hd.img bs=1024 seek 4000000 count
> =0
> This will create a 4 GB (more or less) file
> called hd.img in your home directory.
> Note that all of this is done from the user
> prompt, NOT as root. This way, the virtual
> Windows system will run with only user
> privileges, rather than with admin
> privileges like a native Windows box. I like
> this a lot from a security viewpoint.
> Next, put the Windows install disk in your
> cdrom drive and type:
> ~$ qemu -boot d -cdrom /dev/cdrom -hda
> hd.img
> Assuming, of course that your cdrom drive is
> at /dev/cdrom.
> This should open a window on your desktop in
> which a normal Windows install will begin,
> and you can proceed to install Windows in
> the usual manner. This will take a LOT
> longer than a native Windows install, 2-3
> hours or so.
> Once the installation is complete, you start
> the virtual Windows system with the command:
> ~$ qemu -hda hd.img -boot c
> If you want to install an application, put
> it in the cdrom drive before starting qemu,
> and add the cdrom drive to the command:
> ~$ qemu -hda hd.img -boot c -cdrom
> /dev/cdrom
> You can then open the cdrom drive from
> within Windows and run the setup program in
> the usual manner.
> Note that the first time you click on the
> Windows window, the curser will now be
> inside Windows. To get back out, hit Ctrl +
> Alt.
> Once you get Windows working, you may want
> to create a backup of the image before you
> try to install any apps:
> ~$ cp hd.img windowsbackup.img
> This way, if you happen to totally screw up
> Windows while trying to get the apps to run,
> you can just overwrite hd.img with the
> backup and start over, rather than having to
> do the whole Windows installation again. I
> wish that I had figured this out sooner! :-)
> A couple of problems I encountered:
> The first time I tried the install, I
> created a 2GB hd.img file. I got a
> "hard disk full" error message
> during the install, despite the fact that
> Windows 2K doesn't take up anywhere near 2GB
> of space. I started over, making hd.img 4GB
> and everything went okay.
> I ran into one other problem, which will
> only happen if you are trying to install a
> Service Pack 3 edition of Windows 2000
> (which is what I have). When I first tried
> to boot Windows, I got an error message:
> "msgina.dll did not load"
> And everything came to a screeching halt.
> :-P
> Some googling revealed that this is actually
> a documented problem with Service Pack 3,
> although I had never encountered it on a
> native Windows install.
> I got around it by copying msgina.dll from
> my Windows box (which has Service Pack 4
> installed), and then updating the file in
> the virtual system by putting the new file
> on a floppy and booting the Windows cdrom
> with the command:
> ~$ qemu -boot d -cdrom /dev/cdrom -hda
> hd.img -fda /dev/fdo
> I was then able to use the Windows emergency
> recovery console to overwrite the offending
> .dll (which is found in the
> c:\WINNT\system32\ directory).
> After that, Windows booted normally, and I
> was subsequently able to install Casino
> Verite version 2.1 and BJRM2000. My next
> project will be trying this on my laptop.
> Have fun!
Thanks for the tips! I've printed this post and will do some tests later.
Question: Why don't you try with Windows 98 instead of Windows 2K? Afterall, we don't need a heavy S.O. to run Casino Verite.
Sincerely,
Cac
-
Parker: Re: Qemu Quickie
> Question: Why don't you try with Windows 98
> instead of Windows 2K? Afterall, we don't
> need a heavy S.O. to run Casino Verite.
Good idea. I started with Win2K simply because I had the disk handy, and I have generally found it to be more stable than Windows 98. However, Win98 is certainly worth trying, and it should run faster than Win2K. I'll give it a try.
-
Cacarulo: Re: Qemu Quickie
> Good idea. I started with Win2K simply
> because I had the disk handy, and I have
> generally found it to be more stable than
> Windows 98. However, Win98 is certainly
> worth trying, and it should run faster than
> Win2K. I'll give it a try.
I'm currently in that process
Will let you know.
Cac
-
Parker: Update: Whoo-hoo!!
> I'm currently in that process
Will let
> you know.
It works!!
I was able to install Win98 with no problems. I started the setup routine, then exited to the command prompt, formatted the virtual hard drive, copied the contents of the win98 directory onto the virtual hard drive and installed from that directory. I always used to do Win98 installs this way so that I didn't have to keep track of the Win98 cdrom, which Windows 98 seems to want to see every time anything is installed.
The install went much faster than my previous Windows 2000 install.
I then installed Casino Verite 3.0 and . . . . it worked!
I then installed CVCX 1.0 (the latest version I have) and . . . it worked!
Qemu emulates a Soundblaster 16 soundcard, but this is disabled by default. I started qemu with the -enable-sound option and then ran the Windows "add new hardware" wizard. It detected the virtual sound card, and I now even have sound.
Next project: my laptop.
This is so cool. :-)
-
Cacarulo: What a team! :)
> It works!! I was able to install Win98
> with no problems. I started the setup
> routine, then exited to the command prompt,
> formatted the virtual hard drive, copied the
> contents of the win98 directory onto the
> virtual hard drive and installed from that
> directory. I always used to do Win98
> installs this way so that I didn't have to
> keep track of the Win98 cdrom, which Windows
> 98 seems to want to see every time anything
> is installed.
> The install went much faster than my
> previous Windows 2000 install.
> I then installed Casino Verite 3.0 and . . .
> . it worked!
> I then installed CVCX 1.0 (the latest
> version I have) and . . . it worked!
> Qemu emulates a Soundblaster 16 soundcard,
> but this is disabled by default. I started
> qemu with the -enable-sound option and then
> ran the Windows "add new hardware"
> wizard. It detected the virtual sound card,
> and I now even have sound.
> Next project: my laptop.
> This is so cool. :-)
Excellent! You beat me badly ;( I've just finished installing W98.
Did your network work inside W98? I am having troubles with this. I get the following message when I run qemu:
"warning: could not open /dev/net/tun: no virtual network emulation"
What I am missing?
Cac
PS: How about the speed issue w/W98?
-
Parker: Re: What a team! :)
> Excellent! You beat me badly ;( I've just
> finished installing W98.
> Did your network work inside W98? I am
> having troubles with this. I get the
> following message when I run qemu:
> "warning: could not open /dev/net/tun:
> no virtual network emulation"
> What I am missing?
I got the same error. Since I consider W98 inherently insecure and incapable of being made secure, and because the only thing I will use this for is running CV, CVCX, BJRM, etc., I don't want it anywhere near my network, so I just ignore the error message.
That being said, if you must access the network from W98, try something like this.
"tun" is a kernel module that is some sort of virtual network card driver. Check for /dev/net/tun to see if you have it (If you're running Mepis, you don't have it). If not, you will need to do something like this (as root):
~# mkdir -p /dev/net
~# mknod /dev/net/tun c 10 200
~# modprobe tun
~# echo 'tun' >> /etc/modules
Then you'll need to change permissions so you don't have to be root to write to it:
~# chgrp users /dev/net/tun
~# chmod g+w /dev/net/tun
tun won't run a DHCP server so you need to assign IP's so the Linux system can act as a gateway:
~# ifconfig tun0 10.0.0.1 up
Then you'll need to go into Windows Networking configuration, turn off DHCP, set the IP for 10.0.0.2 or some such, and set the gateway to 10.0.0.1
Finally, you'll need to configure iptables to allow IP masquerading and IP forwarding, something like:
~# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
~# echo "1" >/proc/sys/net/ipv4/ip_forward
Warning: I wrote the above mostly off the top of my head and have not tried any of it, since as previously mentioned I have no interest in getting Windows to network. It is quite likely that I got something wrong and/or left out something important. In other words, I have no idea if any of this will actally work, so use it at your own risk. :-)
> PS: How about the speed issue w/W98?
Speed is acceptable. I cranked up the speed settings on Casino Verite, and it definitly will go considerably faster than I can count. :-)
The animation is not as smooth as when running under native Windows, but I can live with it. I think this is because qemu emulates a Cirrus CLGD 5446 PCI VGA card, which isn't exactly a high-end video card, to say the least.
-
Parker: Laptop blues
My primary laptop is a Toshiba PIII 650 Mhz w/320 MB RAM. Okay, it's not exactly state of the art, but I hate to spend a lot of money on laptops because they generally only last a couple of years before I manage to destroy them.
The install was painless. I installed qemu, plugged the laptop into my LAN, and copied the hd.img file onto my home directory on the laptop hard drive. I didn't even have to reinstall the apps.
Everything works, but it is reallllly slooooow. Even with the speed parameters maxed out, Casino Verite takes about 5 minutes to boot and is slow, although not unplayable. CVCX also takes time to load, and it takes 3 or 4 seconds to register when a parameter is changed when viewing one of the canned sims. I didn't even think about trying to actually run a sim with it.
Looks like it's upgrade time. :-)
-
Cacarulo: Re: What a team! :)
> I got the same error. Since I consider W98
> inherently insecure and incapable of being
> made secure, and because the only thing I
> will use this for is running CV, CVCX, BJRM,
> etc., I don't want it anywhere near my
> network, so I just ignore the error message.
If you have a backup of your hd.img I think security shouldn't be an issue in this case. I wouldn't even bother with an anti-virus or a firewall for this system but I could be wrong. What do you think? Now Suppose that you need an update of CVerite. Don'y you think it is easier to download it from www.qfit.com directly?
> That being said, if you must access the
> network from W98, try something like this.
> "tun" is a kernel module that is
> some sort of virtual network card driver.
> Check for /dev/net/tun to see if you have it
> (If you're running Mepis, you don't have
> it). If not, you will need to do something
> like this (as root):
> ~# mkdir -p /dev/net
> ~# mknod /dev/net/tun c 10 200
> ~# modprobe tun
> ~# echo 'tun' > /etc/modules
> Then you'll need to change permissions so
> you don't have to be root to write to it:
> ~# chgrp users /dev/net/tun
> ~# chmod g+w /dev/net/tun
> tun won't run a DHCP server so you need to
> assign IP's so the Linux system can act as a
> gateway:
> ~# ifconfig tun0 10.0.0.1 up
> Then you'll need to go into Windows
> Networking configuration, turn off DHCP, set
> the IP for 10.0.0.2 or some such, and set
> the gateway to 10.0.0.1
> Finally, you'll need to configure iptables
> to allow IP masquerading and IP forwarding,
> something like:
> ~# iptables -t nat -A POSTROUTING -o eth0 -j
> MASQUERADE
> ~# echo "1"
> >/proc/sys/net/ipv4/ip_forward
> Warning: I wrote the above mostly off the
> top of my head and have not tried any of it,
> since as previously mentioned I have no
> interest in getting Windows to network. It
> is quite likely that I got something wrong
> and/or left out something important. In
> other words, I have no idea if any of this
> will actally work, so use it at your own
> risk. :-)
No problem, will try that and thanks for the tips.
> Speed is acceptable. I cranked up the speed
> settings on Casino Verite, and it definitly
> will go considerably faster than I can
> count. :-)
Great!
> The animation is not as smooth as when
> running under native Windows, but I can live
> with it. I think this is because qemu
> emulates a Cirrus CLGD 5446 PCI VGA card,
> which isn't exactly a high-end video card,
> to say the least.
Agree about the video card.
I have been thinking of using a raw device instead of a large file within MEPIS. I think it should be faster.
Sincerely,
Cac
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks