v86/debug.html

364 lines
13 KiB
HTML
Raw Normal View History

2013-11-06 01:12:55 +01:00
<!doctype html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
2017-12-31 00:33:45 +01:00
<title>Virtual x86 (debug)</title>
2014-01-27 18:19:47 +01:00
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
2013-11-06 01:12:55 +01:00
2022-02-09 16:22:13 +01:00
<script>
"use strict";
var CORE_FILES =
2022-09-19 14:32:07 +02:00
"const.js config.js log.js lib.js buffer.js cpu.js debug.js " +
2022-02-09 16:22:13 +01:00
"io.js main.js ide.js pci.js floppy.js " +
"memory.js dma.js pit.js vga.js ps2.js pic.js rtc.js uart.js acpi.js apic.js ioapic.js hpet.js sb16.js " +
"ne2k.js state.js virtio.js bus.js elf.js kernel.js";
var BROWSER_FILES = "main.js screen.js keyboard.js mouse.js speaker.js serial.js network.js starter.js worker_bus.js print_stats.js filestorage.js";
2022-02-09 16:22:13 +01:00
var LIB_FILES = "";
// jor1k stuff
LIB_FILES += " jor1k.js 9p.js filesystem.js marshall.js utf8.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>
2013-11-06 01:12:55 +01:00
<link rel="stylesheet" href="v86.css">
2014-01-10 23:10:35 +01:00
<div>
2013-11-06 01:12:55 +01:00
<div id="boot_options">
2014-01-10 23:10:35 +01:00
<h4>Debugger</h4>
2017-03-15 19:25:38 +01:00
<input type="button" value="ReactOS" id="start_reactos">
2021-01-01 02:14:29 +01:00
<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">
<input type="button" value="FreeDOS" id="start_freedos">
<input type="button" value="FreeDOS with FreeGEM" id="start_freegem">
<input type="button" value="FreeDOS CD with games" id="start_fdgame">
<input type="button" value="FreeDOS with QBasic" id="start_qbasic">
<br>
<input type="button" value="Windows 1.01" id="start_windows1">
<input type="button" value="Windows 3.0" id="start_windows30">
<input type="button" value="Windows 3.1" id="start_windows31">
2017-03-04 22:06:23 +01:00
<input type="button" value="Windows 95" id="start_windows95">
2021-01-01 02:14:29 +01:00
<input type="button" value="Windows 95 (boot)" id="start_windows95-boot">
<br>
2016-07-18 04:23:37 +02:00
<input type="button" value="Windows 98" id="start_windows98">
2021-01-01 02:14:29 +01:00
<input type="button" value="Windows 98 (boot)" id="start_windows98-boot">
2022-09-13 08:07:47 +02:00
<input type="button" value="Windows NT 3.1" id="start_windowsnt3">
<input type="button" value="Windows NT 4.0" id="start_windowsnt4">
2021-01-01 02:14:29 +01:00
<input type="button" value="Windows 2000" id="start_windows2000">
2021-01-16 23:20:53 +01:00
<input type="button" value="Windows 2000 (boot)" id="start_windows2000-boot">
2021-01-01 02:14:29 +01:00
<br>
<input type="button" value="Linux 2.6 (Buildroot)" id="start_linux26">
<input type="button" value="Linux 3.18 (Buildroot)" id="start_linux3">
<input type="button" value="Linux 4.16 (Buildroot)" id="start_linux4">
2021-01-01 02:14:34 +01:00
<input type="button" value="Linux 5.6 (Buildroot)" id="start_buildroot">
2021-01-01 02:14:29 +01:00
<input type="button" value="Tiny Core" id="start_tinycore">
<input type="button" value="OpenWRT" id="start_openwrt">
<br>
<input type="button" value="Arch Linux" id="start_archlinux">
2021-11-12 00:13:13 +01:00
<input type="button" value="Arch Linux (boot)" id="start_archlinux-boot">
2021-01-01 02:14:29 +01:00
<input type="button" value="Damn Small Linux" id="start_dsl">
<br>
<input type="button" value="FreeBSD" id="start_freebsd">
<input type="button" value="FreeBSD (boot)" id="start_freebsd-boot">
2016-01-01 17:50:13 +01:00
<input type="button" value="OpenBSD" id="start_openbsd">
2021-01-01 02:14:29 +01:00
<input type="button" value="NetBSD" id="start_netbsd">
<br>
<input type="button" value="Haiku" id="start_haiku">
2021-01-01 02:14:34 +01:00
<input type="button" value="Haiku (boot)" id="start_haiku-boot">
2021-01-01 02:14:29 +01:00
<input type="button" value="Minix" id="start_minix">
<input type="button" value="SerenityOS" id="start_serenity">
2021-01-01 02:14:34 +01:00
<input type="button" value="QNX" id="start_qnx">
2021-01-01 02:14:29 +01:00
<input type="button" value="9front" id="start_9front">
<br>
2016-07-18 04:23:37 +02:00
<input type="button" value="Oberon" id="start_oberon">
2016-01-01 17:50:13 +01:00
<input type="button" value="KolibriOS" id="start_kolibrios">
<input type="button" value="Solar OS" id="start_solos">
<input type="button" value="Bootchess" id="start_bootchess">
2021-01-01 02:14:29 +01:00
<input type="button" value="HelenOS" id="start_helenos">
<input type="button" value="MikeOS" id="start_mikeos">
2014-09-25 04:25:59 +02:00
<br>
<!--
2014-09-25 04:25:59 +02:00
<hr>
Restore state: <input type="file" id="restore_state">
-->
2014-01-10 23:10:35 +01:00
<br>
2013-11-06 01:12:55 +01:00
<hr>
2014-01-10 23:10:35 +01:00
<table>
<tr>
2021-01-01 02:14:34 +01:00
<td width="350"><label for="cd_image">CD image</label></td>
2016-01-01 17:50:13 +01:00
<td>
2014-01-10 23:10:35 +01:00
<input type="file" id="cd_image">
</td>
</tr>
<tr>
2021-01-01 02:14:34 +01:00
<td><label for="floppy_image">Floppy disk image</label></td>
2014-01-10 23:10:35 +01:00
<td> <input type="file" id="floppy_image"><br></td>
</tr>
<tr>
2021-01-03 07:51:29 +01:00
<td><label for="hda_image">Hard drive disk image</label></td>
<td><input type="file" id="hda_image"><br></td>
</tr>
<tr>
2022-07-27 15:31:23 +02:00
<td>Second hard drive disk image</td>
<td><input type="file" id="hdb_image"><br></td>
2014-01-10 23:10:35 +01:00
</tr>
2017-04-02 18:03:50 +02:00
<tr>
2021-01-01 02:14:34 +01:00
<td><label for="multiboot_image">Multiboot kernel image (experimental)</label></td>
2017-04-02 18:03:50 +02:00
<td><input type="file" id="multiboot_image"><br></td>
</tr>
2022-03-10 21:28:53 +01:00
<tr>
<td><label for="bzimage">Kernel image (bzimage)</label></td>
<td><input type="file" id="bzimage"><br></td>
</tr>
<tr>
<td><label for="initrd">initrd</label></td>
<td><input type="file" id="initrd"><br></td>
</tr>
2014-01-10 23:10:35 +01:00
<tr>
2021-01-01 02:14:34 +01:00
<td colspan="2"><small>Disk images are not uploaded to the server</small><hr></td>
2014-01-10 23:10:35 +01:00
</tr>
<tr>
2021-01-01 02:14:34 +01:00
<td><label for="memory_size">Memory size</label></td>
2014-01-10 23:10:35 +01:00
<td>
2016-01-01 17:50:13 +01:00
<input id="memory_size" type="number" value="128" min="16" max="2048" step="16"> MB<br>
2014-01-10 23:10:35 +01:00
</td>
</tr>
<tr>
2021-01-01 02:14:34 +01:00
<td><label for="video_memory_size">Video Memory size</label></td>
2014-01-10 23:10:35 +01:00
<td>
2014-07-12 20:21:28 +02:00
<input id="video_memory_size" type="number" value="8" min="1" max="128" step="1"> MB<br>
2014-01-10 23:10:35 +01:00
</td>
</tr>
2021-01-01 02:14:34 +01:00
<tr>
<td><label for="networking_proxy">Networking proxy (leave blank to disable)</label></td>
<td>
<input id="networking_proxy" type="text" value="wss://relay.widgetry.org/">
</td>
</tr>
2014-01-10 23:10:35 +01:00
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
2021-01-01 02:14:34 +01:00
<td><label for="disable_audio">Disable audio</label></td>
<td>
<input id="disable_audio" type="checkbox"><br>
</td>
2014-01-10 23:10:35 +01:00
</tr>
<tr>
2021-01-01 02:14:34 +01:00
<td><label for="enable_acpi">Enable ACPI (experimental)</label></td>
<td>
<input id="enable_acpi" type="checkbox"><br>
</td>
</tr>
<tr>
<td colspan="2"><hr></td>
2014-01-10 23:10:35 +01:00
</tr>
<tr>
2021-01-01 02:14:34 +01:00
<td><label for="boot_order">Boot order</label></td>
2016-01-01 17:50:13 +01:00
<td>
2014-01-10 23:10:35 +01:00
<select id="boot_order">
<option value="213">CD / Floppy / Hard Disk</option>
<option value="123">CD / Hard Disk / Floppy</option>
<option value="231">Floppy / CD / Hard Disk</option>
<option value="321">Floppy / Hard Disk / CD</option>
2014-01-10 23:10:35 +01:00
<option value="312">Hard Disk / Floppy / CD</option>
<option value="132">Hard Disk / CD / Floppy</option>
</select>
</td>
</tr>
</table>
2013-11-06 01:12:55 +01:00
<br>
2014-01-10 23:10:35 +01:00
<button id="start_emulation">Start Emulation</button>
2014-02-11 01:28:35 +01:00
<br>
<br>
2013-11-06 01:12:55 +01:00
</div>
2014-01-10 23:10:35 +01:00
2013-11-06 01:12:55 +01:00
<div id="runtime_options" style="display: none">
2014-01-10 23:10:35 +01:00
<input type="button" value="Dump Registers" id="dump_regs">
<input type="button" value="Dump GDT/LDT" id="dump_gdt">
<input type="button" value="Dump IDT" id="dump_idt">
<input type="button" value="Dump page tables" id="dump_pt">
<input type="button" value="Dump log" id="dump_log">
2013-11-06 01:12:55 +01:00
<br>
<input type="button" value="Pause" id="run">
<input type="button" value="Reset" id="reset">
2014-09-25 01:03:11 +02:00
<input type="button" value="Exit" id="exit">
2013-11-06 01:12:55 +01:00
<input type="button" value="Send Ctrl-Alt-Del" id="ctrlaltdel">
2015-01-05 19:21:02 +01:00
<input type="button" value="Send Alt-Tab" id="alttab">
2014-01-10 23:10:35 +01:00
<input type="button" value="Get floppy image" id="get_fda_image">
<input type="button" value="Get second floppy image" id="get_fdb_image">
<input type="button" value="Get hard disk image" id="get_hda_image">
<input type="button" value="Get second hard disk image" id="get_hdb_image">
<input type="button" value="Get cdrom image" id="get_cdrom_image">
2014-09-25 04:25:59 +02:00
<input type="button" value="Save State" id="save_state">
<input type="button" value="Load State" id="load_state"> <input type="file" style="display: none" id="load_state_input">
2021-01-01 02:14:34 +01:00
<input type="button" value="Memory Dump" id="memory_dump">
<input type="button" value="Capture network traffic" id="capture_network_traffic">
2014-07-13 01:37:30 +02:00
<input type="button" value="Disable mouse" id="toggle_mouse">
2013-11-06 01:12:55 +01:00
<input type="button" value="Lock mouse" id="lock_mouse">
<input type="button" value="Go fullscreen" id="fullscreen">
2022-06-03 13:40:59 +02:00
<input type="button" value="Take screenshot" id="take_screenshot">
2021-12-16 20:33:34 +01:00
<input type="button" value="Mute" id="mute">
2013-11-06 01:12:55 +01:00
2015-04-12 21:42:05 +02:00
<label>
2016-01-01 17:50:13 +01:00
Scale:
2015-04-12 21:42:05 +02:00
<input type="number" min="0.25" step="0.25" value="1.0" id="scale" style="width: 50px">
</label>
<br>
<label id="change_fda" style="display: none">
2016-01-01 17:50:13 +01:00
Change floppy:
2015-04-12 21:42:05 +02:00
<input type="file">
</label>
<label id="change_cdrom" style="display: none">
2016-01-01 17:50:13 +01:00
Change CD:
2015-04-12 21:42:05 +02:00
<input type="file">
</label>
2013-11-06 01:12:55 +01:00
</div>
<pre style="margin: 0" id="log_levels"></pre>
2013-11-06 01:12:55 +01:00
<pre style="display: none" id="loading"></pre>
<br>
</div>
2017-03-17 20:24:01 +01:00
<div id="screen_container" style="display: none">
2013-11-06 01:12:55 +01:00
<div id="screen"></div>
<canvas id="vga"></canvas>
2017-11-09 18:11:16 +01:00
<div style="position: absolute; top: 0; z-index: 10">
<textarea class="phone_keyboard"></textarea>
</div>
</div>
2014-02-20 22:46:57 +01:00
2021-01-01 02:14:34 +01:00
2014-02-11 01:28:35 +01:00
<div id="runtime_infos" style="display: none">
Running: <span id="running_time">0s</span> <br>
2021-01-01 02:14:29 +01:00
Speed: <span id="speed">0</span> mIPS<br>
Avg speed: <span id="avg_speed">0</span> mIPS<br>
2014-02-11 01:28:35 +01:00
<br>
2015-01-14 00:45:17 +01:00
<div id="info_storage" style="display: none">
2015-01-21 03:22:04 +01:00
<b>IDE device (HDA or CDROM)</b><br>
2015-01-14 00:45:17 +01:00
Sectors read: <span id="info_storage_sectors_read">0</span><br>
Bytes read: <span id="info_storage_bytes_read">0</span><br>
Sectors written: <span id="info_storage_sectors_written">0</span><br>
Bytes written: <span id="info_storage_bytes_written">0</span><br>
Status: <span id="info_storage_status"></span><br>
2014-02-11 01:28:35 +01:00
<br>
</div>
2015-01-14 00:45:17 +01:00
<div id="info_filesystem" style="display: none">
<b>9p Filesystem</b><br>
Bytes read: <span id="info_filesystem_bytes_read">0</span><br>
Bytes written: <span id="info_filesystem_bytes_written">0</span><br>
<div style="white-space: nowrap; overflow-x: hidden">Last file: <span id="info_filesystem_last_file"></span></div>
2015-01-14 00:45:17 +01:00
Status: <span id="info_filesystem_status"></span><br>
2014-02-11 01:28:35 +01:00
<br>
</div>
2015-03-07 05:30:40 +01:00
<div id="info_network" style="display: none">
<b>Network</b><br>
Bytes received: <span id="info_network_bytes_received">0</span><br>
Bytes transmitted: <span id="info_network_bytes_transmitted">0</span><br>
<br>
</div>
2014-02-11 01:28:35 +01:00
<b>VGA</b><br>
Mode: <span id="info_vga_mode"></span><br>
Resolution: <span id="info_res">-</span><br>
BPP: <span id="info_bpp">-</span><br>
<br>
2015-01-14 00:45:17 +01:00
Mouse: <span id="info_mouse_enabled">No</span><br>
2014-02-11 01:28:35 +01:00
</div>
2014-01-10 23:10:35 +01:00
<div id="filesystem_panel" style="display: none">
<label>
Send files to emulator<br>
<input type="file" id="filesystem_send_file" multiple>
</label>
<br><br>
<label>
Get file from emulator<br>
<input type="text" id="filesystem_get_file" placeholder="Absolute path">
</label>
</div>
2017-04-02 18:03:50 +02:00
<div id="debug_panel" style="display: none">
</div>
2021-01-01 02:14:34 +01:00
<br style="clear: both"><br>
2014-01-11 01:12:37 +01:00
2021-01-01 02:14:34 +01:00
<textarea spellcheck="false" cols="40" rows="12" id="serial" style="display: none">
2014-02-11 01:28:35 +01:00
</textarea>
<div id="terminal"></div>