#include "esp_attr.h" #include "rom/cache.h" #include "rom/ets_sys.h" #include "rom/spi_flash.h" #include "rom/crc.h" #include "soc/soc.h" #include "soc/dport_reg.h" #include "soc/io_mux_reg.h" #include "soc/efuse_reg.h" #include "soc/rtc_cntl_reg.h" #include #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include #include "esp_err.h" #include "nvs_flash.h" #include "esp_partition.h" #include "emu.h" #include "tmeconfig.h" unsigned char *romdata; void emuTask(void *pvParameters) { tmeStartEmu(romdata); } void app_main() { int i; const esp_partition_t* part; spi_flash_mmap_handle_t hrom; esp_err_t err; part=esp_partition_find_first(0x40, 0x1, NULL); if (part==0) printf("Couldn't find bootrom part!\n"); err=esp_partition_mmap(part, 0, 128*1024, SPI_FLASH_MMAP_DATA, (const void**)&romdata, &hrom); if (err!=ESP_OK) printf("Couldn't map bootrom part!\n"); printf("Starting emu...\n"); xTaskCreatePinnedToCore(&emuTask, "emu", 6*1024, NULL, 5, NULL, 0); }