Clean up unused options for soundscape.

Clean up console interface to be less likely to fail to define the width and height.
Update notes in the PDF.
Add the PDF for newer Yamaha even if I don't have one (and the protocol has significant differences).
This commit is contained in:
2026-02-27 12:57:20 -06:00
parent b9da0b5987
commit 6d16d119cd
5 changed files with 83 additions and 71 deletions

View File

@@ -433,51 +433,34 @@ const char *ProgramName(uint8_t val) {
"Hall A", // (HALL1) "Hall A", // (HALL1)
"Hall B", "Hall B",
"Hall C", "Hall C",
"unk", "Hall_C2",
"Hall C",
"Hall E", "Hall E",
"Live Concert", // (HALL2) "Live Concert", // (HALL2)
"unk",
"Tokyo", "Tokyo",
"Church", // Freiburg (CHURCH) "Church", // Freiburg (CHURCH)
"Royaumont", "Royaumont",
"unk",
"Village Gate", "Village Gate",
"Vanguard", // Village Vanguard "Vanguard", // Village Vanguard
"Jazz", // The Bottom Line (JAZZ) "Jazz", // The Bottom Line (JAZZ)
"unk",
"Rock", // The Roxy Theater (ROCK) "Rock", // The Roxy Theater (ROCK)
"Warehouse", // Warehouse Loft "Warehouse", // Warehouse Loft
"Arena", "Arena",
"unk",
"Disco", "Disco",
"Party", "Party",
"Game", "Game",
"7 Ch Stereo", "7 Ch Stereo",
"Music Video", // Pop/Rock (Music Video) "Music Video", // Pop/Rock (Music Video)
"DJ", "DJ",
"unk",
"unk",
"Opera", "Opera",
"Pavillion", "Pavillion",
"unk",
"unk",
"Mono Movie", "Mono Movie",
"Sports", // Variety Sports "Sports", // Variety Sports
"unk",
"unk",
"Spectacre", "Spectacre",
"Sci-Fi", "Sci-Fi",
"unk",
"unk",
"Adventure", "Adventure",
"General", "General",
"unk",
"unk",
"Normal", "Normal",
"Enhanced", "Enhanced",
"unk",
"unk",
"PLII Movie", "PLII Movie",
"PLII Music", "PLII Music",
"Neo: 6 Movie", "Neo: 6 Movie",

View File

@@ -580,47 +580,47 @@ void AVRInterface::ExportInformation(AVRSubsystem_T subsystem,
{ eVCR3, "VCR3" }, { eVCR3, "VCR3" },
{ eV_Aux, "V Aux" }, { eV_Aux, "V Aux" },
{ Hall_A, "Hall A" }, { Hall_A, "Hall A" }, // 00
{ Hall_B, "Hall B" }, { Hall_B, "Hall B" }, // 01
{ Hall_C, "Hall C" }, { Hall_C, "Hall C" }, // 02
{ Hall_USA, "Hall USA" }, { Hall_USA, "Hall C2" }, // 04
{ Hall_E, "Hall E" }, { Hall_E, "Hall E" }, // 05
{ Live_Concert, "Live Concert" }, { Live_Concert, "Live Concert" }, // 06
{ Tokyo, "Tokyo" }, { Tokyo, "Tokyo" }, // 08
{ Freiburg, "Freiburg" }, { Freiburg, "Freiburg" }, // 09
{ Royaumont, "Royaumont" }, { Royaumont, "Royaumont" }, // 0A
{ Village_Gate, "Village Gate" }, { Village_Gate, "Village Gate" }, // 0C
{ Village_Vanguard, "Village Vanguard" }, { Village_Vanguard, "Village Vanguard" }, // 0D
{ The_Bottom_Line, "The Bottom Line" }, { The_Bottom_Line, "The Bottom Line" }, // 0E
{ The_Roxy_Theater, "The Roxy Theater" }, { The_Roxy_Theater, "The Roxy Theater" }, // 10
{ Warehouse_Loft, "Warehouse Loft" }, { Warehouse_Loft, "Warehouse Loft" }, // 11
{ Arena, "Arena" }, { Arena, "Arena" }, // 12
{ Disco, "Disco" }, { Disco, "Disco" }, // 14
{ Party, "Party" }, { Party, "Party" }, // 15
{ Game, "Game" }, { Game, "Game" }, // 16
{ Stereo_6_8Ch, "Stereo 6/8Ch" }, { Stereo_6_8Ch, "Stereo 6/8Ch" }, // 17
{ Pop_Rock, "Pop/Rock" }, { Pop_Rock, "Pop/Rock" }, // 18
{ DJ, "DJ" }, { DJ, "DJ" }, // 19
{ Opera, "Opera" }, { Opera, "Opera" }, // 1C
{ Pavillion, "Pavillion" }, { Pavillion, "Pavillion" }, // 1D
{ Mono_Movie, "Mono/Movie" }, { Mono_Movie, "Mono/Movie" }, // 20
{ Variety_Sports, "Variety/Sports" }, { Variety_Sports, "Variety/Sports" }, // 21
{ Spectacre, "Spectacre" }, { Spectacre, "Spectacre" }, // 24
{ Sci_Fi, "Sci-Fi" }, { Sci_Fi, "Sci-Fi" }, // 25
{ Adventure, "Adventure" }, { Adventure, "Adventure" }, // 28
{ General, "General" }, { General, "General" }, // 29
{ Normal, "Normal" }, { Normal, "Normal" }, // 2C
{ Enhanced, "Enhanced" }, { Enhanced, "Enhanced" }, // 2D
{ PLII_Movie, "PLII Movie" }, { PLII_Movie, "PLII Movie" }, // 30
{ PLII_Music, "PLII Music" }, { PLII_Music, "PLII Music" }, // 31
{ Neo_6_Movie, "Neo 6 Movie" }, { Neo_6_Movie, "Neo 6 Movie" }, // 32
{ Neo_6_Music, "Neo 6 Music" }, { Neo_6_Music, "Neo 6 Music" }, // 33
{ Direct_2Ch, "Direct 2Ch" }, { Direct_2Ch, "Direct 2Ch" }, // 34
{ Stereo_2Ch, "Stereo 2Ch" }, { Stereo_2Ch, "Stereo 2Ch" }, // 35
{ THX_Ultra_PL, "THX Ultra PL" }, { THX_Ultra_PL, "THX A Ultra PL" }, // 36
{ THX_Music, "THX Music" }, { THX_Music, "THX B Music" }, // 37
{ THX_Ultra_PL2, "THX Ultra PL2" }, { THX_Ultra_PL2, "THX Ultra PL2" },
{ THX_Ultra_NEO6, "THX Ultra NEO6" }, { THX_Ultra_NEO6, "THX Ultra NEO6" },
{ eInpAuto, "Input Auto" }, { eInpAuto, "Input Auto" },
{ eDD_RF, "Input DD/RF" }, { eDD_RF, "Input DD/RF" },

View File

@@ -59,39 +59,68 @@ void Console_Init(short Left, short Top, short Width, short Height, short bottom
exit(1); exit(1);
} }
wOldColorAttrs = csbi.wAttributes; wOldColorAttrs = csbi.wAttributes;
scrollBot = Height - 1;
consoleWidth = Width; scrollTop = Height - bottomScrollHeight - 1;
consoleHeight = Height;
scrollBot = consoleHeight - 1;
scrollTop = consoleHeight - bottomScrollHeight - 1;
#if 1
COORD max = GetLargestConsoleWindowSize(hStdout);
SHORT w = (Width > max.X) ? max.X : Width;
SHORT h = (Height > max.Y) ? max.Y : Height;
SMALL_RECT win = { 0, 0, (SHORT)(w - 1), (SHORT)(h - 1) };
// Enlarge buffer first (for growth), then set window.
SetConsoleScreenBufferSize(hStdout, { w, h });
SetConsoleWindowInfo(hStdout, TRUE, &win);
#else
// Desired size (width x height) // Desired size (width x height)
COORD newSize = { 0, 0 }; COORD bufferSize = { 0, 0 };
newSize.X = consoleWidth; // columns bufferSize.X = (csbi.dwSize.X < Width) ? Width : csbi.dwSize.X; // columns
newSize.Y = consoleHeight; // rows bufferSize.Y = (csbi.dwSize.Y < Height) ? Height : csbi.dwSize.Y; // rows
// Step 2: Set new buffer size // Step 2: Set new buffer size
if (!SetConsoleScreenBufferSize(hStdout, newSize)) { if (!SetConsoleScreenBufferSize(hStdout, bufferSize)) {
fprintf(stderr, "Error: Unable to set console buffer size. Code: %lu\n", GetLastError()); fprintf(stderr, "Error: Unable to set console buffer size. Code: %lu\n", GetLastError());
// figure out why ...
CONSOLE_SCREEN_BUFFER_INFOEX info;
info.cbSize = sizeof(info);
if (!GetConsoleScreenBufferInfoEx(hStdout, &info)) {
// handle error
}
fprintf(stderr, "Width[%u] > info.dwMaximumWindowSize.X[%u] || Height[%u] > info.dwMaximumWindowSize.Y[%u]\n",
Width, info.dwMaximumWindowSize.X, Height, info.dwMaximumWindowSize.Y);
fprintf(stderr, "Width[%u] < GetSystemMetrics(SM_CXMIN)[%u] || Height[%u] < GetSystemMetrics(SM_CYMIN)[%u]\n",
Width, GetSystemMetrics(SM_CXMIN), Height, GetSystemMetrics(SM_CYMIN));
exit(1); exit(1);
} }
// Step 3: Set final window size to match buffer // Step 3: Set final window size to match buffer
// The final window size we want to set
SMALL_RECT newWindow = { 0 }; SMALL_RECT newWindow = { 0 };
newWindow.Left = 0; newWindow.Left = 0;
newWindow.Top = 0; newWindow.Top = 0;
newWindow.Right = newSize.X - 1; newWindow.Right = bufferSize.X - 1;
newWindow.Bottom = newSize.Y - 1; newWindow.Bottom = bufferSize.Y - 1;
if (!SetConsoleWindowInfo(hStdout, TRUE, &newWindow)) { if (!SetConsoleWindowInfo(hStdout, TRUE, &newWindow)) {
fprintf(stderr, "Error: Unable to set console window size. Code: %lu\n", GetLastError()); fprintf(stderr, "Error: Unable to set console window size. Code: %lu\n", GetLastError());
CONSOLE_SCREEN_BUFFER_INFOEX info;
info.cbSize = sizeof(info);
if (!GetConsoleScreenBufferInfoEx(hStdout, &info)) {
// handle error
}
fprintf(stderr, "Width[%u] > info.dwMaximumWindowSize.X[%u] || Height[%u] > info.dwMaximumWindowSize.Y[%u]\n",
Width, info.dwMaximumWindowSize.X, Height, info.dwMaximumWindowSize.Y);
fprintf(stderr, "Width[%u] < GetSystemMetrics(SM_CXMIN)[%u] || Height[%u] < GetSystemMetrics(SM_CYMIN)[%u]\n",
Width, GetSystemMetrics(SM_CXMIN), Height, GetSystemMetrics(SM_CYMIN));
exit(1); exit(1);
} }
// end // end
Console_SetWindowPosition(Left, Top); Console_SetWindowPosition(Left, Top);
#endif
} }
void Console_Close() { void Console_Close() {

Binary file not shown.