diff options
Diffstat (limited to 'src/core/arm/interpreter/armsupp.cpp')
| -rw-r--r-- | src/core/arm/interpreter/armsupp.cpp | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/src/core/arm/interpreter/armsupp.cpp b/src/core/arm/interpreter/armsupp.cpp index a0c866c15..101b9807a 100644 --- a/src/core/arm/interpreter/armsupp.cpp +++ b/src/core/arm/interpreter/armsupp.cpp | |||
| @@ -19,6 +19,8 @@ | |||
| 19 | #include "armemu.h" | 19 | #include "armemu.h" |
| 20 | //#include "ansidecl.h" | 20 | //#include "ansidecl.h" |
| 21 | #include "skyeye_defs.h" | 21 | #include "skyeye_defs.h" |
| 22 | #include "core/hle/hle.h" | ||
| 23 | |||
| 22 | unsigned xscale_cp15_cp_access_allowed (ARMul_State * state, unsigned reg, | 24 | unsigned xscale_cp15_cp_access_allowed (ARMul_State * state, unsigned reg, |
| 23 | unsigned cpnum); | 25 | unsigned cpnum); |
| 24 | //extern int skyeye_instr_debug; | 26 | //extern int skyeye_instr_debug; |
| @@ -734,39 +736,39 @@ ARMword | |||
| 734 | ARMul_MRC (ARMul_State * state, ARMword instr) | 736 | ARMul_MRC (ARMul_State * state, ARMword instr) |
| 735 | { | 737 | { |
| 736 | unsigned cpab; | 738 | unsigned cpab; |
| 737 | ARMword result = 0; | 739 | ARMword result = HLE::CallGetThreadCommandBuffer(); |
| 738 | 740 | ||
| 739 | //printf("SKYEYE ARMul_MRC, CPnum is %x, instr %x\n",CPNum, instr); | 741 | ////printf("SKYEYE ARMul_MRC, CPnum is %x, instr %x\n",CPNum, instr); |
| 740 | if (!CP_ACCESS_ALLOWED (state, CPNum)) { | 742 | //if (!CP_ACCESS_ALLOWED (state, CPNum)) { |
| 741 | //chy 2004-07-19 should fix in the future????!!!! | 743 | // //chy 2004-07-19 should fix in the future????!!!! |
| 742 | //printf("SKYEYE ARMul_MRC,NOT ALLOWed UndefInstr CPnum is %x, instr %x\n",CPNum, instr); | 744 | // //printf("SKYEYE ARMul_MRC,NOT ALLOWed UndefInstr CPnum is %x, instr %x\n",CPNum, instr); |
| 743 | ARMul_UndefInstr (state, instr); | 745 | // ARMul_UndefInstr (state, instr); |
| 744 | return -1; | 746 | // return -1; |
| 745 | } | 747 | //} |
| 746 | 748 | ||
| 747 | cpab = (state->MRC[CPNum]) (state, ARMul_FIRST, instr, &result); | 749 | //cpab = (state->MRC[CPNum]) (state, ARMul_FIRST, instr, &result); |
| 748 | while (cpab == ARMul_BUSY) { | 750 | //while (cpab == ARMul_BUSY) { |
| 749 | ARMul_Icycles (state, 1, 0); | 751 | // ARMul_Icycles (state, 1, 0); |
| 750 | if (IntPending (state)) { | 752 | // if (IntPending (state)) { |
| 751 | cpab = (state->MRC[CPNum]) (state, ARMul_INTERRUPT, | 753 | // cpab = (state->MRC[CPNum]) (state, ARMul_INTERRUPT, |
| 752 | instr, 0); | 754 | // instr, 0); |
| 753 | return (0); | 755 | // return (0); |
| 754 | } | 756 | // } |
| 755 | else | 757 | // else |
| 756 | cpab = (state->MRC[CPNum]) (state, ARMul_BUSY, instr, | 758 | // cpab = (state->MRC[CPNum]) (state, ARMul_BUSY, instr, |
| 757 | &result); | 759 | // &result); |
| 758 | } | 760 | //} |
| 759 | if (cpab == ARMul_CANT) { | 761 | //if (cpab == ARMul_CANT) { |
| 760 | printf ("SKYEYE ARMul_MRC,CANT UndefInstr CPnum is %x, instr %x\n", CPNum, instr); | 762 | // printf ("SKYEYE ARMul_MRC,CANT UndefInstr CPnum is %x, instr %x\n", CPNum, instr); |
| 761 | ARMul_Abort (state, ARMul_UndefinedInstrV); | 763 | // ARMul_Abort (state, ARMul_UndefinedInstrV); |
| 762 | /* Parent will destroy the flags otherwise. */ | 764 | // /* Parent will destroy the flags otherwise. */ |
| 763 | result = ECC; | 765 | // result = ECC; |
| 764 | } | 766 | //} |
| 765 | else { | 767 | //else { |
| 766 | BUSUSEDINCPCN; | 768 | // BUSUSEDINCPCN; |
| 767 | ARMul_Ccycles (state, 1, 0); | 769 | // ARMul_Ccycles (state, 1, 0); |
| 768 | ARMul_Icycles (state, 1, 0); | 770 | // ARMul_Icycles (state, 1, 0); |
| 769 | } | 771 | //} |
| 770 | 772 | ||
| 771 | return result; | 773 | return result; |
| 772 | } | 774 | } |