Lets give a litle life to this thread hehe ^^...
NeoGeo Music Changer Extra Feature Note: Just changes Music on some NeoGeo games, If somebody manage to get more games to change the music somehow, I will apreciate the help =) , this code works kinda like WinKawaks because it have the same problems with neogeo music.
*When updating with the new code be carefull with the 'After' and 'Before', make sure you put the code where it goes
Ok lets start...
First of all, do a backup of this files :
- src/burner/win32/string.rc
- src/burner/win32/resource_string.h
- src/burner/burner.h
- src/burner/win32/run.cpp
- src/burner/win32/scrn.cpp
- src/burn/neogeo/neo_run.cpp
- src/burner/win32/burner_win32.hNow we can really start! ^^...
In src/burner/win32/string.rc : Search for...
IDS_FIRSTRUN1 "This appears to be the first time you run %s v%.20s.\n\n"
Add this before...
IDS_SOUND_TRACK_CHANGE "track 0x0%x"
In src/burner/win32/resource_string.h :Search for...
#define IDS_ERR_DISK_TOOOLD (IDS_ERROR + 154)
Add this after...
#define IDS_SOUND_TRACK_CHANGE (IDS_STRING + 170)
In src/burner/burner.h :Search for...
// gami.cpp
extern struct GameInp* GameInp;
add this before...
// run.cpp
extern void NeoZ80Cmd(UINT16 sound_code);
In src/burner/win32/run.cpp :Search for...
int bRunPause = 0;
int bAltPause = 0;
Add this before...
int nNeoTrack = 0x0720;
int nNeoTrackDef = 0x0720;
Search for...
case 'T': {
if (kNetGame && hwndChat == NULL) {
if (AppMessage(&Msg)) {
ActivateChat();
}
}
break;
}
Add this after...
// Next Track
case VK_PRIOR: {
TCHAR buffer[15];
if ((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) == HARDWARE_SNK_NEOGEO)
{
if (nNeoTrack >= nNeoTrackDef && nNeoTrack <= 0x07FF)
{
nNeoTrack++;
NeoZ80Cmd(nNeoTrack);
_stprintf(buffer, FBALoadStringEx(hAppInst, IDS_SOUND_TRACK_CHANGE, true), nNeoTrack);
VidSNewShortMsg(buffer);
}
else
{
nNeoTrack = nNeoTrackDef;
NeoZ80Cmd(nNeoTrack);
_stprintf(buffer, FBALoadStringEx(hAppInst, IDS_SOUND_TRACK_CHANGE, true), nNeoTrack);
VidSNewShortMsg(buffer);
}
}
break;
}
// Previous Track
case VK_NEXT: {
TCHAR buffer[15];
if ((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) == HARDWARE_SNK_NEOGEO)
{
if (nNeoTrack >= nNeoTrackDef && nNeoTrack <= 0x07FF)
{
nNeoTrack--;
NeoZ80Cmd(nNeoTrack);
_stprintf(buffer, FBALoadStringEx(hAppInst, IDS_SOUND_TRACK_CHANGE, true), nNeoTrack);
VidSNewShortMsg(buffer);
}
else
{
nNeoTrack = nNeoTrackDef;
NeoZ80Cmd(nNeoTrack);
_stprintf(buffer, FBALoadStringEx(hAppInst, IDS_SOUND_TRACK_CHANGE, true), nNeoTrack);
VidSNewShortMsg(buffer);
}
}
break;
}
// Reset track to 0x0720
case VK_HOME: {
TCHAR buffer[15];
if ((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) == HARDWARE_SNK_NEOGEO)
{
nNeoTrack = nNeoTrackDef;
NeoZ80Cmd(nNeoTrack);
_stprintf(buffer, FBALoadStringEx(hAppInst, IDS_SOUND_TRACK_CHANGE, true), nNeoTrack);
VidSNewShortMsg(buffer);
}
break;
}
In src/burner/win32/scrn.cpp :Search for...
if (nGame >= 0) {
Add this after...
nNeoTrack = 0x0720;
Search for...
case MENU_QUIT:
Add this after...
nNeoTrack = 0x0720;
In src/burn/neogeo/neo_run.cpp :Search for...
unsigned char NeoReset = 0, NeoSystem = 0;
Add this after...
void NeoZ80Cmd(UINT16 sound_code);
Search for...
unsigned char __fastcall neogeoReadByte(unsigned int sekAddress)
Add this before...
void NeoZ80Cmd(UINT16 sound_code) {
SendSoundCommand(sound_code);
}
In src/burner/win32/burner_win32.h :Search for...
// run.cpp
Add this after...
extern int nNeoTrack;
extern int nNeoTrackDef;
Well thats it !! If you want to test something after that, Kof98 is one of the games that works with the music changer code
I hope this code turns out to be useful for some of you ^^
SeeYaa!!
PS: Well this is all for now lol, have to get a sleep ^^..Take Care all!