mirror of
https://github.com/livingcomputermuseum/UniBone.git
synced 2026-04-25 03:35:42 +00:00
Implemented the last few unimplemented MSCP commands; as yet untested with real PDP-11/VAX code (have yet to find a case that uses them.)
General code cleanup/refactoring. Added header comments. Added "use image size" parameter for MSCP disks -- block count derived from image file size rather than DEC drive geometry; allows for arbitrarily large disks (up to 2TB, theoretically.)
This commit is contained in:
@@ -145,6 +145,12 @@ void storagedrive_c::file_write(uint8_t *buffer, uint64_t position, unsigned len
|
||||
f.flush();
|
||||
}
|
||||
|
||||
uint64_t storagedrive_c::file_size(void)
|
||||
{
|
||||
f.seekp(0, ios::end);
|
||||
return f.tellp();
|
||||
}
|
||||
|
||||
void storagedrive_c::file_close(void) {
|
||||
assert(file_is_open());
|
||||
f.close();
|
||||
|
||||
@@ -67,6 +67,7 @@ public:
|
||||
bool file_is_open(void);
|
||||
void file_read(uint8_t *buffer, uint64_t position, unsigned len);
|
||||
void file_write(uint8_t *buffer, uint64_t position, unsigned len);
|
||||
uint64_t file_size(void);
|
||||
void file_close(void);
|
||||
|
||||
storagedrive_c(storagecontroller_c *controller);
|
||||
|
||||
Reference in New Issue
Block a user