From 8f5413643bf42ef3dcd0ee15019661357ec3d577 Mon Sep 17 00:00:00 2001 From: goyuken Date: Mon, 30 Dec 2013 20:36:51 +0000 Subject: [PATCH] GPGX: support the DRIVE LIGHT. the DRIVE LIGHT LIGHTS UP whenever the CD is reading data. the DRIVE LIGHT DOES NOT LIGHT UP when there's no CD in, or the CD is seeking or parked, or the CD is reading audio. --- BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs index e8a1feab0a..1204af9ac8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs @@ -21,6 +21,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx DiscSystem.Disc CD; byte[] romfile; + bool drivelight; bool disposed = false; @@ -119,6 +120,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx InputCallback = new LibGPGX.input_cb(input_callback); LibGPGX.gpgx_set_input_callback(InputCallback); + + if (CD != null) + CoreComm.UsesDriveLed = true; } catch { @@ -232,6 +236,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx byte[] data = new byte[2048]; CD.ReadLBA_2048(lba, data, 0); Marshal.Copy(data, 0, dest, 2048); + drivelight = true; } } @@ -321,12 +326,16 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx IsLagFrame = true; Frame++; + drivelight = false; LibGPGX.gpgx_advance(); update_video(); update_audio(); if (IsLagFrame) LagCount++; + + if (CD != null) + CoreComm.DriveLED = drivelight; } public int Frame { get; private set; }