diff --git a/AVR Working Controller/AVRCommandDecoder.cpp b/AVR Working Controller/AVRCommandDecoder.cpp index 5580f68..c352b04 100644 --- a/AVR Working Controller/AVRCommandDecoder.cpp +++ b/AVR Working Controller/AVRCommandDecoder.cpp @@ -433,51 +433,34 @@ const char *ProgramName(uint8_t val) { "Hall A", // (HALL1) "Hall B", "Hall C", - "unk", - "Hall C", + "Hall_C2", "Hall E", "Live Concert", // (HALL2) - "unk", "Tokyo", "Church", // Freiburg (CHURCH) "Royaumont", - "unk", "Village Gate", "Vanguard", // Village Vanguard "Jazz", // The Bottom Line (JAZZ) - "unk", "Rock", // The Roxy Theater (ROCK) "Warehouse", // Warehouse Loft "Arena", - "unk", "Disco", "Party", "Game", "7 Ch Stereo", "Music Video", // Pop/Rock (Music Video) "DJ", - "unk", - "unk", "Opera", "Pavillion", - "unk", - "unk", "Mono Movie", "Sports", // Variety Sports - "unk", - "unk", "Spectacre", "Sci-Fi", - "unk", - "unk", "Adventure", "General", - "unk", - "unk", "Normal", "Enhanced", - "unk", - "unk", "PLII Movie", "PLII Music", "Neo: 6 Movie", diff --git a/AVR Working Controller/AVRInterface.cpp b/AVR Working Controller/AVRInterface.cpp index a97c10a..597ec38 100644 --- a/AVR Working Controller/AVRInterface.cpp +++ b/AVR Working Controller/AVRInterface.cpp @@ -580,47 +580,47 @@ void AVRInterface::ExportInformation(AVRSubsystem_T subsystem, { eVCR3, "VCR3" }, { eV_Aux, "V Aux" }, - { Hall_A, "Hall A" }, - { Hall_B, "Hall B" }, - { Hall_C, "Hall C" }, - { Hall_USA, "Hall USA" }, - { Hall_E, "Hall E" }, - { Live_Concert, "Live Concert" }, - { Tokyo, "Tokyo" }, - { Freiburg, "Freiburg" }, - { Royaumont, "Royaumont" }, - { Village_Gate, "Village Gate" }, - { Village_Vanguard, "Village Vanguard" }, - { The_Bottom_Line, "The Bottom Line" }, - { The_Roxy_Theater, "The Roxy Theater" }, - { Warehouse_Loft, "Warehouse Loft" }, - { Arena, "Arena" }, - { Disco, "Disco" }, - { Party, "Party" }, - { Game, "Game" }, - { Stereo_6_8Ch, "Stereo 6/8Ch" }, - { Pop_Rock, "Pop/Rock" }, - { DJ, "DJ" }, - { Opera, "Opera" }, - { Pavillion, "Pavillion" }, - { Mono_Movie, "Mono/Movie" }, - { Variety_Sports, "Variety/Sports" }, - { Spectacre, "Spectacre" }, - { Sci_Fi, "Sci-Fi" }, - { Adventure, "Adventure" }, - { General, "General" }, - { Normal, "Normal" }, - { Enhanced, "Enhanced" }, - { PLII_Movie, "PLII Movie" }, - { PLII_Music, "PLII Music" }, - { Neo_6_Movie, "Neo 6 Movie" }, - { Neo_6_Music, "Neo 6 Music" }, - { Direct_2Ch, "Direct 2Ch" }, - { Stereo_2Ch, "Stereo 2Ch" }, - { THX_Ultra_PL, "THX Ultra PL" }, - { THX_Music, "THX Music" }, - { THX_Ultra_PL2, "THX Ultra PL2" }, - { THX_Ultra_NEO6, "THX Ultra NEO6" }, + { Hall_A, "Hall A" }, // 00 + { Hall_B, "Hall B" }, // 01 + { Hall_C, "Hall C" }, // 02 + { Hall_USA, "Hall C2" }, // 04 + { Hall_E, "Hall E" }, // 05 + { Live_Concert, "Live Concert" }, // 06 + { Tokyo, "Tokyo" }, // 08 + { Freiburg, "Freiburg" }, // 09 + { Royaumont, "Royaumont" }, // 0A + { Village_Gate, "Village Gate" }, // 0C + { Village_Vanguard, "Village Vanguard" }, // 0D + { The_Bottom_Line, "The Bottom Line" }, // 0E + { The_Roxy_Theater, "The Roxy Theater" }, // 10 + { Warehouse_Loft, "Warehouse Loft" }, // 11 + { Arena, "Arena" }, // 12 + { Disco, "Disco" }, // 14 + { Party, "Party" }, // 15 + { Game, "Game" }, // 16 + { Stereo_6_8Ch, "Stereo 6/8Ch" }, // 17 + { Pop_Rock, "Pop/Rock" }, // 18 + { DJ, "DJ" }, // 19 + { Opera, "Opera" }, // 1C + { Pavillion, "Pavillion" }, // 1D + { Mono_Movie, "Mono/Movie" }, // 20 + { Variety_Sports, "Variety/Sports" }, // 21 + { Spectacre, "Spectacre" }, // 24 + { Sci_Fi, "Sci-Fi" }, // 25 + { Adventure, "Adventure" }, // 28 + { General, "General" }, // 29 + { Normal, "Normal" }, // 2C + { Enhanced, "Enhanced" }, // 2D + { PLII_Movie, "PLII Movie" }, // 30 + { PLII_Music, "PLII Music" }, // 31 + { Neo_6_Movie, "Neo 6 Movie" }, // 32 + { Neo_6_Music, "Neo 6 Music" }, // 33 + { Direct_2Ch, "Direct 2Ch" }, // 34 + { Stereo_2Ch, "Stereo 2Ch" }, // 35 + { THX_Ultra_PL, "THX A Ultra PL" }, // 36 + { THX_Music, "THX B Music" }, // 37 + { THX_Ultra_PL2, "THX Ultra PL2" }, + { THX_Ultra_NEO6, "THX Ultra NEO6" }, { eInpAuto, "Input Auto" }, { eDD_RF, "Input DD/RF" }, diff --git a/AVR Working Controller/ConsoleHandler.cpp b/AVR Working Controller/ConsoleHandler.cpp index f26564f..e47d9df 100644 --- a/AVR Working Controller/ConsoleHandler.cpp +++ b/AVR Working Controller/ConsoleHandler.cpp @@ -59,39 +59,68 @@ void Console_Init(short Left, short Top, short Width, short Height, short bottom exit(1); } wOldColorAttrs = csbi.wAttributes; - - consoleWidth = Width; - consoleHeight = Height; + scrollBot = Height - 1; + scrollTop = Height - bottomScrollHeight - 1; - 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) - COORD newSize = { 0, 0 }; - newSize.X = consoleWidth; // columns - newSize.Y = consoleHeight; // rows + COORD bufferSize = { 0, 0 }; + bufferSize.X = (csbi.dwSize.X < Width) ? Width : csbi.dwSize.X; // columns + bufferSize.Y = (csbi.dwSize.Y < Height) ? Height : csbi.dwSize.Y; // rows // 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()); + + // 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); } // Step 3: Set final window size to match buffer + // The final window size we want to set SMALL_RECT newWindow = { 0 }; newWindow.Left = 0; newWindow.Top = 0; - newWindow.Right = newSize.X - 1; - newWindow.Bottom = newSize.Y - 1; + newWindow.Right = bufferSize.X - 1; + newWindow.Bottom = bufferSize.Y - 1; if (!SetConsoleWindowInfo(hStdout, TRUE, &newWindow)) { 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); } // end Console_SetWindowPosition(Left, Top); - + #endif } void Console_Close() { diff --git a/DataSheets/Yamaha RX-V2400_RS232C_Standard.pdf b/DataSheets/Yamaha RX-V2400_RS232C_Standard.pdf index 79acfef..3897c57 100644 Binary files a/DataSheets/Yamaha RX-V2400_RS232C_Standard.pdf and b/DataSheets/Yamaha RX-V2400_RS232C_Standard.pdf differ diff --git a/DataSheets/Yamaha RX-Vx800_RS232C_Standard_rev1_02.pdf b/DataSheets/Yamaha RX-Vx800_RS232C_Standard_rev1_02.pdf new file mode 100644 index 0000000..92a38af Binary files /dev/null and b/DataSheets/Yamaha RX-Vx800_RS232C_Standard_rev1_02.pdf differ