mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-04-02 13:37:41 -05:00
patterns: Fix quirks of nes.hexpat with famiclones and miscellaneous fixes (#467)
* Add credit to ne.hexpat * Add many changes to nes.hexpat * Fixing dependance on variables declared in if statement * Added mappers and inline to NES 2.0 header, removed needless parenthesises * Add files via upload * Add files via upload * Create nsf.hexpat * Used full name of the SNES on description * Add SNES, NSF & NSFe, new description for NES * Removing erroneous condition in ips.hexpat's truncatedSize * Removing unnecessary std.string import in ips.hexpat * Added both locations for sections in PE, clearer variable names, reorganized DOS stub * Delete patterns/nsfe.hexpat * Delete patterns/nsfmetadata.hexpat * Added chunks from NSFe to NSF * Added NSFe * Fix size of truncatedSize in ips.hexpat * More mappers, deprecated tag, and constants to nes * Fixed official header's constants * Various corrections * Fix on declaration of sections, reserved words made into padding * Added hacked algorithm for longer PRG ROM size, fixed iNES check * For nes.hexpat, fixed mapper 51 still having its submapper's name * Fix bug that makes size negative on standard roms --------- Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
@@ -47,10 +47,10 @@ struct DOSHeader {
|
||||
u16 initialCSValue [[hex::spec_name("e_cs")]];
|
||||
u16 relocationsTablePointer [[hex::spec_name("e_lfarlc")]];
|
||||
u16 overlayNumber [[hex::spec_name("e_ovno")]];
|
||||
u16 reservedWords[4] [[hex::spec_name("e_res")]];
|
||||
padding[8];
|
||||
u16 oemIdentifier [[hex::spec_name("e_oemid")]];
|
||||
u16 oemInformation [[hex::spec_name("e_oeminfo")]];
|
||||
u16 otherReservedWords[10] [[hex::spec_name("e_res2")]];
|
||||
padding[20];
|
||||
u32 coffHeaderPointer [[hex::spec_name("e_lfanew")]];
|
||||
};
|
||||
|
||||
@@ -1115,7 +1115,7 @@ struct Section {
|
||||
} [[name(sectionsTable[currentSectionIndex-1].name)]];
|
||||
|
||||
Section sections[coffHeader.numberOfSections] @ coffHeader.optionalHeader.sizeOfHeaders * !sectionsTable[0].sizeOfRawData
|
||||
+ sectionsTable[0].ptrRawData * sectionsTable[0].sizeOfRawData>0;
|
||||
+ sectionsTable[0].ptrRawData * (sectionsTable[0].sizeOfRawData>0);
|
||||
|
||||
// Symbol & String Tables
|
||||
enum SectionNumberType : s16 {
|
||||
|
||||
Reference in New Issue
Block a user