mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 01:31:42 +00:00
Merge branch 'master' into MacInsertUI
This commit is contained in:
commit
832939f5b7
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ template <bool is_iie> class ConcreteMachine:
|
||||
|
||||
std::vector<std::unique_ptr<Inputs::Joystick>> joysticks_;
|
||||
bool analogue_channel_is_discharged(size_t channel) {
|
||||
return static_cast<Joystick *>(joysticks_[channel >> 1].get())->axes[channel & 1] < analogue_charge_ + analogue_biases_[channel];
|
||||
return (1.0f - static_cast<Joystick *>(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 <bool is_iie> 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 <bool is_iie> 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 <bool is_iie> 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 <bool is_iie> 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_) {
|
||||
|
@ -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)|
|
||||
|
||||
<img src="READMEImages/ReptonInterlaced.gif" height=600 alt="Repton title screen, interlaced">
|
||||
<img src="READMEImages/ReptonInterlaced.gif" height=400 alt="Repton title screen, interlaced"> <img src="READMEImages/AppleIIPrinceOfPersia.png" height=400 alt="Apple IIe Prince of Persia">
|
||||
|
||||
## Low Latency
|
||||
|
||||
|
BIN
READMEImages/AppleIIPrinceOfPersia.png
Normal file
BIN
READMEImages/AppleIIPrinceOfPersia.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 451 KiB |
Loading…
Reference in New Issue
Block a user