diff --git a/src/picomputer/picomputer_st7789/CMakeLists.txt b/src/picomputer/picomputer_st7789/CMakeLists.txt index bb5ebf5..907ae03 100644 --- a/src/picomputer/picomputer_st7789/CMakeLists.txt +++ b/src/picomputer/picomputer_st7789/CMakeLists.txt @@ -189,6 +189,7 @@ foreach(target ZxSpectrumPicomputerZxILI9341Lcd_720x576x50Hz ZxSpectrumPicomputerZxILI9341Lcd_640x480x60Hz ZxSpectrumPicomputerZx2Lcd_720x576x50Hz + ZxSpectrumPicomputerZx2Lcd_640x480x60Hz ) add_executable(${target} ${picomputer_zx_lcd_src} @@ -261,4 +262,15 @@ target_compile_definitions(ZxSpectrumPicomputerZx2Lcd_720x576x50Hz PRIVATE REAL_ZXKEYBOARD REAL_ZXKEYBOARD_BOB HID_KEY_MOD_SAVE=2 + PICO_STARTUP_VGA +) + +target_compile_definitions(ZxSpectrumPicomputerZx2Lcd_640x480x60Hz PRIVATE + ${picomputer_zx_lcd_common_defines} + ${zxspectrum_zx_lcd_640x480x60Hz_defines} + LCD_MIRROR_X + REAL_ZXKEYBOARD + REAL_ZXKEYBOARD_BOB + HID_KEY_MOD_SAVE=2 + PICO_STARTUP_VGA ) diff --git a/src/picomputer/picomputer_st7789/main.cpp b/src/picomputer/picomputer_st7789/main.cpp index 2dc8b2f..e749749 100644 --- a/src/picomputer/picomputer_st7789/main.cpp +++ b/src/picomputer/picomputer_st7789/main.cpp @@ -51,8 +51,12 @@ struct semaphore dvi_start_sem; #ifdef PICOMPUTER_PICOZX_LCD +#ifdef PICO_STARTUP_VGA +static bool useVga = true; +#else static bool useVga = false; #endif +#endif static SdCardFatFsSpi sdCard0(0); @@ -405,9 +409,14 @@ int main() { pzx_keyscan_init(); #ifdef PICOMPUTER_PICOZX_LCD +#ifdef PICO_STARTUP_VGA + useVga = !pzx_fire_raw(); + ZxSpectrumFatSpiExists swap_option(&sdCard0, "zxspectrum", "lcd.txt"); +#else useVga = pzx_fire_raw(); - ZxSpectrumFatSpiExists vgaoption(&sdCard0, "zxspectrum", "vga.txt"); - useVga |= vgaoption.exists(); + ZxSpectrumFatSpiExists swap_option(&sdCard0, "zxspectrum", "vga.txt"); +#endif + if (swap_option.exists()) useVga = !useVga; #endif sem_init(&dvi_start_sem, 0, 1);