Installing games with CD iso images and change disc in WINE

Previously I mentioned about playing games in WINE and enabling Ibus input and CJK fonts. Recently, I solved another problem, that is installing the game with ISO images.

We know that, in Linux, we can mount the ISO image easily. However, some old games will need to install with several discs, that means we need to change discs during the installation. When my disc 1 was completed, I tried to unmount, it failed. Even I tried with symlink, the disc 2 with the symlink is not detected by the installer, failed also.

The solution is actually simple.

  1. Firstly, run the winecfg.
  2. Go to Drives tab.
  3. Click Show Advanced button.
  4. Click Add…, for example, add a D: drive.
  5. Now, we can Browse… the path of our mounted ISO images.
  6. The important part is the Type:, we need to change to CD-ROM.
  7. Apply.

Now, in the WINE, there is a new CD-ROM drive. We can change the CD-ROM to any Linux file system path. So, mount the disc 1, run the installer.exe in the D:, complete disc 1, the installer will ask for disc 2. In the winecfg, change the D: path to mounted disc 2, apply. Go back to the installer, the disc 2 should be detected.

Enjoy the games.

(This is tested with SimCity 4 Deluxe.)


Android game hacking

[Added 2012-10-16] Read this first: Quite a lot of readers asked me how to hack this game or hack that game. Sorry to say, I am not that expert in hacking those games, and I don’t have much time to play and hack the games. And what I shared here is only how to hack the games in general way, without permanent root the Android. So, if you are asking about a specific game, please find it on other channel. Thank you.

Frustrated with some Android games? Want to hack? Want to kill the monsters with one slice?

Okay, this is the main purpose I learn about Android rooting. After we gain the “#” from “adb shell” (refers to my previous post), now we can see all the files in /data folder. This folder contains the game save data and also some libraries.

Simple problem and solution

My hacking method is not memory editing, but save file editing. So, to edit the save file, we must have the knowledge and experience on hexadecimal editing. Now, since we can access those data files in /data/data folder, meaning that we can pull them, edit them, push them back.

So, pull the save file you want, the name such as Save0.dat or similar name. Use a hex editor, such as bless, ghex, hexedit, etc. Edit the value, then push the file back.

I personally wrote a small command-line tool, so that I can do hex editing in adb shell. (It is available here). I push it to /data/local/tmp folder, so that I can use it without pulling and pushing the file.

For some games, the save file is plain binary file. We can understand the file with the hex editing, such as the value of the coins, the level of the weapons, the status of the hero such as strength, vital, hp, and so on. These can be easily edited. (Please always make a backup before editing).

Advanced problem and solution

For other games, the save file is really a pain. They are encrypted/encoded save file. We cannot understand anything about the file. Modifying the file does not help. So, my only solution is to edit the library file, i.e. shared object (.so).

For example, if there is a library called, we need to use objdump (ARM target, not x86 or x86-64 target) to disassemble the shared object. The objdump can be obtained from Android NDK package.

/path-to/objdump -dC > asm.txt #pull the library file first, not doing this in adb shell

This will create “asm.txt” which contains the disassembled data. Now, what we can do is just study the functions. We might find some functions such as “encode”, “encrypt”, “decode”, “decrypt”, “save”, “load”. And also, need to look for open file, read or write file, and close file. This is because normally, they will call encrypt or encode before write the file (save). Study what the functions they are calling.

For example, in the “save” function, it might contain a call of “encode” function, then only “write” the buffer. In this case, it will be quite easy to solve the problem. Use a hex editor to open the shared object. Edit the hexadecimal value of the opcode that calls the “encode” function within “save” to “00 00 00 00”, this will produce NOP operation. That means, we disable calling “encode” function in “save” function.

Then, we can objdump again to check whether we have disabled the function call.

Push the edited library to the device. Make sure backup the original library and also the save file.

Run the game, load the save file, save the game, then exit.

Now, do not restart the game yet. Now, check the newly saved file with hex editor. If it is a plain binary file, then we success! If not, try until you want to give up.

Do not restart the game yet, because the game will load the encoded save file, not the plain binary save file. So, to make the game load the plain binary save file, we need to disable calling “decode” function in the “load” function as the method discussed above.

Push the newly edited library, then start the game.

Now, we can hex edit the save file freely as we like.

Other problem and solution (added 2012-03-19)

There are even easier problems, such as the game Aqua Pet. There is no shared object (lib*.so). And the save file is also a plain text file. Meaning, we need no hex editor to edit it. However, editing the file might not change anything. In this type of case, we must “force stop” the app first, then edit the file.

Now, enjoy the games.

Cave Story (Doukutsu Monogatari) cheat in Linux

I tried to find some good games in Linux, since there is not much game development in Linux. Recently, I played Cave Story. The drawing is looking old, but the storyline is good, just like an expected Japanese game. And there are 3 different endings.

The game is not easy to play. So, I finally, try to game hack it using GameConqueror. Then, these are the memory address:

81c8614    HP 
81cce84    Polar Star / Spur Lv 
81cce98    Missle Lv 
81ccea4    Missle bullet
81cceac    Fireball Lv 
81ccec0    Bubbler Lv 
81ccecc    Bubbler bullet
81cced4    Blade / Nemesis lv

Unfortunately, GameConqueror cannot save and open the address list.

Still need to follow a game guide so that you will not miss any secret from the game.

KOEI Romance of the Three Kingdoms and the real world

I like to play KOEI’s game, especially Romance of the Three Kingdoms (San Goku Shi). It is related to the real world management.

When playing the game, we need to first build a kingdom. Then, the player should found that, if the kingdom has only one character (officer), the kingdom can do nothing, because each character can do only one task (or limited tasks) for each month. Even the character has maximum status values: intelligence 100, war 100, politic 100, charisma 100, though the character is useful, the kingdom itself is useless. Thus, the player needs to recruit more officers to work for the kingdom.

For recruiting the officers, there is a problem. It is difficult to recruit good officer. Because some of the good officer is already work for other kingdom. Simply recruiting any officer also has a problem, especially there are some useless officers. Recruiting these useless officers does not help much in a small kingdom. This is because they cannot work for the kingdom, they cannot contribute anything. Yet, the kingdom need to pay for the officers every month.

To increase the income of a kingdom, the kingdom must have lands, then the officers need to develop the land for economic growth to earn money seasonally; or to develop the land for farming to increase the food supply for every year. Therefore, in order to make a kingdom strong, the kingdom must develop to get the income. Yet, the features of the land is also important, because some of the lands are not fertile. This is exactly same as the real world, that is why some of the country are rich of resources, yet the other not.

One of the feature of San Goku Shi I like is the compatibility value of each character. This is a hidden value, one can only see it with the character editor in Power-up Kit. The value range is from 0 to 149. When the two characters has the compatibility values which are close, they are easily to get together, and 0 is close to 149 as a cycle. So, Cao Cao is 25, Liu Bei is 75, and Sun Quan is 125. Their innate enemies are the value Yuan Shao (almost 100), Dong Zhuo (almost 0), and Liu Biao (almost 50). Therefore, a kingdom will always has a group of people which has similar compatibility value. This is exactly same as the real world, that is why people are normally divided into groups with the similar characteristic.

Therefore, a kingdom, not only needs the lands for the resource, good officers to work, and also the opportunities. They are important factors: 天(时)、地(利)、人(合).  With these factors, the player can build a strong kingdom.







Playing games with Ubuntu

Linux is a great OS. Open source and free. Can work as server or desktop. There are a lot of applications: office suite, internet web browser, email client, image editor, 3D modeler, games, online games, software development tools, etc. Using Linux, I can almost do anything I want just as I am using proprietary OS.

However, there is a drawback. If a computer cannot be used for playing games, then it will not be 100% perfect. Yes, Linux has a lot of free and open source games, but I feel that there is still a gap between free games and the commercial games. Though I may not use Linux to play the latest game, at least it should allow me to play my favourite game.

Luckily there is WINE. Though it cannot 100% compatible to all the games, at least have a try. The following is a screenshot of my most favourite game!

Taikou Risshiden 5
Taikou Risshiden 5 using WINE

Review and cheats of Totem Tribes

I played Totem Tribes 3 times, because I want to see the different endings. Besides that, it is quite a good game, the storyline is good.

It combines War Craft and “seek and find” game genre. But the “seek and find”, is very very difficult. Sometimes, need to search for the solution from internet.

Now, I want to talk about cheating in the game. Because playing it for 3 times, without cheating, it will be very boring. Besides that, remember backup the files before editing for the cheating.

Cheat 1: To make your objects easier to be found.
Just go to “Totem Tribe\data\texture\game\item“, paint the PNG files again, modify the picture, edit it, do whatever you want, then you can see the result if you restart the game.

Cheat 2: Make your building speed faster.
Open the “Totem Tribe\data\cfg\building.xml” with any text editor. Find the “build_points” tag, then change the value in it. Your building speed will be modified. But do not change the value to “1” or “0”, my experience told me “10” is enough. But remember, do not change all the buildings build points, because you might need to build a building slowly in one of the levels.

Since you can change the data about building, you can also change the “observation” tag, so that the map will be shown.

Cheat 3: Make your research faster.
Similar to Cheat 2, but open the “tech.xml” instead. Then modify the “cost” tag.

Cheat 4: Make your magic faster.
Similar to above, but “magic.xml“, and the “cost” tag can be modified.

Cheat 5: Build your units faster.
Open the “unit.xml“. Change the “train_points” tag. You can also change the “damage” tag, “speed” tag, or other else. But I tried to change the “observation” tag, and when I drag my unit, this cause an error to the application. So, try your own.

Note: Changing the data in the XML unlike changing the image file. It will only affect to the units or building or magic after you change the XML. For example, when you build a building with the default HP. After that, you exit the game, and modify the XML and change the HP and start the game. Your building is still the default HP, but the new building you build will be the new HP.

Cheat 6: Find all the jewels.
This is the most difficult part. Because, if you want to unlock the secret level, you need to find all the jewels. How can you do that? My final solution is go to “Totem Tribe\data\level\original”, open one of the level XML. And you will find “item” tag, with the attributes: “sub_id“, “type“, “x“, and “y“. “type” indicates the gem type, there are “RedGem”, “OrangeGem”, “YellowGem”, “GreenGem”, “BlueGem”, “VioletGem”, and “WhiteGem”. “x” and “y” is the coordinate of the gem. And the “sub_id” indicates the level or category of the gem. So, the level 1 start the “sub_id” from 0, and the level 19 ends the gem with the “sub_id” 62. That means, you can create all the gems from sub_id 0 to sub_id 62 in any one of the level with the coordinate x,y you want. So, do this, you can collect all the gems in one level.

Note: But type in all the text from sub_id 0 to sub_id 62 manually with all types of gem is quite exhaustive. I solve this problem by writing a program to generate the text, and copy the text to the XML file. Besides that, I put all the gems at Aruku’s starting coordinate. Then, start the game, and start that level. And you will see all the gems at Aruku’s coordinate. Then, just click the gems until your finger is tired.

Finally, the game is written using several libraries, Audiere, Expat, and HGE. This makes me have the eagerness to write my own game. A simple game with a good storyline, which make me played 3 times. But, I don’t have so much free time to do this. Hopefully I can spend sometimes to write a game.

Suikoden II review

Just finish an old game, Suikoden II. Easy to play. The story is good, with good ending. Though there are 4 kinds of ending, but still has a best ending. All the main characters survived at the end. Besides that, there are 108 stars (characters) can be recruited. And you can switch anyone you like in the game.

An old game doesn’t have 3D objects and beautiful scenes, but if the story is good, even it is old, it is valuable to be played.