From d1ef0c0ef5f5e3c2541f373e0bc90a4d317efdb9 Mon Sep 17 00:00:00 2001 From: Nikita Zimin Date: Fri, 10 May 2024 17:06:49 +0300 Subject: [PATCH] WIP fixes --- .github/workflows/push-matrix.yml | 6 ++++++ BKImage.cpp | 2 +- imgos/BKFloppyImage_DaleOS.cpp | 18 +++++++++--------- imgos/BKFloppyImage_DaleOS.h | 6 +++--- imgos/BKFloppyImage_Prototype.cpp | 2 +- 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/push-matrix.yml b/.github/workflows/push-matrix.yml index bab44fc..a897498 100644 --- a/.github/workflows/push-matrix.yml +++ b/.github/workflows/push-matrix.yml @@ -54,3 +54,9 @@ jobs: ./bkdecmd lm ./images/CSIDOS.IMG ./bkdecmd lm ./images/MKDOS315.IMG ./bkdecmd lm ./images/NORD_1.bkd + ./bkdecmd lm -saha1 ./images/ANDOS330.IMG + ./bkdecmd lm -saha1 ./images/AODOS.IMG + ./bkdecmd lm -saha1 ./images/BK_SYS.DSK + ./bkdecmd lm -saha1 ./images/CSIDOS.IMG + ./bkdecmd lm -saha1 ./images/MKDOS315.IMG + ./bkdecmd lm -saha1 ./images/NORD_1.bkd diff --git a/BKImage.cpp b/BKImage.cpp index 501492c..a9990a5 100644 --- a/BKImage.cpp +++ b/BKImage.cpp @@ -116,7 +116,7 @@ uint32_t CBKImage::Open(PARSE_RESULT &pr, const bool bLogDisk) break; case IMAGE_TYPE::DALE: - m_pFloppyImage = std::make_unique < СBKFloppyImage_DaleOS > (pr); + m_pFloppyImage = std::make_unique < CBKFloppyImage_DaleOS > (pr); break; default: diff --git a/imgos/BKFloppyImage_DaleOS.cpp b/imgos/BKFloppyImage_DaleOS.cpp index a8feaf8..c8b65c4 100644 --- a/imgos/BKFloppyImage_DaleOS.cpp +++ b/imgos/BKFloppyImage_DaleOS.cpp @@ -9,7 +9,7 @@ constexpr uint16_t FA$EOC = 4; //1 = признак конца катало constexpr uint16_t FA$SYSTEM = 20; //1 = системный файл -СBKFloppyImage_DaleOS::СBKFloppyImage_DaleOS(const PARSE_RESULT &image) +CBKFloppyImage_DaleOS::CBKFloppyImage_DaleOS(const PARSE_RESULT &image) : CBKFloppyImage_Prototype(image) , m_nDataBlock(0) , m_nDiskSizeBlk(0) @@ -17,17 +17,17 @@ constexpr uint16_t FA$SYSTEM = 20; //1 = системный файл m_vCatBuffer.resize(DALE_CAT_SIZE); } -СBKFloppyImage_DaleOS::~СBKFloppyImage_DaleOS() +CBKFloppyImage_DaleOS::~CBKFloppyImage_DaleOS() { } -// int СBKFloppyImage_DaleOS::FindRecord(DaleOSFileRecord *pPec) +// int CBKFloppyImage_DaleOS::FindRecord(DaleOSFileRecord *pPec) // { // // } -void СBKFloppyImage_DaleOS::ConvertAbstractToRealRecord(BKDirDataItem *pFR, bool bRenameOnly /*= false*/) +void CBKFloppyImage_DaleOS::ConvertAbstractToRealRecord(BKDirDataItem *pFR, bool bRenameOnly /*= false*/) { auto pRec = reinterpret_cast(pFR->pSpecificData); // Вот эту запись надо добавить @@ -70,7 +70,7 @@ void СBKFloppyImage_DaleOS::ConvertAbstractToRealRecord(BKDirDataItem *pFR, boo } -void СBKFloppyImage_DaleOS::ConvertRealToAbstractRecord(BKDirDataItem *pFR) +void CBKFloppyImage_DaleOS::ConvertRealToAbstractRecord(BKDirDataItem *pFR) { auto pRec = reinterpret_cast(pFR->pSpecificData); // Вот эту запись надо преобразовать @@ -103,7 +103,7 @@ void СBKFloppyImage_DaleOS::ConvertRealToAbstractRecord(BKDirDataItem *pFR) } } -bool СBKFloppyImage_DaleOS::ReadDaleCatalog() +bool CBKFloppyImage_DaleOS::ReadDaleCatalog() { // Перемещаемся к блоку с битовой картой и читаем его if (!SeektoBlkReadData(DALE_BITMAP_BLK, m_nSector, sizeof(m_nSector))) @@ -173,7 +173,7 @@ bool СBKFloppyImage_DaleOS::ReadDaleCatalog() return true; } -bool СBKFloppyImage_DaleOS::ReadCurrentDir() +bool CBKFloppyImage_DaleOS::ReadCurrentDir() { if (!CBKFloppyImage_Prototype::ReadCurrentDir()) { @@ -203,7 +203,7 @@ bool СBKFloppyImage_DaleOS::ReadCurrentDir() return true; } -bool СBKFloppyImage_DaleOS::ReadFile(BKDirDataItem *pFR, uint8_t *pBuffer) +bool CBKFloppyImage_DaleOS::ReadFile(BKDirDataItem *pFR, uint8_t *pBuffer) { m_nLastErrorNumber = IMAGE_ERROR::OK_NOERRORS; bool bRet = true; @@ -233,7 +233,7 @@ bool СBKFloppyImage_DaleOS::ReadFile(BKDirDataItem *pFR, uint8_t *pBuffer) //#ifdef _DEBUG //// отладочный вывод каталога -//void СBKFloppyImage_DaleOS::DebugOutCatalog() +//void CBKFloppyImage_DaleOS::DebugOutCatalog() //{ // auto strModuleName = std::vector(_MAX_PATH); // ::GetModuleFileName(AfxGetInstanceHandle(), strModuleName.data(), _MAX_PATH); diff --git a/imgos/BKFloppyImage_DaleOS.h b/imgos/BKFloppyImage_DaleOS.h index 5917322..9ae1b18 100644 --- a/imgos/BKFloppyImage_DaleOS.h +++ b/imgos/BKFloppyImage_DaleOS.h @@ -54,7 +54,7 @@ constexpr auto DALE_BITMAP_CRC_OFFSET = 054; // контрольная сумм constexpr auto DALE_BITMAP_ARRAY_OFFSET = 056; // собственно битовая карта, размер 01000-056 байтов -class СBKFloppyImage_DaleOS : +class CBKFloppyImage_DaleOS : public CBKFloppyImage_Prototype { std::vector m_vCatBuffer; // буфер каталога @@ -90,8 +90,8 @@ class СBKFloppyImage_DaleOS : virtual void ConvertRealToAbstractRecord(BKDirDataItem *pFR) override; public: - СBKFloppyImage_DaleOS(const PARSE_RESULT &image); - virtual ~СBKFloppyImage_DaleOS() override; + CBKFloppyImage_DaleOS(const PARSE_RESULT &image); + virtual ~CBKFloppyImage_DaleOS() override; /* прочитать каталог образа. на выходе: заполненная структура m_sDiskCat */ virtual bool ReadCurrentDir() override; diff --git a/imgos/BKFloppyImage_Prototype.cpp b/imgos/BKFloppyImage_Prototype.cpp index d41ce44..2426398 100644 --- a/imgos/BKFloppyImage_Prototype.cpp +++ b/imgos/BKFloppyImage_Prototype.cpp @@ -166,7 +166,7 @@ std::wstring CBKFloppyImage_Prototype::CalcFileSHA1(BKDirDataItem *fr) if (fr == nullptr || (fr->nAttr & (FR_ATTR::DIR | FR_ATTR::LINK)) != 0) return L""; - std::vector vec(fr->nBlkSize * BLOCK_SIZE); + std::vector vec(fr->nSize); if (!ReadFile(fr, vec.data())) { //TODO: Показать ошибку