>
-------------------------------------------------------------------------------
> 4. FILE HEADER
> -------------------------------------------------------------------------------
> 1) CREATED BY JSI/FRONT FAREAST.
> 2) 512 BYTES LENGTH. (ONE SSECTOR)
> 3) BYTE
> 0 - LOW BYTE OF 8K-BYTES PAGE COUNTS.
> 1 - HIGH BYTE OF 8K-BYTES PAGE COUNTS.
> 2 - EMULATION MODE SELECT
> BIT 76543210
> X : 1=RUN IN MODE 0. (JUMP $8000)
> X : 0=LAST FILE OF THE GAME. (MULTI FILE LOADING)
> X : 0=MODE 1, 1=MODE 2. (SRAM MAPPING)
> X : 0=MODE 20, 1=MODE 21. (DRAM MAPPING)
> XX : 0=SRAM OFF, 1=SRAM 16K, 2=SRAM 64K, 3=SRAM 256K
> X : 0=RUN IN MODE 3, 1=RUN IN MODE 2. (JMP RESET)
> X : 0=DISABLE, 1=ENABLE. (EXTERNAL CARTRIDGE MEMORY
> IMAGE AT BANK 20-5F, A0-DF
> IN SYSTEM MODE 2, 3)
> 3-7 - RESERVED. (SHOULD BE '00')
> 8 - FILE ID CODE 1. (SHOULD BE 'AA')
> 9 - FILE ID CODE 2. (SHOULD BE 'BB')
> 10 - CHECK THIS BYTE IF ID 1 AND 2 MATCH.
> '02': MAGIC GRIFFIN GAME FILE. (PC ENGINE)
> '03': MAGIC GRIFFIN SRAM DATA FAILE.
> '04': SWC&SMC GAME FILE. (SUPER MAGICOM)
> '05': SWC&SMC PASSWORD, SRAM DATA, SAVER DATA FILE.
> '06': SMD GAME FILE. (MEGA DRIVE)
> '07': SMD SRAM DATA FILE.
> 11-511 - RESERVED. (SHOULD BE '00')
> Just used the 'pre' html tag for pre-formatted text :)
> Anyways, I still don't really get it...
> 1) WTF is a 8K Page count??
> 2) What is 'Mode 0', 'Mode 1', 'Mode 2', 'Mode 3', 'Mode 20' and 'Mode 21'? How do you find out if a game uses one of them? Or are they Console specific Modes (like one different mode for Megadrive, SNES and PC-Engine games)?
> 3) What is 'external cartridge memory'?
> -- Matthias
8K byte page count is... how many 8K byte pages the game uses. So take the game size divided by 8K and that's what you put there.
I not sure about the rest but what you do if you want to get a game running is find another compatible game that you know has a good header and usually all you have to fix up is the sram size. So if the game that gets a copy protection message is 16Kb LoRom, 16K sram, look for another 16Kb LoRom 16K sram game (that you know has a good header) and copy the header over.
Oh, and it's not just external cartridge memory, you left off the rest. It's EXTERNAL CARTRIDGE MEMORY IMAGE AT BANK 20-5F, A0-DF. This probably indicates a LoRom memory mapping.