Skip to content

Commit 8f80acd

Browse files
committed
Merge branch 'dev'
2 parents 082889d + d47519f commit 8f80acd

File tree

167 files changed

+4587
-3473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+4587
-3473
lines changed

.gitignore

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@ __pycache__/
33
.vscode/
44
build/
55

6+
# ESP32 build
7+
/partitions.bin
8+
/partitions.csv
9+
/sdkconfig.old
10+
/sdkconfig
611
/*/sdkconfig.old
712
/*/sdkconfig
8-
/*.exe
913
/*.fw
1014
/*.img
1115
/*.zip
1216

13-
/partitions.bin
14-
/partitions.csv
15-
17+
# SDL2 build
1618
/sd
1719
/stderr.txt
1820
/stdout.txt
1921
/gmon.out
22+
/*.exe

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Retro-Go 1.43 (2024-09-02)
2+
- All: Added ZIP support (large 4MB+ GBC roms not supported unfortunately)
3+
- Launcher: Added menu option to pre-compute all CRC32s (for cover art)
4+
- Launcher: Officially support name-based cover art (eg: `/covers/nes/game name.png`)
5+
- Launcher: Improved responsiveness when cover art/save preview is enabled
6+
- Launcher: Added network status/details in wifi dialog
7+
8+
19
# Retro-Go 1.42 (2024-06-05)
210
- PCE: Fixed out-of-bounds VCE regs access (Crash in Raiden, probably others)
311
- NES: Fixed panic in some games (Snow Brothers, Chip'n'Dale, probably others)

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ This method is intended to be used when .fw support isn't available (when portin
6262

6363
# Usage
6464

65-
## Game covers
65+
## Game covers / artwork
6666
Game covers should be placed in the `romart` folder at the base of your sd card. You can obtain a pre-made pack [here](https://github.com/ducalex/retro-go-covers). Retro-Go is also compatible with the older Go-Play romart pack.
6767

6868
You can add missing cover art by creating a PNG image (160x168, 8bit). Two naming schemes are supported:
69+
- Filename-based: `/romart/nes/Super Mario.png` (notice the rom extension is *not* included)
6970
- CRC32-based: `/romart/nes/A/ABCDE123.png` where `nes` is the same as the rom folder, and `ABCDE123` is the CRC32 of the game (press A -> Properties in the launcher to find it), and `A` is the first character of the CRC32
70-
- Name-based: `/romart/nes/Super Mario.nes.png` (notice the rom extension is included!)
7171

72-
_Note: CRC32-based, which is what is used in the pre-made pack, is much slower than name-based! This type is useful because filenames vary greatly despite having identical CRCs, but if you generate your own art I suggest you use name-based format and delete all CRC-based art from your SD Card to improve responsiveness._
72+
_Note: CRC32-based, which is what is used in the pre-made pack, is much slower than name-based! This type is useful because filenames vary greatly despite having identical CRCs, but if you generate your own art I suggest you use filename-based format and delete all CRC-based art from your SD Card to improve responsiveness._
7373

7474

7575
## BIOS files

base.cmake

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
22
set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/components")
33

44
macro(rg_setup_compile_options)
5-
set(RG_TARGET "RG_TARGET_${RG_BUILD_TARGET}")
6-
message("Target: ${RG_TARGET}")
7-
85
component_compile_options(
9-
-D${RG_TARGET}
10-
-DRETRO_GO
6+
-D${RG_BUILD_TARGET}=1
7+
-DRETRO_GO=1
118
-fjump-tables -ftree-switch-conversion
129
${ARGV}
1310
)

build_sdl2.sh

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/bash
2+
3+
# Supported systems: Linux / MINGW32 / MINGW64
4+
# Required: SDL2
5+
6+
CC="gcc"
7+
# BUILD_INFO="RG:$(git describe) / SDL:$(sdl2-config --version)"
8+
CFLAGS="-no-pie -DRG_TARGET_SDL2 -DRETRO_GO -DCJSON_HIDE_SYMBOLS -DSDL_MAIN_HANDLED=1 -DRG_BUILD_INFO=\"SDL2\" -Dapp_main=SDL_Main $(sdl2-config --cflags)"
9+
INCLUDES="-Icomponents/retro-go -Icomponents/retro-go/libs/cJSON -Icomponents/retro-go/libs/lodepng"
10+
SRCFILES="components/retro-go/*.c components/retro-go/drivers/audio/*.c components/retro-go/fonts/*.c
11+
components/retro-go/libs/cJSON/*.c components/retro-go/libs/lodepng/*.c"
12+
LIBS="$(sdl2-config --libs) -lstdc++"
13+
14+
echo "Cleaning..."
15+
rm -f launcher.exe retro-core.exe gmon.out
16+
17+
echo "Building launcher..."
18+
$CC $CFLAGS $INCLUDES -Ilauncher/main $SRCFILES launcher/main/*.c $LIBS -o launcher.exe
19+
20+
echo "Building retro-core..."
21+
$CC $CFLAGS $INCLUDES \
22+
-Iretro-core/components/gnuboy \
23+
-Iretro-core/components/gw-emulator/src \
24+
-Iretro-core/components/gw-emulator/src/cpus \
25+
-Iretro-core/components/gw-emulator/src/gw_sys \
26+
-Iretro-core/components/handy \
27+
-Iretro-core/components/nofrendo \
28+
-Iretro-core/components/pce-go \
29+
-Iretro-core/components/snes9x \
30+
-Iretro-core/components/snes9x/src \
31+
-Iretro-core/components/smsplus \
32+
-Iretro-core/main \
33+
$SRCFILES \
34+
retro-core/components/gnuboy/*.c \
35+
retro-core/components/gw-emulator/src/*.c \
36+
retro-core/components/gw-emulator/src/cpus/*.c \
37+
retro-core/components/gw-emulator/src/gw_sys/*.c \
38+
retro-core/components/handy/*.cpp \
39+
retro-core/components/nofrendo/mappers/*.c \
40+
retro-core/components/nofrendo/nes/*.c \
41+
retro-core/components/nofrendo/*.c \
42+
retro-core/components/pce-go/*.c \
43+
retro-core/components/snes9x/src/*.c \
44+
retro-core/components/smsplus/*.c \
45+
retro-core/components/smsplus/cpu/*.c \
46+
retro-core/components/smsplus/sound/*.c \
47+
retro-core/main/*.c \
48+
retro-core/main/*.cpp \
49+
$LIBS \
50+
-o retro-core.exe
51+
52+
echo "Running"
53+
./launcher.exe && ./retro-core.exe
54+
55+
# && gprof.exe retro-core.exe gmon.out > profile.txt
56+
# gdb -iex 'set pagination off' -ex run ./retro-core.exe

components/retro-go/CMakeLists.txt

+16-22
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
set(COMPONENT_SRCDIRS ". fonts libs/netplay libs/lodepng")
1+
set(COMPONENT_SRCDIRS ". drivers/audio fonts libs/netplay libs/lodepng")
22
set(COMPONENT_ADD_INCLUDEDIRS ". libs/netplay libs/lodepng")
3-
4-
message(STATUS "ESP-IDF version: ${IDF_VER}")
5-
63
if (IDF_VERSION_MAJOR EQUAL 5)
74
set(COMPONENT_REQUIRES "spi_flash fatfs app_update json nvs_flash esp_adc esp_timer esp_psram esp_wifi esp_http_client")
85
else() # esp-idf 4.1 - 4.4
@@ -26,35 +23,32 @@ set_source_files_properties(
2623
-O2
2724
)
2825

29-
if (IDF_VERSION_MAJOR EQUAL 5)
30-
if(RG_ENABLE_NETPLAY OR RG_ENABLE_NETWORKING)
31-
message(WARNING "Retro-Go's networking isn't compatible with esp-idf 5.x")
32-
endif()
33-
else()
34-
if(RG_ENABLE_NETPLAY)
35-
component_compile_options(-DRG_ENABLE_NETWORKING -DRG_ENABLE_NETPLAY)
36-
elseif(RG_ENABLE_NETWORKING)
37-
component_compile_options(-DRG_ENABLE_NETWORKING)
38-
endif()
26+
if(RG_ENABLE_NETPLAY)
27+
component_compile_options(-DRG_ENABLE_NETWORKING -DRG_ENABLE_NETPLAY)
28+
elseif(RG_ENABLE_NETWORKING)
29+
component_compile_options(-DRG_ENABLE_NETWORKING)
3930
endif()
4031

4132
if(RG_ENABLE_PROFILING)
4233
component_compile_options(-DRG_ENABLE_PROFILING)
4334
endif()
4435

45-
if(RG_BUILD_VERSION)
46-
component_compile_options(-DRG_BUILD_VERSION="${RG_BUILD_VERSION}")
36+
if(RG_PROJECT_VER)
37+
component_compile_options(-DRG_PROJECT_VER="${RG_PROJECT_VER}")
4738
endif()
4839

4940
if(RG_BUILD_RELEASE)
5041
component_compile_options(-DRG_BUILD_RELEASE=1)
5142
endif()
5243

53-
set(RG_TARGET "RG_TARGET_${RG_BUILD_TARGET}")
54-
string(TIMESTAMP RG_TIME "%s")
44+
set(RG_BUILD_INFO "${RG_BUILD_TARGET}-${RG_BUILD_RELEASE} ${PROJECT_VER} SDK:${IDF_VER} ${IDF_TARGET}")
45+
string(TIMESTAMP RG_BUILD_TIME "%s")
5546

56-
message(STATUS "Target: ${RG_TARGET}")
57-
message(STATUS "Time: ${RG_TIME}")
47+
component_compile_options(-D${RG_BUILD_TARGET}=1)
48+
component_compile_options(-DRG_PROJECT_APP="${RG_PROJECT_APP}")
49+
component_compile_options(-DRG_BUILD_INFO="${RG_BUILD_INFO}")
50+
component_compile_options(-DRG_BUILD_TIME=${RG_BUILD_TIME})
5851

59-
component_compile_options(-DRG_BUILD_TIME=${RG_TIME})
60-
component_compile_options(-D${RG_TARGET})
52+
message(STATUS "RG_PROJECT_APP: ${RG_PROJECT_APP}")
53+
message(STATUS "RG_PROJECT_VER: ${RG_PROJECT_VER}")
54+
message(STATUS "RG_BUILD_INFO: ${RG_BUILD_INFO}")

components/retro-go/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ I develop and test mainly on the ODROID-GO. I occasionally test on the MRGC-G32
1212
| [esp32s3-devkit-c](esp32s3-devkit-c/docs/README.md) | |
1313
| [esplay-micro](targets/esplay-micro/docs/README.md) | |
1414
| [esplay-s3](targets/esplay-s3/docs/README.md) | |
15+
| [fri3d-2024](targets/fri3d-2024/docs/README.md) | |
1516
| [mrgc-g32](targets/mrgc-g32/docs/README.md) | |
1617
| [mrgc-gbm](targets/mrgc-gbm/docs/README.md) | |
1718
| [odroid-go](targets/odroid-go/docs/README.md) | |

components/retro-go/config.h

+59-38
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,20 @@
1616
#include "targets/esplay-s3/config.h"
1717
#elif defined(RG_TARGET_ESP32S3_DEVKIT_C)
1818
#include "targets/esp32s3-devkit-c/config.h"
19+
#elif defined(RG_TARGET_FRI3D_2024)
20+
#include "targets/fri3d-2024/config.h"
1921
#else
2022
#warning "No target defined. Defaulting to ODROID-GO."
2123
#include "targets/odroid-go/config.h"
2224
#define RG_TARGET_ODROID_GO
2325
#endif
2426

25-
// #ifndef RG_ENABLE_NETPLAY
26-
// #define RG_ENABLE_NETPLAY 0
27-
// #endif
28-
29-
// #ifndef RG_ENABLE_PROFILING
30-
// #define RG_ENABLE_PROFILING 0
31-
// #endif
32-
33-
#ifndef RG_APP_LAUNCHER
34-
#define RG_APP_LAUNCHER "launcher"
35-
#endif
36-
37-
#ifndef RG_APP_FACTORY
38-
#define RG_APP_FACTORY NULL
39-
#endif
40-
41-
#ifndef RG_PATH_MAX
42-
#define RG_PATH_MAX 255
43-
#endif
44-
4527
#ifndef RG_PROJECT_NAME
4628
#define RG_PROJECT_NAME "Retro-Go"
4729
#endif
4830

49-
#ifndef RG_PROJECT_APP
50-
#define RG_PROJECT_APP "unknown"
51-
#endif
52-
53-
#ifndef RG_PROJECT_VERSION
54-
#define RG_PROJECT_VERSION RG_BUILD_VERSION
31+
#ifndef RG_PROJECT_WEBSITE
32+
#define RG_PROJECT_WEBSITE "https://github.com/ducalex/retro-go"
5533
#endif
5634

5735
#ifndef RG_PROJECT_CREDITS
@@ -63,16 +41,16 @@
6341
// What about targets/ports? Should we have a RG_TARGET_AUTHOR to append here?
6442
#endif
6543

66-
#ifndef RG_PROJECT_WEBSITE
67-
#define RG_PROJECT_WEBSITE "https://github.com/ducalex/retro-go"
44+
#ifndef RG_PROJECT_APP
45+
#define RG_PROJECT_APP "unknown"
6846
#endif
6947

70-
#ifndef RG_PROJECT_RELEASES_URL
71-
#define RG_PROJECT_RELEASES_URL "https://api.github.com/repos/ducalex/retro-go/releases"
48+
#ifndef RG_PROJECT_VER
49+
#define RG_PROJECT_VER "unknown"
7250
#endif
7351

74-
#ifndef RG_BUILD_VERSION
75-
#define RG_BUILD_VERSION "unknown"
52+
#ifndef RG_BUILD_INFO
53+
#define RG_BUILD_INFO "(none)"
7654
#endif
7755

7856
#ifndef RG_BUILD_TIME
@@ -84,8 +62,41 @@
8462
#define RG_BUILD_DATE __DATE__ " " __TIME__
8563
#endif
8664

87-
#ifndef RG_BUILD_TOOL
88-
#define RG_BUILD_TOOL "unknown"
65+
// #ifndef RG_ENABLE_NETPLAY
66+
// #define RG_ENABLE_NETPLAY 0
67+
// #endif
68+
69+
// #ifndef RG_ENABLE_PROFILING
70+
// #define RG_ENABLE_PROFILING 0
71+
// #endif
72+
73+
#ifndef RG_APP_LAUNCHER
74+
#define RG_APP_LAUNCHER "launcher"
75+
#endif
76+
77+
#ifndef RG_APP_FACTORY
78+
#define RG_APP_FACTORY NULL
79+
#endif
80+
81+
#ifndef RG_APP_UPDATER
82+
#define RG_APP_UPDATER RG_APP_FACTORY
83+
// #define RG_APP_UPDATER "updater"
84+
#endif
85+
86+
#ifndef RG_UPDATER_GITHUB_RELEASES
87+
#define RG_UPDATER_GITHUB_RELEASES "https://api.github.com/repos/ducalex/retro-go/releases"
88+
#endif
89+
90+
#ifndef RG_UPDATER_DOWNLOAD_LOCATION
91+
#if defined(RG_TARGET_ODROID_GO)
92+
#define RG_UPDATER_DOWNLOAD_LOCATION RG_STORAGE_ROOT "/odroid/firmware"
93+
#else
94+
#define RG_UPDATER_DOWNLOAD_LOCATION RG_STORAGE_ROOT "/espgbc/firmware"
95+
#endif
96+
#endif
97+
98+
#ifndef RG_PATH_MAX
99+
#define RG_PATH_MAX 255
89100
#endif
90101

91102
#ifndef RG_RECOVERY_BTN
@@ -108,10 +119,20 @@
108119
#define RG_BATTERY_UPDATE_THRESHOLD_VOLT 0.010f
109120
#endif
110121

111-
#ifndef RG_GPIO_LED
112-
#define RG_GPIO_LED (-1)
113-
#endif
114-
115122
#ifndef RG_LOG_COLORS
116123
#define RG_LOG_COLORS (1)
117124
#endif
125+
126+
#ifndef RG_TICK_RATE
127+
#ifdef ESP_PLATFORM
128+
#define RG_TICK_RATE CONFIG_FREERTOS_HZ
129+
#else
130+
#define RG_TICK_RATE 1000
131+
#endif
132+
#endif
133+
134+
#ifdef ESP_PLATFORM
135+
#define RG_ZIP_SUPPORT 1
136+
#else
137+
#define RG_ZIP_SUPPORT 0
138+
#endif

0 commit comments

Comments
 (0)