How to make IodineGBA load the BIOS file directly from the server? #41

Open
perelowski opened this Issue Oct 7, 2016 · 5 comments

Comments

Projects
None yet
5 participants
@perelowski

perelowski commented Oct 7, 2016

Hello,

I am trying to save some time when waiting for a game and skip the BIOS upload step. In order to do this I want to change the code to load the BIOS automatically upon the page load, from the same directory that IodineGBA is located.

How to achieve that? I have checked the ROMLoadGlueCode.js and there is a function named 'downloadFile' - unfortunately I cannot get it to work. Any help would be appreciated!

best regards,
p-ski

@taisel

This comment has been minimized.

Show comment
Hide comment
@taisel

taisel Oct 14, 2016

Owner

Sorry I haven't gotten back sooner. I don't like the idea of having the base GUI of having a specific way to load ROMs from the server. Should be relegated to modified GUIs.

That being said, the BIOS can be technically saved client side after first load, via the same methodology as the saves system. So this should be a feature request to persist the BIOS file client side.

Owner

taisel commented Oct 14, 2016

Sorry I haven't gotten back sooner. I don't like the idea of having the base GUI of having a specific way to load ROMs from the server. Should be relegated to modified GUIs.

That being said, the BIOS can be technically saved client side after first load, via the same methodology as the saves system. So this should be a feature request to persist the BIOS file client side.

@Heath123

This comment has been minimized.

Show comment
Hide comment
@Heath123

Heath123 Feb 13, 2017

Caan games load without a BIOS?

Caan games load without a BIOS?

@Onimishra

This comment has been minimized.

Show comment
Hide comment
@Onimishra

Onimishra Feb 13, 2017

Nope, there is no BIOS emulation in Iodine. It is however possible to use the OpenSource BIOS developed by Normatt, which can be found here. It uses a different splash screen than the standard GBA one, but it works mostly the same.

Nope, there is no BIOS emulation in Iodine. It is however possible to use the OpenSource BIOS developed by Normatt, which can be found here. It uses a different splash screen than the standard GBA one, but it works mostly the same.

@roguesaloon

This comment has been minimized.

Show comment
Hide comment
@roguesaloon

roguesaloon Aug 26, 2017

This never really got answered before. I am now trying to do something similar. I have a rom (which I developed) and the open source BIOS on my server, and I want to know what javascript needs changing to get them to load in automatically when the emulator is loaded, so the user can get straight into the game.

This never really got answered before. I am now trying to do something similar. I have a rom (which I developed) and the open source BIOS on my server, and I want to know what javascript needs changing to get them to load in automatically when the emulator is loaded, so the user can get straight into the game.

@roguesaloon

This comment has been minimized.

Show comment
Hide comment
@roguesaloon

roguesaloon Aug 26, 2017

Thanks to the slightly outdated code found in over here https://github.com/jsemu2/gba, I was able to get this working the way I wanted it.

In in CoreGlueCode.js add the following four functions

function downloadBIOS() {
    downloadFile("../gba_bios.bin", registerBIOS);
}

function registerBIOS() {
    processDownload(this, attachBIOS);
    downloadROM(location.hash.substr(1));
}

function downloadROM(gamename) {
    downloadFile("../game.gba", registerROM);
}

function registerROM() {
    processDownload(this, attachROM);
    IodineGUI.Iodine.play();
}

Then call downloadBIOS(); from window.onload function. The directory should be relative to where the emulator is located on the server.

roguesaloon commented Aug 26, 2017

Thanks to the slightly outdated code found in over here https://github.com/jsemu2/gba, I was able to get this working the way I wanted it.

In in CoreGlueCode.js add the following four functions

function downloadBIOS() {
    downloadFile("../gba_bios.bin", registerBIOS);
}

function registerBIOS() {
    processDownload(this, attachBIOS);
    downloadROM(location.hash.substr(1));
}

function downloadROM(gamename) {
    downloadFile("../game.gba", registerROM);
}

function registerROM() {
    processDownload(this, attachROM);
    IodineGUI.Iodine.play();
}

Then call downloadBIOS(); from window.onload function. The directory should be relative to where the emulator is located on the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment