aboutsummaryrefslogtreecommitdiff
path: root/jindroush/include
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-05-16 01:43:09 -0400
committerB. Watson <urchlay@slackware.uk>2024-05-16 01:43:09 -0400
commita4cc3ad3504d634e379369862c9f9fd8eed379f3 (patch)
tree7b6f55c352a4ca62dddaa1b4a6854799111d2d2f /jindroush/include
parentb33c25d1363110e6e4a714530f460b0ff951f56b (diff)
downloadbw-atari8-tools-a4cc3ad3504d634e379369862c9f9fd8eed379f3.tar.gz
Add Jindrich Kubec's tools.
Diffstat (limited to 'jindroush/include')
-rw-r--r--jindroush/include/adsk.h75
-rw-r--r--jindroush/include/adsk_atr.h38
-rw-r--r--jindroush/include/adsk_dcm.h72
-rw-r--r--jindroush/include/adsk_di.h38
-rw-r--r--jindroush/include/adsk_scp.h37
-rw-r--r--jindroush/include/adsk_xfd.h38
-rw-r--r--jindroush/include/at_dis.h25
-rw-r--r--jindroush/include/autil.h35
-rw-r--r--jindroush/include/cdisk.h95
-rw-r--r--jindroush/include/cdsk.h72
-rw-r--r--jindroush/include/cdsk_atr.h38
-rw-r--r--jindroush/include/cdsk_dcm.h72
-rw-r--r--jindroush/include/cdsk_scp.h37
-rw-r--r--jindroush/include/cdsk_xfd.h38
-rw-r--r--jindroush/include/cfile.h54
-rw-r--r--jindroush/include/cfs.h65
-rw-r--r--jindroush/include/cfs_b2b.h42
-rw-r--r--jindroush/include/cfs_boot.h42
-rw-r--r--jindroush/include/cfs_dos2.h67
-rw-r--r--jindroush/include/cfs_dos3.h59
-rw-r--r--jindroush/include/cfs_dosm.h66
-rw-r--r--jindroush/include/cfs_doss.h70
-rw-r--r--jindroush/include/cfs_howf.h43
-rw-r--r--jindroush/include/cfs_jonw.h43
-rw-r--r--jindroush/include/cfs_kboo.h42
-rw-r--r--jindroush/include/cfs_robc.h43
-rw-r--r--jindroush/include/cgenfile.h55
-rw-r--r--jindroush/include/cobj.h34
-rw-r--r--jindroush/include/cprefile.h56
-rw-r--r--jindroush/include/errbase.h26
-rw-r--r--jindroush/include/jintypes.h95
31 files changed, 1612 insertions, 0 deletions
diff --git a/jindroush/include/adsk.h b/jindroush/include/adsk.h
new file mode 100644
index 0000000..6786d8a
--- /dev/null
+++ b/jindroush/include/adsk.h
@@ -0,0 +1,75 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __ADSK_H__
+#define __ADSK_H__
+
+#include "jintypes.h"
+#include "cobj.h"
+#include "cdsk.h"
+
+#define MAX_ATARI_SECTOR_LEN 0x100
+
+typedef enum
+{
+ DISK_AUTO,
+ DISK_ATR,
+ DISK_ATRb,
+ DISK_XFD,
+ DISK_XFDb,
+ DISK_SCP,
+ DISK_DCM,
+ DISK_DI
+} DISK_TYPE;
+
+typedef enum
+{
+ DI_RET_OK,
+ DI_RET_CANT_CONTINUE,
+ DI_RET_CONTINUE
+} DISKINIT_RETCODE;
+
+class ADisk : public CDisk
+{
+public:
+ ADisk();
+ ~ADisk();
+
+ BOOL ReadSectors( void*, int, int );
+ BOOL WriteSectors( int, void*, int );
+
+ int GetBootSectorCount();
+ int GetBootSectorSize();
+ BOOL GetBootSector( BYTE* );
+};
+
+void GuessClassicSizes( int, int, DISK_GEOMETRY* );
+void ForceClassicSize( int, int, DISK_GEOMETRY* );
+void ForceClassicSize( DISK_GEOMETRY* );
+
+char* GetDiskTypeName( DISK_TYPE disktype );
+char* GetDiskTypeExt( DISK_TYPE disktype );
+
+DISKINIT_RETCODE InitializeDisk( ADisk**, DISK_TYPE, char*, BOOL bVerbose, BOOL, BOOL );
+
+
+#include "adsk_atr.h"
+#include "adsk_xfd.h"
+#include "adsk_scp.h"
+#include "adsk_dcm.h"
+#include "adsk_di.h"
+
+#endif //_ADSK_H__
+
diff --git a/jindroush/include/adsk_atr.h b/jindroush/include/adsk_atr.h
new file mode 100644
index 0000000..189b030
--- /dev/null
+++ b/jindroush/include/adsk_atr.h
@@ -0,0 +1,38 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CATR_H__
+#define __CATR_H__
+
+#include "jintypes.h"
+#include "errbase.h"
+#include "adsk.h"
+
+#define CATR_FORMAT_VIOLATED ( CATR_BASE + 0 )
+
+class CAtr : public ADisk
+{
+public:
+ CAtr();
+ ~CAtr();
+
+ BOOL Load( char*, BOOL = FALSE, BOOL = FALSE );
+
+ BOOL Save( char*, BOOL );
+private:
+};
+
+#endif
+
diff --git a/jindroush/include/adsk_dcm.h b/jindroush/include/adsk_dcm.h
new file mode 100644
index 0000000..4e5ca3e
--- /dev/null
+++ b/jindroush/include/adsk_dcm.h
@@ -0,0 +1,72 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CDCM_H__
+#define __CDCM_H__
+
+#include "errbase.h"
+#include "jintypes.h"
+#include "adsk.h"
+#include "cfile.h"
+#include "cprefile.h"
+
+#define CDCM_FORMAT_VIOLATED ( CDCM_BASE + 0 )
+
+class CDcm : public ADisk
+{
+public:
+ CDcm();
+ ~CDcm();
+
+ BOOL Load( char*, BOOL = FALSE, BOOL = FALSE );
+
+ BOOL Save( char*, BOOL );
+
+private:
+
+ BOOL DecodeRec41( CGenFile& );
+ BOOL DecodeRec42( CGenFile& );
+ BOOL DecodeRec43( CGenFile& );
+ BOOL DecodeRec44( CGenFile& );
+ BOOL DecodeRec46( CGenFile& );
+ BOOL DecodeRec47( CGenFile& );
+ BOOL DecodeRecFA( CGenFile& );
+ WORD ReadOffset( CGenFile& );
+
+ void EncodeRec41( BYTE*, int*, BYTE*, BYTE*, int );
+ void EncodeRec43( BYTE*, int*, BYTE*, int );
+ void EncodeRec44( BYTE*, int*, BYTE*, BYTE*, int );
+
+ void EncodeRec45();
+ void EncodeRec46();
+ void EncodeRec( BOOL );
+ void EncodeRecFA( BOOL, int, int, int );
+
+ BOOL m_bLastPass;
+ BYTE m_abtCurrBuff[ 0x100 ];
+ BYTE m_abtPrevBuff[ 0x100 ];
+ int m_iSectorSize;
+ WORD m_wCurrentSector;
+ long m_lFileLength;
+ BOOL m_bAlreadyFormatted;
+
+
+ BYTE* m_pbtCurr;
+ BYTE* m_pbtPass;
+ BYTE* m_pbtLastRec;
+};
+
+#endif
+
diff --git a/jindroush/include/adsk_di.h b/jindroush/include/adsk_di.h
new file mode 100644
index 0000000..fb1a527
--- /dev/null
+++ b/jindroush/include/adsk_di.h
@@ -0,0 +1,38 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CDI_H__
+#define __CDI_H__
+
+#include "jintypes.h"
+#include "errbase.h"
+#include "adsk.h"
+
+#define CDI_FORMAT_VIOLATED ( CDI_BASE + 0 )
+
+class CDi : public ADisk
+{
+public:
+ CDi();
+ ~CDi();
+
+ BOOL Load( char*, BOOL = FALSE, BOOL = FALSE );
+
+ BOOL Save( char*, BOOL );
+private:
+};
+
+#endif
+
diff --git a/jindroush/include/adsk_scp.h b/jindroush/include/adsk_scp.h
new file mode 100644
index 0000000..933fc68
--- /dev/null
+++ b/jindroush/include/adsk_scp.h
@@ -0,0 +1,37 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CSCP_H__
+#define __CSCP_H__
+
+#include "jintypes.h"
+#include "adsk.h"
+
+#define CSCP_FORMAT_VIOLATED ( CSCP_BASE + 0 )
+
+class CScp : public ADisk
+{
+public:
+ CScp();
+ ~CScp();
+
+ BOOL Load( char*, BOOL = FALSE, BOOL = FALSE );
+ BOOL Save( char*, BOOL );
+
+private:
+};
+
+#endif
+
diff --git a/jindroush/include/adsk_xfd.h b/jindroush/include/adsk_xfd.h
new file mode 100644
index 0000000..1870b70
--- /dev/null
+++ b/jindroush/include/adsk_xfd.h
@@ -0,0 +1,38 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CXFD_H__
+#define __CXFD_H__
+
+#include "jintypes.h"
+#include "adsk.h"
+#include "errbase.h"
+
+#define CXFD_FORMAT_VIOLATED ( CXFD_BASE + 0 )
+
+class CXfd : public ADisk
+{
+public:
+ CXfd();
+ ~CXfd();
+
+ BOOL Load( char*, BOOL = FALSE, BOOL = FALSE );
+ BOOL Save( char*, BOOL );
+
+private:
+};
+
+#endif
+
diff --git a/jindroush/include/at_dis.h b/jindroush/include/at_dis.h
new file mode 100644
index 0000000..c489e60
--- /dev/null
+++ b/jindroush/include/at_dis.h
@@ -0,0 +1,25 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __AT_DIS_H__
+#define __AT_DIS_H__
+
+#include "jintypes.h"
+
+void OutputBlockDiss( BYTE*, WORD, WORD );
+char* SymbolFind( WORD, BOOL );
+
+#endif
+
diff --git a/jindroush/include/autil.h b/jindroush/include/autil.h
new file mode 100644
index 0000000..66c569c
--- /dev/null
+++ b/jindroush/include/autil.h
@@ -0,0 +1,35 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __AUTIL_H__
+#define __AUTIL_H__
+
+#include "jintypes.h"
+
+void ADos2MsDos( char*, char* );
+void GuessBestFnameFromPC( char* szDest, char* szSrc, char* szExt, char* szAdd = NULL );
+void GuessBestFnameFromAtari( char* szDest, char* szSrc, char* szExt );
+
+BOOL IsBlockEmpty( BYTE*, int );
+
+#define MGET_B( p ) ( *(p++ ) );
+#define MGET_LEW( p ) ( *p + ((*(p+1) ) <<8) ),p+=2;
+#define MGET_BEW( p ) ( *(p+1) + ((*(p) ) <<8) ),p+=2;
+
+#define MREAD_B( p ) ( *p );
+#define MREAD_LEW( p ) ( *p + ((*(p+1) ) <<8) );
+#define MREAD_BEW( p ) ( *(p+1) + ((*(p) ) <<8) );
+
+#endif
diff --git a/jindroush/include/cdisk.h b/jindroush/include/cdisk.h
new file mode 100644
index 0000000..4542ccd
--- /dev/null
+++ b/jindroush/include/cdisk.h
@@ -0,0 +1,95 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CDISK_H__
+#define __CDISK_H__
+
+#include "jintypes.h"
+#include "cobj.h"
+
+#define CDISK_ERROR_CANT_OPEN ( CDISK_BASE + 0 )
+
+typedef enum
+{
+ DISK_AUTO,
+ DISK_ATR,
+ DISK_ATRb,
+ DISK_XFD,
+ DISK_XFDb,
+ DISK_SCP,
+ DISK_DCM
+} DISK_TYPE;
+
+typedef enum
+{
+ DI_RET_OK,
+ DI_RET_CANT_CONTINUE,
+ DI_RET_CONTINUE
+} DISKINIT_RETCODE;
+
+typedef struct
+{
+ int iSides;
+ int iTracks;
+ int iSectorsPerTrack;
+ int iBytesPerSector;
+ int iSectors;
+} DISK_GEOMETRY;
+
+class CDisk : public CObj
+{
+public:
+ CDisk();
+ virtual ~CDisk();
+
+ virtual BOOL Load( char*, BOOL = FALSE, BOOL = FALSE ) = 0;
+
+ #ifdef __CDISK_WRITE__
+ virtual BOOL Save( char*, BOOL ) = 0;
+ #endif
+
+ BOOL Format( DISK_GEOMETRY* );
+
+ DISK_GEOMETRY* GetGeometry() { return &m_geometry; };
+ int GetSectorSize() { return m_geometry.iBytesPerSector; };
+ int GetSectorCount() { return m_geometry.iSectors; };
+
+ BOOL ReadSector( void*, int );
+ BOOL WriteSector( int, void* );
+
+ BOOL ReadSectors( void*, int, int );
+ BOOL WriteSectors( int, void*, int );
+
+ BOOL Duplicate( CDisk* );
+
+ char* GetImageName() { return m_szFname; };
+
+protected:
+ DISK_GEOMETRY m_geometry;
+ BOOL m_bOpened;
+ BYTE *m_pbtMemory;
+ int m_iAllocated;
+
+ char m_szFname[ 255 ];
+};
+
+void GuessClassicSizes( int, int, DISK_GEOMETRY* );
+
+char* GetDiskTypeName( DISK_TYPE disktype );
+char* GetDiskTypeExt( DISK_TYPE disktype );
+
+DISKINIT_RETCODE InitializeDisk( CDisk**, DISK_TYPE, char*, BOOL bVerbose, BOOL, BOOL );
+
+#endif
diff --git a/jindroush/include/cdsk.h b/jindroush/include/cdsk.h
new file mode 100644
index 0000000..50461e2
--- /dev/null
+++ b/jindroush/include/cdsk.h
@@ -0,0 +1,72 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CDISK_H__
+#define __CDISK_H__
+
+#include "jintypes.h"
+#include "cobj.h"
+
+#define CDISK_ERROR_CANT_OPEN ( CDISK_BASE + 0 )
+
+typedef struct
+{
+ int iSides;
+ int iTracks;
+ int iSectorsPerTrack;
+ int iBytesPerSector;
+ int iSectors;
+} DISK_GEOMETRY;
+
+class CDisk : public CObj
+{
+public:
+ CDisk();
+ virtual ~CDisk();
+
+ #ifndef __CDISK_NOLOAD__
+ virtual BOOL Load( char*, BOOL = FALSE, BOOL = FALSE ) = 0;
+ #endif
+
+ #ifdef __CDISK_SAVE__
+ virtual BOOL Save( char*, BOOL ) = 0;
+ #endif
+
+ BOOL Format( DISK_GEOMETRY* );
+
+ DISK_GEOMETRY* GetGeometry() { return &m_geometry; };
+ int GetSectorSize() { return m_geometry.iBytesPerSector; };
+ int GetSectorCount() { return m_geometry.iSectors; };
+
+ BOOL ReadSector( void*, int );
+ BOOL WriteSector( int, void* );
+
+ BOOL Duplicate( CDisk*, DISK_GEOMETRY* = NULL );
+
+ char* GetImageName() { return m_szFname; };
+
+protected:
+ DISK_GEOMETRY m_geometry;
+ BOOL m_bHasData;
+ BYTE *m_pbtMemory;
+ int m_iAllocated;
+
+ char m_szFname[ 255 ];
+
+ int m_iMaxSectorWritten;
+
+};
+
+#endif
diff --git a/jindroush/include/cdsk_atr.h b/jindroush/include/cdsk_atr.h
new file mode 100644
index 0000000..3f4ac11
--- /dev/null
+++ b/jindroush/include/cdsk_atr.h
@@ -0,0 +1,38 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CATR_H__
+#define __CATR_H__
+
+#include "jintypes.h"
+#include "errbase.h"
+#include "cdisk.h"
+
+#define CATR_FORMAT_VIOLATED ( CATR_BASE + 0 )
+
+class CAtr : public CDisk
+{
+public:
+ CAtr();
+ ~CAtr();
+
+ BOOL Load( char*, BOOL = FALSE, BOOL = FALSE );
+
+ BOOL Save( char*, BOOL );
+private:
+};
+
+#endif
+
diff --git a/jindroush/include/cdsk_dcm.h b/jindroush/include/cdsk_dcm.h
new file mode 100644
index 0000000..c891852
--- /dev/null
+++ b/jindroush/include/cdsk_dcm.h
@@ -0,0 +1,72 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CDCM_H__
+#define __CDCM_H__
+
+#include "errbase.h"
+#include "jintypes.h"
+#include "cdisk.h"
+#include "cfile.h"
+#include "cprefile.h"
+
+#define CDCM_FORMAT_VIOLATED ( CDCM_BASE + 0 )
+
+class CDcm : public CDisk
+{
+public:
+ CDcm();
+ ~CDcm();
+
+ BOOL Load( char*, BOOL = FALSE, BOOL = FALSE );
+
+ BOOL Save( char*, BOOL );
+
+private:
+
+ BOOL DecodeRec41( CGenFile& );
+ BOOL DecodeRec42( CGenFile& );
+ BOOL DecodeRec43( CGenFile& );
+ BOOL DecodeRec44( CGenFile& );
+ BOOL DecodeRec46( CGenFile& );
+ BOOL DecodeRec47( CGenFile& );
+ BOOL DecodeRecFA( CGenFile& );
+ WORD ReadOffset( CGenFile& );
+
+ void EncodeRec41( BYTE*, int*, BYTE*, BYTE*, int );
+ void EncodeRec43( BYTE*, int*, BYTE*, int );
+ void EncodeRec44( BYTE*, int*, BYTE*, BYTE*, int );
+
+ void EncodeRec45();
+ void EncodeRec46();
+ void EncodeRec( BOOL );
+ void EncodeRecFA( BOOL, int, int, int );
+
+ BOOL m_bLastPass;
+ BYTE m_abtCurrBuff[ 0x100 ];
+ BYTE m_abtPrevBuff[ 0x100 ];
+ int m_iSectorSize;
+ WORD m_wCurrentSector;
+ long m_lFileLength;
+ BOOL m_bAlreadyFormatted;
+
+
+ BYTE* m_pbtCurr;
+ BYTE* m_pbtPass;
+ BYTE* m_pbtLastRec;
+};
+
+#endif
+
diff --git a/jindroush/include/cdsk_scp.h b/jindroush/include/cdsk_scp.h
new file mode 100644
index 0000000..7d43f6b
--- /dev/null
+++ b/jindroush/include/cdsk_scp.h
@@ -0,0 +1,37 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CSCP_H__
+#define __CSCP_H__
+
+#include "jintypes.h"
+#include "cdisk.h"
+
+#define CSCP_FORMAT_VIOLATED ( CSCP_BASE + 0 )
+
+class CScp : public CDisk
+{
+public:
+ CScp();
+ ~CScp();
+
+ BOOL Load( char*, BOOL = FALSE, BOOL = FALSE );
+ BOOL Save( char*, BOOL );
+
+private:
+};
+
+#endif
+
diff --git a/jindroush/include/cdsk_xfd.h b/jindroush/include/cdsk_xfd.h
new file mode 100644
index 0000000..3acadc5
--- /dev/null
+++ b/jindroush/include/cdsk_xfd.h
@@ -0,0 +1,38 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CXFD_H__
+#define __CXFD_H__
+
+#include "jintypes.h"
+#include "cdisk.h"
+#include "errbase.h"
+
+#define CXFD_FORMAT_VIOLATED ( CXFD_BASE + 0 )
+
+class CXfd : public CDisk
+{
+public:
+ CXfd();
+ ~CXfd();
+
+ BOOL Load( char*, BOOL = FALSE, BOOL = FALSE );
+ BOOL Save( char*, BOOL );
+
+private:
+};
+
+#endif
+
diff --git a/jindroush/include/cfile.h b/jindroush/include/cfile.h
new file mode 100644
index 0000000..4f65e9e
--- /dev/null
+++ b/jindroush/include/cfile.h
@@ -0,0 +1,54 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#include "jintypes.h"
+#include "cgenfile.h"
+
+#ifndef __CFILE_H__
+#define __CFILE_H__
+
+
+class CFile : public CGenFile
+{
+public:
+ CFile();
+ ~CFile();
+
+ BOOL Open( char* );
+ BOOL Create( char* );
+
+ BOOL Read( void*, int, int* = NULL );
+ BOOL Write( void*, int, int* = NULL );
+
+ BOOL Seek( long, int );
+ long GetLength() { return m_lLength; };
+ DWORD GetLastError() { return m_dwLastError; };
+ void Close();
+
+ BOOL IsDirty() { return m_bIsDirty; };
+
+private:
+ BOOL m_bOpened;
+ BOOL m_bIsDirty;
+
+ int m_hFile;
+
+ DWORD m_dwLastError;
+
+ LONG m_lLength;
+
+};
+
+#endif //__CFILE_H__
diff --git a/jindroush/include/cfs.h b/jindroush/include/cfs.h
new file mode 100644
index 0000000..c7b1651
--- /dev/null
+++ b/jindroush/include/cfs.h
@@ -0,0 +1,65 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CFS_H__
+#define __CFS_H__
+
+#include "adsk.h"
+#include "cobj.h"
+
+#define DIRE_DELETED 0x00000001
+#define DIRE_SUBDIR 0x00000002
+
+class CDirEntry
+{
+public:
+ CDirEntry();
+ ~CDirEntry();
+
+ char m_szFname[ 256 ];
+ char m_szAscData[ 256 ];
+ DWORD m_dwFlags;
+ CDirEntry* m_pSubdir;
+ CDirEntry* m_pNext;
+ CDirEntry* m_pPrev;
+};
+
+class CFs : public CObj
+{
+public:
+
+ CFs();
+ virtual ~CFs();
+
+ virtual BOOL Mount( ADisk* ) = 0;
+ virtual void Dismount() = 0;
+ virtual BOOL ExportFile( char*, CDirEntry* ) = 0;
+ CDirEntry* GetRoot() { return m_pRoot; };
+
+ int GetInvalidPercent() { return (m_iFilesInvalid+m_iFilesValid) ? ( m_iFilesInvalid * 100 ) / ( m_iFilesValid + m_iFilesInvalid ) : 0; };
+
+ void DeleteList( CDirEntry* );
+
+protected:
+ int m_iFilesValid;
+ int m_iFilesInvalid;
+
+
+ CDirEntry* m_pRoot;
+ ADisk* m_pDisk;
+};
+
+#endif
+
diff --git a/jindroush/include/cfs_b2b.h b/jindroush/include/cfs_b2b.h
new file mode 100644
index 0000000..2b838bb
--- /dev/null
+++ b/jindroush/include/cfs_b2b.h
@@ -0,0 +1,42 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CBAS2BOOT_H__
+#define __CBAS2BOOT_H__
+
+#include "jintypes.h"
+#include "cfs.h"
+
+class CBas2BootDirEntry : public CDirEntry
+{
+public:
+ DWORD m_dwFileLen;
+};
+
+class CBas2Boot : public CFs
+{
+public:
+ CBas2Boot();
+ ~CBas2Boot();
+
+ BOOL Mount( ADisk* );
+ void Dismount();
+ BOOL ExportFile( char*, CDirEntry* );
+
+private:
+ CBas2BootDirEntry* CreateEntry();
+};
+
+#endif
diff --git a/jindroush/include/cfs_boot.h b/jindroush/include/cfs_boot.h
new file mode 100644
index 0000000..e440e67
--- /dev/null
+++ b/jindroush/include/cfs_boot.h
@@ -0,0 +1,42 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CBOOT_H__
+#define __CBOOT_H__
+
+#include "jintypes.h"
+#include "cfs.h"
+
+class CBootDirEntry : public CDirEntry
+{
+public:
+ int m_iSectorCount;
+};
+
+class CBoot : public CFs
+{
+public:
+ CBoot();
+ ~CBoot();
+
+ BOOL Mount( ADisk* );
+ void Dismount();
+ BOOL ExportFile( char*, CDirEntry* );
+
+private:
+ CBootDirEntry* CreateEntry();
+};
+
+#endif
diff --git a/jindroush/include/cfs_dos2.h b/jindroush/include/cfs_dos2.h
new file mode 100644
index 0000000..867755d
--- /dev/null
+++ b/jindroush/include/cfs_dos2.h
@@ -0,0 +1,67 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CDOS2_H__
+#define __CDOS2_H__
+
+#include "jintypes.h"
+#include "cfs.h"
+
+#pragma pack(1)
+typedef struct
+{
+ BYTE btFlags;
+ WORD wSecCount; //Number of sectors in file
+ WORD wSecStart; //First sector in file
+ CHAR acAtariName[11];
+} DOS2_DIRENT;
+
+#pragma pack()
+
+//flags bits:
+// 0x80 7->deleted
+// 0x40 6->in use
+// 0x20 5->locked
+// 0x10 4->mydos subdir
+// 0x08 3->
+// 0x04 2->
+// 0x02 1->
+// 0x01 0->write open
+
+class CDos2DirEntry : public CDirEntry
+{
+public:
+ WORD m_wFileNumber;
+ BYTE m_btFlags;
+ WORD m_wSecCount; //Number of sectors in file
+ WORD m_wSecStart; //First sector in file
+};
+
+class CDos2 : public CFs
+{
+public:
+ CDos2();
+ ~CDos2();
+
+ BOOL Mount( ADisk* );
+ void Dismount();
+ BOOL ExportFile( char*, CDirEntry* );
+
+private:
+ CDos2DirEntry* CreateEntry( DOS2_DIRENT*, WORD );
+
+};
+
+#endif
diff --git a/jindroush/include/cfs_dos3.h b/jindroush/include/cfs_dos3.h
new file mode 100644
index 0000000..9e7133a
--- /dev/null
+++ b/jindroush/include/cfs_dos3.h
@@ -0,0 +1,59 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CDOS3_H__
+#define __CDOS3_H__
+
+#include "jintypes.h"
+#include "cfs.h"
+
+#pragma pack(1)
+typedef struct
+{
+ BYTE btFlags;
+ CHAR acAtariName[11];
+ BYTE btSecCount;
+ BYTE btSecStart;
+ WORD wFileLen;
+} DOS3_DIRENT;
+
+#pragma pack()
+
+class CDos3DirEntry : public CDirEntry
+{
+public:
+ BYTE m_btSecStart;
+ BYTE m_btSecCount;
+ BYTE m_btFlags;
+ WORD m_wFileLen;
+};
+
+class CDos3 : public CFs
+{
+public:
+ CDos3();
+ ~CDos3();
+
+ BOOL Mount( ADisk* );
+ void Dismount();
+ BOOL ExportFile( char*, CDirEntry* );
+
+private:
+ CDos3DirEntry* CreateEntry( DOS3_DIRENT* );
+
+ BYTE m_abtFat[ 0x0100 ];
+};
+
+#endif
diff --git a/jindroush/include/cfs_dosm.h b/jindroush/include/cfs_dosm.h
new file mode 100644
index 0000000..9ef9262
--- /dev/null
+++ b/jindroush/include/cfs_dosm.h
@@ -0,0 +1,66 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CDOSM_H__
+#define __CDOSM_H__
+
+#include "jintypes.h"
+#include "cfs.h"
+
+#pragma pack(1)
+typedef struct
+{
+ BYTE btFlags;
+ WORD wSecCount; //Number of sectors in file
+ WORD wSecStart; //First sector in file
+ CHAR acAtariName[11];
+} DOSM_DIRENT;
+
+#pragma pack()
+
+//flags bits:
+// 0x80 7->deleted
+// 0x40 6->in use
+// 0x20 5->locked
+// 0x10 4->mydos subdir
+// 0x08 3->
+// 0x04 2->
+// 0x02 1->
+// 0x01 0->write open
+
+class CDosMDirEntry : public CDirEntry
+{
+public:
+ BYTE m_btFlags;
+ WORD m_wSecCount; //Number of sectors in file
+ WORD m_wSecStart; //First sector in file
+};
+
+class CDosM : public CFs
+{
+public:
+ CDosM();
+ ~CDosM();
+
+ BOOL Mount( ADisk* );
+ void Dismount();
+ BOOL ExportFile( char*, CDirEntry* );
+ BOOL ReadDir( int, CDosMDirEntry** );
+
+private:
+ CDosMDirEntry* CreateEntry( DOSM_DIRENT* );
+};
+
+#endif
diff --git a/jindroush/include/cfs_doss.h b/jindroush/include/cfs_doss.h
new file mode 100644
index 0000000..31b5124
--- /dev/null
+++ b/jindroush/include/cfs_doss.h
@@ -0,0 +1,70 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CDOSS_H__
+#define __CDOSS_H__
+
+#include "jintypes.h"
+#include "cfs.h"
+
+#pragma pack(1)
+typedef struct
+{
+ BYTE btFlags;
+ WORD wSector;
+ WORD wSizeLo;
+ BYTE btSizeHi;
+ CHAR acAtariName[11];
+ BYTE btDay;
+ BYTE btMonth;
+ BYTE btYear;
+ BYTE btHour;
+ BYTE btMinute;
+ BYTE btSecond;
+} DOSS_DIRENT;
+
+#pragma pack()
+
+class CDosSDirEntry : public CDirEntry
+{
+public:
+ BYTE m_btFlags;
+ int m_iLength;
+ int m_iLinkSector;
+};
+
+class CDosS : public CFs
+{
+public:
+ CDosS();
+ ~CDosS();
+
+ BOOL Mount( ADisk* );
+ void Dismount();
+ BOOL ExportFile( char*, CDirEntry* );
+ BOOL ReadDir( int, CDosSDirEntry** );
+
+private:
+ CDosSDirEntry* CreateEntry( DOSS_DIRENT* );
+ int GetSectorLinkEntry( int, int );
+
+ BYTE* MapFile( int, int );
+ void UnMapFile( BYTE* );
+
+ WORD m_wMainDirStart;
+ WORD m_wSectorSize;
+};
+
+#endif
diff --git a/jindroush/include/cfs_howf.h b/jindroush/include/cfs_howf.h
new file mode 100644
index 0000000..9705ad9
--- /dev/null
+++ b/jindroush/include/cfs_howf.h
@@ -0,0 +1,43 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CHOWF_H__
+#define __CHOWF_H__
+
+#include "jintypes.h"
+#include "cfs.h"
+
+class CHowfDirEntry : public CDirEntry
+{
+public:
+ int m_iStartSec;
+ int m_iSecCount;
+};
+
+class CHowf : public CFs
+{
+public:
+ CHowf();
+ ~CHowf();
+
+ BOOL Mount( ADisk* );
+ void Dismount();
+ BOOL ExportFile( char*, CDirEntry* );
+
+private:
+ CHowfDirEntry* CreateEntry( WORD, BYTE* );
+};
+
+#endif
diff --git a/jindroush/include/cfs_jonw.h b/jindroush/include/cfs_jonw.h
new file mode 100644
index 0000000..6131c76
--- /dev/null
+++ b/jindroush/include/cfs_jonw.h
@@ -0,0 +1,43 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CJONW_H__
+#define __CJONW_H__
+
+#include "jintypes.h"
+#include "cfs.h"
+
+class CJonwDirEntry : public CDirEntry
+{
+public:
+ int m_iStartSec;
+ int m_iSecCount;
+};
+
+class CJonw : public CFs
+{
+public:
+ CJonw();
+ ~CJonw();
+
+ BOOL Mount( ADisk* );
+ void Dismount();
+ BOOL ExportFile( char*, CDirEntry* );
+
+private:
+ CJonwDirEntry* CreateEntry( BYTE, WORD, BYTE* );
+};
+
+#endif
diff --git a/jindroush/include/cfs_kboo.h b/jindroush/include/cfs_kboo.h
new file mode 100644
index 0000000..c0df3e1
--- /dev/null
+++ b/jindroush/include/cfs_kboo.h
@@ -0,0 +1,42 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CKBOOT_H__
+#define __CKBOOT_H__
+
+#include "jintypes.h"
+#include "cfs.h"
+
+class CKBootDirEntry : public CDirEntry
+{
+public:
+ DWORD m_dwFileLen;
+};
+
+class CKBoot : public CFs
+{
+public:
+ CKBoot();
+ ~CKBoot();
+
+ BOOL Mount( ADisk* );
+ void Dismount();
+ BOOL ExportFile( char*, CDirEntry* );
+
+private:
+ CKBootDirEntry* CreateEntry();
+};
+
+#endif
diff --git a/jindroush/include/cfs_robc.h b/jindroush/include/cfs_robc.h
new file mode 100644
index 0000000..1e4b412
--- /dev/null
+++ b/jindroush/include/cfs_robc.h
@@ -0,0 +1,43 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __CROBC_H__
+#define __CROBC_H__
+
+#include "jintypes.h"
+#include "cfs.h"
+
+class CRobcDirEntry : public CDirEntry
+{
+public:
+ int m_iStartSec;
+ int m_iSecCount;
+};
+
+class CRobc : public CFs
+{
+public:
+ CRobc();
+ ~CRobc();
+
+ BOOL Mount( ADisk* );
+ void Dismount();
+ BOOL ExportFile( char*, CDirEntry* );
+
+private:
+ CRobcDirEntry* CreateEntry( BYTE, WORD, BYTE* );
+};
+
+#endif
diff --git a/jindroush/include/cgenfile.h b/jindroush/include/cgenfile.h
new file mode 100644
index 0000000..c97e214
--- /dev/null
+++ b/jindroush/include/cgenfile.h
@@ -0,0 +1,55 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#include "jintypes.h"
+
+#ifndef __CGENFILE_H__
+#define __CGENFILE_H__
+
+class CGenFile
+{
+public:
+ virtual ~CGenFile() {};
+
+ virtual BOOL Read( void*, int, int* = NULL ) = 0;
+ virtual BOOL Write( void*, int, int* = NULL ) = 0;
+
+ virtual BOOL Seek( long, int ) = 0;
+
+ virtual void Close() = 0;
+
+ void writeb( BYTE );
+ void writeLEw( WORD );
+ void writeBEw( WORD );
+ void writeLEdw( DWORD );
+
+ BYTE readb();
+ WORD readLEw();
+ WORD readBEw();
+ DWORD readLEdw();
+
+ WORD readw();
+ DWORD readd();
+
+ BOOL skip( long );
+
+ long Tell();
+
+ LONG m_lCurrPtr;
+
+private:
+};
+
+#endif
diff --git a/jindroush/include/cobj.h b/jindroush/include/cobj.h
new file mode 100644
index 0000000..0d39ea9
--- /dev/null
+++ b/jindroush/include/cobj.h
@@ -0,0 +1,34 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __COBJ_H__
+#define __COBJ_H__
+
+#include "jintypes.h"
+
+class CObj
+{
+public:
+ CObj();
+ const char* GetLastError( char* p = NULL ) { if ( p ) strcpy( p, m_szLastError ); return m_szLastError; };
+ void SetLastError( char* p ) { strcpy( m_szLastError, p ); };
+ int GetErrorCode() { return m_iErrorCode; };
+
+protected:
+ char m_szLastError[ 4096 ];
+ int m_iErrorCode;
+};
+
+#endif
diff --git a/jindroush/include/cprefile.h b/jindroush/include/cprefile.h
new file mode 100644
index 0000000..1e748bb
--- /dev/null
+++ b/jindroush/include/cprefile.h
@@ -0,0 +1,56 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#include "jintypes.h"
+#include "cgenfile.h"
+
+#ifndef __CPREFILE_H__
+#define __CPREFILE_H__
+
+
+class CPreFile : public CGenFile
+{
+public:
+ CPreFile();
+ ~CPreFile();
+
+ BOOL Open( CGenFile*, int );
+
+ BOOL Read( void*, int, int* = NULL );
+ BOOL Write( void*, int, int* = NULL );
+
+ BOOL Seek( long, int );
+ long GetLength() { return m_lLength; };
+ DWORD GetLastError() { return m_dwLastError; };
+ void Close();
+
+private:
+ BOOL PreRead();
+
+ BOOL m_bOpened;
+
+ DWORD m_dwLastError;
+
+ long m_lCacheStartOffset;
+ long m_lCacheEndOffset;
+
+ long m_lLength;
+ BYTE* m_pbtCache;
+ long m_lCacheLen;
+
+ CGenFile* m_pcf;
+};
+
+#endif //__CPreFILE_H__
diff --git a/jindroush/include/errbase.h b/jindroush/include/errbase.h
new file mode 100644
index 0000000..8c16c0c
--- /dev/null
+++ b/jindroush/include/errbase.h
@@ -0,0 +1,26 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __ERRBASE_H__
+#define __ERRBASE_H__
+
+#define CDISK_BASE 0x1000
+#define CATR_BASE 0x2000
+#define CDCM_BASE 0x3000
+#define CSCP_BASE 0x4000
+#define CXFD_BASE 0x5000
+#define CDI_BASE 0x6000
+
+#endif
diff --git a/jindroush/include/jintypes.h b/jindroush/include/jintypes.h
new file mode 100644
index 0000000..fab787a
--- /dev/null
+++ b/jindroush/include/jintypes.h
@@ -0,0 +1,95 @@
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+#ifndef __WINTYPES_H__
+#define __WINTYPES_H__
+
+#include <errno.h>
+#include <time.h>
+#include <sys/timeb.h>
+#include <stdlib.h>
+#include <memory.h>
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <unistd.h>
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+#ifndef MAX_PATH
+#define MAX_PATH 256
+#endif
+
+#ifdef __DJGPP__
+ #include <conio.h>
+ #include <direct.h>
+ #include <io.h>
+ #include <dos.h>
+#else
+ #define tell(x) lseek(x,0,SEEK_CUR)
+ #define _fixpath(x,y) strcpy(y,x)
+ #define getch() getchar()
+
+#endif
+
+#ifndef _WINDOWS
+typedef int BOOL;
+#define TRUE ( 1==1 )
+#define FALSE ( !TRUE )
+
+typedef unsigned char BYTE;
+typedef unsigned short WORD;
+typedef unsigned long DWORD;
+
+typedef unsigned char UBYTE;
+typedef unsigned short UWORD;
+typedef unsigned long UDWORD;
+
+typedef char CHAR;
+typedef long LONG;
+typedef short SHORT;
+
+typedef unsigned char UCHAR;
+typedef unsigned short USHORT;
+typedef unsigned long ULONG;
+
+typedef char SBYTE;
+typedef short SWORD;
+typedef long SDWORD;
+
+typedef WORD WCHAR;
+typedef CHAR TCHAR;
+
+// typedef WORD wchar_t;
+
+typedef const char* LPCSTR;
+typedef const WCHAR* LPCWSTR;
+typedef const TCHAR* LPCTSTR;
+
+typedef TCHAR* LPTSTR;
+typedef CHAR LPSTR;
+
+#define PASCAL pascal
+#else
+
+#include <windows.h>
+#endif
+
+#endif //