Skip to content

Commit

Permalink
update retro-esp32 launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
pebri86 committed Oct 28, 2019
1 parent 23762c4 commit a7f056b
Show file tree
Hide file tree
Showing 17 changed files with 697 additions and 249 deletions.
2 changes: 2 additions & 0 deletions esplay-sdk/esplay-components/esplay-hal/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ void battery_level_init()
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[GPIO_NUM_13], PIN_FUNC_GPIO);
gpio_set_direction(GPIO_NUM_13, GPIO_MODE_OUTPUT);
gpio_set_direction(USB_PLUG_PIN, GPIO_MODE_INPUT);
gpio_set_pull_mode(USB_PLUG_PIN, GPIO_PULLUP_ONLY);
gpio_set_direction(CHRG_STATE_PIN, GPIO_MODE_INPUT);
gpio_set_pull_mode(CHRG_STATE_PIN, GPIO_PULLUP_ONLY);
adc1_config_width(ADC_WIDTH_12Bit);
adc1_config_channel_atten(ADC1_CHANNEL_3, ADC_ATTEN_11db);

Expand Down
8 changes: 1 addition & 7 deletions esplay-sdk/esplay-components/esplay-hal/sdcard.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,7 @@ esp_err_t sdcard_open(const char *base_path)
{
sdmmc_host_t host = SDMMC_HOST_DEFAULT();
host.flags = SDMMC_HOST_FLAG_1BIT;
#ifdef CONFIG_SDIO_DAT2_DISABLED
/* For slave chips with 3.3V flash, DAT2 pullup conflicts with the pulldown
required by strapping pin (MTDI). We can either burn the EFUSE for the
strapping or just disable the DAT2 and work in 1-bit mode.
*/
host.flags |= SDIO_SLAVE_FLAG_DAT2_DISABLED;
#endif
host.max_freq_khz = SDMMC_FREQ_HIGHSPEED;

sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
slot_config.width = 1;
Expand Down
15 changes: 9 additions & 6 deletions mkrelease_retro-esp32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
#edit your ESP-IDF path here, tested with release/v3.3 branch
export IDF_PATH=~/esp/esp-idf

#tune this to match yours
export ESPLAY_SDK=~/esp/esplay-retro-emulation/esplay-sdk

cd retro-esp32
make -j4
cd ../esplay-gnuboy
make -j4
cd ../esplay-nofrendo
make -j4
cd ../esplay-smsplusgx
make -j4
#cd ../esplay-gnuboy
#make -j4
#cd ../esplay-nofrendo
#make -j4
#cd ../esplay-smsplusgx
#make -j4
cd ..
#ffmpeg -i Tile.png -f rawvideo -pix_fmt rgb565 tile.raw
/home/Peruri/esp/esplay-base-firmware/tools/mkfw/mkfw.exe Retro-ESP32 assets/retro-esp32.raw 0 16 1048576 retro-esp32 retro-esp32/build/retro-esp32.bin 0 17 655360 esplay-nofrendo esplay-nofrendo/build/esplay-nofrendo.bin 0 18 655360 esplay-gnuboy esplay-gnuboy/build/esplay-gnuboy.bin 0 19 1310720 esplay-smsplusgx esplay-smsplusgx/build/esplay-smsplusgx.bin
Expand Down
5 changes: 4 additions & 1 deletion retro-esp32/main/includes/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@
Sprites
*/
#include "../sprites/battery.h"
#include "../sprites/charge.h"
#include "../sprites/characters.h"
#include "../sprites/icons.h"
#include "../sprites/logo.h"
#include "../sprites/media.h"
#include "../sprites/media.h"
#include "../sprites/folder.h"
#include "../sprites/speaker.h"
20 changes: 17 additions & 3 deletions retro-esp32/main/includes/declarations.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ void draw_text(short x, short y, char *string, bool ext, bool current);
void draw_mask(int x, int y, int w, int h);
void draw_background();

/*
Options
*/
void draw_settings();

/*
Volume
*/
void draw_volume();
int32_t get_volume();
void set_volume();

/*
Theme
*/
Expand All @@ -41,17 +53,19 @@ void get_restore_states();
*/
void draw_systems();
void draw_media(int x, int y, bool current);
void draw_folder(int x, int y, bool current);
void draw_battery();
void draw_speaker();
void draw_numbers();
void draw_launcher();
void draw_options();
void draw_launcher_options();

/*
Files
*/
void get_files();
void sort_files(char** files);
void draw_files(char** files);
void draw_files();
void has_save_file(char *name);

/*
Expand All @@ -78,4 +92,4 @@ void rom_delete_save();
/*
Launcher
*/
static void launcher();
static void launcher();
17 changes: 11 additions & 6 deletions retro-esp32/main/includes/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
#define WIDTH 320
#define HEIGHT 240

/*
Emulator Count + 1 for Theme
*/
#define COUNT 7

/*
System Ribbon Display
*/
Expand All @@ -24,4 +19,14 @@
Global Colors
*/
#define WHITE 65535
#define BLACK 0
#define BLACK 0

/*
Emulator Count + 1 for Theme
*/
#define COUNT 7

/*
*/
#define MAX_FILES 1024
29 changes: 14 additions & 15 deletions retro-esp32/main/includes/structures.h

Large diffs are not rendered by default.

Loading

0 comments on commit a7f056b

Please sign in to comment.