diff --git a/components/mipidisp/mipi.c b/components/mipidisp/mipi.c index 91e8404..ce14e3b 100644 --- a/components/mipidisp/mipi.c +++ b/components/mipidisp/mipi.c @@ -208,7 +208,7 @@ void mipiInit() { spidev->ctrl.rd_bit_order=1; //LSB first spidev->ctrl.wr_bit_order=1; spidev->pin.ck_idle_edge=0; - spidev->user.ck_out_edge=1; + spidev->user.ck_out_edge=1; //0 for <40MHz? spidev->ctrl2.miso_delay_mode=0; spidev->ctrl.val &= ~(SPI_FREAD_DUAL|SPI_FREAD_QUAD|SPI_FREAD_DIO|SPI_FREAD_QIO); spidev->user.val &= ~(SPI_FWRITE_DUAL|SPI_FWRITE_QUAD|SPI_FWRITE_DIO|SPI_FWRITE_QIO); diff --git a/components/tme-esp32/mipi_lcd.c b/components/tme-esp32/mipi_lcd.c index 6f66bf0..60f8679 100644 --- a/components/tme-esp32/mipi_lcd.c +++ b/components/tme-esp32/mipi_lcd.c @@ -145,7 +145,7 @@ int findPixelVal(uint8_t *data, int x, int y) { volatile static uint8_t *currFbPtr=NULL; SemaphoreHandle_t dispSem = NULL; -#define LINESPERBUF 8 +#define LINESPERBUF 32 static void initLcd() { mipiInit(); @@ -173,6 +173,7 @@ void IRAM_ATTR displayTask(void *arg) { assert(img); calcLut(); + int firstrun=1; while(1) { int l=0; mipiResync(); @@ -192,6 +193,8 @@ void IRAM_ATTR displayTask(void *arg) { img[0]=0x3c; l=0; p=&img[1]; + if (!firstrun && j>=200) break; //no need to render black bar in subsequent times + firstrun=0; } } } @@ -205,6 +208,7 @@ void dispDraw(uint8_t *mem) { xSemaphoreGive(dispSem); adns900_get_dxdybtn(&dx, &dy, &btn); mouseMove(dx, dy, btn); +// printf("Mouse: %d %d\n", dx, dy); } diff --git a/components/tme/emu.c b/components/tme/emu.c index e906e30..16b2173 100644 --- a/components/tme/emu.c +++ b/components/tme/emu.c @@ -16,6 +16,8 @@ #include "ncr.h" #include "hd.h" #include "mouse.h" +#include +#include "esp_heap_alloc_caps.h" unsigned char *macRom; unsigned char *macRam; @@ -105,6 +107,7 @@ void printFps() { long msec=(tv.tv_sec-oldtv.tv_sec)*1000; msec+=(tv.tv_usec-oldtv.tv_usec)/1000; printf("Speed: %d%%\n", (int)(100000/msec)); + printf("Mem free: %dKiB 8-bit, %dKiB 32-bit\n", xPortGetFreeHeapSizeCaps(MALLOC_CAP_8BIT)/1024, xPortGetFreeHeapSizeCaps(MALLOC_CAP_32BIT)/1024); } oldtv.tv_sec=tv.tv_sec; oldtv.tv_usec=tv.tv_usec;