diff --git a/Source/Core/DSPCore/Src/LabelMap.cpp b/Source/Core/DSPCore/Src/LabelMap.cpp index 5b8ab38c96..abedeb6860 100644 --- a/Source/Core/DSPCore/Src/LabelMap.cpp +++ b/Source/Core/DSPCore/Src/LabelMap.cpp @@ -41,7 +41,7 @@ void LabelMap::RegisterLabel(const std::string &label, u16 lval, LabelType type) if (GetLabelValue(label, &old_value) && old_value != lval) { printf("WARNING: Redefined label %s to %04x - old value %04x\n", - label, lval, old_value); + label.c_str(), lval, old_value); DeleteLabel(label); } labels.push_back(label_t(label, lval, type)); @@ -62,7 +62,7 @@ void LabelMap::DeleteLabel(const std::string &label) bool LabelMap::GetLabelValue(const std::string &label, u16 *value, LabelType type) const { - for (int i = 0; i < labels.size(); i++) + for (u32 i = 0; i < labels.size(); i++) { if (!label.compare(labels[i].name)) { @@ -70,7 +70,7 @@ bool LabelMap::GetLabelValue(const std::string &label, u16 *value, LabelType typ *value = labels[i].addr; return true; } else { - printf("WARNING: Wrong label type requested. %s\n", label); + printf("WARNING: Wrong label type requested. %s\n", label.c_str()); } } } diff --git a/Source/Core/DSPCore/Src/assemble.cpp b/Source/Core/DSPCore/Src/assemble.cpp index 0c6edc072a..45c63c12d7 100644 --- a/Source/Core/DSPCore/Src/assemble.cpp +++ b/Source/Core/DSPCore/Src/assemble.cpp @@ -778,7 +778,8 @@ bool DSPAssembler::AssembleFile(const char *fname, int pass) param_t params[10] = {{0}}; param_t params_ext[10] = {{0}}; - + + bool upper = true; for (int i = 0; i < LINEBUF_SIZE; i++) { char c = line[i]; @@ -814,7 +815,9 @@ bool DSPAssembler::AssembleFile(const char *fname, int pass) c = 0x00; if (c == 0x09) // tabs to spaces c = ' '; - if (c >= 'a' && c <= 'z') // convert to uppercase + if (c == '"') + upper = !upper; + if (upper && c >= 'a' && c <= 'z') // convert to uppercase c = c - 'a' + 'A'; line[i] = c; if (c == 0) diff --git a/Source/Core/DSPCore/Src/gdsp_registers.h b/Source/Core/DSPCore/Src/gdsp_registers.h index 961b03872a..08838c2a38 100644 --- a/Source/Core/DSPCore/Src/gdsp_registers.h +++ b/Source/Core/DSPCore/Src/gdsp_registers.h @@ -95,12 +95,14 @@ // SR bits #define SR_CARRY 0x0001 -#define SR_UNKNOWN 0x0002 // ???????? +#define SR_2 0x0002 // overflow??? #define SR_ARITH_ZERO 0x0004 #define SR_SIGN 0x0008 -#define SR_TOP2BITS 0x0020 // this is an odd one. +#define SR_10 0x0010 // seem to be set by tst +#define SR_TOP2BITS 0x0020 // this is an odd one. (set by tst) #define SR_LOGIC_ZERO 0x0040 #define SR_INT_ENABLE 0x0200 // Not 100% sure but duddie says so. This should replace the hack, if so. +#define SR_800 0x0800 // Appears in zelda #define SR_MUL_MODIFY 0x2000 // 1 = normal. 0 = x2 (M0, M2) #define SR_40_MODE_BIT 0x4000 // 0 = "16", 1 = "40" (SET16, SET40) Controls sign extension when loading mid accums. #define SR_TOP_BIT_UNK 0x8000 // 1 = normal. 0 = x2 (CLR15, SET15) ????????