Microcontrollers are the heart of many DIY projects, but there are some situations where a CPLD or FPGA is more appropriate. There are many development boards available from Terasic, but I wanted to try something different. I’ve heard “no-name Chinese FPGA boards” can often be more trouble than their worth, but I decided to take a chance with a rather inexpensive CPLD one.

C-M240 Development Board from EDA Board
C-M240 Development Board from EDA Board

This is a fairly bare bones Altera MAX II development board from a seller on AliExpress named “EDA Board”. It took over 5 weeks to arrive, so I wouldn’t recommend purchasing this if you want to work with it any time soon. It’s a good deal for the price as most similarly-priced development boards are merely breakout boards without any on-board components. This board has two 4×7 digit LED displays, eight LEDs, five input buttons, a buzzer, and unpopulated breakout pins for the remaining pins on the MAX II. It comes with a USB Blaster clone and power cables too! Unfortunately there are no schematics availble and contacting the seller has proven to be difficult, but I determined the pins used by the LED displays to be as follows:

Pin Description CPLD Pin
A 85
B 84
C 83
D 82
E 81
F 78
G 77
Decimal 76
D1 95 (left), 89 (right)
D2 92 (left), 96 (right)
D3 91 (left), 86 (right)
D4 97 (left), 85 (right)

The silkscreen lists the pins used by the LEDs, buttons, and buzzer on the board, but the 4th LED from the bottom incorrectly says “PIN_55” when it’s really pin 54. My board also had a zero ohm resistor across the “on” pins instead of a power switch as shown in the item pictures.

Putting these minor inconveniences aside, I think this board will be good for simple CPLD projects. However, I’ll probably stick with something from Terasic if I wanted to work with a Cyclone FPGA in the future.

I started work on this in October of last year, and after a few months of working on it on-and-off, I released the first version in April. It’s a sequel of sorts to my previous PS2 cheat device project, but I wanted to make something from scratch. The code got gnarly on the old menu so I decided to discontinue working on it and create this. Maybe I’ll move on from PS2 stuff some day, who knows :-).
Cheat Device is a game enhancer for PlayStation 2 games, similar to Action Replay, GameShark, and CodeBreaker. It supports booting retail, disc based games as well as ELF files such as OpenPS2Loader or ESR.


  • Easy to navigate menu system similar to CodeBreaker
  • Supports retail discs and loader ELFs
  • Fast loading of large cheat lists
  • Save manager for backing up and restoring game saves to/from a flash drive
  • Powered by ps2rd’s powerful cheat engine

Important Things
Storing Cheats
Cheat databases are stored in CDB files created with cdb-util, which will convert cheat lists following this simple format:

"Game Name"
90000000 88888888
Cheat 1
27654321 12345678
Cheat 2
12345678 98765432
Cheat Section
Cheat 3
11111111 00000000

// Comment line

Enable Codes
9-type enable codes (9xxxxxxx yyyyyyyy) are supported, and the first cheat for every game must contain an enable code. If an F-type enable code is used instead (which is common for older games), it will be silently ignored and a hook will be installed automatically by the code engine. Many games have been tested with the auto-hook function, but its best if a 9-type enable code is used.

Code Format
All cheats must be in “RAW” format; Cheat Device can’t decrypt or read any other formats (ARMAX, CB1-6, CB7+, AR2, GS, etc.). However, you can use
tools such as OmniConvert to convert any of these formats to RAW.

Settings File
Settings are stored in an ini file named “CheatDevicePS2.ini”, which needs to be located in the directory Cheat Device is run from. The cheat database path and additional boot paths are set here. See the included settings file for an example.

Included is the CodeBreaker 10.0 database. Please report any bugs to me if you find them.

Current Release – v1.2.1 (September 8, 2015):https://github.com/root670/CheatDevi…PS2-v1.2.1.zip
cdb-util v1.2 (July 28, 2015):https://mega.nz/#!LNYB0DAL!n_2Co6zI8…1vCP_mu4dQR_wg
Source: https://github.com/root670/CheatDevicePS2

Previous Releases
All releases can be found here: https://github.com/root670/CheatDevicePS2/releases
v1.2 (August 4, 2015): https://github.com/root670/CheatDevi…cePS2-v1.2.zip
v1.1 (June 10, 2015): https://mega.co.nz/#!WBBhXCBA!s5As_D…LM4cDDO-NrFbyU
v1.0 (April 4, 2015): https://mega.co.nz/#!jVgAFSra!nKQowK…0qOmXTTQoR7oJQ


Some good progress has been made on the Initial D project. pactool seems more or less solid and has been able to extract and create PAC archives without issues. gim2png (really gimtool now) can convert GIM textures to PNG as well as inject a PNG back into a GIM. It’s much easier to inject a PNG rather than create the whole GIM structure from scratch since I don’t fully understand the format. When injecting a PNG, it will be palettized to fit either a 16 or 256 color RBGA palette depending on what type the target GIM uses.

Here’s what a modified texture will look like in game:

Texture injection test.

As for actually translating parts of the game, I’ve made some progress but it is very tedious. I don’t know any Japanese, but Google Translator has been surprisingly good at identifying characters I scribble in and spits out translations that (for the most part) seem accurate. I’d definitely like to sit down and learn parts of the language, but that’s a job for another day.

My Hostgator subscription is coming due next in October, but I’ve decided to switch to Namecheap. I never had any issues with HostGator, but Namecheap’s offerings are much cheaper for what I need (nothing special, just PHP and MySQL access). Everything has been copied over, so hopefully no snags will come along.


 Initial D Special Stage is a port of the popular arcade game released by Sega. There are English releases of the arcade versions, but none of the home versions have ever been released outside of Asia. This is too bad, since Special Stage was a great port considering the hardware limitations of the PlayStation 2 (the arcade version’s hardware uses TWO video processors and has 8 times more video memory than a PS2!). Nevertheless, I’ve decided to start work on a translation patch for this game. Yes it’s a racing game and the text is probably not that important to read, but it can be challenging to navigate the menus that are entirely Japanese.

Continue reading

Last year I began work on a cheat device GUI for ps2rd (an excellent remote debugger for the PlayStation 2). The goal of the project is to create a menu-driven cheat device similar to CodeBreaker or Action Replay using ps2rd’s ASM cheat engine. I wanted this to be just a cheat device, so I removed most of the debugging functionality from ps2rd for my project.

I had some freetime over the past few days and made some updates to it. It’s now more stable than previous releases and has had more unneeded parts of ps2rd removed (such as videomod). BOOT2 selecting now works as it should, so you can boot to a ELF instead of directly to disk. I’ve also added preliminary support for compressed code lists using miniz. Basically, you use the included “compress-decompress.exe” program to compress/decompress your cheat files using zlib compression. When using a compressed cheat list, it must have a file extension of “.bin” or else it will try to load it as text. Update ps2rd.conf to reflect whichever cheat list you’re using. This should help cut down on loading times.

If you find any bugs, please let me know!


  • Fix delete option (currently does nothing)
  • Implement less-awkard cheat list compression (maybe use zip/7z files instead)
  • More code cleanup
  • PS2-side codelist manipulation (add/modify/delete/etc.)

Latest version:
Updated source code will be available soon. Source on GitHub is not the latest version.

Over the past few weeks, I’ve taken a look at the way text is stored in the game Kingdom Hearts. Like other games made by Square, Kingdom Hearts uses a special character map for strings throughout the game. The US and PAL versions of the game use a character map consisting of Latin characters and common symbols. The Japanese releases use a different table containing Japanese characters as well as uppercase Latin letters (there are a few lower case ones though, but not a full alphabet). Most text is compressed using a LZSS-like algorithm, but I was able to poke around at some of the non-compressed areas. For example, the menu items on the pause screen are not compressed and can be modified if you know the correct characters to enter. So far I am able to change these items as long as my modification’s don’t overlap any neighboring strings.

I started with the original Japanese release of Kingdom Hearts and was able to do this by modifying the game’s ISO:

Translated menu items in Kingdom Hearts NTSC-J

I created a tool that can convert plaintext to the character set used in the game. If you’re interested you can download it here. It requires .NET Framework 4.0 SP1 and currently cannot convert Japanese characters. A table created by Falo can be used to manually convert them by hand. I’ve tested it on these versions of the game:

  • Kingdom Hearts (SLUS-20370) USA
  • Kingdom Hearts (SLPM-66122) Japanese (Uses Shift-JIS encoding)
  • Kingdom Hearts Final Mix (SLPM-66123) Japanese (Uses Shift-JIS encoding)

I’m hoping someone will see this post and be motivated to continue work on a full translation patch some day for Final Mix. I don’t have the time to do it myself and it might be pointless to pursue it once Kingdom Hearts HD 1.5 is released in the US, since that contains the additions that were present in Final Mix. KH-Vids.net user Hidden Smithery has already offered help and was able to translate the following for the Japanese versions of the game:

Item: エーテル                    ETHER
Code: E3 55 F2 19 08             32 41 35 32 3F

Item:メガエーテル                  MEGA-ETHER (name is too long)
19 01 19 0E E3 55 F2 19 08      3A 32 34 2E 2C 32 41 35 32 3F

Item:ポーション                    POTION
Code:19 27 55 EB 19 2F 19 0D    3D 3C 41 36 3C 3B 01 01

Item:メガポーション                             MEGA-POTION
Code:19 01 19 0E 19 27 55 EB 19 2F 19 0D    3A 32 34 2E 2C 3D 3C 41 36 3C 3B 01

スロット                           SLOT
EC 19 0A 19 30 F3               40 39 3C 41 01 01

ソラ                             SORA (too long)
EE 19 06                        40 3C 3F 2E

たたかう                          ATK (the word "ATTACK" is too long)
9F 9F 95 92                     2E 41 38 01

まほう                            MGC (the word "MAGIC" is too long)
AE AD 92                        3A 34 30

Last year, I created a WaybackMachine-style backup of CodeTwink and posted it here. For those who don’t know, CodeTwink is the semi-official site for the CodeBreaker line of video game cheat devices (similar to Action Replay and GameShark). Anywho, here’s my copy: link.

At the time I was wondering if the site was going to stay around for much longer (it hasn’t been receiving any updates for quite a while now).