Hi,

While trying to run AROS (http://www.aros.org) under VBox, I've come
across a problem with mode 2 of the timer. It counts down from its initial
value to 1, but does not then reload the initial value. Instead, it stays
at 1.

This is the code used by AROS to initialise the timer:

    /* Start the timer2 */
    outb((inb(0x61) & 0xfd) | 1, 0x61); /* Enable the timer (set GATE on) 
*/
    outb(0xb4, 0x43);   /* Binary mode on Timer2, count mode 2 */
    outb(0x00, 0x42);   /* We're counting whole range */
    outb(0x00, 0x42);

And this is the code used to read the timer's value:

    /* Latch the current time value */
    outb(0x80, 0x43);

    /* Read out current 16-bit time */
    time = inb(0x42);
    time += inb(0x42) << 8;

This works on real machines and on several other emulators. I don't know
if it's much different from what other OSs do.

Regards,
Neil

_______________________________________________
vbox-users mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-users

Reply via email to