From ca3465b4803922467c6786c05b58e8a8eddb5e74 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 8 Aug 2013 19:31:08 +0000 Subject: [PATCH] discsys-rename some thing that had been annoying me --- BizHawk.Emulation/DiscSystem/Disc.API.cs | 2 +- BizHawk.Emulation/DiscSystem/Disc.cs | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/BizHawk.Emulation/DiscSystem/Disc.API.cs b/BizHawk.Emulation/DiscSystem/Disc.API.cs index d7fdb8fedd..c37a30b848 100644 --- a/BizHawk.Emulation/DiscSystem/Disc.API.cs +++ b/BizHawk.Emulation/DiscSystem/Disc.API.cs @@ -156,7 +156,7 @@ namespace BizHawk.DiscSystem internal void ReadABA_2352(int aba, byte[] buffer, int offset) { - Sectors[aba].Sector.Read(buffer, offset); + Sectors[aba].Sector.Read_2352(buffer, offset); } internal void ReadABA_2048(int aba, byte[] buffer, int offset) diff --git a/BizHawk.Emulation/DiscSystem/Disc.cs b/BizHawk.Emulation/DiscSystem/Disc.cs index 12ea56286d..f5d713c9ca 100644 --- a/BizHawk.Emulation/DiscSystem/Disc.cs +++ b/BizHawk.Emulation/DiscSystem/Disc.cs @@ -72,7 +72,7 @@ namespace BizHawk.DiscSystem /// /// reads the entire sector, raw /// - int Read(byte[] buffer, int offset); //todo - rename to Read_2352 + int Read_2352(byte[] buffer, int offset); /// /// reads 2048 bytes of userdata.. precisely what this means isnt always 100% certain (for instance mode2 form 0 has 2336 bytes of userdata instead of 2048).. @@ -208,7 +208,7 @@ namespace BizHawk.DiscSystem { public IBlob Blob; public long Offset; - public int Read(byte[] buffer, int offset) + public int Read_2352(byte[] buffer, int offset) { return Blob.Read(Offset, buffer, offset, 2352); } @@ -223,7 +223,7 @@ namespace BizHawk.DiscSystem /// class Sector_Zero : ISector { - public int Read(byte[] buffer, int offset) + public int Read_2352(byte[] buffer, int offset) { Array.Clear(buffer, 0, 2352); return 2352; @@ -266,7 +266,7 @@ namespace BizHawk.DiscSystem abstract class Sector_Mode1_or_Mode2_2352 : ISector { public ISector BaseSector; - public abstract int Read(byte[] buffer, int offset); + public abstract int Read_2352(byte[] buffer, int offset); public abstract int Read_2048(byte[] buffer, int offset); } @@ -275,14 +275,14 @@ namespace BizHawk.DiscSystem /// class Sector_Mode1_2352 : Sector_Mode1_or_Mode2_2352 { - public override int Read(byte[] buffer, int offset) + public override int Read_2352(byte[] buffer, int offset) { - return BaseSector.Read(buffer, offset); + return BaseSector.Read_2352(buffer, offset); } public override int Read_2048(byte[] buffer, int offset) { //to get 2048 bytes out of this sector type, start 16 bytes in - int ret = BaseSector.Read(TempSector, 0); + int ret = BaseSector.Read_2352(TempSector, 0); Buffer.BlockCopy(TempSector, 16, buffer, offset, 2048); System.Diagnostics.Debug.Assert(buffer != TempSector); return 2048; @@ -300,15 +300,15 @@ namespace BizHawk.DiscSystem /// class Sector_Mode2_2352 : Sector_Mode1_or_Mode2_2352 { - public override int Read(byte[] buffer, int offset) + public override int Read_2352(byte[] buffer, int offset) { - return BaseSector.Read(buffer, offset); + return BaseSector.Read_2352(buffer, offset); } public override int Read_2048(byte[] buffer, int offset) { //to get 2048 bytes out of this sector type, start 24 bytes in - int ret = BaseSector.Read(TempSector, 0); + int ret = BaseSector.Read_2352(TempSector, 0); Buffer.BlockCopy(TempSector, 24, buffer, offset, 2048); System.Diagnostics.Debug.Assert(buffer != TempSector); return 2048; @@ -362,7 +362,7 @@ namespace BizHawk.DiscSystem return Blob.BaseBlob.Read(Offset, buffer, offset, 2048); } - public int Read(byte[] buffer, int offset) + public int Read_2352(byte[] buffer, int offset) { //user data int read = Blob.BaseBlob.Read(Offset, buffer, offset + 16, 2048);