I actually have used the screen wrapping before but removed it because I'm convinced it is not the solution to my problem. First of all I've read on here that the only game which requires the wrapping is a game called Field where a bird goes out of bounds. I am having bounds problems with other games, so handling them by wrapping would be a workaround and not a solution. This is why I say I think the problem is in some so far unkown instruction.
If I do add the wrapping, I get some interesting effects which I'm guessing are caused by the fact that I'm wrapping when the game doesn't expect it

this can be seen in ufo where the 'ufo' gets to the left side of the screen, wraps to the right and gets stuck. Same thing happens in tapeworm. Here is my wrapping code.
Code:
for (int i = 0; i < pixels.length; i++)
{
int x = (xOff + i%width)%MAX_X; //wrap if too large
int y = (yOff + i/width)%MAX_Y;
//wrap if too small
if(x < 0)
x = MAX_X;
if(y < 0)
y = MAX_Y;
if(setPixel(y, x, pixels[i]))
collision = true;
}
so I think the games that have sprites going off the edge actually attempt to handle this condition in their code but it is failing because of some broken instruction of mine.
>Usually the cause of crashes like that is a lack of proper error-handling/error-coping mechanisms.
hmm, well I think this crash was caused by a messed up instruction that caused the game I was running to perform an invalid operation. If the game tries to render outside the screen, I would personally rather have my program freeze and point me to where the problem occured then to go on silently operating incorrectly.
As for garbled text, all the text I've seen looks fine except for when I watch the scrolling message at the beginning of space invaders for a long time. Is this the problem that you had also?
I should have been more clear in my original post, I'll try not to be so vague in the future. If I were you I probably would have given the same answer to my wrapping problem since I know lots of others on here have had that problem
