mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
h8: dec16/inc16 fix [Fabio Priuli]
This commit is contained in:
parent
878beeaa4d
commit
ff8a1bfe4c
@ -617,7 +617,7 @@ UINT16 h8_device::do_inc16(UINT16 v1, UINT16 v2)
|
||||
CCR &= ~(F_N|F_V|F_Z);
|
||||
if(!res)
|
||||
CCR |= F_Z;
|
||||
else if(INT32(res) < 0)
|
||||
else if(INT16(res) < 0)
|
||||
CCR |= F_N;
|
||||
if((v1^v2) & (v1^res) & 0x8000)
|
||||
CCR |= F_V;
|
||||
@ -709,7 +709,7 @@ UINT16 h8_device::do_dec16(UINT16 v1, UINT16 v2)
|
||||
CCR &= ~(F_N|F_V|F_Z);
|
||||
if(!res)
|
||||
CCR |= F_Z;
|
||||
else if(INT32(res) < 0)
|
||||
else if(INT16(res) < 0)
|
||||
CCR |= F_N;
|
||||
if((v1^v2) & (v1^res) & 0x8000)
|
||||
CCR |= F_V;
|
||||
|
Loading…
Reference in New Issue
Block a user