Commit graph

627 commits

Author SHA1 Message Date
Andrea Odetti
bcf57a4e19 Add a few buttons to the toolbar.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 20:42:23 +01:00
Andrea Odetti
8dd454af4d Add support for Double Low & Hi Resolution.
For Double Low Res, I am not sure the colors are correct.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
3231f86f87 Avoid using uninitialised data.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
3733da1af7 Remove configuration from libappleii and delegate it to the frontends.
In qapple we use QSettings.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
03de883889 Modularise CMakeLists.txt
qapple does not run at the moment: can find configuration file.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
00360bbe64 Add support for Mouse.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
348ba1ecd9 Use QGamepad in QApple.
This requires an interface as napple uses libevdev.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
6ec2408e44 Add viewer for (Windows) Registry.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
1334d461b4 Fix support to select clones.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
8f92e63f45 Fix uninitialised data if the result is NULL.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
4873e1f020 Add and activate options for slot cards and computer type.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
8b458e61fb Handle hard disks and disk eject.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
2258d91208 Reuse the same preferences dialog, so the drop down menus keep the previous choices.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
86cc85bf8f Add options dialog to load floppy and hard disks.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
246e66d9be Address area: do not show 1 more row than necessary.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
5d00a41d66 Remove tear in cursor for !readOnly mode.
1) ensure the cursor rectangle is inside the character it belongs to
2) draw the same character again so it shows when the cursor blink is on


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
520de12f58 Improve cursor in read only mode.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
17d75813a7 A couple of fixes.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
1c7f124977 Fix duplicate names of widgets.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
3eca669004 Add memory viewer based on a (modified) widget from
https://github.com/Simsys/qhexedit2


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
416b461291 Finally some results in the optimisation of CPU usage:
1) Do not call Video::paint() with a scale != 1:1
2) For this reason we need to draw elsewhere
3) and finally scale the whole thing just once to the widget
4) QPixmap vs QImage: cant see the difference
5) QOpenGLWidget is 2x faster than QWidget but it has some flickering when resizing

On my i5-4460  CPU @ 3.20GHz with x2 zoom
TEXT: 4-5% CPU usage
HGR: 6-7% CPU usage


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
138ff8f94d Use MouseInterface rather than dummy implementation.
Must be enabled in data.cpp via g_Slot4 and anyway no mouse events are enabled yet.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
b9c4789198 Fix MouseInterface to compile in linux.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
140b5bf7d4 Fix inverse lowercase in 80 column mode.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
1a75e9f0de And share the joystick with QApple.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
10339131fd Decouple Input from ncurses frontend to reuse it in QApple (Fedora does not package QGamepad yet).
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
d699dc98b8 And add Low Resolution color graphics as well.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
c1b7d96dd1 Add (slow) support for HiRes graphics.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
3da7d4ed55 Handle ESC key.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
8295c686e9 Clarify where 35:24 comes from.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
18e0d3b6b6 Qt does not seem to fire the timer event very precisely (target 5 ms, got often 16).
So we dynamically adjust the number of CPU cycles based on the actual gap.
Only problem is what to do for enhanced disk speed.
We simply block as long as the disk is spinning.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
b1644c01e5 Error message if a disk cannot be inserted.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
c6789ece7b Add benchmark and fix timerID values.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
ede695bcd6 Move VideoBenchmark to libapple to be reused.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
9c21b59827 typedef has been removed upstream.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
ba67de8d9a Add Reboot command.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
57934c1bc9 Add menu item to insert disks.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
1033c98028 Add const-nees to parameters.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
b3dc584fb0 Better handling of keys.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
1192f7b584 Fix window title, close event, scrollbars, fast timer when disk spins.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
fe0730c4d3 Various improvements.
Rudimentary keyboard input.
Resize/Zoom video.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
c9fb116464 Various improvements over the QLabel based approach.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
facf9aec25 Initial draft of a QT frontend.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
0c37816c28 Move FindResource to the interface as in QT it will be handled differently.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
ce124e0aa0 It is too easy to set the wrong CPU and then nothing works.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
91678645a7 Add option to save configuration on exit.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
c9a6d7688e Add option to create missing floppy disks.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
eba2cea5ca Display moving average of speed.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
e68748a158 Allow to control of high resolution graphics.
Horizontal resolution: x1 x2 x3 4 x5 x6 x7.
Vertical: x1 x2 x4.

Use Alt-arrows to change.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
a43cf5cf8a More uniform allocation of pixels in the 4th column to each sides with half the weight.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00