diff --git a/Machines/Oric/Video.cpp b/Machines/Oric/Video.cpp
index ba2b25c07..ec31bd1a6 100644
--- a/Machines/Oric/Video.cpp
+++ b/Machines/Oric/Video.cpp
@@ -116,7 +116,7 @@ void VideoOutput::run_for_cycles(int number_of_cycles)
}
uint8_t inverse_mask = (control_byte & 0x80) ? 0x77 : 0x00;
- if(_blink_text) inverse_mask ^= (_frame_counter&32) ? 0x77 : 0x00;
+ if(_blink_text && (_frame_counter&32)) pixels = 0;
if(control_byte & 0x60)
{
diff --git a/OSBindings/Mac/Clock Signal/Base.lproj/Atari2600Options.xib b/OSBindings/Mac/Clock Signal/Base.lproj/Atari2600Options.xib
index 50926faf4..875298900 100644
--- a/OSBindings/Mac/Clock Signal/Base.lproj/Atari2600Options.xib
+++ b/OSBindings/Mac/Clock Signal/Base.lproj/Atari2600Options.xib
@@ -12,12 +12,10 @@
-
+
-
-
diff --git a/OSBindings/Mac/Clock Signal/Base.lproj/ElectronOptions.xib b/OSBindings/Mac/Clock Signal/Base.lproj/ElectronOptions.xib
index 20ebefd9a..2e05438f5 100644
--- a/OSBindings/Mac/Clock Signal/Base.lproj/ElectronOptions.xib
+++ b/OSBindings/Mac/Clock Signal/Base.lproj/ElectronOptions.xib
@@ -16,8 +16,6 @@
-
-
diff --git a/OSBindings/Mac/Clock Signal/Base.lproj/MachineDocument.xib b/OSBindings/Mac/Clock Signal/Base.lproj/MachineDocument.xib
index ba4710992..5dd259d78 100644
--- a/OSBindings/Mac/Clock Signal/Base.lproj/MachineDocument.xib
+++ b/OSBindings/Mac/Clock Signal/Base.lproj/MachineDocument.xib
@@ -36,6 +36,7 @@
+
diff --git a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift
index 8f54d6884..193c7bc31 100644
--- a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift
+++ b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift
@@ -67,6 +67,9 @@ class MachineDocument:
setupClockRate()
self.machine.delegate = self
self.optionsPanel?.establishStoredOptions()
+
+ // bring OpenGL view-holding window on top of the options panel
+ self.openGLView.window!.makeKeyAndOrderFront(self)
}
func machineDidChangeClockRate(_ machine: CSMachine!) {
diff --git a/Storage/Tape/Formats/OricTAP.cpp b/Storage/Tape/Formats/OricTAP.cpp
index f36a8cca6..95bbb349f 100644
--- a/Storage/Tape/Formats/OricTAP.cpp
+++ b/Storage/Tape/Formats/OricTAP.cpp
@@ -42,7 +42,7 @@ OricTAP::~OricTAP()
void OricTAP::virtual_reset()
{
-// fseek(_file, 0, SEEK_SET);
+ fseek(_file, 0, SEEK_SET);
_bit_count = 13;
_phase = _next_phase = LeadIn;
_phase_counter = 0;
@@ -69,6 +69,10 @@ Tape::Pulse OricTAP::virtual_get_next_pulse()
_phase_counter++;
if(_phase_counter == 259) // 256 artificial bytes plus the three in the file = 259
{
+ while(1)
+ {
+ if(fgetc(_file) != 0x16) break;
+ }
_next_phase = Header;
}
break;
@@ -106,20 +110,18 @@ Tape::Pulse OricTAP::virtual_get_next_pulse()
case Data:
next_byte = (uint8_t)fgetc(_file);
- if(feof(_file)) _phase = End;
-// _phase_counter++;
-// if(_phase_counter == (_data_end_address - _data_start_address)+1)
-// {
-// _phase_counter = 0;
-// if((size_t)ftell(_file) == _file_length)
-// {
-// _next_phase = End;
-// }
-// else
-// {
-// _next_phase = LeadIn;
-// }
-// }
+ _phase_counter++;
+ if(_phase_counter >= (_data_end_address - _data_start_address)+1)
+ {
+ if(next_byte == 0x16)
+ {
+ _next_phase = LeadIn;
+ }
+ else if(feof(_file))
+ {
+ _next_phase = End;
+ }
+ }
break;
case End:
@@ -148,8 +150,10 @@ Tape::Pulse OricTAP::virtual_get_next_pulse()
return pulse;
case Gap:
- next_bit = 1;
- break;
+ _bit_count = 13;
+ pulse.type = Pulse::Zero;
+ pulse.length.length = 100;
+ return pulse;
default:
next_bit = _current_value & 1;
diff --git a/Storage/Tape/Formats/OricTAP.hpp b/Storage/Tape/Formats/OricTAP.hpp
index af3eaf7f4..f425b6541 100644
--- a/Storage/Tape/Formats/OricTAP.hpp
+++ b/Storage/Tape/Formats/OricTAP.hpp
@@ -42,14 +42,15 @@ class OricTAP: public Tape {
FILE *_file;
size_t _file_length;
+ // byte serialisation and output
uint16_t _current_value;
int _bit_count;
int _pulse_counter;
- int _phase_counter;
enum Phase {
LeadIn, Header, Data, Gap, End
} _phase, _next_phase;
+ int _phase_counter;
uint16_t _data_end_address, _data_start_address;
};