Skip to content

Commit 117bb9c

Browse files
committed
Thu 15 Aug 2019 15:32:42 EDT - PC Engine / Turbo Grafx
1 parent 92c5426 commit 117bb9c

File tree

22 files changed

+1903
-30
lines changed

22 files changed

+1903
-30
lines changed

.DS_Store

0 Bytes
Binary file not shown.

Components/odroid-go-pcengine-huexpress/odroid-go-common/components/odroid/odroid_hud.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,10 @@
8787
{"Delete Save",5, 15},
8888
{"Exit Game",6, 20}
8989
};
90-
STATES WITHOUTSAVE[4] = {
90+
STATES WITHOUTSAVE[3] = {
9191
{"Resume Game",0, 0},
9292
{"Restart Game",1, 10},
93-
{"Save Game",3, 25},
94-
{"Exit Game",6, 20}
93+
{"Exit Game",6, 20}
9594
};
9695
STATES STATE;
9796

@@ -438,7 +437,7 @@
438437
buffer = (uint16_t *)malloc(size);
439438
if (!buffer) abort();
440439
OPTION = 0;
441-
OPTIONS = SAVED ? 6 : 4;
440+
OPTIONS = SAVED ? 6 : 3;
442441
hud_theme();
443442
GUI = THEMES[USER];
444443
STATE = OPTIONS == 6 ? WITHSAVE[OPTION] : WITHOUTSAVE[OPTION];

Components/odroid-go-pcengine-huexpress/pcengine-go/main/main.c

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,8 @@ NOINLINE void app_init(void)
396396
abort();
397397
}
398398

399-
char *rom_file = odroid_ui_choose_file("/sd/roms/pce", "pce");
399+
//char *rom_file = odroid_ui_choose_file("/sd/roms/pce", "pce");
400+
char* rom_file = odroid_settings_RomFilePath_get();
400401
if (!rom_file)
401402
{
402403
printf("No file selected!\n");

Components/prosystem-odroid-go/components/odroid/Kconfig.projbuild

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,18 @@ menu "Retro ESP32 Configuration"
2626
bool "START + SELECT as MENU button"
2727

2828
endchoice
29+
30+
choice IN_GAME_MENU
31+
prompt "In Game Menu"
32+
default IN_GAME_MENU_NO
33+
help
34+
Use Retro ESP32 - In Game Menu
35+
36+
config IN_GAME_MENU_YES
37+
bool "YES"
38+
39+
config IN_GAME_MENU_NO
40+
bool "NO"
41+
42+
endchoice
2943
endmenu

Components/prosystem-odroid-go/components/odroid/odroid_display.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,27 @@ void odroid_display_show_hourglass()
14471447

14481448
SemaphoreHandle_t gb_mutex = NULL;
14491449

1450+
void odroid_display_lock()
1451+
{
1452+
if (!gb_mutex)
1453+
{
1454+
gb_mutex = xSemaphoreCreateMutex();
1455+
if (!gb_mutex) abort();
1456+
}
1457+
1458+
if (xSemaphoreTake(gb_mutex, 1000 / portTICK_RATE_MS) != pdTRUE)
1459+
{
1460+
abort();
1461+
}
1462+
}
1463+
1464+
void odroid_display_unlock()
1465+
{
1466+
if (!gb_mutex) abort();
1467+
1468+
xSemaphoreGive(gb_mutex);
1469+
}
1470+
14501471
void odroid_display_lock_gb_display()
14511472
{
14521473
if (!gb_mutex)

Components/prosystem-odroid-go/components/odroid/odroid_display.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ void display_tasktonotify_set(int value);
2828
int is_backlight_initialized();
2929
void odroid_display_show_splash();
3030
void odroid_display_drain_spi();
31+
void odroid_display_lock();
32+
void odroid_display_unlock();
3133
void odroid_display_lock_gb_display();
3234
void odroid_display_unlock_gb_display();
3335
void odroid_display_show_sderr(int errNum);

Components/prosystem-odroid-go/components/odroid/odroid_hud.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
#define WHITE 65535
5555
#define BLACK 0
5656
int OPTION = 0;
57-
extern int ACTION = 0;
5857
int OPTIONS = 3;
58+
extern int ACTION = 0;
5959
int8_t USER;
6060
int8_t DELETE_SAVE;
6161
int x, y, w, h, i, size;
@@ -87,10 +87,9 @@
8787
{"Delete Save",5, 15},
8888
{"Exit Game",6, 20}
8989
};
90-
STATES WITHOUTSAVE[4] = {
90+
STATES WITHOUTSAVE[3] = {
9191
{"Resume Game",0, 0},
9292
{"Restart Game",1, 10},
93-
{"Save Game",3, 25},
9493
{"Exit Game",6, 20}
9594
};
9695
STATES STATE;
@@ -321,7 +320,7 @@
321320

322321
//{#pragma region Mask
323322
void hud_mask(int x, int y, int w, int h){
324-
for (int i = 0; i < w * h; i++) buffer[i] = GUI.bg;
323+
for (i = 0; i < w * h; i++) buffer[i] = GUI.bg;
325324
ili9341_write_frame_rectangleLE(x, y, w, h, buffer);
326325
}
327326

@@ -438,11 +437,12 @@
438437
buffer = (uint16_t *)malloc(size);
439438
if (!buffer) abort();
440439
OPTION = 0;
441-
OPTIONS = SAVED ? 6 : 4;
440+
OPTIONS = SAVED ? 6 : 3;
442441
hud_theme();
443442
GUI = THEMES[USER];
444443
STATE = OPTIONS == 6 ? WITHSAVE[OPTION] : WITHOUTSAVE[OPTION];
445444
INIT = true;
445+
hud_debug("HUD - INIT");
446446
}
447447
}
448448

@@ -451,13 +451,17 @@
451451
buffer = realloc(buffer, size);
452452
free(buffer);
453453
INIT = false;
454+
hud_debug("HUD - DEINIT");
454455
}
455456
//}#pragma endregion Init
456457

457458
//{#pragma region Menu
458459
void hud_menu(void) {
459460
hud_init();
460461
hud_debug("HUD - MENU");
462+
//hud_background();
463+
//hud_logo();
464+
usleep(200000);
461465
hud_background();
462466
hud_logo();
463467
hud_options();
@@ -488,7 +492,8 @@
488492
BUTTON A
489493
*/
490494
if (gamepad.values[ODROID_INPUT_B]) {
491-
ACTION = 0;
495+
STATE.action = 0;
496+
ili9341_clear(0);
492497
debounce(ODROID_INPUT_B);
493498
return 0;
494499
}
@@ -504,7 +509,7 @@
504509
return 0;
505510
break;
506511
case 1: // "Restart Game"
507-
odroid_settings_StartAction_set(1);
512+
//odroid_settings_StartAction_set(1);
508513
forceConsoleReset = true;
509514
esp_restart();
510515
break;

0 commit comments

Comments
 (0)