How to combine files into 22/23? 2 x 4096 instead of 8 x 1000?

you'll need to concatenate and interleave files, the specifics will depend on your target B-Board though.l
 
Using the common 91634B-2
Is there a tutorial for interleaving? I can concentrate but don't quite understand the other.
 
What is Interleaving:
Imagine you have 2 books, each with 100 pages. and you want to combine them.

Concatenating is like taking book 1 pages 1-100 then adding book 2 pages 1-100 to the end, so you have all of the pages of book one followed by all of the pages of book 2

Interleaving is like taking page 1 from book 1 then page 1 from book2 then page 2 from book 1 then page 2 from book 2 and so on. So it alternates pages from each book.

The reason for this is that 32-pin EPROMs like a 27c1000 only has 8 bits of data per address. So if you visit a given memory address there are only 8 data pins providing data for that address (D0-D7)

But EPROMs like a 27c4096 are 16-bit, meaning that for a given address there are 16 data pins providing data for a given address (D0-D15).
the Motorola 680000 is a 16-bit CPU, so a lot of boards will use 2 8-bit ROMs in pairs to make 16 bits.
So ROM 1 will provide Data bits 0 through 7 (imagine this is book 1) and ROM 2 will provide data bits 8 through 15 (imagine this is book 2), then they'll tie the address pins together. So from the CPU's perspective it's reading a single 16-bit ROM (kind of like having both books open to the same page number next to each other.

so when transferring from pairs of 8-bit ROMs to a 16-bit ROMs you need to "interleave" the data for it to make sense.

How to Interleave:
I use a tool I built myself for this task: https://github.com/twistedsymphony/ts_rom_tool

It's a command-line python app and I use it to help me make scripts to automate this kind of conversion in a repeatable way (like building the ROM files for my multis).

but if you're doing 1-off and are more comfortable with a point-and-click application you can use Porchy's BIN-MAN software:
https://jammarcade.net/programs/

How to know which files to interleave:
In terms of which files to merge. MAME is a great resource.
check out the CPS1 driver: https://github.com/mamedev/mame/blob/master/src/mame/capcom/cps1.cpp

look at the ROM definition. So here is
Code:
/* B-Board 91634B-2 */
ROM_START( mbombrdj )
	ROM_REGION( CODE_SIZE, "maincpu", 0 )      /* 68000 code */
	ROM_LOAD16_BYTE( "mbdj_26.11e",     0x000000, 0x20000, CRC(72b7451c) SHA1(380ef57bb00f1c92d2f29e551b0a670eb5a56cb7) )   // == mbde_26.11e
	ROM_LOAD16_BYTE( "mbdj_30.11f",     0x000001, 0x20000, CRC(beff31cf) SHA1(8a3a1fa848fe8fad239d21aef1871e54bbcb582f) )
	ROM_LOAD16_BYTE( "mbdj_27.12e",     0x040000, 0x20000, CRC(4086f534) SHA1(a2b949f00035b06cb1cd01185902daca3d89d0e3) )   // == mbde_27.12e
	ROM_LOAD16_BYTE( "mbdj_31.12f",     0x040001, 0x20000, CRC(085f47f0) SHA1(ac93a196faf17b7dbe7179ce1e850d9cd7293a21) )   // == mbde_31.12f
	ROM_LOAD16_BYTE( "mbdj_24.9e",      0x080000, 0x20000, CRC(c20895a5) SHA1(35116f7ef8576753ec989647ca2f6a6131d6909f) )   // == mbde_24.9e
	ROM_LOAD16_BYTE( "mbdj_28.9f",      0x080001, 0x20000, CRC(2618d5e1) SHA1(50797c6dda04df95267ff9ef08933c17c3ce7057) )   // == mbde_28.9f
	ROM_LOAD16_BYTE( "mbdj_25.10e",     0x0c0000, 0x20000, CRC(9bdb6b11) SHA1(fbfbd6b5a72ca3237713ce43a798660f899b707d) )   // == mbde_25.10e
	ROM_LOAD16_BYTE( "mbdj_29.10f",     0x0c0001, 0x20000, CRC(3f52d5e5) SHA1(0b1ed8e876a6ec2cfb83676afe43a81e8a033e52) )   // == mbde_29.10f
	ROM_LOAD16_WORD_SWAP( "mbdj_21.6f", 0x100000, 0x80000, CRC(690c026a) SHA1(80ad780743b50750b6bfe1d4e28efe98e562233e) )   // == mbde_21.6f
	ROM_LOAD16_WORD_SWAP( "mbdj_20.5f", 0x180000, 0x80000, CRC(b8b2139b) SHA1(88c9169a9979b711ab7afb8272df0a1c80bb357b) )   // == mbde_20.5f
if you notice this is loading each ROM as "ROM_LOAD16_BYTE" which tells us that it's 16-bit data but loading 1 byte (8-bits) at a time. If you notice the 2nd parameter is the starting postiion for the data and the first ROM is at position 0x000000 and ends in 0 but the second ROM is 0x000001 and ends in 1. this means that these two ROMs make up the two that need to be interleaved to create the full 16-bits. the ends in 0 ROM is bits 0-7 and the ends in 1 ROM is bits 8-15. So these two files need to be interleaved

similarly the next pair of ROMs starts at positions 0x040000 and 0x040001 so this pair needs to be interleaved.
Also note that the 3rd parameter is the SIZE of the ROM in Hex.. all of these ROMs are 0x20000 in size (a 1Mbit ROM like 27c1000), and adding 0x20000 + 0x20000 gives you 0x40000 which is why the starting position of the 2nd pair of ROMs i 0x40000 because it starts after the data from the first pair.

If we look at that same game but the version that used 16-bit ROMs from the factory we see:
Code:
ROM_START( mbomberj )
	ROM_REGION( CODE_SIZE, "maincpu", 0 )      /* 68000 code */
	ROM_LOAD16_WORD_SWAP( "mbj_23e.8f", 0x000000, 0x80000, CRC(0d06036a) SHA1(e1b102888038b4bb612a41ac94a43333d468a245) )
	ROM_LOAD16_WORD_SWAP( "mbj_22b.7f", 0x080000, 0x80000, CRC(acd38478) SHA1(0bed74b52838006c6ec3661f92058dc2aa3e8193) )
	ROM_LOAD16_WORD_SWAP( "mbj_21a.6f", 0x100000, 0x80000, CRC(d5007b05) SHA1(c55e55908aeda40ca2318c76ccbc05d333676875) )   // == mbe_21a.6f
	ROM_LOAD16_WORD_SWAP( "mbj_20a.5f", 0x180000, 0x80000, CRC(aeb557b0) SHA1(530551942961d776f0a85852e02bb243840ca671) )   // == mbe_20a.5f
You'll notice that this is using "ROM_LOAD16_WORD_" meaning that it's loading the data 1 "WORD" (16-bits) at a time. you'll also note there are no "1" suffixes at the end of the starting position, that's because there is no interleaving going on here, since the ROMs are 16-bits the data is already in the right format in the ROM.
we'll note here that the size is 0x80000 which is twice the size of the interleaved pairs. that means four 8-bit ROMs from the original set is combined to make a single ROM for the 16-bit set. The first pair is interleaved, then the second pair is interleaved, and then the results from those two then need to be concatenated to make the final ROM file for the 16-bit ROM.

Now we'll also note that on this it ends in "_SWAP" and that means that the interleaving is BACKWARDS. Some games do this, I don't know why but when interleaving it means that the "1" suffix ROMs go first and the "0" suffix ROMs go second when interleaving.

So essentially:
(ROM 30 interleaved with ROM 26) concatenated with (ROM 31 interleaved with ROM 27) = ROM 23

---
I'll note I picked Muscle Bomber as the example because it seems to be the only game in the CPS1 driver that used your B-Board with 8-bit ROMs. So I'm kind of curious what game you're trying to convert. if it's not muscle bomber then your version may not be dumped.
 
You rock.
That is extremely helpful. :D
I am trying to use usa varth on this board and also 1941 europe because it had the japanese level order in english.
Neither came on this board originally I think. Most people use the japanese versions that are pre combined.
 
Last edited:
Back
Top