extern "C" { #include "iopins.h" #include "emuapi.h" } #include "emu.h" #include "emu.h" #ifdef HAS_T4_VGA #include "vga_t_dma.h" TFT_T_DMA tft; #else #include "tft_t_dma.h" TFT_T_DMA tft = TFT_T_DMA(TFT_CS, TFT_DC, TFT_RST, TFT_MOSI, TFT_SCLK, TFT_MISO, TFT_TOUCH_CS, TFT_TOUCH_INT); #endif bool vgaMode = false; static unsigned char palette8[PALETTE_SIZE]; static unsigned short palette16[PALETTE_SIZE]; static IntervalTimer myTimer; volatile boolean vbl=true; static int skip=0; static elapsedMicros tius; static void vblCount() { if (vbl) { vbl = false; } else { vbl = true; } } void emu_SetPaletteEntry(unsigned char r, unsigned char g, unsigned char b, int index) { if (index