Commit Graph

2520 Commits

Author SHA1 Message Date
Rangi
b0f2f0ffd6 Allow fewer tRNS entries than PLTE colors (#1284) 2023-12-31 12:47:53 +01:00
ISSOtm
528a4c0b70 Get rid of macOS hack to try having the filesystem cake and eat it too 2023-12-30 23:20:04 -05:00
ISSOtm
6b559e99b2 Revert "Switch to using std::filesystem (#1235)"
This reverts commit cf62ff772f.
Some functions used by this break on macOS before 10.15,
which we want to keep supporting.
2023-12-30 23:20:04 -05:00
ISSOtm
93d1d85f94 Generate macOS static bins under correct name
168950855 only did one half of the job, lol.
2023-12-29 23:25:28 +01:00
Rangi
1f3985a164 Fix build compatibility for macOS 10.14 and below (#1280)
macOS 10.15 introduced full `std::filesystem::path` support.
Before that our use of it would cause the build to fail.
This was not caught because "-mmacosx-version-min=10.9" was only
being passed to clang++ for release builds.

This passes that flag in a new static CI test build, and introduces
a hack developed by @LIJI32 to silence the availability errors,
since we use features already available in macOS 10.9.

This means we are testing both "vanilla" building,
and building static binaries using the same configuration
as during release, which should help avoiding last-minute
surprises.
2023-12-29 22:47:11 +01:00
Ron Nelson
dc5d3a7342 Fix "build from source" link in README (#1281) 2023-12-29 02:35:59 +01:00
Eldred Habert
ccf9dcb851 Improve linker scripts a little (#1275)
* Allow for optional sections in linker scripts
  These are more useful for frameworks/toolchains.

* Check for an active mem region everywhere
  Do you like segfaults? Too bad!

* Allow the address to be floating in linker scripts
  Try and make the life of SDCC interop easier.

* Also validate alignment when floating

* Overhaul the linker script manual page
  Documenting the new features, but also restructuring the
  existing documentation to make the manual page (hopefully)
  easier to understand.
2023-12-24 23:29:11 -05:00
Rangi42
7b199d7550 Fix documentation for ATAN2's (y, x) argument order 2023-12-24 03:59:01 -05:00
ISSOtm
98cecaee9e Fix some formatting errors in man pages 2023-12-24 17:12:38 +01:00
Rangi
d5cddb202c Update the man pages' dates and history (#1279) 2023-12-23 00:15:35 +01:00
Rangi42
09dbc50447 Some refactoring 2023-12-18 15:51:13 -05:00
Rangi
fdd45ab1dc Improve linker script align (#1271)
An offset is now supported, and invalid values are no longer silently
truncated, aligning behaviour with other instances of the directive.
2023-12-18 07:16:48 +01:00
Rangi
39018174c5 Scramble banks from the end of the ROM (#1273)
This is more likely to test edge cases, such as having content in banks with their highest bit set.
2023-12-17 20:14:03 -05:00
Rangi
5a3a215b0e Don't delete script.cpp after building (#1272)
Ensure consistency in linker script parser interface

Make the declaration and definition visible when compiling
so that the compiler can warn about inconsistencies.

Co-authored-by: ISSOtm <me@eldred.fr>
2023-12-17 11:42:07 -05:00
Rangi
495d701022 Use RANGE macro to abbreviate begin/end pairs (#1269) 2023-12-11 14:10:20 -05:00
Rangi
b886b7e611 Add LADX disassembly to test suite (#1265) 2023-12-11 18:21:38 +01:00
Eldred Habert
fd78a9ae83 Port linkerscript parser to Bison (#1266)
Notable side effects:
* Use the standard-conformant MSVC preproc
* Add test for linker script INCLUDE
* Improve wording of placement conflict errors
* Fix errors from not newline-terminated files
* Teach checkdiff about the linker script doc
* Call linker script "commands" "directives" instead

---------

Co-authored-by: Rangi42 <remy.oukaour+rangi42@gmail.com>
2023-12-11 02:29:37 +01:00
Antonio Vivace
ab30690854 readme: improve wording on how to reach maintainers 2023-12-10 23:10:43 +01:00
Rangi
34b2543c8b Implement -X/--max-errors for RGBASM (#1262)
Co-authored-by: Eldred Habert <me@eldred.fr>
2023-12-07 11:42:47 +01:00
Rangi
1fa289f2ee Add SameBoy's BootROMs to the test suite (#1264) 2023-12-06 22:37:59 +01:00
Rangi
22ff7ff101 Add PinoBatch's game Libbet to the test suite (#1260) 2023-12-06 10:30:11 +01:00
Rangi
1402615bc0 Refactor how Makefile invokes Bison for reusability (#1259)
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
2023-12-01 13:29:05 -05:00
Rangi
6132b77c1e Add more tests for RGBASM code coverage (#1257)
* Add more tests for RGBASM code coverage

* Use C++ unnamed parameters, not `(void)` casting

* Fix crash in `sect_AlignPC` from #1253
2023-12-01 10:21:43 -05:00
Rangi
cee3d1c859 Add more test coverage for RGBASM (#1256)
This also fixes two bugs: `-1 >>> 32` was -1 not 0, and `macro_FreeArgs` should have been called but wasn't.
2023-11-29 15:16:05 -05:00
Rangi42
b46aa0f55b colour->color, behaviour->behavior
These spellings are more common elsewhere in the codebase
2023-11-27 16:02:17 -05:00
Eldred Habert
e1220d6fc6 Acknowledge Liji's contribution to RGBGFX
Make their help with #1241 more prominent, since it won't appear in the commit log
2023-11-27 18:04:30 +01:00
Rangi
2ebd7f2ea3 Allow negative alignment offsets (#1255) 2023-11-25 09:40:20 +01:00
Rangi
756f2866bb Refactor alignment spec parsing (#1253) 2023-11-25 00:06:05 +01:00
Rangi
92836408cc Remove empty .out and .err test files (#1249)
Co-authored-by: ISSOtm <me@eldred.fr>
2023-11-24 17:52:55 -05:00
ISSOtm
c5721b749c Use proper style to document long opts
Correct mandoc style is to use `Fl \-`, not `Fl Fl`, apparently.
2023-11-24 21:41:21 +01:00
ISSOtm
6f0defbfe5 Fix shellcheck warnings in the test scripts
Making them more robust to changes.
We ought to automate this some day.

My version of ShellCheck (v0.9.0) errors on test/gfx/test.sh, though...
2023-11-24 20:54:28 +01:00
Eldred Habert
f4463b1708 Honor -c with rgbgfx -r (#1254)
Fixes #1166
2023-11-24 13:19:04 -05:00
Rangi
39e85c6dec Document pre-ASMotor history and add links (#1252) 2023-11-24 18:54:33 +01:00
ISSOtm
aa5b163944 Clean up RGBGFX's "SEE ALSO" section
Applying the previous fix there, plus reordering xrefs more usefully.
2023-11-23 18:10:45 +01:00
ISSOtm
eb237ea4e1 Update link to Pan Docs gfx overview
"Rendering" is now a much lower-level description of the rendering
process, not exactly what we are looking for there :)
2023-11-23 18:08:18 +01:00
ISSOtm
27c1237daa Fix formatting errors in man pages
As reported by the following command:
mandoc -T lint man/* | grep -v "input text line longer than 80 bytes"
(One of them also showed up as a warning while setting up Debian packaging.)
2023-11-23 18:05:55 +01:00
Rangi
a218622d73 Remove checkpatch, since it's tuned for C not C++ (#1250)
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
2023-11-22 19:26:08 +01:00
Rangi
46e29de66f Implement ds align[alignment, offset] (#1181) 2023-11-21 23:57:47 +01:00
Rangi
6f0ffcf3e1 Remove deprecated RGBGFX options (#1246) 2023-11-21 23:30:34 +01:00
Rangi
c7b39f094c Update the reverse color curve (#1241)
Based on SameBoy's "accurate modern" colour mapping.

Special thanks to @Rangi42 for her patience throughout development, @LIJI32 for researching the colour curve and helping with the creation of the reverse mapping (colour spaces are *fun*!), and @coffeevalenbat for testing :)
2023-11-21 19:41:18 +01:00
Rangi
f5ae6a80f0 Rename the RGBGFX --output-* options to --auto-* (#1245)
Fixes #1243
2023-11-21 17:52:16 +01:00
Rangi42
482160ea04 Prefer rpn_isKnown(expr) accessor to expr->isKnown directly 2023-11-21 10:46:59 -05:00
Rangi42
ad62421264 Use rpn_isKnown wrapper outside rpn.cpp 2023-11-21 10:33:35 -05:00
Rangi
083a82f6d1 Implement rgbgfx -O (#1240) 2023-11-21 10:19:44 -05:00
Eldred Habert
99671b8eb5 Avoid building test support programs by default with CMake (#1244)
Copy CMake-built test executables to test directory

Fixes CI failures on Windows.
CI should also have failed on Unices, but it turns out
we instead merely hit the fallback that the `make` path
relies on (building those executables with `make`),
which fails on Windows since `make` is not set up to
find libpng.
2023-11-21 09:54:22 -05:00
Rangi
3c0879a3c6 Fix spurious truncation warning (#1238) 2023-11-20 22:51:51 +01:00
Rangi
232416b30d Fix the hack for File::c_str to work (#1242) 2023-11-14 13:38:18 +01:00
Rangi
cf62ff772f Switch to using std::filesystem (#1235)
Allows better platform-agnostic path manipulation.
Also, using `std::optional` rather than empty strings allows
correctly handling empty arguments (treating them as such,
instead of acting as they were never passed).
2023-11-13 18:10:09 +01:00
Rangi
e824e34526 Use an iterator template for enum sequence loops (#1228) 2023-11-12 09:19:19 +01:00
Eldred Habert
d390db5c57 Remove references to C compiler from CI (#1234) 2023-11-11 20:50:36 -05:00