Comments (3)
Like for example, if I'm expecting values in 0xF9A0, 0xF9A1, 0xF9A2, 0xF9A3. Everything will be fine in the game and then randomly, one of the indexes, 0xF9A0 will be cleared
One thing that comes to my mind is that an adjacent unintended larger store could causes this, like for example the high 8 bits of a store<u16>
also setting the 8 bits of the adjacent u8
to zero. If so, that could either be a compiler bug emitting the wrong-sized instruction, or (here) an actual store<u16>
where it should be a store<u8>
.
There's also this section in the cheat sheet, in case that helps. Basically, the type parameter states the size of the store (u8=1 byte affected, u16=2 bytes affected etc.) while the value
operand's type is switched upon. The latter most likely isn't relevant here because it only decides for i32.storeX or i64.storeX, depending on if the value is a 64-bit integer, which wasmBoy doesn't seem to use.
From inspecting the .wast it appears that there's just a single store16 in wasm/memory/store/_sixteenBitStoreIntoWasmBoyMemory
, while everything else is a store8. That matches the code so far. checkWriteTraps
seems to be a likely candidate for where something could go wrong (isEightBitStore
).
from assemblyscript.
Appears the game over screen also triggers quite a few heisenberg zeroes:
from assemblyscript.
Yeah exactly! I checked the sixteen bit stores with the same idea as you. But mostly, I was asking becuase I thought the wasn't itself could possibly overflow into it's own memory? But I guess not. If that is not the case, then I'll go ahead and close this, because I had a feeling it is something weird on my end haha! Thank you!
from assemblyscript.
Related Issues (20)
- The results of arithmetic operations with u8 are not truncated to 8 bits, when assigned to f64 HOT 1
- Stale Memory Reads HOT 17
- I look at the source code and find that there is code related to wasmGC, will wasmGC be supported soon? HOT 1
- npx asinit .
- Support type alias as syntactic sugar for class HOT 4
- Incorrect overriden function call HOT 2
- `env` module isn't imported, using `moduleImports` and `--importMemory` together
- I hope compiling to native binary was added for AssemblyScript. HOT 1
- Loop and variable bug HOT 2
- as crash when try to alloc large data HOT 2
- crash when shifting BigInt HOT 1
- Can't get export info in transform without reloading the module HOT 17
- Emit incorrect debugLocation while convertExpression()
- ERROR TS2454: Variable is used before being assigned. HOT 1
- ERROR TS2454: Variable is used before being assigned. HOT 2
- ERROR TS2339: Property 'fromCodePoints' does not exist on type '~lib/string/String'.
- How to convert the string returned by the function on other platforms (iso & Android) HOT 4
- Reset the bump allocator? HOT 1
- asc decompile wasm (or wat) to AssemblyScript
- How much memory? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from assemblyscript.