Skip to content

Latest commit

 

History

History
162 lines (135 loc) · 6.71 KB

readmeEnglish.md

File metadata and controls

162 lines (135 loc) · 6.71 KB

ESP32 Tiny Elkulator

Port x86 Elkulator Acorn Electron version 0.5 (author Tom Walker) to TTGO VGA32 v1.x (1.0, 1.1, 1.2, 1.4) board with ESP32.


I have made several modifications:
  • Running on ESP32 with 520 KB of RAM (TTGO VGA32)
  • Use of a single core
  • Low-income OSD
  • Created project compatible with Arduino IDE and Platform IO
  • Web Editor and ArduinoDroid (6.3.1) compatible project with tool makeandroid.bat
  • Loading ROMs in Flash progmem
  • Loading SNA (version 0.5) in Flash progmem
  • Loading ADF disk in Flash progmem
  • 8 and 64 color mode support (reduced version by Ricardo Massaro)
  • Video mode 320x200
  • Screen scale
  • Precompiled version (flash download 3.9.2) 320x200 (DAC 3 bits, 8 colors)
  • No sound emulation for the time being.
  • Option to remove the IEEE (double) rounding calculation from the VGA, to avoid accuracy issues. This anomaly was found as a result of David Crespo Tascón's failure to take video.
  • There are no keys to be mapped:
        Missing:
        Row 0: Copy (bit 1) and NC (bit 2, No connection, no need)
        Row 2: NC (bit 3, No connection, no need)
        Row 3: ; (bit 2)    
       



Precompiled version

In the precompile folder there is a version already compiled to be saved with the flash download tool 3.9.2. It is a version with 320x200 resolution (DAC 3 bits, 8 colors) with the demo games in FLASH.

https://github.com/rpsubc8/ESP32TinyElkulator/tree/main/esp32/precompile/320x200
A 320x200 option without IEEE calculation has also been added.

We must choose the ESP32 type:

Subsequently, select the files as shown in the attached screenshot, with the same offset values:

And we will press start. If everything has been correct, we will only have to restart the ESP32.



Requirements

Required:
  • TTGO VGA32 v1.x (1.0, 1.1, 1.2, 1.4)
  • Visual Studio 1.66.1 PLATFORMIO 2.5.0 Espressif32 v3.5.0
  • Arduino IDE 1.8.11 Espressif System 1.0.6
  • ArduinoDroid (6.3.1)
  • Arduino bitluni 0.3.3 reduced library (included in project)



ArduinoDroid

You must run, just once, the script makeandroid.bat, which leaves the entire data structure of the dataFlash directory in the root directory, as well as replacing the main files with .h calls without using the dataFlash data directory.
At the end, the script itself ends up deleting the dataFlash directory.
The script uses fart.exe (find and replace text).
Once, it has been successfully executed, it can be used with the ArduinoDroid.



Arduino Web Editor

The makeandroid.bat script must be run once only. Once finished, it is uploaded to the cloud as any other project, either compressed in zip or by files.



PlatformIO

PLATFORMIO 2.5.0 must be installed from the Visual Studio extensions. Espressif32 v3.5.0 is also required.

Then the working directory TinyElkulatorttgovga32 will be selected. We must modify the file platformio.ini the option upload_port 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 all the compiled binary. Everything is prepared so we don't have to install the bitluni libraries.



Arduino IDE

The whole project is compatible with the structure of Arduino 1.8.11. We only have to open the elkulator.ino of the elkulator directory.

We must install the spressif (v1.0.6) extensions in the additional card url manager https://dl.espressif.com/dl/package_esp32_index.json For the normal mode, the project is already prepared, so that no bitluni library is needed. We can do it from the library manager. 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 be restarted in loop mode.



Usability

Loading is allowed:
  • Snapshots SNA (version 0.5)
  • 16 KB and 32 KB cartridges
  • ADF format discs
There is a basic OSD of low resources, that is to say, very simple, that is visualized by pressing the key F1.

The files must be converted to .h in hexadecimal. You can use the online tool:
http://tomeko.net/online_tools/file_to_hex.php?lang=en



Options

The file gbConfig.h options are selected:
  • use_lib_vga320x200: 320x200 mode
  • use_lib_320x200: Displays 200 lines in, instead of 256 in 320x200
  • use_lib_vga8colors: 8-color (3-bit RGB) or 64-color (6-bit RRGGBB) mode
  • use_lib_log_serial: Logs are sent by serial port usb
  • FIX_PERIBOARD_NOT_INITING: David Crespo Tascón's solution for keyboards that do not initialize.
  • gb_ms_keyboard: You must specify the number of milliseconds of polling for the keyboard.
  • use_lib_fix_double_precision: It doesn't use the VGA video frequency calculation with the ESP32 itself, avoiding possible accuracy problems with the mantissa. This is useful for ESP32's that miscalculate the frequency.



Test applications

Multiple games have been left in SNA format (version 0.5):
  • Craze Erider
  • Space Invaders
  • Killer gorilla
  • Stock car
  • Felix

Multiple cartridges (16 KB) have been left behind:

  • Hopper
  • Snapper

Multiple cartridges (32 KB) have been left behind:

  • Count Down
  • Star Ship Command
  • LISP

The Wellcome disc has been left behind. For testing from the emulator:

 *CAT
 *!BOOT



DIY circuit

If we don't want to use a TTGO VGA32 v1.x board, we can build it following fabgl's schematic: