mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 14:59:05 +00:00
refactor(rom): share Mega Drive external RAM descriptor fields (#16984)
This commit is contained in:
1 parent
d1ff1a070a
commit
2b0f0fa154
1 file changed
+9
-19
@@ -721,25 +721,15 @@ const parseMegaDriveImage = (
|
||||
},
|
||||
rom: busRange(romStart, romEnd),
|
||||
ram: busRange(ramStart, ramEnd),
|
||||
external_ram: externalPresent
|
||||
? {
|
||||
present: true,
|
||||
raw_hex: hexBytes(externalRaw),
|
||||
type: externalType,
|
||||
battery_backed: knownExternal?.battery ?? null,
|
||||
access: knownExternal?.access ?? null,
|
||||
start: externalStart,
|
||||
end: externalEnd,
|
||||
}
|
||||
: {
|
||||
present: false,
|
||||
raw_hex: hexBytes(externalRaw),
|
||||
type: null,
|
||||
battery_backed: null,
|
||||
access: null,
|
||||
start: null,
|
||||
end: null,
|
||||
},
|
||||
external_ram: {
|
||||
present: externalPresent,
|
||||
raw_hex: hexBytes(externalRaw),
|
||||
type: externalPresent ? externalType : null,
|
||||
battery_backed: externalPresent ? (knownExternal?.battery ?? null) : null,
|
||||
access: externalPresent ? (knownExternal?.access ?? null) : null,
|
||||
start: externalPresent ? externalStart : null,
|
||||
end: externalPresent ? externalEnd : null,
|
||||
},
|
||||
image_bytes: image.length,
|
||||
smd_blocks: smd?.blocks ?? null,
|
||||
} satisfies MegaDriveRomMetadata;
|
||||
|
||||
Reference in new issue
Block a user