1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-09 21:29:53 +00:00
Commit Graph

964 Commits

Author SHA1 Message Date
Thomas Harte
7e58648743 Corrects front-running bug, plays further with colour amplitude. 2020-09-02 15:51:48 -04:00
Thomas Harte
0f0c3e616d Tweaks some numbers.
I'm largely treading water here. Probably time to think about the race.
2020-09-02 08:17:01 -04:00
Thomas Harte
c7ce65ea4c Attempts fully to restore composite video.
Subject to some sort of nasty race condition for the time being.
2020-09-02 08:03:10 -04:00
Thomas Harte
c36247b609 Ensures reuse of offset buffers.
There seems to be some sort of epic race condition as the drawing pipeline lags though. Will need to investigate.
2020-09-01 22:11:48 -04:00
Thomas Harte
15296e43a4 Attempts correctly to set up the CPU side of a composite video pipeline, at least.
So: I think this is really close, but I'm out of time for the day.
2020-09-01 21:58:33 -04:00
Thomas Harte
f2929230a2 [Experimentally] introduces blending between computed S-Video fragments. 2020-09-01 21:37:36 -04:00
Thomas Harte
bf252b8061 Fixes sizing of buffers to the current output. 2020-09-01 21:33:54 -04:00
Thomas Harte
9e2bf2af7e Restricts S-Video processing to updated lines. 2020-09-01 21:27:40 -04:00
Thomas Harte
245f2654f0 Shifts S-Video processing into the compute shader. 2020-09-01 20:37:11 -04:00
Thomas Harte
67ca298a72 Forces a no-op compute shader into the S-Video pipeline.
The intention is to restrict the area acted over, and to do the S-Video filtering in there. Then I'll just need two such stages for composite.
2020-09-01 18:39:52 -04:00
Thomas Harte
67d4dbf91a Starts girding for a third pipeline. 2020-08-31 20:01:59 -04:00
Thomas Harte
b344269140 I think I accept the need for intermediate steps now.
This allocates storage.
2020-08-30 20:21:01 -04:00
Thomas Harte
bb547610f2 Adds commentary, shrinks some intermediate texture sizes. 2020-08-30 12:06:29 -04:00
Thomas Harte
1e1f007bb7 Possibly convinces myself that no-separation chroma/luma isn't practical.
... as appealing as it may be, were filters perfect.
2020-08-29 21:25:49 -04:00
Thomas Harte
c40d858f02 Switches back to angular stuff at input resolution; ensures all S-Video modes work.
Now to roll back onto composite. Fingers crossed!
2020-08-29 20:54:46 -04:00
Thomas Harte
3d564d85fd Proves that per-pixel sine/cos evaluation avoids phase issues.
Even in PAL mode. But I'd rather not _require_ this as it kind of negates directly-sampled input.
2020-08-29 18:53:37 -04:00
Thomas Harte
02cea40ffa Attempts to avoid introducing phase error in scanToComposition.
Also brightens S-Video up to RGB levels.
2020-08-25 22:41:37 -04:00
Thomas Harte
e502d336db Having decided that these things probably need to be separate, starts drilling down on S-Video. 2020-08-25 22:05:19 -04:00
Thomas Harte
807cb99f6d Composite angles are signed. 2020-08-23 21:39:04 -04:00
Thomas Harte
7ca0362f23 Treads water.
Difficult current question: why does the Atari 2600's display change colours as the display tries to achieve horizontal lock? Phase should be unchanged. Ergo something is amiss.
2020-08-23 21:03:26 -04:00
Thomas Harte
56c7bd242a Marginally tidies. 2020-08-22 16:38:36 -04:00
Thomas Harte
5c6112415a Sets appropriate clear colour for composition render pass. 2020-08-21 22:41:54 -04:00
Thomas Harte
bf6a0c9fc4 Achieves a return of composite colour for RGB-producing machines. 2020-08-21 22:06:36 -04:00
Thomas Harte
d54b937ab6 Starts trying to do actual composite processing. 2020-08-21 21:11:25 -04:00
Thomas Harte
7c23c32e44 Corrects composition colour phase. 2020-08-20 20:45:45 -04:00
Thomas Harte
4e21d24b5f Corrects composition colour amplitude. 2020-08-20 20:34:37 -04:00
Thomas Harte
ad6fb85fda Corrects use of composition buffer.
Something is still very obviously amiss in colour processing somewhere down the line, but the correct forms are once again visibly in evidence.
2020-08-20 20:21:28 -04:00
Thomas Harte
5dc39a5d24 Adds the composition render pass.
Albeit that something here doesn't work at present.
2020-08-19 21:56:53 -04:00
Thomas Harte
3597f687de Continues sidling towards composite & S-Video handling. 2020-08-19 21:20:06 -04:00
Thomas Harte
8811506adf Starts towards building a compound[/composition?] buffer.
I now need to discover whether I can use natural integer texture coordinates.
2020-08-17 22:10:02 -04:00
Thomas Harte
11dec6fc0f Avoids a redundant clear. 2020-08-17 22:09:15 -04:00
Thomas Harte
59c4c8233f Generalises existing scanToDisplay to add lineToDisplay. 2020-08-17 21:15:19 -04:00
Thomas Harte
9da79d2d81 Clarifies scaling logic. 2020-08-17 20:29:46 -04:00
Thomas Harte
27e8a3a1b5 Obeys modals' zoom.
Subject to an attempt at factoring aspect ratio differences.
2020-08-16 21:11:43 -04:00
Thomas Harte
745797b596 Introduces a stencil buffer plus the inter-frame clearing it allows. 2020-08-16 16:42:32 -04:00
Thomas Harte
940e9e037e Adds first_scan to LineMetadata.
Also reorders `Line` fields to match `Scan` fields, just for visual consistency.
2020-08-16 08:59:37 -04:00
Thomas Harte
512c0079a9 Makes thread safe. 2020-08-15 21:52:55 -04:00
Thomas Harte
645c29f853 Adds an intermediate buffer to correct inter-frame smoothing.
Also goes someway back to the old scan output scheduling, albeit presently with limited thread safety.
2020-08-15 21:24:10 -04:00
Thomas Harte
e55945674d Reduces main thread blocking. 2020-08-14 22:16:49 -04:00
Thomas Harte
7ac88536dd Respects machine aspect ratio.
To an extent. Doesn't currently deal with cropping of machines when the window aspect ratio is smaller.
2020-08-14 21:24:25 -04:00
Thomas Harte
230b9fc9e6 Permits multiple simultaneous scan reading ranges.
Also updates the OpenGL scan target as per the latest movements of things.
2020-08-12 22:08:41 -04:00
Thomas Harte
27ca782cac Enables blending; attempts to enable frame preservation.
The latter seems to be evidencing a double buffer at play. More investigation required.

On the plus side, the direct route is still well within GPU budget at 4k on my Core M. So a huge improvement there.
2020-08-12 19:34:07 -04:00
Thomas Harte
a136a00a2f Takes a shot at adding RGB -> S-Video and composite conversion, for all RGB types. 2020-08-11 22:11:50 -04:00
Thomas Harte
4b55df1cb4 Starts upon a macro-oriented means of RGB input function generation. 2020-08-10 22:03:39 -04:00
Thomas Harte
8374a5e579 Adds superficially correct compositeSampleLuminance8Phase8 function.
Thereby uncovering a minor error in my decoding of colour phase.
2020-08-10 21:33:59 -04:00
Thomas Harte
525233e10b Ensures all input data types are parseable in Metal.
Though now I need to think a bit more about the best way to compose signal-type conversions, and whether output-type calculations (i.e. gamma, brightness) are applied.
2020-08-10 19:47:47 -04:00
Thomas Harte
eadda6a967 Further strips OpenGL from the macOS target. 2020-08-09 22:17:27 -04:00
Thomas Harte
3d6590af89 Throws out a little more OpenGL. 2020-08-09 22:11:31 -04:00
Thomas Harte
28d933d5d6 Does just enough to get 8-bit RGB and 1-bit luminance machines to display.
Assuming an 'RGB' output.
2020-08-09 21:19:07 -04:00
Thomas Harte
a118594c8b Hacks to make RGB1 visible (in a fashion). 2020-08-09 20:45:51 -04:00
Thomas Harte
93c6105442 Corrects calculation of dirty texture area. 2020-08-09 20:45:14 -04:00
Thomas Harte
57fecdc09e Ties everything together in an attempt to display RGB scans.
I'm actually just getting a mess of pixels, but it's something!
2020-08-09 18:41:15 -04:00
Thomas Harte
f16ad8f71d Takes a shot at submitting texture changes. 2020-08-09 17:59:52 -04:00
Thomas Harte
e340685a99 Seemingly proves that proper geometry is reaching Metal by drawing scans.
No in-buffer accumulation yet, but this is progress. If I can add accumulation and stencil clearing, I'm not doing badly.
2020-08-08 23:11:44 -04:00
Thomas Harte
df89a8771c Makes an attempt to have the emulator fill the actual GPU buffers.
Not that they're drawn from correctly yet. I might first take a run at a new quick-path output route for emulated RGB displays, that just seeks to use the scans directly. No intermediate buffers. Besides probably being a good feature, it'll be a good way to ramp further up with Metal.
2020-08-08 22:49:02 -04:00
Thomas Harte
bdcf266e45 Having learnt a bit more: eliminates Metal attribute tags, switches to more natural expression of structs.
Also thereby eliminates the need for a forced alignas(4) on various structs.
2020-08-08 17:27:32 -04:00
Thomas Harte
edf41b06fd Eliminates the quad buffer.
Vertices can be adduced from vertex ID.
2020-08-08 17:12:49 -04:00
Thomas Harte
38960a08d6 Adds adjustment for display aspect ratio.
While also realising that I appear to be getting away without an MTLVertexDescriptor for Scans. Maybe OpenGL has prejudiced me, and they're actually optional for interleaved data?
2020-08-07 22:29:24 -04:00
Thomas Harte
fbda7aab23 Does just enough to get the correct (aspect ratio aside) output of scan outlines.
So, up next, can I start streaming these things?
2020-08-07 22:20:01 -04:00
Thomas Harte
c575aa0640 Adds a buffer for scans, and posts two test instances. 2020-08-07 22:03:54 -04:00
Thomas Harte
4421acef34 Gets some uniforms in on the action.
With some effort towards scans, but incompletely so.
2020-08-07 21:19:17 -04:00
Thomas Harte
219923bd63 Reduces vertex size, draws a quad. 2020-08-05 21:33:25 -04:00
Thomas Harte
7551782a25 Switches to interleaved vertex data.
This more closely relates to what I actually want to do.
2020-08-05 17:27:43 -04:00
Thomas Harte
eff24a8726 My first baby steps in Metal continue; here's a triangle. 2020-08-04 21:49:01 -04:00
Thomas Harte
72df6e52cd This is possibly at least dispatching an empty command buffer correctly. 2020-08-04 19:44:56 -04:00
Thomas Harte
e235a45abb Breaks all output.
... by switching out NSOpenGLView for MKLView with no drawing infrastructure yet in place.
2020-08-04 18:22:14 -04:00
Thomas Harte
478d081095 Ensures machines take user-friendly default settings. 2020-06-23 23:27:56 -04:00
Thomas Harte
c5cad865d7 Tidies up: arranges initialisers into alphabetical order, shortens some enum references. 2020-06-18 23:34:28 -04:00
Thomas Harte
327b9051c8 Adds necessary layouts for Apple II type selection. 2020-06-18 20:30:50 -04:00
Thomas Harte
48afc54af6 Cuts down unused parameter warnings to just a few that may well indicate implementation errors. 2020-05-30 01:06:43 -04:00
Thomas Harte
267006782f Starts to add Qt target; resolves many build warnings. 2020-05-30 00:37:06 -04:00
Thomas Harte
f417fa82a4 Splits 'CRTMachine' into three parts: ScanProducer, AudioProducer, TimedMachine.
Simultaneously cleans up some of the naming conventions and tries to make things a bit more template-compatible.
2020-04-01 23:19:34 -04:00
Thomas Harte
0e502f6d5c Ensures the macOS version retains volume. 2020-03-23 00:10:56 -04:00
Thomas Harte
bd1b4b8a9f Increases volume fade-out speed. 2020-03-22 21:13:55 -04:00
Thomas Harte
38d81c394f Switches OSAtomics to stdatomics. The former were deprecated by macOS 10.12. 2020-03-22 21:11:04 -04:00
Thomas Harte
72103a4adb Corrects execution cap for splitAndSync ticks. 2020-03-22 19:25:02 -04:00
Thomas Harte
e6bae261c4 Ensures volume controls appear for mouse-capture machines when not capturing. 2020-03-22 19:06:38 -04:00
Thomas Harte
5edb0c0ee7 Adds animated fade-out to volume control. Bumps macOS version to 10.12.2. 2020-03-22 18:45:24 -04:00
Thomas Harte
442ce403f9 It's a bit jarring, but ensures volume control shows and hides according to mouse cursor. 2020-03-22 16:25:07 -04:00
Thomas Harte
7398cb44e2 Adds a functioning volume control for macOS, it just doesn't know how to hide yet. 2020-03-22 13:24:23 -04:00
Thomas Harte
0c689e85a5 Use screen number for spotting screen changes.
NSScreen implements Swift Equatable but doesn't seem officially to implement -isEqual:.
2020-03-21 17:01:57 -04:00
Thomas Harte
5a1bae8a9c Ensures proper NSScreen comparison, and no never-ending setupDisplayLink loop on exit. 2020-03-20 23:00:16 -04:00
Thomas Harte
9995d776de Attempts to fix the macOS version, plus some implicit type conversions. 2020-03-18 23:29:09 -04:00
Thomas Harte
f9c8470b20 Ensure targets always nominate a machine. 2020-03-15 00:13:38 -04:00
Thomas Harte
3c70f056ed Ensure race condition workaround is applied for all CVDisplayLinkStops.
This also centralises the workaround, the better for replacing it when I discover a safer alternative.
2020-03-11 22:09:36 -04:00
Thomas Harte
f08d500fd6 Attempts to factor out the latest keyboard logic and hook it in from SDL also. 2020-03-03 22:58:15 -05:00
Thomas Harte
1f41d9c5f5 Further improvement: if in physical mode, but pressing an unrecognised key, attempt to 'type' it. 2020-03-02 22:08:54 -05:00
Thomas Harte
575d0da4d1 Attempts better to describe options. 2020-03-01 21:31:40 -05:00
Thomas Harte
ed18092088 Extends logic for when to fall back on standard keypress logic even in logical mode. 2020-03-01 20:25:12 -05:00
Thomas Harte
560394fead Ensures keys without symbols are forwarded. 2020-02-29 22:37:15 -05:00
Thomas Harte
32b2026734 Alters shortcut. 2020-02-29 20:01:21 -05:00
Thomas Harte
d5e781e8e1 Adds macOS UI option to use logical keyboard input. 2020-02-29 18:30:58 -05:00
Thomas Harte
4572c86f0f Adds a third keyboard input mode, which maps to posting things as a typer. 2020-02-29 18:17:39 -05:00
Thomas Harte
91e7400bbb Avoids double-setting of the OpenGL view. 2020-02-18 22:33:16 -05:00
Thomas Harte
a8d082c7d2 Makes audioQueue atomic to avoid potential data race. 2020-02-18 22:31:24 -05:00
Thomas Harte
43740a4b2f Adds support for stereo output. 2020-02-16 14:14:10 -05:00
Thomas Harte
f99d672237 The macOS port now selects stereo output if appropriate. 2020-02-16 14:05:50 -05:00
Thomas Harte
49b8e771b5 Adds the messaging that would allow a Speaker to output stereo, semantically. 2020-02-15 13:40:19 -05:00
Thomas Harte
e1892ff370 Resolves crash upon File -> New..., Cancel; also ensures slow performance can't equal no progression. 2020-02-14 23:16:44 -05:00
Thomas Harte
109d072cb6 Avoids trying to paper over huge gaps in running time. Also attempts to improve SDL shutdown reliability. 2020-02-12 23:47:04 -05:00
Thomas Harte
0b0a7e241b Factors out the stuff of time warping. 2020-02-09 22:11:06 -05:00
Thomas Harte
2ea1e059a8 Softens swings in emulated machine speed. 2020-02-09 16:34:13 -05:00
Thomas Harte
dac217c98c Defers starting the macOS audio queue, and attempts to restart it upon packet loss.
Hopefully forever to vanish permanent audio loss?
2020-02-08 22:08:27 -05:00
Thomas Harte
c26c8992ae Reintroduces joystick support; eliminates CSBestEffortUpdater. 2020-02-08 21:27:04 -05:00
Thomas Harte
b76a5870b3 Moves drawing into the next timer tick after retrace if sync locked.
... which should mean it occurs within 1/600th of a second of announced retrace, which I assume always will be less than the retrace period. So: does the frame buffer update during retrace.

This should completely eliminate tearing for machines that can be synced to the native output rate.
2020-02-08 18:07:13 -05:00
Thomas Harte
7c0f3bb237 Gets to slightly adjusting execution speed and matching up respective vertical syncs.
I probably still need to move the ->draw inline.
2020-02-08 18:01:48 -05:00
Thomas Harte
f615d096ca Switch to obtaining refresh periods ephemerally.
Which simplifies the necessary delegate protocol.
2020-02-08 15:03:18 -05:00
Thomas Harte
09132306e4 Removes two temporary debugging steps. 2020-02-06 23:35:23 -05:00
Thomas Harte
f95b07efea Continues edging towards raster racing and/or time warping. 2020-02-06 23:35:03 -05:00
Thomas Harte
14d976eecb Starts towards an implementation of time warping. 2020-02-04 23:08:54 -05:00
Thomas Harte
e1cbad0b6d Ensures new displayLinkDelegates get a nudge with the initial display link. 2020-02-04 23:08:25 -05:00
Thomas Harte
e7410b8ed8 Uses objective clock for updates. 2020-02-04 22:24:54 -05:00
Thomas Harte
01fd1b1a2e Pulls out ticks as a macro constant.
For playing.
2020-02-03 22:44:39 -05:00
Thomas Harte
96769c52f6 Prevents an endless queue of backlogged updates. 2020-02-03 22:08:07 -05:00
Thomas Harte
cf9729c74f Takes a first shot at running OpenGL work throughout a frame.
Rather than en masse at the end. But it seems I've been lazy with my threading. Work to do!
2020-02-03 21:58:29 -05:00
Thomas Harte
0f2783075f Moves responsibility for timed updates to CSMachine, which gives the CSHighPrecisionTimer a shot. 2020-02-02 21:39:20 -05:00
Thomas Harte
256f4a6679 Fixes -invalidate: cancel the dispatch source, don't just suspend it, and wait until that is done. 2020-02-02 21:29:22 -05:00
Thomas Harte
4766ec55fe Documents units. 2020-01-28 23:23:51 -05:00
Thomas Harte
7316a3aa88 Merge branch 'master' into FinalOverride 2020-01-26 23:42:25 -05:00
Thomas Harte
52e49439a6 Recreates display link upon a screen change.
Different screens may have different refresh rates, and I can find no guarantees about how Apple handles that.
2020-01-26 23:23:33 -05:00
Thomas Harte
6bcdd3177d Ensures that a change of screen issues a reshape. Just in case.
Thereby resolves display mis-sizing when dragging from a Retina display to a regular one, or vice versa.
2020-01-26 18:04:25 -05:00
Thomas Harte
fbe479c43f Switch to saving screenshots to the desktop.
Or, at least, try. User permission would be required. More reading necessary.
2020-01-26 17:36:16 -05:00
Thomas Harte
294e09f275 All these 'override's can be 'final's.
At least for the purpose of being communicative. I doubt there's much to gain in terms of compiler output — the DiskImageHolder can avoid some virtual lookups but nothing else leaps out.
2020-01-23 22:57:51 -05:00
Thomas Harte
7bac439e95 Adds, and comments out, a useful temporary piece of debugging logging. 2020-01-23 22:14:22 -05:00
Thomas Harte
3c6a00dc3c Breaks a potential deadlock. 2020-01-22 22:10:20 -05:00
Thomas Harte
3aa2c297a2 Adds feedback to the best-effort updater; enables the Cocoa port for audio event requests. 2020-01-20 17:38:25 -05:00
Thomas Harte
290db67f09 Adds a forward route for event flags. Doesn't yet account for extra time expended. 2020-01-20 17:09:01 -05:00
Thomas Harte
4de121142b Adds a flags parameter to the BestEffortUpdater delegate.
On the Cocoa side, cuts Swift out of the update loop, as that seems merely to add code.
2020-01-20 16:21:53 -05:00
Thomas Harte
6a185a574a Adds the BD-500 to the Mac GUI. 2020-01-15 23:56:56 -05:00
Thomas Harte
985b36da73 Starts towards STX support. 2020-01-07 23:21:32 -05:00
Thomas Harte
3ced31043a Makes Jasmin autoboot optional, adds a Jasmin reset key, adds the Jasmin to File -> New... .
Also finally implements KeyNMI.
2020-01-05 21:57:33 -05:00
Thomas Harte
de43e86310 Permits Vic-20 memory to be specified in banks; adds recognition of TheC64-style file tags to specify them. 2019-12-26 22:49:48 -05:00
Thomas Harte
0dae608da5 Embraces std::make_[unique/shared] in place of .reset(new . 2019-12-23 21:31:46 -05:00
Thomas Harte
a847654ef2 Corrects various old-fashioned bits of indentation, plus the odd const. 2019-12-22 00:00:23 -05:00
Thomas Harte
05d77d3297 Also deploys make_unique/shared to avoid type repetition. 2019-12-21 23:52:04 -05:00
Thomas Harte
47508d50a7 Wires through a composite video option for the ST.
Which is great and all, except that I've not yet inserted a colour burst. So it's monochrome.
2019-12-20 20:49:14 -05:00
Thomas Harte
5ce612cb38 Adds the Atari ST to File -> New in Cocoa world. 2019-12-17 23:04:12 -05:00
Thomas Harte
2c4f372872 Adds support for the .ST file format. 2019-11-12 23:23:14 -05:00
Thomas Harte
2c25135d8a Fixes const correctness for joystick machines; the ST is now one such. 2019-11-09 18:19:05 -05:00
Thomas Harte
860837d894 Corrects: KeyPad -> Keypad. Also fleshes out Atari ST keyboard mapping. 2019-11-09 18:02:14 -05:00
Thomas Harte
345b32d6e3 Implements read-only MSA support. 2019-10-20 20:38:54 -04:00
Thomas Harte
8b397626bf Adds a route through the static analyser to the Atari ST. 2019-10-20 20:38:54 -04:00
Thomas Harte
c089d1cd09 Improves text; nobody normal knows that this is "a view". 2019-09-24 22:52:08 -04:00
Thomas Harte
6adca98f34 Adds Macintosh choice to File -> New... 2019-09-24 22:48:34 -04:00
Thomas Harte
7112f0336c Rationalises protocol for application-level event theft. 2019-09-24 22:31:20 -04:00
Thomas Harte
7ff4594f09 Eliminates fast loading Objective-C/Swift protocol.
A very long time ago, when each machine had its own Objective-C class, this protocol was used to indicate which machines support that feature. It no longer communicates anything.
2019-09-24 20:13:09 -04:00
Thomas Harte
8489e8650f Attempts another draft of not inundating the user with open file dialogues. 2019-09-22 13:59:31 -04:00
Thomas Harte
114f81941e Completes the wiring necessary for capture of the command key.
At least when coupled with mouse capture.
2019-09-22 13:53:38 -04:00
Thomas Harte
8f88addf9f Establishes an interface for requesting shortcut theft. Not yet implemented. 2019-09-22 13:15:35 -04:00
Thomas Harte
f28c124039 Adds a route to divert key events before they reach Cocoa.
If you were to use this, it would have the effect of disabling in-app keyboard short-cuts in favour of routing keys to the emulated machine.
2019-09-22 13:15:01 -04:00
Thomas Harte
8a14f5d814 Updates to Xcode11 recommended project settings.
The updated compiler also flagged a potential issue with CPU::Z80::Register not being a namespace re: 'Refresh' versus CPU::Z80::PartialMachineCycle. I don't entirely see it, but this fixes the problem.

I also finally figured out what the compiler was trying to tell me about ROMRequester.xib.
2019-09-22 12:13:56 -04:00
Thomas Harte
3e639e96e7 Shows the auto-open dialogue only at most once. 2019-09-21 18:01:16 -04:00
Thomas Harte
8ea4c17315 Completes Mac GUI wiring. 2019-09-19 22:37:23 -04:00
Thomas Harte
2e24da4614 Implements quick booting, and edges towards exposing it on the Mac.
It should already work in kiosk mode.
2019-09-19 22:32:12 -04:00
C.W. Betts
4c5f596533
Update CSMachine.mm
No need to create a temporary NSNumber object to be passed to a variadic method.
2019-08-10 00:43:30 -06:00
Thomas Harte
b6e4c8209b Switches to showing 'File -> Open...' at launch.
As per the prevailing wind.
2019-08-04 21:34:30 -04:00
Thomas Harte
e08a64d455 Fixes erroneous instruction. 2019-08-02 21:04:53 -04:00
Thomas Harte
f45de5b87a Adds how-to-release-the-mouse instructions for Cocoa. 2019-08-02 17:07:51 -04:00
Thomas Harte
97eff5b16d Formally distinguishes Macintosh keys from virtual keys.
Also: adds mappings for keypad keys, and corrects a couple of
long-standing capitalisation errors in my virtual key set.
2019-08-02 16:15:34 -04:00
Thomas Harte
f64ec11668 Tidies up and simplifies panel flow. 2019-08-01 14:31:45 -04:00
Thomas Harte
c41cccd9a6 Adds a workaround to display the ROM import banner even from File -> Open... . 2019-07-30 13:07:33 -04:00
Thomas Harte
3da47318b1 Updates copyright year. 2019-07-23 18:03:37 -04:00
Thomas Harte
374cac0107 Adds negative feedback to ROM installation process.
As an ugly kludge, code wise.
2019-07-23 16:24:23 -04:00
Thomas Harte
4d361b1952 Adds MIME type for Apple-recognised disk images. 2019-07-23 11:36:47 -04:00
Thomas Harte
a3ad0ab09b Completes the successful import path. 2019-07-22 21:46:28 -04:00
Thomas Harte
ed0c4c117b Ensures that machine name reaches Swift. 2019-07-22 21:18:30 -04:00
Thomas Harte
2432151bf8 Puts machine name into ROMMachine::ROM.
Also switches to idiomatic exit codes.
2019-07-22 21:14:21 -04:00
Thomas Harte
2129bfc570 Gets as far as testing ROMs against the missing list.
Though now it strikes me that I've forgotten to retain the machine name.
2019-07-22 18:02:48 -04:00
Thomas Harte
8de6cd3f44 Ensures that ROM files can be dragged and dropped into Swift.
Also adjusts the main window background colour, better to bridge the time between selecting a machine and it starting.
2019-07-22 17:18:31 -04:00
Thomas Harte
9b9831f28b The Mac port will now at least display a list of missing ROMs.
It doesn't yet offer the drag-and-drop functionality it promises, however.
2019-07-22 13:00:17 -04:00
Thomas Harte
8a2cac0d0c Fixes layout constraints. 2019-07-22 11:30:26 -04:00
Thomas Harte
e17b105574 Adds a quick label in exposition. 2019-07-22 11:18:39 -04:00
Thomas Harte
67c5f6b7cb Ensures the missing ROM list bubbles up to Swift. 2019-07-21 22:05:22 -04:00
Thomas Harte
d452d070a1 Extends the Mac ROM fetcher to return a missing-ROMs list. 2019-07-21 18:41:00 -04:00
Thomas Harte
a846c3245d Checks the application support directory before the application bundle for ROM images. 2019-07-20 23:04:46 -04:00
Thomas Harte
20670bab2f Expands information included in ROM load requests. 2019-07-19 22:35:22 -04:00
Thomas Harte
cfad20bb33 Surfaces missing Macintosh types. 2019-07-17 16:02:25 -04:00
Thomas Harte
bcbda4d855 Adds .image as a synonym of .img. 2019-07-16 21:44:59 -04:00
Thomas Harte
9f0cde3d69 Improves mouse capture behaviour. 2019-07-11 22:56:08 -04:00
Thomas Harte
2651b15db1 Takes a first stab at mouse input support from SDL.
There seems to be something odd going on with mouse buttons though; I'm going to test elsewhere.
2019-07-08 17:36:55 -04:00
Thomas Harte
387be4a0a6 Ensures mouse button presses propagate correctly.
Beyond the one that initiates mouse capture, that is.
2019-07-02 16:57:51 -04:00
Thomas Harte
39aae34323 Avoids multiple calls to -[NSCursor hide] and -unhide.
Those are reference counted.
2019-06-13 13:39:35 -04:00
Thomas Harte
d6150645c0 By hook or by crook, mouse input now works. 2019-06-12 22:19:25 -04:00
Thomas Harte
109953ef49 Ensures proper routing of mouse events from Cocoa. 2019-06-11 18:41:41 -04:00
Thomas Harte
124c7bcbb0 Makes the Macintosh a mouse machine, and makes mouse machines detectable. 2019-06-11 18:21:56 -04:00
Thomas Harte
567feaac10 Adds a proper shout out for releasing the mouse. 2019-06-11 16:35:04 -04:00
Thomas Harte
15c38e2f15 Adds the option for mouse capture. 2019-06-11 16:30:53 -04:00
Thomas Harte
85298319fa Expands towards supporting multiple Macintosh models.
To provide another variable to help with bug isolation.
2019-06-03 14:50:36 -04:00
Thomas Harte
881feb1bd3 Adds preliminary parsing of the Disk Copy 4.2 format. 2019-06-02 13:39:25 -04:00
Thomas Harte
6873f62ad8 Ensures that the Mac now retains its ROM properly. 2019-05-03 22:39:09 -04:00
Thomas Harte
5f385e15f6 Adds the bare bones necessary to be able to create a Macintosh from File -> New... . 2019-05-03 22:16:07 -04:00
Thomas Harte
7f5c637aeb Updates to Swift 5. 2019-03-26 22:15:38 -04:00
Thomas Harte
69a2a133d5 Performs basic migration to Xcode 10.2 — project settings, the one new warning, etc. 2019-03-26 19:47:41 -04:00
Thomas Harte
dc464a0b7b Introduces a wrapper class for high-precision timers. 2019-03-07 22:04:29 -05:00
Thomas Harte
42997dcb80 Switches brace style, to bring this into line with other source files. 2019-03-06 21:54:21 -05:00
Thomas Harte
0ace189e38 Takes a basic stab at mouse cursor hiding. 2019-03-06 21:49:50 -05:00
Thomas Harte
34047fa60a Reintroduces proper locking of the OpenGL context in macOS. 2019-03-03 14:49:20 -05:00
Thomas Harte
05d483bc5b Corrects potential machine shutdown race condition. 2019-03-02 23:17:31 -05:00
Thomas Harte
c11a1f9679 Introduces S-Video support for the ColecoVision. 2019-03-02 23:02:37 -05:00
Thomas Harte
2beeaa513b Ensures a machine exists before messaging it. 2019-03-02 21:27:34 -05:00
Thomas Harte
bee0d09877 Splits display update and draw functions.
On the Mac, draw is now called without an update for resizing events, and
anything else requested by AppKit. In all other cases — including from
the SDL version — both are called as if they were still a single function.
2019-03-02 19:33:28 -05:00
Thomas Harte
816ad0a94c Introduces region support to the MSX. 2019-02-28 20:54:43 -05:00
Thomas Harte
d122535a65 Unifies the OpenGL screenshot code and corrects it for arbitrary alignment. 2019-02-27 21:05:02 -05:00
Thomas Harte
6c1d94beaa Adds composite monochrome output for the Oric. At least temporarily. 2019-02-18 16:56:48 -05:00
Thomas Harte
3e0b5433b9 Institutes colour/monochrome screen selection as an Apple II option.
Allowing me to test that straight-through composite still works.
2019-02-12 19:52:32 -05:00
Thomas Harte
4748b09721 Ensures safe OpenGL shutdown. 2019-01-17 20:44:18 -05:00
Thomas Harte
64465f97b6 Starts towards reintroducing the proper mechanisms for selecting a display type at runtime. 2018-11-28 17:53:33 -08:00
Thomas Harte
ee89be6730 Removes many stray spaces. 2018-11-23 22:32:32 -05:00
Thomas Harte
817aa186c2 Revokes 'synchronous' as a function of onlyIfDirty, as it doesn't allow for double buffering. 2018-11-20 22:00:40 -05:00
Thomas Harte
f12d734957 Disables multisampling, since there's no way it's being helpful. 2018-11-19 23:36:29 -05:00
Thomas Harte
8a699b6072 Kills setup_output definitively, saving some indirection. set_scan_target takes its place. 2018-11-14 21:52:57 -05:00
Thomas Harte
bf3ab4e260 Proceeds as drawing to the unprocessed line buffer and drawing from it.
Very, very slowly, and without yet clearing.
2018-11-13 21:15:33 -05:00
Thomas Harte
3045e85004 Ensures redraws when resizing; declines to busy wait otherwise. 2018-11-12 20:15:38 -05:00
Thomas Harte
36bf640c6f Acts as if it is going to submit scans, at least. 2018-11-07 22:53:46 -05:00
Thomas Harte
55da1e9c0f Simplifies semantics a little and starts accepting a single buffer of pixel data. 2018-11-06 22:23:38 -05:00
Thomas Harte
014da41471 Ensures scan positions are communicated with a specified range, and switches manner of pixel clock communication. 2018-11-04 21:06:25 -05:00
Thomas Harte
05fb7db147 Reduces CRT chattiness. 2018-11-03 23:47:41 -04:00
Thomas Harte
f6562de325 Possibly adds enough for the Electron and ZX80 to start outputting dummy lines.
Let's see!
2018-11-03 23:40:39 -04:00
Thomas Harte
b40211d2c0 Starts to bend 'CRTMachine' to a world farther from owning the GPU relationship. 2018-11-03 21:54:25 -04:00
Thomas Harte
da4d883321 Adds first, incomplete attempts to talk to a ScanTarget from the CRT.
Does away with the hassle of `unsigned` while I'm here; that was a schoolboy error.
2018-11-03 19:58:44 -04:00
Thomas Harte
a8645f80bf Introduces 'non-exclusive' emulator-space keyboards.
i.e. sets of keys that don't amount to an entire keyboard in the modern sense. Experimentally used by the Master System for its reset key.
2018-10-24 21:59:30 -04:00
Thomas Harte
e3fd63b2d7 Adds composite/RGB selection for the Master System. 2018-10-23 22:30:24 -04:00
Thomas Harte
9683c8f664 Advances towards the Master System actually receiving interrupts. 2018-09-23 15:58:23 -04:00
Thomas Harte
0d01346ad4 Advertises SMS support and goes as far as realising it needs to spawn a Master System. 2018-09-20 22:04:28 -04:00
Thomas Harte
1e3318816c Removes LSItemContentTypes so as not to reject files. 2018-09-09 17:47:03 -04:00
C.W. Betts
05d4274019 Remove LSItemContentTypes: they should be unique identifiers, not generic types like public.item or public.data.
This can result in strange icons showing up in the wrong places.

Also added a category type.
2018-09-07 16:39:52 -06:00
Thomas Harte
a13eb351da Implements the Enhanced IIe, other than some text selection errors. 2018-08-11 10:26:30 -04:00
Thomas Harte
3be30d8c71 Tries once again to introduce file type icons. 2018-08-06 19:08:27 -04:00
Thomas Harte
d4c1244485 Adds a hint for users. 2018-08-06 18:56:59 -04:00
Thomas Harte
c61b9dca17 Ensures the Mac doesn't show the 'Insert...' option for machines that can't accept an insertion. 2018-08-06 18:52:42 -04:00
Thomas Harte
31df8c7e91 Corrects improper NSWindowController sheet stack manipulation.
As a result, 'Insert...' now seems to work properly.
2018-08-05 22:47:51 -04:00
Thomas Harte
bcd0479074 This in principle completes the insert action.
With the caveat that 'New...' machines seem to have blocked the window's panel queue somehow.
2018-08-05 13:12:02 -04:00
Thomas Harte
c939a274be Makes first attempt to connect up an in-machine open panel. 2018-08-04 22:21:23 -04:00
Thomas Harte
3c51e335c3 Makes extra sure not to try to read from an empty characters list. 2018-08-04 21:40:26 -04:00
Thomas Harte
94503ed771 Disables the macOS Apple II options panel, since it now has no options. 2018-08-04 12:37:55 -04:00
Thomas Harte
8cca9c2055 Merge branch 'master' into IIe 2018-07-27 23:52:39 -04:00
Thomas Harte
d19d949b9c Removes unnecessary import. 2018-07-27 23:41:55 -04:00
Thomas Harte
1cb3713b84 Attempts to introduce screenshot capture for macOS. 2018-07-27 23:37:24 -04:00
Thomas Harte
55a6431fb3 Puts in enough logic to be able to launch a non-functional IIe. 2018-07-25 18:58:34 -04:00
Thomas Harte
6b2970f2f2 Ensures no-hat input doesn't override analogue axes. 2018-07-22 17:29:37 -04:00
Thomas Harte
1362906f94 Wires joystick support all the way through to machines.
Ensures there's only one joystick manager, which is shared by all machines, with input going only to the key window.
2018-07-22 16:55:47 -04:00
Thomas Harte
c05b6397b0 Attempts a full implementation of the joystick manager.
So it currently vends a list of existing joysticks plus their states. More work will be required for a UI — e.g. there is no way to identify one joystick from another — but this'll do for now.
2018-07-22 15:23:26 -04:00
Thomas Harte
8d18808efe Walks a few steps further along device inspection. 2018-07-20 23:33:04 -04:00
Thomas Harte
09950d9414 Gamely starts to create a HID input manager for joysticks/pads/etc. 2018-07-19 22:43:01 -04:00
Thomas Harte
3e9ef6b8cb Adds indicator lights for the SDL port.
To complete #426
2018-07-15 20:19:06 -04:00
Thomas Harte
7e58a44771 Renames ConfigurationTarget to MediaTarget as per its newly-reduced interface. 2018-07-10 21:32:28 -04:00
Thomas Harte
26141a59b0 Moves all default Mac window positions up by 50px. 2018-06-23 23:09:34 -04:00
Thomas Harte
4a3d7c338a Moves the activity window down to start at approximately the same top as the options window. 2018-06-23 22:14:44 -04:00
Thomas Harte
9bb55b6b61 Ensures that 'Activity' view has minimum acceptable height. 2018-06-23 19:44:35 -04:00
Thomas Harte
c33308bdc5 Attempts to improve relative default window positions. 2018-06-23 18:59:19 -04:00
Thomas Harte
44a33941bf Undoes Xcode's folder renaming. 2018-06-23 18:55:17 -04:00
Thomas Harte
d45f1a793d Introduces composite/RGB selection for the Amstrad CPC. 2018-06-21 20:00:49 -04:00
Thomas Harte
6ed3a49fe1 Made failed attempt to apply height constraint. 2018-06-18 21:35:22 -04:00
Thomas Harte
17702bfb89 Causes GUI LEDs to reflect their underlying activity. 2018-06-18 21:22:51 -04:00
Thomas Harte
292e02702a Progresses very slightly to being able to show up to four activity indicator names.
Blinking to come.
2018-06-17 22:52:17 -04:00
Thomas Harte
5a56d8a5d0 Exposes a list of machine LEDs to Swift.
Also gets explicit about nullability on the Objective-C side.
2018-06-17 18:53:56 -04:00
Thomas Harte
51da21b844 Formally introduces keyboard-as-joystick for the Mac, and fixes discovered joystick issues.
Specifically:
* digital to analogue conversion not returning to centre;
* Apple II axes being the wrong way around; and
* Apple II buttons using improper selection logic.
2018-06-13 19:22:34 -04:00
Thomas Harte
3ea2a4ccb8 Moves the joystick class towards accepting analogue inputs. 2018-06-10 20:45:52 -04:00
Thomas Harte
c4108efc5c Adds a more accurate option description for the Apple II. 2018-06-10 18:32:22 -04:00
Thomas Harte
d576ff1172 Exposes DOS 3.3 acceleration as an option.
Albeit with an unhelpful label in the macOS GUI for now.
2018-06-10 18:28:29 -04:00
Thomas Harte
076c0a48e9 Slightly tweaks initial size that this doesn't resize when switching to the Vic selection page. 2018-05-16 19:19:50 -04:00
Thomas Harte
fde613a5c4 Corrects various placement inconsistencies.
Hopefully to move into line with Apple's HID standards.
2018-05-16 19:15:49 -04:00
Thomas Harte
f7decd80b6 As an initial step, ensured latency doesn't pile up endlessly. 2018-05-15 21:12:43 -04:00
Thomas Harte
5d6b5d9f10 Eliminates all emdashes in cross-platform code. 2018-05-13 15:34:31 -04:00
Thomas Harte
0b771ce61a Removes all instances of the copyright symbol. 2018-05-13 15:19:52 -04:00
Thomas Harte
3747d96b22 Corrects Mac paste pathway.
Also updates documentation around CSOpenGLView.
2018-05-13 11:12:03 -04:00
Thomas Harte
45bd24ada0 Corrects tags for Oric machine selection. 2018-05-08 22:53:27 -04:00
Thomas Harte
c3a2f7717b Makes attempt to implement support for the Pravetz 8D + 8DOS.
i.e. the Disk II wired up to the Oric, with some ROM swaps.
2018-05-08 22:05:43 -04:00
Thomas Harte
59718e132b Fixes macOS 10.10 warning. 2018-05-03 22:39:34 -04:00
Thomas Harte
723ee88043 Introduces configuration options for the Apple II.
Specifically: II or II+? Disk II 13- or 16-sector? Or not at all?
2018-05-03 19:37:32 -04:00
Thomas Harte
f4097290c2 Made various corrections following a quick for-loop constness audit. 2018-04-30 22:23:57 -04:00
Thomas Harte
a9d4fe0b41 Introduces filetype wiring for DO and PO files.
Also corrects sector numbering logic to ensure there is a sector 15.
2018-04-29 16:34:10 -04:00
Thomas Harte
7463edaa1b Attempts to bring card support to the Apple II, and adds a 'has disk' flag. 2018-04-23 21:14:45 -07:00
Thomas Harte
d447e81abd Adds provisional support for WOZ files. 2018-04-23 19:57:45 -07:00
Thomas Harte
6592745e53 Adds the bare minimum to respond to attempts to open NIB files with an Apple II. 2018-04-21 21:21:57 -07:00
Thomas Harte
6621e54952 Shortens the name for the Electron tab, owing to limited space. 2018-04-19 20:54:16 -04:00
Thomas Harte
465c38f03c Extends the keyboard protocol and adds keyboard input to the Apple II. 2018-04-15 21:11:30 -04:00
Thomas Harte
e599e65087 Switches to use of the TargetList typedef wherever possible. 2018-04-14 19:46:38 -04:00
Thomas Harte
7efee9b52b Does the bare minimum to create a class skeleton for Apple II implementation. 2018-04-14 19:46:15 -04:00
Thomas Harte
bb4db6b382 Ensures that 'choose' responds to enter. 2018-04-08 18:52:46 -04:00
Thomas Harte
7bf88565ce Resizes to fit all options. 2018-04-05 21:59:19 -04:00
Thomas Harte
ee10155296 Adds advice and withdraws the ZX 64kb option. 2018-04-05 21:57:26 -04:00
Thomas Harte
5044aac337 Sizes up default window size better to fit machine selector. 2018-04-04 19:18:22 -04:00
Thomas Harte
46b1c57bf4 Enables the titlebar, inexplicably allowing the sheet to obtain focus. 2018-04-03 23:22:26 -04:00
Thomas Harte
eaf1482182 Reverts the once-again-unused document controller. 2018-04-03 23:11:19 -04:00
Thomas Harte
d3418550eb Attempts explicitly to disable promise of saving. 2018-04-03 23:06:48 -04:00
Thomas Harte
3ffa9e2751 Ensures complete machine picker state is preserved. 2018-04-03 23:01:12 -04:00
Thomas Harte
c697dd78f0 Ensures a new machine starts as first responder. 2018-04-03 22:22:39 -04:00
Thomas Harte
7dac791290 Causes the machine picker to show as a sheet.
Albeit with some user experience issues lingering.
2018-04-03 18:47:07 -04:00
Thomas Harte
cde2faeda6 Makes an unsuccessful attempt to show the new machine dialogue as a sheet.
Also corrects the 'open' case versus recent changes.
2018-04-02 23:31:36 -04:00
Thomas Harte
69f520428d Makes a first, ugly attempt at a 'new machine' dialogue for the Mac.
Which has implied getting much more specific about MSX disk drive attachment, and has prompted an excuse to offer the ZX80 with the ZX81 ROM.
2018-04-02 22:42:41 -04:00
Thomas Harte
fca8a58b36 Exposes S-Video option in the Mac UI. 2018-04-01 13:29:04 -04:00
Thomas Harte
389979923e Performs update to and satisfaction of Xcode 9.3's preferred warnings. 2018-03-30 10:25:01 -04:00
Thomas Harte
0869213c55 Cuts detritus. 2018-03-27 22:00:13 -04:00
Thomas Harte
f3fe16215a Reintroduces options for the Vic-20, now tape loading speed only. 2018-03-27 21:55:43 -04:00
Thomas Harte
62b0645ed0 Ensures the Vic-20 doesn't show the ZX80/81 options panel on macOS. 2018-03-25 16:04:44 -04:00
Thomas Harte
760c75103e Fills out the application icon set. 2018-03-23 18:29:18 -04:00
Thomas Harte
a3fa9440d1 Renames method better to communicate purpose. 2018-03-22 09:49:36 -04:00
Thomas Harte
6419b0e619 Reintroduces CSMachineDelegate, allowing the Mac port to switch output audio rate dynamically. 2018-03-22 09:48:19 -04:00
Thomas Harte
682c3d8079 Adds new hook for watching audio output rate changes. 2018-03-22 09:23:01 -04:00