Thread: CHIP8 thread
View Single Post
Old June 1st, 2009   #181 (permalink)
serge2k
Registered User
 
Join Date: Sep 2006
Location: surrey
Posts: 45
Quote:
Originally Posted by runawayprisoner View Post
Actually, an erase happens only when a previously set bit is unset... or namely... if you had:

0001000

And later you have

0000000

Then that was an erase.

If you are looking for difference only then this is also a difference:

0000000

To

1001000

And of course that's only a normal drawing routine... things were only added.

See the issue? The games still "appear" right, but the collision flag will be iffy, and IIRC, one most obvious symptom would be that you start having afterimages or ghosts of old sprites whenever a collision occurs.
thats why I set it to look for the difference between OR and XOR

00000000 | 10010000 = 10010000
00000000 ^ 10010000 = 10010000

You could be right but I'm really not seeing a case where my way doesn't work. The only time there is a difference between OR and XOR is when XOR unsets a bit which would be an erase.

The ghosting problem was because when I calculated the result of the XOR it wasn't being written back to the gmem array properly. don't know what was wrong with the code that was writing it back but the code I'm using now is much simpler and works.
serge2k is offline   Reply With Quote

Advertisement [Remove Advertisement]