mirror of
https://github.com/zeldaret/ph
synced 2026-05-30 17:05:38 -04:00
Write ROM capacity in header
This commit is contained in:
+2
-1
@@ -577,7 +577,8 @@ int main(int argc, const char **argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
size_t romEnd = 1 << (32 - __builtin_clz(address));
|
||||
header.capacity = 15 - __builtin_clz(address);
|
||||
size_t romEnd = 1 << (17 + header.capacity);
|
||||
if (!Align(romEnd, fpRom, &address)) return 1;
|
||||
|
||||
fseek(fpRom, 0, SEEK_SET);
|
||||
|
||||
Reference in New Issue
Block a user