GithubHelp home page GithubHelp logo

OAM not rendering at all about wasmboy HOT 3 OPEN

qguv avatar qguv commented on June 4, 2024
OAM not rendering at all

from wasmboy.

Comments (3)

torch2424 avatar torch2424 commented on June 4, 2024

Hello @qguv ! πŸ˜„ Thanks for the kind words about WasmBoy! And Undercooked looks super cool! πŸ˜„

I haven't been able to get it to show any OAM entries though. Sprites simply won't draw. I could be missing some initialization that wasmboy expects, but the ROM runs correctly on hardware (DMG-01) and bgb (GB and GBC modes).

Oh yeah that's quite odd! I took a look in the OAM viewer in my debugger and found that the OAM doesn't have your sprite in it πŸ€”

Screenshot from 2020-07-03 23-10-48

Though it does look like I'm interpreting the right LCDC:

Screenshot from 2020-07-03 23-15-06


Though keeping it real, I've been super busy lately, but working on WasmBoy has definitely been on my todo list. I've been working on a graphics rewrite which completely changes how I handles sprites so that might fix it :o That being said in the meantime, I don't have an estimate when I'll be able to fix that, I'd also reccomend trying binjgb: https://github.com/binji/binjgb It doesn't have a lot of easy embed options, but it's super accurate and also runs in the web πŸ˜„

Let me know if that helps! Thanks! πŸ‘

from wasmboy.

qguv avatar qguv commented on June 4, 2024

Wow, thanks for your detailed response!

I went on a deep dive this weekend and discovered PPU modesβ€”namely that I wasn't being careful enough to make sure I was only writing to OAM RAM at the appropriate times. I updated everything to only write there during vblank (mode 1) and the new version runs great on its embed page.

I guess it was only working on hardware and other emulators because of favorable timing or because those emulators aren't forbidding OAM RAM writes outright during PPU modes 2 and 3. So I suppose this is technically a bug, but not one likely to affect anything other than very very early drafts of homebrew ROMs.

from wasmboy.

torch2424 avatar torch2424 commented on June 4, 2024

@qguv You are welcome! πŸ˜„

I went on a deep dive this weekend and discovered PPU modesβ€”namely that I wasn't being careful enough to make sure I was only writing to OAM RAM at the appropriate times. I updated everything to only write there during vblank (mode 1) and the new version runs great on its embed page.

Ah yeah! So that's a tradeoff I had to make as an emudev πŸ™ƒ If I allow anything to be written at anytime, some games will have weird behavior, but then if do "the right thing" than my emulator has to be completely perfect (which in this case, it wasn't haha!)

But either way I'm glad you were able to figure it out! If you do plan to use WasmBoy going forward, I do feel it works like 9 / 10 of the time haha! The debugger is a good, easy place to figure out any weird behavior (either for the game, or the emulator itself). Especially while I haven't had as much time to dedicate to the project πŸ˜„

I guess it was only working on hardware and other emulators because of favorable timing or because those emulators aren't forbidding OAM RAM writes outright during PPU modes 2 and 3. So I suppose this is technically a bug, but not one likely to affect anything other than very very early drafts of homebrew ROMs.

Ah! So I am like 99% sure they do, but I think the timing on mine might be very slightly off or something. I'll probably take the time at some point to step through that version of your ROM with bgb and WasmBoy to figure out where I'm getting some weird behavior down the line πŸ˜„ πŸ‘

Let's keep this issue open as a TODO item to investigate / fix this for other early ROMs πŸ˜„

from wasmboy.

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.