Commit graph

1428 commits

Author SHA1 Message Date
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
Andrea Odetti
6996c5fc47 Avoid various uninitialised memory errors while reading Registry.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
df53415d98 Add option to benchmark emulator.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
863a9d3671 Write a little measure about current execution speed.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
b63f232ebe Use evdev to handle a joystick.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
a79a4b4a4c Fix configuration.
If the key is mssing, the output variables should not be touched.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
26e377e3a1 Fix LowRes colors (swapping foreground and background).
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
d8d2cc2412 Clean at the end.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
ced5c39401 Reduce leaks.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
1d12b788ea Fix missing returns.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
ca7542f39a Read (part of) the registry.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
f42d7e9fcc Add option to control memory initialization.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
8515b20327 Add support to load the state from a snapshot file.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
0ee3225026 Fix a bug in Disk_t: ZeroMemory() does not work for non POD.
Disk_t is NOT a POD as it contains a std::string.
Simply zeroing the memory is not a replacement for a constructor or for a .clear() method.
This would cause access violation when the string strFilenameInZip is used (e.g. line 365).

It is possible that in VS a std::string full of zeros is valid.
This can be triggered inserting the same floppy in both drives.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
05a55c0735 Add ability to save state (use F12).
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
2aae3592c4 Rationalise a bit the command line arguments.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
ae4c010564 Anonymous namespace and indentation.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
2b60a1e0a7 Pass Ctrl-C to the emulator.
Use F2 to leave.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
97e672cf4d Add missing diagonal element to the ASCIIArt table.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
50b84e06fe Add support for a text mode high resolution graphics.
Using Unicode quarter blocks the effective resolution is (40x2)x(24x2).


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
e7ddcd6b82 Small changes, but in particular wcolor_set to handle > 256 color pairs.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
c198c24a22 Compile & link (only) SaveState.cpp.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
5c4d499e14 Reuse old implementation of the VideoGetScannerAddress (a la 1.25).
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
ab831ed2db Rename to avoid clashes with Frame.h in a case insensitive filesystem.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
64d7994c71 Clean up the Frame and display disk information.
Report as well some measure of the ringing frequency of the speaker.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
031fcab519 Add support for Open & Solid Apple.
Page Up = Open
Page Down = Solid

One should probably leave the flag up for X ms rather than a single read.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
f625e36f5c Fix usage of getcwd.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
017dc307b2 Handle 80 columns mode.
ncurses windows handling move to a separate file.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00
Andrea Odetti
aa57d072bc Correct handling of all 256 text characters in both Standard and Alternate charecter set.
Change flash state every 16 frames.


Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2017-10-14 19:18:44 +01:00