-
-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memcpy glitches out in the web build #1875
Comments
Just reproduced it on the latest html build and I'm wondering what could be causing it, maybe compiler optimizations? |
No, I see the same thing in TIC-80 for desktop, are you sure your code is working correctly? |
i can't reproduce on desktop (0.90.1723 Pro) |
AFAICT, there are two related issues here:
It is undefined behaviour to use The immediate workaround for @verysoftwares is to copy memory manually. Something like: function memmove(dst, src, length)
if dst <= src then
for i=0,length-1 do
poke(dst+i, peek(src+i))
end
else
for i=length-1,0,-1 do
poke(dst+i, peek(src+i))
end
end
end It's slower, but in my testing the bug is no longer present (AFAICT). @nesbox, I think the correct fix is to use |
i'm using memcpy to move screen memory around. see the glitches here, choose 2-4 players and move around: http://tic80.com/play?cart=2740
a downloaded cartridge works just fine.
The text was updated successfully, but these errors were encountered: