x86 port of John Hawthorn's Vectrex emulator to the ESP32.
- Ported to ESP32
- No PSRAM used, running on ESP32 520 KB RAM (TTGO VGA32 v1.x)
- Use of a low-resource OSD
- Created project compatible with Arduino IDE and Platform IO
- Black and white mode 1 bpp (2 colors) VGA2Controller
- 640x480, 800x600 and 1024x768 support
- For video, fabgl 1.0.8 is used.
- Half speed emulation, 23 fps at 640x480 and 19 fps at 1024x768
- No sound at the moment
- Support for reading cartridges via WIFI
- Precompiled version (flash download 3.9.2) 1024x768
https://github.com/rpsubc8/ESP32TinyVectrex/tree/main/ESP32/precompile
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.
- TTGO VGA32 v1.x (1.0, 1.1, 1.2, 1.4)
- Visual Studio 1.66.1 PLATFORMIO 2.4.3 Espressif32 v3.5.0 (python 3.6)
- Arduino IDE 1.8.11 Espressif System 1.0.6
- Arduino fabgl 1.0.8 reduced library (included in PLATFORMIO project)
PLATFORMIO 2.4.3 must be installed from the Visual Studio extensions. Espressif32 v3.5.0 (python 3.6) is also required. The TinyVectrex working directory is then selected. We must modify the platformio.ini file the 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 entire compiled binary. It is all set up so you don't have to install the fabgl libraries.
- 32K cartridges
- Restart
http://tomeko.net/online_tools/file_to_hex.php?lang=en
Allowed to use:
- Cursors left, right, up, down
- Keys a, s, d, f
- use_lib_vga640x480: 640x480 video mode.
- use_lib_vga800x600: 800x600 video mode.
- use_lib_vga1024x768: 1024x768 video mode.
- use_lib_gfx: Disables video output. Displays nothing on the screen. Use only to measure emulation times.
- use_lib_wifi: Enable WIFI to be able to load cartridges from a web server. As it requires a lot of RAM, it is advisable to use an http server, instead of https. The network name and password must be entered in the gbWifiConfig.h file.
By default, it has been left pointing to the local server, since the github pages of the project requires https (RAM consumption), and will give memory failure:
https://rpsubc8.github.io/ESP32TinyVectrex/www/vectrex/output
To activate this mode, uncomment the line use_lib_wifi in gbConfig.h
We must configure in the file gbWIFIConfig.h the data:
#define gb_wifi_ssd "nombreDeNuestraRedWIFIdelRooter" #define gb_wifi_pass "passwordDeNuestraRedWIFIdelRooter" //#define gb_wifi_url_base_path "http://192.168.0.36/vectrex/output" #define gb_wifi_url_base_path "https://rpsubc8.github.io/ESP32TinyVectrex/www/vectrex/output" //millisecons delay stream read #define gb_wifi_delay_available 0 #define use_lib_wifi_debug
For now, the configuration is fixed in our gbWIFIConfig.h that we will have to recompile, so that it will only connect to our rooter network. Therefore we must change gb_wifi_ssd and gb_wifi_pass.
The gb_wifi_url_base_path is the path where our outlist and outdat directories are located, which contain the list of files, as well as the files themselves, so this path will be different if we use a local server.
The concept is simple, you have:
outlist --> File with the list of bin names (length 8). Limit of 128 files outdat --> The bin files.
For now, to optimize RAM consumption, we have left an 8:3 name length structure, i.e. 8 name characters and 3 extension characters. I leave some intermediate tools to prepare and make the conversion:
build.bat --> Launches all bats, processing input to output data83.bat --> Converts all input files to 8:3 format list.bat --> Generates the outlist (list of files). dsk.exe --> Generates a txt file containing a list of files with name length 8. lowercart.bat --> Convert BIN to .bin extensions
An example outlist, for example from cart.txt, containing:
ArmorAttBedlam Berzerk BlitzActCleanBosCleanSweCosmicChDarkToweDEADLINEdemo2019
Whenever a file is added, we must regenerate the list with the list.bat or by calling the whole build.bat process.
Inside is the list of files with a maximum length of 8 characters, which is what will be displayed in the cartridge selection menu in the ESP32. These files, for now, are intended for a maximum of 128 entries, which is equivalent to 1024 bytes (128 x 8).
Each time a request is made to a type, the .TXT file with the list (1024 bytes, 128 names) is loaded. And when it is selected, the request is made to the file in the outdat.
When a file is selected, it will be loaded into outdat with its path. The files must have the extension in lower case.
If you are using an external WEB server, it is possible that policies may prevent you from making consecutive requests, so it is advisable not to make requests too close together.
To debug the WIFI, uncomment use_lib_wifi_debug in the gbWifiConfig.h file.
- rainy (demoscene)
- OnslaughtElect (demoscene)
- demo 2019 party (demoscene)
- deadline 2019 (demoscene)
- raiding party (demoscene)
- trex