v86 0.3.7 → 0.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/Readme.md +64 -108
  2. package/build/libv86-debug.js +12677 -0
  3. package/build/libv86-debug.mjs +732 -0
  4. package/build/libv86.js +710 -0
  5. package/build/libv86.mjs +636 -0
  6. package/build/v86-debug.wasm +0 -0
  7. package/build/v86-fallback.wasm +0 -0
  8. package/build/v86.wasm +0 -0
  9. package/package.json +12 -35
  10. package/bios/.gitignore +0 -1
  11. package/bios/COPYING.LESSER +0 -165
  12. package/bios/bochs-bios.bin +0 -0
  13. package/bios/bochs-vgabios.bin +0 -0
  14. package/bios/fetch-and-build-seabios.sh +0 -13
  15. package/bios/seabios/.config +0 -113
  16. package/bios/seabios/.config.old +0 -114
  17. package/bios/seabios/.gitignore +0 -4
  18. package/bios/seabios/COPYING +0 -674
  19. package/bios/seabios/COPYING.LESSER +0 -165
  20. package/bios/seabios/Makefile +0 -286
  21. package/bios/seabios/README +0 -17
  22. package/bios/seabios/docs/Build_overview.md +0 -104
  23. package/bios/seabios/docs/Contributing.md +0 -20
  24. package/bios/seabios/docs/Debugging.md +0 -111
  25. package/bios/seabios/docs/Developer_Documentation.md +0 -25
  26. package/bios/seabios/docs/Developer_links.md +0 -86
  27. package/bios/seabios/docs/Download.md +0 -27
  28. package/bios/seabios/docs/Execution_and_code_flow.md +0 -178
  29. package/bios/seabios/docs/Linking_overview.md +0 -160
  30. package/bios/seabios/docs/Mailinglist.md +0 -8
  31. package/bios/seabios/docs/Memory_Model.md +0 -253
  32. package/bios/seabios/docs/README +0 -5
  33. package/bios/seabios/docs/Releases.md +0 -482
  34. package/bios/seabios/docs/Runtime_config.md +0 -193
  35. package/bios/seabios/docs/SeaBIOS.md +0 -17
  36. package/bios/seabios/docs/SeaVGABIOS.md +0 -39
  37. package/bios/seabios/out/autoconf.h +0 -117
  38. package/bios/seabios/out/include/config/acpi/dsdt.h +0 -0
  39. package/bios/seabios/out/include/config/acpi.h +0 -0
  40. package/bios/seabios/out/include/config/ahci.h +0 -0
  41. package/bios/seabios/out/include/config/apmbios.h +0 -0
  42. package/bios/seabios/out/include/config/ata/dma.h +0 -0
  43. package/bios/seabios/out/include/config/ata/pio32.h +0 -0
  44. package/bios/seabios/out/include/config/ata.h +0 -0
  45. package/bios/seabios/out/include/config/auto.conf +0 -69
  46. package/bios/seabios/out/include/config/auto.conf.cmd +0 -9
  47. package/bios/seabios/out/include/config/boot.h +0 -0
  48. package/bios/seabios/out/include/config/bootorder.h +0 -0
  49. package/bios/seabios/out/include/config/build/vgabios.h +0 -0
  50. package/bios/seabios/out/include/config/call32/smm.h +0 -0
  51. package/bios/seabios/out/include/config/cdrom/boot.h +0 -0
  52. package/bios/seabios/out/include/config/cdrom/emu.h +0 -0
  53. package/bios/seabios/out/include/config/debug/level.h +0 -0
  54. package/bios/seabios/out/include/config/drives.h +0 -0
  55. package/bios/seabios/out/include/config/entry/extrastack.h +0 -0
  56. package/bios/seabios/out/include/config/esp/scsi.h +0 -0
  57. package/bios/seabios/out/include/config/flash/floppy.h +0 -0
  58. package/bios/seabios/out/include/config/floppy.h +0 -0
  59. package/bios/seabios/out/include/config/fw/romfile/load.h +0 -0
  60. package/bios/seabios/out/include/config/hardware/irq.h +0 -0
  61. package/bios/seabios/out/include/config/kbd/call/int15/4f.h +0 -0
  62. package/bios/seabios/out/include/config/keyboard.h +0 -0
  63. package/bios/seabios/out/include/config/lpt.h +0 -0
  64. package/bios/seabios/out/include/config/lsi/scsi.h +0 -0
  65. package/bios/seabios/out/include/config/malloc/uppermemory.h +0 -0
  66. package/bios/seabios/out/include/config/megasas.h +0 -0
  67. package/bios/seabios/out/include/config/mouse.h +0 -0
  68. package/bios/seabios/out/include/config/mpt/scsi.h +0 -0
  69. package/bios/seabios/out/include/config/mptable.h +0 -0
  70. package/bios/seabios/out/include/config/mtrr/init.h +0 -0
  71. package/bios/seabios/out/include/config/optionroms.h +0 -0
  72. package/bios/seabios/out/include/config/override/pci/id.h +0 -0
  73. package/bios/seabios/out/include/config/pcibios.h +0 -0
  74. package/bios/seabios/out/include/config/pirtable.h +0 -0
  75. package/bios/seabios/out/include/config/pmm.h +0 -0
  76. package/bios/seabios/out/include/config/pmtimer.h +0 -0
  77. package/bios/seabios/out/include/config/pnpbios.h +0 -0
  78. package/bios/seabios/out/include/config/ps2port.h +0 -0
  79. package/bios/seabios/out/include/config/pvscsi.h +0 -0
  80. package/bios/seabios/out/include/config/qemu/hardware.h +0 -0
  81. package/bios/seabios/out/include/config/qemu.h +0 -0
  82. package/bios/seabios/out/include/config/rom/size.h +0 -0
  83. package/bios/seabios/out/include/config/rtc/timer.h +0 -0
  84. package/bios/seabios/out/include/config/s3/resume.h +0 -0
  85. package/bios/seabios/out/include/config/sdcard.h +0 -0
  86. package/bios/seabios/out/include/config/serial.h +0 -0
  87. package/bios/seabios/out/include/config/tcgbios.h +0 -0
  88. package/bios/seabios/out/include/config/threads.h +0 -0
  89. package/bios/seabios/out/include/config/tristate.conf +0 -4
  90. package/bios/seabios/out/include/config/tsc/timer.h +0 -0
  91. package/bios/seabios/out/include/config/use/smm.h +0 -0
  92. package/bios/seabios/out/include/config/vga/allocate/extra/stack.h +0 -0
  93. package/bios/seabios/out/include/config/vga/bochs/stdvga.h +0 -0
  94. package/bios/seabios/out/include/config/vga/bochs.h +0 -0
  95. package/bios/seabios/out/include/config/vga/did.h +0 -0
  96. package/bios/seabios/out/include/config/vga/extra/stack/size.h +0 -0
  97. package/bios/seabios/out/include/config/vga/fixup/asm.h +0 -0
  98. package/bios/seabios/out/include/config/vga/pci.h +0 -0
  99. package/bios/seabios/out/include/config/vga/stdvga/ports.h +0 -0
  100. package/bios/seabios/out/include/config/vga/vbe.h +0 -0
  101. package/bios/seabios/out/include/config/vga/vid.h +0 -0
  102. package/bios/seabios/out/include/config/vgahooks.h +0 -0
  103. package/bios/seabios/out/include/config/virtio/blk.h +0 -0
  104. package/bios/seabios/out/include/config/virtio/scsi.h +0 -0
  105. package/bios/seabios/out/include/config/xen.h +0 -0
  106. package/bios/seabios/out/scripts/kconfig/conf +0 -0
  107. package/bios/seabios/out/scripts/kconfig/conf.o +0 -0
  108. package/bios/seabios/out/scripts/kconfig/zconf.hash.c +0 -289
  109. package/bios/seabios/out/scripts/kconfig/zconf.lex.c +0 -2420
  110. package/bios/seabios/out/scripts/kconfig/zconf.tab.c +0 -2538
  111. package/bios/seabios/out/scripts/kconfig/zconf.tab.o +0 -0
  112. package/bios/seabios/scripts/acpi_extract.py +0 -366
  113. package/bios/seabios/scripts/acpi_extract_preprocess.py +0 -41
  114. package/bios/seabios/scripts/buildrom.py +0 -56
  115. package/bios/seabios/scripts/buildversion.py +0 -134
  116. package/bios/seabios/scripts/checkrom.py +0 -95
  117. package/bios/seabios/scripts/checkstack.py +0 -226
  118. package/bios/seabios/scripts/checksum.py +0 -16
  119. package/bios/seabios/scripts/encodeint.py +0 -21
  120. package/bios/seabios/scripts/gen-offsets.sh +0 -17
  121. package/bios/seabios/scripts/kconfig/.gitignore +0 -22
  122. package/bios/seabios/scripts/kconfig/Makefile +0 -331
  123. package/bios/seabios/scripts/kconfig/POTFILES.in +0 -12
  124. package/bios/seabios/scripts/kconfig/check.sh +0 -13
  125. package/bios/seabios/scripts/kconfig/conf.c +0 -718
  126. package/bios/seabios/scripts/kconfig/confdata.c +0 -1250
  127. package/bios/seabios/scripts/kconfig/expr.c +0 -1168
  128. package/bios/seabios/scripts/kconfig/expr.h +0 -241
  129. package/bios/seabios/scripts/kconfig/gconf.c +0 -1542
  130. package/bios/seabios/scripts/kconfig/gconf.glade +0 -661
  131. package/bios/seabios/scripts/kconfig/images.c +0 -326
  132. package/bios/seabios/scripts/kconfig/kxgettext.c +0 -235
  133. package/bios/seabios/scripts/kconfig/lex.zconf.c +0 -2430
  134. package/bios/seabios/scripts/kconfig/list.h +0 -131
  135. package/bios/seabios/scripts/kconfig/lkc.h +0 -200
  136. package/bios/seabios/scripts/kconfig/lkc_proto.h +0 -57
  137. package/bios/seabios/scripts/kconfig/lxdialog/.gitignore +0 -4
  138. package/bios/seabios/scripts/kconfig/lxdialog/BIG.FAT.WARNING +0 -4
  139. package/bios/seabios/scripts/kconfig/lxdialog/check-lxdialog.sh +0 -87
  140. package/bios/seabios/scripts/kconfig/lxdialog/checklist.c +0 -332
  141. package/bios/seabios/scripts/kconfig/lxdialog/dialog.h +0 -257
  142. package/bios/seabios/scripts/kconfig/lxdialog/inputbox.c +0 -301
  143. package/bios/seabios/scripts/kconfig/lxdialog/menubox.c +0 -437
  144. package/bios/seabios/scripts/kconfig/lxdialog/textbox.c +0 -408
  145. package/bios/seabios/scripts/kconfig/lxdialog/util.c +0 -713
  146. package/bios/seabios/scripts/kconfig/lxdialog/yesno.c +0 -114
  147. package/bios/seabios/scripts/kconfig/mconf.c +0 -1036
  148. package/bios/seabios/scripts/kconfig/menu.c +0 -697
  149. package/bios/seabios/scripts/kconfig/merge_config.sh +0 -150
  150. package/bios/seabios/scripts/kconfig/nconf.c +0 -1556
  151. package/bios/seabios/scripts/kconfig/nconf.gui.c +0 -656
  152. package/bios/seabios/scripts/kconfig/nconf.h +0 -96
  153. package/bios/seabios/scripts/kconfig/qconf.cc +0 -1795
  154. package/bios/seabios/scripts/kconfig/qconf.h +0 -338
  155. package/bios/seabios/scripts/kconfig/streamline_config.pl +0 -647
  156. package/bios/seabios/scripts/kconfig/symbol.c +0 -1373
  157. package/bios/seabios/scripts/kconfig/util.c +0 -157
  158. package/bios/seabios/scripts/kconfig/zconf.gperf +0 -48
  159. package/bios/seabios/scripts/kconfig/zconf.hash.c_shipped +0 -289
  160. package/bios/seabios/scripts/kconfig/zconf.l +0 -363
  161. package/bios/seabios/scripts/kconfig/zconf.lex.c_shipped +0 -2420
  162. package/bios/seabios/scripts/kconfig/zconf.tab.c_shipped +0 -2538
  163. package/bios/seabios/scripts/kconfig/zconf.y +0 -733
  164. package/bios/seabios/scripts/layoutrom.py +0 -705
  165. package/bios/seabios/scripts/python23compat.py +0 -14
  166. package/bios/seabios/scripts/readserial.py +0 -190
  167. package/bios/seabios/scripts/tarball.sh +0 -36
  168. package/bios/seabios/scripts/test-build.sh +0 -90
  169. package/bios/seabios/scripts/transdump.py +0 -53
  170. package/bios/seabios/scripts/vgafixup.py +0 -96
  171. package/bios/seabios/src/Kconfig +0 -579
  172. package/bios/seabios/src/apm.c +0 -215
  173. package/bios/seabios/src/asm-offsets.c +0 -23
  174. package/bios/seabios/src/biosvar.h +0 -130
  175. package/bios/seabios/src/block.c +0 -623
  176. package/bios/seabios/src/block.h +0 -121
  177. package/bios/seabios/src/bmp.c +0 -117
  178. package/bios/seabios/src/boot.c +0 -793
  179. package/bios/seabios/src/bootsplash.c +0 -255
  180. package/bios/seabios/src/bregs.h +0 -80
  181. package/bios/seabios/src/byteorder.h +0 -71
  182. package/bios/seabios/src/cdrom.c +0 -322
  183. package/bios/seabios/src/clock.c +0 -506
  184. package/bios/seabios/src/code16gcc.s +0 -1
  185. package/bios/seabios/src/config.h +0 -108
  186. package/bios/seabios/src/cp437.c +0 -275
  187. package/bios/seabios/src/cp437.h +0 -1
  188. package/bios/seabios/src/disk.c +0 -779
  189. package/bios/seabios/src/e820map.c +0 -152
  190. package/bios/seabios/src/e820map.h +0 -26
  191. package/bios/seabios/src/entryfuncs.S +0 -165
  192. package/bios/seabios/src/farptr.h +0 -208
  193. package/bios/seabios/src/font.c +0 -139
  194. package/bios/seabios/src/fw/acpi-dsdt-cpu-hotplug.dsl +0 -78
  195. package/bios/seabios/src/fw/acpi-dsdt-dbug.dsl +0 -26
  196. package/bios/seabios/src/fw/acpi-dsdt-hpet.dsl +0 -36
  197. package/bios/seabios/src/fw/acpi-dsdt-isa.dsl +0 -102
  198. package/bios/seabios/src/fw/acpi-dsdt-pci-crs.dsl +0 -90
  199. package/bios/seabios/src/fw/acpi-dsdt.dsl +0 -342
  200. package/bios/seabios/src/fw/acpi-dsdt.hex +0 -554
  201. package/bios/seabios/src/fw/acpi.c +0 -685
  202. package/bios/seabios/src/fw/biostables.c +0 -491
  203. package/bios/seabios/src/fw/coreboot.c +0 -569
  204. package/bios/seabios/src/fw/csm.c +0 -347
  205. package/bios/seabios/src/fw/dev-pci.h +0 -52
  206. package/bios/seabios/src/fw/dev-piix.h +0 -29
  207. package/bios/seabios/src/fw/dev-q35.h +0 -52
  208. package/bios/seabios/src/fw/lzmadecode.c +0 -398
  209. package/bios/seabios/src/fw/lzmadecode.h +0 -67
  210. package/bios/seabios/src/fw/mptable.c +0 -197
  211. package/bios/seabios/src/fw/mtrr.c +0 -105
  212. package/bios/seabios/src/fw/multiboot.c +0 -111
  213. package/bios/seabios/src/fw/paravirt.c +0 -624
  214. package/bios/seabios/src/fw/paravirt.h +0 -63
  215. package/bios/seabios/src/fw/pciinit.c +0 -1187
  216. package/bios/seabios/src/fw/pirtable.c +0 -103
  217. package/bios/seabios/src/fw/q35-acpi-dsdt.dsl +0 -450
  218. package/bios/seabios/src/fw/romfile_loader.c +0 -259
  219. package/bios/seabios/src/fw/romfile_loader.h +0 -91
  220. package/bios/seabios/src/fw/shadow.c +0 -208
  221. package/bios/seabios/src/fw/smbios.c +0 -585
  222. package/bios/seabios/src/fw/smm.c +0 -269
  223. package/bios/seabios/src/fw/smp.c +0 -194
  224. package/bios/seabios/src/fw/ssdt-misc.dsl +0 -104
  225. package/bios/seabios/src/fw/ssdt-misc.hex +0 -88
  226. package/bios/seabios/src/fw/ssdt-pcihp.dsl +0 -36
  227. package/bios/seabios/src/fw/ssdt-pcihp.hex +0 -38
  228. package/bios/seabios/src/fw/ssdt-proc.dsl +0 -48
  229. package/bios/seabios/src/fw/ssdt-proc.hex +0 -35
  230. package/bios/seabios/src/fw/xen.c +0 -149
  231. package/bios/seabios/src/fw/xen.h +0 -125
  232. package/bios/seabios/src/gen-defs.h +0 -19
  233. package/bios/seabios/src/hw/ahci.c +0 -697
  234. package/bios/seabios/src/hw/ahci.h +0 -201
  235. package/bios/seabios/src/hw/ata.c +0 -1046
  236. package/bios/seabios/src/hw/ata.h +0 -163
  237. package/bios/seabios/src/hw/blockcmd.c +0 -372
  238. package/bios/seabios/src/hw/blockcmd.h +0 -114
  239. package/bios/seabios/src/hw/dma.c +0 -67
  240. package/bios/seabios/src/hw/esp-scsi.c +0 -241
  241. package/bios/seabios/src/hw/esp-scsi.h +0 -8
  242. package/bios/seabios/src/hw/floppy.c +0 -741
  243. package/bios/seabios/src/hw/lsi-scsi.c +0 -221
  244. package/bios/seabios/src/hw/lsi-scsi.h +0 -8
  245. package/bios/seabios/src/hw/megasas.c +0 -405
  246. package/bios/seabios/src/hw/megasas.h +0 -8
  247. package/bios/seabios/src/hw/mpt-scsi.c +0 -319
  248. package/bios/seabios/src/hw/mpt-scsi.h +0 -8
  249. package/bios/seabios/src/hw/nvme-int.h +0 -199
  250. package/bios/seabios/src/hw/nvme.c +0 -708
  251. package/bios/seabios/src/hw/nvme.h +0 -17
  252. package/bios/seabios/src/hw/pci.c +0 -133
  253. package/bios/seabios/src/hw/pci.h +0 -47
  254. package/bios/seabios/src/hw/pci_ids.h +0 -2632
  255. package/bios/seabios/src/hw/pci_regs.h +0 -556
  256. package/bios/seabios/src/hw/pcidevice.c +0 -192
  257. package/bios/seabios/src/hw/pcidevice.h +0 -76
  258. package/bios/seabios/src/hw/pic.c +0 -115
  259. package/bios/seabios/src/hw/pic.h +0 -60
  260. package/bios/seabios/src/hw/ps2port.c +0 -543
  261. package/bios/seabios/src/hw/ps2port.h +0 -67
  262. package/bios/seabios/src/hw/pvscsi.c +0 -333
  263. package/bios/seabios/src/hw/pvscsi.h +0 -8
  264. package/bios/seabios/src/hw/ramdisk.c +0 -108
  265. package/bios/seabios/src/hw/rtc.c +0 -100
  266. package/bios/seabios/src/hw/rtc.h +0 -75
  267. package/bios/seabios/src/hw/sdcard.c +0 -572
  268. package/bios/seabios/src/hw/serialio.c +0 -113
  269. package/bios/seabios/src/hw/serialio.h +0 -29
  270. package/bios/seabios/src/hw/timer.c +0 -259
  271. package/bios/seabios/src/hw/tpm_drivers.c +0 -636
  272. package/bios/seabios/src/hw/tpm_drivers.h +0 -127
  273. package/bios/seabios/src/hw/usb-ehci.c +0 -650
  274. package/bios/seabios/src/hw/usb-ehci.h +0 -177
  275. package/bios/seabios/src/hw/usb-hid.c +0 -442
  276. package/bios/seabios/src/hw/usb-hid.h +0 -29
  277. package/bios/seabios/src/hw/usb-hub.c +0 -205
  278. package/bios/seabios/src/hw/usb-hub.h +0 -64
  279. package/bios/seabios/src/hw/usb-msc.c +0 -222
  280. package/bios/seabios/src/hw/usb-msc.h +0 -10
  281. package/bios/seabios/src/hw/usb-ohci.c +0 -568
  282. package/bios/seabios/src/hw/usb-ohci.h +0 -144
  283. package/bios/seabios/src/hw/usb-uas.c +0 -289
  284. package/bios/seabios/src/hw/usb-uas.h +0 -9
  285. package/bios/seabios/src/hw/usb-uhci.c +0 -571
  286. package/bios/seabios/src/hw/usb-uhci.h +0 -128
  287. package/bios/seabios/src/hw/usb-xhci.c +0 -1161
  288. package/bios/seabios/src/hw/usb-xhci.h +0 -133
  289. package/bios/seabios/src/hw/usb.c +0 -499
  290. package/bios/seabios/src/hw/usb.h +0 -254
  291. package/bios/seabios/src/hw/virtio-blk.c +0 -211
  292. package/bios/seabios/src/hw/virtio-blk.h +0 -43
  293. package/bios/seabios/src/hw/virtio-pci.c +0 -501
  294. package/bios/seabios/src/hw/virtio-pci.h +0 -151
  295. package/bios/seabios/src/hw/virtio-ring.c +0 -147
  296. package/bios/seabios/src/hw/virtio-ring.h +0 -121
  297. package/bios/seabios/src/hw/virtio-scsi.c +0 -220
  298. package/bios/seabios/src/hw/virtio-scsi.h +0 -47
  299. package/bios/seabios/src/jpeg.c +0 -1055
  300. package/bios/seabios/src/kbd.c +0 -599
  301. package/bios/seabios/src/list.h +0 -91
  302. package/bios/seabios/src/malloc.c +0 -561
  303. package/bios/seabios/src/malloc.h +0 -70
  304. package/bios/seabios/src/memmap.h +0 -21
  305. package/bios/seabios/src/misc.c +0 -195
  306. package/bios/seabios/src/mouse.c +0 -342
  307. package/bios/seabios/src/optionroms.c +0 -475
  308. package/bios/seabios/src/output.c +0 -584
  309. package/bios/seabios/src/output.h +0 -68
  310. package/bios/seabios/src/pcibios.c +0 -241
  311. package/bios/seabios/src/pmm.c +0 -176
  312. package/bios/seabios/src/pnpbios.c +0 -88
  313. package/bios/seabios/src/post.c +0 -337
  314. package/bios/seabios/src/resume.c +0 -157
  315. package/bios/seabios/src/romfile.c +0 -146
  316. package/bios/seabios/src/romfile.h +0 -21
  317. package/bios/seabios/src/romlayout.S +0 -698
  318. package/bios/seabios/src/sercon.c +0 -677
  319. package/bios/seabios/src/serial.c +0 -317
  320. package/bios/seabios/src/sha1.c +0 -147
  321. package/bios/seabios/src/sha1.h +0 -8
  322. package/bios/seabios/src/stacks.c +0 -771
  323. package/bios/seabios/src/stacks.h +0 -68
  324. package/bios/seabios/src/std/LegacyBios.h +0 -985
  325. package/bios/seabios/src/std/acpi.h +0 -323
  326. package/bios/seabios/src/std/bda.h +0 -174
  327. package/bios/seabios/src/std/disk.h +0 -175
  328. package/bios/seabios/src/std/mptable.h +0 -77
  329. package/bios/seabios/src/std/multiboot.h +0 -260
  330. package/bios/seabios/src/std/optionrom.h +0 -59
  331. package/bios/seabios/src/std/pirtable.h +0 -35
  332. package/bios/seabios/src/std/pmm.h +0 -19
  333. package/bios/seabios/src/std/pnpbios.h +0 -24
  334. package/bios/seabios/src/std/smbios.h +0 -167
  335. package/bios/seabios/src/std/tcg.h +0 -554
  336. package/bios/seabios/src/std/vbe.h +0 -156
  337. package/bios/seabios/src/std/vga.h +0 -63
  338. package/bios/seabios/src/string.c +0 -251
  339. package/bios/seabios/src/string.h +0 -31
  340. package/bios/seabios/src/system.c +0 -357
  341. package/bios/seabios/src/tcgbios.c +0 -2014
  342. package/bios/seabios/src/tcgbios.h +0 -19
  343. package/bios/seabios/src/types.h +0 -156
  344. package/bios/seabios/src/util.h +0 -251
  345. package/bios/seabios/src/version.c +0 -5
  346. package/bios/seabios/src/vgahooks.c +0 -355
  347. package/bios/seabios/src/x86.c +0 -23
  348. package/bios/seabios/src/x86.h +0 -277
  349. package/bios/seabios/vgasrc/Kconfig +0 -211
  350. package/bios/seabios/vgasrc/bochsdisplay.c +0 -59
  351. package/bios/seabios/vgasrc/bochsvga.c +0 -447
  352. package/bios/seabios/vgasrc/bochsvga.h +0 -57
  353. package/bios/seabios/vgasrc/cbvga.c +0 -337
  354. package/bios/seabios/vgasrc/clext.c +0 -627
  355. package/bios/seabios/vgasrc/geodevga.c +0 -434
  356. package/bios/seabios/vgasrc/geodevga.h +0 -89
  357. package/bios/seabios/vgasrc/ramfb.c +0 -163
  358. package/bios/seabios/vgasrc/stdvga.c +0 -485
  359. package/bios/seabios/vgasrc/stdvga.h +0 -81
  360. package/bios/seabios/vgasrc/stdvgaio.c +0 -186
  361. package/bios/seabios/vgasrc/stdvgamodes.c +0 -534
  362. package/bios/seabios/vgasrc/swcursor.c +0 -96
  363. package/bios/seabios/vgasrc/vbe.c +0 -432
  364. package/bios/seabios/vgasrc/vgabios.c +0 -1131
  365. package/bios/seabios/vgasrc/vgabios.h +0 -88
  366. package/bios/seabios/vgasrc/vgaentry.S +0 -161
  367. package/bios/seabios/vgasrc/vgafb.c +0 -661
  368. package/bios/seabios/vgasrc/vgafb.h +0 -42
  369. package/bios/seabios/vgasrc/vgafonts.c +0 -785
  370. package/bios/seabios/vgasrc/vgahw.h +0 -152
  371. package/bios/seabios/vgasrc/vgainit.c +0 -202
  372. package/bios/seabios/vgasrc/vgalayout.lds.S +0 -23
  373. package/bios/seabios/vgasrc/vgautil.h +0 -103
  374. package/bios/seabios/vgasrc/vgaversion.c +0 -6
  375. package/bios/seabios-debug.bin +0 -0
  376. package/bios/seabios-debug.config +0 -117
  377. package/bios/seabios.bin +0 -0
  378. package/bios/seabios.config +0 -114
  379. package/bios/vgabios-debug.bin +0 -0
  380. package/bios/vgabios.bin +0 -0
  381. package/build/binaries.js +0 -1
  382. package/build/index-debug.cjs +0 -1
  383. package/build/index-debug.js +0 -1
  384. package/build/index.cjs +0 -1
  385. package/build/index.js +0 -1
  386. package/v86.css +0 -259
@@ -1,534 +0,0 @@
1
- // Standard VGA mode information.
2
- //
3
- // Copyright (C) 2009 Kevin O'Connor <kevin@koconnor.net>
4
- // Copyright (C) 2001-2008 the LGPL VGABios developers Team
5
- //
6
- // This file may be distributed under the terms of the GNU LGPLv3 license.
7
-
8
- #include "biosvar.h" // GET_GLOBAL
9
- #include "output.h" // warn_internalerror
10
- #include "std/vga.h" // struct video_param_s
11
- #include "stdvga.h" // stdvga_find_mode
12
- #include "string.h" // memcpy_far
13
- #include "vgabios.h" // SET_VGA
14
- #include "vgautil.h" // vgafont16
15
-
16
-
17
- /****************************************************************
18
- * Video mode register definitions
19
- ****************************************************************/
20
-
21
- /* Mono */
22
- static u8 palette0[] VAR16 = {
23
- 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00,
24
- 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00,
25
- 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a,
26
- 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a,
27
- 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a,
28
- 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a,
29
- 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f,
30
- 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f,
31
- 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00,
32
- 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00,
33
- 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a,
34
- 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a,
35
- 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a,
36
- 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a, 0x2a,0x2a,0x2a,
37
- 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f,
38
- 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f, 0x3f,0x3f,0x3f
39
- };
40
-
41
- static u8 palette1[] VAR16 = {
42
- 0x00,0x00,0x00, 0x00,0x00,0x2a, 0x00,0x2a,0x00, 0x00,0x2a,0x2a,
43
- 0x2a,0x00,0x00, 0x2a,0x00,0x2a, 0x2a,0x15,0x00, 0x2a,0x2a,0x2a,
44
- 0x00,0x00,0x00, 0x00,0x00,0x2a, 0x00,0x2a,0x00, 0x00,0x2a,0x2a,
45
- 0x2a,0x00,0x00, 0x2a,0x00,0x2a, 0x2a,0x15,0x00, 0x2a,0x2a,0x2a,
46
- 0x15,0x15,0x15, 0x15,0x15,0x3f, 0x15,0x3f,0x15, 0x15,0x3f,0x3f,
47
- 0x3f,0x15,0x15, 0x3f,0x15,0x3f, 0x3f,0x3f,0x15, 0x3f,0x3f,0x3f,
48
- 0x15,0x15,0x15, 0x15,0x15,0x3f, 0x15,0x3f,0x15, 0x15,0x3f,0x3f,
49
- 0x3f,0x15,0x15, 0x3f,0x15,0x3f, 0x3f,0x3f,0x15, 0x3f,0x3f,0x3f,
50
- 0x00,0x00,0x00, 0x00,0x00,0x2a, 0x00,0x2a,0x00, 0x00,0x2a,0x2a,
51
- 0x2a,0x00,0x00, 0x2a,0x00,0x2a, 0x2a,0x15,0x00, 0x2a,0x2a,0x2a,
52
- 0x00,0x00,0x00, 0x00,0x00,0x2a, 0x00,0x2a,0x00, 0x00,0x2a,0x2a,
53
- 0x2a,0x00,0x00, 0x2a,0x00,0x2a, 0x2a,0x15,0x00, 0x2a,0x2a,0x2a,
54
- 0x15,0x15,0x15, 0x15,0x15,0x3f, 0x15,0x3f,0x15, 0x15,0x3f,0x3f,
55
- 0x3f,0x15,0x15, 0x3f,0x15,0x3f, 0x3f,0x3f,0x15, 0x3f,0x3f,0x3f,
56
- 0x15,0x15,0x15, 0x15,0x15,0x3f, 0x15,0x3f,0x15, 0x15,0x3f,0x3f,
57
- 0x3f,0x15,0x15, 0x3f,0x15,0x3f, 0x3f,0x3f,0x15, 0x3f,0x3f,0x3f
58
- };
59
-
60
- static u8 palette2[] VAR16 = {
61
- 0x00,0x00,0x00, 0x00,0x00,0x2a, 0x00,0x2a,0x00, 0x00,0x2a,0x2a,
62
- 0x2a,0x00,0x00, 0x2a,0x00,0x2a, 0x2a,0x2a,0x00, 0x2a,0x2a,0x2a,
63
- 0x00,0x00,0x15, 0x00,0x00,0x3f, 0x00,0x2a,0x15, 0x00,0x2a,0x3f,
64
- 0x2a,0x00,0x15, 0x2a,0x00,0x3f, 0x2a,0x2a,0x15, 0x2a,0x2a,0x3f,
65
- 0x00,0x15,0x00, 0x00,0x15,0x2a, 0x00,0x3f,0x00, 0x00,0x3f,0x2a,
66
- 0x2a,0x15,0x00, 0x2a,0x15,0x2a, 0x2a,0x3f,0x00, 0x2a,0x3f,0x2a,
67
- 0x00,0x15,0x15, 0x00,0x15,0x3f, 0x00,0x3f,0x15, 0x00,0x3f,0x3f,
68
- 0x2a,0x15,0x15, 0x2a,0x15,0x3f, 0x2a,0x3f,0x15, 0x2a,0x3f,0x3f,
69
- 0x15,0x00,0x00, 0x15,0x00,0x2a, 0x15,0x2a,0x00, 0x15,0x2a,0x2a,
70
- 0x3f,0x00,0x00, 0x3f,0x00,0x2a, 0x3f,0x2a,0x00, 0x3f,0x2a,0x2a,
71
- 0x15,0x00,0x15, 0x15,0x00,0x3f, 0x15,0x2a,0x15, 0x15,0x2a,0x3f,
72
- 0x3f,0x00,0x15, 0x3f,0x00,0x3f, 0x3f,0x2a,0x15, 0x3f,0x2a,0x3f,
73
- 0x15,0x15,0x00, 0x15,0x15,0x2a, 0x15,0x3f,0x00, 0x15,0x3f,0x2a,
74
- 0x3f,0x15,0x00, 0x3f,0x15,0x2a, 0x3f,0x3f,0x00, 0x3f,0x3f,0x2a,
75
- 0x15,0x15,0x15, 0x15,0x15,0x3f, 0x15,0x3f,0x15, 0x15,0x3f,0x3f,
76
- 0x3f,0x15,0x15, 0x3f,0x15,0x3f, 0x3f,0x3f,0x15, 0x3f,0x3f,0x3f
77
- };
78
-
79
- static u8 palette3[] VAR16 = {
80
- 0x00,0x00,0x00, 0x00,0x00,0x2a, 0x00,0x2a,0x00, 0x00,0x2a,0x2a,
81
- 0x2a,0x00,0x00, 0x2a,0x00,0x2a, 0x2a,0x15,0x00, 0x2a,0x2a,0x2a,
82
- 0x15,0x15,0x15, 0x15,0x15,0x3f, 0x15,0x3f,0x15, 0x15,0x3f,0x3f,
83
- 0x3f,0x15,0x15, 0x3f,0x15,0x3f, 0x3f,0x3f,0x15, 0x3f,0x3f,0x3f,
84
- 0x00,0x00,0x00, 0x05,0x05,0x05, 0x08,0x08,0x08, 0x0b,0x0b,0x0b,
85
- 0x0e,0x0e,0x0e, 0x11,0x11,0x11, 0x14,0x14,0x14, 0x18,0x18,0x18,
86
- 0x1c,0x1c,0x1c, 0x20,0x20,0x20, 0x24,0x24,0x24, 0x28,0x28,0x28,
87
- 0x2d,0x2d,0x2d, 0x32,0x32,0x32, 0x38,0x38,0x38, 0x3f,0x3f,0x3f,
88
- 0x00,0x00,0x3f, 0x10,0x00,0x3f, 0x1f,0x00,0x3f, 0x2f,0x00,0x3f,
89
- 0x3f,0x00,0x3f, 0x3f,0x00,0x2f, 0x3f,0x00,0x1f, 0x3f,0x00,0x10,
90
- 0x3f,0x00,0x00, 0x3f,0x10,0x00, 0x3f,0x1f,0x00, 0x3f,0x2f,0x00,
91
- 0x3f,0x3f,0x00, 0x2f,0x3f,0x00, 0x1f,0x3f,0x00, 0x10,0x3f,0x00,
92
- 0x00,0x3f,0x00, 0x00,0x3f,0x10, 0x00,0x3f,0x1f, 0x00,0x3f,0x2f,
93
- 0x00,0x3f,0x3f, 0x00,0x2f,0x3f, 0x00,0x1f,0x3f, 0x00,0x10,0x3f,
94
- 0x1f,0x1f,0x3f, 0x27,0x1f,0x3f, 0x2f,0x1f,0x3f, 0x37,0x1f,0x3f,
95
- 0x3f,0x1f,0x3f, 0x3f,0x1f,0x37, 0x3f,0x1f,0x2f, 0x3f,0x1f,0x27,
96
-
97
- 0x3f,0x1f,0x1f, 0x3f,0x27,0x1f, 0x3f,0x2f,0x1f, 0x3f,0x37,0x1f,
98
- 0x3f,0x3f,0x1f, 0x37,0x3f,0x1f, 0x2f,0x3f,0x1f, 0x27,0x3f,0x1f,
99
- 0x1f,0x3f,0x1f, 0x1f,0x3f,0x27, 0x1f,0x3f,0x2f, 0x1f,0x3f,0x37,
100
- 0x1f,0x3f,0x3f, 0x1f,0x37,0x3f, 0x1f,0x2f,0x3f, 0x1f,0x27,0x3f,
101
- 0x2d,0x2d,0x3f, 0x31,0x2d,0x3f, 0x36,0x2d,0x3f, 0x3a,0x2d,0x3f,
102
- 0x3f,0x2d,0x3f, 0x3f,0x2d,0x3a, 0x3f,0x2d,0x36, 0x3f,0x2d,0x31,
103
- 0x3f,0x2d,0x2d, 0x3f,0x31,0x2d, 0x3f,0x36,0x2d, 0x3f,0x3a,0x2d,
104
- 0x3f,0x3f,0x2d, 0x3a,0x3f,0x2d, 0x36,0x3f,0x2d, 0x31,0x3f,0x2d,
105
- 0x2d,0x3f,0x2d, 0x2d,0x3f,0x31, 0x2d,0x3f,0x36, 0x2d,0x3f,0x3a,
106
- 0x2d,0x3f,0x3f, 0x2d,0x3a,0x3f, 0x2d,0x36,0x3f, 0x2d,0x31,0x3f,
107
- 0x00,0x00,0x1c, 0x07,0x00,0x1c, 0x0e,0x00,0x1c, 0x15,0x00,0x1c,
108
- 0x1c,0x00,0x1c, 0x1c,0x00,0x15, 0x1c,0x00,0x0e, 0x1c,0x00,0x07,
109
- 0x1c,0x00,0x00, 0x1c,0x07,0x00, 0x1c,0x0e,0x00, 0x1c,0x15,0x00,
110
- 0x1c,0x1c,0x00, 0x15,0x1c,0x00, 0x0e,0x1c,0x00, 0x07,0x1c,0x00,
111
- 0x00,0x1c,0x00, 0x00,0x1c,0x07, 0x00,0x1c,0x0e, 0x00,0x1c,0x15,
112
- 0x00,0x1c,0x1c, 0x00,0x15,0x1c, 0x00,0x0e,0x1c, 0x00,0x07,0x1c,
113
-
114
- 0x0e,0x0e,0x1c, 0x11,0x0e,0x1c, 0x15,0x0e,0x1c, 0x18,0x0e,0x1c,
115
- 0x1c,0x0e,0x1c, 0x1c,0x0e,0x18, 0x1c,0x0e,0x15, 0x1c,0x0e,0x11,
116
- 0x1c,0x0e,0x0e, 0x1c,0x11,0x0e, 0x1c,0x15,0x0e, 0x1c,0x18,0x0e,
117
- 0x1c,0x1c,0x0e, 0x18,0x1c,0x0e, 0x15,0x1c,0x0e, 0x11,0x1c,0x0e,
118
- 0x0e,0x1c,0x0e, 0x0e,0x1c,0x11, 0x0e,0x1c,0x15, 0x0e,0x1c,0x18,
119
- 0x0e,0x1c,0x1c, 0x0e,0x18,0x1c, 0x0e,0x15,0x1c, 0x0e,0x11,0x1c,
120
- 0x14,0x14,0x1c, 0x16,0x14,0x1c, 0x18,0x14,0x1c, 0x1a,0x14,0x1c,
121
- 0x1c,0x14,0x1c, 0x1c,0x14,0x1a, 0x1c,0x14,0x18, 0x1c,0x14,0x16,
122
- 0x1c,0x14,0x14, 0x1c,0x16,0x14, 0x1c,0x18,0x14, 0x1c,0x1a,0x14,
123
- 0x1c,0x1c,0x14, 0x1a,0x1c,0x14, 0x18,0x1c,0x14, 0x16,0x1c,0x14,
124
- 0x14,0x1c,0x14, 0x14,0x1c,0x16, 0x14,0x1c,0x18, 0x14,0x1c,0x1a,
125
- 0x14,0x1c,0x1c, 0x14,0x1a,0x1c, 0x14,0x18,0x1c, 0x14,0x16,0x1c,
126
- 0x00,0x00,0x10, 0x04,0x00,0x10, 0x08,0x00,0x10, 0x0c,0x00,0x10,
127
- 0x10,0x00,0x10, 0x10,0x00,0x0c, 0x10,0x00,0x08, 0x10,0x00,0x04,
128
- 0x10,0x00,0x00, 0x10,0x04,0x00, 0x10,0x08,0x00, 0x10,0x0c,0x00,
129
- 0x10,0x10,0x00, 0x0c,0x10,0x00, 0x08,0x10,0x00, 0x04,0x10,0x00,
130
-
131
- 0x00,0x10,0x00, 0x00,0x10,0x04, 0x00,0x10,0x08, 0x00,0x10,0x0c,
132
- 0x00,0x10,0x10, 0x00,0x0c,0x10, 0x00,0x08,0x10, 0x00,0x04,0x10,
133
- 0x08,0x08,0x10, 0x0a,0x08,0x10, 0x0c,0x08,0x10, 0x0e,0x08,0x10,
134
- 0x10,0x08,0x10, 0x10,0x08,0x0e, 0x10,0x08,0x0c, 0x10,0x08,0x0a,
135
- 0x10,0x08,0x08, 0x10,0x0a,0x08, 0x10,0x0c,0x08, 0x10,0x0e,0x08,
136
- 0x10,0x10,0x08, 0x0e,0x10,0x08, 0x0c,0x10,0x08, 0x0a,0x10,0x08,
137
- 0x08,0x10,0x08, 0x08,0x10,0x0a, 0x08,0x10,0x0c, 0x08,0x10,0x0e,
138
- 0x08,0x10,0x10, 0x08,0x0e,0x10, 0x08,0x0c,0x10, 0x08,0x0a,0x10,
139
- 0x0b,0x0b,0x10, 0x0c,0x0b,0x10, 0x0d,0x0b,0x10, 0x0f,0x0b,0x10,
140
- 0x10,0x0b,0x10, 0x10,0x0b,0x0f, 0x10,0x0b,0x0d, 0x10,0x0b,0x0c,
141
- 0x10,0x0b,0x0b, 0x10,0x0c,0x0b, 0x10,0x0d,0x0b, 0x10,0x0f,0x0b,
142
- 0x10,0x10,0x0b, 0x0f,0x10,0x0b, 0x0d,0x10,0x0b, 0x0c,0x10,0x0b,
143
- 0x0b,0x10,0x0b, 0x0b,0x10,0x0c, 0x0b,0x10,0x0d, 0x0b,0x10,0x0f,
144
- 0x0b,0x10,0x10, 0x0b,0x0f,0x10, 0x0b,0x0d,0x10, 0x0b,0x0c,0x10,
145
- 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00,
146
- 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00
147
- };
148
-
149
- static u8 sequ_01[] VAR16 = { 0x08, 0x03, 0x00, 0x02 };
150
- static u8 crtc_01[] VAR16 = {
151
- 0x2d, 0x27, 0x28, 0x90, 0x2b, 0xa0, 0xbf, 0x1f,
152
- 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00,
153
- 0x9c, 0x8e, 0x8f, 0x14, 0x1f, 0x96, 0xb9, 0xa3,
154
- 0xff };
155
- static u8 actl_01[] VAR16 = {
156
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07,
157
- 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
158
- 0x0c, 0x00, 0x0f, 0x08 };
159
- static u8 grdc_01[] VAR16 = {
160
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff };
161
- static u8 sequ_03[] VAR16 = { 0x00, 0x03, 0x00, 0x02 };
162
- static u8 crtc_03[] VAR16 = {
163
- 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f,
164
- 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00,
165
- 0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96, 0xb9, 0xa3,
166
- 0xff };
167
- static u8 sequ_04[] VAR16 = { 0x09, 0x03, 0x00, 0x02 };
168
- static u8 crtc_04[] VAR16 = {
169
- 0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80, 0xbf, 0x1f,
170
- 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
171
- 0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96, 0xb9, 0xa2,
172
- 0xff };
173
- static u8 actl_04[] VAR16 = {
174
- 0x00, 0x13, 0x15, 0x17, 0x02, 0x04, 0x06, 0x07,
175
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
176
- 0x01, 0x00, 0x03, 0x00 };
177
- static u8 grdc_04[] VAR16 = {
178
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0f, 0x0f, 0xff };
179
- static u8 sequ_06[] VAR16 = { 0x01, 0x01, 0x00, 0x06 };
180
- static u8 crtc_06[] VAR16 = {
181
- 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f,
182
- 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
183
- 0x9c, 0x8e, 0x8f, 0x28, 0x00, 0x96, 0xb9, 0xc2,
184
- 0xff };
185
- static u8 actl_06[] VAR16 = {
186
- 0x00, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17,
187
- 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17,
188
- 0x01, 0x00, 0x01, 0x00 };
189
- static u8 grdc_06[] VAR16 = {
190
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x0f, 0xff };
191
- static u8 crtc_07[] VAR16 = {
192
- 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f,
193
- 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00,
194
- 0x9c, 0x8e, 0x8f, 0x28, 0x0f, 0x96, 0xb9, 0xa3,
195
- 0xff };
196
- static u8 actl_07[] VAR16 = {
197
- 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
198
- 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
199
- 0x0e, 0x00, 0x0f, 0x08 };
200
- static u8 grdc_07[] VAR16 = {
201
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x0f, 0xff };
202
- static u8 sequ_0d[] VAR16 = { 0x09, 0x0f, 0x00, 0x06 };
203
- static u8 crtc_0d[] VAR16 = {
204
- 0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80, 0xbf, 0x1f,
205
- 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
206
- 0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96, 0xb9, 0xe3,
207
- 0xff };
208
- static u8 actl_0d[] VAR16 = {
209
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
210
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
211
- 0x01, 0x00, 0x0f, 0x00 };
212
- static u8 grdc_0d[] VAR16 = {
213
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff };
214
- static u8 sequ_0e[] VAR16 = { 0x01, 0x0f, 0x00, 0x06 };
215
- static u8 crtc_0e[] VAR16 = {
216
- 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f,
217
- 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
218
- 0x9c, 0x8e, 0x8f, 0x28, 0x00, 0x96, 0xb9, 0xe3,
219
- 0xff };
220
- static u8 crtc_0f[] VAR16 = {
221
- 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f,
222
- 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
223
- 0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xba, 0xe3,
224
- 0xff };
225
- static u8 actl_0f[] VAR16 = {
226
- 0x00, 0x08, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
227
- 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
228
- 0x01, 0x00, 0x01, 0x00 };
229
- static u8 actl_10[] VAR16 = {
230
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07,
231
- 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
232
- 0x01, 0x00, 0x0f, 0x00 };
233
- static u8 crtc_11[] VAR16 = {
234
- 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e,
235
- 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
236
- 0xea, 0x8c, 0xdf, 0x28, 0x00, 0xe7, 0x04, 0xe3,
237
- 0xff };
238
- static u8 actl_11[] VAR16 = {
239
- 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f,
240
- 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f,
241
- 0x01, 0x00, 0x0f, 0x00 };
242
- static u8 sequ_13[] VAR16 = { 0x01, 0x0f, 0x00, 0x0e };
243
- static u8 crtc_13[] VAR16 = {
244
- 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f,
245
- 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
246
- 0x9c, 0x8e, 0x8f, 0x28, 0x40, 0x96, 0xb9, 0xa3,
247
- 0xff };
248
- static u8 actl_13[] VAR16 = {
249
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
250
- 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
251
- 0x41, 0x00, 0x0f, 0x00 };
252
- static u8 grdc_13[] VAR16 = {
253
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0f, 0xff };
254
- static u8 crtc_6A[] VAR16 = {
255
- 0x7f, 0x63, 0x63, 0x83, 0x6b, 0x1b, 0x72, 0xf0,
256
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
257
- 0x59, 0x8d, 0x57, 0x32, 0x00, 0x57, 0x73, 0xe3,
258
- 0xff };
259
-
260
- #define PAL(x) x, sizeof(x)
261
-
262
- struct stdvga_mode_s {
263
- u16 mode;
264
- struct vgamode_s info;
265
-
266
- u8 pelmask;
267
- u8 *dac;
268
- u16 dacsize;
269
- u8 *sequ_regs;
270
- u8 miscreg;
271
- u8 *crtc_regs;
272
- u8 *actl_regs;
273
- u8 *grdc_regs;
274
- };
275
-
276
- static struct stdvga_mode_s vga_modes[] VAR16 = {
277
- //mode { model tx ty bpp cw ch sstart }
278
- // pelm dac sequ misc crtc actl grdc
279
- {0x00, { MM_TEXT, 40, 25, 4, 9, 16, SEG_CTEXT }
280
- , 0xFF, PAL(palette2), sequ_01, 0x67, crtc_01, actl_01, grdc_01},
281
- {0x01, { MM_TEXT, 40, 25, 4, 9, 16, SEG_CTEXT }
282
- , 0xFF, PAL(palette2), sequ_01, 0x67, crtc_01, actl_01, grdc_01},
283
- {0x02, { MM_TEXT, 80, 25, 4, 9, 16, SEG_CTEXT }
284
- , 0xFF, PAL(palette2), sequ_03, 0x67, crtc_03, actl_01, grdc_01},
285
- {0x03, { MM_TEXT, 80, 25, 4, 9, 16, SEG_CTEXT }
286
- , 0xFF, PAL(palette2), sequ_03, 0x67, crtc_03, actl_01, grdc_01},
287
- {0x04, { MM_CGA, 320, 200, 2, 8, 8, SEG_CTEXT }
288
- , 0xFF, PAL(palette1), sequ_04, 0x63, crtc_04, actl_04, grdc_04},
289
- {0x05, { MM_CGA, 320, 200, 2, 8, 8, SEG_CTEXT }
290
- , 0xFF, PAL(palette1), sequ_04, 0x63, crtc_04, actl_04, grdc_04},
291
- {0x06, { MM_CGA, 640, 200, 1, 8, 8, SEG_CTEXT }
292
- , 0xFF, PAL(palette1), sequ_06, 0x63, crtc_06, actl_06, grdc_06},
293
- {0x07, { MM_TEXT, 80, 25, 4, 9, 16, SEG_MTEXT }
294
- , 0xFF, PAL(palette0), sequ_03, 0x66, crtc_07, actl_07, grdc_07},
295
- {0x0D, { MM_PLANAR, 320, 200, 4, 8, 8, SEG_GRAPH }
296
- , 0xFF, PAL(palette1), sequ_0d, 0x63, crtc_0d, actl_0d, grdc_0d},
297
- {0x0E, { MM_PLANAR, 640, 200, 4, 8, 8, SEG_GRAPH }
298
- , 0xFF, PAL(palette1), sequ_0e, 0x63, crtc_0e, actl_0d, grdc_0d},
299
- {0x0F, { MM_PLANAR, 640, 350, 1, 8, 14, SEG_GRAPH }
300
- , 0xFF, PAL(palette0), sequ_0e, 0xa3, crtc_0f, actl_0f, grdc_0d},
301
- {0x10, { MM_PLANAR, 640, 350, 4, 8, 14, SEG_GRAPH }
302
- , 0xFF, PAL(palette2), sequ_0e, 0xa3, crtc_0f, actl_10, grdc_0d},
303
- {0x11, { MM_PLANAR, 640, 480, 1, 8, 16, SEG_GRAPH }
304
- , 0xFF, PAL(palette2), sequ_0e, 0xe3, crtc_11, actl_11, grdc_0d},
305
- {0x12, { MM_PLANAR, 640, 480, 4, 8, 16, SEG_GRAPH }
306
- , 0xFF, PAL(palette2), sequ_0e, 0xe3, crtc_11, actl_10, grdc_0d},
307
- {0x13, { MM_PACKED, 320, 200, 8, 8, 8, SEG_GRAPH }
308
- , 0xFF, PAL(palette3), sequ_13, 0x63, crtc_13, actl_13, grdc_13},
309
- {0x6A, { MM_PLANAR, 800, 600, 4, 8, 16, SEG_GRAPH }
310
- , 0xFF, PAL(palette2), sequ_0e, 0xe3, crtc_6A, actl_10, grdc_0d},
311
- };
312
-
313
-
314
- /****************************************************************
315
- * Mode functions
316
- ****************************************************************/
317
-
318
- static int
319
- is_stdvga_mode(struct vgamode_s *vmode_g)
320
- {
321
- return (vmode_g >= &vga_modes[0].info
322
- && vmode_g <= &vga_modes[ARRAY_SIZE(vga_modes)-1].info);
323
- }
324
-
325
- struct vgamode_s *
326
- stdvga_find_mode(int mode)
327
- {
328
- int i;
329
- for (i = 0; i < ARRAY_SIZE(vga_modes); i++) {
330
- struct stdvga_mode_s *stdmode_g = &vga_modes[i];
331
- if (GET_GLOBAL(stdmode_g->mode) == mode)
332
- return &stdmode_g->info;
333
- }
334
- return NULL;
335
- }
336
-
337
- void
338
- stdvga_list_modes(u16 seg, u16 *dest, u16 *last)
339
- {
340
- int i;
341
- for (i = 0; i < ARRAY_SIZE(vga_modes) && dest < last; i++) {
342
- struct stdvga_mode_s *stdmode_g = &vga_modes[i];
343
- u16 mode = GET_GLOBAL(stdmode_g->mode);
344
- if (mode == 0xffff)
345
- continue;
346
- SET_FARVAR(seg, *dest, mode);
347
- dest++;
348
- }
349
-
350
- SET_FARVAR(seg, *dest, 0xffff);
351
- }
352
-
353
- static struct video_save_pointer_s video_save_pointer_table VAR16;
354
-
355
- static struct video_param_s video_param_table[29] VAR16;
356
-
357
- void
358
- stdvga_build_video_param(void)
359
- {
360
- SET_BDA(video_savetable
361
- , SEGOFF(get_global_seg(), (u32)&video_save_pointer_table));
362
- SET_VGA(video_save_pointer_table.videoparam
363
- , SEGOFF(get_global_seg(), (u32)video_param_table));
364
-
365
- static u8 parammodes[] VAR16 = {
366
- 0, 0, 0, 0, 0x04, 0x05, 0x06, 0x07,
367
- 0, 0, 0, 0, 0, 0x0d, 0x0e, 0,
368
- 0, 0x0f, 0x10, 0, 0, 0, 0, 0x01,
369
- 0x03, 0x07, 0x11, 0x12, 0x13
370
- };
371
-
372
- int i;
373
- for (i=0; i<ARRAY_SIZE(parammodes); i++) {
374
- int mode = GET_GLOBAL(parammodes[i]);
375
- if (! mode)
376
- continue;
377
- struct video_param_s *vparam_g = &video_param_table[i];
378
- struct vgamode_s *vmode_g = stdvga_find_mode(mode);
379
- if (!vmode_g)
380
- continue;
381
- int width = GET_GLOBAL(vmode_g->width);
382
- int height = GET_GLOBAL(vmode_g->height);
383
- u8 memmodel = GET_GLOBAL(vmode_g->memmodel);
384
- int cheight = GET_GLOBAL(vmode_g->cheight);
385
- if (memmodel == MM_TEXT) {
386
- SET_VGA(vparam_g->twidth, width);
387
- SET_VGA(vparam_g->theightm1, height-1);
388
- } else {
389
- int cwidth = GET_GLOBAL(vmode_g->cwidth);
390
- SET_VGA(vparam_g->twidth, width / cwidth);
391
- SET_VGA(vparam_g->theightm1, (height / cheight) - 1);
392
- }
393
- SET_VGA(vparam_g->cheight, cheight);
394
- SET_VGA(vparam_g->slength, calc_page_size(memmodel, width, height));
395
- struct stdvga_mode_s *stdmode_g = container_of(
396
- vmode_g, struct stdvga_mode_s, info);
397
- memcpy_far(get_global_seg(), vparam_g->sequ_regs
398
- , get_global_seg(), GET_GLOBAL(stdmode_g->sequ_regs)
399
- , ARRAY_SIZE(vparam_g->sequ_regs));
400
- SET_VGA(vparam_g->miscreg, GET_GLOBAL(stdmode_g->miscreg));
401
- memcpy_far(get_global_seg(), vparam_g->crtc_regs
402
- , get_global_seg(), GET_GLOBAL(stdmode_g->crtc_regs)
403
- , ARRAY_SIZE(vparam_g->crtc_regs));
404
- memcpy_far(get_global_seg(), vparam_g->actl_regs
405
- , get_global_seg(), GET_GLOBAL(stdmode_g->actl_regs)
406
- , ARRAY_SIZE(vparam_g->actl_regs));
407
- memcpy_far(get_global_seg(), vparam_g->grdc_regs
408
- , get_global_seg(), GET_GLOBAL(stdmode_g->grdc_regs)
409
- , ARRAY_SIZE(vparam_g->grdc_regs));
410
- }
411
-
412
- // Fill available legacy modes in video_func_static table
413
- u32 modes = 0;
414
- for (i = 0; i < ARRAY_SIZE(vga_modes); i++) {
415
- u16 mode = vga_modes[i].mode;
416
- if (mode <= 0x13)
417
- modes |= 1<<i;
418
- }
419
- SET_VGA(static_functionality.modes, modes);
420
- }
421
-
422
- void
423
- stdvga_override_crtc(int mode, u8 *crtc)
424
- {
425
- struct vgamode_s *vmode_g = stdvga_find_mode(mode);
426
- if (!vmode_g)
427
- return;
428
- struct stdvga_mode_s *stdmode_g = container_of(
429
- vmode_g, struct stdvga_mode_s, info);
430
- SET_VGA(stdmode_g->crtc_regs, crtc);
431
- }
432
-
433
- static void
434
- clear_screen(struct vgamode_s *vmode_g)
435
- {
436
- switch (GET_GLOBAL(vmode_g->memmodel)) {
437
- case MM_TEXT:
438
- memset16_far(GET_GLOBAL(vmode_g->sstart), 0, 0x0720, 32*1024);
439
- break;
440
- case MM_CGA:
441
- memset16_far(GET_GLOBAL(vmode_g->sstart), 0, 0x0000, 32*1024);
442
- break;
443
- default:
444
- // XXX - old code gets/sets/restores sequ register 2 to 0xf -
445
- // but it should always be 0xf anyway.
446
- memset16_far(GET_GLOBAL(vmode_g->sstart), 0, 0x0000, 64*1024);
447
- }
448
- }
449
-
450
- int
451
- stdvga_set_mode(struct vgamode_s *vmode_g, int flags)
452
- {
453
- if (! is_stdvga_mode(vmode_g)) {
454
- warn_internalerror();
455
- return -1;
456
- }
457
- struct stdvga_mode_s *stdmode_g = container_of(
458
- vmode_g, struct stdvga_mode_s, info);
459
-
460
- // if palette loading (bit 3 of modeset ctl = 0)
461
- if (!(flags & MF_NOPALETTE)) { // Set the PEL mask
462
- stdvga_pelmask_write(GET_GLOBAL(stdmode_g->pelmask));
463
-
464
- // From which palette
465
- u8 *palette_g = GET_GLOBAL(stdmode_g->dac);
466
- u16 palsize = GET_GLOBAL(stdmode_g->dacsize) / 3;
467
-
468
- // Always 256*3 values
469
- stdvga_dac_write(get_global_seg(), palette_g, 0, palsize);
470
- int i;
471
- for (i = palsize; i < 0x0100; i++) {
472
- static u8 rgb[3] VAR16;
473
- stdvga_dac_write(get_global_seg(), rgb, i, 1);
474
- }
475
-
476
- if (flags & MF_GRAYSUM)
477
- stdvga_perform_gray_scale_summing(0x00, 0x100);
478
- }
479
-
480
- // Set Attribute Ctl
481
- u8 *regs = GET_GLOBAL(stdmode_g->actl_regs);
482
- int i;
483
- for (i = 0; i <= 0x13; i++)
484
- stdvga_attr_write(i, GET_GLOBAL(regs[i]));
485
- stdvga_attr_write(0x14, 0x00);
486
-
487
- // Set Sequencer Ctl
488
- stdvga_sequ_write(0x00, 0x03);
489
- regs = GET_GLOBAL(stdmode_g->sequ_regs);
490
- for (i = 1; i <= 4; i++)
491
- stdvga_sequ_write(i, GET_GLOBAL(regs[i - 1]));
492
-
493
- // Set Grafx Ctl
494
- regs = GET_GLOBAL(stdmode_g->grdc_regs);
495
- for (i = 0; i <= 8; i++)
496
- stdvga_grdc_write(i, GET_GLOBAL(regs[i]));
497
-
498
- // Set CRTC address VGA or MDA
499
- u8 miscreg = GET_GLOBAL(stdmode_g->miscreg);
500
- u16 crtc_addr = VGAREG_VGA_CRTC_ADDRESS;
501
- if (!(miscreg & 1))
502
- crtc_addr = VGAREG_MDA_CRTC_ADDRESS;
503
-
504
- // Disable CRTC write protection
505
- stdvga_crtc_write(crtc_addr, 0x11, 0x00);
506
- // Set CRTC regs
507
- regs = GET_GLOBAL(stdmode_g->crtc_regs);
508
- for (i = 0; i <= 0x18; i++)
509
- stdvga_crtc_write(crtc_addr, i, GET_GLOBAL(regs[i]));
510
-
511
- // Set the misc register
512
- stdvga_misc_write(miscreg);
513
-
514
- // Enable video
515
- stdvga_attrindex_write(0x20);
516
-
517
- // Clear screen
518
- if (!(flags & MF_NOCLEARMEM))
519
- clear_screen(vmode_g);
520
-
521
- // Write the fonts in memory
522
- u8 memmodel = GET_GLOBAL(vmode_g->memmodel);
523
- if (memmodel == MM_TEXT)
524
- stdvga_load_font(get_global_seg(), vgafont16, 0x100, 0, 0, 16);
525
-
526
- return 0;
527
- }
528
-
529
- // Load the standard palette associated with 8bpp packed pixel vga modes.
530
- void
531
- stdvga_set_packed_palette(void)
532
- {
533
- stdvga_dac_write(get_global_seg(), palette3, 0, sizeof(palette3) / 3);
534
- }
@@ -1,96 +0,0 @@
1
- // Virtual software based cursor support
2
- //
3
- // Copyright (C) 2014-2016 Kevin O'Connor <kevin@koconnor.net>
4
- //
5
- // This file may be distributed under the terms of the GNU LGPLv3 license.
6
-
7
- #include "biosvar.h" // GET_BDA
8
- #include "bregs.h" // struct bregs
9
- #include "vgabios.h" // get_cursor_pos
10
- #include "vgafb.h" // handle_gfx_op
11
- #include "vgautil.h" // swcursor_check_event
12
-
13
- // Draw/undraw a cursor on the framebuffer by xor'ing the cursor cell
14
- static void
15
- gfx_set_swcursor(struct vgamode_s *vmode_g, int enable, struct cursorpos cp)
16
- {
17
- u16 cursor_type = get_cursor_shape();
18
- u8 start = cursor_type >> 8, end = cursor_type & 0xff;
19
- struct gfx_op op;
20
- init_gfx_op(&op, vmode_g);
21
- op.x = cp.x * 8;
22
- int cheight = GET_BDA(char_height);
23
- op.y = cp.y * cheight + start;
24
-
25
- int i;
26
- for (i = start; i < cheight && i <= end; i++, op.y++) {
27
- op.op = GO_READ8;
28
- handle_gfx_op(&op);
29
- int j;
30
- for (j = 0; j < 8; j++)
31
- op.pixels[j] ^= 0x07;
32
- op.op = GO_WRITE8;
33
- handle_gfx_op(&op);
34
- }
35
- }
36
-
37
- // Draw/undraw a cursor on the screen
38
- static void
39
- set_swcursor(int enable)
40
- {
41
- u8 flags = GET_BDA_EXT(flags);
42
- if (!!(flags & BF_SWCURSOR) == enable)
43
- // Already in requested mode.
44
- return;
45
- struct vgamode_s *vmode_g = get_current_mode();
46
- if (!vmode_g)
47
- return;
48
- struct cursorpos cp = get_cursor_pos(GET_BDA(video_page));
49
- if (cp.x >= GET_BDA(video_cols) || cp.y > GET_BDA(video_rows)
50
- || GET_BDA(cursor_type) >= 0x2000)
51
- // Cursor not visible
52
- return;
53
-
54
- SET_BDA_EXT(flags, (flags & ~BF_SWCURSOR) | (enable ? BF_SWCURSOR : 0));
55
-
56
- if (GET_GLOBAL(vmode_g->memmodel) != MM_TEXT) {
57
- gfx_set_swcursor(vmode_g, enable, cp);
58
- return;
59
- }
60
-
61
- // In text mode, swap foreground and background attributes for cursor
62
- void *dest_far = text_address(cp) + 1;
63
- u8 attr = GET_FARVAR(GET_GLOBAL(vmode_g->sstart), *(u8*)dest_far);
64
- attr = (attr >> 4) | (attr << 4);
65
- SET_FARVAR(GET_GLOBAL(vmode_g->sstart), *(u8*)dest_far, attr);
66
- }
67
-
68
- // Disable virtual cursor if a vgabios call accesses the framebuffer
69
- void
70
- swcursor_pre_handle10(struct bregs *regs)
71
- {
72
- if (!vga_emulate_text())
73
- return;
74
- switch (regs->ah) {
75
- case 0x4f:
76
- if (!CONFIG_VGA_VBE || regs->al != 0x02)
77
- break;
78
- // NO BREAK
79
- case 0x00 ... 0x02:
80
- case 0x05 ... 0x0e:
81
- case 0x13:
82
- set_swcursor(0);
83
- break;
84
- default:
85
- break;
86
- }
87
- }
88
-
89
- // Called by periodic (18.2hz) timer
90
- void
91
- swcursor_check_event(void)
92
- {
93
- if (!vga_emulate_text())
94
- return;
95
- set_swcursor(GET_BDA(timer_counter) % 18 < 9);
96
- }