Jump to content

iq_132

1Emu Veteran
  • Posts

    2,311
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by iq_132

  1. btw, iq_132 has found a way to get sound from encrypted sets of rotd and mslug4 :D

    so if it works well for me, expect the next version to include those encrypted rom drivers ;)

     

    UPDATE: ok iq_132's sound fix works on fba for pc but when i try to add it to fba-xxx i get errors  ;)

     

    i posted a reply to gogo's forum and waiting to see if he woud look at it but for anyone else here willing to try to compile the fix heres the info:

    http://www.freepgs.com/iq_132/pages/games/neopcm2.htm

     

    Update 2: ok, it seems the problem is with the src (cannot open or find the following: fba.h, progress.h, musicmanager.cpp, and xlmenu.cpp) i have already compiled the original fba-x src with iq_132's sound fix so i just need fba-xxx to work with me :P

     

    minor note, i tried using the 5-10 release of fba-xxx with the fix and got bad gfx using any encrypted rom :(  but when i tried using the original fba-x src compiled with the fix it works great with a minor gfx flaw in mslug4 warning screen.

    The minor glitch in the mslug4 warning screen is a known bug in most neo-geo emus ;) Even MAME has a problem with it:

     

    This is from MAME.67

    neogeo_fix_bank_type = 1; /* maybe slightly different, USA violent content screen is wrong */

     

    Also, this may help with certain compiling problems. If not, I have another idea also.

     

    Replace the main body of code with this:

    http://www.freepgs.com/iq_132/pages/games/cygwinpcm2.txt

  2. hey iq_132, was there an aes fix for mslug4? i noticed that when i tried the fix in fba-x b4 that i get the snk error screen in aes mode :D

    static void mslug4AESPatch()
    { 	 
    *((unsigned short*)(Neo68KROM01 + 0x0AD8C)) = 0x4E75; 
    } 
    
    static int mslug4Init()
    { 	 
    pNeoInitCallback = mslug4AESPatch;
    return NeoInit();
    }

     

    @ Weirdy

     

    I'll put together the source for you tonight and put it on my website :lol:

  3. ok, nm, I fixed the kof2003 problem, but now I have a problem with ROTD

     

    I did what you said to do on your site and I all I hear is that...static-ie sound...

     

    how do I fix that?

     

    // Rage of the Dragons
    
    static struct BurnRomInfo rotdRomDesc[] = {
    {"264-p1.bin", 0x800000, 0xb8cc969d, 0x10}, //  0 68K code
    
    {"264-c1.bin", 0x800000, 0x4f148fee,    1}, //  1 Sprite data
    {"264-c2.bin", 0x800000, 0x7cf5ff72,    1}, //  2
    {"264-c3.bin", 0x800000, 0x64d84c98,    1}, //  3
    {"264-c4.bin", 0x800000, 0x2f394a95,    1}, //  4
    {"264-c5.bin", 0x800000, 0x6b99b978,    1}, //  5
    {"264-c6.bin", 0x800000, 0x847d5c7d,    1}, //  6
    {"264-c7.bin", 0x800000, 0x231d681e,    1}, //  7
    {"264-c8.bin", 0x800000, 0xc5edb5c4,    1}, //  8
    
    {"264-m1d.bin", 0x10000, 0xe5f42e7d, 0x10}, //  9 Z80 code
    
    {"264-v1.bin", 0x800000, 0xfa005812,    2}, //  10 Sound data
    {"264-v2.bin", 0x800000, 0xc3dc8bf0,    2}, //  11
    }; 
    
    STDROMPICKEXT(rotd, rotd, neogeo); 
    STD_ROM_FN(rotd);
    
    static int rotdInit()
    {
    nNeoProtectionXor = 0x3F;
    return NeoInit();
    nPCM2Value=16;
    }
    
    struct BurnDriver BurnDrvrotd = {
    
    {"rotd", "Rage of the Dragons", NULL, "Evoga", "Neo Geo", "2002", NULL, "neogeo"},
    BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ENCRYPTED_B,
    NULL, rotdRomInfo, rotdRomName, neogeoInputInfo, neogeoDIPInfo,
    rotdInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
    nNeoScreenWidth, 224, 4, 3
    };

    is that where you wanted us to put the nPCM2Value=16; ?

    Well, here's mine. The extra code is to fix AES mode.

     

    //	Rage of the Dragons (Encrypted Set)
    
    static struct BurnRomInfo rotdRomDesc[] = {
    {"264-p1.bin", 0x800000, 0xb8cc969d, 0x10}, //  0 68K code
    
    {"264-c1.bin", 0x800000, 0x4f148fee,    1}, //  2 Sprite data
    {"264-c2.bin", 0x800000, 0x7cf5ff72,    1}, //  3
    {"264-c3.bin", 0x800000, 0x64d84c98,    1}, //  5
    {"264-c4.bin", 0x800000, 0x2f394a95,    1}, //  6
    {"264-c5.bin", 0x800000, 0x6b99b978,    1}, //  7
    {"264-c6.bin", 0x800000, 0x847d5c7d,    1}, //  8
    {"264-c7.bin", 0x800000, 0x231d681e,    1}, //  9
    {"264-c8.bin", 0x800000, 0xc5edb5c4,    1}, //  10
    
    {"264-m1d.bin", 0x010000, 0xe5f42e7d, 0x10}, // 11 Z80 code
    
    {"264-v1.bin", 0x800000, 0xfa005812,    2}, //  12 Sound data
    {"264-v2.bin", 0x800000, 0xc3dc8bf0,    2}, //  13
    }; 
    
    STDROMPICKEXT(rotd, rotd, neogeo); 
    STD_ROM_FN(rotd);
    
    static void rotdAESPatch() 
    { 
    *((unsigned short*)(Neo68KROM01 + 0x001020)) = 0x4E71; 
    *((unsigned short*)(Neo68KROM01 + 0x002400)) = 0x4E71; 
    }
    
    static int rotdInit()
    {
    pNeoInitCallback = rotdAESPatch;
    nPCM2Value=16;
    nNeoProtectionXor = 0x3F;
    return NeoInit();
    }
    
    struct BurnDriver BurnDrvrotd = {
    
    {"rotd", "Rage of the Dragons", NULL, "Evoga", "Neo Geo", "2002", NULL, "neogeo"},
    BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ENCRYPTED_B,
    NULL, rotdRomInfo, rotdRomName, neogeoInputInfo, neogeoDIPInfo,
    rotdInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
    nNeoScreenWidth, 224, 4, 3
    };

  4. // The King of Fighter's 2003 (Bootleg)
    
    static struct BurnRomInfo kof2003bRomDesc[] = {
    {"271-p1.bin"   , 0x400000, 0x92ed6ee3, 0x10}, //  0 68K code
    {"271-p2.bin"	, 0x400000, 0x5d3d8bb3, 0x10}, //  1 68k code
    
    {"271-s1.bin"   , 0x020000, 0x7c7829aa,    1}, //  2 Text layer tiles
    
    {"271-c1d.rom"  , 0x800000, 0xe42fc226,    1}, //  3 Sprite data
    {"271-c2d.rom"  , 0x800000, 0x1b5e3b58,    1}, //  4
    {"271-c3d.rom"  , 0x800000, 0xd334fdd9,    1}, //  5
    {"271-c4d.rom"  , 0x800000, 0x0d457699,    1}, //  6
    {"271-c5d.rom"  , 0x800000, 0x8a91aae4,    1}, //  7
    {"271-c6d.rom"  , 0x800000, 0x9f8674b8,    1}, //  8
    {"271-c7d.rom"  , 0x800000, 0x374ea523,    1}, //  9
    {"271-c8d.rom"  , 0x800000, 0x75211f4d,    1}, //  10
    
    {"271-m1d.bin"  , 0x080000, 0x0e86af8f, 0x10}, //  11 Z80 code
    
    {"271-v1d.rom"  , 0x400000, 0xd2b8aa5e,    2}, //  12 Sound data
    {"271-v2d.rom"  , 0x400000, 0x71956ee2,    2}, //  13
    {"271-v3d.rom"  , 0x400000, 0xddbbb199,    2}, //  14
    {"271-v4d.rom"  , 0x400000, 0x01b90c4f,    2}, //  15
    };
    
    STDROMPICKEXT(kof2003b, kof2003b, neogeo);
    STD_ROM_FN(kof2003b);
    
    static unsigned short kof2003_tbl[0x1000];
    
    
    unsigned char __fastcall kof2003ReadByteBankSwitch(unsigned int sekAddress)
    {
    return *(((unsigned char *)kof2003_tbl)+((sekAddress^1)-0x2fe000));
    }
    
    
    unsigned short __fastcall kof2003ReadWordBankSwitch(unsigned int sekAddress)
    {
    return kof2003_tbl[(sekAddress-0x2fe000)/2];
    }
    
    static void kof2003WriteBankSwitch(unsigned int sekAddress,unsigned short wordValue,unsigned short valueMask)
    {
    int address=(sekAddress-0x2fe000)/2,bankaddress;
    kof2003_tbl[address]=(wordValue&valueMask)|(~valueMask&kof2003_tbl[address]);
    if(address!=0xff8 && address!=0xff9 ) return;
    bankaddress=(kof2003_tbl[0xff8]>>8)|(kof2003_tbl[0xff9]<<8);
    *(((unsigned char *)kof2003_tbl)+0x1ff0)=0xa0;
    *(((unsigned char *)kof2003_tbl)+0x1ff1)&=0xfe;
    *(((unsigned char *)kof2003_tbl)+0x1ff3)&=0x7f;
    SekMapMemory(Neo68KROM02+bankaddress,0x200000,0x2fdfff,SM_ROM);
    Neo68KROM01[0x58196]=kof2003_tbl[0xff9]&0xff;
    }
    
    
    void __fastcall kof2003WriteWordBankSwitch(unsigned int sekAddress, unsigned short wordValue)
    {
    unsigned short valueMask=0xffff;
    kof2003WriteBankSwitch(sekAddress, wordValue, valueMask);
    }
    
    void __fastcall kof2003WriteByteBankSwitch(unsigned int sekAddress, unsigned char byteValue)
    {
    unsigned short wordValue=0,valueMask=0xff;
    if(!(sekAddress&1)) {
     wordValue=byteValue<<8;
     valueMask<<=8;
    }
    else{
     wordValue=byteValue;
    }
    kof2003WriteBankSwitch(sekAddress,wordValue,valueMask);
    }
    
    void kof2003_RomExchange()
    {
    memcpy(Neo68KROM01+0x100000,Neo68KROM01,0x600000) ;
    memcpy(Neo68KROM01,Neo68KROM01+0x700000,0x100000) ;
    memset(Neo68KROM01+0x700000,0,0x100000);
    }
    
    static void kof2003MapHandler()
    {
    // Install BankSwitch handler
    SekMapHandler(5,	0x2fe000, 0x2fffff, SM_READ);
    SekSetReadWordHandler(5,  kof2003ReadWordBankSwitch);
    SekSetReadByteHandler(5,  kof2003ReadByteBankSwitch);
    
    SekMapHandler(5,	0x2fe000, 0x2fffff, SM_WRITE);
    SekSetWriteWordHandler(5, kof2003WriteWordBankSwitch);
    SekSetWriteByteHandler(5, kof2003WriteByteBankSwitch);
    }
    
    static int kof2003bInit()
    {
    int nRet;
    
    memset(kof2003_tbl,0,0x2000);
    
    pNeoInitCallback=kof2003_RomExchange;
    
    nRet=NeoInit();
    if(!nRet)
     kof2003MapHandler();
    return nRet;
    }
    
    struct BurnDriver BurnDrvkof2003b = {
    {"kof2003b", "The King of Fighters 2003 ( Bootleg )", NULL, "SNK Playmore Corporation", "Neo Geo", "2003", NULL, "neogeo"},
    BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_NEWBANKSYSTEM,
    NULL, kof2003bRomInfo, kof2003bRomName, neogeoInputInfo, neogeoDIPInfo,
    kof2003bInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
    nNeoScreenWidth, 224, 4, 3
    };

  5. Actually, I figured it out already :(

     

    You want to find this:

     

      if (BurnDrvGetHardwareCode() & HARDWARE_SNK_SWAPV) {
     	for (int i = 0; i < 0x00200000; i++) {
       unsigned char n = YM2610ADPCMAROM[i];
       YM2610ADPCMAROM[i] = YM2610ADPCMAROM[0x00200000 + i];
       YM2610ADPCMAROM[0x00200000 + i] = n;
     	}
     }
    }

     

    and put the main body of code after it ( The if (nPCM2Value != 0) part)

     

    For some reason there is some code in a different place in my fba source.

  6. Well, i'd suggest (if you're using Jabo's audio), to:

    1. Start your game

    2. Having completed #1, go to Options and then Configure Audio Plugin.

    3. On the audio plugin interface window, check the "Sync game to audio" checkbox.

×
×
  • Create New...