Skip to content

Commit

Permalink
Cult of GBA BIOS incompatibility warning
Browse files Browse the repository at this point in the history
  • Loading branch information
pinobatch committed Aug 5, 2024
1 parent b273e48 commit 4b8a79d
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ __pycache__/
/gba/*.sav
/gba/.map
/gba/compile_commands.json
/gba/tools/write_bios
/gba/tools/gba_bios.h
/nes/obj/nes/*.s
/nes/obj/nes/*.sav
/nes/obj/nes/last-commit*
Expand Down
20 changes: 20 additions & 0 deletions gba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,26 @@ or macOS, once you have installed `gba-dev` using pacman, type these:
source /etc/profile.d/devkit-env.sh
make

In 2024, unreliability of devkitPro's download servers led the team
to investigate replacing devkitARM with [Wonderful Toolchain].

Some GBA emulators, such as Mesen, do not ship with a free
reimplementation of Game Boy Advance BIOS. GBA owners can
[dump the authentic BIOS] using a GBA flash cartridge.
Emulator-only users can use [Cult of GBA's reimplementation], either
using a GNU binutils distribution (such as devkitARM or Wonderful)
to build it from source code or using the `tools/get_bios.sh`
script with a native C compiler to retrieve and unpack the copy of
Cult of GBA BIOS distributed with [SkyEmu]. **Careful:** As of
August 2024, Cult of GBA BIOS works only with the devkitARM build,
not the Wonderful build. (This has been filed as [issue #14].)

[Wonderful Toolchain]: https://wonderful.asie.pl/
[dump the authentic BIOS]: https://glazedbelmont.github.io/gbabiosdump/
[Cult of GBA's reimplementation]: https://github.com/Cult-of-GBA/BIOS
[SkyEmu]: https://github.com/skylersaleh/SkyEmu
[issue #14]: https://github.com/Cult-of-GBA/BIOS/issues/14

Contributors
------------
* Concept: Artemio Urbina [@Artemio]
Expand Down
12 changes: 12 additions & 0 deletions gba/tools/get_bios.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# Downloader for SkyEmu distribution of Cult of GBA BIOS
# Copyright 2024 Damian Yerrick
# SPDX-License-Identifier: FSFAP
#
# Script to download and produce the file gba_bios.bin based on
# Cult of GBA BIOS <https://github.com/Cult-of-GBA/BIOS>
# which is under Expat license
set -e
curl --remote-name --referer 'https://github.com/SourMesen/Mesen2/' 'https://raw.githubusercontent.com/skylersaleh/SkyEmu/555bd384f3346b7cd3103d74d5191c3b86312157/src/gba_bios.h'
gcc -std=c11 -s -Os -o write_bios write_bios.c
./write_bios
12 changes: 12 additions & 0 deletions gba/tools/write_bios.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "gba_bios.h"
static_assert(sizeof(gba_bios_bin) == 16384);
int main(void) {
FILE *outfp = fopen("gba_bios.bin", "wb");
if (!outfp) return EXIT_FAILURE;
size_t written = fwrite(gba_bios_bin, sizeof gba_bios_bin, 1, outfp);
fclose(outfp);
return !written;
}
10 changes: 5 additions & 5 deletions nes/src/helppages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ color levels.
A: Toggle bars' brightness
Select: Play 1 kHz tone

Use blue filters or some TVs'
blue-only mode to confirm
color balance. Because of
shortcuts in the NES PPU's
composite output stage,
Use blue filters or some
TVs' blue-only mode to
confirm color balance.
Because of shortcuts in the
NES PPU's composite output,
these colors are impure.
On NTSC, green and magenta
have correct hues, and
Expand Down

0 comments on commit 4b8a79d

Please sign in to comment.