mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-11 05:29:43 +00:00
ppcopcodes: fix crand emulation.
This commit is contained in:
parent
c864b9b7d9
commit
2442bd17b3
@ -1243,7 +1243,8 @@ void dppc_interpreter::ppc_mcrf() {
|
||||
|
||||
void dppc_interpreter::ppc_crand() {
|
||||
ppc_grab_regsdab();
|
||||
if ((ppc_state.cr & (0x80000000UL >> reg_a)) && (ppc_state.cr & (0x80000000UL >> reg_b))) {
|
||||
uint8_t ir = (ppc_state.cr >> (31 - reg_a)) & (ppc_state.cr >> (31 - reg_b));
|
||||
if (ir & 1) {
|
||||
ppc_state.cr |= (0x80000000UL >> reg_d);
|
||||
} else {
|
||||
ppc_state.cr &= ~(0x80000000UL >> reg_d);
|
||||
|
Loading…
x
Reference in New Issue
Block a user