Skip to content

Commit

Permalink
add bios input
Browse files Browse the repository at this point in the history
  • Loading branch information
donno2048 authored and copy committed Aug 24, 2024
1 parent 46366e2 commit 23d279c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
5 changes: 5 additions & 0 deletions debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ <h4>Debugger</h4>
<hr>

<table>
<tr>
<td><label for="bios">BIOS</label></td>
<td><input type="file" id="bios"><br></td>
</tr>

<tr>
<td width="350"><label for="cd_image">CD image</label></td>
<td>
Expand Down
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ <h4>Select profile</h4>
<hr>
<h4>Setup</h4>
<table>
<tr>
<td><label for="bios">BIOS</label></td>
<td> <input type="file" id="bios"><br></td>
</tr>

<tr>
<td width="350"><label for="cd_image">CD image</label></td>
<td>
Expand Down
20 changes: 18 additions & 2 deletions src/browser/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@
var images = [];
var last_file;

var bios = $("bios").files[0];
if(bios)
{
last_file = bios;
settings.bios = { buffer: bios };
}

var floppy_file = $("floppy_image").files[0];
if(floppy_file)
{
Expand Down Expand Up @@ -1525,6 +1532,15 @@
}
}

if(!settings.bios)
{
var bios = $("bios").files[0];
if(bios)
{
settings.bios = { buffer: bios };
}
}

if(!settings.fda)
{
var floppy_file = $("floppy_image").files[0];
Expand Down Expand Up @@ -1594,8 +1610,8 @@

network_relay_url: ON_LOCALHOST ? "ws://localhost:8080/" : networking_proxy,

bios: bios,
vga_bios: vga_bios,
bios: settings.bios || bios,
vga_bios: settings.bios ? null : vga_bios,

fda: settings.fda,
hda: settings.hda,
Expand Down

0 comments on commit 23d279c

Please sign in to comment.