pub fn raw_6502_load_addr(bytes: &[u8]) -> Option<u64>Expand description
Detect “this is a 6502 raw ROM image” inputs. The convention is
that 6502 binaries place vectors (NMI/RESET/IRQ) at the top of
the 16-bit address space, $FFFA-$FFFF. For an image of length L,
the natural load address is 0x10000 - L so the image extends
exactly to $FFFF.
v0 heuristic: accept files in [6, 65536] bytes whose reset
vector at $FFFC under that load address points back into the
image. WozMon (256 bytes, load $FF00, reset $FF00) matches.