Skip to content

Latest commit

 

History

History
85 lines (78 loc) · 3.7 KB

readmeEnglish.md

File metadata and controls

85 lines (78 loc) · 3.7 KB

Tiny ESP32 C64

Port of the Toy C64 emulator from PC x86 (Rink Springer) to the TTGO VGA32 v1.2 board with ESP32.

I have made several modifications:
  • Ported from x86 PC to ESP32
  • Use of SRAM, no PSRAM is used.
  • Runs on ESP32 520 KB SRAM (TTGO VGA32 v1.2)
  • Use of a single core
  • Created project compatible with Arduino IDE and Platform IO
  • Arduino IDE 1.8.11 Espressif System 1.0.6
  • Floppy drive emulation (tests)
  • Cartridge emulation (tests)
  • Monochrome and color video character mode emulation
  • RAM and speed optimization
  • No Sound emulation (for now)
  • No emulation of bitmap and sprite modes (for now).

Requirements

Required:
  • TTGO VGA32 v1.2
  • Visual Studio 1.48.1 PLATFORMIO 2.2.0
  • Arduino IDE 1.8.11 Espressif System 1.0.6
  • Arduino bitluni 0.3.3 library (included in project)


PlatformIO

PLATFORMIO 2.2.0 must be installed from the Visual Studio extensions.

Then select the working directory TinyC64ttgovga32. We must modify the platformio.ini file upload_port option to select the COM port where we have our TTGO VGA32 board.

Then we will proceed to compile and upload to the board. No partitions are used, so we must upload the whole compiled binary. It's all set up so we don't have to install the bitluni libraries.

Arduino IDE

The whole project is compatible with the Arduino 1.8.11 framework. We only have to open the C64.ino in the c64 directory.

We must install the spressif extensions in the additional card url manager https://dl.espressif.com/dl/package_esp32_index.json.

For normal mode, the project is already prepared, so no bitluni library is needed. We must deactivate the PSRAM option, and in case of exceeding 1 MB of binary, select 4 MB of partition when uploading. Although the code does not use PSRAM, if the option is active and our ESP32 does not have it, an exception will be generated and it will restart in loop mode.

Test

Since this is a Test version, it should only be used for performance testing.
You get 162032 bytes of free SRAM.
The emulation times are around 10 ms per frame and 49 fps.
Only one core is being used for testing.
fps:49 10645 m:10636 mx:10663
fps:49 10645 m:10634 mx:10662
fps:49 10638 m:10636 mx:10649
Se puede probar el BASIC y pokes:
poke 1024,1
poke 55296,1


Usability

This version of Test only allows:
  • Key F12 Restart

Options

The gbConfig.h file options are selected:
  • usb_lib_fast_GetCyclesForOpcode: Use array cache to calculate time per instruction (very fast).
  • usb_lib_fast_MemoryReadByte: Use vectorless shortcut when reading from memory (very fast)
  • usb_lib_fast_MemoryWriteByte: Use vectorless shortcut when writing from memory (very fast)