CPS2 rom layout
Graphics Layout[edit]
When using eproms on a normal CPS2 board, the GFX eprom space is split into two chunks. The lower chunk, and the higher chunk.
- Lower chunk consists of eproms 13,15,17,19
- Higher chunk consists of eproms 14,16,18,20
The eproms of each chunk are interleaved, so while the GFX eproms may be of different size, they are always the same size within each chunk. Some games only use one chunk, either the higher or lower. Because the way the interleaving works, you need 4 physical eproms for each chunk.
- When using F and G PAL, the split is at 16mb (half of 32mb)
- When using B pal, the split is at 8mb (half of 16mb)
- PAL D & E is not known
Details about interleaving[edit]
- First 8 bytes of low chunk: eprom 13 byte 1&2 | eprom 15 byte 1&2 | eprom 17 byte 1&2 | eprom 19 byte 1&2
- next 8 bytes of low chunk: eprom 13 byte 3&4 | eprom 15 byte 3&4 | eprom 17 byte 3&4 | eprom 19 byte 3&4
this goes on until the split of the chunks, when it starts again with the even numbered roms
- First 8 bytes of high chunk: eprom 14 byte 1&2 | eprom 16 byte 1&2 | eprom 18 byte 1&2 | eprom 20 byte 1&2
- next 8 bytes of high chunk: eprom 14 byte 3&4 | eprom 16 byte 3&4 | eprom 18 byte 3&4 | eprom 20 byte 3&4
cps2.c form MAME[edit]
With the info above, the MAME source is quite understandable
ROM_REGION( 0x1400000, "gfx", 0 ) ROMX_LOAD( "nff.13m",0x0000000,0x400000,CRC(c9fca741) SHA1(1781d4fc18b6d6f79b7b39d9bcace750fb61a5cf) , ROM_GROUPWORD | ROM_SKIP(6) ) ROMX_LOAD( "nff.15m",0x0000002,0x400000,CRC(f809d898) SHA1(a0b6af49e1780678d808c317b875161cedddb314) , ROM_GROUPWORD | ROM_SKIP(6) ) ROMX_LOAD( "nff.17m",0x0000004,0x400000,CRC(15ba4507) SHA1(bed6a82bf1dc1aa501d4c2d098115a15e18d446a) , ROM_GROUPWORD | ROM_SKIP(6) ) ROMX_LOAD( "nff.19m",0x0000006,0x400000,CRC(3dd41b8c) SHA1(676078baad789e25f6e5a79de29672587be7ff00) , ROM_GROUPWORD | ROM_SKIP(6) ) ROMX_LOAD( "nff.14m",0x1000000,0x100000,CRC(3fe3a54b) SHA1(0a8e5cae141d24fd8b3cb11796c44728b0acd69e) , ROM_GROUPWORD | ROM_SKIP(6) ) ROMX_LOAD( "nff.16m",0x1000002,0x100000,CRC(565cd231) SHA1(0aecd433fb4ca2de1aca9fbb1e314fb1f6979321) , ROM_GROUPWORD | ROM_SKIP(6) ) ROMX_LOAD( "nff.18m",0x1000004,0x100000,CRC(63ca5988) SHA1(30137fa77573c84bcc24570bccb7dba61ddb413c) , ROM_GROUPWORD | ROM_SKIP(6) ) ROMX_LOAD( "nff.20m",0x1000006,0x100000,CRC(21eb8f3b) SHA1(efa69f19a958047dd91a294c88857ed3133fcbef) , ROM_GROUPWORD | ROM_SKIP(6) )
In English, load 0x400000 bytes (4mb) from file nff.13m, start at offset 0. After each word (2 bytes), skip 6 bytes ahead. Same for rom 15m, but start at offset 2.
For nff.14m we see that the start offset is the high chunk, starting at 0x1000000 (16mb).