Changeset 14742 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Nov 27, 2008 8:49:11 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevPit-i8254.cpp
r14707 r14742 75 75 * Define this to flip the 15usec refresh bit on every read. 76 76 * If not defined, it will be flipped correctly. */ 77 #define FAKE_REFRESH_CLOCK 77 /* #define FAKE_REFRESH_CLOCK */ 78 78 #ifdef DOXYGEN_RUNNING 79 79 # define FAKE_REFRESH_CLOCK … … 648 648 /* bit 5 - mirrors timer 2 output condition. */ 649 649 const int fOut = pit_get_out(pThis, 2, u64Now); 650 /* bit 4 - toggled every with each (DRAM?) refresh request, every 15.085 µs. */ 650 /* bit 4 - toggled with each (DRAM?) refresh request, every 15085 µs. 651 our timer resolution is around 100-1000 µs, thus we can just flip 652 on every increase of quotient by 1 653 */ 651 654 #ifdef FAKE_REFRESH_CLOCK 652 655 pThis->dummy_refresh_clock ^= 1; 653 656 const int fRefresh = pThis->dummy_refresh_clock; 654 657 #else 655 /* To make refresh info statistically correct */ 656 const int freq = 15085; 657 const int fRefresh = ((u64Now % freq ) > (freq / 2)) ? 1 : 0; 658 const int fRefresh = (u64Now / 15085 ) & 1; 658 659 #endif 659 660 /* bit 2,3 NMI / parity status stuff. */
Note:
See TracChangeset
for help on using the changeset viewer.