Go to file
Aaron Giles adaaf55595 From: Matt Ownby [mailto:matt.ownby@gmail.com]
Sent: Fri 9/26/2008 10:15 AM
To: submit@mamedev.org
Cc: Philip Bennett
Subject: fix for Cube Quest Line CPU emulation
I found a bug in the emulation of the Cube Quest Line CPU.

Proof of bug:
After looking at .diff,
Assume 'ci' is 1, and assume 'r' and 's' are both 0xFFF 
(0xFFF equals -1, as these numbers are 12-bit signed).
The result should be mathematically equivalent to -1 - (-1) 
which is 0.
~0xFFF is 0xF000, so you'd have 0xF000 + 0x0FFF + 1 which equals 
0x10000 but since 'res' is 16-bits this is truncated to 0x0.  
'C' then becomes 0 and 'V' becomes 1 (as I recall).  The result of 
0 is correct, but the flags are wrong; V should be 0 and C should 
be 1.

Under my proposed fix, you'd have 0x000 + 0x0FFF + 1, which equals 
0x1000, so the lower 12 bits are 0 (correct) and C is 1 and V is 0 
(correct).

I discovered this bug while disassembling the line CPU's ROM.
2008-10-02 05:04:06 +00:00
docs Update docs a bit. Turn off debugger by default. 2008-06-26 16:51:19 +00:00
src From: Matt Ownby [mailto:matt.ownby@gmail.com] 2008-10-02 05:04:06 +00:00
.gitattributes Added 22VP931 emulation, which is mostly working. Communication works 2008-09-25 16:21:35 +00:00
makefile Removed DEBUGGER flag from makefile and ENABLE_DEBUGGER 2008-06-26 14:51:23 +00:00