mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Upgrade to rgbds 0.4.0
- fail for rgbds < 0.4.0 - `rst <Label>` - `ds <count>, <byte>` - `shift <N>` - ASCII "\r" - Sorted .sym file
This commit is contained in:
parent
a325db0f14
commit
0ee9d7a48b
4
FAQ.md
4
FAQ.md
@ -38,11 +38,11 @@ You need to install `gcc`. If you're using Cygwin, re-run its setup, and at "Sel
|
||||
|
||||
### "ERROR: `UNION` already defined"
|
||||
|
||||
Download [**rgbds 0.3.9**][rgbds] or newer. Older versions will not work.
|
||||
Download [**rgbds 0.4.0**][rgbds] or newer. Older versions will not work.
|
||||
|
||||
### "Expression must be 8-bit"
|
||||
|
||||
Download [**rgbds 0.3.9**][rgbds] or newer. Older versions will not work.
|
||||
Download [**rgbds 0.4.0**][rgbds] or newer. Older versions will not work.
|
||||
|
||||
### "Segmentation fault" from `rgbgfx`
|
||||
|
||||
|
10
INSTALL.md
10
INSTALL.md
@ -38,7 +38,7 @@ Double click on the text that says "**Skip**" next to each package to select the
|
||||
|
||||
Then download [**rgbds**](https://github.com/rednex/rgbds/releases/): the latest **win64.zip** or **win32.zip** release. Extract it and put all the `exe` and `dll` files individually in **C:\cygwin64\usr\local\bin**.
|
||||
|
||||
**Note: If you already have an older rgbds, you will need to update to 0.3.9.** Ignore this if you have never installed rgbds before. If a version newer than 0.3.9 does not work, try downloading 0.3.9.
|
||||
**Note: If you already have an older rgbds, you will need to update to 0.4.0.** Ignore this if you have never installed rgbds before. If a version newer than 0.4.0 does not work, try downloading 0.4.0.
|
||||
|
||||
Now open the **Cygwin terminal** and enter the following commands.
|
||||
|
||||
@ -86,7 +86,7 @@ To install **rgbds**:
|
||||
|
||||
```bash
|
||||
sudo apt-get install pkg-config flex bison libpng-dev
|
||||
git clone -b v0.3.9 --depth=1 https://github.com/rednex/rgbds
|
||||
git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
|
||||
sudo make -C rgbds CFLAGS=-O2 install
|
||||
```
|
||||
|
||||
@ -102,7 +102,7 @@ To install **rgbds**:
|
||||
|
||||
```bash
|
||||
sudo zypper install pkg-config flex bison libpng16-devel
|
||||
git clone -b v0.3.9 --depth=1 https://github.com/rednex/rgbds
|
||||
git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
|
||||
sudo make -C rgbds CFLAGS=-O2 install
|
||||
```
|
||||
|
||||
@ -120,7 +120,7 @@ Alternatively, to install **rgbds** manually:
|
||||
|
||||
```bash
|
||||
sudo pacman -S pkg-config flex bison libpng
|
||||
git clone -b v0.3.9 --depth=1 https://github.com/rednex/rgbds
|
||||
git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
|
||||
sudo make -C rgbds CFLAGS=-O2 install
|
||||
```
|
||||
|
||||
@ -157,7 +157,7 @@ If `rgbds` is not available, you'll also need these:
|
||||
To install **rgbds**:
|
||||
|
||||
```bash
|
||||
git clone -b v0.3.9 --depth=1 https://github.com/rednex/rgbds
|
||||
git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
|
||||
sudo make -C rgbds CFLAGS=-O2 install
|
||||
```
|
||||
|
||||
|
3
Makefile
3
Makefile
@ -94,17 +94,14 @@ endif
|
||||
pokecrystal.gbc: $(crystal_obj) pokecrystal.link
|
||||
$(RGBLINK) -n pokecrystal.sym -m pokecrystal.map -l pokecrystal.link -o $@ $(crystal_obj)
|
||||
$(RGBFIX) -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@
|
||||
tools/sort_symfile.sh pokecrystal.sym
|
||||
|
||||
pokecrystal11.gbc: $(crystal11_obj) pokecrystal.link
|
||||
$(RGBLINK) -n pokecrystal11.sym -m pokecrystal11.map -l pokecrystal.link -o $@ $(crystal11_obj)
|
||||
$(RGBFIX) -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@
|
||||
tools/sort_symfile.sh pokecrystal11.sym
|
||||
|
||||
pokecrystal-au.gbc: $(crystal_au_obj) pokecrystal.link
|
||||
$(RGBLINK) -n pokecrystal-au.sym -m pokecrystal-au.map -l pokecrystal.link -o $@ $(crystal_au_obj)
|
||||
$(RGBFIX) -Cjv -i BYTU -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@
|
||||
tools/sort_symfile.sh pokecrystal-au.sym
|
||||
|
||||
|
||||
# For files that the compressor can't match, there will be a .lz file suffixed with the md5 hash of the correct uncompressed file.
|
||||
|
@ -1,3 +1,7 @@
|
||||
if __RGBDS_MINOR__ < 4
|
||||
fail "pokecrystal requires rgbds 0.4.0 or newer."
|
||||
endc
|
||||
|
||||
INCLUDE "charmap.asm"
|
||||
|
||||
INCLUDE "macros.asm"
|
||||
|
@ -115,8 +115,7 @@ InitUnownPuzzlePiecePositions:
|
||||
initpuzcoord: MACRO
|
||||
rept _NARG / 2
|
||||
db \1 puzcoord \2
|
||||
shift
|
||||
shift
|
||||
shift 2
|
||||
endr
|
||||
ENDM
|
||||
initpuzcoord 0,0, 0,1, 0,2, 0,3, 0,4, 0,5
|
||||
|
@ -9,8 +9,7 @@
|
||||
townmappals: MACRO
|
||||
rept _NARG / 2
|
||||
dn PAL_TOWNMAP_\2, PAL_TOWNMAP_\1
|
||||
shift
|
||||
shift
|
||||
shift 2
|
||||
endr
|
||||
ENDM
|
||||
|
||||
|
@ -4,8 +4,7 @@ tilepal: MACRO
|
||||
x = \1 << OAM_TILE_BANK
|
||||
rept (_NARG - 1) / 2
|
||||
dn (x | PAL_BG_\3), (x | PAL_BG_\2)
|
||||
shift
|
||||
shift
|
||||
shift 2
|
||||
endr
|
||||
ENDM
|
||||
|
||||
@ -109,7 +108,4 @@ INCLUDE "gfx/tilesets/battle_tower_inside_palette_map.asm"
|
||||
TilesetBattleTowerOutsidePalMap:
|
||||
INCLUDE "gfx/tilesets/battle_tower_outside_palette_map.asm"
|
||||
|
||||
; unused
|
||||
rept 26
|
||||
db $06
|
||||
endr
|
||||
ds 26, $06 ; unused
|
||||
|
@ -4,10 +4,12 @@ SECTION "rst0", ROM0[$0000]
|
||||
di
|
||||
jp Start
|
||||
|
||||
SECTION "rst8", ROM0[$0008] ; rst FarCall
|
||||
SECTION "rst8", ROM0[$0008]
|
||||
FarCall::
|
||||
jp FarCall_hl
|
||||
|
||||
SECTION "rst10", ROM0[$0010] ; rst Bankswitch
|
||||
SECTION "rst10", ROM0[$0010]
|
||||
Bankswitch::
|
||||
ldh [hROMBank], a
|
||||
ld [MBC3RomBank], a
|
||||
ret
|
||||
@ -18,7 +20,8 @@ SECTION "rst18", ROM0[$0018]
|
||||
SECTION "rst20", ROM0[$0020]
|
||||
rst $38
|
||||
|
||||
SECTION "rst28", ROM0[$0028] ; rst JumpTable
|
||||
SECTION "rst28", ROM0[$0028]
|
||||
JumpTable::
|
||||
push de
|
||||
ld e, a
|
||||
ld d, 0
|
||||
@ -63,4 +66,4 @@ Start::
|
||||
|
||||
; The cartridge header data is filled in by rgbfix.
|
||||
; This makes sure it doesn't get used.
|
||||
ds $0150 - $0104
|
||||
ds $0150 - @
|
||||
|
@ -4,8 +4,6 @@ INCLUDE "macros/enum.asm"
|
||||
INCLUDE "constants/hardware_constants.asm"
|
||||
INCLUDE "constants/mobile_constants.asm"
|
||||
|
||||
charmap "<CR>", $d
|
||||
|
||||
; Mobile Adapter protocol commands
|
||||
MOBILE_COMMAND_BEGIN_SESSION EQU $10
|
||||
MOBILE_COMMAND_END_SESSION EQU $11
|
||||
@ -4943,31 +4941,31 @@ Unknown_1120a4:
|
||||
Unknown_1120b0:
|
||||
db "RCPT TO:<", 0
|
||||
Unknown_1120ba:
|
||||
db "DATA<CR>\n", 0
|
||||
db "DATA\r\n", 0
|
||||
Unknown_1120c1:
|
||||
db "QUIT<CR>\n", 0
|
||||
db "QUIT\r\n", 0
|
||||
Unknown_1120c8:
|
||||
db "USER ", 0
|
||||
Unknown_1120ce:
|
||||
db "PASS ", 0
|
||||
Unknown_1120d4:
|
||||
db "STAT<CR>\n", 0
|
||||
db "STAT\r\n", 0
|
||||
Unknown_1120db:
|
||||
db "LIST 00000<CR>\n", 0
|
||||
db "LIST 00000\r\n", 0
|
||||
Unknown_1120e8:
|
||||
db "RETR 00000<CR>\n", 0
|
||||
db "RETR 00000\r\n", 0
|
||||
Unknown_1120f5:
|
||||
db "DELE 00000<CR>\n", 0
|
||||
db "DELE 00000\r\n", 0
|
||||
Unknown_112102:
|
||||
db "TOP 00000 0<CR>\n", 0
|
||||
db "TOP 00000 0\r\n", 0
|
||||
Unknown_112110:
|
||||
db "GET ", 0
|
||||
Unknown_112115:
|
||||
db " HTTP/1.0<CR>\n", 0
|
||||
db " HTTP/1.0\r\n", 0
|
||||
Unknown_112121:
|
||||
db "User-Agent: CGB-", 0
|
||||
Unknown_112132:
|
||||
db "<CR>\n<CR>\n", 0
|
||||
db "\r\n\r\n", 0
|
||||
Unknown_112137:
|
||||
db "POST ", 0
|
||||
Unknown_11213d:
|
||||
|
@ -28,8 +28,7 @@ dwcoord: MACRO
|
||||
; x, y
|
||||
rept _NARG / 2
|
||||
dw (\2) * SCREEN_WIDTH + (\1) + wTilemap
|
||||
shift
|
||||
shift
|
||||
shift 2
|
||||
endr
|
||||
ENDM
|
||||
|
||||
|
@ -32,18 +32,14 @@ ENDM
|
||||
dn: MACRO ; nybbles
|
||||
rept _NARG / 2
|
||||
db ((\1) << 4) | (\2)
|
||||
shift
|
||||
shift
|
||||
shift 2
|
||||
endr
|
||||
ENDM
|
||||
|
||||
dc: MACRO ; "crumbs"
|
||||
rept _NARG / 4
|
||||
db ((\1) << 6) | ((\2) << 4) | ((\3) << 2) | (\4)
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift 4
|
||||
endr
|
||||
ENDM
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
RGB: MACRO
|
||||
rept _NARG / 3
|
||||
dw palred (\1) + palgreen (\2) + palblue (\3)
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift 3
|
||||
endr
|
||||
ENDM
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
FarCall EQU $08
|
||||
Bankswitch EQU $10
|
||||
JumpTable EQU $28
|
||||
|
||||
farcall: MACRO ; bank, address
|
||||
ld a, BANK(\1)
|
||||
ld hl, \1
|
||||
|
@ -491,17 +491,17 @@ Function1143f3:
|
||||
jp z, .asm_1144c2
|
||||
inc e
|
||||
call z, Function1144c8
|
||||
cp $d ; CR
|
||||
cp "\r"
|
||||
jr nz, .asm_11442b
|
||||
ld a, [de]
|
||||
inc e
|
||||
call z, Function1144c8
|
||||
cp $a ; NL
|
||||
cp "\n"
|
||||
jr nz, .asm_11442b
|
||||
ld a, [de]
|
||||
cp $2e ; .
|
||||
cp "."
|
||||
jr z, .asm_1144ae
|
||||
cp $d ; CR
|
||||
cp "\r"
|
||||
jr z, .asm_1144b8
|
||||
|
||||
.asm_11444a
|
||||
@ -557,7 +557,7 @@ Function1143f3:
|
||||
inc bc
|
||||
inc e
|
||||
call z, Function1144c8
|
||||
cp $d ; "\r"
|
||||
cp "\r"
|
||||
jr nz, .asm_114486
|
||||
ld a, [de]
|
||||
inc bc
|
||||
@ -581,14 +581,14 @@ Function1143f3:
|
||||
inc e
|
||||
call z, Function1144c8
|
||||
ld a, [de]
|
||||
cp $d ; CR
|
||||
cp "\r"
|
||||
jp nz, .asm_11442b
|
||||
|
||||
.asm_1144b8
|
||||
inc e
|
||||
call z, Function1144c8
|
||||
ld a, [de]
|
||||
cp $a ; NL
|
||||
cp "\n"
|
||||
jp nz, .asm_11442b
|
||||
|
||||
.asm_1144c2
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
TEMP_FILE=$(mktemp)
|
||||
sed \
|
||||
-e "s/^..:[0-3]/0_ROM0@&/g" \
|
||||
-e "s/^..:[4-7]/1_ROMX@&/g" \
|
||||
-e "s/^..:[8-9]/2_VRAM@&/g" \
|
||||
-e "s/^..:[A-Ba-b]/3_SRAM@&/g" \
|
||||
-e "s/^00:[C-Dc-d]/4_WRAM0@&/g" \
|
||||
-e "s/^..:[D-Dd-d]/5_WRAMX@&/g" \
|
||||
-e "s/^..:[F-Ff-f]/6_HRAM@&/g" \
|
||||
$1 \
|
||||
| sort \
|
||||
| sed -e "s/^.*@//g" > $TEMP_FILE
|
||||
mv $TEMP_FILE $1
|
Loading…
Reference in New Issue
Block a user