It seems the official version cannot support kovshp ? Who have stuff or code to show how to sim this game? I try to modify the fba code, but failed.
My modify list below:
1. roms declare
{ "p0600hd.rom", 0x400000, 0x94fa54f7, 1 | BRF_ESS | BRF_PRG }, // 68K Code, use the decrypted rom, the primal rom name is "p0600h.rom"
{ "t0600.rom", 0x800000, 0x4acc1ad6, 2 | BRF_GRA }, // Tile data
{ "a0600.rom", 0x800000, 0xd8167834, 3 | BRF_GRA }, // Sprite Color Data
{ "a0601.rom", 0x800000, 0xff7a4373, 3 | BRF_GRA },
{ "a0602.rom", 0x800000, 0xe7a32959, 3 | BRF_GRA },
{ "a0540.rom", 0x800000, 0x4fd3413e, 3 | BRF_GRA },
{ "b0600.rom", 0x800000, 0x7d3cd059, 4 | BRF_GRA }, // Sprite Masks + Colour Indexes
{ "b0601.rom", 0x400000, 0xa0bb1c2f, 4 | BRF_GRA },
{ "b0540.rom", 0x800000, 0x60999757, 4 | BRF_GRA },
{ "m0600.rom", 0x400000, 0x3ada4fd6, 5 | BRF_SND }, // Samples
{ "kovsh_v100_china.asic", 0x004000, 0x0f09a5c1, 7 | BRF_ESS | BRF_PRG }, // IGS027(A) Internal Code, SHA1(ebe39d5ae6b28331ad5893e754b1363d351bf9c4)
2. init
int kovshpInit()
{
//pPgmInitCallback = pgm_decrypt_kovshp; // rom in zip is decrypted, so we need not this step
Arm7SetIdleLoopAddress(0x00000260);
int ret = pgmInit();
if (ret == 0) {
install_protection_kovshp();
}
return ret;
}
3. install protection
void install_protection_kovshp()
{
nPGMArm7Type = 1;
pPgmScanCallback = kov_asic27Scan;
SekOpen(0);
//SekMapMemory(PGMARMShareRAM, 0x4f0000, 0x4f003f, SM_RAM);
SekMapHandler(4, 0x4f0000, 0x500003, SM_READ | SM_WRITE);
SekSetReadWordHandler(4, kov_asic27_read_word);
SekSetReadByteHandler(4, kov_asic27_read_byte);
SekSetWriteWordHandler(4, kov_asic27_write_word);
SekSetWriteByteHandler(4, kov_asic27_write_byte);
SekClose();
Arm7Init(1);
Arm7Open(0);
Arm7MapMemory(PGMARMROM, 0x00000000, 0x00003fff, ARM7_ROM);
Arm7MapMemory(PGMARMRAM0, 0x10000000, 0x100003ff, ARM7_RAM);
Arm7MapMemory(PGMARMRAM2, 0x50000000, 0x500003ff, ARM7_RAM);
Arm7SetWriteWordHandler(kovsh_asic27a_arm7_write_word);
Arm7SetWriteLongHandler(kovsh_asic27a_arm7_write_long);
Arm7SetReadLongHandler(kovsh_asic27a_arm7_read_long);
Arm7Close();
}
The game is runned, but many problems, hope some helps.