diff --git a/BizHawk.Emulation/Consoles/PC Engine/Compat.txt b/BizHawk.Emulation/Consoles/PC Engine/Compat.txt index 3be55e8fac..7bf005b455 100644 --- a/BizHawk.Emulation/Consoles/PC Engine/Compat.txt +++ b/BizHawk.Emulation/Consoles/PC Engine/Compat.txt @@ -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. diff --git a/BizHawk.Emulation/Consoles/PC Engine/PCEngine.cs b/BizHawk.Emulation/Consoles/PC Engine/PCEngine.cs index 8430e4abe0..8dbee29b88 100644 --- a/BizHawk.Emulation/Consoles/PC Engine/PCEngine.cs +++ b/BizHawk.Emulation/Consoles/PC Engine/PCEngine.cs @@ -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]; diff --git a/BizHawk.Emulation/Sound/CDAudio.cs b/BizHawk.Emulation/Sound/CDAudio.cs index 7a73fa9445..b419d974ba 100644 --- a/BizHawk.Emulation/Sound/CDAudio.cs +++ b/BizHawk.Emulation/Sound/CDAudio.cs @@ -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(); } } } \ No newline at end of file