based on mame emulator, extends some feature for convenient