Merge pull request #5524 from ligfx/llegba

Update free DSP ROM and coefficients to support GBA ucode
This commit is contained in:
shuffle2
2017-06-05 18:40:20 -07:00
committed by GitHub
12 changed files with 2661 additions and 37 deletions

View File

@ -489,6 +489,7 @@ bool DSPAssembler::VerifyParams(const opc_t* opc, param_t* par, size_t count, Op
case P_REG18:
case P_REG19:
case P_REG1A:
case P_REG1C:
value = (opc->params[i].type >> 8) & 31;
if ((int)par[i].val < value ||
(int)par[i].val > value + get_mask_shifted_down(opc->params[i].mask))

View File

@ -41,7 +41,7 @@ static bool VerifyRoms()
u32 hash_drom; // dsp_coef.bin
};
static const std::array<DspRomHashes, 4> known_roms = {
static const std::array<DspRomHashes, 5> known_roms = {
{// Official Nintendo ROM
{0x66f334fe, 0xf3b93527},
@ -53,7 +53,10 @@ static bool VerifyRoms()
{0xd9907f71, 0xb019c2fb},
// above with improved resampling coefficients
{0xd9907f71, 0xdb6880c1}}};
{0xd9907f71, 0xdb6880c1},
// above with support for GBA ucode
{0x3aa4a793, 0xa4a575f5}}};
u32 hash_irom = HashAdler32((u8*)g_dsp.irom, DSP_IROM_BYTE_SIZE);
u32 hash_drom = HashAdler32((u8*)g_dsp.coef, DSP_COEF_BYTE_SIZE);

View File

@ -39,10 +39,10 @@ enum partype_t
P_REG19 = P_REG | 0x1900,
P_REGM19 = P_REG | 0x1910, // used in multiply instructions
P_REG1A = P_REG | 0x1a80,
P_REG1C = P_REG | 0x1c00,
// P_ACC = P_REG | 0x1c10, // used for global accum (gcdsptool's value)
P_ACCL = P_REG | 0x1c00, // used for low part of accum
P_ACCM = P_REG | 0x1e00, // used for mid part of accum
P_ACCL = P_REG | 0x1c00, // used for low part of accum
P_REG1C = P_REG | 0x1c10, // gcdsptool calls this P_ACCLM
P_ACCM = P_REG | 0x1e00, // used for mid part of accum
// The following are not in gcdsptool
P_ACCM_D = P_REG | 0x1e80,
P_ACC = P_REG | 0x2000, // used for full accum.