Skip to content

Commit

Permalink
Merged launcher into retro-core
Browse files Browse the repository at this point in the history
Memory-related blocking issues remain, see #167

For example, following this change it's impossible to fit two framebuffers in internal RAM for most emulators.

Must find ways to free ~20KB of internal RAM.
  • Loading branch information
ducalex committed Jan 11, 2025
1 parent dd47c76 commit 3dcbed9
Show file tree
Hide file tree
Showing 23 changed files with 20 additions and 34 deletions.
4 changes: 0 additions & 4 deletions launcher/CMakeLists.txt

This file was deleted.

10 changes: 0 additions & 10 deletions launcher/main/CMakeLists.txt

This file was deleted.

3 changes: 1 addition & 2 deletions retro-core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cmake_minimum_required(VERSION 3.5)
set(COMPONENTS "main retro-go nofrendo gnuboy pce-go gw-emulator handy smsplus snes9x")
set(RG_ENABLE_NETWORKING 0)
set(COMPONENTS "main retro-go launcher nofrendo gnuboy pce-go gw-emulator handy smsplus snes9x")
include(../base.cmake)
project(retro-core)
13 changes: 10 additions & 3 deletions retro-core/components/launcher/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
set(COMPONENT_SRCDIRS ". libs")
set(COMPONENT_ADD_INCLUDEDIRS ". libs")
set(COMPONENT_SRCDIRS ".")
set(COMPONENT_ADD_INCLUDEDIRS ".")
set(COMPONENT_REQUIRES "retro-go esp_http_server")
register_component()
rg_setup_compile_options(-O2)
rg_setup_compile_options(-O2 -Wno-error=format -Wno-error=char-subscripts -mfix-esp32-psram-cache-issue)

# add_custom_command(OUTPUT images.c
# COMMAND python ${COMPONENT_DIR}/gen_images.py
# VERBATIM)
# add_custom_target(images DEPENDS images.c)
# add_dependencies(${COMPONENT_LIB} images)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -432,15 +432,15 @@ static void about_handler(rg_gui_option_t *dest)
*dest++ = (rg_gui_option_t)RG_DIALOG_END;
}

void app_main(void)
void launcher_main(void)
{
const rg_handlers_t handlers = {
.event = &event_handler,
.options = &options_handler,
.about = &about_handler,
};

app = rg_system_init(32000, &handlers, NULL);
app = rg_system_reinit(32000, &handlers, NULL);
app->configNs = "launcher";
app->isLauncher = true;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 6 additions & 4 deletions retro-core/main/main_launcher.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#include "shared.h"

void launcher_main(void)
{
// NOTE: Entry function launcher_main is actually in the launcher component...

// void launcher_main(void)
// {
// app->configNs = "launcher";
// app->isLauncher = true;
// Currently a separate app, see launcher in project's root
rg_system_exit();
}
// rg_system_exit();
// }
3 changes: 0 additions & 3 deletions retro-go.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
{
"path": "gwenesis"
},
{
"path": "launcher"
},
{
"path": "prboom-go"
},
Expand Down
3 changes: 1 addition & 2 deletions rg_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
PROJECT_ICON = "assets/icon.raw"
PROJECT_APPS = {
# Project name Type, SubType, Size
'launcher': [0, 0, 917504],
'retro-core': [0, 0, 917504],
'retro-core': [0, 0, 1638400],
'prboom-go': [0, 0, 786432],
'gwenesis': [0, 0, 983040],
'fmsx': [0, 0, 589824],
Expand Down
4 changes: 0 additions & 4 deletions rg_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,6 @@ def monitor_app(app, port, baudrate=115200):
exec(f.read())

try:
if command in ["build-fw", "build-img", "release", "install"] and "launcher" not in apps:
print("\nWARNING: The launcher is mandatory for those apps and will be included!\n")
apps.insert(0, "launcher")

if command in ["clean", "release"]:
print("=== Step: Cleaning ===\n")
for app in apps:
Expand Down

0 comments on commit 3dcbed9

Please sign in to comment.