As stated before on the forum, I think that bugfixes in their current form are a mistake, and should have remained purely as documentation in comments rather than buildable code:
-
The goal of the disassemblies is to document the inner-workings of these games, not improve them. With that in mind, providing bugfixes is scope-creep, and forces extra work onto the disassembly maintainers, as now they have to not only point out that a bug exists, but write and test code to fix it. Improving the games should be left to forks that do not care about producing an accurate ROM.
-
People do not always agree on what a bug is, let alone what the correct fix for it is. When bugfixes exist solely as documentation, it is simple enough to just say 'this might be a bug, and it could be corrected by doing X or Y', but when the bugfixes are code which is batch-enabled with a flag, then they're essentially authoritatively declaring that 'this is a bug, and this is the correct way to fix it'.
-
Sometimes, suggesting how a bug can be fixed is way simpler and tidier than actually providing the fix. The two worst examples of this are...
- The Oil Ocean Zone background bugfix, which requires a massive custom function that is full of duplicate code from Chemical Plant Zone's background (which itself is full of duplicate code from Scrap Brain Zone's background).
- The 2-player mode sprite table page-flipping bugfix, which requires a bunch of extra code and $500 bytes of RAM to fix. This bugfix prevents people from being able to install Sonic 1's sound driver or my Clone Driver v2, as it uses up the spare RAM which those drivers would normally use.
-
Some bugfixes can only be provided as documentation, leaving the FixBugs flag ironically unable to fix every known bug. Particularly, this is the case for bugs in the game's data rather than its code. For instance, how would the FixBugs flag fix the fact that Tails's arms are the wrong colour in the Special Stages? How would it fix the fact that Aquatic Ruin Zone's block data is too large, and that decompressing it causes its buffer to overflow?
- Some data bugs could theoretically be "fixed" by having the game detect and patch erroneous data at runtime, but this is not a true bugfix and instead a workaround. This can already be seen in bugfixes which correct objects with invalid subtypes, like in
Obj45_Init. These half-solutions fail to correct the root issue and clutter the codebase with nasty hacks which could just break more things.
-
Providing bugfixes can cause some branches to be pushed out of range, requiring that extra conditional assembly logic be provided to extend those branches when bugfixes are enabled, adding yet more clutter to the codebase.
-
Bugfixed code overall just makes the codebase an inflexible mess, as users and maintainers have to constantly accommodate two sets of code, one of which they likely do not care about (a ROM-hacker would likely not care about the original buggy code, while those interested in code accuracy would not care about the bugfixes). When adding a feature, one either has to be mindful that it works with both code paths, or disregard one of them entirely and just let it break (in which case there is now a bunch of useless unused broken code all over the place, making the disassembly harder to work with).
- Having two sets of code in one codebase could be avoided by using Git branches, having one codebase that contains only the bugged code, and another which contains only the fixed code. This would solve the issue of the two sets of code conflicting with each other, but then what you really have is just a bug-fixed fork, and at that point that may as well be a third-party project because it has completely deviated from the disassembly's goal of providing a codebase which produces an accurate ROM.
-
Some bugfixes simply cannot exist without the game being refactored or optimised first to accommodate it, once again creating scope-creep where the focus is not just on fixing bugs, but changing unrelated, perfectly-working code so that the bugfix can even be there in the first place.
- One instance of this is the Spin Dash camera delay bugfix, which requires an extra byte of RAM, which is obtained by optimising a word-sized variable down to byte-sized and then repurposing the spare byte. This bugfix is modifying completely unrelated code.
- Z80 sound driver bugfixes can fall victim to this, due to the extremely limited Z80 RAM being exhausted by the introduction of extra code, requiring that size optimisations to the driver's code be added along with the bugfixes.
- Were there not $500 bytes of unused RAM conveniently lying around, then the 2-player mode sprite table page-flipping bugfix would have been the absolute worst-case version of this, as it would necessitate extensive modifications to the game to free-up the RAM needed to fix the bug.
Overall, proving fixes for every bug in the game, whilst also providing the original bugged code/data and producing an accurate ROM, is simply not feasible; these goals clash horribly and just make the disassemblies far worse than if they had just chosen to do one or the other.
As stated before on the forum, I think that bugfixes in their current form are a mistake, and should have remained purely as documentation in comments rather than buildable code:
The goal of the disassemblies is to document the inner-workings of these games, not improve them. With that in mind, providing bugfixes is scope-creep, and forces extra work onto the disassembly maintainers, as now they have to not only point out that a bug exists, but write and test code to fix it. Improving the games should be left to forks that do not care about producing an accurate ROM.
People do not always agree on what a bug is, let alone what the correct fix for it is. When bugfixes exist solely as documentation, it is simple enough to just say 'this might be a bug, and it could be corrected by doing X or Y', but when the bugfixes are code which is batch-enabled with a flag, then they're essentially authoritatively declaring that 'this is a bug, and this is the correct way to fix it'.
Sometimes, suggesting how a bug can be fixed is way simpler and tidier than actually providing the fix. The two worst examples of this are...
Some bugfixes can only be provided as documentation, leaving the
FixBugsflag ironically unable to fix every known bug. Particularly, this is the case for bugs in the game's data rather than its code. For instance, how would theFixBugsflag fix the fact that Tails's arms are the wrong colour in the Special Stages? How would it fix the fact that Aquatic Ruin Zone's block data is too large, and that decompressing it causes its buffer to overflow?Obj45_Init. These half-solutions fail to correct the root issue and clutter the codebase with nasty hacks which could just break more things.Providing bugfixes can cause some branches to be pushed out of range, requiring that extra conditional assembly logic be provided to extend those branches when bugfixes are enabled, adding yet more clutter to the codebase.
Bugfixed code overall just makes the codebase an inflexible mess, as users and maintainers have to constantly accommodate two sets of code, one of which they likely do not care about (a ROM-hacker would likely not care about the original buggy code, while those interested in code accuracy would not care about the bugfixes). When adding a feature, one either has to be mindful that it works with both code paths, or disregard one of them entirely and just let it break (in which case there is now a bunch of useless unused broken code all over the place, making the disassembly harder to work with).
Some bugfixes simply cannot exist without the game being refactored or optimised first to accommodate it, once again creating scope-creep where the focus is not just on fixing bugs, but changing unrelated, perfectly-working code so that the bugfix can even be there in the first place.
Overall, proving fixes for every bug in the game, whilst also providing the original bugged code/data and producing an accurate ROM, is simply not feasible; these goals clash horribly and just make the disassemblies far worse than if they had just chosen to do one or the other.