Skip to content

Commit

Permalink
WIP fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nzeemin committed May 10, 2024
1 parent f5fee21 commit d1ef0c0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/push-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion BKImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
18 changes: 9 additions & 9 deletions imgos/BKFloppyImage_DaleOS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ 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)
{
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<DaleOSFileRecord *>(pFR->pSpecificData); // Вот эту запись надо добавить

Expand Down Expand Up @@ -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<DaleOSFileRecord *>(pFR->pSpecificData); // Вот эту запись надо преобразовать

Expand Down Expand Up @@ -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)))
Expand Down Expand Up @@ -173,7 +173,7 @@ bool СBKFloppyImage_DaleOS::ReadDaleCatalog()
return true;
}

bool СBKFloppyImage_DaleOS::ReadCurrentDir()
bool CBKFloppyImage_DaleOS::ReadCurrentDir()
{
if (!CBKFloppyImage_Prototype::ReadCurrentDir())
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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<wchar_t>(_MAX_PATH);
// ::GetModuleFileName(AfxGetInstanceHandle(), strModuleName.data(), _MAX_PATH);
Expand Down
6 changes: 3 additions & 3 deletions imgos/BKFloppyImage_DaleOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint8_t> m_vCatBuffer; // буфер каталога
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion imgos/BKFloppyImage_Prototype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint8_t> vec(fr->nBlkSize * BLOCK_SIZE);
std::vector<uint8_t> vec(fr->nSize);
if (!ReadFile(fr, vec.data()))
{
//TODO: Показать ошибку
Expand Down

0 comments on commit d1ef0c0

Please sign in to comment.