Skip to content

Commit 20ced1c

Browse files
authored
Update README.md
1 parent 088f03e commit 20ced1c

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,17 @@ public interface IMapper
108108
/// <summary>
109109
/// Number of the mapper to spore in the iNES header (-1 if none)
110110
/// </summary>
111-
int Number { get; }
111+
int Number { get => -1; }
112112

113113
/// <summary>
114114
/// Number of submapper (0 if none)
115115
/// </summary>
116-
byte Submapper { get; }
116+
byte Submapper { get => 0; }
117117

118118
/// <summary>
119119
/// Name of the mapper to store in UNIF container (null if none)
120120
/// </summary>
121-
string UnifName { get; }
121+
string UnifName { get => null; }
122122

123123
/// <summary>
124124
/// Default PRG size to dump (in bytes)
@@ -128,7 +128,7 @@ public interface IMapper
128128
/// <summary>
129129
/// Default CHR size to dump (in bytes)
130130
/// </summary>
131-
int DefaultChrSize { get; }
131+
int DefaultChrSize { get => 0; }
132132

133133
/// <summary>
134134
/// This method will be called to dump PRG
@@ -144,43 +144,42 @@ public interface IMapper
144144
/// <param name="dumper">FamicomDumperConnection object to access cartridge</param>
145145
/// <param name="data">This list must be filled with dumped CHR data</param>
146146
/// <param name="size">Size of CHR to dump requested by user (in bytes)</param>
147-
void DumpChr(IFamicomDumperConnection dumper, List<byte> data, int size = 0);
147+
void DumpChr(IFamicomDumperConnection dumper, List<byte> data, int size = 0)
148+
=> throw new NotSupportedException("This mapper doesn't have a CHR ROM");
148149

149150
/// <summary>
150151
/// This method will be called to enable PRG RAM
151152
/// </summary>
152153
/// <param name="dumper"></param>
153-
void EnablePrgRam(IFamicomDumperConnection dumper);
154+
void EnablePrgRam(IFamicomDumperConnection dumper)
155+
=> throw new NotImplementedException("PRG RAM is not supported by this mapper");
154156

155157
/// <summary>
156158
/// This method must return mirroring type, it can call dumper.GetMirroring() if it's fixed
157159
/// </summary>
158160
/// <param name="dumper">FamicomDumperConnection object to access cartridge</param>
159161
/// <returns>Mirroring type</returns>
160-
MirroringType GetMirroring(IFamicomDumperConnection dumper);
161-
162-
/* Optional properties */
163-
/*
162+
MirroringType GetMirroring(IFamicomDumperConnection dumper) => dumper.GetMirroring();
163+
164164
/// <summary>
165165
/// Default PRG RAM size, can be used with NES 2.0
166166
/// </summary>
167-
int DefaultPrgRamSize { get; }
167+
public int DefaultPrgRamSize { get => -1; }
168168

169169
/// <summary>
170170
/// Default CHR RAM size, can be used with NES 2.0
171171
/// </summary>
172-
int DefaultChrRamSize { get; }
172+
public int DefaultChrRamSize { get => -1; }
173173

174174
/// <summary>
175175
/// Default PRG NVRAM size, can be used with NES 2.0
176176
/// </summary>
177-
int DefaultPrgNvramSize { get; }
177+
public int DefaultPrgNvramSize { get => -1; }
178178

179179
/// <summary>
180180
/// Default CHR NVRAM size, can be used with NES 2.0
181181
/// </summary>
182-
int DefaultChrNvramSize { get; }
183-
*/
182+
public int DefaultChrNvramSize { get => -1; }
184183
}
185184
```
186185

0 commit comments

Comments
 (0)