From ef2330593c7762d20865b2442d9b3e30c1b5e6f2 Mon Sep 17 00:00:00 2001 From: leo60228 Date: Wed, 29 May 2024 19:32:17 -0400 Subject: [PATCH 1/6] Don't assume bash is at /bin/bash --- Makefile | 2 +- asmdiff.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 50953be79c..21c010003b 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ MODERN_ELF_NAME := $(MODERN_ROM_NAME:.gba=.elf) MODERN_MAP_NAME := $(MODERN_ROM_NAME:.gba=.map) MODERN_OBJ_DIR_NAME := build/modern -SHELL := /bin/bash -o pipefail +SHELL := bash -o pipefail ELF = $(ROM:.gba=.elf) MAP = $(ROM:.gba=.map) diff --git a/asmdiff.sh b/asmdiff.sh index f5a7010747..aca670e324 100755 --- a/asmdiff.sh +++ b/asmdiff.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ -d "$DEVKITARM/bin/" ]]; then OBJDUMP_BIN="$DEVKITARM/bin/arm-none-eabi-objdump" From d8d4885c11dbf99538b6c474cf23f77d1b7ce95b Mon Sep 17 00:00:00 2001 From: leo60228 Date: Wed, 29 May 2024 18:53:16 -0400 Subject: [PATCH 2/6] Add NixOS install instructions --- INSTALL.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 920e03c713..964de4b68f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -354,6 +354,13 @@ Then proceed to [Choosing where to store pokeemerald (Linux)](#choosing-where-to > [install devkitARM on Arch Linux](#installing-devkitarm-on-arch-linux). +### NixOS +Run the following command to start an interactive shell with the necessary packages: +```bash +nix-shell -p pkgsCross.arm-embedded.stdenv.cc git pkg-config libpng +``` +Then proceed to [Choosing where to store pokeemerald Expansion (Linux)](#choosing-where-to-store-pokeemerald-expansion-linux). + ### Other distributions _(Specific instructions for other distributions would be greatly appreciated!)_ From c0d630ee6304df61a5304942386308a872aeb504 Mon Sep 17 00:00:00 2001 From: Alex Nash Date: Mon, 17 Jun 2024 22:45:10 -0400 Subject: [PATCH 3/6] Add support for LF line endings to gbagfx --- tools/gbagfx/jasc_pal.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/gbagfx/jasc_pal.c b/tools/gbagfx/jasc_pal.c index e5ba9c3c2f..8d4bb137d5 100644 --- a/tools/gbagfx/jasc_pal.c +++ b/tools/gbagfx/jasc_pal.c @@ -46,10 +46,14 @@ void ReadJascPaletteLine(FILE *fp, char *line) } if (c == '\n') - FATAL_ERROR("LF line endings aren't supported.\n"); + { + line[length] = 0; + + return; + } if (c == EOF) - FATAL_ERROR("Unexpected EOF. No CRLF at end of file.\n"); + FATAL_ERROR("Unexpected EOF. No LF or CRLF at end of file.\n"); if (c == 0) FATAL_ERROR("NUL character in file.\n"); From 5dac97aa5d7f562fa544a9e57b4e8ba78db3115b Mon Sep 17 00:00:00 2001 From: leo60228 Date: Thu, 20 Jun 2024 15:55:47 -0400 Subject: [PATCH 4/6] Fix pokeemerald-expansion reference in INSTALL.md --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 964de4b68f..30b5d0f25a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -359,7 +359,7 @@ Run the following command to start an interactive shell with the necessary packa ```bash nix-shell -p pkgsCross.arm-embedded.stdenv.cc git pkg-config libpng ``` -Then proceed to [Choosing where to store pokeemerald Expansion (Linux)](#choosing-where-to-store-pokeemerald-expansion-linux). +Then proceed to [Choosing where to store pokeemerald (Linux)](#choosing-where-to-store-pokeemerald-linux). ### Other distributions _(Specific instructions for other distributions would be greatly appreciated!)_ From 779855ee02226cb4da16ab6d7a7822a8b0a6e3be Mon Sep 17 00:00:00 2001 From: abcboy101 <16735361+abcboy101@users.noreply.github.com> Date: Sat, 29 Jun 2024 13:59:30 -0400 Subject: [PATCH 5/6] Decode unused JP text in berry_blender.c --- src/berry_blender.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/berry_blender.c b/src/berry_blender.c index a91cafb0fb..1242a1dad9 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -916,14 +916,14 @@ static const u8 sBlackPokeblockFlavorFlags[] = { (1 << FLAVOR_SOUR) | (1 << FLAVOR_SWEET) | (1 << FLAVOR_SPICY), }; -static const u8 sUnused[] = -{ - 0xfe, 0x02, 0x02, 0xce, 0xd0, 0x37, 0x44, 0x07, 0x1f, 0x0c, 0x10, - 0x00, 0xff, 0xfe, 0x91, 0x72, 0xce, 0xd0, 0x37, 0x44, 0x07, 0x1f, - 0x0c, 0x10, 0x00, 0xff, 0x06, 0x27, 0x02, 0xff, 0x00, 0x0c, 0x48, - 0x02, 0xff, 0x00, 0x01, 0x1f, 0x02, 0xff, 0x00, 0x16, 0x37, 0x02, - 0xff, 0x00, 0x0d, 0x50, 0x4b, 0x02, 0xff, 0x06, 0x06, 0x06, 0x06, - 0x05, 0x03, 0x03, 0x03, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x02 +static const u8 sJPText_GoodTvReady[] = _("\nいいTVができました "); // Unused +static const u8 sJPText_BadTvReady[] = _("\nダメTVができました "); // Unused +static const u8 sJPText_Flavors[][5] = {_("からい"), _("しぶい"), _("あまい"), _("にがい"), _("すっぱい")}; // Unused + +static const u8 sUnused[] = { + 6, 6, 6, 6, 5, + 3, 3, 3, 2, 2, + 3, 3, 3, 3, 2 }; static const struct WindowTemplate sBlenderRecordWindowTemplate = From 47533e3a7ebd60e54b34c6ef3a367bf19b5dd96f Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 4 Jul 2024 20:56:22 +0200 Subject: [PATCH 6/6] Berry blender's Task_HandleOpponent small fixes --- src/berry_blender.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/berry_blender.c b/src/berry_blender.c index 1242a1dad9..a5102d48fb 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -1908,7 +1908,7 @@ static void Task_HandleOpponent1(u8 taskId) static void Task_HandleOpponent2(u8 taskId) { u32 var1 = (sBerryBlender->arrowPos + 0x1800) & 0xFFFF; - u32 arrowId = sBerryBlender->playerIdToArrowId[2] & 0xFF; + u8 arrowId = sBerryBlender->playerIdToArrowId[2]; if ((var1 >> 8) > sArrowHitRangeStart[arrowId] + 20 && (var1 >> 8) < sArrowHitRangeStart[arrowId] + 40) { if (!gTasks[taskId].tDidInput) @@ -1925,11 +1925,9 @@ static void Task_HandleOpponent2(u8 taskId) } else { - u8 value; if (rand > 65) gRecvCmds[2][BLENDER_COMM_SCORE] = LINKCMD_BLENDER_SCORE_BEST; - value = rand - 41; - if (value < 25) + if (rand > 40 && rand <= 65) gRecvCmds[2][BLENDER_COMM_SCORE] = LINKCMD_BLENDER_SCORE_GOOD; if (rand < 10) CreateOpponentMissTask(2, 5); @@ -1953,7 +1951,7 @@ static void Task_HandleOpponent2(u8 taskId) static void Task_HandleOpponent3(u8 taskId) { u32 var1 = (sBerryBlender->arrowPos + 0x1800) & 0xFFFF; - u32 arrowId = sBerryBlender->playerIdToArrowId[3] & 0xFF; + u8 arrowId = sBerryBlender->playerIdToArrowId[3]; if ((var1 >> 8) > sArrowHitRangeStart[arrowId] + 20 && (var1 >> 8) < sArrowHitRangeStart[arrowId] + 40) { if (gTasks[taskId].data[0] == 0) @@ -1971,16 +1969,9 @@ static void Task_HandleOpponent3(u8 taskId) else { if (rand > 60) - { gRecvCmds[3][BLENDER_COMM_SCORE] = LINKCMD_BLENDER_SCORE_BEST; - } - else - { - s8 value = rand - 56; // makes me wonder what the original code was - u8 value2 = value; - if (value2 < 5) - gRecvCmds[3][BLENDER_COMM_SCORE] = LINKCMD_BLENDER_SCORE_GOOD; - } + else if (rand > 55 && rand <= 60) + gRecvCmds[3][BLENDER_COMM_SCORE] = LINKCMD_BLENDER_SCORE_GOOD; if (rand < 5) CreateOpponentMissTask(3, 5); }