mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Require rgbds 0.4.2
This allows [\1] to work when \1 is hl, bc, or de The object file format has changed along with the version number
This commit is contained in:
parent
6f226f584c
commit
e485280a8a
@ -5,7 +5,7 @@ os:
|
||||
install:
|
||||
- |-
|
||||
( cd
|
||||
git clone -b v0.4.1 --depth=1 https://github.com/gbdev/rgbds
|
||||
git clone -b v0.4.2 --depth=1 https://github.com/gbdev/rgbds
|
||||
sudo make -C rgbds install
|
||||
rm -rf rgbds
|
||||
)
|
||||
|
6
FAQ.md
6
FAQ.md
@ -41,15 +41,15 @@ You need to install `gcc`. If you're using Cygwin, re-run its setup, and at "Sel
|
||||
|
||||
### "ERROR: `UNION` already defined"
|
||||
|
||||
Download [**rgbds 0.4.1**][rgbds] or newer. Older versions will not work.
|
||||
Download [**rgbds 0.4.2**][rgbds] or newer. Older versions will not work.
|
||||
|
||||
### "ERROR: Macro not defined"
|
||||
|
||||
Download [**rgbds 0.4.1**][rgbds] or newer. Older versions will not work.
|
||||
Download [**rgbds 0.4.2**][rgbds] or newer. Older versions will not work.
|
||||
|
||||
### "Expression must be 8-bit"
|
||||
|
||||
Download [**rgbds 0.4.1**][rgbds] or newer. Older versions will not work.
|
||||
Download [**rgbds 0.4.2**][rgbds] or newer. Older versions will not work.
|
||||
|
||||
### "Segmentation fault" from `rgbgfx`
|
||||
|
||||
|
18
INSTALL.md
18
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.
|
||||
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/windows) for Windows with Cygwin to install **rgbds 0.4.1**.
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/windows) for Windows with Cygwin to install **rgbds 0.4.2**.
|
||||
|
||||
**Note:** If you already have an older rgbds, you will need to update to 0.4.1. Ignore this if you have never installed rgbds before. If a version newer than 0.4.1 does not work, try downloading 0.4.1.
|
||||
**Note:** If you already have an older rgbds, you will need to update to 0.4.2. Ignore this if you have never installed rgbds before. If a version newer than 0.4.2 does not work, try downloading 0.4.2.
|
||||
|
||||
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.
|
||||
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/macos) for macOS to install **rgbds 0.4.1**.
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/macos) for macOS to install **rgbds 0.4.2**.
|
||||
|
||||
Now you're ready to [build **pokecrystal**](#build-pokecrystal).
|
||||
|
||||
@ -84,7 +84,7 @@ To install the software required for **pokecrystal**:
|
||||
sudo apt-get install make gcc git
|
||||
```
|
||||
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** from source.
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.2** from source.
|
||||
|
||||
### OpenSUSE
|
||||
|
||||
@ -94,7 +94,7 @@ To install the software required for **pokecrystal**:
|
||||
sudo zypper install make gcc git
|
||||
```
|
||||
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** from source.
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.2** from source.
|
||||
|
||||
### Arch Linux
|
||||
|
||||
@ -104,9 +104,9 @@ To install the software required for **pokecrystal**:
|
||||
sudo pacman -S make gcc git rgbds
|
||||
```
|
||||
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/arch) for Arch Linux to install **rgbds 0.4.1**.
|
||||
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/arch) for Arch Linux to install **rgbds 0.4.2**.
|
||||
|
||||
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.4.1** 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.4.2** from source.
|
||||
|
||||
### Termux
|
||||
|
||||
@ -122,7 +122,7 @@ To 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.4.1** 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.4.2** from source.
|
||||
|
||||
### Other distros
|
||||
|
||||
@ -133,7 +133,7 @@ If your distro is not listed here, try to find the required software in its repo
|
||||
- `git`
|
||||
- `rgbds`
|
||||
|
||||
If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** 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.4.2** from source.
|
||||
|
||||
Now you're ready to [build **pokecrystal**](#build-pokecrystal).
|
||||
|
||||
|
@ -11,11 +11,7 @@ ENDM
|
||||
; Design patterns
|
||||
|
||||
jumptable: MACRO
|
||||
if !STRCMP("\2", "hl")
|
||||
ld a, [hl]
|
||||
else
|
||||
ld a, [\2]
|
||||
endc
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, \1
|
||||
|
@ -82,16 +82,37 @@ for objfile in objects:
|
||||
elif magic == b'RGB9':
|
||||
obj_ver = 10 + unpack_file("<I", f)[0]
|
||||
|
||||
if obj_ver not in [6, 10, 11, 12, 13, 15]:
|
||||
if obj_ver not in [6, 10, 11, 12, 13, 15, 16]:
|
||||
print("Error: File '%s' is of an unknown format." % objfile, file=stderr)
|
||||
exit(1)
|
||||
|
||||
num_symbols = unpack_file("<II", f)[0]
|
||||
num_symbols = unpack_file("<I", f)[0]
|
||||
unpack_file("<I", f) # skip num sections
|
||||
|
||||
if obj_ver in [16]:
|
||||
node_filenames = []
|
||||
num_nodes = unpack_file("<I", f)[0]
|
||||
for x in range(num_nodes):
|
||||
unpack_file("<II", f) # parent id, parent line no
|
||||
node_type = unpack_file("<B", f)[0]
|
||||
if node_type:
|
||||
node_filenames.append(read_string(f))
|
||||
else:
|
||||
node_filenames.append("rept")
|
||||
depth = unpack_file("<I", f)[0]
|
||||
for i in range(depth):
|
||||
unpack_file("<I", f) # rept iterations
|
||||
node_filenames.reverse()
|
||||
|
||||
for x in range(num_symbols):
|
||||
sym_name = read_string(f)
|
||||
sym_type = symtype(unpack_file("<B", f)[0] & 0x7f)
|
||||
if sym_type == symtype.IMPORT:
|
||||
continue
|
||||
if obj_ver in [16]:
|
||||
sym_fileno = unpack_file("<I", f)[0]
|
||||
sym_filename = node_filenames[sym_fileno]
|
||||
else:
|
||||
sym_filename = read_string(f)
|
||||
unpack_file("<III", f)
|
||||
if sym_name not in symbols:
|
||||
|
Loading…
Reference in New Issue
Block a user