From 34243afa568ffeb6433200062f0d3c9bc7c2c0ca Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 8 Jul 2026 21:10:46 +0200 Subject: Add the SectionType::Vector enum value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's actually valuable to distinguish that part of PRG-ROM that is part of the vectors segment. Signed-off-by: Miquel Sabaté Solà --- lib/xixanta/src/cfg.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/xixanta/src/cfg.rs') diff --git a/lib/xixanta/src/cfg.rs b/lib/xixanta/src/cfg.rs index 52e075e..eacc5a4 100644 --- a/lib/xixanta/src/cfg.rs +++ b/lib/xixanta/src/cfg.rs @@ -269,6 +269,8 @@ pub fn parse_cfg_file(text: &str) -> Result, String> { // realized it's CHR ROM. if header { header = false; + } else if start == 0xFFFA && size == 6 { + section_type = SectionType::Vector; } else if start == 0x0000 { section_type = SectionType::ChrRom; } else if section_type != SectionType::ChrRom { @@ -355,6 +357,8 @@ pub fn parse_nasm_cfg_file(text: &str) -> Result, String> { // realized it's CHR ROM. if header { header = false; + } else if start == 0xFFFA && size == 6 { + section_type = SectionType::Vector; } else if start == 0x0000 { section_type = SectionType::ChrRom; } else if section_type != SectionType::ChrRom { @@ -485,7 +489,7 @@ FEATURES { assert_eq!(romv.start, 0xFFFA); assert_eq!(romv.size, 0x06); assert_eq!(romv.fill, Some(0x00)); - assert_eq!(romv.section_type, SectionType::PrgRom); + assert_eq!(romv.section_type, SectionType::Vector); assert_eq!( romv.segments .iter() -- cgit v1.2.3