mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-23 11:30:24 +00:00
Stores expected bit length.
This commit is contained in:
parent
48d837c636
commit
da2b190288
@ -175,7 +175,15 @@ void IWM::write(int address, uint8_t input) {
|
||||
bit 6: 1 = MZ-reset.
|
||||
bit 7: reserved for future expansion.
|
||||
*/
|
||||
|
||||
mode_ = input;
|
||||
|
||||
switch(mode_ & 0x18) {
|
||||
case 0x00: bit_length_ = Cycles(24); break; // slow mode, 7Mhz
|
||||
case 0x08: bit_length_ = Cycles(12); break; // fast mode, 7Mhz
|
||||
case 0x10: bit_length_ = Cycles(32); break; // slow mode, 8Mhz
|
||||
case 0x18: bit_length_ = Cycles(16); break; // fast mode, 8Mhz
|
||||
}
|
||||
printf("IWM mode is now %02x\n", mode_);
|
||||
break;
|
||||
|
||||
|
@ -53,6 +53,8 @@ class IWM {
|
||||
Cycles cycles_until_motor_off_;
|
||||
|
||||
void access(int address);
|
||||
|
||||
Cycles bit_length_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user