The original list only existed because the documentation was split
across multiple files. When all keywords are described in a single
document, Ctrl+F suffices to find them.
Two variables, pSection->Data and tSymbols, were previously set to
dummymem, a global variable that was otherwise not used.
As this can potentially cause alignment warnings on Clang, this commit
replaces that mechanism with a plain old NULL pointer, which is more
generally used as a dummy pointer value.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
We no longer assume that the test repos don’t exist when we run
run-tests.sh. This allows developers to choose to keep them, to allow
them to run the tests more quickly.
- Add the test repos to the .gitignore.
- Check if the directory for each repo already exists, before trying to
clone it.
- Do a git pull for each repo, to ensure that existing copies of repos
are up-to-date.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This ensures that build breaks to any of the test projects don’t immediately cause rgbds tests to fail.
On clone, I’ve set it up to pull the commits since the day before the desired commit. Sadly, this will clone more recent commits that we’re not testing, but at least it ensures that the desired commit can be checked out. This is hopefully a good enough replacement for —depth=1.
Signed-off-by: Ben10do <Ben10do@users.noreply.github.com>
Two variables, pSection->Data and tSymbols, were previously set to ‘dummymem’, a global variable that was otherwise not used.
As this can potentially cause alignment warnings on Clang, this commit replaces that mechanism with a plain old NULL pointer, which is more generally used as a dummy pointer value.
Signed-off-by: Ben10do <Ben10do@users.noreply.github.com>
We no longer assume that the test repos don’t exist when we run run-tests.sh. This allows developers to choose to keep them, to allow them to run the tests more quickly.
- Add the test repos to the .gitignore.
- Check if the directory for each repo already exists, before trying to clone it.
- Do a `git pull` for each repo, to ensure that existing copies of repos are up-to-date.
Signed-off-by: Ben10do <Ben10do@users.noreply.github.com>
A regression was spotted in rgbfix 0.3.7, where we would accidentally include the first byte of the existing checksum when calculating a global checksum. We now correctly ignore both of the existing checksum bytes.
This was spotted when running rgbfix on the Pokémon Gold/Silver betas, as they have a non-zero global checksum.
Fixes#280.
Signed-off-by: Ben10do <Ben10do@users.noreply.github.com>
The following mnemonics are now valid:
- ld
- ldh
- ldio
The following are valid as operands:
- [$ff00+c]
- [$ff00 + c]
- [c]
This is done for consistency with 'ld [$FF00+n],a' and variations of it.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
The tests are not exhaustive, there are some conditions that aren't
checked. The tests are based in the C standard rules about undefined
behaviour.
This is a compatibility break but, hopefully, all projects are using
sane values. If not, there is no guarantee that the projects will build
in any platform where RGBDS can be compiled, so it would be better to
fix them.
Even though, technically, the left shift of a negative value is always
undefined, some projects rely on its current behaviour. This is the
reason why this doesn't cause a fatal error.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
GCC has an Undefined Behavior Sanitizer (ubsan), which enables run-time
checks of undefined behaviour. It has been enabled for the `develop`
build target.
A small bug detected with it has been fixed.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
The Linux kernel expects the SPDX license tag to be in the first line of
all source code files. The reason is that they have many different
license headers, and this simplifies the work for any tool that has to
determine the license of each file.
In this project, the license headers follow the same pattern, so it
isn't useful.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
Previously, the output file was opened before trying to open the
overlay. Because of this, rgblink generated an empty output file if the
overlay couldn't be opened.
Now the overlay is opened (and checked) before the output file, so the
output file is only generated if the overlay is found.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
Rewrite rgbfix to perform most actions in memory.
Limit file operations to a small number that can be reasonably checked,
and do the majority of the actual work on a buffered header in memory
where operations won't fail.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
Limit file operations to a small number that can be reasonably checked,
and do the majority of the actual work on a buffered header in memory
where operations won't fail.