6 ms·
Very cool! I have to ask: what would the total size be if the package included the bios functions? Also: what could be done if the size limit were 8kbyte like
by mycatisblack 1y ago
Very cool!
I have to ask: what would the total size be if the package included the bios functions?
Also: what could be done if the size limit were 8kbyte like the mask-rom bios days?
Thanks for pointing me towards the bosh emulator.
- shikaan 1y agoHey, thanks for taking a look! On the former, I have no idea how to estimate BIOS functions size. Maybe I could just peek into an image and get a sense for it... On the latter, with a 16x increase in available space, I guess I would do a much more thorough work in putting guardrails in place. The API currently comes with a couple of traps (e.g., file names can be duplicated, processes are cooperative, all file operations perform disk I/O...) and it essentially requires guest applications to know about BIOS services in order to function. Another sticky point I wish I had the space to address better are calling conventions, which I had to get rid of almost immediately to save on instructions. > Thanks for pointing me towards the bosh emulator. You're welcome! Bochs is such a nice tool which I discovered only for this project as well. It was a no-brainer, since I got no way to debug 16-bit assembly from QEMU (unless you go off and fork it[1]) [1]: https://gist.github.com/Theldus/4e1efc07ec13fb84fa10c2f3d054dccd https://gist.github.com/Theldus/4e1efc07ec13fb84fa10c2f3d054...
- userbinator 1y agowhat would the total size be if the package included the bios functions? Probably a few dozen to over a hundred KB, maybe even over a MB, depending on the era of machine and what it has installed; e.g. the GPU option ROM would be included if you use int 10h, int 13h might be hooked by a disk adapter, and if you use int 16h to read from a USB keyboard, that'll go through the BIOS' USB stack which normally includes some code in SMM too.