[pce-cd] somewhat improve save-statey-ness. still not solid but good enough to work a lot of the time

This commit is contained in:
beirich 2011-09-01 01:14:40 +00:00
parent 65d6961160
commit 9f4ffde86f
3 changed files with 51 additions and 2 deletions

View File

@ -1,4 +1,26 @@
======= TurboGrafx compatibility issues =======
******************************************************
* Turbo CD Issues *
******************************************************
- Download 2, eventually has issues. Seems like waiting on ADPCM interrupts or flags.
- Similar in Dragon Slayer
- Dungeon Explorer II quite desperately need ADPCM audio
+ and a gross corruption issue at teh end of the intro. and then it freezes. :(
- Dynastic Hero... a CD-command related hard crash :(
- Exile II .. seems to reset itself after playing the unskippable intro. :(
- Macross 2036.. seems impossible to start/play the game. :(
- Super Darius II : at 1st Boss, game freezes waiting for adpcm
- Ys 1, start new game, death by adpcm probably
======= TurboGrafx compatibility issues =======
General:
+ LFO is not implemented, though I can't tell.

View File

@ -297,6 +297,13 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
if (TurboCD)
{
CDAudio.SaveStateText(writer);
writer.Write("CDRAM ");
CDRam.SaveAsHex(writer);
if (SuperRam != null)
{
writer.Write("SuperRAM ");
SuperRam.SaveAsHex(writer);
}
}
writer.WriteLine("[/PCEngine]");
}
@ -319,6 +326,10 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
IOBuffer = byte.Parse(args[1], NumberStyles.HexNumber);
else if (args[0] == "RAM")
Ram.ReadFromHex(args[1]);
else if (args[0] == "CDRAM")
CDRam.ReadFromHex(args[1]);
else if (args[0] == "SuperRAM")
SuperRam.ReadFromHex(args[1]);
else if (args[0] == "PopulousRAM" && PopulousRAM != null)
PopulousRAM.ReadFromHex(args[1]);
else if (args[0] == "[HuC6280]")
@ -351,6 +362,11 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
writer.Write(PopulousRAM);
if (SuperRam != null)
writer.Write(SuperRam);
if (TurboCD)
{
writer.Write(CDRam);
writer.Write(ADPCM_RAM);
}
writer.Write(Frame);
writer.Write(_lagcount);
writer.Write(SF2MapperLatch);
@ -388,6 +404,11 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
PopulousRAM = reader.ReadBytes(0x8000);
if (SuperRam != null)
SuperRam = reader.ReadBytes(0x30000);
if (TurboCD)
{
CDRam = reader.ReadBytes(0x10000);
ADPCM_RAM = reader.ReadBytes(0x10000);
}
Frame = reader.ReadInt32();
_lagcount = reader.ReadInt32();
SF2MapperLatch = reader.ReadByte();
@ -421,7 +442,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
if (BramEnabled) buflen += 2048;
if (PopulousRAM != null) buflen += 0x8000;
if (SuperRam != null) buflen += 0x30000;
if (TurboCD) buflen += 26;
if (TurboCD) buflen += 0x20000 + 30;
//Console.WriteLine("LENGTH1 " + buflen);
var buf = new byte[buflen];

View File

@ -230,6 +230,8 @@ namespace BizHawk.Emulation.Sound
writer.WriteLine("PlayingTrack {0}", PlayingTrack);
writer.WriteLine("CurrentSector {0}", CurrentSector);
writer.WriteLine("SectorOffset {0}", SectorOffset);
writer.WriteLine("FadeOutOverFrames {0}", FadeOutOverFrames);
writer.WriteLine("FadeOutFramesRemaining {0}", FadeOutFramesRemaining);
writer.WriteLine("[/CDAudio]");
writer.WriteLine();
}
@ -274,6 +276,8 @@ namespace BizHawk.Emulation.Sound
writer.Write(StartLBA);
writer.Write(EndLBA);
writer.Write(PlayingTrack);
writer.Write((short)FadeOutOverFrames);
writer.Write((short)FadeOutFramesRemaining);
}
public void LoadStateBinary(BinaryReader reader)
@ -286,6 +290,8 @@ namespace BizHawk.Emulation.Sound
StartLBA = reader.ReadInt32();
EndLBA = reader.ReadInt32();
PlayingTrack = reader.ReadInt32();
FadeOutOverFrames = reader.ReadInt16();
FadeOutFramesRemaining = reader.ReadInt16();
}
}
}