From 86a09b5e7ddccd65bd7dac8bd8090ef232d578ae Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 29 Feb 2020 22:31:45 -0500 Subject: [PATCH] Slightly improves ZX80 and ZX81 typing speed. --- Machines/ZX8081/Keyboard.cpp | 4 ++++ Machines/ZX8081/Keyboard.hpp | 2 ++ Machines/ZX8081/ZX8081.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Machines/ZX8081/Keyboard.cpp b/Machines/ZX8081/Keyboard.cpp index f8bc3f5a4..a84fac93d 100644 --- a/Machines/ZX8081/Keyboard.cpp +++ b/Machines/ZX8081/Keyboard.cpp @@ -179,3 +179,7 @@ uint16_t *CharacterMapper::sequence_for_character(char character) { else return table_lookup_sequence_for_character(zx80_key_sequences, sizeof(zx80_key_sequences), character); } + +bool CharacterMapper::needs_pause_after_key(uint16_t key) { + return key != KeyShift; +} diff --git a/Machines/ZX8081/Keyboard.hpp b/Machines/ZX8081/Keyboard.hpp index da878d61e..53482542f 100644 --- a/Machines/ZX8081/Keyboard.hpp +++ b/Machines/ZX8081/Keyboard.hpp @@ -34,6 +34,8 @@ class CharacterMapper: public ::Utility::CharacterMapper { CharacterMapper(bool is_zx81); uint16_t *sequence_for_character(char character) override; + bool needs_pause_after_key(uint16_t key) override; + private: bool is_zx81_; }; diff --git a/Machines/ZX8081/ZX8081.cpp b/Machines/ZX8081/ZX8081.cpp index bc2ec98c3..9c67055bc 100644 --- a/Machines/ZX8081/ZX8081.cpp +++ b/Machines/ZX8081/ZX8081.cpp @@ -382,7 +382,7 @@ template class ConcreteMachine: } HalfCycles get_typer_frequency() final { - return Cycles(390'000); + return Cycles(146'250); } KeyboardMapper *get_keyboard_mapper() final {