debug.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. <!doctype html>
  2. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  3. <title>Virtual x86 (debug)</title>
  4. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  5. <script src="loader.js"></script>
  6. <link rel="stylesheet" href="v86.css">
  7. <div>
  8. <div id="boot_options">
  9. <h4>Debugger</h4>
  10. <input type="button" value="ReactOS" id="start_reactos">
  11. <input type="button" value="ReactOS (boot)" id="start_reactos-boot">
  12. <input type="button" value="Hiren's Boot CD" id="start_hirens">
  13. <br>
  14. <input type="button" value="MS-DOS" id="start_msdos">
  15. <input type="button" value="FreeDOS" id="start_freedos">
  16. <input type="button" value="FreeDOS with FreeGEM" id="start_freegem">
  17. <input type="button" value="FreeDOS CD with games" id="start_fdgame">
  18. <input type="button" value="FreeDOS with QBasic" id="start_qbasic">
  19. <br>
  20. <input type="button" value="Windows 1.01" id="start_windows1">
  21. <input type="button" value="Windows 3.0" id="start_windows30">
  22. <input type="button" value="Windows 3.1" id="start_windows31">
  23. <input type="button" value="Windows 95" id="start_windows95">
  24. <input type="button" value="Windows 95 (boot)" id="start_windows95-boot">
  25. <br>
  26. <input type="button" value="Windows 98" id="start_windows98">
  27. <input type="button" value="Windows 98 (boot)" id="start_windows98-boot">
  28. <input type="button" value="Windows 2000" id="start_windows2000">
  29. <input type="button" value="Windows Me" id="start_windowsme">
  30. <input type="button" value="Windows Me (2)" id="start_windowsme2">
  31. <br>
  32. <input type="button" value="Linux 2.6 (Buildroot)" id="start_linux26">
  33. <input type="button" value="Linux 3.18 (Buildroot)" id="start_linux3">
  34. <input type="button" value="Linux 4.16 (Buildroot)" id="start_linux4">
  35. <input type="button" value="Tiny Core" id="start_tinycore">
  36. <input type="button" value="OpenWRT" id="start_openwrt">
  37. <br>
  38. <input type="button" value="Arch Linux" id="start_archlinux">
  39. <input type="button" value="Arch Linux (boot)" id="start_archlinux-9p-cool">
  40. <input type="button" value="Debian" id="start_debian">
  41. <input type="button" value="Alpine" id="start_alpine">
  42. <input type="button" value="Damn Small Linux" id="start_dsl">
  43. <br>
  44. <input type="button" value="FreeBSD" id="start_freebsd">
  45. <input type="button" value="FreeBSD (boot)" id="start_freebsd-boot">
  46. <input type="button" value="OpenBSD" id="start_openbsd">
  47. <input type="button" value="NetBSD" id="start_netbsd">
  48. <br>
  49. <input type="button" value="Haiku" id="start_haiku">
  50. <input type="button" value="Minix" id="start_minix">
  51. <input type="button" value="SerenityOS" id="start_serenity">
  52. <input type="button" value="9front" id="start_9front">
  53. <input type="button" value="Plan 9" id="start_plan9">
  54. <br>
  55. <input type="button" value="Oberon" id="start_oberon">
  56. <input type="button" value="KolibriOS" id="start_kolibrios">
  57. <input type="button" value="Solar OS" id="start_solos">
  58. <input type="button" value="Bootchess" id="start_bootchess">
  59. <input type="button" value="HelenOS" id="start_helenos">
  60. <input type="button" value="MikeOS" id="start_mikeos">
  61. <br>
  62. <!--
  63. <hr>
  64. Restore state: <input type="file" id="restore_state">
  65. -->
  66. <br>
  67. <hr>
  68. <table>
  69. <tr>
  70. <td width="250">CD image</td>
  71. <td>
  72. <!--
  73. <select>
  74. <option>None</option>
  75. <option>Local file</option>
  76. <option>External Server</option>
  77. </select>-->
  78. <input type="file" id="cd_image">
  79. </td>
  80. </tr>
  81. <tr>
  82. <td>Floppy disk image</td>
  83. <td> <input type="file" id="floppy_image"><br></td>
  84. </tr>
  85. <tr>
  86. <td>Hard drive disk image</td>
  87. <td><input type="file" id="hd_image"><br></td>
  88. </tr>
  89. <tr>
  90. <td>Multiboot kernel image</td>
  91. <td><input type="file" id="multiboot_image"><br></td>
  92. </tr>
  93. <tr>
  94. <td colspan="2"><hr></td>
  95. </tr>
  96. <tr>
  97. <td>Memory size</td>
  98. <td>
  99. <input id="memory_size" type="number" value="128" min="16" max="2048" step="16"> MB<br>
  100. </td>
  101. </tr>
  102. <tr>
  103. <td>Video Memory size</td>
  104. <td>
  105. <input id="video_memory_size" type="number" value="8" min="1" max="128" step="1"> MB<br>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td colspan="2"><hr></td>
  110. </tr>
  111. <!--
  112. <tr>
  113. <td>Execution Cap </td>
  114. <td> <input type="number" value="100" min="5" max="100" step="5"> %<br> </td>
  115. </tr>
  116. -->
  117. <tr>
  118. <td>Boot order</td>
  119. <td>
  120. <select id="boot_order">
  121. <option value="213">CD / Floppy / Hard Disk</option>
  122. <option value="123">CD / Hard Disk / Floppy</option>
  123. <option value="231">Floppy / CD / Hard Disk</option>
  124. <option value="321">Floppy / Hard Disk / CD</option>
  125. <option value="312">Hard Disk / Floppy / CD</option>
  126. <option value="132">Hard Disk / CD / Floppy</option>
  127. </select>
  128. </td>
  129. </tr>
  130. </table>
  131. <br>
  132. <button id="start_emulation">Start Emulation</button>
  133. <!--
  134. <br>
  135. <div id="setup_error">Error: Video size must be at least over 9000</div>
  136. -->
  137. <!--
  138. <br>
  139. <br>
  140. Link to this configuration: <a href="" id="config_link">http://copy.sh/v86/?a=b&amp;c=d</a>
  141. -->
  142. <br>
  143. <br>
  144. </div>
  145. <div id="runtime_options" style="display: none">
  146. <input type="button" value="Step" id="step">
  147. <input type="button" value="Run until" id="run_until">
  148. <input type="button" value="Debugger" id="debugger">
  149. <input type="button" value="Dump Instructions" id="dump_instructions">
  150. <input type="button" value="Dump Instructions to file" id="dump_instructions_file">
  151. <input type="button" value="Dump Registers" id="dump_regs">
  152. <input type="button" value="Dump GDT/LDT" id="dump_gdt">
  153. <input type="button" value="Dump IDT" id="dump_idt">
  154. <input type="button" value="Dump page tables" id="dump_pt">
  155. <input type="button" value="Dump log" id="dump_log">
  156. <br>
  157. <input type="button" value="Pause" id="run">
  158. <input type="button" value="Reset" id="reset">
  159. <input type="button" value="Exit" id="exit">
  160. <input type="button" value="Send Ctrl-Alt-Del" id="ctrlaltdel">
  161. <input type="button" value="Send Alt-Tab" id="alttab">
  162. <input type="button" value="Get floppy image" id="get_fda_image">
  163. <input type="button" value="Get second floppy image" id="get_fdb_image">
  164. <input type="button" value="Get hard disk image" id="get_hda_image">
  165. <input type="button" value="Get second hard disk image" id="get_hdb_image">
  166. <input type="button" value="Get cdrom image" id="get_cdrom_image">
  167. <input type="button" value="Save State" id="save_state">
  168. <input type="button" value="Load State" id="load_state"> <input type="file" style="display: none" id="load_state_input">
  169. <input type="button" value="Memory Dump (raw)" id="memory_dump">
  170. <input type="button" value="Disable mouse" id="toggle_mouse">
  171. <input type="button" value="Lock mouse" id="lock_mouse">
  172. <input type="button" value="Go fullscreen" id="fullscreen">
  173. <input type="button" value="Take screenshot (only graphic modes)" id="take_screenshot">
  174. <label>
  175. Scale:
  176. <input type="number" min="0.25" step="0.25" value="1.0" id="scale" style="width: 50px">
  177. </label>
  178. <br>
  179. <label id="change_fda" style="display: none">
  180. Change floppy:
  181. <input type="file">
  182. </label>
  183. <label id="change_cdrom" style="display: none">
  184. Change CD:
  185. <input type="file">
  186. </label>
  187. </div>
  188. <pre style="margin: 0" id="log_levels"></pre>
  189. <pre style="margin: 3px 0px 0px 0px" id="debug_infos"></pre>
  190. <pre style="display: none" id="loading"></pre>
  191. <br>
  192. </div>
  193. <div id="screen_container" style="display: none">
  194. <div id="screen"></div>
  195. <canvas id="vga"></canvas>
  196. <div style="position: absolute; top: 0; z-index: 10">
  197. <textarea class="phone_keyboard"></textarea>
  198. </div>
  199. </div>
  200. <div id="runtime_infos" style="display: none">
  201. Running: <span id="running_time">0s</span> <br>
  202. Speed: <span id="speed">0</span> mIPS<br>
  203. Avg speed: <span id="avg_speed">0</span> mIPS<br>
  204. <br>
  205. <div id="info_storage" style="display: none">
  206. <b>IDE device (HDA or CDROM)</b><br>
  207. Sectors read: <span id="info_storage_sectors_read">0</span><br>
  208. Bytes read: <span id="info_storage_bytes_read">0</span><br>
  209. Sectors written: <span id="info_storage_sectors_written">0</span><br>
  210. Bytes written: <span id="info_storage_bytes_written">0</span><br>
  211. Status: <span id="info_storage_status"></span><br>
  212. <br>
  213. </div>
  214. <div id="info_filesystem" style="display: none">
  215. <b>9p Filesystem</b><br>
  216. Bytes read: <span id="info_filesystem_bytes_read">0</span><br>
  217. Bytes written: <span id="info_filesystem_bytes_written">0</span><br>
  218. <div style="white-space: nowrap; overflow-x: hidden">Last file: <span id="info_filesystem_last_file"></span></div>
  219. Status: <span id="info_filesystem_status"></span><br>
  220. <br>
  221. </div>
  222. <div id="info_network" style="display: none">
  223. <b>Network</b><br>
  224. Bytes received: <span id="info_network_bytes_received">0</span><br>
  225. Bytes transmitted: <span id="info_network_bytes_transmitted">0</span><br>
  226. <br>
  227. </div>
  228. <b>VGA</b><br>
  229. Mode: <span id="info_vga_mode"></span><br>
  230. Resolution: <span id="info_res">-</span><br>
  231. BPP: <span id="info_bpp">-</span><br>
  232. <br>
  233. Mouse: <span id="info_mouse_enabled">No</span><br>
  234. <!-- Keyboard: <span id="info_keyboard_enabled">-</span><br> -->
  235. </div>
  236. <div id="filesystem_panel" style="display: none">
  237. <label>
  238. Send files to emulator<br>
  239. <input type="file" id="filesystem_send_file" multiple>
  240. </label>
  241. <br><br>
  242. <label>
  243. Get file from emulator<br>
  244. <input type="text" id="filesystem_get_file" placeholder="Absolute path">
  245. </label>
  246. </div>
  247. <div id="debug_panel" style="display: none">
  248. </div>
  249. <br style="clear:both"><br>
  250. <textarea readonly id="log" style="display:none"></textarea>
  251. <textarea spellcheck="false" cols="40" rows="12" id="serial" style="display:none">
  252. </textarea>
  253. <div id="terminal"></div>