mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Add debug print for KaraokeDisplay
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
namespace RedBookPlayer.Models.Hardware.Karaoke
|
namespace RedBookPlayer.Models.Hardware.Karaoke
|
||||||
{
|
{
|
||||||
/// <see cref="https://jbum.com/cdg_revealed.html"/>
|
/// <see cref="https://jbum.com/cdg_revealed.html"/>
|
||||||
@@ -7,6 +9,9 @@ namespace RedBookPlayer.Models.Hardware.Karaoke
|
|||||||
/// Display data as a 2-dimensional byte array
|
/// Display data as a 2-dimensional byte array
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
|
/// Coordinate (0,0) is the upper left corner of the display
|
||||||
|
/// Coordinate (299, 215) is the lower right corner of the display
|
||||||
|
///
|
||||||
// CONFLICTING INFO:
|
// CONFLICTING INFO:
|
||||||
///
|
///
|
||||||
/// In the top part of the document, it states:
|
/// In the top part of the document, it states:
|
||||||
@@ -57,6 +62,23 @@ namespace RedBookPlayer.Models.Hardware.Karaoke
|
|||||||
this.TransparentColor = 0x00;
|
this.TransparentColor = 0x00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Print the current color map to console
|
||||||
|
/// </summary>
|
||||||
|
public void DebugPrintScreen()
|
||||||
|
{
|
||||||
|
string screenDump = string.Empty;
|
||||||
|
for(int y = 0; y < 216; y++)
|
||||||
|
{
|
||||||
|
for(int x = 0; x < 300; x++)
|
||||||
|
{
|
||||||
|
screenDump += $"{this.DisplayData[x,y]:X}";
|
||||||
|
}
|
||||||
|
|
||||||
|
screenDump += Environment.NewLine;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Process a subchannel packet and update the display as necessary
|
/// Process a subchannel packet and update the display as necessary
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -107,6 +129,8 @@ namespace RedBookPlayer.Models.Hardware.Karaoke
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Command Processors
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set the screen to a particular color
|
/// Set the screen to a particular color
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -337,5 +361,7 @@ namespace RedBookPlayer.Models.Hardware.Karaoke
|
|||||||
this.ColorTable[start + 6] = tableData.ColorSpec[6];
|
this.ColorTable[start + 6] = tableData.ColorSpec[6];
|
||||||
this.ColorTable[start + 7] = tableData.ColorSpec[7];
|
this.ColorTable[start + 7] = tableData.ColorSpec[7];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user