-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
80 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,6 @@ | |
// Copyright (C) 2001-2006 PI.([email protected]) | ||
// Copyright (C) 2014-2020 GIMONS | ||
// | ||
// XM6i | ||
// Copyright (C) 2010-2015 [email protected] | ||
// Copyright (C) 2022-2024 Uwe Seimet | ||
// | ||
//--------------------------------------------------------------------------- | ||
|
@@ -34,28 +32,30 @@ class DiskCache : public Cache | |
|
||
private: | ||
|
||
using cache_t = struct { | ||
using CacheData = struct { | ||
shared_ptr<DiskTrack> disktrk; | ||
uint32_t serial; | ||
}; | ||
|
||
shared_ptr<DiskTrack> Assign(int); | ||
shared_ptr<DiskTrack> GetTrack(uint32_t); | ||
bool Load(int index, int track, shared_ptr<DiskTrack>); | ||
void UpdateSerialNumber(); | ||
void UpdateSerial(); | ||
|
||
// Number of tracks to cache | ||
static constexpr int CACHE_MAX = 16; | ||
|
||
array<cache_t, CACHE_MAX> cache = { }; | ||
array<CacheData, CACHE_MAX> cache = { }; | ||
|
||
// Last serial number | ||
uint32_t serial = 0; | ||
// Path | ||
|
||
string sec_path; | ||
// Sector size shift (8=256, 9=512, 10=1024, 11=2048, 12=4096) | ||
int sec_size = 8; | ||
// Blocks | ||
int sec_blocks; | ||
|
||
// Sector size shift (8 = 256, 9 = 512, 10 = 1024, 11 = 2048, 12 = 4096) | ||
int shift_count = 8; | ||
|
||
int blocks; | ||
|
||
uint64_t read_error_count = 0; | ||
uint64_t write_error_count = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.