Code Monkey home page Code Monkey logo

Comments (3)

dcodeIO avatar dcodeIO commented on May 22, 2024

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.

dcodeIO avatar dcodeIO commented on May 22, 2024

Appears the game over screen also triggers quite a few heisenberg zeroes:

zeroes

from assemblyscript.

torch2424 avatar torch2424 commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.