Fix overdumping 16KB nrom/cnrom
This commit is contained in:
parent
577277cd2b
commit
8f9e5bb3c2
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue