Difference between revisions of "83:Ports:04"
From WikiTI
(memory mapping) |
|||
Line 11: | Line 11: | ||
=== Write Values === | === Write Values === | ||
− | * Bit 0 | + | * Bit 0 controls the [[83:OS:Memory Mapping|memory mapping mode]]. The default value for this bit is 0. |
− | + | * Bits 1 and 2 control the hardware timer frequency. Setting both 0 sets the timer to the fastest speed, and both 1 is the slowest speed. The default is with both bits 1. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | * Bits 1 and 2 control the hardware timer frequency. Setting both 0 sets the timer to the fastest speed, and both 1 is the slowest speed. The | + | |
* Bit 3: Unused? Always 0. | * Bit 3: Unused? Always 0. | ||
* Bit 4: Timer frequency multiplier; when this bit is set, all the times are multiplied by 90% (i. e. it's 11.1% faster) compared to when it's reset. | * Bit 4: Timer frequency multiplier; when this bit is set, all the times are multiplied by 90% (i. e. it's 11.1% faster) compared to when it's reset. | ||
Line 27: | Line 18: | ||
== Comments == | == Comments == | ||
− | |||
− | |||
To calculate the resulting timer frequency you can use the following formula: | To calculate the resulting timer frequency you can use the following formula: | ||
freq = 1800 * ((out_value & 0x10) ? 1.0 : 0.9) / (3 + ((out_value & 0x06) << 1)) | freq = 1800 * ((out_value & 0x10) ? 1.0 : 0.9) / (3 + ((out_value & 0x06) << 1)) |
Revision as of 12:36, 28 April 2005
Synopsis
Port Number: 04h
Function: Timer Interrupt Frequency and Memory Map Control
This port controls the frequency of the hardware timer and the memory map mode.
Read Values
This is a mirror of the link port.
Write Values
- Bit 0 controls the memory mapping mode. The default value for this bit is 0.
- Bits 1 and 2 control the hardware timer frequency. Setting both 0 sets the timer to the fastest speed, and both 1 is the slowest speed. The default is with both bits 1.
- Bit 3: Unused? Always 0.
- Bit 4: Timer frequency multiplier; when this bit is set, all the times are multiplied by 90% (i. e. it's 11.1% faster) compared to when it's reset.
- Bit 5-7: Unknown, but definitely used.
Comments
To calculate the resulting timer frequency you can use the following formula:
freq = 1800 * ((out_value & 0x10) ? 1.0 : 0.9) / (3 + ((out_value & 0x06) << 1))