mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-25 03:56:54 +01:00
Merge branch 'main' into ed64-basic
This commit is contained in:
commit
321d1e0473
@ -1,14 +1,15 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
ARG SC64_DEPLOYER_VERSION=v2.18.0
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install build-essential doxygen git python3 wget -y && \
|
||||
wget https://github.com/DragonMinded/libdragon/releases/download/toolchain-continuous-prerelease/gcc-toolchain-mips64-x86_64.deb && \
|
||||
dpkg -i gcc-toolchain-mips64-x86_64.deb && \
|
||||
rm gcc-toolchain-mips64-x86_64.deb && \
|
||||
wget https://github.com/Polprzewodnikowy/SummerCart64/releases/download/v2.17.0/sc64-deployer-linux-v2.17.0.tar.gz && \
|
||||
tar -xf sc64-deployer-linux-v2.17.0.tar.gz -C /usr/local/bin && \
|
||||
rm sc64-deployer-linux-v2.17.0.tar.gz && \
|
||||
wget https://github.com/Polprzewodnikowy/SummerCart64/releases/download/$SC64_DEPLOYER_VERSION/sc64-deployer-linux-$SC64_DEPLOYER_VERSION.tar.gz && \
|
||||
tar -xf sc64-deployer-linux-$SC64_DEPLOYER_VERSION.tar.gz -C /usr/local/bin && \
|
||||
rm sc64-deployer-linux-$SC64_DEPLOYER_VERSION.tar.gz && \
|
||||
git config --global --add safe.directory "*" && \
|
||||
SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" && \
|
||||
echo "$SNIPPET" >> "/root/.bashrc"
|
||||
|
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
@ -13,12 +13,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
@ -37,7 +37,7 @@ jobs:
|
||||
FLAGS: -DNDEBUG
|
||||
|
||||
- name: Upload artifact (Standard ROM)
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: N64FlashcartMenu
|
||||
path: |
|
||||
@ -45,25 +45,25 @@ jobs:
|
||||
./build/N64FlashcartMenu.elf
|
||||
|
||||
- name: Upload artifact (64drive version)
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: 64drive
|
||||
path: ./output/menu.bin
|
||||
|
||||
- name: Upload artifact (ED64 version)
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ED64
|
||||
path: ./output/OS64.v64
|
||||
|
||||
- name: Upload artifact (ED64P version)
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ED64P
|
||||
path: ./output/OS64P.v64
|
||||
|
||||
- name: Upload artifact (SC64 version)
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: SC64
|
||||
path: ./output/sc64menu.n64
|
||||
@ -97,7 +97,7 @@ jobs:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Run Doxygen
|
||||
uses: mattnotmitt/doxygen-action@1.9.5
|
||||
|
1
Makefile
1
Makefile
@ -65,6 +65,7 @@ SRCS = \
|
||||
menu/views/startup.c \
|
||||
menu/views/system_info.c \
|
||||
menu/views/settings_editor.c \
|
||||
menu/views/rtc.c \
|
||||
utils/fs.c
|
||||
|
||||
FONTS = \
|
||||
|
@ -92,11 +92,11 @@ You can use a dev container in VSCode to ease development.
|
||||
|
||||
## To deploy:
|
||||
### SC64
|
||||
* Download the deployer [here](https://github.com/Polprzewodnikowy/SummerCart64/releases/download/v2.17.0/sc64-deployer-windows-v2.17.0.zip)
|
||||
* Download the deployer [here](https://github.com/Polprzewodnikowy/SummerCart64/releases/download/v2.18.0/sc64-deployer-windows-v2.18.0.zip)
|
||||
* Extract and place `sc64deployer.exe` in the `tools/sc64` directory.
|
||||
|
||||
Make sure that your firmware is compatible (currently v2.17.0+)
|
||||
See: [here](https://github.com/Polprzewodnikowy/SummerCart64/blob/v2.17.0/docs/00_quick_startup_guide.md#firmware-backupupdate)
|
||||
Make sure that your firmware is compatible (currently v2.18.0+)
|
||||
See: [here](https://github.com/Polprzewodnikowy/SummerCart64/blob/v2.18.0/docs/00_quick_startup_guide.md#firmware-backupupdate)
|
||||
|
||||
|
||||
#### From the devcontainer
|
||||
|
@ -6,8 +6,9 @@
|
||||
#include "constants.h"
|
||||
#include "utils/fs.h"
|
||||
|
||||
|
||||
#ifndef BOXART_DIRECTORY
|
||||
#define BOXART_DIRECTORY "sd:/menu/boxart"
|
||||
#endif
|
||||
|
||||
|
||||
static void png_decoder_callback (png_err_t err, surface_t *decoded_image, void *callback_data) {
|
||||
|
@ -148,6 +148,7 @@ static struct views_s {
|
||||
{ view_music_player_init, view_music_player_display }, // MENU_MODE_MUSIC_PLAYER
|
||||
{ view_credits_init, view_credits_display }, // MENU_MODE_CREDITS
|
||||
{ view_settings_init, view_settings_display }, // MENU_MODE_SETTINGS_EDITOR
|
||||
{ view_rtc_init, view_rtc_display }, // MENU_MODE_RTC
|
||||
{ view_load_rom_init, view_load_rom_display }, // MENU_MODE_LOAD_ROM
|
||||
{ view_load_disk_init, view_load_disk_display }, // MENU_MODE_LOAD_DISK
|
||||
{ view_load_emulator_init, view_load_emulator_display }, // MENU_MODE_LOAD_EMULATOR
|
||||
|
@ -32,6 +32,7 @@ typedef enum {
|
||||
MENU_MODE_MUSIC_PLAYER,
|
||||
MENU_MODE_CREDITS,
|
||||
MENU_MODE_SETTINGS_EDITOR,
|
||||
MENU_MODE_RTC,
|
||||
MENU_MODE_LOAD_ROM,
|
||||
MENU_MODE_LOAD_DISK,
|
||||
MENU_MODE_LOAD_EMULATOR,
|
||||
|
@ -240,11 +240,16 @@ static void show_credits (menu_t *menu) {
|
||||
menu->next_mode = MENU_MODE_CREDITS;
|
||||
}
|
||||
|
||||
static void edit_rtc (menu_t *menu) {
|
||||
menu->next_mode = MENU_MODE_RTC;
|
||||
}
|
||||
|
||||
static component_context_menu_t settings_context_menu = {
|
||||
.list = {
|
||||
{ .text = "Edit settings", .action = edit_settings },
|
||||
{ .text = "Show system info", .action = show_system_info },
|
||||
{ .text = "Show credits", .action = show_credits },
|
||||
{ .text = "Adjust RTC", .action = edit_rtc },
|
||||
COMPONENT_CONTEXT_MENU_LIST_END,
|
||||
}
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ static void draw (menu_t *menu, surface_t *d) {
|
||||
"Github:\n"
|
||||
" https://github.com/Polprzewodnikowy/N64FlashcartMenu\n"
|
||||
"Authors:\n"
|
||||
" JonesAlmighty / NetworkFusion\n"
|
||||
" Robin Jones / NetworkFusion\n"
|
||||
" Mateusz Faderewski / Polprzewodnikowy\n"
|
||||
"Credits:\n"
|
||||
" N64Brew / libdragon contributors\n"
|
||||
|
66
src/menu/views/rtc.c
Normal file
66
src/menu/views/rtc.c
Normal file
@ -0,0 +1,66 @@
|
||||
#include <time.h>
|
||||
#include "views.h"
|
||||
|
||||
// FIXME: add implementation!
|
||||
// struct {
|
||||
// uint16_t seconds;
|
||||
// uint16_t minutes;
|
||||
// uint16_t hours;
|
||||
// uint16_t day;
|
||||
// uint16_t month;
|
||||
// uint16_t year;
|
||||
// } adjusted_datetime;
|
||||
|
||||
// static void save_adjusted_datetime () {
|
||||
|
||||
// }
|
||||
|
||||
static void process (menu_t *menu) {
|
||||
if (menu->actions.back) {
|
||||
menu->next_mode = MENU_MODE_BROWSER;
|
||||
}
|
||||
}
|
||||
|
||||
static void draw (menu_t *menu, surface_t *d) {
|
||||
rdpq_attach(d, NULL);
|
||||
|
||||
component_background_draw();
|
||||
|
||||
component_layout_draw();
|
||||
|
||||
component_main_text_draw(
|
||||
ALIGN_CENTER, VALIGN_TOP,
|
||||
"ADJUST REAL TIME CLOCK\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"To set the date and time, please use the PC terminal\n"
|
||||
"application and set via USB.\n\n"
|
||||
"Current date & time: %s\n",
|
||||
menu->current_time >= 0 ? ctime(&menu->current_time) : "Unknown\n"
|
||||
);
|
||||
|
||||
component_main_text_draw(
|
||||
ALIGN_LEFT, VALIGN_TOP,
|
||||
"\n"
|
||||
"\n"
|
||||
);
|
||||
|
||||
|
||||
component_actions_bar_text_draw(
|
||||
ALIGN_LEFT, VALIGN_TOP,
|
||||
"\n" // "A: Save\n"
|
||||
"B: Back"
|
||||
);
|
||||
|
||||
rdpq_detach_show();
|
||||
}
|
||||
|
||||
|
||||
void view_rtc_init (menu_t *menu) {
|
||||
// Nothing to initialize (yet)
|
||||
}
|
||||
|
||||
void view_rtc_display (menu_t *menu, surface_t *display) {
|
||||
process(menu);
|
||||
draw(menu, display);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
#include "views.h"
|
||||
|
||||
static char *convert_boolean (int state) {
|
||||
static char *format_boolean_type (int state) {
|
||||
switch (state) {
|
||||
case 0: return "Off";
|
||||
case 1: return "On";
|
||||
@ -38,13 +38,13 @@ static void draw (menu_t *menu, surface_t *d) {
|
||||
"bgm_enabled: %s\n"
|
||||
"sound_enabled: %s\n"
|
||||
"rumble_enabled: %s\n",
|
||||
convert_boolean(menu->settings.pal60_enabled),
|
||||
convert_boolean(menu->settings.hidden_files_enabled),
|
||||
format_boolean_type(menu->settings.pal60_enabled),
|
||||
format_boolean_type(menu->settings.hidden_files_enabled),
|
||||
menu->settings.default_directory,
|
||||
convert_boolean(menu->settings.use_saves_folder),
|
||||
convert_boolean(menu->settings.bgm_enabled),
|
||||
convert_boolean(menu->settings.sound_enabled),
|
||||
convert_boolean(menu->settings.rumble_enabled)
|
||||
format_boolean_type(menu->settings.use_saves_folder),
|
||||
format_boolean_type(menu->settings.bgm_enabled),
|
||||
format_boolean_type(menu->settings.sound_enabled),
|
||||
format_boolean_type(menu->settings.rumble_enabled)
|
||||
);
|
||||
|
||||
|
||||
|
@ -47,6 +47,9 @@ void view_load_disk_display (menu_t *menu, surface_t *display);
|
||||
void view_settings_init (menu_t *menu);
|
||||
void view_settings_display (menu_t *menu, surface_t *display);
|
||||
|
||||
void view_rtc_init (menu_t *menu);
|
||||
void view_rtc_display (menu_t *menu, surface_t *display);
|
||||
|
||||
void view_load_emulator_init (menu_t *menu);
|
||||
void view_load_emulator_display (menu_t *menu, surface_t *display);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user