fdivitto / FabGL

ESP32 Display Controller (VGA, PAL/NTSC Color Composite, SSD1306, ST7789, ILI9341), PS/2 Mouse and Keyboard Controller, Graphics Library, Sound Engine, Game Engine and ANSI/VT Terminal
http://www.fabglib.org
Other
1.48k stars 221 forks source link

VIC20.ino causing TTGO VGA32 v1.4 to Crash / Reboot with an SD Card Inserted #375

Open M5864 opened 10 months ago

M5864 commented 10 months ago

Bug: VIC20.ino, if SD card is inserted into a TTGO v1.4 board and you try to choose RAM Expansion 32K or 35K (32K + 3K) the board will reboot itself. It does not happen with anything below 32K that is chosen.

Environment: Linux, Arduino IDE 2.2.1 using FabGL 1.0.9 (behaves the same on 1.0.7 - 1.0.9, I didn't try anything older)

How to reproduce:

  1. Open VIC20.ino and upload to the board as usual
  2. Make sure NO SD card is inserted
  3. Upon boot, click the "RAM Expansion" drop-down box and click on 32K or 35K, the device will not reboot
  4. Disconnect power to VGA32 board
  5. Insert an SD card
  6. Reapply power
  7. Upon boot, click the "RAM Expansion" drop-down box and click on 32K or 35K, the device will reboot

I traced it down to this line in the VIC20.ino file that's causing the reboot when the selected item is 32K or 35K: Line 450: machine->setRAMExpansion((RAMExpansionOption)(RAMExpComboBox->selectedItem()));

This prevents playing any games that are 32K, like Popeye (when the SD Card is inserted), etc.

Thank you