Author Topic: How add roms hack neogeo?  (Read 1890 times)

Offline Robert

  • MAME Devs
  • *****
  • Posts: 392
  • Karma: +27/-0
    • The MESSUI Place
Re: How add roms hack neogeo?
« Reply #15 on: February 06, 2018, 06:59:08 pm »
No protection or encryption, it's the same setup as omg8. Same applies to omg9b.

If you look in hbmame's source, find the GAME macro, and read the word just before ROT0. If it says "neogeo", then it's unencrypted and should just work.

Offline Fighterchar

  • Newbies
  • *
  • Posts: 20
  • Karma: +0/-0
Re: How add roms hack neogeo?
« Reply #16 on: February 06, 2018, 11:38:40 pm »
if possible to patch IPS in this roms hacks? I have a rom called kof2k2ps2 but the sound is bad, I need a rom hack whit Orochi Iori, and the Kof2k2omg have a good Orochi Iori the voice is good and de sprites  :wink:

Offline barbudreadmon

  • Expert
  • *****
  • Posts: 274
  • Karma: +7/-0
  • lr-fbalpha developer
Re: How add roms hack neogeo?
« Reply #17 on: February 07, 2018, 02:07:12 am »
No protection or encryption, it's the same setup as omg8. Same applies to omg9b.

If you look in hbmame's source, find the GAME macro, and read the word just before ROT0. If it says "neogeo", then it's unencrypted and should just work.

Then i have no clue why this one would crash :
Code: [Select]
// Kof2002 (Omega v0.9)

static struct BurnRomInfo kof2k2omg9RomDesc[] = {
{ "265-p1.p1",    0x100000, 0x9ede7323, 1 | BRF_ESS | BRF_PRG }, //  0 68K code
{ "265omg9.p2",   0x400000, 0xcd503fcf, 1 | BRF_ESS | BRF_PRG }, //  1

{ "265omg9.s1",   0x020000, 0x4562fb20, 2 | BRF_GRA },           //  2 Text layer tiles

{ "265omg9b.c1",  0x800000, 0xc8314ae2, 3 | BRF_GRA },           //  3 Sprite data
{ "265omg9b.c2",  0x800000, 0xe0ddced5, 3 | BRF_GRA },           //  4
{ "265omg9b.c3",  0x800000, 0x6898f6e2, 3 | BRF_GRA },           //  5
{ "265omg9b.c4",  0x800000, 0x9232e491, 3 | BRF_GRA },           //  6
{ "365ru.c5",     0x800000, 0x11126545, 3 | BRF_GRA },           //  7
{ "365ru.c6",     0x800000, 0xd225bb9b, 3 | BRF_GRA },           //  8
{ "265omg9b.c7",  0x800000, 0x6954ef57, 3 | BRF_GRA },           //  9
{ "265omg9b.c8",  0x800000, 0x3e394883, 3 | BRF_GRA },           // 10

{ "265ori.m1",    0x020000, 0xab9d360e, 4 | BRF_ESS | BRF_PRG }, // 11 Z80 code

{ "265nu.v1",     0x400000, 0x13d98607, 5 | BRF_SND },           // 12 Sound data
{ "265nu.v2",     0x400000, 0x9cf74677, 5 | BRF_SND },           // 13
{ "265nu.v3",     0x400000, 0x8e9448b5, 5 | BRF_SND },           // 14
{ "265nu.v4",     0x400000, 0x067271b5, 5 | BRF_SND },           // 15
};

STDROMPICKEXT(kof2k2omg9, kof2k2omg9, neogeo)
STD_ROM_FN(kof2k2omg9)

struct BurnDriver BurnDrvkof2k2omg9 = {
"kof2k2omg9", "kof2002", "neogeo", NULL, "2012",
"Kof2002 (Omega v0.9)\0", NULL, "bootleg", "KOF-ON Team",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_PREFIX_CARTRIDGE | HARDWARE_SNK_NEOGEO, GBF_VSFIGHT, FBF_KOF,
NULL, kof2k2omg9RomInfo, kof2k2omg9RomName, NULL, NULL, neogeoInputInfo, neogeoDIPInfo,
NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
0x1000, 304, 224, 4, 3
};

Perhaps dink or iq_132 could tell me what i'm doing wrong ?

Offline dink

  • Administrator
  • *****
  • Posts: 2594
  • Karma: +221/-0
  • feed the horse yumyum
Re: How add roms hack neogeo?
« Reply #18 on: February 07, 2018, 08:10:52 am »
I'm not 100% sure about this, but something I've sorta noticed: but when a neogeo game has huge sound roms (like I see in this one), it might mean that the data size to be specified in neo_run.cpp: search for lasthope, duplicate the line and change it to the value of all 4 sound roms added up.

best regards,
- dink

Offline barbudreadmon

  • Expert
  • *****
  • Posts: 274
  • Karma: +7/-0
  • lr-fbalpha developer
Re: How add roms hack neogeo?
« Reply #19 on: February 07, 2018, 01:53:51 pm »
I'm not 100% sure about this, but something I've sorta noticed: but when a neogeo game has huge sound roms (like I see in this one), it might mean that the data size to be specified in neo_run.cpp: search for lasthope, duplicate the line and change it to the value of all 4 sound roms added up.

best regards,
- dink
I confirm adding
Code: [Select]
if (!strcmp("kof2k2omg9", BurnDrvGetTextA(DRV_NAME))) nYM2610ADPCMASize[nNeoActiveSlot] = 0x1600000;
solved this !

Thanks :)

PS : could you confirm there is no equivalent to ROM_IGNORE in fbalpha ?

Edit : also, how come lastblad (4x4Mo) and kof2k2omg8 (2x8Mo) don't need this line in neo_run.cpp ? Is it related to the Z80 bios file being different ?
« Last Edit: February 07, 2018, 02:14:55 pm by barbudreadmon »

Offline dink

  • Administrator
  • *****
  • Posts: 2594
  • Karma: +221/-0
  • feed the horse yumyum
Re: How add roms hack neogeo?
« Reply #20 on: February 07, 2018, 06:54:25 pm »
I'm not 100% sure on this answer (I havn't verified it), but from what I recon:
Some games need that adpcm line because the pcm format is different from standard neogeo samples. 

There is no ROM_IGNORE, but you don't need it.  first you'll need to create a loader callback.  search Alpham2pCallback() in d_neogeo, then do something like:
   BurnLoadRom(Neo68KROMActive + 0x000000, 0, 1);
   BurnLoadRom(Neo68KROMActive + 0x100000, 1, 1); // second rom will overwrite 0x100000+

if that doesn't work, pm me everything I need to run that game including your current code and I'll give it a try.

bye for now,
- dink

I confirm adding
Code: [Select]
if (!strcmp("kof2k2omg9", BurnDrvGetTextA(DRV_NAME))) nYM2610ADPCMASize[nNeoActiveSlot] = 0x1600000;
solved this !

Thanks :)

PS : could you confirm there is no equivalent to ROM_IGNORE in fbalpha ?

Edit : also, how come lastblad (4x4Mo) and kof2k2omg8 (2x8Mo) don't need this line in neo_run.cpp ? Is it related to the Z80 bios file being different ?

Offline barbudreadmon

  • Expert
  • *****
  • Posts: 274
  • Karma: +7/-0
  • lr-fbalpha developer
Re: How add roms hack neogeo?
« Reply #21 on: February 08, 2018, 04:56:20 am »
if that doesn't work, pm me everything I need to run that game including your current code and I'll give it a try.
It worked :). I'll post the code when i'm back from work.

Last thing i don't know about those games, perhaps Robert could confirm : is it normal that "King of Fighters 2002" don't appear on the title screen for versions 8, 9b and 9 ?

Offline Robert

  • MAME Devs
  • *****
  • Posts: 392
  • Karma: +27/-0
    • The MESSUI Place
Re: How add roms hack neogeo?
« Reply #22 on: February 08, 2018, 08:32:28 am »
Yes, the logo doesn't appear for those games. If you get kof2k2omg to work, the title screen is correct on that one.

Offline barbudreadmon

  • Expert
  • *****
  • Posts: 274
  • Karma: +7/-0
  • lr-fbalpha developer
Re: How add roms hack neogeo?
« Reply #23 on: February 08, 2018, 01:51:57 pm »
Here is the full patch for those 4 games :
Code: [Select]
diff --git a/src/burn/drv/neogeo/d_neogeo.cpp b/src/burn/drv/neogeo/d_neogeo.cpp
index 3afea13..1c52fbe 100644
--- a/src/burn/drv/neogeo/d_neogeo.cpp
+++ b/src/burn/drv/neogeo/d_neogeo.cpp
@@ -14297,6 +14297,169 @@ struct BurnDriver BurnDrvkf2k4pls = {
  0x1000, 304, 224, 4, 3
 };
 
+// Kof2002 (hack omg)
+
+static struct BurnRomInfo kof2k2omgRomDesc[] = {
+ { "265omg.p1",    0x3bd4c1, 0x62174834, 1 | BRF_ESS | BRF_PRG }, //  0 68K code
+ { "265omg.p2",    0x400000, 0x6fadc5c3, 1 | BRF_ESS | BRF_PRG }, //  1
+
+ { "265omg.s1",    0x020000, 0x6145daf4, 2 | BRF_GRA },           //  2 Text layer tiles
+
+ { "265xxx.c1",    0x800000, 0x745b343e, 3 | BRF_GRA },           //  3 Sprite data
+ { "265xxx.c2",    0x800000, 0x2aab7f98, 3 | BRF_GRA },           //  4
+ { "265ori.c3",    0x800000, 0xe5074eea, 3 | BRF_GRA },           //  5
+ { "265ori.c4",    0x800000, 0xf6eb1ff2, 3 | BRF_GRA },           //  6
+ { "265d.c5",      0x800000, 0x74bba7c6, 3 | BRF_GRA },           //  7
+ { "265d.c6",      0x800000, 0xe20d2216, 3 | BRF_GRA },           //  8
+ { "265ori.c7",    0x800000, 0x0e9f6adb, 3 | BRF_GRA },           //  9
+ { "265ori.c8",    0x800000, 0x9961799e, 3 | BRF_GRA },           // 10
+
+ { "265ori.m1",    0x020000, 0xab9d360e, 4 | BRF_ESS | BRF_PRG }, // 11 Z80 code
+
+ { "265nu.v1",     0x400000, 0x13d98607, 5 | BRF_SND },           // 12 Sound data
+ { "265nu.v2",     0x400000, 0x9cf74677, 5 | BRF_SND },           // 13
+ { "265nu.v3",     0x400000, 0x8e9448b5, 5 | BRF_SND },           // 14
+ { "265nu.v4",     0x400000, 0x067271b5, 5 | BRF_SND },           // 15
+};
+
+STDROMPICKEXT(kof2k2omg, kof2k2omg, neogeo)
+STD_ROM_FN(kof2k2omg)
+
+static void kof2k2omgCallback()
+{
+ BurnLoadRom(Neo68KROMActive + 0x000000, 0, 1);
+ BurnLoadRom(Neo68KROMActive + 0x100000, 1, 1);
+}
+
+static INT32 kof2k2omgInit()
+{
+ NeoCallbackActive->pInitialise = kof2k2omgCallback;
+
+ return NeoInit();
+}
+
+struct BurnDriver BurnDrvkof2k2omg = {
+ "kof2k2omg", "kof2002", "neogeo", NULL, "2002",
+ "Kof2002 (hack omg)\0", NULL, "bootleg", "KOF-ON Team",
+ NULL, NULL, NULL, NULL,
+ BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_PREFIX_CARTRIDGE | HARDWARE_SNK_NEOGEO, GBF_VSFIGHT, FBF_KOF,
+ NULL, kof2k2omgRomInfo, kof2k2omgRomName, NULL, NULL, neogeoInputInfo, neogeoDIPInfo,
+ kof2k2omgInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
+ 0x1000, 304, 224, 4, 3
+};
+
+// Kof2002 (Omega v0.8)
+
+static struct BurnRomInfo kof2k2omg8RomDesc[] = {
+ { "265omg8.p1",   0x100000, 0x53086581, 1 | BRF_ESS | BRF_PRG }, //  0 68K code
+ { "265omg8.p2",   0x400000, 0x40228fe5, 1 | BRF_ESS | BRF_PRG }, //  1
+
+ { "265omg8.s1",   0x020000, 0x65351d40, 2 | BRF_GRA },           //  2 Text layer tiles
+
+ { "265omg8.c1",   0x800000, 0xe144302d, 3 | BRF_GRA },           //  3 Sprite data
+ { "265omg8.c2",   0x800000, 0xb10c6958, 3 | BRF_GRA },           //  4
+ { "265omg8.c3",   0x800000, 0x2367927c, 3 | BRF_GRA },           //  5
+ { "265omg8.c4",   0x800000, 0x4ad48c29, 3 | BRF_GRA },           //  6
+ { "365ru.c5",     0x800000, 0x11126545, 3 | BRF_GRA },           //  7
+ { "365ru.c6",     0x800000, 0xd225bb9b, 3 | BRF_GRA },           //  8
+ { "265omg8.c7",   0x800000, 0x890c2a4a, 3 | BRF_GRA },           //  9
+ { "265omg8.c8",   0x800000, 0xb726009d, 3 | BRF_GRA },           // 10
+
+ { "265omg8.m1",   0x040000, 0x9a3d5c65, 4 | BRF_ESS | BRF_PRG }, // 11 Z80 code
+
+ { "kf10-v1.bin",  0x800000, 0x0fc9a58d, 5 | BRF_SND },           // 12 Sound data
+ { "kf10-v2.bin",  0x800000, 0xb8c475a4, 5 | BRF_SND },           // 13
+};
+
+STDROMPICKEXT(kof2k2omg8, kof2k2omg8, neogeo)
+STD_ROM_FN(kof2k2omg8)
+
+struct BurnDriver BurnDrvkof2k2omg8 = {
+ "kof2k2omg8", "kof2002", "neogeo", NULL, "2010",
+ "Kof2002 (Omega v0.8)\0", NULL, "bootleg", "KOF-ON Team",
+ NULL, NULL, NULL, NULL,
+ BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_PREFIX_CARTRIDGE | HARDWARE_SNK_NEOGEO, GBF_VSFIGHT, FBF_KOF,
+ NULL, kof2k2omg8RomInfo, kof2k2omg8RomName, NULL, NULL, neogeoInputInfo, neogeoDIPInfo,
+ NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
+ 0x1000, 304, 224, 4, 3
+};
+
+// Kof2002 (Omega v0.9 beta)
+
+static struct BurnRomInfo kof2k2omg9bRomDesc[] = {
+ { "265-p1.p1",    0x100000, 0x9ede7323, 1 | BRF_ESS | BRF_PRG }, //  0 68K code
+ { "265omg9b.p2",  0x400000, 0xa171b684, 1 | BRF_ESS | BRF_PRG }, //  1
+
+ { "265omg9b.s1",  0x020000, 0x7e3f391a, 2 | BRF_GRA },           //  2 Text layer tiles
+
+ { "265omg9b.c1",  0x800000, 0xc8314ae2, 3 | BRF_GRA },           //  3 Sprite data
+ { "265omg9b.c2",  0x800000, 0xe0ddced5, 3 | BRF_GRA },           //  4
+ { "265omg9b.c3",  0x800000, 0x6898f6e2, 3 | BRF_GRA },           //  5
+ { "265omg9b.c4",  0x800000, 0x9232e491, 3 | BRF_GRA },           //  6
+ { "365ru.c5",     0x800000, 0x11126545, 3 | BRF_GRA },           //  7
+ { "365ru.c6",     0x800000, 0xd225bb9b, 3 | BRF_GRA },           //  8
+ { "265omg9b.c7",  0x800000, 0x6954ef57, 3 | BRF_GRA },           //  9
+ { "265omg9b.c8",  0x800000, 0x3e394883, 3 | BRF_GRA },           // 10
+
+ { "265omg8.m1",   0x040000, 0x9a3d5c65, 4 | BRF_ESS | BRF_PRG }, // 11 Z80 code
+
+ { "265nu.v1",     0x400000, 0x13d98607, 5 | BRF_SND },           // 12 Sound data
+ { "265nu.v2",     0x400000, 0x9cf74677, 5 | BRF_SND },           // 13
+ { "265nu.v3",     0x400000, 0x8e9448b5, 5 | BRF_SND },           // 14
+ { "265nu.v4",     0x400000, 0x067271b5, 5 | BRF_SND },           // 15
+};
+
+STDROMPICKEXT(kof2k2omg9b, kof2k2omg9b, neogeo)
+STD_ROM_FN(kof2k2omg9b)
+
+struct BurnDriver BurnDrvkof2k2omg9b = {
+ "kof2k2omg9b", "kof2002", "neogeo", NULL, "2011",
+ "Kof2002 (Omega v0.9 beta)\0", NULL, "bootleg", "KOF-ON Team",
+ NULL, NULL, NULL, NULL,
+ BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_PREFIX_CARTRIDGE | HARDWARE_SNK_NEOGEO, GBF_VSFIGHT, FBF_KOF,
+ NULL, kof2k2omg9bRomInfo, kof2k2omg9bRomName, NULL, NULL, neogeoInputInfo, neogeoDIPInfo,
+ NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
+ 0x1000, 304, 224, 4, 3
+};
+
+// Kof2002 (Omega v0.9)
+
+static struct BurnRomInfo kof2k2omg9RomDesc[] = {
+ { "265-p1.p1",    0x100000, 0x9ede7323, 1 | BRF_ESS | BRF_PRG }, //  0 68K code
+ { "265omg9.p2",   0x400000, 0xcd503fcf, 1 | BRF_ESS | BRF_PRG }, //  1
+
+ { "265omg9.s1",   0x020000, 0x4562fb20, 2 | BRF_GRA },           //  2 Text layer tiles
+
+ { "265omg9b.c1",  0x800000, 0xc8314ae2, 3 | BRF_GRA },           //  3 Sprite data
+ { "265omg9b.c2",  0x800000, 0xe0ddced5, 3 | BRF_GRA },           //  4
+ { "265omg9b.c3",  0x800000, 0x6898f6e2, 3 | BRF_GRA },           //  5
+ { "265omg9b.c4",  0x800000, 0x9232e491, 3 | BRF_GRA },           //  6
+ { "365ru.c5",     0x800000, 0x11126545, 3 | BRF_GRA },           //  7
+ { "365ru.c6",     0x800000, 0xd225bb9b, 3 | BRF_GRA },           //  8
+ { "265omg9b.c7",  0x800000, 0x6954ef57, 3 | BRF_GRA },           //  9
+ { "265omg9b.c8",  0x800000, 0x3e394883, 3 | BRF_GRA },           // 10
+
+ { "265ori.m1",    0x020000, 0xab9d360e, 4 | BRF_ESS | BRF_PRG }, // 11 Z80 code
+
+ { "265nu.v1",     0x400000, 0x13d98607, 5 | BRF_SND },           // 12 Sound data
+ { "265nu.v2",     0x400000, 0x9cf74677, 5 | BRF_SND },           // 13
+ { "265nu.v3",     0x400000, 0x8e9448b5, 5 | BRF_SND },           // 14
+ { "265nu.v4",     0x400000, 0x067271b5, 5 | BRF_SND },           // 15
+};
+
+STDROMPICKEXT(kof2k2omg9, kof2k2omg9, neogeo)
+STD_ROM_FN(kof2k2omg9)
+
+struct BurnDriver BurnDrvkof2k2omg9 = {
+ "kof2k2omg9", "kof2002", "neogeo", NULL, "2012",
+ "Kof2002 (Omega v0.9)\0", NULL, "bootleg", "KOF-ON Team",
+ NULL, NULL, NULL, NULL,
+ BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_PREFIX_CARTRIDGE | HARDWARE_SNK_NEOGEO, GBF_VSFIGHT, FBF_KOF,
+ NULL, kof2k2omg9RomInfo, kof2k2omg9RomName, NULL, NULL, neogeoInputInfo, neogeoDIPInfo,
+ NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
+ 0x1000, 304, 224, 4, 3
+};
+
 // The King of Fighters '95 (Special 2017)
 // Modified by: GSC2007
 // Version number: Ver 1.0.0627
diff --git a/src/burn/drv/neogeo/neo_run.cpp b/src/burn/drv/neogeo/neo_run.cpp
index 6df6e80..94b155f 100644
--- a/src/burn/drv/neogeo/neo_run.cpp
+++ b/src/burn/drv/neogeo/neo_run.cpp
@@ -644,6 +644,9 @@ static INT32 LoadRoms()
  if (!strcmp("kotm2p", BurnDrvGetTextA(DRV_NAME))) nYM2610ADPCMASize[nNeoActiveSlot] = 0x300000;
  if (!strcmp("sbp", BurnDrvGetTextA(DRV_NAME))) nYM2610ADPCMASize[nNeoActiveSlot] = 0x800000;
  if (!strcmp("lasthope", BurnDrvGetTextA(DRV_NAME))) nYM2610ADPCMASize[nNeoActiveSlot] = 0x600000;
+ if (!strcmp("kof2k2omg", BurnDrvGetTextA(DRV_NAME))) nYM2610ADPCMASize[nNeoActiveSlot] = 0x1600000;
+ if (!strcmp("kof2k2omg9", BurnDrvGetTextA(DRV_NAME))) nYM2610ADPCMASize[nNeoActiveSlot] = 0x1600000;
+ if (!strcmp("kof2k2omg9b", BurnDrvGetTextA(DRV_NAME))) nYM2610ADPCMASize[nNeoActiveSlot] = 0x1600000;
 
 // bprintf(PRINT_NORMAL, _T("%x\n"), nYM2610ADPCMASize[nNeoActiveSlot]);
 
I confirm the logo only appears on kof2k2omg. Is that the most recent version ?

Offline Fighterchar

  • Newbies
  • *
  • Posts: 20
  • Karma: +0/-0
Re: How add roms hack neogeo?
« Reply #24 on: February 13, 2018, 07:26:01 pm »
I do not understand how to do this, you can help me, I do not know how to apply a patch to the game.
« Last Edit: February 13, 2018, 09:08:15 pm by dink »

Offline dink

  • Administrator
  • *****
  • Posts: 2594
  • Karma: +221/-0
  • feed the horse yumyum
Re: How add roms hack neogeo?
« Reply #25 on: February 13, 2018, 09:05:35 pm »
Fighterchar, these aren't rom patches, they're code patches to add the games to FBalpha.  They will be in the next version of FBA, much thanks to barbudreadmon. 

best regards,
- dink

Offline Fighterchar

  • Newbies
  • *
  • Posts: 20
  • Karma: +0/-0
Re: How add roms hack neogeo?
« Reply #26 on: February 13, 2018, 11:07:12 pm »
wow the work is excelent thank you so much.  ;p but there are more roms hack that no working in FBA I think that is important to say it. One example is metal slug series chinesse versions, this hack is more dificult and have a special sprites whit only knife and adding HP, this versions are called Metal Slug HP, one of my favourite is Metal Slug 5 HP version, is called Metal Slug Blue or Gren or Multifuntion version I no sure the correct name. And only posible to play in Gotvg.I think the rom name is mslug5w. I up load an example picture, the rom hack have a particular HP.

And other is kof98mix the game found in fbaN30 but no in FBA I dont know why

Sorry my english is bad  :biggrin:

Offline Fighterchar

  • Newbies
  • *
  • Posts: 20
  • Karma: +0/-0
Re: How add roms hack neogeo?
« Reply #27 on: February 18, 2018, 11:42:10 pm »
In Fba only found battletoads for megadrive, but no found the version super battletoads, this is an Arcade version, for rare production is posible to add in the next actualization of FBA?


Offline dink

  • Administrator
  • *****
  • Posts: 2594
  • Karma: +221/-0
  • feed the horse yumyum
Re: How add roms hack neogeo?
« Reply #28 on: March 06, 2018, 10:42:38 am »
FIghterchar, please check your PM :)