Page 1 of 46

tty2oled Soft&Hardware Add-On (Shows Core based Pictures on a Display)

Posted: Thu Jan 21, 2021 3:29 pm
by venice
Just for fun ;)

At first: Many Thx to Sorgelig and all Contributors.

I like to share my MiSTer Software & Hardware "Add-On" called tty2oled which shows Text or Pictures based on the loaded Core on a Display.
You can find the Add-On on Github.

<<Breaking NEWS>>
2021-11-26: The new tty2oled Updater supports installation & update of the tty2oled device firmware
2021-11-26: New Tool pixviewer https://venice1200.github.io/MiSTer_tty2oled_Pictures/
2021-10-15: Pictures now with 16 "Greyscale-Level" Support

tty2oled_video.gif

At first I had the idea to add an OLED-Display showing just the MiSTer Logo.
After a bit of searching I found the possibilty to get information about the actual loaded core out of the file /tmp/CORENAME.
I tried tail -F tmp/CORENAME which results in error messages so I choose cat /tmp/CORENAME in a timed loop.
Later the timed loop was replaced by inotifywait -e modify "/tmp/CORENAME" which makes the system more reactive.

I tried an USB (-Serial) connection between an Arduino and the MiSTer (not MiSTer's User Port)
as this is an standard communication feature on Arduino's and easy to use.
And USB Ports are available for most of the MiSTer users is some way.
My ATMega with an FTDI Serial Adapter was sucessfully detected as /dev/ttyUSB0 by the MiSter.
Later I used an ESP32 with an CP Communication Chip because of storage and speed.
My Display is an SSD1322-OLED with 256x64 Pixel connected via SPI to the ESP32 MCU.

Setup:
The very easiest way to do the MiSTer setup is to use the "Updater". See next Post for direct Links.

If you have questions go first through this thread and the wiki.
Maybe the questions was already answered.

If your problem was not already discussed we need to know your used Hardware and wiring,
which Arduino Program are you using (USB/SD) and add some detailed pictures.
Please do not ask for help via PM, other Forum Users can help as well!

Donating!
If you enjoy the project and if you like to donate to me SEND ME A POSTCARD with an nice picture of your City/Area/Location/Country/Continent/Planet.
Drop me an PM with the Subject "Cardware" and I will answer.

tty2oled Add-On

Posted: Thu Jan 21, 2021 3:33 pm
by venice

Re: tty2oled Add-On (Showing Corename based Text or Pictures on a Display)

Posted: Thu Jan 21, 2021 5:10 pm
by venice
-Empty-

Re: tty2oled Add-On (Showing Corename based Text or Pictures on a Display)

Posted: Thu Jan 21, 2021 6:29 pm
by hiddenbyleaves
This is the best thing I have ever seeeen!!!!

Re: tty2oled Add-On (Showing Corename based Text or Pictures on a Display)

Posted: Thu Jan 21, 2021 6:31 pm
by hiddenbyleaves
Where did you get the little oled?

Re: tty2oled Add-On (Showing Corename based Text or Pictures on a Display)

Posted: Thu Jan 21, 2021 6:45 pm
by MaxPlaysMiSTer
Very very cool! This could definitely be adapted to replace the marquee for the lucky bastards that have their MiSTer in a cabinet too.

maxresdefault.jpg

Re: tty2oled Add-On (Showing Corename based Text or Pictures on a Display)

Posted: Fri Jan 22, 2021 7:29 am
by venice
hiddenbyleaves wrote: Thu Jan 21, 2021 6:31 pm Where did you get the little oled?
My one is an 3.12" SSD1322 Controller based 256x64 Pixel OLED with at least an SPI Interface from AliExpress.
Most of the Displays support more connection modes (SPI/Parallel) so it's possible you need to change it.

Re: tty2oled Add-On (Show Text or Pictures based on Corename on a Display)

Posted: Fri Jan 22, 2021 2:29 pm
by LamerDeluxe
Wow, that is fantastic! Thanks for developing this and even explaining in detail how it works.

I love the MiSTer community, so active and always so many new creative developments.

tty2oled now with SD Card Support

Posted: Sun Feb 07, 2021 7:05 pm
by venice
SD Support added to the Add-On, second Post updated.
The SD Support add "live" download of the Pictures from SD Card. No need to keep the Pictures in Code.
Go to https://github.com/venice1200/MiSTer_tty2oled for Non SD an SD Versions and some XBM Picture files.

Important:
Both Arduino Versions use updated Serial Speed of 57600 baud so you need to change/replace the MiSTer Script tty2oled as well to support this.

My Current Pictures:
2021-02-09_All.png

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Tue Feb 09, 2021 4:02 pm
by venice
Question, is this the wrong forum's folder for sharing my add-on?

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Wed Feb 10, 2021 2:36 am
by Newsdee
So this works off any USB port right? It doesn't require using the serial IO?

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Wed Feb 10, 2021 12:10 pm
by gojira54
Love this project - got to give it a go =]
Just ordered 1x SSD1322 & 1x TTGO T8 ESP32

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Wed Feb 10, 2021 4:34 pm
by retrorepair
Newsdee wrote: Wed Feb 10, 2021 2:36 am So this works off any USB port right? It doesn't require using the serial IO?
Looks like USB from the image above.

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Thu Feb 11, 2021 7:49 am
by venice
retrorepair wrote: Wed Feb 10, 2021 4:34 pm
Newsdee wrote: Wed Feb 10, 2021 2:36 am So this works off any USB port right? It doesn't require using the serial IO?
Looks like USB from the image above.
Correct, USB only.
"USB-Serial" is related to the USB-Serial Chip on the Arduino.

gojira54 wrote: Wed Feb 10, 2021 12:10 pm Love this project - got to give it a go =]
Just ordered 1x SSD1322 & 1x TTGO T8 ESP32
Post your experiences here please.


Updates:
I changed the "Particle Effect" Arduino Code a bit. Works correctly now.

Does onyone knows which font is used on the "Moon Patrol" Logo? I like to rebuild it.

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Thu Feb 11, 2021 10:31 am
by hiddenbyleaves
Is that the biggest oled available for something like this? I can't find a bigger one.

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Thu Feb 11, 2021 1:14 pm
by venice
hiddenbyleaves wrote: Thu Feb 11, 2021 10:31 am Is that the biggest oled available for something like this? I can't find a bigger one.
The used library supports various display-controller and display-sizes.
See https://github.com/olikraus/u8g2/wiki/u8g2setupcpp for a list.
I have found entries up to 400X240 (maybe bigger).

My actual Arduino Sketch supports (currently) only the SSD1322 with 256x64 Pixel.

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Thu Feb 11, 2021 5:11 pm
by MiSTer_Kirk
Does onyone knows which font is used on the "Moon Patrol" Logo? I like to rebuild it.
Does this help ?

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Thu Feb 11, 2021 9:33 pm
by venice
Jepp, better. Thx.

MiSTer_MoonPatrol_v2_256x64.png
...and V3 (Final?).
MiSTer_MoonPatrol_v3_256x64.png

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Fri Feb 12, 2021 8:04 pm
by LamerDeluxe
I have some ideas for this display, I have no idea if they would be possible:

- Show the current track number being read from a disk drive, a tape drive counter would be cool as well
- Show the controller button assignments for the current core
- Show the source display resolution and frequency, maybe the destination as well, like the one that pops up when starting a core.
- Time, WiFi/Network status, Bluetooth Status, IP address, the stuff in the main menu.
- Audio peak/vu meters, that would probably require too much performance.

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Fri Feb 12, 2021 10:05 pm
by MiSTer_Kirk
I like those ideas above, especially the disk drive track number, tape counter, etc...

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Sat Feb 13, 2021 7:05 am
by venice
LamerDeluxe wrote: Fri Feb 12, 2021 8:04 pm I have some ideas for this display, I have no idea if they would be possible:
Every known value can be displayed.
The Problem is how and where to get them.

And I don‘t know what happens if you send permanently data from the MiSTer to the Arduino.
Does this create Problems with other USB Devices (Joystick Lag).

Maybe @Sorgelig can give us some comments?

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Sat Feb 13, 2021 8:16 am
by venice
The question is how much the HPS Part of the MiSTer knows about values from the FPGA Part like "disk drive track number, tape counter, etc...".

If I understand the DE10-Nano Board correctly the USB Ports are connected to the HPS Part.

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Sat Feb 13, 2021 9:30 am
by LamerDeluxe
venice wrote: Sat Feb 13, 2021 8:16 am The question is how much the HPS Part of the MiSTer knows about values from the FPGA Part like "disk drive track number, tape counter, etc...".

If I understand the DE10-Nano Board correctly the USB Ports are connected to the HPS Part.
It would need support from the menu core and the individual other cores. I also wonder if it would negatively impact performance, as I read that Sorgelig wrote about performance on the ARM side being tight.
But things like a disk drive track number are exactly the type of thing I'd not want to read on my main display but on an external one. Internal temperature would be another good one to have.

Re: tty2oled Add-On now with SD Support (Show Text or Pictures based on loaded Core on Display)

Posted: Sun Feb 14, 2021 9:22 am
by venice
Update tty2oled Script
Changed the timed loop from sleep $WAITSECS to an loop with inotifywait -e modify "/tmp/CORENAME".
This makes the system more reactive as the scripts waits for an Core change instead of polling.

Got the idea from here https://misterfpga.org/viewtopic.php?p=18302#p18302

Update SD-Version
Added some more Home Menu Effects (just for fun)

Re: tty2oled Software Add-On now with SD Support (Show Text/Pictures based on loaded Core on Display)

Posted: Wed Feb 17, 2021 1:02 pm
by terminator2k2
could something like this be implemented into the mt32-pi ? so we could have 1 display that does everything? i love the idea of this

Re: tty2oled Software Add-On now with SD Support (Show Text/Pictures based on loaded Core on Display)

Posted: Thu Feb 18, 2021 7:08 am
by venice
terminator2k2 wrote: Wed Feb 17, 2021 1:02 pm could something like this be implemented into the mt32-pi ? so we could have 1 display that does everything? i love the idea of this
You can ask the mt32 develpoper. I have no idea if it's possible.

Re: tty2oled Software Add-On now with SD Support (Show Text/Pictures based on loaded Core on Display)

Posted: Sun Feb 21, 2021 5:28 pm
by venice
Update SD-Version
-Using the Effects for all Picture/Logo Transistions (not only for the Menu)
-"MENU" Picture moved from Code to the SD, makes it easier to change (if you like)
-Modified Text Position calculation (See Arduino File for Details)
-Show a small "SD-Icon" on Startup Screen instead of the "dot" if SD Card was detected

Re: tty2oled Software Add-On now with SD Support (Show Text/Pictures based on loaded Core on Display)

Posted: Tue Feb 23, 2021 6:38 pm
by Epyc
Is it possible to display the current Game/File that's loaded in the core?

Re: tty2oled Software Add-On now with SD Support (Show Text/Pictures based on loaded Core on Display)

Posted: Tue Feb 23, 2021 8:35 pm
by venice
Epyc wrote: Tue Feb 23, 2021 6:38 pm Is it possible to display the current Game/File that's loaded in the core?
Not that I know.
Such a function would be nice but needs to be supported by the used cores.

Re: tty2oled Software Add-On now with SD Support (Show Text/Pictures based on loaded Core on Display)

Posted: Tue Mar 02, 2021 4:07 pm
by venice
Update Standard Version by RealLarry (Github Pull Request).

New Logos added:
Photo-2021-03-02-15-50-18_6679.jpg
Photo-2021-03-02-15-49-49_6678.jpg
Photo-2021-03-02-15-49-29_6677.jpg
Photo-2021-03-02-15-49-04_6676.jpg
Photo-2021-03-02-15-48-42_6675.jpg
I have adjusted the new uploaded XBM Filenames so they can be used with the SD Version as well.
Many Thanks

//Edit
New Pictures added by RealLarry for:
Chess, Gameboy, GBA, MegaCD, SG1000, VECTREX, VideoPac, Pooyan, SuperBreakout, Zaxxon
Many Thanks