Closed ghaerr closed 3 years ago
Note: the check fail is the result of PLATFORM=emscripten in config.mk. I left that in so that the PR could be easily used to reproduce #41. It will be changed before merge.
Last commit fixes all problems in #41.
This PR is ready for merge.
Hello @ghaerr, just for my understanding : how did you compute the timer max value ? Based on the average number of instructions per second of a 5 MHz 8086 ?
Hi @mfld-fr, yes, originally I did a quick computation.
But those values got changed when I was building the SDL/Emscripten support and we should recalculate to make sure we have a reasonable timer interrupt value based on instruction count. I think my original estimate was 20,000. This got changed to 3,000 with SDL and that ended up revealing the kernel/emu86 bug.
Or this timer value could be changed based on the two bytes sent to the 8254 PIT (which are not currently emulated).
At 4.77mhz and 4 cycles per average instruction = 4 / 4.77 = 0.839us per instruction byte.
OK thanks, merging it now.
This PR still contains some debugging statements useful for reproducing #41. They will be removed before merge.
Adds BIOS cursor position and scroll capabilities for ELKS; used by SDL and Emscripten backends to properly emulate ELKS when compiled with BIOS console.