Commit Graph

2347 Commits

Author SHA1 Message Date
ISSOtm
18e83c17b4 Add a few more linker script tests 2024-02-19 00:23:08 +01:00
Rangi42
3860ab11c7 Reformat some deeply-indented lines 2024-02-18 18:14:13 -05:00
ISSOtm
1b08a12b26 Ensure that mid-section align 16 makes PC constant
This makes `align 16` a sort of `org`, which is *very* useful :)
2024-02-18 17:53:56 -05:00
ISSOtm
36dad4380e Honor alignment offset for ALIGN[16, N]
The *one* place where it was missed...
2024-02-18 17:53:56 -05:00
ISSOtm
b100c8ebee Add several tests for linker script syntax
Fixes a slice of #1276
2024-02-18 23:25:58 +01:00
ISSOtm
0769694839 Report mismatched file better when diff fails 2024-02-18 23:25:58 +01:00
ISSOtm
4064e4a7a9 Only look for linkerscripts in the same dir as the asm file 2024-02-18 23:25:58 +01:00
Eldred Habert
efaef7039e Make sure to detect Git info from *our* Git repo (#1303) 2024-02-18 17:08:30 -05:00
Rangi42
580b7ec5be Avoid links that just say "here" 2024-02-18 15:06:55 -05:00
Rangi42
bd56405aae Remove now-unnecessary indentation of code blocks 2024-02-18 15:02:17 -05:00
Rangi42
2dee0fc536 Refer to https URLs when applicable 2024-02-18 14:58:46 -05:00
Rangi42
26f150220b Update some contributors 2024-02-18 20:44:23 +01:00
Rangi42
289910fe83 Convert reStructuredText to Markdown 2024-02-18 20:44:23 +01:00
Rangi42
f1b6ef204d Fix some reStructuredText 2024-02-18 14:09:37 -05:00
Sylvie
8a49a0b714 Report "<stdin>" or "<stdout>" when using "-" as a filename placeholder (#1297)
Also fix a memory leak with `targetFileNames`
2024-02-18 17:07:25 +01:00
Sylvie
c07f3da9a1 Provide guidance to remove the deprecated rgbasm flags (#1296)
* Explain to remove the deprecated rgbasm flags

* Rephrase deprecation warnings
2024-02-18 16:16:15 +01:00
Sylvie
d71a161bc9 Phrase error messages as "Failed to", not "Could not" or "Couldn't" (#1298) 2024-02-18 14:52:31 +01:00
Sylvie
ef0d973187 Truncate long format spec strings before using them (#1299)
Fixes #1293
2024-02-18 14:27:03 +01:00
Rangi42
a5ceaa3664 Use semicolons, not comma splices 2024-02-17 09:43:22 -05:00
Marcus Huderle
a37285eae9 Fix two instances of possible infinite loops in the linker (#1292) 2024-02-08 11:46:04 +01:00
ISSOtm
8d48cc79a2 Update to Zlib 1.3.1 2024-02-08 11:08:08 +01:00
Rangi42
3741510108 Use rgbasm -I, not -i 2024-01-29 16:41:06 -05:00
Sylvie
66fd5a7062 Fix some usually disabled compiler warnings (#1286)
* Fixes from temporarily re-enabling more compiler warnings

* More edits suggested by cppcheck

* Fix hanging on append_yylval_string

* Fix FOR loop increment
2024-01-18 20:47:20 +01:00
Rangi
d179f3ed28 Increment object file revision number to 10 (#1287) 2024-01-09 18:55:05 +01:00
Rangi42
eaed9eee5b Gameboy -> Game Boy 2024-01-03 11:28:02 -05:00
ISSOtm
08f3e360c9 Release v0.7.0 v0.7.0 2023-12-31 13:18:52 +01:00
ISSOtm
0524eeb61a Remove .Tg macro
Downstream support seems to be too sparse for the time being,
not worth the tiny gain we get from it
2023-12-31 13:18:37 +01:00
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