Commit Graph

1590 Commits

Author SHA1 Message Date
Rangi
f3dbf17b78 AUTHORS and more copyright comments are redundant with CONTRIBUTORS.rst (#1227) 2023-11-07 17:57:59 -05:00
Rangi
8eeb40cca8 Implement #"raw strings" (#1122)
Fixes #1121
2023-11-07 23:48:23 +01:00
Rangi
9fc088dcb0 Fix the FOR loop count formula (#1222) 2023-11-07 23:43:46 +01:00
Rangi
5379e51094 Make requested revisions to recent PRs (#1195) 2023-11-07 23:11:08 +01:00
Rangi
05a0905582 Fix the rgbgfx color curve (#1200) 2023-11-07 22:24:37 +01:00
Rangi
1e70e703a7 Build everything as C++ (#1176) 2023-11-07 21:45:56 +01:00
Rangi42
02f9128d07 Make some changes noticed while porting to C++ 2023-11-07 08:27:03 +01:00
Rangi
6ac1dd8966 Fix RGBGFX -r with -d 1 (#1224) 2023-11-07 08:25:30 +01:00
Eldred Habert
968c6f7ab7 Compute height and width directly in tile units
Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
2023-11-06 08:14:13 +01:00
ISSOtm
93285f8ea8 Fix use of input slice without dedup active 2023-11-06 08:14:13 +01:00
Rangi
28358b55fe Separate multiple instructions per line with :: (#1210) 2023-11-05 19:13:33 +01:00
Rangi
143e76b7e3 Output the map file summary at the top of the file (#1203) 2023-11-05 15:43:58 +01:00
Rangi
f8af569680 Shorten license comments and consolidate an AUTHORS file (#1217) 2023-11-05 09:54:32 +01:00
Rangi
259ec58140 Implement ENDSECTION (#1211) 2023-11-04 23:41:17 +01:00
Rangi
46e67ee078 Remove deprecated RGBASM features (#1215)
- Escaped commas "\," inside strings
- `name: MACRO` syntax
- `__FILE__` and `__LINE__`
- `-H/--nop-after-halt` and `-l/--auto-ldh` on by default
2023-11-04 23:22:46 +01:00
Rangi
c869edd1d2 Implement SIZEOF and STARTOF for section types (#1205) 2023-11-03 08:50:04 +01:00
Rangi
8f3369fe29 Implement DS for linker scripts (#1206) 2023-11-03 08:47:22 +01:00
Rangi
9e4b9e75e3 Sort symbols by address, then parentage, then index (#1186) 2023-11-02 23:58:25 +01:00
Rangi
181512ad9d Implement INCHARMAP function (#1184) 2023-11-02 20:14:54 +01:00
Rangi
5a25c547ab Allow rgbgfx to generate a palette from a spec, without an image (#1192) 2023-11-02 20:12:48 +01:00
Rangi
0d72ba886b Consistent behavior with missing or incorrect parameters (#1179) 2023-11-02 17:40:40 +01:00
Rangi42
a64f28de5c Avoid using %# printf specifier 2023-11-02 17:38:10 +01:00
Rangi42
b4dbb5093a Warn when SGB compatibility is set without old licensee 0x33 2023-11-02 17:38:10 +01:00
Rangi
bb7c34db65 Deprecate DEF-less definitions (#1193) 2023-11-02 10:18:59 +01:00
Rangi
32bc68d06d Don't export anonymous labels (#1185) 2023-11-01 00:06:28 +01:00
Rangi
79948be3a0 Improve incorrect object file revision error (#1189)
Fixes #1118
2023-10-31 15:04:27 -04:00
Rangi42
45c2a5e4ec Consistently use uppercase hex digits 2023-10-31 14:28:38 -04:00
Rangi
84f3cb4075 ENDL restores the label scope from before LOAD (#1180) 2023-10-26 22:58:36 +02:00
Rangi
22def89760 Save and restore opt r on the stack. (#1178)
Fixes #1174
2023-10-26 22:54:42 +02:00
Quinn
944c5f0cd0 Implement order-independent purge (#1173)
Each symbol passed to purge is collected in a list before mass removal.
Fixes the issue described in gbdev/rgbds issue #1152.

---------

Co-authored-by: Rangi42 <remy.oukaour+rangi42@gmail.com>
2023-10-25 22:34:56 +02:00
ISSOtm
cfe432ea65 Enforce that transparent colours take slot #0 in all palettes 2023-08-26 23:23:28 +02:00
Damian Yerrick
e1f0a13e5a Allow defining local labels for another scope (#1159)
fix #1157 for the following source code

```
section "hSAVE_locals",HRAM
func3.hSpam: ds 1  ; no longer produces an error
;.hEggs: ds 1      ; uncomment this to see the new error

section "demo",ROM0
func3:
  ldh a, [.hSpam]
  ret
```

Remove two errors:
- `Not currently in the scope of 'func3'`
- `Local label 'func3.hSpam' in main scope`

Add one error:
- `Relative local label '.hSpam' in main scope`

Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
2023-08-20 02:29:53 +02:00
Evie
a0dfa916e6 Fix off-by-one error in "scramble spec" validation (#1144) 2023-06-16 09:28:19 +02:00
Eldred Habert
2023d9ed99 Fix palmap option using wrong file name 2023-02-21 12:05:39 +01:00
ISSOtm
33a0857b8d Properly detect tiles with more than 4 colours
Fixes #1127, which was caused by a dumb logic error. Duh me.
2023-02-08 00:21:05 +01:00
Eldred Habert
50aaa6524d Fix -w not coercing WRAMX sections to WRAM0
Fixes #1116
2022-12-21 23:43:57 +01:00
Rangi
01f1703dfb Preserve \@ through INCLUDE
Fixes #1112
2022-12-11 18:56:03 +01:00
ISSOtm
75a07a90f8 Always initialise section->data to avoid an uninit read
The addition of SDCC objects required a change in the logic of
`mergeSections()` to dispatch based on `->data` instead of
`sect_HasData`, which implicitly assumes that `->data` is
always initialised (maybe NULL).
However, RGBDS sections did not do that!
2022-12-02 22:39:31 +01:00
ISSOtm
3e5cd8ce1a Use a special name for stdin/stdout in diagnostics 2022-11-15 19:49:04 +01:00
ISSOtm
6902387991 Allow rgbgfx - for stdin and stdout
Closes #1087
2022-11-15 19:49:04 +01:00
Rangi
79748afdc4 Align the "; Next union/fragment" comments with their symbols 2022-11-06 23:55:15 +01:00
Rangi
32cb0558e4 Print "; Next union/fragment" between "pieces" in .map file
Resolves #1099
2022-11-06 23:55:15 +01:00
rlewicki
92b2ac3c8c Remove duplicated EMPTY label in case no bank memory is used 2022-11-03 19:54:21 +01:00
rlewicki
0e67298dff Fix indention when writing EMPTY label inside link output.c file 2022-11-03 19:54:21 +01:00
ISSOtm
c8e602dec1 Mangle the name of absolute sections
They are unlikely to be unique across files, actually
2022-10-15 23:16:04 +02:00
ISSOtm
930c2ac328 Require Bison 3.0.0 in CMakeLists
We actually require that version, so be explicit about it
to provide better error messages.
2022-10-13 11:02:33 +02:00
ISSOtm
12ba057b4f Check that colour slot is non-empty before checking for gray-ness
This is otherwise UB, and trips a GLIBCXX assertion (when enabled).
2022-10-11 21:39:32 +02:00
ISSOtm
0e0876b17f Print addr ranges for empty blocks as well
Mirrors what sections do, for clarity & consistency
2022-10-07 16:04:02 +02:00
ISSOtm
d90a7e4302 Terminate RGBGFX when opening a file fails
`std::filebuf::open`'s result must be checked, though that's not obvious.
2022-10-04 13:58:05 +02:00
ISSOtm
7377a14245 Improve RGBASM's "input files" error messages slightly 2022-10-03 17:17:19 +02:00