From c8c99fa06c3e0c017649670b58005ca8a5186a96 Mon Sep 17 00:00:00 2001 From: Pk11 Date: Fri, 14 Jan 2022 16:03:03 -0600 Subject: [PATCH] Show size of ROM in blocks too --- arm9/src/rom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arm9/src/rom.c b/arm9/src/rom.c index 20bad4c..9590a9d 100644 --- a/arm9/src/rom.c +++ b/arm9/src/rom.c @@ -182,8 +182,10 @@ void printRomInfo(char const* fpath) //file size { iprintf("Size: "); - printBytes(getRomSize(fpath)); - iprintf("\n"); + unsigned long long romSize = getRomSize(fpath); + printBytes(romSize); + //size in blocks, rounded up + iprintf(" (%lld blocks)\n", ((romSize / BYTES_PER_BLOCK) * BYTES_PER_BLOCK + BYTES_PER_BLOCK) / BYTES_PER_BLOCK); } iprintf("Label: %.12s\n", h->ndshdr.gameTitle);