Here's a PR if you'd like it. It could be useful for other GBDK folks.
The Issue:
In GBDK (2.9x) I encountered the problem where a non-MBC ROM needs to not have "#pragma bank=" in the mod2gbt output. I didn't see an option to suppress it so I've added it here.
When the toolchain is set for non-MBC mode it treats "_CODE" as 32K instead of two 16K regions (_CODE and CODE_1) . If you try to use any bank specifier (such as bank=1) then you get the error:
"ERROR: address overflow (addr c51b >= 8000)"
Add support for unbanked mode. When bank is set to zero ("0") it will suppress the "#pragma bank=" output. There is no loss of functionality (as far as I know) since "#pragma bank=0" is not supported anyway- you specify that by the absence of the bank #pragma.
Hi,
Here's a PR if you'd like it. It could be useful for other GBDK folks.
The Issue:
In GBDK (2.9x) I encountered the problem where a non-MBC ROM needs to not have "#pragma bank=" in the mod2gbt output. I didn't see an option to suppress it so I've added it here.
When the toolchain is set for non-MBC mode it treats "_CODE" as 32K instead of two 16K regions (_CODE and CODE_1) . If you try to use any bank specifier (such as bank=1) then you get the error:
"ERROR: address overflow (addr c51b >= 8000)"
This has also been discussed in more detail here: https://gbdev.gg8.se/forums/viewtopic.php?id=466
The patch:
Add support for unbanked mode. When bank is set to zero ("0") it will suppress the "#pragma bank=" output. There is no loss of functionality (as far as I know) since "#pragma bank=0" is not supported anyway- you specify that by the absence of the bank #pragma.
Fix a missing space after a "const " specifier