Skip to content

Commit

Permalink
This is VirtualC64 4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkwhoffmann committed Jan 27, 2024
1 parent cc34223 commit 3654fdd
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 12 deletions.
33 changes: 29 additions & 4 deletions Emulator/Base/Thread.h
Expand Up @@ -22,7 +22,11 @@ namespace vc64 {
/* This class manages the emulator thread that runs side by side with the GUI.
* The thread exists during the lifetime of the emulator, but may not run the
* emulator all the time. The exact behavior is controlled by the internal
* state. The following states are distinguished:
* state.
*
* 1. Thread states:
*
* The following states are distinguished:
*
* Off: The emulator is turned off
* Paused: The emulator is turned on, but not running
Expand Down Expand Up @@ -84,6 +88,8 @@ namespace vc64 {
* a loop which periodically calls function execute(). After each iteration,
* the thread is put to sleep to synchronize timing.
*
* 2. Suspend / Resume:
*
* The Thread class provides a suspend-resume mechanism for pausing the thread
* temporarily. This functionality is utilized frequently by the GUI to carry
* out atomic operations that cannot be performed while the emulator is running.
Expand All @@ -106,6 +112,8 @@ namespace vc64 {
* return or throw an exceptions as you like;
* }
*
* 3. Synchronization:
*
* The Thread class is also responsible for timing synchronization. I.e., it
* has to ensure that the proper amount of frames are executed per second.
* Three different synchronization modes are supported:
Expand All @@ -128,9 +136,26 @@ namespace vc64 {
* In adaptive mode, the thread waits for an external wake-up signal just as
* it does in pulsed mode. When the wake-up signal comes in, the thread
* computes the number of missing frames based on the current time and the
* time the thread had been lauchen. Then it executes all missing frames or
* resynchronizes if the number of missing frames is way off. Adaptive mode
* has been introduced as a replacement for Pulsed mode.
* time the thread had been lauchen. After that, it executes all missing
* frames or resynchronizes if the number of missing frames is way off.
*
* 4. Time slicing:
*
* The number of time slices per frame controls the size of a single
* computation chunk. Per default, the emulator thread computes an entire frame
* in a single chunk. That is, it computes a frame, sleeps, computes a frame,
* sleeps, and so on. A frame can be time-sliced to make the emulator more
* responsive and let it react faster to external events such as joystick
* movements. For example, if two-time slices are chosen per frame, the thread
* computes the first half of the current frame, sleeps, computes the second
* half of the current frame, sleeps, and so on. Note that increasing the
* number of time slices can increase CPU load and jitter, even in pulsed mode.
* Jitter may increase because time slices are distributed equally between two
* wake-up events. Hence, the later chunks will be computed close to the next
* wake-up event and may, therefore, interfere with the VSYNC event of the host
* computer.
*
* 5. Warp mode:
*
* To speed up emulation (e.g., during disk accesses), the emulator may be put
* into warp mode. In this mode, timing synchronization is disabled causing the
Expand Down
4 changes: 2 additions & 2 deletions Emulator/config.h
Expand Up @@ -20,7 +20,7 @@
#define VER_MAJOR 4
#define VER_MINOR 7
#define VER_SUBMINOR 0
#define VER_BETA 1
#define VER_BETA 0

// Snapshot version number
#define SNP_MAJOR 4
Expand All @@ -29,7 +29,7 @@
#define SNP_BETA 0

// Uncomment these settings in a release build
// #define RELEASEBUILD
#define RELEASEBUILD


//
Expand Down
2 changes: 0 additions & 2 deletions Proxy/C64Proxy.mm
Expand Up @@ -2548,8 +2548,6 @@ @implementation C64Proxy

- (instancetype) init
{
NSLog(@"C64Proxy::init");

if (!(self = [super init])) return self;

// Create the emulator instance
Expand Down
8 changes: 4 additions & 4 deletions VirtualC64.xcodeproj/project.pbxproj
Expand Up @@ -2428,7 +2428,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 240125;
CURRENT_PROJECT_VERSION = 240127;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 3NG65ZLYW7;
Expand All @@ -2449,7 +2449,7 @@
LIBRARY_SEARCH_PATHS = "$(inherited)";
LLVM_LTO = NO;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 4.7b1;
MARKETING_VERSION = 4.7;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 c++20";
OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";
Expand All @@ -2472,7 +2472,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 240125;
CURRENT_PROJECT_VERSION = 240127;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 3NG65ZLYW7;
Expand All @@ -2494,7 +2494,7 @@
LIBRARY_SEARCH_PATHS = "$(inherited)";
LLVM_LTO = YES_THIN;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 4.7b1;
MARKETING_VERSION = 4.7;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 c++20";
OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";
Expand Down

0 comments on commit 3654fdd

Please sign in to comment.