Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/famicom-dumper-client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2021-04-23 03:56:45 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2021-04-23 03:56:45 +0300
commit747143aefb2e5dd0fe18471550a3be702768e666 (patch)
tree3fcd6cfb0ff8df404670ecf30bddaa293f6673b9 /FamicomDumperConnection
parent53175b537abce696f8c9390c36439d3db16c0965 (diff)
More FDS checks
Diffstat (limited to 'FamicomDumperConnection')
-rw-r--r--FamicomDumperConnection/FamicomDumperConnection.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/FamicomDumperConnection/FamicomDumperConnection.cs b/FamicomDumperConnection/FamicomDumperConnection.cs
index c1c36e5..96b1d00 100644
--- a/FamicomDumperConnection/FamicomDumperConnection.cs
+++ b/FamicomDumperConnection/FamicomDumperConnection.cs
@@ -102,6 +102,7 @@ namespace com.clusterrr.Famicom.DumperConnection
SET_FLASH_BUFFER_SIZE = 55,
SET_VALUE_DONE = 56,
FDS_DISK_WRITE_PROTECTED = 57,
+ FDS_BLOCK_CRC_ERROR = 58,
BOOTLOADER = 0xFE,
DEBUG = 0xFF
@@ -880,14 +881,14 @@ namespace com.clusterrr.Famicom.DumperConnection
throw new IOException("RAM adapter IO error, is it connected?");
case DumperCommand.FDS_DISK_NOT_INSERTED:
throw new IOException("Disk card is not set");
- case DumperCommand.FDS_DISK_WRITE_PROTECTED:
- throw new IOException("Disk card is write protected");
case DumperCommand.FDS_BATTERY_LOW:
throw new IOException("Battery voltage is low or power supply is not connected");
case DumperCommand.FDS_TIMEOUT:
throw new IOException("FDS read timeout");
case DumperCommand.FDS_END_OF_HEAD:
throw new IOException("End of head");
+ case DumperCommand.FDS_BLOCK_CRC_ERROR:
+ throw new IOException("Block CRC error");
default:
throw new IOException($"Invalid data received: {recv.Command}");
}
@@ -928,12 +929,16 @@ namespace com.clusterrr.Famicom.DumperConnection
throw new IOException("RAM adapter IO error, is it connected?");
case DumperCommand.FDS_DISK_NOT_INSERTED:
throw new IOException("Disk card is not set");
+ case DumperCommand.FDS_DISK_WRITE_PROTECTED:
+ throw new IOException("Disk card is write protected");
case DumperCommand.FDS_BATTERY_LOW:
throw new IOException("Battery low");
case DumperCommand.FDS_TIMEOUT:
throw new IOException("FDS read timeout");
case DumperCommand.FDS_END_OF_HEAD:
throw new IOException("End of head");
+ case DumperCommand.FDS_BLOCK_CRC_ERROR:
+ throw new IOException("Block CRC error");
case DumperCommand.FDS_READ_RESULT_END:
throw new IOException("Unexpected end of data");
default: