From 4eeb00e3aceb423785e5fffbafcfb338d60c75a5 Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Fri, 25 Aug 2023 22:23:25 +0200 Subject: [PATCH 1/9] Added rolling release --- .github/workflows/build.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d68a28a..5863ff2f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,8 @@ on: jobs: build-menu: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v3 @@ -68,6 +70,19 @@ jobs: name: SC64 path: ./output/sc64menu.n64 + - name: Upload rolling release + uses: softprops/action-gh-release@v0.1.15 + if: github.ref == 'refs/heads/main' + with: + name: Rolling release + body: Latest rolling release built from latest commit on `main` branch. + prerelease: true + files: | + ./output/menu.bin + ./output/OS64.v64 + ./output/OS64P.v64 + ./output/sc64menu.n64 + generate-docs: runs-on: ubuntu-latest permissions: @@ -87,13 +102,3 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./output/docs - -# release-sc64-menu: -# runs-on: ubuntu-latest -# needs: minify-sc64-menu - -# steps: -# - name: Generate release -# if: github.event_name == 'release' && github.event.action == 'created' -# run: | -# echo "still release preview. Check actions for build assets." From 0eeee72c1152c97f6cacc96075c9b356290ecedc Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Fri, 25 Aug 2023 22:29:09 +0200 Subject: [PATCH 2/9] Fixed rolling release build --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5863ff2f..a3915d0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,6 +76,7 @@ jobs: with: name: Rolling release body: Latest rolling release built from latest commit on `main` branch. + tag_name: rolling-release prerelease: true files: | ./output/menu.bin From b2757ca1a63ad5df6689e1a698de8e2ed3461e5f Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Fri, 25 Aug 2023 22:41:51 +0200 Subject: [PATCH 3/9] Fixed rolling release build --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a3915d0b..4ae0dec2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,8 +11,6 @@ on: jobs: build-menu: runs-on: ubuntu-latest - permissions: - contents: write steps: - uses: actions/checkout@v3 From 8b9c2247b5ebdaed012b6046652171402e077da8 Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Fri, 25 Aug 2023 22:46:29 +0200 Subject: [PATCH 4/9] Added missing ROM in rolling release --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ae0dec2..6b37477f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,8 +75,8 @@ jobs: name: Rolling release body: Latest rolling release built from latest commit on `main` branch. tag_name: rolling-release - prerelease: true files: | + ./output/N64FlashcartMenu.n64 ./output/menu.bin ./output/OS64.v64 ./output/OS64P.v64 From 3bb466dfb614c44186c202e4d04fb6f0951d8cc3 Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Fri, 25 Aug 2023 22:57:38 +0200 Subject: [PATCH 5/9] Use different action for rolling release --- .github/workflows/build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b37477f..d2a577fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,12 +69,13 @@ jobs: path: ./output/sc64menu.n64 - name: Upload rolling release - uses: softprops/action-gh-release@v0.1.15 + uses: marvinpinto/action-automatic-releases@v1.2.1 if: github.ref == 'refs/heads/main' with: - name: Rolling release - body: Latest rolling release built from latest commit on `main` branch. - tag_name: rolling-release + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: rolling-release + prerelease: false + title: Rolling release files: | ./output/N64FlashcartMenu.n64 ./output/menu.bin From 5cdda70c69297518fe2ebf55c349c98ef9157b1b Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Sun, 27 Aug 2023 18:44:50 +0200 Subject: [PATCH 6/9] Changed rolling release GitHub action --- .github/workflows/build.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2a577fe..ff53f62f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,14 +68,20 @@ jobs: name: SC64 path: ./output/sc64menu.n64 - - name: Upload rolling release - uses: marvinpinto/action-automatic-releases@v1.2.1 + - name: Delete rolling-release tag and release + uses: dev-drprasad/delete-tag-and-release@v1.0 if: github.ref == 'refs/heads/main' with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: rolling-release - prerelease: false - title: Rolling release + github_token: ${{ secrets.GITHUB_TOKEN }} + tag_name: rolling-release + + - name: Upload rolling release + uses: softprops/action-gh-release@v0.1.15 + if: github.ref == 'refs/heads/main' + with: + name: Rolling release + body: Rolling release built from latest commit on `main` branch. + tag_name: rolling-release files: | ./output/N64FlashcartMenu.n64 ./output/menu.bin From be1b3b1ab35f13671af1ff452b2814ad85725b3d Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Sun, 27 Aug 2023 18:52:03 +0200 Subject: [PATCH 7/9] Boot improvements --- src/boot/boot.c | 2 +- src/boot/boot_io.h | 2 ++ src/boot/reboot.S | 54 ++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/src/boot/boot.c b/src/boot/boot.c index 901c2eb9..da6035d5 100644 --- a/src/boot/boot.c +++ b/src/boot/boot.c @@ -93,7 +93,7 @@ void boot (boot_params_t *params) { while (cpu_io_read(&SP->DMA_BUSY)); cpu_io_write(&PI->SR, PI_SR_CLR_INTR | PI_SR_RESET); - while (cpu_io_read(&VI->CURR_LINE) != 2); + while ((cpu_io_read(&VI->CURR_LINE) & ~(VI_CURR_LINE_FIELD)) != 0); cpu_io_write(&VI->V_INTR, 0x3FF); cpu_io_write(&VI->H_LIMITS, 0); cpu_io_write(&VI->CURR_LINE, 0); diff --git a/src/boot/boot_io.h b/src/boot/boot_io.h index 1029d99c..2eede3b5 100644 --- a/src/boot/boot_io.h +++ b/src/boot/boot_io.h @@ -157,6 +157,8 @@ typedef struct { #define VI_CR_PIXEL_ADVANCE_3 (1 << 15) #define VI_CR_DITHER_FILTER_ON (1 << 16) +#define VI_CURR_LINE_FIELD (1 << 0) + typedef struct { io32_t MADDR; diff --git a/src/boot/reboot.S b/src/boot/reboot.S index ef716650..3e5c5c1a 100644 --- a/src/boot/reboot.S +++ b/src/boot/reboot.S @@ -7,14 +7,15 @@ #define RI_REFRESH 0x10 #define RI_LATENCY 0x14 -#define RI_MODE_RESET 0x0000000C +#define RI_MODE_RESET 0x00000000 #define RI_MODE_STANDBY 0x0000000E #define RDRAM_RESET_DELAY 1024 +#define RDRAM_STANDBY_DELAY 512 #define IPL3_ENTRY 0xA4000040 - +.set noat .section .text.reboot, "ax", %progbits .type reboot, %object reboot_start: @@ -22,7 +23,6 @@ reboot_start: # NOTE: CIC x105 requirement ipl2: -.set noat .set noreorder lui $t5, 0xBFC0 1: @@ -34,30 +34,66 @@ ipl2: lw $t0, 0x24($t5) lui $t3, 0xB000 .set reorder -.set at reboot_entry: .equ reboot_entry_offset, ((. - reboot_start) / 4) .global reboot_entry_offset + bnez $s5, reset_rdram_skip + reset_rdram: li $t0, RI_ADDRESS li $t1, RI_MODE_RESET sw $t1, RI_MODE($t0) + + li $t2, RDRAM_RESET_DELAY +1: + addiu $t2, (-1) + bnez $t2, 1b + sw $zero, RI_CONFIG($t0) sw $zero, RI_CURRENT_LOAD($t0) sw $zero, RI_SELECT($t0) sw $zero, RI_REFRESH($t0) - li $t2, RDRAM_RESET_DELAY -delay: - addiu $t2, $t2, (-1) - bnez $t2, delay - li $t1, RI_MODE_STANDBY sw $t1, RI_MODE($t0) + li $t2, RDRAM_STANDBY_DELAY +1: + addiu $t2, (-1) + bnez $t2, 1b +reset_rdram_skip: + + move $at, $zero + move $v0, $zero + move $v1, $zero + move $a0, $zero + move $a1, $zero + move $a2, $zero + move $a3, $zero + move $t0, $zero + move $t1, $zero + move $t2, $zero + move $t3, $zero + move $t4, $zero + move $t5, $zero + move $t6, $zero + move $t7, $zero + move $s0, $zero + move $s1, $zero + move $s2, $zero + move $t8, $zero + move $t9, $zero + move $k0, $zero + move $k1, $zero + move $gp, $zero + move $s8, $zero + move $ra, $zero + + mtc0 $zero, $9 + run_ipl3: li $t3, IPL3_ENTRY jr $t3 From ab8100f6b9782b47488d41bb2a5782ed9154fcc5 Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Sun, 27 Aug 2023 19:30:29 +0200 Subject: [PATCH 8/9] Added option to set default directory --- src/menu/views/browser.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/menu/views/browser.c b/src/menu/views/browser.c index 10fd5ed8..1e7e0811 100644 --- a/src/menu/views/browser.c +++ b/src/menu/views/browser.c @@ -168,11 +168,11 @@ static bool pop_directory (menu_t *menu) { return false; } -void show_properties (menu_t *menu) { +static void show_properties (menu_t *menu) { menu->next_mode = MENU_MODE_FILE_INFO; } -void delete_entry (menu_t *menu) { +static void delete_entry (menu_t *menu) { int selected = menu->browser.selected; path_t *path = path_clone_push(menu->browser.directory, menu->browser.entry->name); @@ -206,10 +206,17 @@ void delete_entry (menu_t *menu) { menu->browser.entry = menu->browser.selected >= 0 ? &menu->browser.list[menu->browser.selected] : NULL; } +static void set_default_directory (menu_t *menu) { + free(menu->settings.default_directory); + menu->settings.default_directory = strdup(strip_sd_prefix(path_get(menu->browser.directory))); + settings_save(&menu->settings); +} + static component_context_menu_t entry_context_menu = { .list = { - { .text = "Properties", .action = show_properties }, - { .text = "Delete", .action = delete_entry }, + { .text = "Show entry properties", .action = show_properties }, + { .text = "Delete selected entry", .action = delete_entry }, + { .text = "Set current directory as default", .action = set_default_directory }, COMPONENT_CONTEXT_MENU_LIST_END, } }; From 9eb6a0270709df289f67e3086f3c2be0171be27c Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Mon, 28 Aug 2023 00:58:01 +0100 Subject: [PATCH 9/9] Improve README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 23d439df..2809611c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source menu for N64 flashcarts. ## Current (notable) menu features * Fully Open Source. -* Loads all known N64 games (including iQue and byteswapped ROMs). +* Loads all known N64 games (including iQue and Aleck64 ROMs (even if they are byteswapped)). * Emulator support (NES, SNES, GB, GBC) ROMs. * N64 ROM box image support. * Background image (PNG) support.