Skip to content

Commit

Permalink
Sync kof98pfe with hbmame (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
barbudreadmon committed Feb 2, 2019
1 parent 2843d96 commit f9f0679
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 66 deletions.
22 changes: 11 additions & 11 deletions dats/FB Alpha (ClrMame Pro XML, Arcade only).dat
Original file line number Diff line number Diff line change
Expand Up @@ -54452,22 +54452,22 @@
<year>2017</year>
<manufacturer>hack</manufacturer>
<rom name="242pfe.p1" size="1048576" crc="23876d95"/>
<rom name="242pfe.p2" size="6291456" crc="b5569607"/>
<rom name="242pfe.p3" size="131072" crc="9af621e9"/>
<rom name="242pfe.p2" size="4194304" crc="adbaa852"/>
<rom name="242pfe.p3" size="131072" crc="930ea34e"/>
<rom name="242pfe.s1" size="131072" crc="7f4dbf23"/>
<rom name="242hx73.c1" size="8388608" crc="379654a5"/>
<rom name="242hx73.c2" size="8388608" crc="9c71fa3d"/>
<rom name="242-c3.c3" merge="242-c3.c3" size="8388608" crc="22127b4f"/>
<rom name="242-c4.c4" merge="242-c4.c4" size="8388608" crc="0b4fa044"/>
<rom name="242-c5.c5" merge="242-c5.c5" size="8388608" crc="9d10bed3"/>
<rom name="242-c6.c6" merge="242-c6.c6" size="8388608" crc="da07b6a2"/>
<rom name="242.c3" size="8388608" crc="22127b4f"/>
<rom name="242.c4" size="8388608" crc="0b4fa044"/>
<rom name="242.c5" size="8388608" crc="9d10bed3"/>
<rom name="242.c6" size="8388608" crc="da07b6a2"/>
<rom name="242pfe.c7" size="8388608" crc="02f09b2e"/>
<rom name="242pfe.c8" size="8388608" crc="d43ab3e6"/>
<rom name="242-m1.m1" size="262144" crc="4e7a6b1b"/>
<rom name="242-v1.v1" merge="242-v1.v1" size="4194304" crc="b9ea8051"/>
<rom name="242-v2.v2" merge="242-v2.v2" size="4194304" crc="cc11106e"/>
<rom name="242-v3.v3" merge="242-v3.v3" size="4194304" crc="044ea4e1"/>
<rom name="242-v4.v4" merge="242-v4.v4" size="4194304" crc="7985ea30"/>
<rom name="242-mg1.m1" size="262144" crc="4e7a6b1b"/>
<rom name="242.v1" size="4194304" crc="b9ea8051"/>
<rom name="242.v2" size="4194304" crc="cc11106e"/>
<rom name="242.v3" size="4194304" crc="044ea4e1"/>
<rom name="242.v4" size="4194304" crc="7985ea30"/>
<rom name="sp-s3.sp1" merge="sp-s3.sp1" size="131072" crc="91b64be3"/>
<rom name="sp-s2.sp1" merge="sp-s2.sp1" size="131072" crc="9036d879"/>
<rom name="sp-s.sp1" merge="sp-s.sp1" size="131072" crc="c7f2fa45"/>
Expand Down
22 changes: 11 additions & 11 deletions dats/FB Alpha (ClrMame Pro XML, Neogeo only).dat
Original file line number Diff line number Diff line change
Expand Up @@ -5273,22 +5273,22 @@
<year>2017</year>
<manufacturer>hack</manufacturer>
<rom name="242pfe.p1" size="1048576" crc="23876d95"/>
<rom name="242pfe.p2" size="6291456" crc="b5569607"/>
<rom name="242pfe.p3" size="131072" crc="9af621e9"/>
<rom name="242pfe.p2" size="4194304" crc="adbaa852"/>
<rom name="242pfe.p3" size="131072" crc="930ea34e"/>
<rom name="242pfe.s1" size="131072" crc="7f4dbf23"/>
<rom name="242hx73.c1" size="8388608" crc="379654a5"/>
<rom name="242hx73.c2" size="8388608" crc="9c71fa3d"/>
<rom name="242-c3.c3" merge="242-c3.c3" size="8388608" crc="22127b4f"/>
<rom name="242-c4.c4" merge="242-c4.c4" size="8388608" crc="0b4fa044"/>
<rom name="242-c5.c5" merge="242-c5.c5" size="8388608" crc="9d10bed3"/>
<rom name="242-c6.c6" merge="242-c6.c6" size="8388608" crc="da07b6a2"/>
<rom name="242.c3" size="8388608" crc="22127b4f"/>
<rom name="242.c4" size="8388608" crc="0b4fa044"/>
<rom name="242.c5" size="8388608" crc="9d10bed3"/>
<rom name="242.c6" size="8388608" crc="da07b6a2"/>
<rom name="242pfe.c7" size="8388608" crc="02f09b2e"/>
<rom name="242pfe.c8" size="8388608" crc="d43ab3e6"/>
<rom name="242-m1.m1" size="262144" crc="4e7a6b1b"/>
<rom name="242-v1.v1" merge="242-v1.v1" size="4194304" crc="b9ea8051"/>
<rom name="242-v2.v2" merge="242-v2.v2" size="4194304" crc="cc11106e"/>
<rom name="242-v3.v3" merge="242-v3.v3" size="4194304" crc="044ea4e1"/>
<rom name="242-v4.v4" merge="242-v4.v4" size="4194304" crc="7985ea30"/>
<rom name="242-mg1.m1" size="262144" crc="4e7a6b1b"/>
<rom name="242.v1" size="4194304" crc="b9ea8051"/>
<rom name="242.v2" size="4194304" crc="cc11106e"/>
<rom name="242.v3" size="4194304" crc="044ea4e1"/>
<rom name="242.v4" size="4194304" crc="7985ea30"/>
<rom name="sp-s3.sp1" merge="sp-s3.sp1" size="131072" crc="91b64be3"/>
<rom name="sp-s2.sp1" merge="sp-s2.sp1" size="131072" crc="9036d879"/>
<rom name="sp-s.sp1" merge="sp-s.sp1" size="131072" crc="c7f2fa45"/>
Expand Down
101 changes: 57 additions & 44 deletions src/burn/drv/neogeo/d_neogeo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17419,71 +17419,84 @@ struct BurnDriver BurnDrvKof98mix = {
};

static struct BurnRomInfo kof98pfeRomDesc[] = {
{ "242pfe.p1", 0x100000, 0x23876d95, 1 | BRF_ESS | BRF_PRG }, // 1 68K code
{ "242pfe.p2", 0x600000, 0xb5569607, 1 | BRF_ESS | BRF_PRG }, // 1 68K code, 2MB zero bytes are added to the end of file so the file size expands to 6MB.
{ "242pfe.p3", 0x020000, 0x9af621e9, 1 | BRF_ESS | BRF_PRG }, // 1 68K code, protections are patched out.
{ "242pfe.p1", 0x100000, 0x23876d95, 1 | BRF_ESS | BRF_PRG }, // 1 68K code
{ "242pfe.p2", 0x400000, 0xadbaa852, 1 | BRF_ESS | BRF_PRG }, // 1 68K code, 2MB zero bytes are added to the end of file so the file size expands to 6MB.
{ "242pfe.p3", 0x020000, 0x930ea34e, 1 | BRF_ESS | BRF_PRG }, // 1 68K code, protections are patched out.

{ "242pfe.s1", 0x020000, 0x7f4dbf23, 2 | BRF_GRA }, // 2 Text layer tiles / TC531000
{ "242pfe.s1", 0x020000, 0x7f4dbf23, 2 | BRF_GRA }, // 2 Text layer tiles / TC531000

{ "242hx73.c1", 0x800000, 0x379654a5, 3 | BRF_GRA }, // 3 Sprite data
{ "242hx73.c2", 0x800000, 0x9c71fa3d, 3 | BRF_GRA }, // 4
{ "242-c3.c3", 0x800000, 0x22127b4f, 3 | BRF_GRA }, // 5
{ "242-c4.c4", 0x800000, 0x0b4fa044, 3 | BRF_GRA }, // 6
{ "242-c5.c5", 0x800000, 0x9d10bed3, 3 | BRF_GRA }, // 7
{ "242-c6.c6", 0x800000, 0xda07b6a2, 3 | BRF_GRA }, // 8
{ "242pfe.c7", 0x800000, 0x02f09b2e, 3 | BRF_GRA }, // 9
{ "242pfe.c8", 0x800000, 0xd43ab3e6, 3 | BRF_GRA }, // 10
{ "242hx73.c1", 0x800000, 0x379654a5, 3 | BRF_GRA }, // 3 Sprite data
{ "242hx73.c2", 0x800000, 0x9c71fa3d, 3 | BRF_GRA }, // 4
{ "242.c3", 0x800000, 0x22127b4f, 3 | BRF_GRA }, // 5
{ "242.c4", 0x800000, 0x0b4fa044, 3 | BRF_GRA }, // 6
{ "242.c5", 0x800000, 0x9d10bed3, 3 | BRF_GRA }, // 7
{ "242.c6", 0x800000, 0xda07b6a2, 3 | BRF_GRA }, // 8
{ "242pfe.c7", 0x800000, 0x02f09b2e, 3 | BRF_GRA }, // 9
{ "242pfe.c8", 0x800000, 0xd43ab3e6, 3 | BRF_GRA }, // 10

{ "242-m1.m1", 0x040000, 0x4e7a6b1b, 4 | BRF_ESS | BRF_PRG }, // 11 Z80 code
{ "242-mg1.m1", 0x040000, 0x4e7a6b1b, 4 | BRF_ESS | BRF_PRG }, // 11 Z80 code

{ "242-v1.v1", 0x400000, 0xb9ea8051, 5 | BRF_SND }, // 12 Sound data
{ "242-v2.v2", 0x400000, 0xcc11106e, 5 | BRF_SND }, // 13
{ "242-v3.v3", 0x400000, 0x044ea4e1, 5 | BRF_SND }, // 14
{ "242-v4.v4", 0x400000, 0x7985ea30, 5 | BRF_SND }, // 15
{ "242.v1", 0x400000, 0xb9ea8051, 5 | BRF_SND }, // 12 Sound data
{ "242.v2", 0x400000, 0xcc11106e, 5 | BRF_SND }, // 13
{ "242.v3", 0x400000, 0x044ea4e1, 5 | BRF_SND }, // 14
{ "242.v4", 0x400000, 0x7985ea30, 5 | BRF_SND }, // 15
};

STDROMPICKEXT(kof98pfe, kof98pfe, neogeo)
STD_ROM_FN(kof98pfe)

static UINT8 *kof98pfeExtraROM;


static void kof98pfeCallback()
{
BurnLoadRom(Neo68KROMActive + 0x000000, 0, 1);
BurnLoadRom(Neo68KROMActive + 0x100000, 1, 1);
BurnLoadRom(Neo68KROMActive + 0x700000, 2, 1);
Neo68KROMActive[0x701af4] = 0x4e;
Neo68KROMActive[0x701af5] = 0x71;
Neo68KROMActive[0x701b18] = 0x60; // byte-write 0x60
Neo68KROMActive[0x701ca2] = 0x60; // byte-write 0x60
}

static INT32 kof98pfeInit()
{
INT32 nRet = NeoInit();

NeoCallbackActive->pInitialise = kof98pfeCallback;

INT32 nRet = NeoInit();

if (nRet == 0) {
kof98pfeExtraROM = (UINT8*)BurnMalloc(0x20000);
kof98pfeExtraROM = (UINT8*)BurnMalloc(0x20000);

if (BurnLoadRom(kof98pfeExtraROM, 2, 1)) return 1;
if (BurnLoadRom(kof98pfeExtraROM, 2, 1)) return 1;

UINT16 *rom = (UINT16*)kof98pfeExtraROM;
for (INT32 i = 0; i < 0x20000/2; i++) {
if (rom[i] == 0x4e7d) rom[i] = 0x4e71;
if (rom[i] == 0x4e7c) rom[i] = 0x4e75;
}
UINT16 *rom = (UINT16*)kof98pfeExtraROM;
for (INT32 i = 0; i < 0x20000/2; i++) {
if (rom[i] == 0x4e7d) rom[i] = 0x4e71;
if (rom[i] == 0x4e7c) rom[i] = 0x4e75;
}

rom = (UINT16*)Neo68KROMActive;
rom = (UINT16*)Neo68KROMActive;

for (INT32 i = 0; i < 0x100000/2; i++) {
if (rom[i] == 0x4e7d) rom[i] = 0x4e71;
if (rom[i] == 0x4e7c) rom[i] = 0x4e75;
}
for (INT32 i = 0; i < 0x100000/2; i++) {
if (rom[i] == 0x4e7d) rom[i] = 0x4e71;
if (rom[i] == 0x4e7c) rom[i] = 0x4e75;
}

SekOpen(0);
SekMapMemory(kof98pfeExtraROM, 0x900000, 0x91ffff, MAP_ROM);
SekClose();
}
SekOpen(0);
SekMapMemory(kof98pfeExtraROM, 0x900000, 0x91ffff, MAP_ROM);
SekClose();
}

return nRet;
return nRet;
}

static INT32 kof98pfeExit()
{
BurnFree (kof98pfeExtraROM);
return NeoExit();
BurnFree (kof98pfeExtraROM);

return NeoExit();
}

struct BurnDriver BurnDrvkof98pfe = {
"kof98pfe", "kof98", "neogeo", NULL, "2017",
"KOF'98 (Plus Final Edition)(2017-07-23)\0", NULL, "hack", "Neo Geo MVS",
Expand Down
2 changes: 2 additions & 0 deletions src/burn/drv/neogeo/neo_run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ static INT32 LoadRoms()
if (!strcmp("kof2k2omg", BurnDrvGetTextA(DRV_NAME))) nYM2610ADPCMASize[nNeoActiveSlot] = 0x1000000;
if (!strcmp("kof2k2omg9b", BurnDrvGetTextA(DRV_NAME))) nYM2610ADPCMASize[nNeoActiveSlot] = 0x1000000;
if (!strcmp("kof2k2omg9", BurnDrvGetTextA(DRV_NAME))) nYM2610ADPCMASize[nNeoActiveSlot] = 0x1000000;
if (!strcmp("kof98pfe", BurnDrvGetTextA(DRV_NAME))) nYM2610ADPCMASize[nNeoActiveSlot] = 0x1000000;

// bprintf(PRINT_NORMAL, _T("%x\n"), nYM2610ADPCMASize[nNeoActiveSlot]);

Expand Down Expand Up @@ -729,6 +730,7 @@ static INT32 LoadRoms()
}
}

if (!strcmp("kof98pfe", BurnDrvGetTextA(DRV_NAME))) nCodeSize[nNeoActiveSlot] = 0x720000;
Neo68KROM[nNeoActiveSlot] = (UINT8*)BurnMalloc(nCodeSize[nNeoActiveSlot]); // 68K cartridge ROM
if (Neo68KROM[nNeoActiveSlot] == NULL) {
return 1;
Expand Down

0 comments on commit f9f0679

Please sign in to comment.