Skip to content
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

Browser Pre-Load Rom #22

Closed
ChefFloyardee opened this issue Feb 6, 2020 · 15 comments
Closed

Browser Pre-Load Rom #22

ChefFloyardee opened this issue Feb 6, 2020 · 15 comments

Comments

@ChefFloyardee
Copy link

Hi! I want to use this to embed an emulator on my HTML page and have it pre-load a rom of my choice.

Could you guide me as to how to do this? Thanks!

@ChefFloyardee
Copy link
Author

I tried downloading all of your files, uploading them to my git, and then trying to recreate your page (http://binji.github.io/binjgb/) thinking that if I had the source files it would work.

For some reason it is not working though. I just get a blank screen.

@binji
Copy link
Owner

binji commented Feb 6, 2020

Seems like that should be a good start, do you have the page up somewhere so I can see? Do you get any errors in the devtools console?

@ChefFloyardee
Copy link
Author

Thank you so much for replying!

I finally figured out how to get it to load, but now I still need to figurfe out how to get it to pre-load my ROM and keep my current HTML.

Here are my links;

-This page is my current hosting page. I use a Flash Player to load my ROM.
https://cheffloyardee.github.io/pokefloyd

-I want to replace that player with yours, but keep everything else. Here is my attempt at doing so
https://github.com/ChefFloyardee/ChefFloyardee.github.io/blob/master/poke/floyd.html

Note that I renamed your "Demo" file to "Poke" to try and keep my "pokefloyd" url similar.

@ChefFloyardee
Copy link
Author

I can get my page (https://cheffloyardee.github.io/poke/floyd) to look like yours (http://binji.github.io/binjgb/) and it will play my ROM.

But I want it to pre-load the ROM, and I want to keep the existing HTML title/picture that I had.

@ChefFloyardee
Copy link
Author

As of my last commit on (https://cheffloyardee.github.io/poke/floyd) I removed your code in an attempt to first get my pages to match up with the original HTML, but for some reason my picture isn't even working.

@ChefFloyardee
Copy link
Author

I really like your emulator by the way. It is much more crisp than my Flash one!

@ChefFloyardee
Copy link
Author

I got the picture to work by adding it to the Poke aka Demo file!

Now I just need to figure out how to put in your emulator code and have it pre-load my ROM :D

@ChefFloyardee
Copy link
Author

Any who, if I copy the source file from your page (http://binji.github.io/binjgb/) my page's current HTML is all messed up.

I also do not see where to link to a ROM to pre-load it.

@ChefFloyardee
Copy link
Author

This is where I got the source file.

https://github.com/binji/binjgb/blob/master/demo/demo.html

@ChefFloyardee
Copy link
Author

I am assuming my main issue is that I am copy and pasting the entire code, since I am unsure as to what to remove to get my desired result.

@ChefFloyardee
Copy link
Author

So here is where I am currently at;

https://cheffloyardee.github.io/poke/floyd

I need to fix 3 glaring things;
-First, how can I center the box?
-Second, how can I set it to pre-load a ROM?
-Third, how can I get an Icon Image in my tab, similar to yours (http://binji.github.io/binjgb/)?

Please let me know if you can help me out :D

@ChefFloyardee
Copy link
Author

@ChefFloyardee
Copy link
Author

Seems like that should be a good start, do you have the page up somewhere so I can see? Do you get any errors in the devtools console?

Hi there! I am so close to getting your Emulator on my Page in the state that I want it :D

I still am having trouble figuring out how to get it to pre-load a ROM file. Can you please help me with this?

Thanks in advance!

@binji
Copy link
Owner

binji commented Feb 8, 2020

I pushed a simpler version of the demo that should be easier to embed here:

https://github.com/binji/binjgb/blob/master/demo/simple.html
https://github.com/binji/binjgb/blob/master/demo/simple.js

It loads a rom by default, and immediately starts playing. One problem is that audio doesn't work when you do this; a simple workaround is to pause/unpause (with the space bar).

Hope this helps!

@ChefFloyardee
Copy link
Author

Thank you so much for replying! You have no idea how appreciative I am!

Do you have an HTML page that I can preview this at?

I see that you added a .html, .JS, and an example ROM to your folder.

I plan to do the same, but do I need to reference the ROM I want or does it automatically load?

@binji binji closed this as completed Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants