This repository hosts all of resources, which include SDL2 and ALSA source code, needed for supported devices. The NDS emulator I used is DraStic emulator (close-source) which extracted from RetroPie package and the ELF binary is in ARM32 format, not AArch64. The DraStic version is v2.5.0.4 and sha1 is ae9c215bdea88359cbcb3c259ce0d60a1f59986c. In this porting, I focus on SDL2 and ALSA libraries and heavily customized on DraStic emulator. Therefore, there are some hooking points used in this emulator. To ensure it works properly, please use the correct DraStic emulator as mentioned before. It is welcome to file any suggestion or issue on this GitHub but I must say that I cannot make sure whether it can be fixed or included in the release build. Since the SDL2 library used in this repository is heavily customized, therefore, it is not recommended for generic use-case on any supported device.
Term | Description |
---|---|
Keypad Mode | This is the default mode and it is so-called gamepad mode. |
Stylus, Touch, Touch Pen or Pen Mode | It is touch mode. In this mode, the touch pen shows on either top or bottom screen. DPAD is used to move touch pen and A button acts touch point. |
DraStic Menu | The default DraStic menu. |
Customized Menu | It is a special menu to customize all of settings for my porting. This menu is not DraStic menu. So, I called the customized menu. |
Normal Resolution | This is the default display resolution on DraStic emulator and the resolution is 256x192 pixels. |
High Resolution | Turn on "Change Options -> High-resolution 3D" in DraStic menu and then the display resolution will be changed to 512x384 pixels. In this mode, only single screen is rendered. |
Wallpaper, Background Image or Theme | It is background image. |
$ sudo docker build -t mmiyoo .
$ sudo docker image rm mmiyoo
$ sudo docker run -it --rm -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd):/nds mmiyoo /bin/bash
$ cd /nds
$ make cfg
$ make
$ make rel
$ sudo docker run -it --rm -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd):/nds mmiyoo /bin/bash
$ cd /nds
$ make -f Makefile.trimui cfg
$ make -f Makefile.trimui
$ make -f Makefile.trimui rel
$ make -f Makefile.qx1000 cfg
$ make -f Makefile.qx1000
P.S. runs the commands on Sailfish OS.
$ make -f Makefile.unittest cfg
$ make -f Makefile.unittest
河馬
路人乙
背包胖熊
雯瑾文曦
Onion Development Team
DraStic Development Team
Miyoo Mini 掌機 QQ 群 (742661857)
Language: Display language
CPU: CPU clock
Overlay: Overlay image
Display: Display Layout
Alpha: The alpha value for small screen (only work on "layout 0" and "layout 1")
Border: The border color for small screen (only work on "layout 0" and "layout 1")
Position: The position for small screen (only work on "layout 0" and "layout 1")
Alt. Display: Alternative display layout
Keys: Key rotation
Hotkey: Hotkey binding
Swap L1-L2: Swap L1 and L2
Swap R1-R2: Swap R1 and R2
Pen X Speed: The moving speed for X axis
Pen Y Speed: The moving speed for Y axis
Cursor: Show or hide cursor
Fast Forward: The speed setting for fast forward
Keys | Description |
---|---|
R2 | Swap screen |
L2 | Change Keypad mode / Stylus mode |
MENU + LEFT | Change the display layout |
MENU + RIGHT | Change the display layout |
MENU + L1 | Exit from DraStic emulator |
MENU + L2 | Quick load state |
MENU + R1 | Fast forward |
MENU + R2 | Quick save state |
Customized Menu | |
UP / DOWN | Select item |
LEFT / RIGHT | Change setting |
B | Apply change and then exit |
Keypad Mode | |
MENU + A | Alternate display layout |
MENU + B | Change video filter (blur or pixel) |
MENU + Y | Change background image |
MENU + SELECT | Enter the DraStic menu |
MENU + START | Enter the customized menu |
Stylus Mode | |
DPAD | Move the pen |
A | Touch screen |
R1 | Lower moving speed |
MENU + UP | Show the pen on screen 1 |
MENU + DOWN | Show the pen on screen 0 |
MENU + Y | Change the pen image |
"pen": The index of pen image
"theme": The index of theme image
"mode": The index of display layout
"xv": The moving speed for X axis
"yv": The moving speed for Y axis
"alpha": The alpha value for small screen (only work on "layout 0" and "layout 1")
"position": The position for small screen (only work on "layout 0" and "layout 1")
"border": The border color for small screen (only work on "layout 0" and "layout 1")
"maxcpu": The maximum CPU clock
"touchpad": The screen index of stylus
"overlay": The index of overlay image
"mincpu": The minimum CPU clock
"alt": The alternative display mode
"swap_l1l2": Swap L1 and L2
"swap_r1r2": Swap R1 and R2
"lang": Display language
"keys_rotate": Key rotation (DPAD and 4 face keys)
"menu_c0": Customized menu color (text color when select)
"menu_c1": Customized menu color (text color when un-select)
"menu_c2": Customized menu color (highlight color)
"auto_state": Enable autosave and autoload
"auto_slot": The slot of autosave and autoload
"half_vol": The half of volume (only work for Stock system)
"splash": The display count for splash application
"hotkey": Bind hotkey with MENU or SELECT key
"states": Savestate folder
"menu_bg": The index of theme image for menu
"menu_cursor": Show or hide menu cursor
"fast_forward": The speed value of fast forward
1. Place drastic folder in Emu folder
2. Place NDS roms in Roms/NDS folder
Q1: How to add a new language ?
Step 1: add the new language file in "resources/translate" folder, ex: resources/translate/jp
Step 2: replace font.ttf file which supports your target language in "resources/font" folder
Step 3: change the language in the customized menu
Q2: How to customize the DraStic menu ?
The background and cursor images are put in "resources/menu" folder.
The color can be set in "resources/settings.json" file as the following:
"menu_c0":"0xffffff" Text color when select
"menu_c1":"0x000000" Text color when un-select
"menu_c2":"0x289a35" Highlight color
Q3: How to apply the overlay image ?
Place image in "resources/overlay" folder.
Go to the customized menu and then change the "Overlay" setting to apply it.
Please note that the background image will be disabled when the "Overlay" setting is enabled.
Q4: How to change the initial CPU clock ?
Change "./cpuclock 1500" to what you want. (1500 = 1500MHz = 1.5GHz)
For Miyoo Mini, the maximum CPU clock should be <= 1550MHz (experimental value)
For Miyoo Mini Plus, the maximum CPU clock should be <= 1850MHz (experimental value)
Q5: How to change the maximum/minimum CPU clock ?
Change the "maxcpu"/"minpcu" value in "resources/settings.json" file.
Q6: How to add a new wallpaper (so-called background image or theme) ?
All wallpapers are put in "resources/bg_640" and "resources/bg_752" folders by the screen resolution.
Q7: How to add a new image for pen ?
All of pen images are placed in "resources/pen" folder.
The touch point is set by the suffix file name.
For example, if the file name is 1_lt.png, it means the touch point is at left-top (_lt).
Here are the supported positions:
xxx_lb.png: left-bottom
xxx_lt.png: left-top
xxx_rb.png: right-bottom
xxx_rt.png: right-top
Q8: How to enable high resolution 3D mode ?
Turn on "Hight-resolution 3D" settings in DraStic menu.
The display resolution will be changed from 256x192 to 512x384 pixels.
Q9: Workaround (if DraStic emulator always shows white or black screen)
Go to DraStic menu and then select "Restart Game".
Keys | Description |
---|---|
MENU + LEFT | Change Keypad mode / Stylus mode |
MENU + RIGHT | Swap screen |
MENU + L1 | Quick load state |
MENU + R1 | Quick save state |
MENU + START | Exit from DraStic emulator |
Keypad Mode | |
MENU + SELECT | Enter DraStic menu |
MENU + A | Change display mode |
MENU + X | Take screenshot (Emus/drastic/screenshot) |
MENU + Y | Change background image |
Stylus Mode | |
DPAD | Move the pen |
A | Touch screen |
R1 | Lower moving speed |
MENU + Y | Change the pen image |
1. Place drastic folder in Emus folder
2. Place NDS roms in Roms/NDS folder
Sailfish OS
Keys | Description |
---|---|
Q | UP |
A | DOWN |
\ | LEFT |
S | RIGHT |
L | A |
K | B |
P | X |
O | Y |
` / , | L1 |
W / M | R1 |
Sym | SELECT |
Ctrl | START |
Enter | Swap screen |
Tab | Change Keypad mode / Stylus mode |
ESC | Exit from DraStic emulator |
N | Quick load state |
C | Quick save state |
Customized Menu | |
UP / DOWN | Select item |
LEFT / RIGHT | Change setting |
B | Apply change and then exit |
Keypad Mode | |
Space + SELECT | Enter the DraStic menu |
Space + START | Enter the customized menu |
Stylus Mode | |
DPAD | Move the pen |
A | Touch screen |
R1 | Lower moving speed |
Space + UP | Show the pen on screen 1 |
Space + DOWN | Show the pen on screen 0 |
Space + Y | Change the pen image |
$ cd drastic
$ ./launch.sh