mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
YP-CP3: simulator
- uisimulator/bitmaps/UI-samsungypcp3.bmp: the YP-CP3 from the front, 614x324, the 400x240 screen at 40,37. Dithered to RGB565: the simulator converts its background to the 16-bit LCD format, which turned the case's gradients into bands. - sim-ui-defines.h: its window and screen position - buttonmap/samsung-ypcp3.c: the YP-R0's keyboard layout - the YP-CP3 shares its keypad - and click areas for the joystick, Back and Menu below it, and User (Rec) and Power on the top edge above them Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Change-Id: I9146fd54400d85636a97509993b393bff8b1ab78
This commit is contained in:
parent
9910b2aebf
commit
f61d379824
4 changed files with 96 additions and 0 deletions
|
|
@ -390,6 +390,13 @@
|
|||
#define UI_WIDTH LCD_WIDTH
|
||||
#define UI_HEIGHT LCD_HEIGHT
|
||||
|
||||
#elif defined(SAMSUNG_YPCP3)
|
||||
#define UI_TITLE "Samsung YP-CP3"
|
||||
#define UI_WIDTH 614 /* width of GUI window */
|
||||
#define UI_HEIGHT 324 /* height of GUI window */
|
||||
#define UI_LCD_POSX 40
|
||||
#define UI_LCD_POSY 37
|
||||
|
||||
#elif defined(SAMSUNG_YPR0)
|
||||
#define UI_TITLE "Samsung YP-R0"
|
||||
#define UI_WIDTH 313 /* width of GUI window */
|
||||
|
|
|
|||
BIN
uisimulator/bitmaps/UI-samsungypcp3.bmp
Normal file
BIN
uisimulator/bitmaps/UI-samsungypcp3.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 584 KiB |
|
|
@ -62,7 +62,11 @@ sansa-connect.c
|
|||
#elif CONFIG_KEYPAD == SONY_NWZ_PAD
|
||||
sony-nwz.c
|
||||
#elif CONFIG_KEYPAD == SAMSUNG_YPR0_PAD
|
||||
#ifdef SAMSUNG_YPCP3
|
||||
samsung-ypcp3.c
|
||||
#else
|
||||
samsung-ypr0.c
|
||||
#endif
|
||||
#elif CONFIG_KEYPAD == CREATIVE_ZEN_PAD
|
||||
creative-zen.c
|
||||
#elif CONFIG_KEYPAD == SONY_NWZA860_PAD
|
||||
|
|
|
|||
85
uisimulator/buttonmap/samsung-ypcp3.c
Normal file
85
uisimulator/buttonmap/samsung-ypcp3.c
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
*
|
||||
* Copyright (C) 2026 by Marcin Bukat
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <SDL.h>
|
||||
#include "button.h"
|
||||
#include "buttonmap.h"
|
||||
|
||||
/* The YP-CP3 has the YP-R0's keys, and the same keyboard layout here */
|
||||
int key_to_button(int keyboard_button)
|
||||
{
|
||||
int new_btn = BUTTON_NONE;
|
||||
switch (keyboard_button)
|
||||
{
|
||||
case SDLK_KP_4:
|
||||
case SDLK_LEFT:
|
||||
new_btn = BUTTON_LEFT;
|
||||
break;
|
||||
case SDLK_KP_6:
|
||||
case SDLK_RIGHT:
|
||||
new_btn = BUTTON_RIGHT;
|
||||
break;
|
||||
case SDLK_KP_8:
|
||||
case SDLK_UP:
|
||||
new_btn = BUTTON_UP;
|
||||
break;
|
||||
case SDLK_KP_2:
|
||||
case SDLK_DOWN:
|
||||
new_btn = BUTTON_DOWN;
|
||||
break;
|
||||
case SDLK_PAGEUP:
|
||||
case SDLK_KP_9:
|
||||
new_btn = BUTTON_MENU;
|
||||
break;
|
||||
case SDLK_KP_7:
|
||||
new_btn = BUTTON_BACK;
|
||||
break;
|
||||
case SDLK_KP_5:
|
||||
case SDLK_SPACE:
|
||||
case SDLK_KP_ENTER:
|
||||
case SDLK_RETURN:
|
||||
new_btn = BUTTON_SELECT;
|
||||
break;
|
||||
case SDLK_KP_3:
|
||||
new_btn = BUTTON_POWER;
|
||||
break;
|
||||
case SDLK_KP_1:
|
||||
new_btn = BUTTON_USER;
|
||||
break;
|
||||
}
|
||||
return new_btn;
|
||||
}
|
||||
|
||||
/* The face carries the joystick and, below it, Back and Menu; User (Rec)
|
||||
* and Power sit on the top edge, above them. Select comes first: the first
|
||||
* area a click falls in wins. */
|
||||
struct button_map bm[] = {
|
||||
{ SDLK_KP_5, 517, 90, 11, "Select" },
|
||||
{ SDLK_KP_8, 517, 66, 13, "Up" },
|
||||
{ SDLK_KP_2, 517, 114, 13, "Down" },
|
||||
{ SDLK_KP_4, 493, 90, 13, "Left" },
|
||||
{ SDLK_KP_6, 541, 90, 13, "Right" },
|
||||
{ SDLK_KP_7, 519, 159, 11, "Back" },
|
||||
{ SDLK_KP_9, 519, 193, 11, "Menu" },
|
||||
{ SDLK_KP_1, 480, 8, 12, "User" },
|
||||
{ SDLK_KP_3, 531, 8, 12, "Power" },
|
||||
{ 0, 0, 0, 0, "None" }
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue