-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed support for double-sided SSD files
These didn't work with the 1770 FDC, and file import and export also weren't working
- Loading branch information
Showing
14 changed files
with
521 additions
and
372 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/**************************************************************** | ||
BeebEm - BBC Micro and Master 128 Emulator | ||
Copyright (C) 2009 Mike Wyatt | ||
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 (at your option) 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., 51 Franklin Street, Fifth Floor, | ||
Boston, MA 02110-1301, USA. | ||
****************************************************************/ | ||
|
||
#include <stdio.h> | ||
|
||
#include "DiscInfo.h" | ||
#include "DiscEdit.h" | ||
#include "FileUtils.h" | ||
|
||
DiscInfoType DiscInfo[2]; | ||
|
||
bool IsDoubleSidedSSD(const char *FileName, FILE *pFile) | ||
{ | ||
if (!HasFileExt(FileName, ".ssd")) | ||
{ | ||
return false; | ||
} | ||
|
||
fseek(pFile, 0, SEEK_END); | ||
|
||
long Size = ftell(pFile); | ||
|
||
fseek(pFile, 0, SEEK_SET); | ||
|
||
return Size > 80 * DFS_SECTORS_PER_TRACK * DFS_SECTOR_SIZE; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/**************************************************************** | ||
BeebEm - BBC Micro and Master 128 Emulator | ||
Copyright (C) 2009 Mike Wyatt | ||
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 (at your option) 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., 51 Franklin Street, Fifth Floor, | ||
Boston, MA 02110-1301, USA. | ||
****************************************************************/ | ||
|
||
#ifndef DISCINFO_HEADER | ||
#define DISCINFO_HEADER | ||
|
||
#include "DiscType.h" | ||
|
||
struct DiscInfoType | ||
{ | ||
bool Loaded; // Set to true when a disc image has been loaded | ||
char FileName[256]; // Filename of disc currently in drive 0 and 1 | ||
DiscType Type; // Current disc type | ||
bool DoubleSidedSSD; // Non-interleaved double sided disk image | ||
}; | ||
|
||
extern DiscInfoType DiscInfo[2]; | ||
|
||
bool IsDoubleSidedSSD(const char *FileName, FILE *pFile); | ||
|
||
#endif |
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.