diff --git a/Inputs/Joystick.hpp b/Inputs/Joystick.hpp index 614cce01c..d86d9ac04 100644 --- a/Inputs/Joystick.hpp +++ b/Inputs/Joystick.hpp @@ -186,10 +186,10 @@ class ConcreteJoystick: public Joystick { using Type = Joystick::Input::Type; switch(input.type) { default: did_set_input(input, is_active ? 1.0f : 0.0f); break; - case Type::Left: did_set_input(Input(Type::Horizontal, input.info.control.index), is_active ? 0.25f : 0.5f); break; - case Type::Right: did_set_input(Input(Type::Horizontal, input.info.control.index), is_active ? 0.75f : 0.5f); break; - case Type::Up: did_set_input(Input(Type::Vertical, input.info.control.index), is_active ? 0.25f : 0.5f); break; - case Type::Down: did_set_input(Input(Type::Vertical, input.info.control.index), is_active ? 0.75f : 0.5f); break; + case Type::Left: did_set_input(Input(Type::Horizontal, input.info.control.index), is_active ? 0.1f : 0.5f); break; + case Type::Right: did_set_input(Input(Type::Horizontal, input.info.control.index), is_active ? 0.9f : 0.5f); break; + case Type::Up: did_set_input(Input(Type::Vertical, input.info.control.index), is_active ? 0.1f : 0.5f); break; + case Type::Down: did_set_input(Input(Type::Vertical, input.info.control.index), is_active ? 0.9f : 0.5f); break; } } diff --git a/Machines/AppleII/AppleII.cpp b/Machines/AppleII/AppleII.cpp index c8228009e..e2c3c26f1 100644 --- a/Machines/AppleII/AppleII.cpp +++ b/Machines/AppleII/AppleII.cpp @@ -289,7 +289,7 @@ template class ConcreteMachine: std::vector> joysticks_; bool analogue_channel_is_discharged(size_t channel) { - return static_cast(joysticks_[channel >> 1].get())->axes[channel & 1] < analogue_charge_ + analogue_biases_[channel]; + return (1.0f - static_cast(joysticks_[channel >> 1].get())->axes[channel & 1]) < analogue_charge_ + analogue_biases_[channel]; } // The IIe has three keys that are wired directly to the same input as the joystick buttons. @@ -492,7 +492,7 @@ template class ConcreteMachine: case 0xc067: { // Analogue input 3. const size_t input = address - 0xc064; *value &= 0x7f; - if(analogue_channel_is_discharged(input)) { + if(!analogue_channel_is_discharged(input)) { *value |= 0x80; } } break; @@ -519,10 +519,11 @@ template class ConcreteMachine: // Write-only switches. All IIe as currently implemented. if(is_iie) { switch(address) { - default: break; + default: printf("Write %04x?\n", address); break; case 0xc000: case 0xc001: + update_video(); video_->set_80_store(!!(address&1)); set_main_paging(); break; @@ -561,13 +562,16 @@ template class ConcreteMachine: break; case 0xc00c: - case 0xc00d: video_->set_80_columns(!!(address&1)); break; + case 0xc00d: + update_video(); + video_->set_80_columns(!!(address&1)); + break; case 0xc00e: - case 0xc00f: video_->set_alternative_character_set(!!(address&1)); break; - - case 0xc05e: - case 0xc05f: video_->set_double_high_resolution(!(address&1)); break; + case 0xc00f: + update_video(); + video_->set_alternative_character_set(!!(address&1)); + break; } } } @@ -606,6 +610,14 @@ template class ConcreteMachine: set_main_paging(); break; + case 0xc05e: + case 0xc05f: + if(is_iie) { + update_video(); + video_->set_double_high_resolution(!(address&1)); + } + break; + case 0xc010: keyboard_input_ &= 0x7f; if(string_serialiser_) { diff --git a/README.md b/README.md index b858df299..dbfb691bf 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Clock Signal Clock Signal ('CLK') is an emulator for tourists that seeks to be invisible. Users directly launch classic software with no emulator or per-emulated-machine learning curve. -[Releases](https://github.com/TomHarte/CLK/releases) are hosted on Github. +[Releases](https://github.com/TomHarte/CLK/releases) are hosted on GitHub. On the Mac it is a native Cocoa application. Under Linux, BSD and other UNIXes and UNIX-alikes it relies upon SDL 2. @@ -54,7 +54,7 @@ If your machine has a 4k monitor and a 96Khz audio output? Then you'll get a 4k |![Amstrad text, with a classic 1:1 pixel emulation](READMEImages/NaiveCPC.png)|![Amstrad text, with correct aspect ratio and subject to a lowpass filter](READMEImages/FilteredCPC.png)| |![The Amstrad CPC version of Stormlord, with a classic 1:1 pixel emulation](READMEImages/NaiveCPCStormlord.png)|![The Amstrad CPC version of Stormlord, with correct aspect ratio and subject to a lowpass filter](READMEImages/CPCStormlord.png)| -Repton title screen, interlaced +Repton title screen, interlaced Apple IIe Prince of Persia ## Low Latency diff --git a/READMEImages/AppleIIPrinceOfPersia.png b/READMEImages/AppleIIPrinceOfPersia.png new file mode 100644 index 000000000..0079f0d4e Binary files /dev/null and b/READMEImages/AppleIIPrinceOfPersia.png differ