Skip to content

Commit

Permalink
Merge branch 'copy:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Percslol authored Sep 28, 2024
2 parents bb97e5d + a9a538f commit a36303c
Show file tree
Hide file tree
Showing 18 changed files with 1,414 additions and 712 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
test:
runs-on: ubuntu-latest
name: Build and test
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ CARGO_FLAGS_SAFE=\
CARGO_FLAGS=$(CARGO_FLAGS_SAFE) -C target-feature=+bulk-memory -C target-feature=+multivalue -C target-feature=+simd128

CORE_FILES=const.js config.js io.js main.js lib.js buffer.js ide.js pci.js floppy.js \
memory.js dma.js pit.js vga.js ps2.js rtc.js uart.js \
memory.js dma.js pit.js vga.js vga_text.js ps2.js rtc.js uart.js \
acpi.js apic.js ioapic.js \
state.js ne2k.js sb16.js virtio.js virtio_console.js virtio_net.js \
bus.js log.js cpu.js debug.js \
Expand Down
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ repository under their own licenses:
- [The jor1k project](https://github.com/s-macke/jor1k) for 9p, filesystem and uart drivers
- [WinWorld](https://winworldpc.com/) sources of some old operating systems
- [OS/2 Museum](https://www.os2museum.com/) sources of some old operating systems
- [ArchiveOS](https://archiveos.org/) sources of several operating systems

## More questions?

Expand Down
131 changes: 61 additions & 70 deletions debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,75 +4,66 @@
<title>Virtual x86 (debug)</title>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">

<script>
"use strict";

var CORE_FILES =
"const.js config.js log.js lib.js buffer.js cpu.js debug.js " +
"io.js main.js ide.js pci.js floppy.js " +
"memory.js dma.js pit.js vga.js ps2.js rtc.js uart.js acpi.js apic.js ioapic.js sb16.js " +
"ne2k.js state.js virtio.js virtio_console.js virtio_net.js bus.js elf.js kernel.js";

var BROWSER_FILES = "main.js screen.js keyboard.js mouse.js speaker.js serial.js network.js fake_network.js fetch_network.js wisp_network.js starter.js worker_bus.js print_stats.js filestorage.js";
var LIB_FILES = "";

// jor1k stuff
LIB_FILES += " jor1k.js 9p.js filesystem.js marshall.js";

var BUILD_FILES = "capstone-x86.min.js libwabt.js";

var to_load = [];

load_scripts(CORE_FILES, "src/");
load_scripts(BROWSER_FILES, "src/browser/");
load_scripts(LIB_FILES, "lib/");
load_scripts(BUILD_FILES, "build/");

function load_scripts(resp, path)
{
var files = resp.split(" ");

for(var i = 0; i < files.length; i++)
{
if(!files[i])
{
continue;
}

to_load.push(path + files[i]);
}
}

load_next();

function load_next()
{
let s = to_load.shift();

if(!s)
{
return;
}

var script = document.createElement("script");
script.src = s;
script.onload = load_next;
script.onerror = function() {
console.warn("trying to ignore script " + s + ", which failed to load");

load_next();
};
document.head.appendChild(script);
}
</script>
<script src="src/const.js"></script>
<script src="src/config.js"></script>
<script src="src/log.js"></script>
<script src="src/lib.js"></script>
<script src="src/buffer.js"></script>
<script src="src/cpu.js"></script>
<script src="src/debug.js"></script>
<script src="src/io.js"></script>
<script src="src/main.js"></script>
<script src="src/ide.js"></script>
<script src="src/pci.js"></script>
<script src="src/floppy.js"></script>
<script src="src/memory.js"></script>
<script src="src/dma.js"></script>
<script src="src/pit.js"></script>
<script src="src/vga.js"></script>
<script src="src/vga_text.js"></script>
<script src="src/ps2.js"></script>
<script src="src/rtc.js"></script>
<script src="src/uart.js"></script>
<script src="src/acpi.js"></script>
<script src="src/apic.js"></script>
<script src="src/ioapic.js"></script>
<script src="src/sb16.js"></script>
<script src="src/ne2k.js"></script>
<script src="src/state.js"></script>
<script src="src/virtio.js"></script>
<script src="src/virtio_console.js"></script>
<script src="src/virtio_net.js"></script>
<script src="src/bus.js"></script>
<script src="src/elf.js"></script>
<script src="src/kernel.js"></script>
<script src="src/browser/main.js"></script>
<script src="src/browser/screen.js"></script>
<script src="src/browser/keyboard.js"></script>
<script src="src/browser/mouse.js"></script>
<script src="src/browser/speaker.js"></script>
<script src="src/browser/serial.js"></script>
<script src="src/browser/network.js"></script>
<script src="src/browser/fake_network.js"></script>
<script src="src/browser/fetch_network.js"></script>
<script src="src/browser/wisp_network.js"></script>
<script src="src/browser/starter.js"></script>
<script src="src/browser/worker_bus.js"></script>
<script src="src/browser/print_stats.js"></script>
<script src="src/browser/filestorage.js"></script>
<script src="lib/jor1k.js"></script>
<script src="lib/9p.js"></script>
<script src="lib/filesystem.js"></script>
<script src="lib/marshall.js"></script>
<script src="build/capstone-x86.min.js"></script>
<script src="build/libwabt.js"></script>

<link rel="stylesheet" href="v86.css">

<div>
<div id="boot_options">
<h4>Debugger</h4>
<input type="button" value="ReactOS" id="start_reactos">
<input type="button" value="ReactOS (boot)" id="start_reactos-boot">
<input type="button" value="Hiren's Boot CD" id="start_hirens">
<br>

<input type="button" value="MS-DOS" id="start_msdos">
Expand Down Expand Up @@ -137,9 +128,9 @@ <h4>Debugger</h4>

<table>
<tr>
<td width="350"><label for="cd_image">CD image</label></td>
<td width="350"><label for="cdrom_image">CD image</label></td>
<td>
<input type="file" id="cd_image">
<input type="file" id="cdrom_image">
</td>
</tr>

Expand Down Expand Up @@ -189,16 +180,16 @@ <h4>Debugger</h4>
</tr>

<tr>
<td><label for="video_memory_size">Video Memory size</label></td>
<td><label for="vga_memory_size">Video Memory size</label></td>
<td>
<input id="video_memory_size" type="number" value="8" min="1" max="128" step="1"> MB<br>
<input id="vga_memory_size" type="number" value="8" min="1" max="128" step="1"> MB<br>
</td>
</tr>

<tr>
<td><label for="networking_proxy">Networking proxy (leave blank to disable)</label></td>
<td><label for="relay_url">Networking proxy (leave blank to disable)</label></td>
<td>
<input id="networking_proxy" type="text" value="wss://relay.widgetry.org/">
<input id="relay_url" type="text" value="wss://relay.widgetry.org/">
</td>
</tr>

Expand All @@ -214,9 +205,9 @@ <h4>Debugger</h4>
</tr>

<tr>
<td><label for="enable_acpi">Enable ACPI (experimental)</label></td>
<td><label for="acpi">Enable ACPI (experimental)</label></td>
<td>
<input id="enable_acpi" type="checkbox"><br>
<input id="acpi" type="checkbox"><br>
</td>
</tr>

Expand Down
6 changes: 6 additions & 0 deletions docs/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ hosts). Additionally, NTP, ICMP pings and UDP echo packets are handled to a
certain degree. See [#1061](https://github.com/copy/v86/pull/1061) for some
technical details.

You can pass the following flags to chromium to allow browsing without
restrictions in `fetch` mode:
`--disable-web-security --user-data-dir=/tmp/test`
Note that this turns off the same-origin policy and should only be used
temporarily.

### wisp networking

v86 also supports the [wisp
Expand Down
16 changes: 8 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ <h4>Select profile</h4>
<h4>Setup</h4>
<table>
<tr>
<td width="350"><label for="cd_image">CD image</label></td>
<td width="350"><label for="cdrom_image">CD image</label></td>
<td>
<input type="file" id="cd_image">
<input type="file" id="cdrom_image">
</td>
</tr>

Expand Down Expand Up @@ -119,16 +119,16 @@ <h4>Setup</h4>
</tr>

<tr>
<td><label for="video_memory_size">Video Memory size</label></td>
<td><label for="vga_memory_size">Video Memory size</label></td>
<td>
<input id="video_memory_size" type="number" value="8" min="1" max="128" step="1"> MB<br>
<input id="vga_memory_size" type="number" value="8" min="1" max="128" step="1"> MB<br>
</td>
</tr>

<tr>
<td><label for="networking_proxy">Networking proxy (leave blank to disable)</label></td>
<td><label for="relay_url">Networking proxy (leave blank to disable)</label></td>
<td>
<input id="networking_proxy" type="text" value="wss://relay.widgetry.org/">
<input id="relay_url" type="text" value="wss://relay.widgetry.org/">
</td>
</tr>

Expand All @@ -144,9 +144,9 @@ <h4>Setup</h4>
</tr>

<tr>
<td><label for="enable_acpi">Enable ACPI (experimental)</label></td>
<td><label for="acpi">Enable ACPI (experimental)</label></td>
<td>
<input id="enable_acpi" type="checkbox"><br>
<input id="acpi" type="checkbox"><br>
</td>
</tr>

Expand Down
Loading

0 comments on commit a36303c

Please sign in to comment.