diff --git a/docs/rgbasm.5.html b/docs/rgbasm.5.html index 02f95774..d5f67a7f 100644 --- a/docs/rgbasm.5.html +++ b/docs/rgbasm.5.html @@ -1309,6 +1309,32 @@ Whenever the macro-language expects a string you can actually use a string returns the new string. +

Character + maps

+When writing text that is meant to be displayed in the Game Boy, the ASCII + characters used in the source code may not be the same ones used in the + tileset used in the ROM. For example, the tiles used for uppercase letters may + be placed starting at tile index 128, which makes it difficult to add text + strings to the ROM. +
+Character maps allow the code to map strings up to 16 characters long to an + abitrary 8-bit value: +
+
+
+CHARMAP "<LF>", 10 
+CHARMAP "&iacute", 20 
+CHARMAP "A", 128
+
+
+
+Note: Character maps affect all strings in the file + from the point in which they are defined. This means that any string that the + code may want to print as debug information will also be affected by it. +
+Note: The output value of a mapping can be 0. If + this happens, the assembler will treat this as the end of the string and the + rest of it will be trimmed.

Other functions

There are a few other functions that do various useful things: @@ -1429,6 +1455,8 @@ The options that OPT can modify are currently: b,
BANK
+
CHARMAP
+
COS
DB
@@ -1563,7 +1591,7 @@ The options that OPT can modify are currently: b, https://github.com/rednex/rgbds. - +
February 26, 2018March 13, 2018 RGBDS Manual
diff --git a/docs/rgbfix.1.html b/docs/rgbfix.1.html index d8645067..c306ba65 100644 --- a/docs/rgbfix.1.html +++ b/docs/rgbfix.1.html @@ -28,6 +28,8 @@ rgbfix [-CcjsVv] + [-f + fix_spec] [-i game_id] [-k @@ -67,6 +69,32 @@ The rgbfix program changes headers of Game Boy ROM -C takes precedence.
 
 
+
-f + fix_spec
+
Fix certain header values that the Game Boy checks for + correctness. Alternatively, intentionally trash these values by writing + their binary inverse instead. fix_spec is + a string containing any combination of the following characters: +
+
+
l
+
Fix the Nintendo logo + (0x1040x133).
+
L
+
Trash the Nintendo logo.
+
h
+
Fix the header checksum (0x14D).
+
H
+
Trash the header checksum.
+
g
+
Fix the global checksum + (0x14E0x14F).
+
G
+
Trash the global checksum.
+
+
+
 
+
 
-i game_id
Set the game ID string @@ -141,10 +169,8 @@ The rgbfix program changes headers of Game Boy ROM
 
 
-v
-
Validate the header and fix checksums: the Nintendo - character area (0x1040x133), - the header checksum (0x14D), and the global checksum - (0x14E0x14F).
+
Equivalent to -f + lhg.

EXAMPLES

Most values in the ROM header are only cosmetic. The bare minimum requirements @@ -179,7 +205,7 @@ The following will duplicate the header (sans global checksum) of the game https://github.com/rednex/rgbds. - +
January 26, 2018March 11, 2018 RGBDS Manual
diff --git a/src/asm/rgbasm.5 b/src/asm/rgbasm.5 index 73461df6..19d0db51 100644 --- a/src/asm/rgbasm.5 +++ b/src/asm/rgbasm.5 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: MIT .\" -.Dd February 26, 2018 +.Dd March 13, 2018 .Dt RGBASM 5 .Os RGBDS Manual .Sh NAME @@ -1041,6 +1041,34 @@ new string. the new string. .El .Pp +.Ss Character maps +.Pp +When writing text that is meant to be displayed in the Game Boy, the ASCII +characters used in the source code may not be the same ones used in the tileset +used in the ROM. +For example, the tiles used for uppercase letters may be placed starting at tile +index 128, which makes it difficult to add text strings to the ROM. +.Pp +Character maps allow the code to map strings up to 16 characters long to an +abitrary 8-bit value: +.Pp +.Bd -literal -offset indent +CHARMAP "", 10 +CHARMAP "í", 20 +CHARMAP "A", 128 +.Ed +.Pp +.Sy Note: +Character maps affect all strings in the file from the point in which they are +defined. +This means that any string that the code may want to print as debug information +will also be affected by it. +.Pp +.Sy Note: +The output value of a mapping can be 0. +If this happens, the assembler will treat this as the end of the string and the +rest of it will be trimmed. +.Pp .Ss Other functions There are a few other functions that do various useful things: .Pp @@ -1123,6 +1151,7 @@ machine. .It Sx ATAN .It Sx ATAN2 .It Sx BANK +.It Sx CHARMAP .It Sx COS .It Sx DB .It Sx DEF diff --git a/src/fix/rgbfix.1 b/src/fix/rgbfix.1 index 872499aa..55972ce8 100644 --- a/src/fix/rgbfix.1 +++ b/src/fix/rgbfix.1 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: MIT .\" -.Dd January 26, 2018 +.Dd March 11, 2018 .Dt RGBFIX 1 .Os RGBDS Manual .Sh NAME