mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
Fixed: timing issue versus supplied test ROM was failure to include the Plus 1 ROM in the mix.
This commit is contained in:
parent
763d5e8819
commit
cfa616d593
3
.gitignore
vendored
3
.gitignore
vendored
@ -18,6 +18,9 @@ DerivedData
|
||||
*.xcuserstate
|
||||
.DS_Store
|
||||
|
||||
# Exclude Electron ROMs
|
||||
OSBindings/Mac/Clock Signal/Resources/Electron/*
|
||||
|
||||
# CocoaPods
|
||||
#
|
||||
# We recommend against adding the Pods directory to your .gitignore. However
|
||||
|
@ -28,7 +28,7 @@ namespace {
|
||||
static const unsigned int first_graphics_cycle = 33;
|
||||
|
||||
static const unsigned int real_time_clock_interrupt_line = 100;
|
||||
static const unsigned int display_end_interrupt_line = 264;
|
||||
static const unsigned int display_end_interrupt_line = 255;
|
||||
}
|
||||
|
||||
#define graphics_line(v) ((((v) >> 7) - first_graphics_line + field_divider_line) % field_divider_line)
|
||||
@ -293,8 +293,9 @@ unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uin
|
||||
// printf("%04x: %02x (%d)\n", address, *value, _fieldCycles);
|
||||
// }
|
||||
|
||||
const unsigned int line_before_cycle = graphics_line(_frameCycles);
|
||||
const unsigned int line_after_cycle = graphics_line(_frameCycles + cycles);
|
||||
const unsigned int pixel_line_clock = _frameCycles + 128 - first_graphics_cycle + 80;
|
||||
const unsigned int line_before_cycle = graphics_line(pixel_line_clock);
|
||||
const unsigned int line_after_cycle = graphics_line(pixel_line_clock + cycles);
|
||||
|
||||
// implicit assumption here: the number of 2Mhz cycles this bus operation will take
|
||||
// is never longer than a line. On the Electron, it's a safe one.
|
||||
|
@ -308,6 +308,7 @@
|
||||
4BBF99161C8FBA6F0075DAFB /* CRTRunBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BBF990C1C8FBA6F0075DAFB /* CRTRunBuilder.cpp */; };
|
||||
4BBF99171C8FBA6F0075DAFB /* Shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BBF99101C8FBA6F0075DAFB /* Shader.cpp */; };
|
||||
4BBF99181C8FBA6F0075DAFB /* TextureTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BBF99121C8FBA6F0075DAFB /* TextureTarget.cpp */; };
|
||||
4BCB70B41C947DDC005B1712 /* plus1.rom in Resources */ = {isa = PBXBuildFile; fileRef = 4BCB70B31C947DDC005B1712 /* plus1.rom */; };
|
||||
4BE5F85E1C3E1C2500C43F01 /* basic.rom in Resources */ = {isa = PBXBuildFile; fileRef = 4BE5F85C1C3E1C2500C43F01 /* basic.rom */; };
|
||||
4BE5F85F1C3E1C2500C43F01 /* os.rom in Resources */ = {isa = PBXBuildFile; fileRef = 4BE5F85D1C3E1C2500C43F01 /* os.rom */; };
|
||||
/* End PBXBuildFile section */
|
||||
@ -665,6 +666,7 @@
|
||||
4BBF99121C8FBA6F0075DAFB /* TextureTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextureTarget.cpp; sourceTree = "<group>"; };
|
||||
4BBF99131C8FBA6F0075DAFB /* TextureTarget.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = TextureTarget.hpp; sourceTree = "<group>"; };
|
||||
4BBF99191C8FC2750075DAFB /* CRTTypes.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = CRTTypes.hpp; sourceTree = "<group>"; };
|
||||
4BCB70B31C947DDC005B1712 /* plus1.rom */ = {isa = PBXFileReference; lastKnownFileType = file; path = plus1.rom; sourceTree = "<group>"; };
|
||||
4BE5F85C1C3E1C2500C43F01 /* basic.rom */ = {isa = PBXFileReference; lastKnownFileType = file; path = basic.rom; sourceTree = "<group>"; };
|
||||
4BE5F85D1C3E1C2500C43F01 /* os.rom */ = {isa = PBXFileReference; lastKnownFileType = file; path = os.rom; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@ -1221,6 +1223,7 @@
|
||||
4BE5F85B1C3E1C2500C43F01 /* Electron */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BCB70B31C947DDC005B1712 /* plus1.rom */,
|
||||
4BE5F85C1C3E1C2500C43F01 /* basic.rom */,
|
||||
4BE5F85D1C3E1C2500C43F01 /* os.rom */,
|
||||
);
|
||||
@ -1339,6 +1342,7 @@
|
||||
4B2E2D951C399D1200138695 /* ElectronDocument.xib in Resources */,
|
||||
4BB73EA91B587A5100552FC2 /* Assets.xcassets in Resources */,
|
||||
4BE5F85F1C3E1C2500C43F01 /* os.rom in Resources */,
|
||||
4BCB70B41C947DDC005B1712 /* plus1.rom in Resources */,
|
||||
4BB73EA71B587A5100552FC2 /* Atari2600Document.xib in Resources */,
|
||||
4BB73EAC1B587A5100552FC2 /* MainMenu.xib in Resources */,
|
||||
4BE5F85E1C3E1C2500C43F01 /* basic.rom in Resources */,
|
||||
|
@ -52,6 +52,9 @@ class ElectronDocument: MachineDocument {
|
||||
}
|
||||
|
||||
override func readFromData(data: NSData, ofType typeName: String) throws {
|
||||
if let plus1Path = NSBundle.mainBundle().pathForResource("plus1", ofType: "rom") {
|
||||
electron.setROM(NSData(contentsOfFile: plus1Path)!, slot: 12)
|
||||
}
|
||||
electron.setROM(data, slot: 15)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user