Friday, December 23, 2011

How to Download Region-Locked Japanese Games from Android Market

The content of this tutorial is pulled from this post on byuu's forum. I am copying it here for redundancy and search engine indexing. The copyright belongs to D--.

I've finally found a way to pull region and phone model locked Japanese games from the Android market, such as the new Shiren game by Chunsoft. I'm posting the instructions here so no other poor fucker ever has to go through figuring this out.

Basically speaking, these games are locked by both SIM region and firmware information. Companies like NTT DoCoMo offer a select group of handsets with their service, and these handsets have firmware that has been heavily hacked on the inside to brand it as such. In order to get such a locked game, whether free or for sale, onto your phone, you will need to make Android Market think you are running an NTT branded handset.

To do this, you will need the following:
  • A rooted Android phone
  • RootExplorer
  • Superuser
  • Market Access - this app is ad free and can run at boot
  • A barcode reader that can handle QR codes
1. Run RootExplorer and navigate to /system. Click the button to remount as r+w.
2. Long press on build.prop and select Copy. Paste it into the same folder or another folder to make a backup. You DO NOT want to lose this.
3. Long press on build.prop and select Edit in Text Editor.
4. Find and modify the following values (jacked from an NTT DoCoMo SHARP SH12C). Be aware they may not be grouped logically, so search the whole file if need bed. If a value doesn't exist, you will need to create it:
ro.mtp.manufacturer=NTT DOCOMO, Inc.
ro.sh_build.version.incremental=01.01.02 2.3.3 S7140 01.01.01 release-keys
With it, I was actually able to purchase and install locked apps. In theory, if you have a tool like TitaniumBackup that converts installed apps to APK files, you could purchase an app, convert it to APK, then use the 15-minute return to get your money back. I have not done this because I don't want this kind of purchase pattern on my credit card, and because I'm willing to give Chunsoft 500 yen because that's a very fair price for Shiren.

5.  Close Root Explorer.
6.  Open System->Applications->All and scroll down to Market. Click Force Close and Clear Cache.
7.  Power off your phone. You absolutely must reboot your phone in order to populate the new values we just made in the RAM.
8.  Run MarketEnabler. Click the third tab and enter this for your SIM code: 44010. All NTT network SIM cards are branded 0xABEA.
8a.  Go to System->Accounts & Sync and add a NEW GOOGLE ACCOUNT. One that has never been tied to any phone. Create one if you must.
9.  Copy the URL of the program in the market and go to Paste it in and generate a QR code.
10.  Take a picture of the QR code with your barcode scanner. When prompted, pick to use Market to open the link.
10a.  Immediately click the menu button and change your account to the new Google account you added to your phone.
11.  Agree to the Market terms and conditions.
12.  Congratulations! You can finally install the fucking game!

NOTE: I was finally able to isolate a strange bug in that your current Google count does not notify Google that it is present on a new device. Apparently, your phone information is only sent to Google when an account is first tied to your phone. If you wish to purchase apps in the market with the account you've added, you will need to use that account to log in. Make sure your Market app is also set to that account so automated downloading can begin.

Thursday, December 22, 2011

My New Das Keyboard

Newegg briefly ran a huge sale on Das mechanical keyboards, so I decided to shell out the money and pick one up. This post will cover my background with keyboards and switches, and then provide some information about the Das.

Background (feel free to skip it if you don't care)

I've been a dedicated touch typist for a number of years, though I have fallen out of practice since leaving professional writing as an occupation and have settled into a modest 85-wpm rut. Even so, the specter of repetitive stress injury (RSI) hangs over me and informs my decisions on which keyboards I will and won't use.

For years, I was drawn to the scissor-switch keyboards, which have a short travel, light resistance and are more common on laptops, rather than the more common "rubber dome" keyboards, which dominate the desktop keyboard market, due to the reduced fatigue on my fingers and wrists. A few years ago, though, I began using my grandfather's original 1989 IBM Model M keyboard, which features the delightful "buckling spring" mechanical switch, and was instantly won over. Rather than lug it back and forth from home to work every day, I asked my employer to purchase a Unicomp Customizer, which retails for approximately $80.
Diagram of a buckling spring switch.

The Unicomp is a joy to type on and feels identical to the original Model M I use at home. However, both keyboards suffer from 2-key rollover, which means that certain keys conflict with one another when pressed, such that the keyboard will ignore any further keypresses, sometimes with as few as 2 keys pressed. This is no big deal when typing because typists never need to press more than one key at a time (except for modifiers, like shift, of course). However, when playing computer games, rollover (sometimes known as "ghosting") becomes a serious problem, which is what led me to shop around for a gaming-specific keyboard.

The Das Keyboard Model S Ultimate

After poring over's exhaustive mechanical keyboard analysis and review thread, it seemed to me that there is a segment of the market that could be considered equivalent. These keyboards all use various permutations of the Cherry MX microswitches and provide N-key rollover (i.e., you can press as many keys as you want and they will never conflict with one another) when connected to the computer via PS/2 (via USB, they are all limited to 6-key rollover, which is a limitation of the generic USB keyboard driver, apparently). Out of the many options, I decided to go with the Das since it was on a hefty sale and I had a spare Newegg gift card to make it even cheaper.

Foreshortening makes the Model M
appear larger, but they are roughly
the same size.
Of the Das models available, I had my choice between blue and brown Cherry switches. According to reviews, the blues are tactile (meaning your fingers feel a haptic click when the switch actuates) and clicky, while the browns are tactile and non-clicky. I have grown accustomed to the clickiness of my buckling springs, so the blues were attractive to me. In practice, the clickiness is nice and familiar and the resistance is surprisingly even less than I'm used to from my buckling springs.

This pic shows the difference in pitch.
While the Model M is rounded, the Das
is straight and flat. I don't really notice
the difference during use, though.
For anyone who is familiar with arcade buttons, the Model M feels like clicky Happ buttons, while non-tactile Cherry blacks would be more like Sanwa buttons (no haptic feedback for when the button actuates). Tactile Cherry MX switches, like the blues and browns, are somewhere in between, probably more like the Seimitsu clickies.

Though I am a touch-typer, I would have preferred to get labeled keycaps on my Das, but the model with Cherry blues and keycaps wasn't on sale. In the future, I'll probably pick up a handful of colored/labeled keycaps, just to give myself a few more landmarks. Perhaps the letter 'P' and/or the hyphen key, and maybe a Tux keycap for the 'super'/Windows key...

An area smoothed by high traffic on
my Unicomp after barely 1 year of use.
Other aspects of the keyboard are all top-notch. The USB ports on the side provide handy access for plugging in a mouse or thumb drive, though the placement of the ports can interfere with mousing on cramped keyboard trays, like mine (see the bottom-right corner of my pics). The keyboard housing is solid, well-constructed and easy to clean, though the glossy, piano black finish really attracts and holds fingerprints. On the other hand, this type of finish won't develop smooth spots in areas of high traffic like the stippled/matte finishes would, so there's a trade-off.

Final Thoughts

Overall, I'm very pleased with the Das. For typing, I guess I still prefer the buckling springs, but the Das is most definitely satisfactory and still blows away any scissor-switch or rubber dome I've encountered. I would recommend this keyboard to anyone who is interested in a solid gaming keyboard that can do double-duty as a very competent typing keyboard.

In a typing comparison, I am able to achieve my same 85 wpm on the Das as with the buckling spring keyboards (as measured by TypeRacer), though the lighter actuation pressure on the Das leads me to bottom out on it more often. However, I think this is something that I could get used to over time and could potentially end up increasing my speed somewhat, once I grow accustomed.

If you would like to learn more and/or are considering taking the plunge on a mechanical keyboard, the aforementioned thread is full of information for potential buyers. To learn more about keyboards in general, the wikipedia has an excellent article covering the various technologies. If you have any questions about any of the keyboards mentioned in this post, feel free to leave a comment.

Update (3/07/2012): I talked my employer into picking up a Das Professional S(ilent) for me. This keyboard uses the Cherry MX Brown switches and features labeled keycaps, unlike the Ultimate I have at home.

While the switches are definitely quieter than the Cherry Blues, they are far from "silent" and are probably only a little quieter than my Unicomp. I'm pleased with this, though, since I like the clickity-clack anyway; it just annoys my office-mates a little less now. Additionally, the Browns require a slightly higher actuation pressure compared with the Blues, putting them more on the level of the Unicomp/Model M.

Typing feels light and sure. This is a very comfortable keyboard and I think most anyone will be pleased with it for typing, probably more so than with the Blue microswitches.

Here are a couple of pics:

Tuesday, December 20, 2011

Cg Pixel Shaders for SSNES

Update (11/08/2012): New shaders added to the end of the post.

In addition to XML/GLSL pixel shaders, SSNES also supports pixel shaders written in Nvidia's proprietary Cg shader language, which is similar in syntax to Microsoft's HLSL language. While Cg hasn't been a very popular language for shaders, historically, many new shaders have been written for use with PS3 homebrew, where Cg is the only supported shader language. In fact, these shaders were downloaded from TwinAphex's SNES9x Next source code repository.

Another benefit to the Cg shaders is that they work with both OpenGL and Direct3D drivers in SSNES, which makes many of the more modern shaders to available to people with poor OpenGL performance for the first time.

As with my previous shader posts, these images were captured at a 3x scale factor, then enlarged using nearest neighbor to 400% for the detail shot. Click the thumbnails to embiggen.


This shader combines Hyllian's 5xBR algorithm with the phosphor-derived scanline shader from Caligari with great results. This shader is designed for use with square, non-aspect-corrected pixels, so be sure to use an 8:7 aspect ratio on SNES to avoid any nasty artifacting. It also expects at least a 5x scale factor, which looks like this:

Here are a few more pictures from the GBA version of Final Fantasy 6 and Street Fighter 3: Third Strike on FBA:

I find the scanlines make text easier to read than with 5xBR alone, for whatever reason.
Download the xBR pack from Hyllian here.


This shader accentuates the individual pixels by adding a cool, beveled look along with some color-tweaking mojo to give them a feeling of depth. Again, it expects non-aspect-corrected images, or else subpixel aliasing effects will make a mess of things.

Here's another picture at 20x (5x scale factor, enlarged 4x with nearest neighbor; see it full size to get the full effect):

Notable ports from the XML shader family include cgwg's CRT shader, Themaister's dot-n-bloom (listed as '') and Waterpaint shaders and an extremely fast implementation of bicubic filtering ( from Hyllian, as well as all the classics, such as HQ2x, SuperEagle and so on.

Update (11/08/2012)


Hyllian has been working on some interesting shaders lately, including an implementation of Christoph Feck's "reverse anti-aliasing" algorithm, which allows for some very sharp, smooth upscaling. It works on any image but really shines on digitized images with lots of gradients (think: SNES games with digitized sprites or games with prerendered backgrounds, like Resident Evil or Final Fantasy 7). It's also particularly good at rendering legible text, so it's great for RPGs, as well. Here are some images of this shader paired with some scanlines:
 As you can see, Clay Fighter looks really great with this shader. Too bad the game is godawful.


As with pretty much everything else, bsnes has taken some sophisticated steps to achieve an authentic gamma ramp that reflects the actual appearance of games. Themaister was kind enough to reproduce the relevant code in Cg form. This is how it looks:
He also wrote a cgp file (just a simple file that tells RetroArch how to deal with multiple Cg shaders) that will enable pixel blending used in pseudo-hires transparency, which bsnes-derived emulation cores typically render as a series of vertical stripes instead of the intended translucent color. You can download the bsnes-gamma-ramp+hires blending bundle here.


A simple, fast scanline shader from Gigaherz, LCD3x is intended to evoke the look of handheld console LCD displays:
It's also a very easy shader to customize, if you want darker scanlines or to brighten the overall image. These variables are located on lines 12 and 13 of the shader, respectively.

I'll add more shaders and more pics in the near future.

Monday, December 5, 2011

Beginner's Guide to Cyanogen Mod on Epic 4G (Samsung Galaxy S SPH-D700)

UPDATE: This guide also works with the new Cyanogen Mod 9 release, which is based on Android 4 Ice Cream Sandwich.

Based on Sprint's depressingly slow release of Gingerbread OTA (over the air) updates for the Epic 4G (aka Samsung Galaxy S SPH-D700), it looks like this phone will be considered EOL (end of life) in the very near future, despite being barely a year old (that's like, what... 7 years in cell phone time?). It is, therefore, very unlikely that us Epic owners will ever receive an official update to Android 4.0 Ice Cream Sandwich.

However, thanks to the open source nature of Android and some extremely clever community members, we can now use the awesome, fast, feature-filled Cyanogen Mod (CM) on our phones. CM7 has only just recently reached 'supported' status on the Epic 4G, while international versions of the phone have had support for some time.


To get started, we need to download some tools:
1. Odin, which is a Windows-only (boo) utility for flashing firmwares on the Epic 4G. Mac/Linux users can try Heimdall, but I won't be covering that in this tutorial.

2. A rooted kernel for Samsung's official Gingerbread ROM. This will prep your phone for all of the shenanigans we'll be getting into. It also includes some nice community-provided goodies, like a fix for the keyboard's habit of dropping double-tapped letters.

3. ClockworkMod, a special bootloader that now works with the Epic 4G. Once you get this guy installed, you never have to use your computer for this kinda stuff again. You can just flash in new ROMs (like CM updates) directly from your phone's SD card.

4. A Cyanogen Mod image optimized for the Epic 4G. This is the one I used, but since then, the epicmtd (the codename for the Epic 4G) has become an officially supported device! That means you can always get the latest stable and/or nightly builds from the official CM distribution source. One thing to be aware of: CM10 requires repartitioning your phone, so once you go to it, you can't go back to CM9/ICS or earlier without returning to stock first. As long as you stay with CM9 or earlier, however, you can swap between them without doing a full reversion.

5. Samsung's USB Phone Drivers. Without this driver, Odin will fail to see your phone :(

6. G-Apps. They're named in this fashion: gapps-[android revision]-[date] Find the one that matches your CM version (ICS corresponds to CM9 while JB corresponds to CM10) and has the most recent date.

You'll also need a USB-A-to-microUSB cable that is SHORTER than the one that came with your phone. For some strange reason that I won't go into here (it has to do with impedance of the wire :O), the 6-foot cable that is shipped with the phone will almost always fail the process, leaving you with a semi-bricked phone. Get one like this instead.

Ok, once you've collected all of your tools, we can get started.


1. Install your USB Phone Driver and unpack your Odin zip file. Inside the resulting folder, you should have your Odin executable (ends in *.exe), Odin3.ini and a *.pit file (mine is victory_8G_100528.pit).

2. Plug your USB-A-to-microUSB cable into your computer, but not into your phone. Now, power off your phone, slide open your phone's keyboard and hold down the number 1 key and the power button while plugging in the microUSB cable. It should boot into this screen:
3. Now, open Odin. It should look something like this:
Make sure, under 'Option' on the left, the box next to 'Re-Partition' is NOT checked. Then, on the right, click the button labeled PDA and navigate to your Samsung recovery ROM (#2 in the tools above). Choose it and, back in the main window, click the big button labeled 'Start.'

Some messages should run through the window on the bottom left of the Odin window and, if everything went well, it should end up like this:
and your phone should reset itself and boot into the Samsung ROM.

4. Now, power off your phone again, unplug it from your computer and perform step #2 again to get it back into the recovery state.

5. Back in Odin, click the PDA button again, but this time, navigate to the ClockworkMod ROM (#3 from the tools above). Choose it and, back in the main window, click the 'Start' button again. The message window in the bottom-left of the menu should cycle some more messages and, if everything went well, it should say All threads completed. (succeed 1 / failed 0) and your phone should reset itself again.

At this point, we're finished with Odin (forever), so go ahead and close it out.

6. From now on, you can flash anything you want directly from your SD card, which is awesome. So, put your phone into USB Mass Storage mode (I had to unplug my USB cable and then reconnect it, then it prompted me as usual) and drag your CyanogenMod ROM (#4 from the tools above) to the root (top level directory) of your SD card and rename it to '' (very important).

Now, on your phone, tap the button labeled "Disconnect storage from PC" to unmount it from your computer and power-off your phone. Once it's completely turned off, power it back on, but when you do, press and hold the power button, the camera button (i.e., the button below the power button) and the 'Volume Down' button on the other side of your phone to enter the ClockworkMod bootloader. It should look something like this:
Using the volume up/down button to navigate, select 'Apply' It will ask for confirmation and warn you that it cannot be undone. Confirm your selection and it will begin installation, which should look like this:
When it's all finished, it will put you back in the bootloader, where you can choose 'Reboot system now':
If everything went well, you should see the CyanogenMod7 boot screen, like this:
Congratulations! Take a deep breath and give yourself a pat on the back. We just have a few more things to add and then we'll be done! You can proceed to step #7.
If you just keep seeing the CyanogenMod7 boot screen over and over (like I did), then you've encountered the "bootloop" error, which is no big deal. Just boot back into your ClockworkMod bootloader, choose 'Mounts and Storage' from the main menu, and then 'mount USB storage' (you may have to unplug/replug the USB cable from your computer if it doesn't recognize it straightaway). Once it mounts on your computer, you can try to redownload your CyanogenMod image, rename it to and replace it on the root of your SD card. When it's done copying, select 'Unmount,' tap the 'back' button to go back to the bootloader, select 'wipe data/factory reset' and then flash it again to CM.
7. Once you successfully reach the CM desktop, activate USB Mass Storage mode via the pulldown main menu. Once your SD card mounts on your computer, create a new folder in the root directory (you can call it whatever you want, but I'm going to call it 'updates'). Note: you can also delete your CM image at this point, if you want to free up the space. Put your G-Apps into your new directory and boot back into your ClockworkMod recovery.

Once you're there, choose 'Apply update from zip file on SD card,' then 'choose zip from SD card,' then navigate to your newly created directory ('updates' for me) and choose your gapps zip. When it finishes, choose 'Reboot' from the bootloader and you should be all set!

Whenever new updates for CyanogenMod are released, simply rename them to '' and place them on the root of your SD card, then run the update from ClockworkMod's bootloader. < Note: since this was written, you can update straight from CyanogenMod without using ClockworkMod by going to System Settings > About phone > CyanogenMod updates. Here, you can browse and download updates and apply them on the next reboot.

Analytics Tracking Footer