-
Notifications
You must be signed in to change notification settings - Fork 12
How does it work
When the MiSTer boots up the script /etc/init.d/S60tty2oled
is called.
This script does nothing more than calling the script /usr/bin/tty2oled
and sent it to the background,
but only if /usr/bin/tty2oled
is found and is executable.
The script /usr/bin/tty2oled
checks at first the system for the device /dev/ttyUSB0
.
If the device is not found the scripts ends here.
If the device is found the tty-device parameter are set with the stty
command.
Now the script sends an First Transmission.
First Transmission?
During my tests I got sometimes weird display startup behavior when the MiSTer's was powerred on.
Sometimes the text MENU was written instead of the MiSTer Picture shown.
Maybe some sleeping bits in the serial channel π.
After I added the First Transmission to the script the problem was gone π.
Now the main loop is started and checks the existence of the file /tmp/CORENAME
.
If the file doesn't exist the script tries again and again and ...
If the file exists, the file's content is read using cat /tmp/CORENAME
,
stored into the variable newcore
and send to the tty Device.
At the end of the main loop the script waits for the next change and re-starts the loop.
Every loop the Corename is checked but the data are sent only if the Corename has changed.
The Arduino receives the transferred Corename.
If the Corename is within a list of known Names the corresponding picture is shown.
If the Corename is unknown just the Corename is shown.
The used font for the Text can be changed within the Arduino Code.
See the list of fonts for all in the Library included fonts.
To prevent Display flickering the Text or Picture is only updated if the received Corename has changed.
Known Corenames
The following Corenames are identified and an dedicated or generic Picture is shown.
Arcade:
asteroid, atetris, atetrisc, centiped, centiped3, dkong, dkongdks, dkong3, dkong3b, frogger,
llander, mooncrgx ,mpatrol, pong, pooyan, popeye, sbrkout, zaxxon
Computers:
AcornAtom, AO486, APPLE-I, Apple-II, ARCHIE, AtariST, ATARI800, C64, Minimig, MSX, PET2001, VIC20
Console:
ATARI2600, ATARI5200, ATARI7800, AtariLynx, Astrocade, ChannelF, Coleco, GAMEBOY, GBA, Genesis,
MEGACD, NEOGEO, NES, ODYSSEY, Playstation, SMS, SNES, TGFX16, VECTREX
Other:
CHESS, MEMTEST, MENU (Menu Logo fading in with an particle effect), QWERTZ (first transmission).
Tip: Check the Arduino Code of the Standard Version for Supported Corenames.
The SD Version supports the live download of Pictures from SD Card. No need to keep the Pictures in Code.
You need an Arduino compatible Hardware plus/with an SD Slot/Breakout.
I use an ESP32 TTGO-T8 v1.7.1 with an integrated SD Slot.
The SD Card must be formatted with FAT or FAT32.
If the SD Card was found an SD-Card Icon is shown on the Startup Screen.
The Arduino Sketch searches for the XBM converted pictures in the root folder of the SD Card.
The Pictures must have the size of 256x64 Pixel for the used SSD1322 Display.
The filename must be the name of the core with .xbm as extension.
Example: The Arcade Lunar Lander has the corename llander
means the filename needs to be llander.xbm
.
See https://github.com/venice1200/MiSTer_tty2oled/tree/main/Pictures/xbm_sd for examples.
The Arduino receives the transferred Corename and checks the SD Card for an corresponding file.
If the file is found it's loaded and shown on the Display.
If the file or the SD card is not found just the Corename is shown as Text.
With the SD Card it's easy to add or update the Pictures by adding or changing the files on the SD Card.
Tip: Just get all files from XBM_SD Folder and copy them to your SD Card.
Core with Picture
Core shown by name
Technical Note:
The SD Version uses an dedicated SPI Interface because of issues using an OLED and an SD Card together on one ESP32 SPI Interface.
πΎ πΎ
ποΈ >>Start here<<
π₯ MiSTer Installation & Update π₯
β History (Updates & Notes)
π§ Realizing / How does it work
π Electrical / PCB's / Tested Hardware
βοΈ Arduino HowTo for Windows
π Arduino IDE Settings
π‘ OTA (Wireless) Arduino Update
π¬ CMD Mode (Greyscale/Adafruit GFX)
π¬ Old CMD Mode (Monochrome/U8G2)
πΌοΈ Build Greyscale Pictures (GSC)
π¨ Testing / Troubleshooting
π Files and Folders in this Repository
πΌοΈ Gallery
π― Cardware
π Credits and Links