mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-16 18:30:50 +12:00
Require rgbds 0.5.1
This allows new features: \<10> macro args, SECTION UNION, SIZEOF/STARTOF, and CHARLEN/CHARSUB
This commit is contained in:
parent
c8626595b4
commit
82f31b05c1
|
@ -9,7 +9,7 @@ install:
|
||||||
HOMEBREW_NO_AUTO_UPDATE=1 brew install bison
|
HOMEBREW_NO_AUTO_UPDATE=1 brew install bison
|
||||||
export PATH="/usr/local/opt/bison/bin:$PATH"
|
export PATH="/usr/local/opt/bison/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
git clone -b v0.5.0 --depth=1 https://github.com/gbdev/rgbds
|
git clone -b v0.5.1 --depth=1 https://github.com/gbdev/rgbds
|
||||||
sudo make -C rgbds install
|
sudo make -C rgbds install
|
||||||
rm -rf rgbds
|
rm -rf rgbds
|
||||||
)
|
)
|
||||||
|
|
22
INSTALL.md
22
INSTALL.md
|
@ -42,9 +42,9 @@ Run setup and leave the default settings. At the "**Select Packages**" step, cho
|
||||||
|
|
||||||
Double click on the text that says "**Skip**" next to each package to select the most recent version to install.
|
Double click on the text that says "**Skip**" next to each package to select the most recent version to install.
|
||||||
|
|
||||||
Then follow the [**rgbds** install instructions](https://rgbds.gbdev.io/install/windows) for Windows with Cygwin to install **rgbds 0.5.0**.
|
Then follow the [**rgbds** install instructions](https://rgbds.gbdev.io/install/windows) for Windows with Cygwin to install **rgbds 0.5.1**.
|
||||||
|
|
||||||
**Note:** If you already have an older rgbds, you will need to update to 0.5.0. Ignore this if you have never installed rgbds before. If a version newer than 0.5.0 does not work, try downloading 0.5.0.
|
**Note:** If you already have an older rgbds, you will need to update to 0.5.1. Ignore this if you have never installed rgbds before. If a version newer than 0.5.1 does not work, try downloading 0.5.1.
|
||||||
|
|
||||||
Now open the **Cygwin terminal** and enter the following commands.
|
Now open the **Cygwin terminal** and enter the following commands.
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ Install [**Homebrew**](https://brew.sh/). Follow the official instructions.
|
||||||
|
|
||||||
Open **Terminal** and prepare to enter commands.
|
Open **Terminal** and prepare to enter commands.
|
||||||
|
|
||||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/macos) for macOS to install **rgbds 0.5.0**.
|
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/macos) for macOS to install **rgbds 0.5.1**.
|
||||||
|
|
||||||
Now you're ready to [build **pokered**](#build-pokered).
|
Now you're ready to [build **pokered**](#build-pokered).
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ To install the software required for **pokered**:
|
||||||
sudo apt-get install make gcc git
|
sudo apt-get install make gcc git
|
||||||
```
|
```
|
||||||
|
|
||||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.0** from source.
|
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.1** from source.
|
||||||
|
|
||||||
### OpenSUSE
|
### OpenSUSE
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ To install the software required for **pokered**:
|
||||||
sudo zypper install make gcc git
|
sudo zypper install make gcc git
|
||||||
```
|
```
|
||||||
|
|
||||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.0** from source.
|
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.1** from source.
|
||||||
|
|
||||||
### Arch Linux
|
### Arch Linux
|
||||||
|
|
||||||
|
@ -104,9 +104,9 @@ To install the software required for **pokered**:
|
||||||
sudo pacman -S make gcc git
|
sudo pacman -S make gcc git
|
||||||
```
|
```
|
||||||
|
|
||||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/arch) for Arch Linux to install **rgbds 0.5.0**.
|
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/arch) for Arch Linux to install **rgbds 0.5.1**.
|
||||||
|
|
||||||
If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.0** from source.
|
If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.1** from source.
|
||||||
|
|
||||||
### Termux
|
### Termux
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ To install **rgbds**:
|
||||||
sudo apt install rgbds
|
sudo apt install rgbds
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.0** from source.
|
If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.1** from source.
|
||||||
|
|
||||||
### Other distros
|
### Other distros
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ If your distro is not listed here, try to find the required software in its repo
|
||||||
- `git`
|
- `git`
|
||||||
- `rgbds`
|
- `rgbds`
|
||||||
|
|
||||||
If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.0** from source.
|
If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.5.1** from source.
|
||||||
|
|
||||||
Now you're ready to [build **pokered**](#build-pokered).
|
Now you're ready to [build **pokered**](#build-pokered).
|
||||||
|
|
||||||
|
@ -155,8 +155,8 @@ make
|
||||||
|
|
||||||
### Build with a local rgbds version
|
### Build with a local rgbds version
|
||||||
|
|
||||||
If you have different projects that require different versions of `rgbds`, it might not be convenient to install rgbds 0.5.0 globally. Instead, you can put its files in a directory within pokered, such as `pokered/rgbds-0.5.0/`. Then specify it when you run `make`:
|
If you have different projects that require different versions of `rgbds`, it might not be convenient to install rgbds 0.5.1 globally. Instead, you can put its files in a directory within pokered, such as `pokered/rgbds-0.5.1/`. Then specify it when you run `make`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make RGBDS=rgbds-0.5.0/
|
make RGBDS=rgbds-0.5.1/
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
MAJOR EQU 0
|
MAJOR EQU 0
|
||||||
MINOR EQU 5
|
MINOR EQU 5
|
||||||
PATCH EQU 0
|
PATCH EQU 1
|
||||||
|
|
||||||
wrong_rgbds: MACRO
|
wrong_rgbds: MACRO
|
||||||
fail "pokered requires rgbds v0.5.0 or newer."
|
fail "pokered requires rgbds v0.5.1 or newer."
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
IF !DEF(__RGBDS_MAJOR__) || !DEF(__RGBDS_MINOR__) || !DEF(__RGBDS_PATCH__)
|
IF !DEF(__RGBDS_MAJOR__) || !DEF(__RGBDS_MINOR__) || !DEF(__RGBDS_PATCH__)
|
||||||
|
|
|
@ -82,14 +82,14 @@ for objfile in objects:
|
||||||
elif magic == b'RGB9':
|
elif magic == b'RGB9':
|
||||||
obj_ver = 10 + unpack_file("<I", f)[0]
|
obj_ver = 10 + unpack_file("<I", f)[0]
|
||||||
|
|
||||||
if obj_ver not in [6, 10, 11, 12, 13, 15, 16, 17]:
|
if obj_ver not in [6, 10, 11, 12, 13, 15, 16, 17, 18]:
|
||||||
print("Error: File '%s' is of an unknown format." % objfile, file=stderr)
|
print("Error: File '%s' is of an unknown format." % objfile, file=stderr)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
num_symbols = unpack_file("<I", f)[0]
|
num_symbols = unpack_file("<I", f)[0]
|
||||||
unpack_file("<I", f) # skip num sections
|
unpack_file("<I", f) # skip num sections
|
||||||
|
|
||||||
if obj_ver in [16, 17]:
|
if obj_ver in [16, 17, 18]:
|
||||||
node_filenames = []
|
node_filenames = []
|
||||||
num_nodes = unpack_file("<I", f)[0]
|
num_nodes = unpack_file("<I", f)[0]
|
||||||
for x in range(num_nodes):
|
for x in range(num_nodes):
|
||||||
|
@ -109,7 +109,7 @@ for objfile in objects:
|
||||||
sym_type = symtype(unpack_file("<B", f)[0] & 0x7f)
|
sym_type = symtype(unpack_file("<B", f)[0] & 0x7f)
|
||||||
if sym_type == symtype.IMPORT:
|
if sym_type == symtype.IMPORT:
|
||||||
continue
|
continue
|
||||||
if obj_ver in [16, 17]:
|
if obj_ver in [16, 17, 18]:
|
||||||
sym_fileno = unpack_file("<I", f)[0]
|
sym_fileno = unpack_file("<I", f)[0]
|
||||||
sym_filename = node_filenames[sym_fileno]
|
sym_filename = node_filenames[sym_fileno]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue