Author Topic: Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)  (Read 9830 times)

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« on: December 08, 2004, 06:03:20 PM »
Hi there!!! here the driver for the game (comes from RomShare):
in d_neogeo.cpp:
Code: [Select]
// Crouching Tiger Hidden Dragon 2003 Super Plus (hack)

static struct BurnRomInfo ct2003spRomDesc[] = {
{"5003-p1sp.bin", 0x100000, 0x96ee06bc, 0x10}, // 0 68K code
{"5003-p2sp.bin", 0x200000, 0x2332ee0c, 0x10}, // 1
{"5003-p3sp.bin", 0x200000, 0x017919aa, 0x10}, // 2

{"5003-s1sp.bin", 0x040000, 0x6c355ab4,   1}, // 3 Text layer tiles

{"5003-c1.bin",   0x800000, 0x68f54b67,   1}, // 4 Sprite data
{"5003-c2.bin",   0x800000, 0x2f8849d5,   1}, // 5
{"5003-c3.bin",   0x800000, 0xac4aff71,   1}, // 6
{"5003-c4.bin",   0x800000, 0xafef5d66,   1}, // 7
{"5003-c5.bin",   0x800000, 0xc7c1ae50,   1}, // 8
{"5003-c6.bin",   0x800000, 0x613197f9,   1}, // 9
{"5003-c7.bin",   0x800000, 0x64ddfe0f,   1}, // 10
{"5003-c8.bin",   0x800000, 0x917a1439,   1}, // 11

{"5003-m1.bin",   0x020000, 0x23772b2a, 0x10}, // 12 Z80 code

/* Identical to kof2001 */
{"262-v1.bin",    0x400000, 0x83d49ecf,   2}, // 13 Sound data
{"262-v2.bin",    0x400000, 0x003f1843,   2}, // 14
{"262-v3.bin",    0x400000, 0x2ae38dbe,   2}, // 15
{"262-v4.bin",    0x400000, 0x26ec4dd9,   2}, // 16
};

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

static void ct2003spDecrypt()
{
unsigned char *src = Neo68KROM01;
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);
}

UINT8 *romdata = (UINT8 *)(NeoZ80ROM);
UINT8 *tmp = (UINT8*)malloc(0x20000);
memcpy(tmp+8*0*128,romdata+8*0*128,8*32*128);
memcpy(tmp+8*32*128,romdata+8*64*128,8*32*128);
memcpy(tmp+8*64*128,romdata+8*32*128,8*32*128);
memcpy(tmp+8*96*128,romdata+8*96*128,8*32*128);
memcpy(romdata,tmp,8*128*128);
free(tmp);

memcpy(romdata-0x10000,romdata,0x10000);
cthd2003_c();
}

static int ct2003spInit()
{
pNeoSMABankswitch = cthd2003WriteWordBankswitch;
pNeoInitCallback = ct2003spDecrypt;
ncthd2003 = 1;
nNeoTextROMFixType = 4;
return NeoInit();
}

struct BurnDriver BurnDrvct2003sp = {
{"ct2003sp", "Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)", "Hack of cthd2003", "PhenixSoft", "Neo Geo", "2003", "cthd2003", "neogeo"},
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ALTERNATE_TEXT,
NULL, ct2003spRomInfo, ct2003spRomName, neogeoInputInfo, neogeoDIPInfo,
ct2003spInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
in neo_run.cpp:
Use any of the descrambling codes in the nNeoTextROMFixType thread (case 7)

Now... the prob is that i can't get the GFX working good, i mean, i can't display correctly the whloe information of the rom, only parts, even if deleting the ALTERNATE_TEXT flag i can't get good texts... anyone got an idea to fix it?
See ya!!!!! :D
P.D. The init is working perfectly, maybe this is problem of the emulator since 256 KB s1's doesn't really exists, at least in non-hack sets...  :confused:
P.D.2 to get that 3 p roms: take p1sp posted by Jimmy/Santahempa thats p1sp, split cthd2003 p2 in 4 parts, delete part 1, concatenate like this:
-part 2+3 = p2sp
-part 4+p1sd CRC32 ab5c4de0 = p3sp
I don't know if that is correct, is just to try to match the real lyout of the 68 K...
« Last Edit: May 10, 2005, 12:24:47 PM by iq_132 »

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #1 on: December 10, 2004, 12:36:40 PM »
:(  :( What happened? no one has got how to fix this prob?... i played around with all of neogeo src and i got nothing... anyone knows?
See ya!!!! :D

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #2 on: December 10, 2004, 08:51:08 PM »
All I know is that the S rom decrypt code has no affect at all .
IQ Forum Member

Offline fataku

  • Newbies
  • *
  • Posts: 22
  • Karma: +0/-0
  • Junior Member
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #3 on: December 10, 2004, 09:02:19 PM »
afaik this rom 5003-p1sp.bin 0x96ee06bc is scrambled, and you are missing the other 2 P scrambled roms, then have to descramble it and thats all  :rolleyes:

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #4 on: December 13, 2004, 06:44:00 AM »
If you split the S rom 6c355ab4 into 2 you get 2 128k roms with the same CRC c5061aaf. Maybe this is the right one to work with ?
IQ Forum Member

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #5 on: December 14, 2004, 11:04:47 PM »
Quote from: fataku
afaik this rom 5003-p1sp.bin 0x96ee06bc is scrambled, and you are missing the other 2 P scrambled roms, then have to descramble it and thats all  :rolleyes:

XD this time i have to say you are wrong, that rom is the fist part of a p2 rom, compare with the fist MB of cthd2003 p2 rom and you will see that they are similar, they just changed the pallete for zero and ignis (B) button color, for the other roms, you're right i'm missing tem, but no one have discovered the CRC's of the real cart... that's the reason i use this, becaus is suposed that the rom uses this lyout (or the contrary if you confirm it):
p1 = 1st MB of p2
p2 = 2nd and 3rd part of p2
p3 = 4th part of p2 and p1 rom
maybe this is wrong but noone has confirmed either this protection of the CRC's
See ya!!!!! :D

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #6 on: December 22, 2004, 11:04:08 PM »
Well, i tried all i know (in my short knowledge) to get that 256 KB s1 working on fba... and nothing... i think that is something in neo_text.cpp, but i don't understand anything of that file XD...
I give up XD how does mame read s1 roms? in that emu works fine  :confused:
See ya!!!!!!! :D

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re:
« Reply #7 on: December 23, 2004, 12:54:11 AM »
Quote from: FerchogtX
Well, i tried all i know (in my short knowledge) to get that 256 KB s1 working on fba... and nothing... i think that is something in neo_text.cpp, but i don't understand anything of that file XD...
I give up XD how does mame read s1 roms? in that emu works fine  :confused:
See ya!!!!!!! :D


It won't work on FBA.

The FBA need to be updated inorder it to work on others arcade programs roms. It not compadable yet on FBA.

That why it won't pickup.

Just like the some of the winkawak roms won't pickup on FBA. For exsamle Bang Bead (bngbeadn) won't work on FBA. :)

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #8 on: December 23, 2004, 06:06:20 PM »
Quote from: KingHanco
It won't work on FBA.

The FBA need to be updated inorder it to work on others arcade programs roms. It not compadable yet on FBA.

That why it won't pickup.

Just like the some of the winkawak roms won't pickup on FBA. For exsamle Bang Bead (bngbeadn) won't work on FBA. :)

Well, as far as i know that set works on fba, i got it working a lot of time ago, this game (ct2003sp) needs a handler for reading 256 KB roms, that's the only thing, if someone with more knowledge than me knows the answer, ct2003sp will work in FBA.
See ya!!!!! :D
P.D. Kawaks sets are 100% compatible with FBA, you need to read a lil' more the src, all Kawaks and nebula and mame sets are working on it.

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #9 on: December 23, 2004, 11:51:01 PM »
Quote from: FerchogtX
P.D. Kawaks sets are 100% compatible with FBA, you need to read a lil' more the src, all Kawaks and nebula and mame sets are working on it.


Hmmm...

That weard.

RomCenter people at their forum told me not all the Kawaks roms aren't compatible with FBA.

I couldn't get some of those roms to work and I thought their right about that.

I shouldv'e ask you instead. :)

Some of those roms I get blue wires screen and I try all swaps to get to work. No luck at all.

Yes not all the CRC aren't the same thing. Different levels of same and different dumps.

Have you been to the CAESAR website yet??? There are some things that I learn from there.

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #10 on: December 24, 2004, 04:58:48 PM »
Quote from: KingHanco
Hmmm...

That weard.

RomCenter people at their forum told me not all the Kawaks roms aren't compatible with FBA.

I couldn't get some of those roms to work and I thought their right about that.

I shouldv'e ask you instead. :)

Some of those roms I get blue wires screen and I try all swaps to get to work. No luck at all.

Yes not all the CRC aren't the same thing. Different levels of same and different dumps.

Have you been to the CAESAR website yet??? There are some things that I learn from there.

Well, is hard to believe but, RomCenter people is wrong, all kawaks sets worrk on fba, im gonna explain you:
-FBA is open source, what doees this mean? that fba can be modified by its original program code or source, if you know a lil of programing or have time to read and use your intuition, you can add features to the program you are compiling, in this case FBA, so, you can add WORKING drivers into fba, and even mnore if you invest a lil' of your time and patient.

-Some games need extra configuratiosn, such as the standard fix functions (swaps), in other cases, inits, that needs to know about tha protection involved of the game to be emulated, this can vary (for example, kof2002 p2 protection, of the Neo-PVC protection or bankswitches). sometimes you van get some sets easily working, sometimes you'll need help (such the help that halrin gave to all of us releasing Neo-PVC codes).

As you can see if you want you can make run whatever you want, sometimes you'll need help (like me in this case) but if the program (or emu) is open src, this open a world of posibilities in modifying the prgram itself
See ya!!!!! :D
P.D. Not all that RomCenter people says is the truth, try another version of romcenter (like 2.52 or 2.60) i have that program too and I never had problems with CRC stuff

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #11 on: April 07, 2005, 08:46:16 PM »
ok... here a fix for ct2003sp, i finally got the way
Driver:
Code: [Select]
// Crouching Tiger Hidden Dragon 2003 Super Plus (bootleg / hack)

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", 0x040000, 0x6c355ab4, 2 | BRF_GRA }, // 3 Text layer tiles

{ "5003-c1.bin", ? 0x800000, 0x68F54B67, 3 | BRF_GRA }, // 4 Sprite data
{ "5003-c2.bin", ? 0x800000, 0x2F8849D5, 3 | BRF_GRA }, // 5
{ "5003-c3.bin", ? 0x800000, 0xAC4AFF71, 3 | BRF_GRA }, // 6
{ "5003-c4.bin", ? 0x800000, 0xAFEF5D66, 3 | BRF_GRA }, // 7
{ "5003-c5.bin", ? 0x800000, 0xC7C1AE50, 3 | BRF_GRA }, // 8
{ "5003-c6.bin", ? 0x800000, 0x613197F9, 3 | BRF_GRA }, // 9
{ "5003-c7.bin", ? 0x800000, 0x64DDFE0F, 3 | BRF_GRA }, // 10
{ "5003-c8.bin", ? 0x800000, 0x917A1439, 3 | BRF_GRA }, // 11

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

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

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

static void ct2003spDecrypt()
{
unsigned char* pTemp = (unsigned char*)malloc(0x500000);
if (pTemp) {
unsigned int nBank[] = {0x400000,0x000000,0x100000,0x200000,0x300000};
memcpy(pTemp, Neo68KROM, 0x500000);

for (int i = 0; i < 5; i++) {
memcpy(Neo68KROM + i * 0x100000, pTemp + nBank[i], 0x100000);
}
free(pTemp);
}

extern unsigned char* NeoZ80ROM;
unsigned char* tmp = (unsigned char*)malloc(0x020000);

memcpy(tmp + 0 * 0x8000, NeoZ80ROM + 0 * 0x8000, 0x8000);
memcpy(tmp + 1 * 0x8000, NeoZ80ROM + 2 * 0x8000, 0x8000);
memcpy(tmp + 2 * 0x8000, NeoZ80ROM + 1 * 0x8000, 0x8000);
memcpy(tmp + 3 * 0x8000, NeoZ80ROM + 3 * 0x8000, 0x8000);
memcpy(NeoZ80ROM, tmp, 0x20000);
free(tmp);

DoPerm(0);
}

static int ct2003spInit()
{
int nRet;
pNeoInitCallback = ct2003spDecrypt;
pNeoBankswitchCallback = NeoMapBank;
nNeoTextROMFixType = 4;

  nRet = NeoInit();
if (nRet == 0) {
SekOpen(0);

// Install bankswitch handler
// There is some 68K issues in the character sellect screen
// on this game, overclocking the 68K CPU prevents it.
SekMapHandler(4, 0x200000, 0x2FFFFF, SM_WRITE);
SekSetWriteWordHandler(4, cthd2003WriteWordBankswitch);
SekSetWriteByteHandler(4, cthd2003WriteByteBankswitch);
cthd2003Bankswitch(0);

SekClose();
}
return nRet;
}

struct BurnDriver BurnDrvct2003sp = {
"ct2003sp", "cthd2003", "neogeo", "2003",
"Crouching Tiger Hidden Dragon 2003 Super Plus\0", "Hack of \"Crouching Tiger Hidden Dragon 2003\"", "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
};
In neorun.cpp you must have this (with the whole int definitions):
Code: [Select]
// Load Text layer tiledata
{
// Load boardROM data
BurnLoadRom(NeoTextROM, 0x00080 + 0x14, 1);

if (pInfo->nTextOffset != -1) {
// Load S ROM data
BurnLoadRom(NeoTextROM + 0x020000, pInfo->nTextOffset, 1);

switch (nNeoTextROMFixType) {
// Original code for MAME by fataku
case 1: {
for ( int i = 0; i < 0x20000; i++ ) {
(NeoTextROM+0x20000)[i] = BITSWAP08((NeoTextROM+0x20000)[i],3,2,4,5,1,6,0,7);
}
break;
}
// Original code from mame traduced by FerchogtX
case 2: {
unsigned char* tmp = (unsigned char*)malloc(0x20000);
memcpy( tmp + 0x000000, NeoTextROM + 0x020000 + 0x010000, 0x010000 );
memcpy( tmp + 0x010000, NeoTextROM + 0x020000 + 0x000000, 0x010000 );
memcpy( NeoTextROM + 0x20000, tmp, 0x020000 );
free( tmp );
break;
}
// Thanks also to HappyASR for the info
case 3: {
unsigned char* tmp = (unsigned char*)malloc(0x20000);
if (tmp) {
memcpy( tmp, NeoTextROM + 0x20000, 0x20000 );
// descrambling the S1 by dorriGa
for ( int j = 0; j < 0x20000; j += 0x000010 ) {
memcpy( NeoTextROM + 0x20000 + j, tmp + j + 0x000008, 8);
memcpy( NeoTextROM + 0x20000 + j + 0x000008, tmp + j, 8);
}
}
free( tmp );
break;
}
// Original code by HalRIN
case 4: {
unsigned char* tmp = (unsigned char*)malloc(0x40000);
int i, ofst;

memcpy( tmp, NeoTextROM + 0x20000, 0x40000 );
for( i = 0; i < 0x40000; i++ ) {
ofst = BITSWAP24((i & 0x1ffff),23,22,21,20,19,18,17,3,0,1,4,2,
13,14,16,15,5,6,11,10,9,8,7,12);
ofst += (i >> 17) << 17;
(NeoTextROM+0x20000)[i] = tmp[ofst];
}
memcpy( tmp, NeoTextROM + 0x20000, 0x40000 );
memcpy( NeoTextROM + 0x20000 + 0x08000, tmp + 0x10000, 0x8000 );
memcpy( NeoTextROM + 0x20000 + 0x10000, tmp + 0x08000, 0x8000 );
memcpy( NeoTextROM + 0x20000 + 0x28000, tmp + 0x30000, 0x8000 );
memcpy( NeoTextROM + 0x20000 + 0x30000, tmp + 0x28000, 0x8000 );
free( tmp );
break;
}
// Converted by Jimmy_Page (www.neofighters.com)
case 5: {
for ( int i = 0; i < 0x20000; i++ ) {
(NeoTextROM+0x20000)[i] = BITSWAP08((NeoTextROM+0x20000)[i],7,6,0,4,3,2,1,5);
}
break;
}
// Thanks to IQ_132, this is to keep saving the descrambled data when needed
case 6: {
kof2002b_gfx_decrypt(NeoTextROM + 0x20000, 0x20000);
break;
}
}
} else {
// Extract data from the end of C ROMS
BurnUpdateProgress(0.0, _T("Generating text layer graphics..."), 0);
NeoExtractSData(NeoSpriteROM, NeoTextROM + 0x020000, nSpriteSize, nNeoTextROMSize);

// Original convertion by IQ_132 (This is for svcchaos, kof2003 and clones)
if (nNeoTextROMFixType == 7) {
for( int i = 0; i < nNeoTextROMSize; i++ ) {
(NeoTextROM+0x20000)[i] = BITSWAP08((NeoTextROM+0x20000)[i]^0xd2,4,0,7,2,5,1,6,3);
}
}
}
}
and finally: neo_text.cpp
Look for this:
Code: [Select]
if (nNeoTextROMSize > 0x020000) {
if (BurnDrvGetHardwareCode() & HARDWARE_SNK_ALTERNATE_TEXT) {
nBankswitch = 2;

// Precompute lookup-tables
for (int x = nMinX; x < nMaxX; x++) {
nBankLookupAddress[x] = (x / 6) << 5;
nBankLookupShift[x] = (5 - (x % 6)) << 1;
}

} else {
nBankswitch = 1;
}
}
Replace with this:
Code: [Select]
if (nNeoTextROMSize > 0x020000 && nNeoTextROMSize != 0x040000) {
if (BurnDrvGetHardwareCode() & HARDWARE_SNK_ALTERNATE_TEXT) {
nBankswitch = 2;

// Precompute lookup-tables
for (int x = nMinX; x < nMaxX; x++) {
nBankLookupAddress[x] = (x / 6) << 5;
nBankLookupShift[x] = (5 - (x % 6)) << 1;
}

} else {
nBankswitch = 1;
}
}
Now ct2003sp runs perfectly
See ya!!!!! :D
« Last Edit: September 03, 2015, 09:24:34 AM by iq_132 »

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline bms888

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
  • Member
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #12 on: April 07, 2005, 08:54:00 PM »
Nice job,FerchogtX!

Offline iq_132

  • Administrator
  • *****
  • Posts: 3723
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #13 on: April 07, 2005, 09:31:03 PM »
Nice :)  But wouldn't this be much easier?

Code: [Select]
if (nNeoTextROMSize > 0x040000) {
if (BurnDrvGetHardwareCode() & HARDWARE_SNK_ALTERNATE_TEXT) {
nBankswitch = 2;

// Precompute lookup-tables
for (int x = nMinX; x < nMaxX; x++) {
nBankLookupAddress[x] = (x / 6) << 5;
nBankLookupShift[x] = (5 - (x % 6)) << 1;
}

} else {
nBankswitch = 1;
}
}


Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Driver: Crouching Tiger Hidden Dragon 2003 Super Plus! (hack)
« Reply #14 on: April 07, 2005, 10:37:16 PM »
That breaks suport for 128 KB extracted data from C-ROMs (at least that i did before and got probs with other games)
See ya!!!! :D

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...