Wednesday, August 18, 2010

Medal of Honor: Allied Assault on linux and mac Version 1.1

Okay, so I put in some time on some CXZ (crossover) porting. I went to linux forums. Apparently, all you have to do is tell the programs what extensions of the graphics engine cannot be used, then the game will work around it. Here's a clue:
You have to alter the registry of windows (basically the fake windows kernel) and tell the engine that certain extensions are not useable, so when the game engine loads up, viola! It checks against the registry and runs the game accordingly. Bingo. Clap for me. And for the linux guys who actually figured out which extensions of the engine the VOODOO or OpenGL drivers don't support. I have been applying this to my own wrappers. You can download the registry file needed (Go to this site: http://appdb.winehq.org/objectManager.php?sClass=version&iId=20075&iTestingId=52545, and you can find all the info you need, including a link to the reg file). I will probably post the reg file and a prepared wrapper on Demonoid.com later next week.
Remember, where there is a will, there is a way. Just ask a programmer.

Thursday, August 12, 2010

Medal of Honor: Allied Assault on linux and mac

It is fundamentally stupid for programmers of games and software to limit the scope of their graphics to certain branded cards. That being said, I believe EA Games should be sued, Along with ASPYR media, for putting out a game and saying it is compatible with MAC when it crashes every ten seconds because of graphics issues. It cannot even be wrapped inside of WINE for the same reason. It does not use a proper subset of DirectX, but instead, relies on certain pieces of DirectX that cannot be duplicated or translated by OpenGL. The shaders and vertex graphics used by MOHAA are an extension (expansion) of the Quake engine and they don't comply with open standards. That means that you can only play this game from within windows itself, using windows-only compatible graphics architecture. Linux systems rely on VOODOO drivers to access the graphics cards, which is mainly an emulated card in itself (unless we're talking about a VOODOO branded card), with openGL translation of graphics. What's the problem? Unlike every other Quake Engine Game, MOHAA does not use the standard shader calls, instead, they tried to build their own and ended up ruining compatibility. Because they tried to build their own shaders, there is more memory leakage, and while windows is a crappy OS to begin with, it expects this kind of programming and just lets it go. Other OS'es do not allow errors of this type. They will start to complain or stop the program when the number of these errors reaches a certain boundary. When they are told to let the errors pass, eventually the memory on the graphics card overflows instead of refreshing and the graphics just get screwed up. Why is this an issue? The companies sold a game without testing it!!!!! They are still SELLING IT!!!! Even though they know it doesn't work!!! I'm not advocating a boycott, only pointing out a flaw in their business design. If somebody could build a different architecture into the WINE wrappers out there, instead of using the VOODOO standard driver, it might actually enable games like this to play on the mac using the windows version. Of course, I'm also shouting that the game companies are shitting on the little guy. At the very least, they should've made a solid note on the boxes about not using certain architectures. Hell, they could pay a few bucks to their programmers to rebuild the game with the proper shader support and do away with the problem completely.

Hard Drive Problems 1.0

This is your update for hard drive problems. Sorry it's been so long. I've been a little busy with this one.
The Hard Disk I started with failed completely. I went back through everything I did and came up with a few tips on how to deal with this kind of problem. Here's a shopping list for you, along with some reasoning.

Absolutely, the main "given" rule is that you have your own (or a friend's) bootable machine running just fine (as in this spare machine is not the one being repaired).

First, Make sure you have a spare hard drive, preferably bigger than (But at least as big as) the hard drive you're repairing. This will come in handy. If your damaged drive has SMART technology embedded in the controller board and it is the hard drive that came with the computer, you can probably se a utility in the bios to check it out. This will tell you if the drive is failing. If it is a replacement of a hard drive or you built the machine, you'll need a driver cd with those utilities if the drive has SMART technology. If your hard drive doesn't have SMART, You're stuck with moving on to the next step before you know anything about any physical drive problems, which might adversely affect any recovery you attempt (in this case I recommend a local data recovery expert).

If you feel you can move on...

Next, you'll need a way to connect both the original (damaged) drive and the new one to a working machine. I recommend using enclosures, but some get better results from items like the "iConnect" device (simple ide\eide\ata\sata to usb converter), as the information is passed directly to the hard-drive control board ( you wont get any boost in data speed or transfer rate, but it is easier to locate problems). Once you have both of the drives connected, you need to set up the new hard drive to be written to. You may use any method you like. I use the XP computer manager(http://hubpages.com/hub/How-to-Partition-a-Hard-Drive-with-Windows-XP) to partition the drive with 1 partition (the same type as the damaged drive and bootable; might save a step later). Once this step is complete, you may want to do a write check. Move a small file of 1-5mb to and from the new drive. This will show you that the drive can be written to. Next, wipe this file from that drive by finding it there, moving it to the recycle bin ( i prefer secure wiping, as it will keep us from recovering it by accident later; http://www.techsupportalert.com/best-free-secure-erase-utility.htm ) and then empty the recycle bin.

Now that you have 1 clean disk ready for writing and 1 damaged disk ready for recovery, you need to make sure you don't lose anything. My favorite is the freeware XXCLONE. It will make a fully bootable copy of the disk (if the disk is still bootable). If you'd like a try with it: http://www.xxclone.com/
Just make sure to chose the damaged drive as the source, and the new drive as the destination. At this point, we want to be able to work with the files on a clean, undamaged disk. If there is a problem within windows, we'll find it before it destroys the old drive completely (though it is not adviseable to use the old drive as a bootable disk again, some people do and it works fine for a long time). Once you have the files on a new drive, you can play with them. But we are not finished. I recommend finding a hard drive imaging utility. Some are free, but the best ones are not. If you have a recovery software in mind, check to see if it will do hard drive imaging. Find a drive as big as your damaged one (cheap on ebay or amazon if you go with OEM drives) and then do an imaging of the damaged drive onto it (saving a file with the sector by sector information as a physical and logical reference). If there is a problem with any of the physical motors or arms in the drive, the utility will let you know after a few hours of reading the drive and spinning it slow. If it can't find an issue with the physical, we will move on to the logical, and still have something to use for a recovery without having to work (and possibly further damage) the damaged drive. Nice how that works out huh? Disconnect the damaged drive.

Now we test for viruses and narrow down the scope to just the cloned drive. We want to scan all files on this disk without running them, so doing it from an external environment saves us from possible invasion of rogueware, trojans, etc. If you don't find any viruses, you may wish to do a search by hand. First search "Application Data". You should find a default folder, and another folder for each user (Might be "Application Settings"). Search each one for folders with weird names ( or names of adware programs you no longer want in there; Weird meaning a mix of letters that don't spell anything) and put those folders through a recycle or secure delete. Then defrag the disk, and wipe the free space. If your problem stemmed from something hijacking windows (rogueware) it should be fixed, but you'll need an install disk that matches your windows install to repair windows and start running again. TO do this you'll need your install key. Download a keyfinder that can load an external windows folder (One example:http://www.magicaljellybean.com/keyfinder/). If you use my suggested finder, you can go to options, load hive and select the "WINDOWS" folder on the cloned drive. There are no guarantees if rogueware has been fighting you. Your registry may already be too corrupted (such was the case recently for me). If you can get the key (if you havent lost it or if you were able to recover it) you can do a repair install of windows, which will restart the registry, and allow you to open all your programs in order to reload their main function keys that allow them to work. If you don't know how to do a repair install for your machine, look it up(unless you built the machine and installed retail windows; you'll either have to reinstall, or see if installer actually recognizes the original install and allows you to repair it. This can take about an hour.

If none of this helps, and windows is not bootable or continues to crash, The problem may still be file based. If it does work, you may have had physical HDD trouble. If you want to throw away the old drive, I suggest you first try and do a secure erase of it so that any personal information is unrecoverable. Some freeware is up to the task in some cases, but more often than not, you get what you pay for. I suggest you pay a small price for the erase and make sure you keep a copy of the installer on a cd so you can use it later (and have it make up it's costs when you help others with their problems). I recommend however, that you keep the drive stored in a safe place, and continue working on the image of the drive ( or have an expert take a look at the image and tell you what's what). It may be that your computer has deeper issues that you cannot fix outright, and the problems will recur again and again. If you find this to be the case, check out my "Moving your Windows install" postings. This will also go into OEM implications.

This is a basic method. It is in no way intended to be a cookie cutter solution. Check the upcoming 1.1 of this post for the variations and problems I ran into when attempting this method.

PS
If working from virtual machines, remember that they will often defer to your own OS when writing data to drives; make sure that you're using the latest version of your OS, the Virtual Machine program and the OS inside the virtual machine. Also, make sure that the virtual machine has sole access and control of the hard-disks you're using. If you set up the VM to share the drives with your OS, you may run into read\write errors when partitioning, imaging or cloning.