Skip to content

Commit

Permalink
This is VirtualC64 5.0b2
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkwhoffmann committed Jun 8, 2024
1 parent 8bd6757 commit 5c96285
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 9 deletions.
16 changes: 16 additions & 0 deletions Emulator/FileSystems/FileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ FileSystem::init(const D64File &d64)
for (Block b = 0; b < (Block)blocks.size(); b++) {
setErrorCode(b, d64.getErrorCode(b));
}

// Update the cached directory information
scanDirectory();

// Print some debug information
if (FS_DEBUG) printDirectory();
}

void
Expand All @@ -120,6 +126,12 @@ FileSystem::init(class Disk &disk)

// Import file system
importVolume(buffer, len);

// Update the cached directory information
scanDirectory();

// Print some debug information
if (FS_DEBUG) printDirectory();
}

void
Expand All @@ -146,6 +158,7 @@ FileSystem::init(AnyCollection &collection)
delete[] buffer;
}

// Update the cached directory information
scanDirectory();

// Print some debug information
Expand All @@ -167,6 +180,9 @@ FileSystem::init(const string &path)
// Import the folder
importDirectory(path);

// Update the cached directory information
scanDirectory();

// Print some debug information
if (FS_DEBUG) printDirectory();

Expand Down
6 changes: 3 additions & 3 deletions Emulator/FileSystems/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,16 @@ class FileSystem : CoreObject {
// Writing files
//

// Returns the next free directory entry or creates one
FSDirEntry *getOrCreateNextFreeDirEntry();

// Creates a new file
bool makeFile(PETName<16> name, const u8 *buf, isize cnt);

private:

bool makeFile(PETName<16> name, FSDirEntry *entry, const u8 *buf, isize cnt);

// Returns the next free directory entry or creates one
FSDirEntry *getOrCreateNextFreeDirEntry();


//
// Integrity checking
Expand Down
6 changes: 6 additions & 0 deletions Emulator/Media/Folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ Folder::init(const string &path)
if (!isCompatiblePath(path)) throw Error(ERROR_FILE_TYPE_MISMATCH);

fs = new FileSystem(path);

// REMOVE ASAP
fs->scanDirectory();
fs->printDirectory();
printf("NumFiles: %ld\n", fs->numFiles());
}

PETName<16>
Expand All @@ -39,6 +44,7 @@ Folder::collectionName()
isize
Folder::collectionCount() const
{
printf("collectionCount: %ld\n", fs->numFiles());
return (isize)fs->numFiles();
}

Expand Down
2 changes: 1 addition & 1 deletion Emulator/Peripherals/Drive/Drive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ Drive::insertMediaFile(class MediaFile &file, bool wp)

AnyCollection &collection = dynamic_cast<AnyCollection &>(file);
insertDisk(std::make_unique<Disk>(collection, wp));

} catch (...) {

throw Error(ERROR_FILE_TYPE_MISMATCH);
Expand Down
2 changes: 1 addition & 1 deletion Emulator/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define SNP_MAJOR 5
#define SNP_MINOR 0
#define SNP_SUBMINOR 0
#define SNP_BETA 1
#define SNP_BETA 2

// Uncomment these settings in a release build
// #define RELEASEBUILD
Expand Down
8 changes: 4 additions & 4 deletions VirtualC64.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2802,7 +2802,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 240530;
CURRENT_PROJECT_VERSION = 240608;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 3NG65ZLYW7;
Expand All @@ -2823,7 +2823,7 @@
LIBRARY_SEARCH_PATHS = "$(inherited)";
LLVM_LTO = NO;
MACOSX_DEPLOYMENT_TARGET = 13.3;
MARKETING_VERSION = 5.0b1;
MARKETING_VERSION = 5.0b2;
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 @@ -2847,7 +2847,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 240530;
CURRENT_PROJECT_VERSION = 240608;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 3NG65ZLYW7;
Expand All @@ -2869,7 +2869,7 @@
LIBRARY_SEARCH_PATHS = "$(inherited)";
LLVM_LTO = YES_THIN;
MACOSX_DEPLOYMENT_TARGET = 13.3;
MARKETING_VERSION = 5.0b1;
MARKETING_VERSION = 5.0b2;
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 5c96285

Please sign in to comment.