Author Topic: How to play bug...  (Read 6358 times)

Offline DsNo

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +9/-0
  • Junior Member
How to play bug...
« on: January 12, 2007, 01:43:50 AM »
Code: [Select]
// The King of Fighters '2002 (Decrypted set)

static struct BurnRomInfo kof2k2ndRomDesc[] = {
{ "265-p1.bin",   0x100000, 0x9EDE7323, 1 | BRF_ESS | BRF_PRG }, //  0 68K code
{ "265-p2.bin",   0x400000, 0x432FDF53, 1 | BRF_ESS | BRF_PRG }, //  1

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

{ "265-c1.bin",   0x800000, 0x7EFA6EF7, 3 | BRF_GRA }, //  3 Sprite data
{ "265-c2.bin",   0x800000, 0xAA82948B, 3 | BRF_GRA }, //  4
{ "265-c3.bin",   0x800000, 0x959FAD0B, 3 | BRF_GRA }, //  5
{ "265-c4.bin",   0x800000, 0xEFE6A468, 3 | BRF_GRA }, //  6
{ "265-c5.bin",   0x800000, 0x74BBA7C6, 3 | BRF_GRA }, //  7
{ "265-c6.bin",   0x800000, 0xE20D2216, 3 | BRF_GRA }, //  8
{ "265-c7.bin",   0x800000, 0x8A5B561C, 3 | BRF_GRA }, //  9
{ "265-c8.bin",   0x800000, 0xBEF667A3, 3 | BRF_GRA }, // 10

{ "265-m1.bin",   0x020000, 0x1C661A4B, 4 | BRF_ESS | BRF_PRG }, // 11 Z80 code

{ "265-v1.bin",   0x400000, 0x13D98607, 5 | BRF_SND }, // 12
{ "265-v2.bin",   0x400000, 0x9CF74677, 5 | BRF_SND }, // 13
{ "265-v3.bin",   0x400000, 0x8E9448B5, 5 | BRF_SND }, // 14
{ "265-v4.bin",   0x400000, 0x067271B5, 5 | BRF_SND }, // 15
};

STDROMPICKEXT(kof2k2nd, kof2k2nd, neogeo);
STD_ROM_FN(kof2k2nd);

struct BurnDriver BurnDrvkof2k2nd = {
"kof2k2nd", NULL, "neogeo", "2002",
"The King of Fighters '2002 - Challenge to Ultimate Battle\0", NULL, "Eolith / Playmore Corporation", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING, 2, HARDWARE_SNK_NEOGEO,
NULL, kof2k2ndRomInfo, kof2k2ndRomName, neogeoInputInfo, neogeoDIPInfo,
NeoInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

It is a solution method of this problem?
« Last Edit: January 12, 2007, 01:44:55 AM by DsNo »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3724
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: How to play bug...
« Reply #1 on: January 12, 2007, 08:00:05 AM »
in neo_run.cpp, at the end of unsigned short __fastcall neogeoReadWord(unsigned int sekAddress) is a return 0;
change it to return 0xff;


Offline DsNo

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +9/-0
  • Junior Member
Re: How to play bug...
« Reply #2 on: January 12, 2007, 09:08:28 AM »
In: neo_run.cpp
Code: [Select]
unsigned short __fastcall neogeoReadWord(unsigned int sekAddress)
{
switch (sekAddress) {
case 0x300000:
// bprintf(PRINT_NORMAL, _T(" -- bank %d inputP0[0x%02X] read.\n"), 0, nInputSelect);
return ~((NeoInputBank[nJoyport0[nInputSelect & 0x07]] << 8) | NeoInputBank[4]);
case 0x340000:
// bprintf(PRINT_NORMAL, _T(" -- bank %d inputP1[0x%02X] read.\n"), 0, nInputSelect);
return ~(NeoInputBank[nJoyport1[nInputSelect & 0x07]] << 8);
case 0x380000:
return ~(NeoInputBank[2] << 8);

case 0x3C0000:
case 0x3C0002:
case 0x3C000A:
// bprintf(PRINT_NORMAL, "  - Graphics RAM read (Bank %i, address 0x%04X).\n", NeoGraphicsRAMPointer > 0xFFFF ? 1 : 0, NeoGraphicsRAMPointer & 0xFFFF);
return *((unsigned short*)(NeoGraphicsRAMBank + NeoGraphicsRAMPointer));

case 0x3C0004:
// bprintf(PRINT_NORMAL, "  - Graphics RAM modulo read.\n");
return (unsigned short)(nNeoGraphicsModulo >> 1);

case 0x3C0006: { // Display status
// bprintf(PRINT_NORMAL, "  - Display status read, line: %3i, anim: %i\n", SekCurrentScanline(), nNeoSpriteFrame);

bForcePartialRender |= bForceUpdateOnStatusRead;

return ((SekCurrentScanline() + nScanlineOffset) << 7) | (nNeoSpriteFrame & 7);
}

// default:
// bprintf(PRINT_NORMAL, _T("  - 0x%08X read (word, PC: %08X)\n"), sekAddress, SekGetPC(-1));
}

// return 0;
return 0xff;
}

It fixed but it is identical as ever. It assists from Thank you.
« Last Edit: January 12, 2007, 12:47:26 PM by DsNo »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3724
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: How to play bug...
« Reply #3 on: January 12, 2007, 12:29:25 PM »
Oops! I meant unsigned char __fastcall neogeoReadByte(unsigned int sekAddress)


Offline DsNo

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +9/-0
  • Junior Member
Re: How to play bug...
« Reply #4 on: January 12, 2007, 12:50:25 PM »
Oops! I meant unsigned char __fastcall neogeoReadByte(unsigned int sekAddress)

It is perfect and it works! Thanks it gives with sincerity.