--- np2/sound/soundrom.c 2003/12/04 06:41:23 1.3 +++ np2/sound/soundrom.c 2004/01/07 06:53:48 1.8 @@ -1,7 +1,7 @@ #include "compiler.h" #include "dosio.h" -#include "bios.h" -#include "memory.h" +#include "cpucore.h" +#include "pccore.h" #include "soundrom.h" @@ -26,7 +26,7 @@ static BOOL loadsoundrom(UINT address, c file_catname(romname, name, sizeof(romname)); } file_catname(romname, file_extrom, sizeof(romname)); - bios_getpath(path, romname, sizeof(path)); + getbiospath(path, romname, sizeof(path)); fh = file_open_rb(path); if (fh == FILEH_INVALID) { goto lsr_err; @@ -38,6 +38,12 @@ static BOOL loadsoundrom(UINT address, c } file_cpyname(soundrom.name, romname, sizeof(soundrom.name)); soundrom.address = address; + if (address == 0xd0000) { + CPU_RAM_D000 &= ~(0x0f << 0); + } + else if (address == 0xd4000) { + CPU_RAM_D000 &= ~(0x0f << 4); + } return(SUCCESS); lsr_err: @@ -67,7 +73,7 @@ void soundrom_load(UINT32 address, const soundrom.address = address; } -void soundrom_loadex(BYTE sw, const char *primary) { +void soundrom_loadex(UINT sw, const char *primary) { if (sw < 4) { soundrom_load((0xc8000 + ((UINT32)sw << 14)), primary);