add ID to bizhawk CDL file, to make it easily distinguishable
This commit is contained in:
parent
4961c9e905
commit
5769e85a6f
|
@ -40,6 +40,7 @@ namespace BizHawk.Emulation.Cores.Components.H6280
|
|||
public void Save(Stream s)
|
||||
{
|
||||
var w = new BinaryWriter(s);
|
||||
w.Write("BIZHAWK-CDL-1");
|
||||
w.Write(Count);
|
||||
foreach (var kvp in this)
|
||||
{
|
||||
|
@ -54,6 +55,9 @@ namespace BizHawk.Emulation.Cores.Components.H6280
|
|||
{
|
||||
var t = new CodeDataLog();
|
||||
var r = new BinaryReader(s);
|
||||
string id = r.ReadString();
|
||||
if (id != "BIZHAWK-CDL-1")
|
||||
throw new InvalidDataException("File is not a Bizhawk CDL file!");
|
||||
int count = r.ReadInt32();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
====Type definitions==============
|
||||
|
||||
A "string" is an LEB128 encoded number which is the number of bytes
|
||||
in the string, followed by that many bytes of UTF-8 character data.
|
||||
|
||||
A "number" is a little endian 32 bit integer.
|
||||
|
||||
File format is as follows:
|
||||
|
||||
|
||||
====File format is as follows:====
|
||||
|
||||
string id: file identifier, always "BIZHAWK-CDL-1"
|
||||
number NumberOfBlocks: number of memory areas represented in this file
|
||||
|
||||
For each block:
|
||||
|
@ -14,6 +19,7 @@ number bytelength: length of the block in bytes.
|
|||
byte data[bytelength]: one byte of information for each byte in the original block.
|
||||
|
||||
|
||||
====Other definitions:============
|
||||
|
||||
The BlockNames are:
|
||||
|
||||
|
|
Loading…
Reference in New Issue