Skip to content

Initialize memory with random values #124

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

Open
tobiasvl opened this issue Aug 22, 2018 · 5 comments
Open

Initialize memory with random values #124

tobiasvl opened this issue Aug 22, 2018 · 5 comments
Assignees
Labels
bug Something isn't working Core/Wasm Issues concerning the core library of Wasmboy good first issue Good for newcomers

Comments

@tobiasvl
Copy link

It doesn't seem like the memory is "random" enough when uninitialized after boot. This means that common PRNG routines that rely on uninitialized RAM as a seed don't work.

@torch2424 torch2424 self-assigned this Aug 22, 2018
@torch2424 torch2424 added bug Something isn't working good first issue Good for newcomers Core/Wasm Issues concerning the core library of Wasmboy labels Aug 22, 2018
@torch2424
Copy link
Owner

Hey! @tobiasvl good to hear from you 😄

Oh I'll go ahead an implement this! I've been working on my PWA wrapper for wasmBoy here: https://github.com/torch2424/vaporBoy

And then doing some more housekeeping, and then I was going to go all in on Accuracy of the lib (wasmBoy).

Thanks for bringing this up :) I'll get to it as soon as I can

@tobiasvl
Copy link
Author

Cool! I made a game that uses random memory as a seed for PRNG, but none of the web emulators I tried supported it, so the game can't be played in the browser on itch.io :O

@torch2424
Copy link
Owner

torch2424 commented Aug 23, 2018

Oh that's unfortunate. :( Do you have any docs for this (like can I find it in pandocs)? Also, how are you putting your game on itch? Do you have a client side JS project you are just uploading?

@tobiasvl
Copy link
Author

I'm not sure about docs. Some people on the Discord said that the "random" uninitialized memory has some consistent patterns on different devices, but I don't have any more information. I'm sure most emulators that support it just puts random garbage there, but for supreme accuracy there's probably some deep hole you can dig into.

And yeah, on itch you can just zip up an HTML file and JavaScript files, and it'll be playable on the website. I didn't actually check if it's easy/possible to package your emulator with a ROM like that though 😆 so if not, just ignore that part.

@torch2424
Copy link
Owner

torch2424 commented Aug 24, 2018

Oh forsure, I'll look into that. I may just throw garbage in there for now, and then yeah (if that's what you are looking for).

And now there isn't currently! But if you want, I can whip up something super quick. I can try to make another github pages project, that simply uses a ROM you pass in as a query param. And the base page can just be an iframe with some styling, and possibly a mobile touchpad. But just be forwarned, wasmboy still has a lot of accuracy bugs :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Core/Wasm Issues concerning the core library of Wasmboy good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants