Sunday, February 5, 2017

SNES9X - Synchronize save state between Android and PC



Snes9X is one of the best Android SNES emulators ever made. It is free, no ads, highly customisable. It helps bringing back tons of good memories. The auto save in Android version is just making the emulator even better than the original snes.

Snes9X
Android: https://play.google.com/store/apps/details?id=com.explusalpha.Snes9xPlus&hl=en 
Windows: http://www.snes9x.com/

I wanted to play SNES on my PC at home and on my Android on the go. SNES9x EX no doubt deserves a 5 stars, but so far it does not support cloud save.

It is non-sense to play Chrono Trigger with a 5.5 inch phone screen at home. So I decided to hands on a bit. It took me some time to Google to find the way out. The investment is well paid-off.

The thing is going to be a bit techie, so grab a coffee if necessary.

Finding save files

By default, the save file is located same as the ROM folder in Android; and save file is located in the "Saves" folder in the SNES folder in Windows.

Windows > Emulation > Settings


The Android save files ends with an extension .0A.frz ~ .0J.frz and the Windows save file ends with an extension .000 ~ .009

Converting save files

The Windows save file and the Android save file are actually the same. The only difference is their filename extension. They can be converted simply by changing the filename extension.

i.e.

Windows
Chrono Trigger.000

Android
Chrono Trigger.0A.frz


Copy all the save files from Android to Windows. Find the newest save files by comparing their timestamp. Change the extension from .000 to .0A.frz or vice versa

I created a VB script to get rid of this repetitive boring job.


Save file converter: https://github.com/DavidTsangHW/SNES9X-save-file-converter 

Cloud storage

It is not cool keep copying those save files between my PC and my phone. I wanted a more sophisticated way of doing this. I need a cloud storage. There are free cloud storage i.e. One Drive, Google Drive and Dropbox to choose from, but only the official Dropbox Android client allows exporting files to a custom location (SNES saves folder). Dropbox is the best pick for this.

Download: https://www.dropbox.com/

Setup Dropbox Windows Client

After installing Dropbox client on Windows, move the Save folder in the Dropbox folder. All new saves will be saved to Dropbox automatically as well.

Install DropSync Android Client

The official Dropbox Android client allows you to upload and download save files from the cloud storage. Yet, this can only be done, each time, manually.


To skip this painful and meaningless task, there is a better deal. Dropsync is  a Android Dropbox Client which  synchronizes files between you phone and the cloud storage periodically (say 5, 10, 30 minutes). The free version supports only one folder synchronization only, but it is sufficient to get the job done.

Choose the save folder for the periodic synchronization. DropSync will upload and download the latest game saves to the cloud storage.

Voila!

Tuesday, January 3, 2017

How to teach kids loving-kindness meditation

http://greatergood.berkeley.edu/raising_happiness/post/better_than_sex_and_appropriate_for_kids

Monday, August 15, 2016

Posting a Facebook post by using python

1. Download get-pip.py 2. python get-pip.py 3. python\scripts\pip install virtualenv 4. python\scripts\pip install facebook-sdk

Monday, June 20, 2016

Transparent background with GIMP

One of the simplest way to transfer a solid filled background into transparent background. First thing first, download GIMP.

This is the source file, and I want to turn the white background into transparent.


Quickly go to Colors > Color to Alpha


Here is where is the magic happens 


voilĂ  !!




Saturday, January 23, 2016

How to fix 100% disk usage in Windows 10


How to fix 100% disk usage in Windows 10
This is caused by a common combination of Skype as well Google Chrome. Similar issue with other programs could also cause 100% disk usage. To fix this do the following:
Google Chrome:
In Google Chrome, go to Settings > Show Advanced Settings ... > Privacy > Prefetch resources to load pages more quickly

Skype:
Make sure you have exited Skype and it is not running in the taskbar (if it is running in the taskbar then quit it).
Open Windows Explorer and open the following folder:
"C:\Program Files (x86)\Skype\Phone\"
Now right click "Skype.exe" file and then click "Properties" and open the "Security" tab.
Click the "Edit" button and then highlight "ALL APPLICATION PACKAGES" and place a tick in the "Write" box.


Thursday, August 6, 2015

Get next number sequence in Axapta

//Axapta Job Code Snippet

static void GetNextNumber(Args _args)
{

NumberSeq                   numberSeq;
MyTempTable tempTable ;

;

ttsbegin;
numberSeq = NumberSeq::newGetNumFromCode("ItemId");

tempTable.clear();
tempTable.ItemId = numberSeq.num();
tempTable.insert();

ttscommit;

}

Applying SMA10/20, SMA20/50 as trading signals

This is the comparison for results before and after applying SMA10/20 and SMA20/50 in the stock trader. Background Trading 3 stock ma...