|
|
| version 1.4, 2003/12/04 09:47:08 | version 1.9, 2005/02/07 14:46:12 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | #include "compiler.h" |
| #include "dosio.h" | #include "dosio.h" |
| #include "cpucore.h" | |
| #include "pccore.h" | #include "pccore.h" |
| #include "memory.h" | |
| #include "soundrom.h" | #include "soundrom.h" |
| Line 10 | Line 10 |
| static const char file_sound[] = "sound"; | static const char file_sound[] = "sound"; |
| static const char file_extrom[] = ".rom"; | static const char file_extrom[] = ".rom"; |
| static const BYTE defsoundrom[9] = { | static const UINT8 defsoundrom[9] = { |
| 0x01,0x00,0x00,0x00,0xd2,0x00,0x08,0x00,0xcb}; | 0x01,0x00,0x00,0x00,0xd2,0x00,0x08,0x00,0xcb}; |
| Line 26 static BOOL loadsoundrom(UINT address, c | Line 26 static BOOL loadsoundrom(UINT address, c |
| file_catname(romname, name, sizeof(romname)); | file_catname(romname, name, sizeof(romname)); |
| } | } |
| file_catname(romname, file_extrom, sizeof(romname)); | file_catname(romname, file_extrom, sizeof(romname)); |
| file_cpyname(path, np2cfg.biospath, sizeof(path)); | getbiospath(path, romname, sizeof(path)); |
| file_catname(path, romname, sizeof(path)); | |
| fh = file_open_rb(path); | fh = file_open_rb(path); |
| if (fh == FILEH_INVALID) { | if (fh == FILEH_INVALID) { |
| goto lsr_err; | goto lsr_err; |
| Line 39 static BOOL loadsoundrom(UINT address, c | Line 38 static BOOL loadsoundrom(UINT address, c |
| } | } |
| file_cpyname(soundrom.name, romname, sizeof(soundrom.name)); | file_cpyname(soundrom.name, romname, sizeof(soundrom.name)); |
| soundrom.address = address; | soundrom.address = address; |
| if (address == 0xd0000) { | |
| CPU_RAM_D000 &= ~(0x0f << 0); | |
| } | |
| else if (address == 0xd4000) { | |
| CPU_RAM_D000 &= ~(0x0f << 4); | |
| } | |
| return(SUCCESS); | return(SUCCESS); |
| lsr_err: | lsr_err: |
| Line 68 void soundrom_load(UINT32 address, const | Line 73 void soundrom_load(UINT32 address, const |
| soundrom.address = address; | soundrom.address = address; |
| } | } |
| void soundrom_loadex(BYTE sw, const char *primary) { | void soundrom_loadex(UINT sw, const char *primary) { |
| if (sw < 4) { | if (sw < 4) { |
| soundrom_load((0xc8000 + ((UINT32)sw << 14)), primary); | soundrom_load((0xc8000 + ((UINT32)sw << 14)), primary); |