Fix overdumping 16KB nrom/cnrom

This commit is contained in:
beyondcoast 2019-04-21 17:17:32 -05:00
parent 577277cd2b
commit 8f9e5bb3c2
2 changed files with 5 additions and 2 deletions

View File

@ -110,6 +110,8 @@ local function dump_prgrom( file, rom_size_KB, debug )
--same as NROM
local KB_per_read = 32
if rom_size_KB < KB_per_read then KB_per_read = rom_size_KB end
local num_reads = rom_size_KB / KB_per_read
local read_count = 0
local addr_base = 0x08 -- $8000

View File

@ -95,9 +95,10 @@ end
--dump the PRG ROM
local function dump_prgrom( file, rom_size_KB, debug )
--PRG-ROM dump all 32KB, most of this code is overkill for NROM.
-- but follows same format as banked mappers
local KB_per_read = 32
-- Handle 16KB nroms.
if rom_size_KB < KB_per_read then KB_per_read = rom_size_KB end
local num_reads = rom_size_KB / KB_per_read
local read_count = 0
local addr_base = 0x08 -- $8000