Welcome!

Final Burn Neo => FBN Development => Topic started by: iq_132 on February 21, 2005, 02:41:37 AM

Title: d_neogeo.cpp matching MAME .92
Post by: iq_132 on February 21, 2005, 02:41:37 AM
Here's my d_neogeo.cpp that closely matches MAME .92
Let me know of any bugs, incorrectnesses

Known Items
 - I am not using the xxx-m1_decrypted.bin naming scheme. It's stupid.
Title: d_neogeo.cpp matching MAME .92
Post by: neo04 on February 21, 2005, 07:10:04 AM
Quote
Known Items
- I am not using the xxx-m1_decrypted.bin naming scheme. It's stupid.

indeed... :D
Title: Updated FerchogtX's tmnt drivers for 0.2.95.23
Post by: netbug on February 21, 2005, 08:15:32 AM
Other former bugs  were not fixed now.You can delete drivers Chinese name by yourself. :D
Title: d_neogeo.cpp matching MAME .92
Post by: FerchogtX on March 01, 2005, 12:25:00 AM
Which drivers have specificaly changed?... i compared with 0.2.95.23 src and i don't notice any change XD...
See ya!!!!! :D
Title: d_neogeo.cpp matching MAME .92
Post by: netbug on March 01, 2005, 03:07:54 AM
Quote from: FerchogtX
Which drivers have specificaly changed?... i compared with 0.2.95.23 src and i don't notice any change XD...
See ya!!!!! :D


Oh,my God,That's too terrible.....Your former version can't work anyway
in new environment while not to be fixed,so to speak.

There were three old function improvements I have marked in d_tmnt.cpp
1.// old function fixed (3-1) most importantly fixed
SekSetIRQLine(5, SEK_IRQSTATUS_AUTO);

2.//old function fixed (3-2)
  SekInit(0,0x68000);   // Allocate 68000

3.//old function fixed (3-3)
  SekExt[0][0].ReadByte[0] = TmntReadByte;
   :D :D
Title: d_neogeo.cpp matching MAME .92
Post by: FerchogtX on March 01, 2005, 06:16:36 PM
netbug... the question was adressed to IQ_132, not for you, OF COURSE i know that you improved some things, i saw it XD thanks for the explanation anyway :)
See ya!!!!! :D
P.D.... Netbug... do you know how to fix the 256 KB s1 rom loading prob in fba?... this type of roms doesn't display correctly in the emu
Title: d_neogeo.cpp matching MAME .92
Post by: netbug on March 01, 2005, 07:32:43 PM
What's your meaning of 256 KB s1 rom?This promblem only exists in
"Crouching Tiger Hidden Dragon 2003 Super Plus" driver,otherwise,
it works fine in new version with 128k s1 rom now!So.....

Code: [Select]
// Crouching Tiger Hidden Dragon 2003 Super Plus

static struct BurnRomInfo ct2003spRomDesc[] = {
{ "5003-p1sp.bin",0x100000, 0x96EE06BC, 1 | BRF_ESS | BRF_PRG }, //  0 68K code
{ "5003-p2sp.bin",0x200000, 0x2332EE0C, 1 | BRF_ESS | BRF_PRG }, //  1
{ "5003-p3sp.bin",0x200000, 0x017919AA, 1 | BRF_ESS | BRF_PRG }, //  2

{ "5003-s1sp.bin",0x020000, 0xC5061AAF, 2 | BRF_GRA }, //  3 Text layer tiles

{ "5003-c1.bin",  0x800000, 0x29FD9108, 3 | BRF_GRA }, //  4 Sprite data
{ "5003-c2.bin",  0x800000, 0xF58D4D3E, 3 | BRF_GRA }, //  5
{ "5003-c3.bin",  0x800000, 0x71B3172D, 3 | BRF_GRA }, //  6
{ "5003-c4.bin",  0x800000, 0x564C70C1, 3 | BRF_GRA }, //  7
{ "5003-c5.bin",  0x800000, 0x8EF8AEF9, 3 | BRF_GRA }, //  8
{ "5003-c6.bin",  0x800000, 0x8A0FD440, 3 | BRF_GRA }, //  9
{ "5003-c7.bin",  0x800000, 0x6F1EFFAB, 3 | BRF_GRA }, // 10
{ "5003-c8.bin",  0x800000, 0x39550D3A, 3 | BRF_GRA }, // 11

{ "5003-m1.bin",  0x020000, 0x526CCCAB, 4 | BRF_ESS | BRF_PRG }, // 12 Z80 code

{ "5003-v1.bin",  0x400000, 0x83D49ECF, 5 | BRF_SND }, // 13 Sound data
{ "5003-v2.bin",  0x400000, 0x003F1843, 5 | BRF_SND }, // 14
{ "5003-v3.bin",  0x400000, 0x2AE38DBE, 5 | BRF_SND }, // 15
{ "5003-v4.bin",  0x400000, 0x26EC4DD9, 5 | BRF_SND }, // 16
};

STDROMPICKEXT(ct2003sp, ct2003sp, neogeo);
STD_ROM_FN(ct2003sp);

static void ct2003spSMADecrypt()
{
unsigned char *src = Neo68KROM;
unsigned char *dst = (unsigned char*)malloc(0x500000);
int sec[] = {0x400000,0x000000,0x100000,0x200000,0x300000};
if (dst) {
 memcpy(dst,src,0x500000);

 for(int i = 0; i < 5; ++i)
      memcpy(src+i*0x100000,dst+sec[i],0x100000);

 free(dst);
}
}

static int ct2003spInit()
{
nNeoTextROMFixType = 7;
return NeoSMAInit(ct2003spSMADecrypt,cthdWriteWordBankswitch,0,0);
}

struct BurnDriver BurnDrvct2003sp = {
"ct2003sp","ct2003nd", "neogeo", "2003",
"Crouching Tiger Hidden Dragon 2003 Super Plus\0",NULL , "Phenixsoft", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_BOOTLEG | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
NULL, ct2003spRomInfo, ct2003spRomName, neogeoInputInfo, neogeoDIPInfo,
ct2003spInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
Title: d_neogeo.cpp matching MAME .92
Post by: FerchogtX on March 06, 2005, 09:55:34 PM
But that is emulating another set..., the real thing is to emulate the 256 KB s1 rom man, mame can do it, do you know how to fix that? :D
See ya!!!!! :D
P.D. do you figured out how to fix also the fba skin bug in win9x/ME? as you know the "preview blitter" option doesn't work on these O.S.... :(
Title: d_neogeo.cpp matching MAME .92
Post by: iq_132 on March 06, 2005, 11:15:23 PM
What's different is that the sets match MAME's more closely.
I've removed games that MAME doesn't support, added the comments that are in MAME's drivers for the games, and put them in the order the same as they are in the MAME source.
Quite a lot of work, actually.
Title: d_neogeo.cpp matching MAME .92
Post by: FerchogtX on March 06, 2005, 11:36:47 PM
Quote from: iq_132
What's different is that the sets match MAME's more closely.
I've removed games that MAME doesn't support, added the comments that are in MAME's drivers for the games, and put them in the order the same as they are in the MAME source.
Quite a lot of work, actually.

I thought that maybe one or 2 CRC's were different, at least that i understood when i saw that matching mame 0.92 XD..., anyway I noticed that you reordered the drivers and added comments XD, and of course that is a LOT OF WORK and EFFORT, almost 500 games reordered? that's really a lot of work.
Thanks for the answer IQ... i hope you don't get mad :( I just missunderstood the post
See ya!!!!! :D
Title: d_neogeo.cpp matching MAME .92
Post by: netbug on March 07, 2005, 12:10:08 AM
Thanks for your notice!It's frustrating to
learn of missing some code last time.I re-download
those roms(pbobblen/aof/wh1/wh1h/kotm2) and
have succeeded on the last trial a moment age.
At last maybe other bugs exist in my code,
please tell me.

This following code is much more better than yesterday's.
BTW,there was a mixed-audio missing in the code I
have posted last night while running pbobblen/pbobblna.
.Now,you can get rid of those bugs.
neo_run.cpp (maybe finally code)

find : (1-1)
if (pInfo->nADPCMBNum == 0) {
nYM2610ADPCMASize *= pName[FindType(pName) + 1] - '1';
} else {
nYM2610ADPCMASize *= pName[FindType(pName) + 2] - '1';
}


replace with: (1-1)
/*
if (pInfo->nADPCMBNum == 0) {
nYM2610ADPCMASize *= pName[FindType(pName) + 1] - '1';
} else {
nYM2610ADPCMASize *= pName[FindType(pName) + 2] - '1';
}*/

if ((!strcmp(BurnDrvGetTextA(DRV_NAME), "pbobblen")) || (!strcmp(BurnDrvGetTextA(DRV_NAME), "pbobblna"))) {
nYM2610ADPCMASize *= 3;
} else {
nYM2610ADPCMASize *=pInfo->nADPCMANum-1;
} :mad:  :D
Title: d_neogeo.cpp matching MAME .92
Post by: FerchogtX on March 07, 2005, 08:13:09 PM
Thanks for the fix netbug, I'll test it and tell you :)
See ya!!!!!! :D
Title: d_neogeo.cpp matching MAME .92
Post by: netbug on March 07, 2005, 10:02:16 PM
hi,guy,I have updated my code this morning. :)
Title: d_neogeo.cpp matching MAME .92
Post by: Shoometsu on March 13, 2005, 07:31:42 PM
Quote from: netbug
Other former bugs  were not fixed now.You can delete drivers Chinese name by yourself. :D


compiling 0.2.95.23 there are some gfx glitches in normal build, but with a debug build I can't see any gfx glitches but a small aside the logo in title screen. why :confused:
Title: d_neogeo.cpp matching MAME .92
Post by: netbug on March 13, 2005, 07:51:33 PM
Fixing gfx glitches and former bugs in tmnt drivers is beyond my capacity
at present.Just wait for official support or some great men
post the fixed code. :)  ;)
At last I'm terribly hungry now and must breakfast on the street immediately
See you :D  ;)  :mad:  :D  :mad:
Title: d_neogeo.cpp matching MAME .92
Post by: Shoometsu on March 14, 2005, 04:36:52 PM
Quote from: netbug
Fixing gfx glitches and former bugs in tmnt drivers is beyond my capacity
at present.Just wait for official support or some great men
post the fixed code. :)  ;)
At last I'm terribly hungry now and must breakfast on the street immediately
See you :D  ;)  :mad:  :D  :mad:


but what I said is that there are fixed gfx glitches in the debug build that there aren't in a normal build, using the same drivers... What I need to understand is why the debug build don't have these gfx glitches...

breakfast and respose, quickly plz :D
Title: d_neogeo.cpp matching MAME .92
Post by: netbug on March 14, 2005, 08:44:09 PM
Quote from: Shoometsu
but what I said is that there are fixed gfx glitches in the debug build that there aren't in a normal build, using the same drivers... What I need to understand is why the debug build don't have these gfx glitches...

breakfast and respose, quickly plz :D



The Original tmnt drivers code was posted by FerchogtX,maybe
only he can explain those issues.BTW,the debug build
and the normal build versions of my owner both work
without gfx glitches in Win2k/XP with "32bit" colour depth!!!!
So, God know what's wrong with the drivers....  
:eek:  :eek: :D  :D :D
Title: d_neogeo.cpp matching MAME .92
Post by: Shoometsu on March 14, 2005, 09:37:36 PM
look at the attachments...
Title: d_neogeo.cpp matching MAME .92
Post by: netbug on March 14, 2005, 10:50:37 PM
The debug builds version is compiled with debugger code,
however,normal builds version does not include those
code. So...............  :eek:   :D  :D
Title: d_neogeo.cpp matching MAME .92
Post by: FerchogtX on March 15, 2005, 09:17:10 PM
Netbug thanks to God that you're here, i need a lil' help with sega stuff, by some strange reason i cannot make the drivers work like in 0.2.94.98... I hope you can help me out converting this to 0.295.23 format, i'll be thankfull
I attach the files that you need for sega, the other thing is to add them to the makefile (no too dificult XD)
Thanks a lot in advance man...
See ya!!!!! :D
P.D. about tmnt GFX, the drawing routine is written for 32 bit desktops, that needs to be fixed (Mame can run the game either in 165 or 32 bitdepths)
Title: d_neogeo.cpp matching MAME .92
Post by: netbug on March 17, 2005, 03:11:54 AM
Quote from: FerchogtX
Netbug thanks to God that you're here, i need a lil' help with sega stuff, by some strange reason i cannot make the drivers work like in 0.2.94.98... I hope you can help me out converting this to 0.295.23 format, i'll be thankfull
bitdepths)


I have downloaded your previous sega stuff since you posted in this forum.
However,the games including aburner2 and aburner were still out of control
and no sound in new version,then,I had to abort the attempt.So just await offical updates someday or some gentlemen's fix.BTW,I will be away from internet recently for nearly one year because of my boss.
See you next year.
 :p  :mad:  :o  :D  :D  ;)
Title: d_neogeo.cpp matching MAME .92
Post by: FerchogtX on March 18, 2005, 09:33:38 PM
OK netbug, thanks anyways and thanks for all the help you gave me with the about menu and neogeo stuff :)
See ya!!!!! :D
Title: d_neogeo.cpp matching MAME .92
Post by: FerchogtX on March 23, 2005, 10:54:53 PM
Well, i have a doubt... maybe someone that has this games can test and tell me, does both of this work?
Code: [Select]
// Fatal Fury Special (alternate version)

static struct BurnRomInfo fatfursaRomDesc[] = {
{ "058-p1.bin",   0x100000, 0x2f585ba2, 1 | BRF_ESS | BRF_PRG }, //  0 68K code
{ "058-p2.bin",   0x080000, 0xd7c71a6b, 1 | BRF_ESS | BRF_PRG }, //  1

{ "058-s1.bin",   0x020000, 0x2df03197, 2 | BRF_GRA }, //  2 Text layer tiles

{ "058-c1.bin",   0x200000, 0x044ab13c, 3 | BRF_GRA }, //  3 Sprite data
{ "058-c2.bin",   0x200000, 0x11e6bf96, 3 | BRF_GRA }, //  4
{ "058-c3.bin",   0x200000, 0x6f7938d5, 3 | BRF_GRA }, //  5
{ "058-c4.bin",   0x200000, 0x4ad066ff, 3 | BRF_GRA }, //  6
{ "058-c5.bin",   0x200000, 0x49c5e0bf, 3 | BRF_GRA }, //  7
{ "058-c6.bin",   0x200000, 0x8ff1f43d, 3 | BRF_GRA }, //  8

{ "058-m1.bin",   0x020000, 0xccc5186e, 4 | BRF_ESS | BRF_PRG }, //  9 Z80 code

{ "058-v1.bin",   0x200000, 0x55d7ce84, 5 | BRF_SND }, // 10 Sound data
{ "058-v2.bin",   0x200000, 0xee080b10, 5 | BRF_SND }, // 11
{ "058-v3.bin",   0x100000, 0xf9eb3d4a, 5 | BRF_SND }, // 12

{ "058-ep1.bin",  0x080000, 0x9f0c1e1a, 0 | BRF_ESS | BRF_PRG }, // 13 68K code
};

STDROMPICKEXT(fatfursa, fatfursa, neogeo);
STD_ROM_FN(fatfursa);

static void fatfursaCallback()
{
BurnLoadRom(Neo68KROM, 13, 1);
}

static int fatfursaInit()
{
pNeoInitCallback = fatfursaCallback;

  return NeoInit();
}

struct BurnDriver BurnDrvFatfursa = {
"fatfursa", "fatfursp", "neogeo", "1993",
"Fatal Fury Special\0Garou Densetsu Special\0", "Alternate version", "SNK", "Neo Geo",
L"Fatal Fury Special\0\u9913\u72FC\u4F1D\u8AAC Special\0", NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
NULL, fatfursaRomInfo, fatfursaRomName, neogeoInputInfo, neogeoDIPInfo,
fatfursaInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
Code: [Select]
// Art of Fighting 2 (alternate version)

static struct BurnRomInfo aof2aRomDesc[] = {
{ "056-p1.bin",   0x100000, 0xa3b1d021, 1 | BRF_ESS | BRF_PRG }, //  0 68K code

{ "056-s1.bin",   0x020000, 0x8b02638e, 2 | BRF_GRA }, //  1 Text layer tiles

{ "056-c1.bin",   0x200000, 0x17b9cbd2, 3 | BRF_GRA }, //  2 Sprite data
{ "056-c2.bin",   0x200000, 0x5fd76b67, 3 | BRF_GRA }, //  3
{ "056-c3.bin",   0x200000, 0xd2c88768, 3 | BRF_GRA }, //  4
{ "056-c4.bin",   0x200000, 0xdb39b883, 3 | BRF_GRA }, //  5
{ "056-c5.bin",   0x200000, 0xc3074137, 3 | BRF_GRA }, //  6
{ "056-c6.bin",   0x200000, 0x31de68d3, 3 | BRF_GRA }, //  7
{ "056-c7.bin",   0x200000, 0x3f36df57, 3 | BRF_GRA }, //  8
{ "056-c8.bin",   0x200000, 0xe546d7a8, 3 | BRF_GRA }, //  9

{ "056-m1.bin",   0x020000, 0xf27e9d52, 4 | BRF_ESS | BRF_PRG }, // 10 Z80 code

{ "056-v1.bin",   0x200000, 0x4628fde0, 5 | BRF_SND }, // 11 Sound data
{ "056-v2.bin",   0x200000, 0xb710e2f2, 5 | BRF_SND }, // 12
{ "056-v3.bin",   0x100000, 0xd168c301, 5 | BRF_SND }, // 13

{ "056-ep1.bin",  0x080000, 0x75D6301C, 1 | BRF_ESS | BRF_PRG }, // 14 68K code patch
};

STDROMPICKEXT(aof2a, aof2a, neogeo);
STD_ROM_FN(aof2a);

static void aof2aCallback()
{
BurnLoadRom(Neo68KROM, 14, 1);
}

static int aof2aInit()
{
pNeoInitCallback = aof2aCallback;

  return NeoInit();
}

struct BurnDriver BurnDrvAof2a = {
"aof2a", "aof2", "neogeo", "1994",
"Art of Fighting 2\0Ryuuko no Ken 2\0", "Alternate version", "SNK", "Neo Geo",
L"Art of Fighting 2\0\u9F8D\u864E\u306E\u62F3\uFF12\0", NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
NULL, aof2aRomInfo, aof2aRomName, neogeoInputInfo, neogeoDIPInfo,
aof2aInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
why I'm asking this? if no one has noticed that:
Code: [Select]
{ "058-ep1.bin",  0x080000, 0x9f0c1e1a, 0 | BRF_ESS | BRF_PRG }, // 13 68K codeand
Code: [Select]
{ "056-ep1.bin",  0x080000, 0x75D6301C, 1 | BRF_ESS | BRF_PRG }, // 14 68K code patcharen't tha same... why? because in aof2a the ep1 ROM has the "1" in the type and fatfursa has a "0"... the 0 is supposed to mean that the ROM is in the driver but it will be never loaded (more or less like the encrypted m1 ROMs).
So the question is: both of them work? because looks weird...  :confused:
Thanks in advance
See ya!!!!! :D
Title: d_neogeo.cpp matching MAME .92
Post by: iq_132 on March 24, 2005, 01:54:28 AM
It doesn't really matter.  The extra rom at the bottom is suppose to be loaded on top of the P-ROM at a certain point.

If I had to choose, I would say that putting a 0 there would be more standard.