Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

New port: Anbernic RG Nano

A bit of context, this device is a clone of the FunKey-S with a different form factor, hardware is mostly identical, the relevant difference is it has audio out (via usb-c, adapter to 3.5mm is included), this is the reason why the FunKey-SDK is needed for bulding.

This port is based on the old SDL 1.2 code because the device doesn't have SDL2 support. Alongside what was supported in the SDL 1.2 builds this port supports battery level, charging status and backlight control.

Change-Id: I7fcb85be62748644b667c0efebabf59d6e9c5ade

authored by

Hairo R. Carela and committed by
Solomon Peachy
48392bab 9d3e2864

+1517 -29
+2
apps/SOURCES
··· 303 303 keymaps/keymap-echor1.c 304 304 #elif CONFIG_KEYPAD == SURFANS_F28_PAD 305 305 keymaps/keymap-surfansf28.c 306 + #elif CONFIG_KEYPAD == RG_NANO_PAD 307 + keymaps/keymap-rgnano.c 306 308 #endif
+260
apps/keymaps/keymap-rgnano.c
··· 1 + /*************************************************************************** 2 + * __________ __ ___. 3 + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 + * \/ \/ \/ \/ \/ 8 + * $Id$ 9 + * 10 + * Copyright (C) 2025 Hairo R. Carela 11 + * 12 + * This program is free software; you can redistribute it and/or 13 + * modify it under the terms of the GNU General Public License 14 + * as published by the Free Software Foundation; either version 2 15 + * of the License, or (at your option) any later version. 16 + * 17 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 + * KIND, either express or implied. 19 + * 20 + ****************************************************************************/ 21 + 22 + /* Button Code Definitions for Android targets */ 23 + 24 + #include <stdio.h> 25 + #include <string.h> 26 + #include <stdlib.h> 27 + 28 + #include "config.h" 29 + #include "action.h" 30 + #include "button.h" 31 + #include "settings.h" 32 + 33 + /* 34 + * The format of the list is as follows 35 + * { Action Code, Button code, Prereq button code } 36 + * if there's no need to check the previous button's value, use BUTTON_NONE 37 + * Insert LAST_ITEM_IN_LIST at the end of each mapping 38 + */ 39 + 40 + static const struct button_mapping button_context_standard[] = { 41 + { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE }, 42 + { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, 43 + { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE }, 44 + { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 45 + { ACTION_STD_CANCEL, BUTTON_B, BUTTON_NONE }, 46 + { ACTION_STD_OK, BUTTON_A, BUTTON_NONE }, 47 + { ACTION_STD_MENU, BUTTON_Y|BUTTON_REL, BUTTON_Y }, 48 + { ACTION_STD_CONTEXT, BUTTON_START|BUTTON_REL, BUTTON_START }, 49 + { ACTION_STD_QUICKSCREEN, BUTTON_R|BUTTON_REL, BUTTON_R }, 50 + 51 + LAST_ITEM_IN_LIST 52 + }; /* button_context_standard */ 53 + 54 + static const struct button_mapping button_context_wps[] = { 55 + { ACTION_WPS_PLAY, BUTTON_A|BUTTON_REL, BUTTON_A }, 56 + { ACTION_WPS_STOP, BUTTON_A|BUTTON_REPEAT, BUTTON_A }, 57 + { ACTION_WPS_STOP, BUTTON_L|BUTTON_REPEAT, BUTTON_NONE }, 58 + { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, 59 + { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, 60 + { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, 61 + { ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, 62 + { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT }, 63 + { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT }, 64 + { ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE }, 65 + { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 66 + { ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE }, 67 + { ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, 68 + { ACTION_WPS_MENU, BUTTON_B|BUTTON_REL, BUTTON_B }, 69 + { ACTION_WPS_CONTEXT, BUTTON_START|BUTTON_REL, BUTTON_START }, 70 + { ACTION_WPS_HOTKEY, BUTTON_L|BUTTON_REL, BUTTON_L }, 71 + { ACTION_WPS_QUICKSCREEN, BUTTON_R|BUTTON_REL, BUTTON_R }, 72 + { ACTION_WPS_BROWSE, BUTTON_Y|BUTTON_REL, BUTTON_Y }, 73 + { ACTION_WPS_ABSETA_PREVDIR, BUTTON_A|BUTTON_LEFT, BUTTON_NONE }, 74 + { ACTION_WPS_ABSETB_NEXTDIR, BUTTON_A|BUTTON_RIGHT, BUTTON_NONE }, 75 + 76 + LAST_ITEM_IN_LIST 77 + }; /* button_context_wps */ 78 + 79 + static const struct button_mapping button_context_list[] = { 80 + { ACTION_LIST_VOLUP, BUTTON_FN|BUTTON_A, BUTTON_NONE }, 81 + { ACTION_LIST_VOLUP, BUTTON_FN|BUTTON_A|BUTTON_REPEAT, BUTTON_NONE }, 82 + { ACTION_LIST_VOLDOWN, BUTTON_FN|BUTTON_Y, BUTTON_NONE }, 83 + { ACTION_LIST_VOLDOWN, BUTTON_FN|BUTTON_Y|BUTTON_REPEAT, BUTTON_NONE }, 84 + 85 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 86 + }; /* button_context_list */ 87 + 88 + static const struct button_mapping button_context_tree[] = { 89 + { ACTION_TREE_WPS, BUTTON_X|BUTTON_REL, BUTTON_X }, 90 + { ACTION_TREE_HOTKEY, BUTTON_L|BUTTON_REL, BUTTON_L }, 91 + { ACTION_TREE_STOP, BUTTON_L|BUTTON_REPEAT, BUTTON_NONE}, 92 + 93 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) 94 + }; /* button_context_tree */ 95 + 96 + static const struct button_mapping button_context_listtree_scroll_with_combo[] = { 97 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), 98 + }; 99 + 100 + static const struct button_mapping button_context_listtree_scroll_without_combo[] = { 101 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), 102 + }; 103 + 104 + static const struct button_mapping button_context_settings[] = { 105 + { ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE }, 106 + { ACTION_SETTINGS_INCREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, 107 + { ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE }, 108 + { ACTION_SETTINGS_DECREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 109 + { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE }, 110 + { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, 111 + { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE }, 112 + { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, 113 + 114 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 115 + }; /* button_context_settings */ 116 + 117 + static const struct button_mapping button_context_settings_right_is_inc[] = { 118 + { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, 119 + { ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, 120 + { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE }, 121 + { ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, 122 + { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE }, 123 + { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, 124 + { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE }, 125 + { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 126 + 127 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 128 + }; /* button_context_settingsgraphical */ 129 + 130 + static const struct button_mapping button_context_yesno[] = { 131 + { ACTION_YESNO_ACCEPT, BUTTON_A, BUTTON_NONE }, 132 + 133 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 134 + }; /* button_context_settings_yesno */ 135 + 136 + static const struct button_mapping button_context_colorchooser[] = { 137 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), 138 + }; /* button_context_colorchooser */ 139 + 140 + static const struct button_mapping button_context_eq[] = { 141 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), 142 + }; /* button_context_eq */ 143 + 144 + /** Bookmark Screen **/ 145 + static const struct button_mapping button_context_bmark[] = { 146 + { ACTION_BMS_DELETE, BUTTON_Y, BUTTON_NONE }, 147 + 148 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), 149 + }; /* button_context_bmark */ 150 + 151 + static const struct button_mapping button_context_time[] = { 152 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), 153 + }; /* button_context_time */ 154 + 155 + static const struct button_mapping button_context_quickscreen[] = { 156 + { ACTION_QS_TOP, BUTTON_UP, BUTTON_NONE }, 157 + { ACTION_QS_TOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, 158 + { ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE }, 159 + { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 160 + { ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE }, 161 + { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, 162 + { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, 163 + { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, 164 + 165 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 166 + }; /* button_context_quickscreen */ 167 + 168 + static const struct button_mapping button_context_pitchscreen[] = { 169 + { ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE }, 170 + { ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, 171 + { ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE }, 172 + { ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 173 + { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE }, 174 + { ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE }, 175 + { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, 176 + { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, 177 + { ACTION_PS_TOGGLE_MODE, BUTTON_A, BUTTON_NONE }, 178 + { ACTION_PS_RESET, BUTTON_Y, BUTTON_NONE }, 179 + { ACTION_PS_EXIT, BUTTON_B, BUTTON_NONE }, 180 + { ACTION_PS_SLOWER, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, 181 + { ACTION_PS_FASTER, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, 182 + 183 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 184 + }; /* button_context_pitchcreen */ 185 + 186 + static const struct button_mapping button_context_keyboard[] = { 187 + { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, 188 + { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, 189 + { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, 190 + { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, 191 + { ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE }, 192 + { ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, 193 + { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE }, 194 + { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 195 + { ACTION_KBD_CURSOR_LEFT, BUTTON_L, BUTTON_NONE }, 196 + { ACTION_KBD_CURSOR_LEFT, BUTTON_L|BUTTON_REPEAT, BUTTON_NONE }, 197 + { ACTION_KBD_CURSOR_RIGHT, BUTTON_R, BUTTON_NONE }, 198 + { ACTION_KBD_CURSOR_RIGHT, BUTTON_R|BUTTON_REPEAT, BUTTON_NONE }, 199 + { ACTION_KBD_SELECT, BUTTON_A, BUTTON_NONE }, 200 + { ACTION_KBD_BACKSPACE, BUTTON_Y|BUTTON_REL, BUTTON_Y }, 201 + { ACTION_KBD_PAGE_FLIP, BUTTON_X, BUTTON_NONE }, 202 + { ACTION_KBD_DONE, BUTTON_START|BUTTON_REL, BUTTON_START }, 203 + { ACTION_KBD_ABORT, BUTTON_B|BUTTON_REL, BUTTON_B }, 204 + 205 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 206 + }; /* button_context_keyboard */ 207 + 208 + static const struct button_mapping button_context_radio[] = { 209 + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) 210 + }; /* button_context_radio */ 211 + 212 + const struct button_mapping* get_context_mapping(int context) 213 + { 214 + switch (context) 215 + { 216 + case CONTEXT_STD: 217 + return button_context_standard; 218 + case CONTEXT_WPS: 219 + return button_context_wps; 220 + 221 + case CONTEXT_LIST: 222 + return button_context_list; 223 + case CONTEXT_MAINMENU: 224 + case CONTEXT_TREE: 225 + if (global_settings.hold_lr_for_scroll_in_list) 226 + return button_context_listtree_scroll_without_combo; 227 + else 228 + return button_context_listtree_scroll_with_combo; 229 + case CONTEXT_CUSTOM|CONTEXT_TREE: 230 + return button_context_tree; 231 + 232 + case CONTEXT_SETTINGS: 233 + return button_context_settings; 234 + case CONTEXT_CUSTOM|CONTEXT_SETTINGS: 235 + case CONTEXT_SETTINGS_RECTRIGGER: 236 + return button_context_settings_right_is_inc; 237 + 238 + case CONTEXT_SETTINGS_COLOURCHOOSER: 239 + return button_context_colorchooser; 240 + case CONTEXT_SETTINGS_EQ: 241 + return button_context_eq; 242 + 243 + case CONTEXT_SETTINGS_TIME: 244 + return button_context_time; 245 + 246 + case CONTEXT_YESNOSCREEN: 247 + return button_context_yesno; 248 + case CONTEXT_FM: 249 + return button_context_radio; 250 + case CONTEXT_BOOKMARKSCREEN: 251 + return button_context_bmark; 252 + case CONTEXT_QUICKSCREEN: 253 + return button_context_quickscreen; 254 + case CONTEXT_PITCHSCREEN: 255 + return button_context_pitchscreen; 256 + case CONTEXT_KEYBOARD: 257 + return button_context_keyboard; 258 + } 259 + return button_context_standard; 260 + }
+9 -5
apps/plugins/SOURCES
··· 26 26 properties.c 27 27 random_folder_advance_config.c 28 28 rb_info.c 29 - rockblox.c 30 29 search.c 31 30 settings_dumper.c 32 31 snow.c ··· 89 88 90 89 /* Overlays loaders */ 91 90 92 - #if defined(HAVE_LCD_COLOR) && (LCD_STRIDEFORMAT == HORIZONTAL_STRIDE) 91 + #if defined(HAVE_LCD_COLOR) && (LCD_STRIDEFORMAT == HORIZONTAL_STRIDE) && !defined(RG_NANO) /* Build issues */ 93 92 #if (PLUGIN_BUFFER_SIZE > 0x14000) && (CONFIG_PLATFORM & (PLATFORM_NATIVE |PLATFORM_HOSTED)) && (defined(CPU_ARM) || defined(CPU_MIPS)) 94 93 duke3d.c 95 94 quake.c ··· 140 139 xobox.c 141 140 spacerocks.c 142 141 142 + #if (LCD_WIDTH != 240) && (LCD_HEIGHT != 240) 143 + /* No 240x240 support */ 144 + rockblox.c 145 + bubbles.c 146 + wormlet.c 147 + #endif 148 + 143 149 blackjack.c 144 150 bounce.c 145 - bubbles.c 146 151 calculator.c 147 152 chip8.c 148 153 chopper.c ··· 162 167 star.c 163 168 starfield.c 164 169 vu_meter.c 165 - wormlet.c 166 170 167 171 #ifdef HAVE_HOTKEY 168 172 announce_status.c ··· 199 203 matrix.c 200 204 speedread.c 201 205 202 - #if (LCD_WIDTH > 138) 206 + #if (LCD_WIDTH > 138) && ((LCD_WIDTH != 240) && (LCD_HEIGHT != 240)) 203 207 invadrox.c 204 208 superdom.c 205 209 #endif
+4 -1
apps/plugins/SUBDIRS
··· 13 13 xworld 14 14 15 15 /* for duke3d, wolf3d and quake */ 16 - #if (PLUGIN_BUFFER_SIZE > 0x14000) && (CONFIG_PLATFORM & (PLATFORM_NATIVE|PLATFORM_HOSTED)) && (defined(CPU_ARM) || defined(CPU_MIPS)) 16 + #if (PLUGIN_BUFFER_SIZE > 0x14000) && (CONFIG_PLATFORM & (PLATFORM_NATIVE|PLATFORM_HOSTED)) && (defined(CPU_ARM) || defined(CPU_MIPS)) && !defined(RG_NANO) 17 17 sdl 18 18 #endif 19 19 ··· 41 41 chessbox 42 42 fractals 43 43 imageviewer 44 + #if (LCD_WIDTH != 240) && (LCD_HEIGHT != 240) 45 + /* No 240x240 support */ 44 46 sudoku 47 + #endif 45 48 reversi 46 49 goban 47 50 frotz
+6
apps/plugins/battery_bench.c
··· 259 259 #define BATTERY_ON_TXT "Play" 260 260 #define BATTERY_OFF_TXT "Back" 261 261 262 + #elif CONFIG_KEYPAD == RG_NANO_PAD 263 + #define BATTERY_ON BUTTON_A 264 + #define BATTERY_OFF BUTTON_X 265 + #define BATTERY_ON_TXT "A" 266 + #define BATTERY_OFF_TXT "X" 267 + 262 268 #else 263 269 #error "No keymap defined!" 264 270 #endif
+2
apps/plugins/bitmaps/native/SOURCES
··· 500 500 jewels.220x176x16.bmp 501 501 #elif (LCD_WIDTH == 176) && (LCD_HEIGHT == 220) 502 502 jewels.220x176x16.bmp 503 + #elif (LCD_WIDTH == 240) && (LCD_HEIGHT >= 240) 504 + jewels.240x240x16.bmp 503 505 #elif (LCD_WIDTH == 240) && (LCD_HEIGHT >= 320) 504 506 jewels.320x240x16.bmp 505 507 #elif (LCD_WIDTH == 320) && (LCD_HEIGHT == 240)
apps/plugins/bitmaps/native/jewels.240x240x16.bmp

This is a binary file and will not be displayed.

+16
apps/plugins/blackjack.c
··· 612 612 #define BJACK_QUIT BUTTON_POWER 613 613 #define BJACK_QUIT_NAME "QUIT" 614 614 615 + #elif CONFIG_KEYPAD == RG_NANO_PAD 616 + #define BJACK_SELECT_NAME "A" 617 + #define BJACK_STAY_NAME "Y" 618 + #define BJACK_QUIT_NAME "START" 619 + #define BJACK_DOUBLE_NAME "R" 620 + #define BJACK_SELECT BUTTON_A 621 + #define BJACK_QUIT BUTTON_START 622 + #define BJACK_MAX BUTTON_X 623 + #define BJACK_MIN BUTTON_B 624 + #define BJACK_STAY BUTTON_Y 625 + #define BJACK_DOUBLEDOWN BUTTON_R 626 + #define BJACK_UP BUTTON_UP 627 + #define BJACK_DOWN BUTTON_DOWN 628 + #define BJACK_RIGHT BUTTON_RIGHT 629 + #define BJACK_LEFT BUTTON_LEFT 630 + 615 631 #else 616 632 #error No keymap defined! 617 633 #endif
+9
apps/plugins/brickmania.c
··· 373 373 #define UP BUTTON_UP 374 374 #define DOWN BUTTON_DOWN 375 375 376 + #elif CONFIG_KEYPAD == RG_NANO_PAD 377 + #define CONTINUE_TEXT "A To Continue" 378 + #define QUIT BUTTON_START 379 + #define LEFT BUTTON_LEFT 380 + #define RIGHT BUTTON_RIGHT 381 + #define SELECT BUTTON_A 382 + #define UP BUTTON_UP 383 + #define DOWN BUTTON_DOWN 384 + 376 385 #else 377 386 #error No keymap defined! 378 387 #endif
+11
apps/plugins/calculator.c
··· 546 546 #define CALCULATOR_CALC BUTTON_MENU 547 547 #define CALCULATOR_CLEAR BUTTON_BACK 548 548 549 + #elif CONFIG_KEYPAD == RG_NANO_PAD 550 + 551 + #define CALCULATOR_LEFT BUTTON_LEFT 552 + #define CALCULATOR_RIGHT BUTTON_RIGHT 553 + #define CALCULATOR_UP BUTTON_UP 554 + #define CALCULATOR_DOWN BUTTON_DOWN 555 + #define CALCULATOR_QUIT BUTTON_START 556 + #define CALCULATOR_INPUT BUTTON_A 557 + #define CALCULATOR_CALC BUTTON_X 558 + #define CALCULATOR_CLEAR BUTTON_B 559 + 549 560 #else 550 561 #error No keymap defined! 551 562 #endif
+11
apps/plugins/calendar.c
··· 432 432 #define CALENDAR_NEXT_MONTH BUTTON_MENU 433 433 #define CALENDAR_PREV_MONTH BUTTON_BACK 434 434 435 + #elif CONFIG_KEYPAD == RG_NANO_PAD 436 + #define CALENDAR_QUIT BUTTON_START 437 + #define CALENDAR_SELECT BUTTON_A 438 + #define CALENDAR_NEXT_WEEK BUTTON_DOWN 439 + #define CALENDAR_PREV_WEEK BUTTON_UP 440 + #define CALENDAR_NEXT_DAY BUTTON_RIGHT 441 + #define CALENDAR_PREV_DAY BUTTON_LEFT 442 + #define CALENDAR_NEXT_MONTH BUTTON_R 443 + #define CALENDAR_PREV_MONTH BUTTON_L 444 + #define CALENDAR_EVENT_MENU_NAME "A" 445 + 435 446 #else 436 447 #error "No keypad setting." 437 448 #endif
+15
apps/plugins/chessbox/chessbox_pgn.h
··· 598 598 #define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT) 599 599 #define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT) 600 600 601 + #elif CONFIG_KEYPAD == RG_NANO_PAD 602 + #define CB_SELECT BUTTON_A 603 + #define CB_UP BUTTON_UP 604 + #define CB_DOWN BUTTON_DOWN 605 + #define CB_LEFT BUTTON_LEFT 606 + #define CB_RIGHT BUTTON_RIGHT 607 + #define CB_PLAY BUTTON_X 608 + #define CB_LEVEL BUTTON_Y 609 + #define CB_MENU BUTTON_B 610 + #define CB_RESTART BUTTON_R 611 + #define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT) 612 + #define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT) 613 + #define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT) 614 + #define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT) 615 + #define CB_RC_QUIT BUTTON_START 601 616 602 617 #else 603 618 #error No keymap defined!
+10
apps/plugins/chessclock.c
··· 408 408 #define CHC_SETTINGS_OK BUTTON_PLAY 409 409 #define CHC_SETTINGS_CANCEL BUTTON_BACK 410 410 411 + #elif CONFIG_KEYPAD == RG_NANO_PAD 412 + #define CHC_QUIT BUTTON_START 413 + #define CHC_STARTSTOP BUTTON_A 414 + #define CHC_RESET BUTTON_X 415 + #define CHC_MENU BUTTON_B 416 + #define CHC_SETTINGS_INC BUTTON_UP 417 + #define CHC_SETTINGS_DEC BUTTON_DOWN 418 + #define CHC_SETTINGS_OK BUTTON_A 419 + #define CHC_SETTINGS_CANCEL BUTTON_B 420 + 411 421 #else 412 422 #error No keymap defined! 413 423 #endif
+12
apps/plugins/chip8.c
··· 1299 1299 #define CHIP8_KEY6 BUTTON_RIGHT 1300 1300 #define CHIP8_KEY8 BUTTON_LEFT 1301 1301 1302 + #elif CONFIG_KEYPAD == RG_NANO_PAD 1303 + #define CHIP8_OFF BUTTON_START 1304 + #define CHIP8_KEY1 BUTTON_Y 1305 + #define CHIP8_KEY2 BUTTON_A 1306 + #define CHIP8_KEY3 BUTTON_X 1307 + #define CHIP8_KEY4 BUTTON_LEFT 1308 + #define CHIP8_KEY5 BUTTON_UP 1309 + #define CHIP8_KEY6 BUTTON_RIGHT 1310 + #define CHIP8_KEY7 BUTTON_B 1311 + #define CHIP8_KEY8 BUTTON_DOWN 1312 + #define CHIP8_KEY9 BUTTON_R 1313 + #define CHIP8_KEY0 BUTTON_L 1302 1314 1303 1315 #elif CONFIG_KEYPAD == SHANLING_Q1_PAD 1304 1316 /* use touchscreen */
+6
apps/plugins/chopper.c
··· 207 207 #define ACTION BUTTON_PLAY 208 208 #define ACTIONTEXT "PLAY" 209 209 210 + #elif CONFIG_KEYPAD == RG_NANO_PAD 211 + #define QUIT BUTTON_START 212 + #define ACTION BUTTON_A 213 + #define ACTION2 BUTTON_B 214 + #define ACTIONTEXT "A" 215 + 210 216 #elif !defined(HAVE_TOUCHSCREEN) 211 217 #error No keymap defined! 212 218 #endif
+8
apps/plugins/clix.c
··· 325 325 #define CLIX_BUTTON_RIGHT BUTTON_RIGHT 326 326 #define CLIX_BUTTON_CLICK BUTTON_PLAY 327 327 328 + #elif (CONFIG_KEYPAD == RG_NANO_PAD) 329 + #define CLIX_BUTTON_QUIT BUTTON_START 330 + #define CLIX_BUTTON_LEFT BUTTON_LEFT 331 + #define CLIX_BUTTON_RIGHT BUTTON_RIGHT 332 + #define CLIX_BUTTON_CLICK BUTTON_A 333 + #define CLIX_BUTTON_UP BUTTON_UP 334 + #define CLIX_BUTTON_DOWN BUTTON_DOWN 335 + 328 336 #else 329 337 #error "no keymap" 330 338 #endif
+10
apps/plugins/cube.c
··· 415 415 #define CUBE_PAUSE BUTTON_PLAY 416 416 #define CUBE_HIGHSPEED (BUTTON_PLAY|BUTTON_REPEAT) 417 417 418 + #elif CONFIG_KEYPAD == RG_NANO_PAD 419 + #define CUBE_QUIT BUTTON_START 420 + #define CUBE_NEXT BUTTON_RIGHT 421 + #define CUBE_PREV BUTTON_LEFT 422 + #define CUBE_INC BUTTON_UP 423 + #define CUBE_DEC BUTTON_DOWN 424 + #define CUBE_MODE BUTTON_X 425 + #define CUBE_PAUSE BUTTON_A 426 + #define CUBE_HIGHSPEED BUTTON_Y 427 + 418 428 #else 419 429 #error No keymap defined! 420 430 #endif
+12
apps/plugins/doom/i_video.c
··· 633 633 #define DOOMBUTTON_ESC BUTTON_POWER 634 634 #define DOOMBUTTON_MAP BUTTON_PREV 635 635 636 + #elif CONFIG_KEYPAD == RG_NANO_PAD 637 + #define DOOMBUTTON_UP BUTTON_UP 638 + #define DOOMBUTTON_DOWN BUTTON_DOWN 639 + #define DOOMBUTTON_LEFT BUTTON_LEFT 640 + #define DOOMBUTTON_RIGHT BUTTON_RIGHT 641 + #define DOOMBUTTON_SHOOT BUTTON_R 642 + #define DOOMBUTTON_OPEN BUTTON_B 643 + #define DOOMBUTTON_ESC BUTTON_START 644 + #define DOOMBUTTON_ENTER BUTTON_A 645 + #define DOOMBUTTON_WEAPON BUTTON_X 646 + #define DOOMBUTTON_MAP BUTTON_Y 647 + 636 648 #else 637 649 #error Keymap not defined! 638 650 #endif
+4
apps/plugins/doom/rockdoom.c
··· 202 202 "TNT" 203 203 }; 204 204 205 + #ifdef RG_NANO /* Path is a bit longer */ 206 + const unsigned char wads_builtin[7][34] = 207 + #else 205 208 const unsigned char wads_builtin[7][30] = 209 + #endif 206 210 { 207 211 GAMEBASE"doom1.wad", 208 212 GAMEBASE"doom.wad",
+14
apps/plugins/flipit.c
··· 509 509 #define FLIPIT_STEP_BY_STEP (BUTTON_PLAY|BUTTON_REPEAT) 510 510 #define FLIPIT_TOGGLE BUTTON_PLAY 511 511 512 + #elif CONFIG_KEYPAD == RG_NANO_PAD 513 + 514 + #define FLIPIT_LEFT BUTTON_LEFT 515 + #define FLIPIT_RIGHT BUTTON_RIGHT 516 + #define FLIPIT_UP BUTTON_UP 517 + #define FLIPIT_DOWN BUTTON_DOWN 518 + #define FLIPIT_NEXT BUTTON_R 519 + #define FLIPIT_PREV BUTTON_L 520 + #define FLIPIT_QUIT BUTTON_START 521 + #define FLIPIT_SHUFFLE BUTTON_B 522 + #define FLIPIT_SOLVE BUTTON_X 523 + #define FLIPIT_STEP_BY_STEP BUTTON_Y 524 + #define FLIPIT_TOGGLE BUTTON_A 525 + 512 526 #else 513 527 #error No keymap defined! 514 528 #endif
+12
apps/plugins/fractals/fractal.h
··· 519 519 #define FRACTAL_PRECISION_DEC (BUTTON_BACK | BUTTON_DOWN) 520 520 #define FRACTAL_RESET BUTTON_PLAY 521 521 522 + #elif CONFIG_KEYPAD == RG_NANO_PAD 523 + #define FRACTAL_QUIT BUTTON_START 524 + #define FRACTAL_UP BUTTON_UP 525 + #define FRACTAL_DOWN BUTTON_DOWN 526 + #define FRACTAL_LEFT BUTTON_LEFT 527 + #define FRACTAL_RIGHT BUTTON_RIGHT 528 + #define FRACTAL_ZOOM_IN BUTTON_X 529 + #define FRACTAL_ZOOM_OUT BUTTON_B 530 + #define FRACTAL_PRECISION_INC BUTTON_R 531 + #define FRACTAL_PRECISION_DEC BUTTON_L 532 + #define FRACTAL_RESET BUTTON_A 533 + 522 534 #else 523 535 #error No keymap defined! 524 536 #endif
+12
apps/plugins/goban/goban.h
··· 512 512 #define GBN_BUTTON_MENU BUTTON_MENU 513 513 #define GBN_BUTTON_PLAY BUTTON_PLAY 514 514 515 + #elif CONFIG_KEYPAD == RG_NANO_PAD 516 + #define GBN_BUTTON_UP BUTTON_UP 517 + #define GBN_BUTTON_DOWN BUTTON_DOWN 518 + #define GBN_BUTTON_LEFT BUTTON_LEFT 519 + #define GBN_BUTTON_RIGHT BUTTON_RIGHT 520 + #define GBN_BUTTON_RETREAT BUTTON_L 521 + #define GBN_BUTTON_ADVANCE BUTTON_R 522 + #define GBN_BUTTON_MENU BUTTON_B 523 + #define GBN_BUTTON_PLAY BUTTON_A 524 + #define GBN_BUTTON_CONTEXT BUTTON_X 525 + #define GBN_BUTTON_NEXT_VAR BUTTON_Y 526 + 515 527 #else 516 528 #error Unsupported keypad 517 529 #endif
+12 -2
apps/plugins/imageviewer/imageviewer_button.h
··· 557 557 #define IMGVIEW_MENU (BUTTON_PLAY|BUTTON_REPEAT) 558 558 #define IMGVIEW_SLIDE_SHOW BUTTON_PLAY 559 559 560 - 561 - 562 560 #elif CONFIG_KEYPAD == SHANLING_Q1_PAD 563 561 /* use touchscreen */ 562 + 563 + #elif CONFIG_KEYPAD == RG_NANO_PAD 564 + #define IMGVIEW_ZOOM_IN BUTTON_X 565 + #define IMGVIEW_ZOOM_OUT BUTTON_Y 566 + #define IMGVIEW_UP BUTTON_UP 567 + #define IMGVIEW_DOWN BUTTON_DOWN 568 + #define IMGVIEW_LEFT BUTTON_LEFT 569 + #define IMGVIEW_RIGHT BUTTON_RIGHT 570 + #define IMGVIEW_NEXT BUTTON_R 571 + #define IMGVIEW_PREVIOUS BUTTON_L 572 + #define IMGVIEW_MENU BUTTON_B 573 + #define IMGVIEW_QUIT BUTTON_START 564 574 565 575 #else 566 576 #error No keymap defined!
+10
apps/plugins/jewels.c
··· 390 390 #define HK_SELECT "PLAY" 391 391 #define HK_CANCEL "BACK" 392 392 393 + #elif CONFIG_KEYPAD == RG_NANO_PAD 394 + #define JEWELS_UP BUTTON_UP 395 + #define JEWELS_DOWN BUTTON_DOWN 396 + #define JEWELS_LEFT BUTTON_LEFT 397 + #define JEWELS_RIGHT BUTTON_RIGHT 398 + #define JEWELS_SELECT BUTTON_A 399 + #define JEWELS_CANCEL BUTTON_START 400 + #define HK_SELECT "A" 401 + #define HK_CANCEL "START" 402 + 393 403 #else 394 404 #error No keymap defined! 395 405 #endif
+8
apps/plugins/lib/keymaps.h
··· 272 272 #define BTN_FIRE BUTTON_PLAY 273 273 #define BTN_PAUSE BUTTON_MENU 274 274 275 + #elif CONFIG_KEYPAD == RG_NANO_PAD 276 + #define BTN_UP BUTTON_UP 277 + #define BTN_DOWN BUTTON_DOWN 278 + #define BTN_LEFT BUTTON_LEFT 279 + #define BTN_RIGHT BUTTON_RIGHT 280 + #define BTN_FIRE BUTTON_A 281 + #define BTN_PAUSE BUTTON_START 282 + 275 283 #else 276 284 #error Unsupported keypad 277 285 #endif
+15
apps/plugins/lib/pluginlib_actions.c
··· 277 277 { PLA_DOWN_REPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 278 278 { PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, 279 279 { PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, 280 + #elif (CONFIG_KEYPAD == RG_NANO_PAD) 281 + { PLA_UP, BUTTON_UP, BUTTON_NONE }, 282 + { PLA_DOWN, BUTTON_DOWN, BUTTON_NONE }, 283 + { PLA_LEFT, BUTTON_LEFT, BUTTON_NONE }, 284 + { PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, 285 + { PLA_UP_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, 286 + { PLA_DOWN_REPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 287 + { PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, 288 + { PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, 280 289 #else 281 290 # ifndef HAVE_TOUCHSCREEN 282 291 # error pluginlib_actions: No directions defined ··· 516 525 {PLA_SELECT, BUTTON_PLAY, BUTTON_NONE}, 517 526 {PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY}, 518 527 {PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE}, 528 + #elif (CONFIG_KEYPAD == RG_NANO_PAD) 529 + {PLA_EXIT, BUTTON_START, BUTTON_NONE}, 530 + {PLA_CANCEL, BUTTON_B, BUTTON_NONE}, 531 + {PLA_SELECT, BUTTON_A, BUTTON_NONE}, 532 + {PLA_SELECT_REL, BUTTON_A|BUTTON_REL, BUTTON_A}, 533 + {PLA_SELECT_REPEAT, BUTTON_A|BUTTON_REPEAT, BUTTON_NONE}, 519 534 #else 520 535 # ifndef HAVE_TOUCHSCREEN 521 536 # error pluginlib_actions: No actions defined
+8
apps/plugins/midi/midiplay.c
··· 336 336 #define MIDI_VOL_DOWN BUTTON_DOWN 337 337 #define MIDI_PLAYPAUSE BUTTON_PLAY 338 338 339 + #elif CONFIG_KEYPAD == RG_NANO_PAD 340 + #define MIDI_QUIT BUTTON_START 341 + #define MIDI_FFWD BUTTON_RIGHT 342 + #define MIDI_REWIND BUTTON_LEFT 343 + #define MIDI_VOL_UP BUTTON_UP 344 + #define MIDI_VOL_DOWN BUTTON_DOWN 345 + #define MIDI_PLAYPAUSE BUTTON_A 346 + 339 347 #else 340 348 #error No keymap defined! 341 349 #endif
+10
apps/plugins/minesweeper.c
··· 455 455 #elif CONFIG_KEYPAD == SHANLING_Q1_PAD 456 456 /* use touchscreen */ 457 457 458 + #elif CONFIG_KEYPAD == RG_NANO_PAD 459 + # define MINESWP_LEFT BUTTON_LEFT 460 + # define MINESWP_RIGHT BUTTON_RIGHT 461 + # define MINESWP_UP BUTTON_UP 462 + # define MINESWP_DOWN BUTTON_DOWN 463 + # define MINESWP_QUIT BUTTON_START 464 + # define MINESWP_TOGGLE BUTTON_X 465 + # define MINESWP_DISCOVER BUTTON_A 466 + # define MINESWP_INFO BUTTON_Y 467 + 458 468 #else 459 469 #error No keymap defined! 460 470 #endif
+6
apps/plugins/mp3_encoder.c
··· 2592 2592 #define MP3ENC_DONE BUTTON_BACK 2593 2593 #define MP3ENC_SELECT BUTTON_PLAY 2594 2594 2595 + #elif CONFIG_KEYPAD == RG_NANO_PAD 2596 + #define MP3ENC_PREV BUTTON_UP 2597 + #define MP3ENC_NEXT BUTTON_DOWN 2598 + #define MP3ENC_DONE BUTTON_START 2599 + #define MP3ENC_SELECT BUTTON_A 2600 + 2595 2601 #else 2596 2602 #error No keymap defined! 2597 2603 #endif
+10
apps/plugins/mpegplayer/mpeg_settings.c
··· 365 365 #elif CONFIG_KEYPAD == SHANLING_Q1_PAD 366 366 #define MPEG_START_TIME_EXIT BUTTON_POWER 367 367 368 + #elif CONFIG_KEYPAD == RG_NANO_PAD 369 + #define MPEG_START_TIME_SELECT BUTTON_A 370 + #define MPEG_START_TIME_LEFT BUTTON_LEFT 371 + #define MPEG_START_TIME_RIGHT BUTTON_RIGHT 372 + #define MPEG_START_TIME_LEFT2 BUTTON_L 373 + #define MPEG_START_TIME_RIGHT2 BUTTON_R 374 + #define MPEG_START_TIME_UP BUTTON_UP 375 + #define MPEG_START_TIME_DOWN BUTTON_DOWN 376 + #define MPEG_START_TIME_EXIT BUTTON_START 377 + 368 378 #else 369 379 #error No keymap defined! 370 380 #endif
+9
apps/plugins/mpegplayer/mpegplayer.c
··· 498 498 #elif CONFIG_KEYPAD == SHANLING_Q1_PAD 499 499 /* use touchscreen */ 500 500 501 + #elif CONFIG_KEYPAD == RG_NANO_PAD 502 + #define MPEG_MENU BUTTON_START 503 + #define MPEG_STOP BUTTON_X 504 + #define MPEG_PAUSE BUTTON_A 505 + #define MPEG_VOLDOWN BUTTON_DOWN 506 + #define MPEG_VOLUP BUTTON_UP 507 + #define MPEG_RW BUTTON_LEFT 508 + #define MPEG_FF BUTTON_RIGHT 509 + 501 510 #else 502 511 #error No keymap defined! 503 512 #endif
+12
apps/plugins/oscilloscope.c
··· 564 564 #elif CONFIG_KEYPAD == SHANLING_Q1_PAD 565 565 /* use touchscreen */ 566 566 567 + #elif CONFIG_KEYPAD == RG_NANO_PAD 568 + #define OSCILLOSCOPE_QUIT BUTTON_START 569 + #define OSCILLOSCOPE_DRAWMODE BUTTON_X 570 + #define OSCILLOSCOPE_ADVMODE BUTTON_Y 571 + #define OSCILLOSCOPE_ORIENTATION BUTTON_R 572 + #define OSCILLOSCOPE_GRAPHMODE BUTTON_B 573 + #define OSCILLOSCOPE_PAUSE BUTTON_A 574 + #define OSCILLOSCOPE_SPEED_UP BUTTON_RIGHT 575 + #define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT 576 + #define OSCILLOSCOPE_VOL_UP BUTTON_UP 577 + #define OSCILLOSCOPE_VOL_DOWN BUTTON_DOWN 578 + 567 579 #else 568 580 #error No keymap defined! 569 581 #endif
+11
apps/plugins/pacbox/pacbox.h
··· 418 418 #define PACMAN_COIN BUTTON_PLAY 419 419 #define PACMAN_MENU BUTTON_MENU 420 420 421 + #elif CONFIG_KEYPAD == RG_NANO_PAD 422 + 423 + #define PACMAN_UP BUTTON_UP 424 + #define PACMAN_DOWN BUTTON_DOWN 425 + #define PACMAN_LEFT BUTTON_LEFT 426 + #define PACMAN_RIGHT BUTTON_RIGHT 427 + #define PACMAN_1UP BUTTON_L 428 + #define PACMAN_2UP BUTTON_R 429 + #define PACMAN_COIN BUTTON_A 430 + #define PACMAN_MENU BUTTON_START 431 + 421 432 #else 422 433 423 434 #error Keymap not defined!
+17
apps/plugins/pegbox.c
··· 731 731 #elif CONFIG_KEYPAD == SHANLING_Q1_PAD 732 732 /* use touchscreen */ 733 733 734 + #elif CONFIG_KEYPAD == RG_NANO_PAD 735 + #define PEGBOX_SELECT BUTTON_A 736 + #define PEGBOX_QUIT BUTTON_START 737 + #define PEGBOX_RESTART BUTTON_B 738 + #define PEGBOX_LVL_UP BUTTON_R 739 + #define PEGBOX_LVL_DOWN BUTTON_L 740 + #define PEGBOX_UP BUTTON_UP 741 + #define PEGBOX_DOWN BUTTON_DOWN 742 + #define PEGBOX_RIGHT BUTTON_RIGHT 743 + #define PEGBOX_LEFT BUTTON_LEFT 744 + 745 + #define SELECT_TEXT "A" 746 + #define QUIT_TEXT "START" 747 + #define RESTART_TEXT "B" 748 + #define LVL_UP_TEXT "R" 749 + #define LVL_DOWN_TEXT "L" 750 + 734 751 #else 735 752 #error "Unsupported keymap!" 736 753 #endif
+8
apps/plugins/pong.c
··· 336 336 #define PONG_RIGHT_UP BUTTON_BACK 337 337 #define PONG_RIGHT_DOWN BUTTON_RIGHT 338 338 339 + #elif CONFIG_KEYPAD == RG_NANO_PAD 340 + #define PONG_QUIT BUTTON_START 341 + #define PONG_PAUSE BUTTON_A 342 + #define PONG_LEFT_UP BUTTON_UP 343 + #define PONG_LEFT_DOWN BUTTON_DOWN 344 + #define PONG_RIGHT_UP BUTTON_X 345 + #define PONG_RIGHT_DOWN BUTTON_Y 346 + 339 347 #else 340 348 #error No keymap defined! 341 349 #endif
+9
apps/plugins/reversi/reversi-gui.h
··· 373 373 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_PLAY 374 374 #define REVERSI_BUTTON_MENU BUTTON_MENU 375 375 376 + #elif CONFIG_KEYPAD == RG_NANO_PAD 377 + #define REVERSI_BUTTON_QUIT BUTTON_START 378 + #define REVERSI_BUTTON_UP BUTTON_UP 379 + #define REVERSI_BUTTON_DOWN BUTTON_DOWN 380 + #define REVERSI_BUTTON_LEFT BUTTON_LEFT 381 + #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT 382 + #define REVERSI_BUTTON_MAKE_MOVE BUTTON_A 383 + #define REVERSI_BUTTON_MENU BUTTON_B 384 + 376 385 #else 377 386 #error No keymap defined! 378 387 #endif
+8
apps/plugins/rockboy/rockboy.c
··· 484 484 options.SELECT = (BUTTON_PLAY|BUTTON_MENU); 485 485 options.MENU = BUTTON_MENU; 486 486 487 + #elif CONFIG_KEYPAD == RG_NANO_PAD 488 + options.UP = BUTTON_UP; 489 + options.DOWN = BUTTON_DOWN; 490 + options.A = BUTTON_A; 491 + options.B = BUTTON_B; 492 + options.START = BUTTON_START; 493 + options.SELECT = BUTTON_FN; 494 + options.MENU = BUTTON_X; 487 495 488 496 #else 489 497 #error No Keymap Defined!
+9
apps/plugins/sliding_puzzle.c
··· 369 369 #define PUZZLE_SHUFFLE BUTTON_MENU 370 370 #define PUZZLE_PICTURE BUTTON_PLAY 371 371 372 + #elif CONFIG_KEYPAD == RG_NANO_PAD 373 + #define PUZZLE_QUIT BUTTON_START 374 + #define PUZZLE_LEFT BUTTON_LEFT 375 + #define PUZZLE_RIGHT BUTTON_RIGHT 376 + #define PUZZLE_UP BUTTON_UP 377 + #define PUZZLE_DOWN BUTTON_DOWN 378 + #define PUZZLE_SHUFFLE BUTTON_B 379 + #define PUZZLE_PICTURE BUTTON_A 380 + 372 381 #else 373 382 #error No keymap defined! 374 383 #endif
+8
apps/plugins/snake.c
··· 324 324 #define SNAKE_DOWN BUTTON_DOWN 325 325 #define SNAKE_PLAYPAUSE BUTTON_PLAY 326 326 327 + #elif CONFIG_KEYPAD == RG_NANO_PAD 328 + #define SNAKE_QUIT BUTTON_START 329 + #define SNAKE_LEFT BUTTON_LEFT 330 + #define SNAKE_RIGHT BUTTON_RIGHT 331 + #define SNAKE_UP BUTTON_UP 332 + #define SNAKE_DOWN BUTTON_DOWN 333 + #define SNAKE_PLAYPAUSE BUTTON_A 334 + 327 335 #else 328 336 #error No keymap defined! 329 337 #endif
+9
apps/plugins/snake2.c
··· 470 470 #define SNAKE2_PLAYPAUSE BUTTON_PLAY 471 471 #define SNAKE2_PLAYPAUSE_TEXT "PLAY" 472 472 473 + #elif (CONFIG_KEYPAD == RG_NANO_PAD) 474 + #define SNAKE2_LEFT BUTTON_LEFT 475 + #define SNAKE2_RIGHT BUTTON_RIGHT 476 + #define SNAKE2_UP BUTTON_UP 477 + #define SNAKE2_DOWN BUTTON_DOWN 478 + #define SNAKE2_QUIT BUTTON_START 479 + #define SNAKE2_PLAYPAUSE BUTTON_A 480 + #define SNAKE2_PLAYPAUSE_TEXT "A" 481 + 473 482 #else 474 483 #error No keymap defined! 475 484 #endif
+14
apps/plugins/sokoban.c
··· 714 714 #define BUTTON_SAVE (BUTTON_MENU|BUTTON_BACK) 715 715 #define BUTTON_SAVE_NAME "BACK" 716 716 717 + #elif CONFIG_KEYPAD == RG_NANO_PAD 718 + #define SOKOBAN_LEFT BUTTON_LEFT 719 + #define SOKOBAN_RIGHT BUTTON_RIGHT 720 + #define SOKOBAN_UP BUTTON_UP 721 + #define SOKOBAN_DOWN BUTTON_DOWN 722 + #define SOKOBAN_MENU BUTTON_START 723 + #define SOKOBAN_UNDO BUTTON_B 724 + #define SOKOBAN_REDO BUTTON_Y 725 + #define SOKOBAN_LEVEL_REPEAT BUTTON_R 726 + #define SOKOBAN_QUIT_REPLAY BUTTON_X 727 + #define SOKOBAN_PAUSE BUTTON_L 728 + #define BUTTON_SAVE BUTTON_A 729 + #define BUTTON_SAVE_NAME "A" 730 + 717 731 #else 718 732 #error No keymap defined! 719 733 #endif
+17
apps/plugins/solitaire.c
··· 744 744 #elif CONFIG_KEYPAD == SHANLING_Q1_PAD 745 745 # define SOL_QUIT BUTTON_POWER 746 746 747 + #elif CONFIG_KEYPAD == RG_NANO_PAD 748 + # define SOL_QUIT BUTTON_START 749 + # define SOL_UP BUTTON_UP 750 + # define SOL_DOWN BUTTON_DOWN 751 + # define SOL_LEFT BUTTON_LEFT 752 + # define SOL_RIGHT BUTTON_RIGHT 753 + # define SOL_MOVE BUTTON_A 754 + # define SOL_DRAW BUTTON_X 755 + # define SOL_REM2CUR BUTTON_L 756 + # define SOL_CUR2STACK BUTTON_B 757 + # define SOL_REM2STACK BUTTON_R 758 + # define HK_MOVE "A" 759 + # define HK_DRAW "X" 760 + # define HK_REM2CUR "L" 761 + # define HK_CUR2STACK "B" 762 + # define HK_REM2STACK "R" 763 + 747 764 #elif CONFIG_KEYPAD == MA_PAD 748 765 # define SOL_QUIT (BUTTON_LEFT|BUTTON_REPEAT) 749 766 # define SOL_UP BUTTON_UP
+9
apps/plugins/spacerocks.c
··· 384 384 #define AST_RIGHT BUTTON_RIGHT 385 385 #define AST_FIRE BUTTON_DOWN 386 386 387 + #elif CONFIG_KEYPAD == RG_NANO_PAD 388 + #define AST_PAUSE BUTTON_X 389 + #define AST_QUIT BUTTON_START 390 + #define AST_THRUST BUTTON_UP 391 + #define AST_HYPERSPACE BUTTON_DOWN 392 + #define AST_LEFT BUTTON_LEFT 393 + #define AST_RIGHT BUTTON_RIGHT 394 + #define AST_FIRE BUTTON_A 395 + 387 396 #else 388 397 #error No keymap defined! 389 398 #endif
+16
apps/plugins/star.c
··· 688 688 #define STAR_LEVEL_DOWN_NAME "MENU+DOWN" 689 689 #define STAR_LEVEL_REPEAT_NAME "MENU" 690 690 691 + #elif CONFIG_KEYPAD == RG_NANO_PAD 692 + 693 + #define STAR_QUIT BUTTON_START 694 + #define STAR_LEFT BUTTON_LEFT 695 + #define STAR_RIGHT BUTTON_RIGHT 696 + #define STAR_UP BUTTON_UP 697 + #define STAR_DOWN BUTTON_DOWN 698 + #define STAR_TOGGLE_CONTROL BUTTON_A 699 + #define STAR_LEVEL_UP BUTTON_R 700 + #define STAR_LEVEL_DOWN BUTTON_L 701 + #define STAR_LEVEL_REPEAT BUTTON_B 702 + #define STAR_TOGGLE_CONTROL_NAME "A" 703 + #define STAR_QUIT_NAME "START" 704 + #define STAR_LEVEL_UP_NAME "R" 705 + #define STAR_LEVEL_DOWN_NAME "L" 706 + #define STAR_LEVEL_REPEAT_NAME "B" 691 707 692 708 #else 693 709 #error No keymap defined!
+8
apps/plugins/stopwatch.c
··· 306 306 #define STOPWATCH_SCROLL_UP BUTTON_UP 307 307 #define STOPWATCH_SCROLL_DOWN BUTTON_DOWN 308 308 309 + #elif CONFIG_KEYPAD == RG_NANO_PAD 310 + #define STOPWATCH_QUIT BUTTON_START 311 + #define STOPWATCH_START_STOP BUTTON_A 312 + #define STOPWATCH_RESET_TIMER BUTTON_X 313 + #define STOPWATCH_LAP_TIMER BUTTON_Y 314 + #define STOPWATCH_SCROLL_UP BUTTON_UP 315 + #define STOPWATCH_SCROLL_DOWN BUTTON_DOWN 316 + 309 317 #else 310 318 #error No keymap defined! 311 319 #endif
+12
apps/plugins/text_viewer/tv_button.h
··· 587 587 #define TV_LINE_DOWN BUTTON_DOWN 588 588 #define TV_BOOKMARK (BUTTON_MENU|BUTTON_PLAY) 589 589 590 + #elif CONFIG_KEYPAD == RG_NANO_PAD 591 + #define TV_QUIT BUTTON_START 592 + #define TV_SCROLL_UP BUTTON_UP 593 + #define TV_SCROLL_DOWN BUTTON_DOWN 594 + #define TV_SCREEN_LEFT BUTTON_LEFT 595 + #define TV_SCREEN_RIGHT BUTTON_RIGHT 596 + #define TV_MENU BUTTON_B 597 + #define TV_AUTOSCROLL BUTTON_X 598 + #define TV_LINE_UP BUTTON_R 599 + #define TV_LINE_DOWN BUTTON_L 600 + #define TV_BOOKMARK BUTTON_A 601 + 590 602 #else 591 603 #error No keymap defined! 592 604 #endif
+11
apps/plugins/vu_meter.c
··· 468 468 #define LABEL_MENU "MENU" 469 469 #define LABEL_VOLUME "UP/DOWN" 470 470 471 + #elif CONFIG_KEYPAD == RG_NANO_PAD 472 + #define VUMETER_QUIT BUTTON_START 473 + #define VUMETER_HELP BUTTON_A 474 + #define VUMETER_MENU BUTTON_B 475 + #define VUMETER_UP BUTTON_UP 476 + #define VUMETER_DOWN BUTTON_DOWN 477 + #define LABEL_HELP "A" 478 + #define LABEL_QUIT "START" 479 + #define LABEL_MENU "B" 480 + #define LABEL_VOLUME "UP/DOWN" 481 + 471 482 #else 472 483 #error No keymap defined! 473 484 #endif
+9
apps/plugins/xobox.c
··· 363 363 #elif CONFIG_KEYPAD == SHANLING_Q1_PAD 364 364 /* use touchscreen */ 365 365 366 + #elif CONFIG_KEYPAD == RG_NANO_PAD 367 + 368 + #define QUIT BUTTON_START 369 + #define LEFT BUTTON_LEFT 370 + #define RIGHT BUTTON_RIGHT 371 + #define UP BUTTON_UP 372 + #define DOWN BUTTON_DOWN 373 + #define PAUSE BUTTON_A 374 + 366 375 #else 367 376 #error "No keymap defined!" 368 377 #endif
+8
apps/plugins/zxbox/keymaps.h
··· 301 301 #define ZX_UP BUTTON_UP 302 302 #define ZX_DOWN BUTTON_DOWN 303 303 304 + #elif CONFIG_KEYPAD == RG_NANO_PAD 305 + #define ZX_UP BUTTON_UP 306 + #define ZX_DOWN BUTTON_DOWN 307 + #define ZX_LEFT BUTTON_LEFT 308 + #define ZX_RIGHT BUTTON_RIGHT 309 + #define ZX_SELECT BUTTON_A 310 + #define ZX_MENU BUTTON_START 311 + 304 312 #else 305 313 #error Keymap not defined! 306 314
+9
apps/plugins/zxbox/zxbox_keyb.c
··· 291 291 #define KBD_UP BUTTON_UP 292 292 #define KBD_DOWN BUTTON_DOWN 293 293 294 + #elif CONFIG_KEYPAD == RG_NANO_PAD 295 + 296 + #define KBD_SELECT BUTTON_A 297 + #define KBD_ABORT BUTTON_B 298 + #define KBD_LEFT BUTTON_LEFT 299 + #define KBD_RIGHT BUTTON_RIGHT 300 + #define KBD_UP BUTTON_UP 301 + #define KBD_DOWN BUTTON_DOWN 302 + 294 303 #endif 295 304 296 305 #ifdef HAVE_TOUCHSCREEN
backdrops/cabbiev2.240x240x16.bmp

This is a binary file and will not be displayed.

+1
docs/CREDITS
··· 741 741 Wilton Millfjord 742 742 Pavlo Rudy 743 743 Yannic Schmidt 744 + Hairo R. Carela 744 745 745 746 The libmad team 746 747 The wavpack team
+13
firmware/SOURCES
··· 74 74 target/hosted/sdl/lcd-remote-bitmap.c 75 75 #endif 76 76 target/hosted/sdl/lcd-sdl.c 77 + #if SDL_MAJOR_VERSION > 1 77 78 target/hosted/sdl/window-sdl.c 79 + #endif 78 80 target/hosted/sdl/system-sdl.c 79 81 #ifdef HAVE_SDL_THREADS 80 82 target/hosted/sdl/filesystem-sdl.c ··· 86 88 #endif 87 89 #ifdef APPLICATION 88 90 target/hosted/sdl/app/load_code-sdl-app.c 91 + #ifndef RG_NANO 89 92 target/hosted/sdl/app/button-application.c 93 + #endif 90 94 #ifdef WIN32 91 95 target/hosted/filesystem-win32.c 92 96 #else /* !WIN32 */ ··· 221 225 #if (CONFIG_PLATFORM & PLATFORM_MAEMO) 222 226 target/hosted/maemo/maemo-thread.c 223 227 #endif 228 + 229 + #ifdef RG_NANO 230 + target/hosted/sysfs.c 231 + target/hosted/power-linux.c 232 + target/hosted/backlight-unix.c 233 + target/hosted/anbernic/power-rgnano.c 234 + target/hosted/anbernic/button-rgnano.c 235 + target/hosted/anbernic/powermgmt-rgnano.c 236 + #endif /* RG_NANO */ 224 237 225 238 /* Common */ 226 239 #ifndef BOOTLOADER
+1 -1
firmware/drivers/button.c
··· 33 33 #include "serial.h" 34 34 #include "power.h" 35 35 #include "powermgmt.h" 36 - #ifdef HAVE_SDL 36 + #if defined(HAVE_SDL) && (SDL_MAJOR_VERSION > 1) 37 37 #include "button-sdl.h" 38 38 #else 39 39 #include "button-target.h"
+3 -1
firmware/drivers/button_queue.c
··· 24 24 #include "button.h" 25 25 #ifdef HAVE_SDL 26 26 #include "SDL.h" 27 + #if SDL_MAJOR_VERSION > 1 27 28 #include "window-sdl.h" 29 + #endif 28 30 #endif 29 31 30 32 static struct event_queue button_queue SHAREDBSS_ATTR; ··· 118 120 } 119 121 #else 120 122 queue_wait_w_tmo(&button_queue, evp, timeout); 121 - #ifdef HAVE_SDL 123 + #if defined(HAVE_SDL) && (SDL_MAJOR_VERSION > 1) 122 124 sdl_window_adjust(); /* Window may have been resized */ 123 125 #endif 124 126 #endif
+2 -2
firmware/export/audiohw.h
··· 223 223 #include "es9018.h" 224 224 #elif defined(HAVE_ES9218) 225 225 #include "es9218.h" 226 - #elif (CONFIG_PLATFORM & (PLATFORM_ANDROID | PLATFORM_MAEMO \ 227 - | PLATFORM_PANDORA | PLATFORM_SDL)) 226 + #elif ((CONFIG_PLATFORM & (PLATFORM_ANDROID | PLATFORM_MAEMO \ 227 + | PLATFORM_PANDORA | PLATFORM_SDL )) | defined(RG_NANO)) 228 228 #include "hosted_codec.h" 229 229 #elif defined(DX50) 230 230 #include "codec-dx50.h"
+3
firmware/export/config.h
··· 166 166 #define SHANLING_Q1_PAD 74 167 167 #define ECHO_R1_PAD 75 168 168 #define SURFANS_F28_PAD 76 169 + #define RG_NANO_PAD 77 169 170 170 171 /* CONFIG_REMOTE_KEYPAD */ 171 172 #define H100_REMOTE 1 ··· 619 620 #include "config/echor1.h" 620 621 #elif defined(SURFANS_F28) 621 622 #include "config/surfansf28.h" 623 + #elif defined(RG_NANO) 624 + #include "config/rgnano.h" 622 625 #else 623 626 //#error "unknown hwardware platform!" 624 627 #endif
+97
firmware/export/config/rgnano.h
··· 1 + /* 2 + * This config file is for the Anbernic RG Nano 3 + */ 4 + 5 + /* We don't run on hardware directly */ 6 + #define CONFIG_PLATFORM (PLATFORM_HOSTED) 7 + #define PIVOT_ROOT "/mnt" 8 + #define HAVE_FPU 9 + 10 + /* For Rolo and boot loader */ 11 + #define MODEL_NUMBER 100 12 + 13 + #define MODEL_NAME "RG Nano" 14 + 15 + #define USB_NONE 16 + 17 + /* define this if you have a colour LCD */ 18 + #define HAVE_LCD_COLOR 19 + 20 + /* define this if you want album art for this target */ 21 + #define HAVE_ALBUMART 22 + 23 + /* define this to enable bitmap scaling */ 24 + #define HAVE_BMP_SCALING 25 + 26 + /* define this to enable JPEG decoding */ 27 + #define HAVE_JPEG 28 + 29 + /* define this if you have access to the quickscreen */ 30 + #define HAVE_QUICKSCREEN 31 + 32 + /* define this if you would like tagcache to build on this target */ 33 + #define HAVE_TAGCACHE 34 + 35 + /* LCD dimensions */ 36 + #define LCD_WIDTH 240 37 + #define LCD_HEIGHT 240 38 + #define LCD_DEPTH 24 39 + #define LCD_PIXELFORMAT RGB888 40 + 41 + /* define this to indicate your device's keypad */ 42 + #define HAVE_BUTTON_DATA 43 + #define HAS_BUTTON_HOLD 44 + #define HAVE_VOLUME_IN_LIST 45 + 46 + /* define this if you have a real-time clock */ 47 + #define CONFIG_RTC APPLICATION 48 + 49 + /* The number of bytes reserved for loadable codecs */ 50 + #define CODEC_SIZE 0x400000 51 + 52 + /* The number of bytes reserved for loadable plugins */ 53 + #define PLUGIN_BUFFER_SIZE 0x800000 54 + 55 + #define AB_REPEAT_ENABLE 56 + 57 + /* Battery stuff */ 58 + #define CONFIG_BATTERY_MEASURE PERCENTAGE_MEASURE 59 + #define CONFIG_CHARGING CHARGING_MONITOR 60 + #define HAVE_POWEROFF_WHILE_CHARGING 61 + #define BATTERY_DEV_NAME "axp20x-battery" 62 + #define POWER_DEV_NAME "axp20x-usb" 63 + 64 + /* Define this for LCD backlight available */ 65 + #define BACKLIGHT_RG_NANO 66 + #define HAVE_BACKLIGHT 67 + #define HAVE_BACKLIGHT_BRIGHTNESS 68 + #define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING 69 + 70 + /* Main LCD backlight brightness range and defaults */ 71 + #define MIN_BRIGHTNESS_SETTING 0 72 + #define MAX_BRIGHTNESS_SETTING 11 73 + #define DEFAULT_BRIGHTNESS_SETTING 4 74 + 75 + #define CONFIG_KEYPAD RG_NANO_PAD 76 + 77 + /* Use SDL audio/pcm in a SDL app build */ 78 + #define HAVE_SDL 79 + #define HAVE_SDL_AUDIO 80 + 81 + #define HAVE_SW_TONE_CONTROLS 82 + 83 + /* Define this to the CPU frequency */ 84 + /* 85 + #define CPU_FREQ 48000000 86 + */ 87 + 88 + #define CONFIG_LCD LCD_COWOND2 89 + 90 + /* Define this if a programmable hotkey is mapped */ 91 + #define HAVE_HOTKEY 92 + 93 + #define BOOTDIR "/.rockbox" 94 + 95 + /* No special storage */ 96 + #define CONFIG_STORAGE STORAGE_HOSTFS 97 + #define HAVE_STORAGE_FLUSH
+6
firmware/export/rbpaths.h
··· 57 57 #define REC_BASE_DIR HOME_DIR "Recordings" 58 58 #define PLAYLIST_CATALOG_DEFAULT_DIR HOME_DIR "Playlists" 59 59 60 + #elif RG_NANO 61 + #define HOME_DIR ROCKBOX_DIR 62 + #define PLUGIN_DIR ROCKBOX_DIR "/rocks" 63 + #define CODECS_DIR ROCKBOX_DIR "/codecs" 64 + #define REC_BASE_DIR ROCKBOX_DIR "/Recordings" 65 + #define PLAYLIST_CATALOG_DEFAULT_DIR ROCKBOX_DIR "/Playlists" 60 66 #else /* APPLICATION */ 61 67 62 68 #define HOME_DIR "<HOME>" /* replaced at runtime */
firmware/target/hosted/anbernic/adc-target.h

This is a binary file and will not be displayed.

+39
firmware/target/hosted/anbernic/backlight-target.h
··· 1 + /*************************************************************************** 2 + * __________ __ ___ 3 + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 + * \/ \/ \/ \/ \/ 8 + * 9 + * Copyright (C) 2014 by Ilia Sergachev: Initial Rockbox port to iBasso DX50 10 + * Copyright (C) 2014 by Mario Basister: iBasso DX90 port 11 + * Copyright (C) 2014 by Simon Rothen: Initial Rockbox repository submission, additional features 12 + * Copyright (C) 2014 by Udo Schläpfer: Code clean up, additional features 13 + * 14 + * This program is free software; you can redistribute it and/or 15 + * modify it under the terms of the GNU General Public License 16 + * as published by the Free Software Foundation; either version 2 17 + * of the License, or (at your option) any later version. 18 + * 19 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 20 + * KIND, either express or implied. 21 + * 22 + ****************************************************************************/ 23 + 24 + 25 + #ifndef _BACKLIGHT_TARGET_H_ 26 + #define _BACKLIGHT_TARGET_H_ 27 + 28 + 29 + #include <stdbool.h> 30 + 31 + 32 + /* See backlight.c */ 33 + bool backlight_hw_init(void); 34 + void backlight_hw_on(void); 35 + void backlight_hw_off(void); 36 + void backlight_hw_brightness(int brightness); 37 + 38 + 39 + #endif
+73
firmware/target/hosted/anbernic/button-rgnano.c
··· 1 + /*************************************************************************** 2 + * __________ __ ___. 3 + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 + * \/ \/ \/ \/ \/ 8 + * $Id$ 9 + * 10 + * Copyright (C) 2025 Hairo R. Carela 11 + * 12 + * This program is free software; you can redistribute it and/or 13 + * modify it under the terms of the GNU General Public License 14 + * as published by the Free Software Foundation; either version 2 15 + * of the License, or (at your option) any later version. 16 + * 17 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 + * KIND, either express or implied. 19 + * 20 + ***************************************************9*************************/ 21 + 22 + 23 + #include <stdio.h> 24 + #include <SDL.h> 25 + #include "button.h" 26 + #include "button-target.h" 27 + 28 + int key_to_button(int keyboard_key) 29 + { 30 + int new_btn = BUTTON_NONE; 31 + switch (keyboard_key) 32 + { 33 + case SDLK_s: 34 + new_btn = BUTTON_START; 35 + break; 36 + case SDLK_k: 37 + new_btn = BUTTON_FN; 38 + break; 39 + case SDLK_a: 40 + new_btn = BUTTON_A; 41 + break; 42 + case SDLK_b: 43 + new_btn = BUTTON_B; 44 + break; 45 + case SDLK_x: 46 + new_btn = BUTTON_X; 47 + break; 48 + case SDLK_y: 49 + new_btn = BUTTON_Y; 50 + break; 51 + case SDLK_m: 52 + new_btn = BUTTON_L; 53 + break; 54 + case SDLK_n: 55 + new_btn = BUTTON_R; 56 + break; 57 + case SDLK_u: 58 + new_btn = BUTTON_UP; 59 + break; 60 + case SDLK_d: 61 + new_btn = BUTTON_DOWN; 62 + break; 63 + case SDLK_l: 64 + new_btn = BUTTON_LEFT; 65 + break; 66 + case SDLK_r: 67 + new_btn = BUTTON_RIGHT; 68 + break; 69 + default: 70 + break; 71 + } 72 + return new_btn; 73 + }
+47
firmware/target/hosted/anbernic/button-target.h
··· 1 + /*************************************************************************** 2 + * __________ __ ___. 3 + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 + * \/ \/ \/ \/ \/ 8 + * $Id$ 9 + * 10 + * Copyright (C) 2025 Hairo R. Carela 11 + * 12 + * This program is free software; you can redistribute it and/or 13 + * modify it under the terms of the GNU General Public License 14 + * as published by the Free Software Foundation; either version 2 15 + * of the License, or (at your option) any later version. 16 + * 17 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 + * KIND, either express or implied. 19 + * 20 + ****************************************************************************/ 21 + 22 + #ifndef _BUTTON_TARGET_H_ 23 + #define _BUTTON_TARGET_H_ 24 + 25 + /* Main unit's buttons */ 26 + #define BUTTON_START 0x00000001 27 + #define BUTTON_FN 0x00000002 28 + #define BUTTON_A 0x00000004 29 + #define BUTTON_B 0x00000008 30 + #define BUTTON_X 0x00000010 31 + #define BUTTON_Y 0x00000020 32 + #define BUTTON_L 0x00000040 33 + #define BUTTON_R 0x00000080 34 + #define BUTTON_UP 0x00000100 35 + #define BUTTON_DOWN 0x00000200 36 + #define BUTTON_LEFT 0x00000400 37 + #define BUTTON_RIGHT 0x00000800 38 + 39 + #define BUTTON_MAIN 0x1FFF 40 + 41 + /* Software power-off */ 42 + #define POWEROFF_BUTTON BUTTON_POWER 43 + #define POWEROFF_COUNT 10 44 + 45 + int key_to_button(int keyboard_key); 46 + 47 + #endif /* _BUTTON_TARGET_H_ */
+41
firmware/target/hosted/anbernic/power-rgnano.c
··· 1 + /*************************************************************************** 2 + * __________ __ ___. 3 + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 + * \/ \/ \/ \/ \/ 8 + * 9 + * Copyright (C) 2025 Hairo R. Carela 10 + * 11 + * This program is free software; you can redistribute it and/or 12 + * modify it under the terms of the GNU General Public License 13 + * as published by the Free Software Foundation; either version 2 14 + * of the License, or (at your option) any later version. 15 + * 16 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 17 + * KIND, either express or implied. 18 + * 19 + ****************************************************************************/ 20 + #include <sys/types.h> 21 + #include <fcntl.h> 22 + #include <string.h> 23 + #include <unistd.h> 24 + #include <stdio.h> 25 + 26 + #include "system.h" 27 + #include "power-rgnano.h" 28 + #include "power.h" 29 + #include "panic.h" 30 + #include "sysfs.h" 31 + 32 + const char * const sysfs_bat_level = 33 + "/sys/class/power_supply/axp20x-battery/capacity"; 34 + 35 + unsigned int rgnano_power_get_battery_capacity(void) 36 + { 37 + int battery_level; 38 + sysfs_get_int(sysfs_bat_level, &battery_level); 39 + 40 + return battery_level; 41 + }
+27
firmware/target/hosted/anbernic/power-rgnano.h
··· 1 + /*************************************************************************** 2 + * __________ __ ___. 3 + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 + * \/ \/ \/ \/ \/ 8 + * 9 + * Copyright (C) 2025 Hairo R. Carela 10 + * 11 + * This program is free software; you can redistribute it and/or 12 + * modify it under the terms of the GNU General Public License 13 + * as published by the Free Software Foundation; either version 2 14 + * of the License, or (at your option) any later version. 15 + * 16 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 17 + * KIND, either express or implied. 18 + * 19 + ****************************************************************************/ 20 + #ifndef _POWER_RGNANO_H_ 21 + #define _POWER_RGNANO_H_ 22 + 23 + #include <stdbool.h> 24 + #include "config.h" 25 + 26 + unsigned int rgnano_power_get_battery_capacity(void); 27 + #endif /* _POWER_RGNANO_H_ */
+28
firmware/target/hosted/anbernic/powermgmt-rgnano.c
··· 1 + /*************************************************************************** 2 + * __________ __ ___. 3 + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 + * \/ \/ \/ \/ \/ 8 + * $Id$ 9 + * 10 + * Copyright (C) 2025 Hairo R. Carela 11 + * 12 + * This program is free software; you can redistribute it and/or 13 + * modify it under the terms of the GNU General Public License 14 + * as published by the Free Software Foundation; either version 2 15 + * of the License, or (at your option) any later version. 16 + * 17 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 + * KIND, either express or implied. 19 + * 20 + ****************************************************************************/ 21 + #include "powermgmt.h" 22 + #include "power.h" 23 + #include "power-rgnano.h" 24 + 25 + int _battery_level(void) 26 + { 27 + return rgnano_power_get_battery_capacity(); 28 + }
+7
firmware/target/hosted/anbernic/system-target.h
··· 1 + #ifndef __SYSTEM_TARGET_H__ 2 + #define __SYSTEM_TARGET_H__ 3 + 4 + #include "../sdl/system-sdl.h" 5 + 6 + #define NEED_GENERIC_BYTESWAPS 7 + #endif /* __SYSTEM_TARGET_H__ */
+8
firmware/target/hosted/backlight-unix.c
··· 31 31 #include "panic.h" 32 32 #include "lcd.h" 33 33 34 + #ifdef BACKLIGHT_RG_NANO 35 + static const char * const sysfs_bl_brightness = 36 + "/sys/class/backlight/backlight/brightness"; 37 + 38 + static const char * const sysfs_bl_power = 39 + "/sys/class/backlight/backlight/bl_power"; 40 + #else 34 41 static const char * const sysfs_bl_brightness = 35 42 "/sys/class/backlight/pwm-backlight.0/brightness"; 36 43 37 44 static const char * const sysfs_bl_power = 38 45 "/sys/class/backlight/pwm-backlight.0/bl_power"; 46 + #endif 39 47 40 48 bool backlight_hw_init(void) 41 49 {
+4
firmware/target/hosted/filesystem-app.h
··· 49 49 #endif /* _FILESYSTEM_APP_H_ */ 50 50 51 51 #ifdef HAVE_SDL 52 + #ifdef RG_NANO 53 + #include "../sdl/filesystem-sdl.h" 54 + #else 52 55 #include "filesystem-sdl.h" 56 + #endif /* RG_NANO */ 53 57 #endif /* HAVE_SDL */ 54 58 #ifdef WIN32 55 59 #include "filesystem-win32.h"
+13 -1
firmware/target/hosted/sdl/button-sdl.c
··· 32 32 #include "backlight.h" 33 33 #include "system.h" 34 34 #include "button-sdl.h" 35 + #if SDL_MAJOR_VERSION > 1 35 36 #include "window-sdl.h" 37 + #endif 36 38 #include "sim_tasks.h" 37 39 #include "buttonmap.h" 38 40 #include "debug.h" ··· 241 243 242 244 static bool event_handler(SDL_Event *event) 243 245 { 246 + #if SDL_MAJOR_VERSION > 1 244 247 SDL_Keycode ev_key; 248 + #else 249 + SDLKey ev_key; 250 + #endif 245 251 246 252 switch(event->type) 247 253 { 254 + #if SDL_MAJOR_VERSION > 1 248 255 case SDL_WINDOWEVENT: 249 256 if (event->window.event == SDL_WINDOWEVENT_FOCUS_GAINED) 250 257 sdl_app_has_input_focus = 1; ··· 263 270 last_tick = current_tick; 264 271 #endif 265 272 } 273 + #endif /* SDL_MAJOR_VERSION */ 266 274 #ifdef SIMULATOR 267 275 if (event->window.event == SDL_WINDOWEVENT_FOCUS_LOST 268 276 || event->window.event == SDL_WINDOWEVENT_LEAVE ··· 578 586 return; 579 587 #endif 580 588 #endif 581 - #if (CONFIG_PLATFORM & PLATFORM_PANDORA) 589 + #if (CONFIG_PLATFORM & PLATFORM_PANDORA) || defined(RG_NANO) 590 + #ifdef RG_NANO 591 + case SDLK_q: 592 + #else 582 593 case SDLK_LCTRL: 594 + #endif 583 595 /* Will post SDL_USEREVENT in shutdown_hw() if successful. */ 584 596 sys_poweroff(); 585 597 break;
+3 -1
firmware/target/hosted/sdl/lcd-bitmap.c
··· 142 142 background ? UI_LCD_POSX : 0, background? UI_LCD_POSY : 0); 143 143 } 144 144 145 - #ifdef HAVE_BACKLIGHT 145 + #if defined(HAVE_BACKLIGHT) && (SDL_MAJOR_VERSION > 1) 146 146 void sim_backlight(int value) 147 147 { 148 148 #if LCD_DEPTH <= 8 ··· 185 185 #if LCD_DEPTH >= 16 186 186 lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE, SIM_LCD_WIDTH, SIM_LCD_HEIGHT, 187 187 LCD_DEPTH, 0, 0, 0, 0); 188 + #if SDL_MAJOR_VERSION > 1 188 189 SDL_SetSurfaceBlendMode(lcd_surface, SDL_BLENDMODE_BLEND); 190 + #endif 189 191 #elif LCD_DEPTH <= 8 190 192 lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE, SIM_LCD_WIDTH, SIM_LCD_HEIGHT, 191 193 8, 0, 0, 0, 0);
+16
firmware/target/hosted/sdl/lcd-sdl.c
··· 23 23 #include "lcd-sdl.h" 24 24 #include "sim-ui-defines.h" 25 25 #include "system.h" /* for MIN() and MAX() */ 26 + #if SDL_MAJOR_VERSION > 1 26 27 #include "window-sdl.h" 28 + #endif 27 29 28 30 void sdl_update_rect(SDL_Surface *surface, int x_start, int y_start, int width, 29 31 int height, int max_x, int max_y, ··· 101 103 SDL_Rect src = {x_start, y_start, width, height}; 102 104 SDL_Rect dest= {ui_x + x_start, ui_y + y_start, width, height}; 103 105 106 + 107 + #if SDL_MAJOR_VERSION > 1 104 108 uint8_t alpha; 105 109 106 110 SDL_LockMutex(window_mutex); ··· 115 119 if (!sdl_window_adjust()) /* already calls sdl_window_render itself */ 116 120 sdl_window_render(); 117 121 SDL_UnlockMutex(window_mutex); 122 + #else 123 + if (surface->flags & SDL_SRCALPHA) /* alpha needs a black background */ 124 + SDL_FillRect(gui_surface, &dest, 0); 125 + 126 + SDL_BlitSurface(surface, &src, gui_surface, &dest); 127 + 128 + SDL_Flip(gui_surface); 129 + #endif 118 130 } 119 131 120 132 /* set a range of bitmap indices to a gradient from startcolour to endcolour */ ··· 130 142 palette[i].b = start->b + (end->b - start->b) * i / (steps - 1); 131 143 } 132 144 145 + #if SDL_MAJOR_VERSION > 1 133 146 SDL_SetPaletteColors(surface->format->palette, palette, first , steps); 147 + #else 148 + SDL_SetPalette(surface, SDL_LOGPAL|SDL_PHYSPAL, palette, first, steps); 149 + #endif 134 150 } 135 151 136 152 int lcd_get_dpi(void)
+4
firmware/target/hosted/sdl/lcd-sdl.h
··· 25 25 #include "lcd.h" 26 26 #include "SDL.h" 27 27 28 + #if SDL_MAJOR_VERSION == 1 29 + extern SDL_Surface *gui_surface; 30 + #endif 31 + 28 32 void sdl_update_rect(SDL_Surface *surface, int x_start, int y_start, int width, 29 33 int height, int max_x, int max_y, 30 34 unsigned long (*getpixel)(int, int));
+21
firmware/target/hosted/sdl/pcm-sdl.c
··· 61 61 static size_t pcm_data_size; 62 62 static size_t pcm_sample_bytes; 63 63 static size_t pcm_channel_bytes; 64 + #if SDL_MAJOR_VERSION > 1 64 65 static SDL_AudioDeviceID pcm_devid = 0; 66 + #endif 65 67 66 68 static struct pcm_udata 67 69 { ··· 104 106 wanted_spec.samples = MIX_FRAME_SAMPLES * 2; /* Should be 2048, ie ~5ms @44KHz */ 105 107 wanted_spec.callback = sdl_audio_callback; 106 108 wanted_spec.userdata = &udata; 109 + 110 + #if SDL_MAJOR_VERSION > 1 107 111 if (pcm_devid) 108 112 SDL_CloseAudioDevice(pcm_devid); 109 113 110 114 /* pulseaudio seems to be happier with smaller buffers */ 111 115 if (!strcmp("pulseaudio", SDL_GetCurrentAudioDriver())) 112 116 wanted_spec.samples = MIX_FRAME_SAMPLES; 117 + #endif 113 118 114 119 /* Open the audio device and start playing sound! */ 120 + #if SDL_MAJOR_VERSION > 1 115 121 if((pcm_devid = SDL_OpenAudioDevice(audiodev, 0, &wanted_spec, &obtained, SDL_AUDIO_ALLOW_SAMPLES_CHANGE)) == 0) { 122 + #else 123 + if(SDL_OpenAudio(&wanted_spec, &obtained) < 0) { 124 + #endif 116 125 panicf("Unable to open audio: %s", SDL_GetError()); 117 126 return; 118 127 } 128 + 119 129 switch (obtained.format) 120 130 { 121 131 case AUDIO_U8: ··· 128 138 case AUDIO_S16MSB: 129 139 pcm_channel_bytes = 2; 130 140 break; 141 + #if SDL_MAJOR_VERSION > 1 /* Not supported by SDL 1.2 */ 131 142 case AUDIO_S32MSB: 132 143 case AUDIO_S32LSB: 133 144 case AUDIO_F32MSB: 134 145 case AUDIO_F32LSB: 135 146 pcm_channel_bytes = 4; 136 147 break; 148 + #endif 137 149 default: 138 150 panicf("Unknown sample format obtained: %u", 139 151 (unsigned)obtained.format); ··· 161 173 pcm_data = addr; 162 174 pcm_data_size = size; 163 175 176 + #if SDL_MAJOR_VERSION > 1 164 177 SDL_PauseAudioDevice(pcm_devid, 0); 178 + #else 179 + SDL_PauseAudio(0); 180 + #endif 165 181 } 166 182 167 183 void pcm_play_dma_stop(void) 168 184 { 185 + #if SDL_MAJOR_VERSION > 1 169 186 SDL_PauseAudioDevice(pcm_devid, 1); 187 + #else 188 + SDL_PauseAudio(1); 189 + #endif 190 + 170 191 #ifdef DEBUG 171 192 if (udata.debug != NULL) { 172 193 fclose(udata.debug);
+45 -2
firmware/target/hosted/sdl/system-sdl.c
··· 33 33 #include "thread-sdl.h" 34 34 #include "system-sdl.h" 35 35 #include "sim-ui-defines.h" 36 + #if SDL_MAJOR_VERSION > 1 36 37 #include "window-sdl.h" 38 + #endif 37 39 #include "button-sdl.h" 38 40 #include "lcd-bitmap.h" 39 41 #ifdef HAVE_REMOTE_LCD ··· 49 51 #endif 50 52 51 53 #define SIMULATOR_DEFAULT_ROOT "simdisk" 54 + 55 + #if SDL_MAJOR_VERSION == 1 56 + SDL_Surface *gui_surface; 57 + #endif 52 58 53 59 bool background = true; /* use backgrounds by default */ 54 60 #ifdef HAVE_REMOTE_LCD ··· 92 98 SDL_sem *wait_for_maemo_startup; 93 99 #endif 94 100 95 - #if (CONFIG_PLATFORM & (PLATFORM_MAEMO|PLATFORM_PANDORA)) 101 + #if (CONFIG_PLATFORM & (PLATFORM_MAEMO|PLATFORM_PANDORA)) || defined(RG_NANO) 96 102 /* SDL touch screen fix: Work around a SDL assumption that returns 97 103 relative mouse coordinates when you get to the screen edges 98 104 using the touchscreen and a disabled mouse cursor. ··· 112 118 SDL_DestroySemaphore(wait_for_maemo_startup); 113 119 #endif 114 120 121 + #if SDL_MAJOR_VERSION == 1 122 + SDL_InitSubSystem(SDL_INIT_VIDEO); 123 + 124 + SDL_Surface *picture_surface = NULL; 125 + int depth; 126 + Uint32 flags; 127 + 128 + depth = LCD_DEPTH; 129 + if (depth < 8) 130 + depth = 16; 131 + 132 + flags = SDL_HWSURFACE|SDL_DOUBLEBUF|SDL_FULLSCREEN; 133 + 134 + if ((gui_surface = SDL_SetVideoMode(LCD_WIDTH, LCD_HEIGHT, depth, flags)) == NULL) { 135 + panicf("%s", SDL_GetError()); 136 + } 137 + 138 + if (background && picture_surface != NULL) 139 + SDL_BlitSurface(picture_surface, NULL, gui_surface, NULL); 140 + #endif 141 + 115 142 /* let system_init proceed */ 116 143 SDL_SemPost((SDL_sem *)param); 117 144 ··· 189 216 #endif 190 217 191 218 sim_kernel_shutdown(); 219 + 220 + #if SDL_MAJOR_VERSION > 1 192 221 SDL_UnlockMutex(window_mutex); 193 222 SDL_DestroyMutex(window_mutex); 223 + #endif 194 224 195 225 SDL_Quit(); 196 226 exit(EXIT_SUCCESS); ··· 228 258 229 259 #ifndef __WIN32 /* Fails on Windows */ 230 260 SDL_InitSubSystem(SDL_INIT_VIDEO); 261 + 262 + #if SDL_MAJOR_VERSION > 1 231 263 sdl_window_setup(); 232 264 #endif 265 + #endif 233 266 234 267 #ifndef __APPLE__ /* MacOS requires events to be handled on main thread */ 235 268 s = SDL_CreateSemaphore(0); /* 0-count so it blocks */ 236 - evt_thread = SDL_CreateThread(sdl_event_thread, NULL, s); 269 + 270 + #if SDL_MAJOR_VERSION > 1 271 + evt_thread = SDL_CreateThread(sdl_event_thread, NULL, s); 272 + #else 273 + evt_thread = SDL_CreateThread(sdl_event_thread, s); 274 + #endif /* SDL_MAJOR_VERSION */ 275 + 237 276 SDL_SemWait(s); 238 277 /* cleanup */ 239 278 SDL_DestroySemaphore(s); ··· 311 350 printf("Disabling remote image.\n"); 312 351 } 313 352 #endif 353 + #if SDL_MAJOR_VERSION > 1 314 354 else if (!strcmp("--zoom", argv[x])) 315 355 { 316 356 x++; ··· 320 360 display_zoom = 2; 321 361 printf("Window zoom is %f\n", display_zoom); 322 362 } 363 + #endif 323 364 else if (!strcmp("--alarm", argv[x])) 324 365 { 325 366 sim_alarm_wakeup = true; ··· 374 415 } 375 416 } 376 417 } 418 + #if SDL_MAJOR_VERSION > 1 377 419 if (display_zoom != 1) { 378 420 background = false; 379 421 } 422 + #endif 380 423 }
+5
firmware/target/hosted/sdl/thread-sdl.c
··· 340 340 return 0; 341 341 } 342 342 343 + #if SDL_MAJOR_VERSION > 1 343 344 SDL_Thread *t = SDL_CreateThread(runthread, NULL, thread); 345 + #else 346 + SDL_Thread *t = SDL_CreateThread(runthread, thread); 347 + #endif 348 + 344 349 if (t == NULL) 345 350 { 346 351 DEBUGF("Failed to create SDL thread\n");
+7
packaging/rgnano/config.cfg
··· 1 + # .cfg file created by rockbox c145f41658-250621 - http://www.rockbox.org 2 + 3 + idle poweroff: 0 4 + font: /FunKey/rockbox/fonts/16-WenQangYi-Unibit.fnt 5 + database scan paths: /Music 6 + qs top: brightness 7 + qs bottom: brightness
packaging/rgnano/icon.png

This is a binary file and will not be displayed.

+5
packaging/rgnano/mapping.key
··· 1 + UNMAP FN+Y 2 + UNMAP FN+A 3 + UNMAP FN+B 4 + UNMAP FN+X 5 + MAP START+FN TO KEY KEY_H
+40
packaging/rgnano/rgnano.make
··· 1 + RG_NANO_DIR=$(ROOTDIR)/packaging/rgnano 2 + MKSQUASHFS=$(dir $(CPP))mksquashfs 3 + INSTALL_DIR=$(OPK_BUILD_DIR)/install 4 + OPK_BUILD_DIR=opkdir 5 + 6 + opkdir: 7 + mkdir $(OPK_BUILD_DIR) 8 + 9 + opkclean: 10 + rm -rf $(OPK_BUILD_DIR) 11 + 12 + opk: opkclean opkdir $(MKSQUASHFS) build 13 + make PREFIX=$(OPK_BUILD_DIR)/rockbox fullinstall 14 + 15 + # Install opk files 16 + cp $(RG_NANO_DIR)/icon.png $(OPK_BUILD_DIR) 17 + cp $(RG_NANO_DIR)/mapping.key $(OPK_BUILD_DIR) 18 + cp $(RG_NANO_DIR)/rockbox.funkey-s.desktop $(OPK_BUILD_DIR) 19 + cp $(RG_NANO_DIR)/config.cfg $(OPK_BUILD_DIR) 20 + cp $(RG_NANO_DIR)/run.sh $(OPK_BUILD_DIR) 21 + 22 + # Organize files 23 + mkdir $(INSTALL_DIR) 24 + mv $(OPK_BUILD_DIR)/rockbox/bin/rockbox $(INSTALL_DIR) 25 + mv $(OPK_BUILD_DIR)/rockbox/lib/rockbox/* $(INSTALL_DIR) 26 + mv $(OPK_BUILD_DIR)/rockbox/share/rockbox/* $(INSTALL_DIR) 27 + 28 + rm -rf $(OPK_BUILD_DIR)/rockbox 29 + mv $(INSTALL_DIR)/rockbox $(OPK_BUILD_DIR) 30 + 31 + # Plugin workarounds 32 + mkdir $(INSTALL_DIR)/rocks.data 33 + mv $(INSTALL_DIR)/rocks/games/.picross $(INSTALL_DIR)/rocks.data/.picross 34 + 35 + # Permissions 36 + chmod +x $(OPK_BUILD_DIR)/rockbox 37 + chmod +x $(OPK_BUILD_DIR)/run.sh 38 + 39 + # Make opk 40 + $(MKSQUASHFS) $(OPK_BUILD_DIR) rockbox_funkey-s.opk -all-root -noappend -no-exports -no-xattrs
+9
packaging/rgnano/rockbox.funkey-s.desktop
··· 1 + [Desktop Entry] 2 + Name=Rockbox 3 + Comment=Open source jukebox firmware 4 + Terminal=false 5 + Type=Application 6 + Exec=run.sh 7 + Icon=icon 8 + Categories=applications 9 + FK-Keymap=mapping.key
+38
packaging/rgnano/run.sh
··· 1 + #!/bin/sh 2 + 3 + RBDIR=/mnt/FunKey/rockbox 4 + CFGFILE=$RBDIR/config.cfg 5 + BLPATH=/sys/class/backlight/backlight/brightness 6 + 7 + # Install the rockbox folder 8 + if [ ! -d $RBDIR ]; then 9 + notif set 0 " Installing rockbox..." 10 + mkdir -p $RBDIR 11 + cp -r ./install/* $RBDIR 12 + notif clear 13 + else 14 + OPKV=$(cat ./install/rockbox-info.txt | grep Version: | cut -d'-' -f2) 15 + SDV=$(cat $RBDIR/rockbox-info.txt | grep Version: | cut -d'-' -f2) 16 + 17 + if [[ $OPKV -gt $SDV ]]; then 18 + notif set 0 " Updating rockbox..." 19 + cp -r -f -u ./install/* $RBDIR 20 + notif clear 21 + fi 22 + fi 23 + 24 + # Copy default config 25 + if [ ! -f $CFGFILE ]; then 26 + mkdir -p $(dirname $CFGFILE) 27 + cp ./config.cfg $CFGFILE 28 + fi 29 + 30 + # Get current volume/brightness -> launch rockbox -> restore previous values 31 + CUR_VOL=$(volume get) 32 + CUR_BL=$(cat $BLPATH) 33 + volume set 100 34 + 35 + ./rockbox 36 + 37 + volume set $CUR_VOL 38 + echo $CUR_BL > $BLPATH
+83 -13
tools/configure
··· 964 964 prefixtools "mipsel-rockbox-linux-gnu-" 965 965 } 966 966 967 + rgnanocc () { 968 + if [ -z "$FUNKEY_SDK_PATH" ]; then 969 + echo "ERROR: You need the FunKey-SDK installed and have the FUNKEY_SDK_PATH" 970 + echo "environment variable point to the root directory of the FunKey-SDK." 971 + echo "More info at https://wiki.funkey-project.com/wiki/Setting_up_the_SDK" 972 + exit 973 + fi 974 + 975 + $FUNKEY_SDK_PATH/relocate-sdk.sh 976 + 977 + arch="arm" 978 + arch_version="7" 979 + arch_profile="classic" 980 + 981 + CC=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-gcc 982 + CPP=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-cpp 983 + LD=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-ld 984 + AR=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-gcc-ar 985 + AS=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-as 986 + OC=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-objcopy 987 + WINDRES=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-windres 988 + DLLTOOL=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-dlltool 989 + DLLWRAP=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-dllwrap 990 + RANLIB=$FUNKEY_SDK_PATH/bin/arm-funkey-linux-musleabihf-gcc-ranlib 991 + 992 + GCCOPTS=`echo $CCOPTS | sed -e s/\ -ffreestanding// -e s/\ -nostdlib// -e s/\ -Wundef//` 993 + 994 + if [ "yes" = "$use_debug" ]; then 995 + GCCOPTS=`echo $GCCOPTS | sed -e s/\ -Os/\ -Og/` 996 + fi 997 + 998 + GCCOPTS="$GCCOPTS -fno-builtin -g -Wno-unused-result" 999 + GCCOPTS="$GCCOPTS -I$FUNKEY_SDK_PATH/arm-funkey-linux-musleabihf/sysroot/usr/include/SDL" 1000 + GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -D_REENTRANT -masm-syntax-unified" 1001 + 1002 + SHARED_LDFLAGS="-shared" 1003 + SHARED_CFLAGS="-fPIC -fvisibility=hidden" 1004 + 1005 + LDOPTS="-lm -ldl $LDOPTS -L$FUNKEY_SDK_PATH/arm-funkey-linux-musleabihf/sysroot/usr/lib -lSDL -lpthread" 1006 + GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" 1007 + 1008 + thread_support="HAVE_SDL_THREADS" 1009 + sdl="$FUNKEY_SDK_PATH/arm-funkey-linux-musleabihf/sysroot/usr/bin/sdl-config" 1010 + rbdir="/FunKey/rockbox" 1011 + } 1012 + 1013 + 967 1014 do_bootloader() { 968 1015 appsdir='$(ROOTDIR)/bootloader' 969 1016 apps="bootloader" ··· 1720 1767 225) NWZ-E580 series 206) Android MIPS 251) 770 1721 1768 226) NWZ-A10 series 207) Android x86 252) 800 1722 1769 227) NW-A20 series 208) Samsung YP-R1 1723 - 228) NWZ-A860 series ==AgpTek== 1724 - 229) NWZ-S750 series ==iBasso== 240) Rocker 1725 - 232) DX50 1726 - ==FiiO== 233) DX90 ==AIGO== 1727 - 244) M3K Linux 245) Eros Q / K 1728 - 246) M3K baremetal ==xDuoo== 247) Eros Q / K native 1729 - 241) X3 (hw1/hw2 bl, all hw rb) 1730 - ==Shanling== 242) X3II 248) Eros Q / K native 1731 - 260) Q1 243) X20 (hw3 bl only) 1732 - 249) Eros Q / K native 1733 - ==Surfans== (hw4 bl only) 1734 - ==Echo project== 280) F28 (WIP) 1735 - 270) Echo R1 (WIP) 1770 + 228) NWZ-A860 series 209) Anbernic RG Nano ==AgpTek== 1771 + 229) NWZ-S750 series 240) Rocker 1772 + ==iBasso== 1773 + ==FiiO== 232) DX50 ==AIGO== 1774 + 244) M3K Linux 233) DX90 245) Eros Q / K 1775 + 246) M3K baremetal 247) Eros Q / K native 1776 + ==xDuoo== (hw1/hw2 bl, all hw rb) 1777 + ==Shanling== 241) X3 248) Eros Q / K native 1778 + 260) Q1 242) X3II (hw3 bl only) 1779 + 243) X20 249) Eros Q / K native 1780 + (hw4 bl only) 1781 + ==Echo project== ==Surfans== 1782 + 270) Echo R1 (WIP) 280) F28 (WIP) 1736 1783 EOF 1737 1784 1738 1785 buildfor=`input`; ··· 3598 3645 t_cpu="hosted" 3599 3646 t_manufacturer="samsungypr" 3600 3647 t_model="ypr1" 3648 + ;; 3649 + 3650 + 209|rgnano) 3651 + target_id=120 3652 + application="yes" 3653 + modelname="rgnano" 3654 + app_type="sdl-app" 3655 + target="RG_NANO" 3656 + memory=32 3657 + uname=`uname` 3658 + rgnanocc 3659 + tool="cp " 3660 + boottool="cp " 3661 + bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3662 + bmp2rb_native="$rootdir/tools/bmp2rb -f 9" 3663 + output="rockbox" 3664 + bootoutput="rockbox" 3665 + appextra="recorder:gui" 3666 + plugins="yes" 3667 + t_cpu="hosted" 3668 + t_manufacturer="anbernic" 3669 + t_model="rgnano" 3670 + extradefines="$extradefines -DOS_USE_BYTESWAP_H" 3601 3671 ;; 3602 3672 3603 3673 210|hifietma9)
+3
tools/root.make
··· 168 168 ifneq (,$(findstring pandora, $(MODELNAME))) 169 169 include $(ROOTDIR)/packaging/pandora/pandora.make 170 170 endif 171 + ifneq (,$(findstring rgnano, $(MODELNAME))) 172 + include $(ROOTDIR)/packaging/rgnano/rgnano.make 173 + endif 171 174 172 175 endif # bootloader 173 176
+5
wps/WPSLIST
··· 87 87 wps.320x240x(16|24|32): cabbiev2.320x240x16.wps 88 88 wps.240x400x(16|24|32): cabbiev2.240x400x16.wps 89 89 wps.240x320x(16|24|32): cabbiev2.240x320x16.wps 90 + wps.240x240x(16|24|32): cabbiev2.240x240x16.wps 90 91 wps.220x176x(16|24|32): cabbiev2.220x176x16.wps 91 92 wps.176x220x(16|24|32): cabbiev2.176x220x16.wps 92 93 wps.176x132x(16|24|32): cabbiev2.176x132x16.wps ··· 117 118 Font.320x240x(16|24|32): 15-Adobe-Helvetica.fnt 118 119 Font.240x400x(16|24|32): 16-Adobe-Helvetica.fnt 119 120 Font.240x320x(16|24|32): 18-Adobe-Helvetica.fnt 121 + Font.240x240x(16|24|32): 16-WenQangYi-Unibit.fnt 120 122 Font.220x176x(16|24|32): 12-Adobe-Helvetica.fnt 121 123 Font.176x220x(16|24|32): 12-Adobe-Helvetica.fnt 122 124 Font.176x132x(16|24|32): 12-Adobe-Helvetica.fnt ··· 149 151 backdrop.360x400x(16|24|32): backdrops/cabbiev2.360x400x16.bmp 150 152 backdrop.320x480x(16|24|32): backdrops/cabbiev2.320x480x16.bmp 151 153 backdrop.320x240x(16|24|32): backdrops/cabbiev2.320x240x16.bmp 154 + backdrop.240x240x(16|24|32): backdrops/cabbiev2.240x240x16.bmp 152 155 backdrop.128x128x(16|24|32): backdrops/cabbiev2.128x128x16.bmp 153 156 backdrop.128x128x2: backdrops/cabbiev2.128x128x2.bmp 154 157 backdrop.128x160x(16|24|32): backdrops/cabbiev2.128x160x16.bmp ··· 176 179 iconset.360x400x(16|24|32): icons/tango_icons.32x32.bmp 177 180 iconset.320x480x(16|24|32): icons/tango_icons.24x24.bmp 178 181 iconset.320x240x(16|24|32): icons/tango_icons.16x16.bmp 182 + iconset.240x240x(16|24|32): icons/tango_icons.16x16.bmp 179 183 iconset.128x128x(16|24|32): icons/tango_icons.12x12.bmp 180 184 iconset.128x160x(16|24|32): icons/tango_icons.12x12.bmp 181 185 iconset.132x80x(16|24|32): icons/tango_icons.12x12.bmp ··· 196 200 viewers iconset.360x400x(16|24|32): icons/tango_icons_viewers.32x32.bmp 197 201 viewers iconset.320x480x(16|24|32): icons/tango_icons_viewers.24x24.bmp 198 202 viewers iconset.320x240x(16|24|32): icons/tango_icons_viewers.16x16.bmp 203 + viewers iconset.240x240x(16|24|32): icons/tango_icons_viewers.16x16.bmp 199 204 viewers iconset.128x128x(16|24|32): icons/tango_icons_viewers.12x12.bmp 200 205 viewers iconset.128x160x(16|24|32): icons/tango_icons_viewers.12x12.bmp 201 206 viewers iconset.132x80x(16|24|32): icons/tango_icons_viewers.12x12.bmp
+83
wps/cabbiev2.240x240x16.wps
··· 1 + # Cabbie v2.0 2 + # (C) 2007-2012 The Authors (see /rockbox/wps/AUTHORS) 3 + # Derived from "cabbie" (C) Yohann Misquitta 4 + # 5 + # Disable Status Bar 6 + %wd 7 + # 8 + # 9 + # Preload Fonts 10 + %Fl(3,14-Rockbox-Mix.fnt) 11 + # 12 + # Load Backdrop 13 + %X(wpsbackdrop-240x240x16.bmp) 14 + # 15 + # Preload Images 16 + %xl(A,lock-240x240x16.bmp,0,0,2) 17 + %xl(B,battery-240x240x16.bmp,0,0,10) 18 + %xl(C,volume-240x240x16.bmp,0,0,10) 19 + %xl(D,shuffle-240x240x16.bmp,0,0) 20 + %xl(E,repeat-240x240x16.bmp,0,0,4) 21 + %xl(F,playmode-240x240x16.bmp,0,0,5) 22 + # 23 + # Album Art/Info Viewport Conditional 24 + %?C<%Vd(a)|%Vd(b)> 25 + # 26 + # Progress Bar 27 + %V(10,162,220,15,-) 28 + %pb(0,0,220,15,pb-240x240x16.bmp) 29 + # 30 + # Hold 31 + %V(10,207,30,23,-) 32 + %?mh<%xd(Aa)|%xd(Ab)> 33 + # 34 + # Battery 35 + %V(47,207,44,23,-) 36 + %?bp<%?bc<%xd(Ba)|%xd(Bb)>|%?bl<|%xd(Bc)|%xd(Bd)|%xd(Be)|%xd(Bf)|%xd(Bg)|%xd(Bh)|%xd(Bi)|%xd(Bj)>> 37 + # 38 + # Volume 39 + %V(96,207,34,23,-) 40 + %?pv<%xd(Ca)|%xd(Cb)|%xd(Cc)|%xd(Cd)|%xd(Ce)|%xd(Cf)|%xd(Cg)|%xd(Ch)|%xd(Ci)|%xd(Cj)> 41 + # 42 + # Shuffle 43 + %V(137,211,37,16,-) 44 + %?ps<%xd(D)> 45 + # 46 + # Repeat 47 + %V(181,207,18,23,-) 48 + %?mm<|%xd(Ea)|%xd(Eb)|%xd(Ec)|%xd(Ed)> 49 + # 50 + # Playmode 51 + %V(206,207,24,23,-) 52 + %?mp<%xd(Fa)|%xd(Fb)|%xd(Fc)|%xd(Fd)|%xd(Fe)> 53 + # 54 + # Time Elapsed/Remaining 55 + %V(10,180,220,20,3) 56 + %al%pc%ac%?Sr<%pe %Sx(of) %pp|%pp %Sx(of) %pe>%ar%pr 57 + # 58 + # Album Art 59 + %ax%Vl(a,10,42,100,100,-) 60 + %Cl(0,0,100,100,c,c) 61 + %Cd 62 + # 63 + # Track Info - Album Art 64 + %ax%Vl(a,113,40,-,130,3) 65 + %s%al%?id<%id|%?d(1)<%d(1)|%(root%)>> 66 + %s%al%?it<%it|%fn> 67 + %s%al%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>> 68 + %s%al%?iy<%iy> 69 + 70 + %s%al%Sx(Next Track:) 71 + %s%al%?It<%It|%Fn> 72 + %s%al%?Ia<%Ia|%?IA<%IA>> 73 + # 74 + # Track Info - No Album Art 75 + %ax%Vl(b,0,30,-,130,3) 76 + %s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>> 77 + %s%ac%?it<%it|%fn> 78 + %s%ac%?ia<%ia|%?iA<%iA|%?d(2)<%d(2)|%(root%)>>> 79 + %s%ac%?iy<%iy> 80 + 81 + %ac%Sx(Next Track:) 82 + %s%ac%?It<%It|%Fn> 83 + %s%ac%?Ia<%Ia|%?IA<%IA>>
wps/cabbiev2/battery-240x240x16.bmp

This is a binary file and will not be displayed.

wps/cabbiev2/lock-240x240x16.bmp

This is a binary file and will not be displayed.

wps/cabbiev2/pb-240x240x16.bmp

This is a binary file and will not be displayed.

wps/cabbiev2/playmode-240x240x16.bmp

This is a binary file and will not be displayed.

wps/cabbiev2/repeat-240x240x16.bmp

This is a binary file and will not be displayed.

wps/cabbiev2/shuffle-240x240x16.bmp

This is a binary file and will not be displayed.

wps/cabbiev2/volume-240x240x16.bmp

This is a binary file and will not be displayed.

wps/cabbiev2/wpsbackdrop-240x240x16.bmp

This is a binary file and will not be displayed.