You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That does raise another question though, why do any of the templates use TIC-80's memcpy and memset? Implementing them natively in the source language should allow them to access the full 256 KB of memory used in WASM mode, but the TIC-80 versions appear to be limited to the 96 KB in tic_ram. The only reason I can see is possibly performance, since I would guess that the native C versions are faster than anything that runs in the WASM interpreter.
I've confirmed from reading source that this seems to be correct. The memory size can't be assumed to be 96kb anymore. It's 96kb on scripting runtimes and 256kb on the WASM runtime.
Right now source seems to be using sizeof(tic_ram) which is only going to count the 96kb of built-in RAM I think...
This is probably something that needs to be setup once (at runtime startup - or perhaps it's a static value inside each config) so that it's fast to access... anyways we need a way to access it when all we're given is a *tic_mem pointer, like in most API calls.
The text was updated successfully, but these errors were encountered:
That does raise another question though, why do any of the templates use TIC-80's
memcpy
andmemset
? Implementing them natively in the source language should allow them to access the full 256 KB of memory used in WASM mode, but the TIC-80 versions appear to be limited to the 96 KB intic_ram
. The only reason I can see is possibly performance, since I would guess that the native C versions are faster than anything that runs in the WASM interpreter.Originally posted by @soxfox42 in #1784 (comment)
I've confirmed from reading source that this seems to be correct. The memory size can't be assumed to be 96kb anymore. It's 96kb on scripting runtimes and 256kb on the WASM runtime.
Right now source seems to be using
sizeof(tic_ram)
which is only going to count the 96kb of built-in RAM I think...This is probably something that needs to be setup once (at runtime startup - or perhaps it's a static value inside each config) so that it's fast to access... anyways we need a way to access it when all we're given is a
*tic_mem
pointer, like in most API calls.The text was updated successfully, but these errors were encountered: