Skip to content

Commit

Permalink
Make WRAMCNT readable
Browse files Browse the repository at this point in the history
  • Loading branch information
PSI-Rockin committed Dec 25, 2017
1 parent c421e10 commit 7c053cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/arm7rw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ uint8_t Emulator::arm7_read_byte(uint32_t address)
return 0;
case 0x0400021C: //DSi IF2
return 0;
case 0x04000241:
return WRAMCNT & 0x3;
case 0x04000300:
return POSTFLG7;
case 0x04000501:
Expand Down
2 changes: 2 additions & 0 deletions src/arm9rw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ uint8_t Emulator::arm9_read_byte(uint32_t address)
return gpu.get_VRAMCNT_A();
case 0x04000241:
return gpu.get_VRAMCNT_B();
case 0x04000247:
return WRAMCNT & 0x3;
case 0x04000300:
return POSTFLG9;
case 0x04004000:
Expand Down
2 changes: 2 additions & 0 deletions src/cpuinstrs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,7 @@ void Interpreter::signed_halfword_multiply(ARM_CPU &cpu, uint32_t instruction)
switch (opcode)
{
case 0x8:
//SMLAxy
if (first_op_top)
product = (int16_t)(cpu.get_register(first_operand) >> 16);
else
Expand All @@ -740,6 +741,7 @@ void Interpreter::signed_halfword_multiply(ARM_CPU &cpu, uint32_t instruction)
cpu.get_CPSR()->sticky_overflow = true;
break;
case 0xB:
//SMULxy
if (first_op_top)
product = (int16_t)(cpu.get_register(first_operand) >> 16);
else
Expand Down

0 comments on commit 7c053cc

Please sign in to comment.