1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-30 04:50:08 +00:00

Fixed to ensure that frame rendering wraps around, and to properly connect the Electron to its view. Now I need a working pixel shader.

This commit is contained in:
Thomas Harte 2016-01-09 20:34:22 -05:00
parent 7341f5c341
commit a900bfed65
2 changed files with 7 additions and 5 deletions

View File

@ -195,7 +195,7 @@ inline void Machine::update_display()
_outputPosition = end_of_hsync;
}
while(_outputPosition < _frameCycles)
while(_outputPosition >= end_of_hsync && _outputPosition < _frameCycles)
{
const int current_line = _outputPosition >> 7;
const int line_position = _outputPosition & 127;
@ -215,7 +215,7 @@ inline void Machine::update_display()
if(line_position == 9)
{
_crt->output_blank(119 * crt_cycles_multiplier);
_outputPosition += 119;
_outputPosition = (_outputPosition + 119) % cycles_per_frame;;
}
}
else

View File

@ -23,9 +23,11 @@ class ElectronDocument: MachineDocument {
}
}
// override func windowControllerDidLoadNib(aController: NSWindowController) {
// super.windowControllerDidLoadNib(aController)
// }
override func windowControllerDidLoadNib(aController: NSWindowController) {
super.windowControllerDidLoadNib(aController)
electron.view = openGLView
// openGLView.frameBounds = CGRectMake(0.1, 0.1, 0.8, 0.8)
}
override var windowNibName: String? {
return "ElectronDocument"