PIT Question under Bochs
PIT Question under Bochs
I've been using the following code to implement the PIT in my Kernel http://www.osdever.net/bkerndev/Docs/pit.htm the thing is the comments in the code suggest that 18 ticks should be equal to one second with the default phase. Now I've tried both with the default phase and with a phase of 100Hz using the phase changing code also included in that tutorial but both seem to be off by a magnitude of 10 when run under Bochs (E.G. It's actually 180 ticks or 1000 ticks per second). So is Bochs simulating too fast or are the code comments incorrect?
Re:PIT Question under Bochs
I'm going to go for "you didn't configure bochs". Did you tell bochs how fast to simulate? Do you happen to make about 10 million IPS? That pretty much explains it. You can recompile bochs to use your real computers timing for those events, which make them more predictable but they do make your output non-repeatable.elaverick wrote: So is Bochs simulating too fast or are the code comments incorrect?
Re:PIT Question under Bochs
Perfect, thanks. I'd missed it the first time I'd configured Bochs, I'd assumed it would run in real time by default. Another case of RTFM I'm afraid.