Lattice of Convenience

There is a lattice of convenience which runs my house. From ripping CDs and DVDs to Kodi, Arcade cabinet, and a shitphone army acting as media players and remote controls. These posts describe how to sysadmin my house.

xrayspx's picture

Power Strip Pro-Tip

Music: 

Future Sound Of London - We Have Explosive

With the massive Retro Youtuber explosion going back even before Covid, I've been yelling to the void about "you need a real screwdriver". Thankfully a couple of rounds of iFixit & Linus sponsorships have gotten this point across :-) And now all those LTT screwdrivers have the delightful whiff of awkward about them. (Bias: I've had Snap-On since like 1997)

I think the next tool for home gamers should be power strips. No one ever thinks of power strips except maybe to mount a super long one over their bench.

I want to buy the world a TrippLite:



I've got these everywhere, but they're great on the bench. A lot of time you'll see Youtubers plugging a whole power strip in special just so they have a switch they can throw at a safe distance to turn on a machine (don't daisy-chain power strips kids!). I have test power cables spooled well away from the power strip just in case I want to cower at a safe distance when powering something up. The neon switches make it super obvious if the thing you're working on is powered or not at a glance:

Pair them with a bunch of 1' extensions and you can tidy up and add physical switches to all your awkward-sized wall warts or to move a plug closer to your work surface. I often have two velcro'd to my lamp:

We also have them in the living room so we can quickly power on & off a bunch of vintage computers and consoles and the LiteBrite and bling and stuff.

They're high quality and they're fast. Eaton/TrippLite has the same $25,000 damage warranty they put on their UPS products.

Next up: Desk Lamps!

*** *IMPORTANT SAFETY TIP* I don't use these on a bench through a UPS, they go straight into the wall. IMHO it's a super bad idea to have UPS power backing up something like a power supply you're testing on the bench! (there are stories here) ***

xrayspx's picture

Have some content

Music: 

It seems like I really don't write very much, but that's kind of a massive misconception. I don't write "much", but I had a bunch of blog entries that were at least 60% written and were missing like, screenshots or links or tags or I need to make new tags for things like XScreensaver and BSDs. Haiku. Shit lots of stuff.

xrayspx's picture

Cinnamon Needs To Get Their Shit Together

Music: 

Eddy Grant - Electric Avenue

I'm a KDE user. I like having my ultimate control over look & feel, even though in almost every sense I'm a "leave it default" guy. But I have a nice MacOS-ey theme, handily and easily-ish customized for the proper Green on Black color scheme which is one of 1.25 acceptable palettes (amber on black):

PICTURE

Note things like the Strawberry media player window and the Dolphin windows, these will be important at probably some future date.

xrayspx's picture

Vintage Radio Refurb

Music: 

Yes, Have Some

Electric cord plug with green goo indicating the insulation is breaking down inside.

xrayspx's picture

And you wanted to be my latex salesman

Music: 

For a brief moment I considered wiping one of these decommed Netscalers and using it to replace a Raspberry Pi for "around the house" tasks.

Well not with a sound like that mister. You're going back in the barn:

xrayspx's picture

That 120 Minutes Playlist

Music: 

I've just been directed toward a YouTube playlist that apparently made the rounds last August claiming to have "Every Video Played on 120 Minutes".  Well no.  Not really.  The claim is "2506 Videos".  Reality is...less.

 

I grabbed the playlist and threw it into my nightly randomizing grinder.  I already have a "120 Minutes" playlist, in which I just cram every video from every band who was ever on 120 Minutes in there.  Since it all "spiritually" counts.  I put stuff that "should" be in there too because what other slot would have played Humanwine I guess?

xrayspx's picture

Two Step Remote Assistance Tool

Music: 

My mom has a Mac, and occasionally something will fuck up in a way that is best fixed by me having some control over her machine.  I had one of those cases last week and it was embarrassing that there was no good way for me to get remote access.  Google Meet doesn't cut it, but there's a whole other Chrome Remote Desktop app, but that was a lot of hoops to install and gave up any hope of walking my mother through the install process.

xrayspx's picture

Daily Driving Haiku

Music: 

I've been testing Haiku OS pretty regularly as they'd release a new beta, but I hadn't ever really given it a fair shake. I saw it simply as a way to make old computers run somewhat modern software and load a wikipedia page or something. But with the release of Beta 4 I decided to give it a real chance and installed on an i7 laptop with 16GB of memory. Pretty much the same as my main Linux laptop.

xrayspx's picture

Mister Multisystem, Finally

Music: 

I am not writing this as a "getting started" or beginners guide, though it might evolve to serve that for some people. It's just notes I'm taking for things I need to look up. I'm not going to do any in-depth technical review or anything, go watch a youtube video for that. My perspective is from a career as a sysadmin and Linux user. Your mileage will certainly vary.

I strongly encourage you to skip my un-edited drivel and just scroll to more listy looking part.

This past weekend we resolved to kicking off, tidying up and playing with the MiSTer Multsystem. The actual "Problem" with getting this project going was that everything was way too easy to get, which has been our luck every time we need any Raspberry Pi's and stuff. We anticipated about a 3-4 month minimum lead time to land all the parts, figure out how it all goes together and how to get software to it. Everything turned up within a week. We got the DE-10 direct from the Terasic and they shipped pretty much immediately. Same story with the MultiSystem pack. I've been extremely interested watching this project as Neil has announced updates and features. The box was well packed and safe even after a real kicking by the various shipping companies.

I think it sat on the Project shelf for a month before we even had time around the holidays to put it together and try it out. It was super easy to assemble. Note: I spent 3 or 4 years in a local computer store in the '90s, and a 25-mumble-year career in IT so your mileage may vary. Actually that's not fair. Natalie did pretty much all the assembly work with me just kind of putting the case together. I'm still paranoid that I over-tightened screws or something since I've never really worked much with 3d printed anything. The case is very nice, well laid out and, while tight, everything is easy to route and very well documented.

Goals vs Reality


The Plan: This guy should sit prominently in The Room, quite probably wood-grained and hooked up to the main TV. There it would host all the console games for all the consoles neither of us ever had, and so have no muscle memory or nostalgia for. You know, For Kids.

The Reality: I was familiar from well-afar of the Mister project for some time. I know why the ST is there, and given all our other projects, this does have the capacity of seriously amusing me. But I wasn't sure about the MiSTer's interface, it looked like it might be a lot less friendly than something like EmulationStation. And that's a thing I go into below.

The other day I temporarily yet elegantly installed the MiSTer in the arcade cabinet and gave it a quick smoke test to make sure it still did things. I took a few minutes to figure out what using the external drive that I just happened to have hanging around was about and the effect it had on the virtual filesystem browser stuff.


1 week later and we spent a couple of hours today playing a bit, loading more games and software, then playing a bit more. Natalie wanted to start getting things documented for the Manual to the Living Room we are slowly beginning to put together. As we went through computer platforms from Atari 8-bit, ST, Amiga Natalie was taking notes on how to load software on each and get back to the main menu and whatever but really aside from necessary differences in how the keyboards are mapped, everything's just the same. We've been playing with an X-Box 360 controller because it's the only controller we own and it just worked. The arcade controls are going to take a bit of effort but the sticks and the trackball work, I just need to map buttons, and from what I can see that's not very hard.

The Big, Ugly Truth

The reason I really liked the standard linux machine plus a slick launcher is because it looks nice on the arcade cabinet and people could navigate it pretty easy. You know what? There are no "people" and this thing is way more convenient to use than the Pi + RetroPie. No trying to keep the button layout relatively synced between a bunch of different MAME emulators. Make that "A bunch of different versions of a bunch of different emulators". Nothing was ever consistent beyond the necessary controls. But it does look cool.

Enter the MiSTer. Since we're not emulating, there's not really anything much to tweak. Everything can pretty much be set up globally aside from a few platform specific changes. Even with arcade cores the UI is so consistent and easy to deal with that I won't exactly be pining for RetroArch any time soon. I need to figure out how to set a default set of controls though so I don't have to set the controls up for every single arcade cabinet forever. I know there's a menu item for that I just haven't pulled the trigger on possibly screwing things up yet.

It's also extremely easy to keep updated with all the latest cores using the "update_all" script. I'm using the "RetroDriven" fork, though I'm not sure what materially differs from the main line version. It's just the one I saw first. That tool was a revelation since you can just have it go out and populate any missing arcade ROMs, as well as adding cores that haven't made it to the main-line MiSTer distribution yet.

Sound can be /amazingly/ better than MAME. I'm not familiar enough with any console game to know what it should sound like vs an emulator. But I played a couple of games to test out Donkey Kong and it took me 3 games to get past just how much better it sounded on exactly the same hardware. I think it's like emulating a Moog synth vs copying it electrically at the circuit level. It'll at least get you a lot closer to "actual hardware" than MAME possibly can. (Important Note: The 4th game of DK I got within 700 points of my personal best 62,500 score on the board, and it's not like I'm constantly playing that game, it's pretty rare for me to do that well that quickly. [I think it's really more like 85k but that was before we had the board so I can't remember])

Conclusions?

While it's true that there are some arcade games that aren't yet "there" on the MiSTer, which work fine on a Pi-3, the fact is that while a given arcade core might not be ready for showtime just yet, like OutRun. And obviously there are systems that are simply too complex for the DE10-nano to copy. There are options, and they're imperfect, but still fun. The Sega 32x core works just fine I guess for games like Virtua Racing, and the Saturn core seems to be coming along fast. However for me a lot of the real value of this system is going to come in running the computers of my youth. Since I always had computers, I never really had consoles aside from the 2600 so I've been playing with the Atari 8-bit and ST cores (and the Amiga, because, you know, let's be real...). I'm even going to set up some hard drive images and profiles for color vs high-res mono.

This will get us through in emulation until the Next Big Kickstarter shows up at my door and I can use the ST to all of its ability with my SpecreGCR cartridge, etc...

I think we're into the MiSTer Multisystem for somewhere in the region of $400-$450. That's kind of steep, however what you get is every game released for every console up to about the PS1 / Sega 32x and maybe Saturn-ish. Plus all the 8-bit and 16-bit computers of the '70s through the early '90s, and their entire libraries. Plus a couple hundred arcade games. All easily managed in a simple to use and easy to understand interface.

Definitely 100% worth a look, especially given what people will spend for those "throwback" mini-consoles with a fixed set of titles baked into some potted-blob SoC.



I'm going to move a lot of the above into sorted bullets. I'm throwing some stuff around and will organize it as I go.



  • The "Minimig" Amiga emulator seems to run /way/ too fast, and I can't see any setting to slow it down, all indications are that it should be running a 7.whatever Mhz 68000. But the ST one works great. I saw someone saying the music was too fast, but indicated the game play was accurate. I disagree, the whole thing feels too fast to use for games I have muscle memory for (Tower Toppler).


  • As noted above in detail, the sound is fantastic, it's not even close.


  • Video Weirdness. I'm positive this is down to some scaling setting. I'm trying to get screenshots but my Mac keyboard doesn't have either a printscreen key or an F13 key, so balls. To use DK as an example since it does show up prominently what I'm seeing is variable "width" of identical single-pixel vertical lines or dots. So for instance the ladders in DK. One side of the ladder might be narrower than the other. Usually I see "normal" and "skinny" ladders, but I think I saw a "fat" one or two. Similarly in Ms. PacMan, some dots render as skinny. Aspect ratios seem correct otherwise so that's why I'm thinking it's some setting somewhere maybe. I don't even care it's a trade-off I'm willing to make for all the other benefits for gameplay and manageability.



    Yep, that was it: There are video processing options and you can choose from a list of profiles to match what you're doing


  • I do wish I could figure out how to directly edit core configs from the command line. Everything I've found seems to either be an empty file or binary that I can't modify. I'm sure there's something I can do. I'd love to figure out how to set generalized defaults for all cores, and then the user can define anything custom. So one key layout that will generally work across the board and then per-core settings can override that. Those per-core files could be shared as well. An editable "SNES Core - MS XBOX 360 Controller.cfg" or whatever.


  • I'm struggling to correctly make a folder for favorites using symlinks with absolute paths
  • xrayspx's picture

    Playlists

    Music: 

    Dr. Dre - Nuthin' But a G' Thang

    I had a request to share some playlist management stuff so I thought I should explain myself. I've got a significant CD collection, and a somewhat-significant collection of TV shows. This is fine on its own, but lots of media is pretty worthless without well curated playlists that you really don't have to think about. So I built Spotify, MTV and Syndicated TV.

    * NOTE: If you have a better way to do any of this let me know and I'll fix it. I particularly have the sense, which is not backed up by my testing, that "sort -R" isn't great.

    Music's easier so we'll start there. I use Strawberry to manage my music. This was all running under Clementine and aside from some DB schema changes, the scripts are portable between them.

    Until relatively recently I was never a big fan of "star" or "heart" ratings, but Clementine/Strawberry will store this metadata in the MP3 itself so I should be able to quickly recover if I lose my music database. In the app I have a few Smart Playlists like 3-Stars, 3 Stars + (This is 3, 4 and 5 star tracks), 4-Stars, 4-Star + and 5 Stars. To use 4 Star as an example, the rules look like this:

    Match every search term (AND)
    Rating - Greater than - 3.5 Stars
    Rathing - Less than - 5 Stars
    Ratin - Not Equals - 5 Stars
    Length - Greater Than - 8 Seconds

    That results in a playlist of 8423 songs with ratings between 4 and 4.99 stars. There was a bug in Clementine which I got fixed where ratings could exceed 5, so I'm a little careful to deal with weirdo cases, but it's pretty simple. I also have a bunch of manually selected playlists, so like an '80s one, '90s, and "Barn Radio". Barn Radio is our catch-all for the ubiquitous music we heard from the late '70s through late '80s. For Natalie that was largely with her dad in the dairy barn, for me it was the music of my 2 hours on the bus every day.

    Anyway, I have all these .m3us stored in a folder along with my MP3s called "playlists_base". These are used by a nightly playlist generator that pulls ~200 tracks and makes daily playlists running 8 or 10 hours each. The reason for this is that streaming software such as Airsonic-Advanced kind of chokes on massive playlists. It could be Airsonic itself, it could be populating the mobile client, I don't really know or care, other than to say it works great with list sizes under about 1000 tracks or so, so I keep them shorter.

    The x-Star playlists are all built from the database like this 4 Star + playlist below. You can see it do a couple of different Star Rating DB queries, dump out the tracks to $playlist_tmp.m3u, then cat that file and do a random sort to generate the final version. It's pretty easy to adjust the mix based on ratings, so if I wanted to weight high-rated tracks I could do that by adjusting how many tracks of the 200 are returned by each search:


    #!/bin/bash

    rm /Volumes/Filestore/CDs/playlists/4\ Stars\ +.m3u

    i=1

    while [ $i -le 100 ]
    do

    ### Switching from Clementine to Strawberry ###
    #       file=$(sqlite3 /var/tmp/clementine.db "select filename from songs where rating > "0.9" order by random() limit 1;" | awk -F "file://" '{print $2}')
            file=$(sqlite3 /var/tmp/strawberry.db "select url from songs where rating > "0.9" order by random() limit 1;" | awk -F "file://" '{print $2}')

            ### Clementine data encodes special characters and accent marks and stuff so I'm using
            ### Joel Parker Henderson's urldecode.sh to undo that: https://gist.github.com/cdown/1163649

            data=$(/home/xrayspx/bin/urldecode.sh "$file")
            if [ -f "$data" ]
            then
                    ### Have to escape leading brackets because grep treated it as a range and would allow duplicates ###
                    ### Can't do that in "data" because \[ isn't in the filename so they'll fail ###

                    escaped=$(echo "$data" | sed 's/\[/\\[/g')
                    #echo "$escaped"

                    ### Avoid duplicates
                    match=$(grep -i "$escaped" /var/tmp/4-star-tmp.m3u)
                    if [ -z "$match" ]
                    then
                            echo "$data" >> /var/tmp/4-star-tmp.m3u
                            ((i++))
                    fi
            fi
    done

    i=1

    while [ $i -le 100 ]
    do
    ### Switching from Clementine to Strawberry ###
    #        file=$(sqlite3 /var/tmp/clementine.db "select filename from songs where rating >= "0.8" and rating          file=$(sqlite3 /var/tmp/strawberry.db "select url from songs where rating >= "0.8" and rating 

            ### Clementine data encodes special characters and accent marks and stuff so I'm using
            ### Joel Parker Henderson's urldecode.sh to undo that: https://gist.github.com/cdown/1163649

            data=$(/home/xrayspx/bin/urldecode.sh "$file")
            if [ -f "$data" ]
            then
                    ### Have to escape leading brackets because grep treated it as a range and would allow duplicates ###
                    ### Can't do that in "data" because \[ isn't in the filename so they'll fail ###

                    escaped=$(echo "$data" | sed 's/\[/\\[/g')
                    #echo "$escaped"

                    ### Avoid duplicates
                    match=$(grep -i "$escaped" /var/tmp/4-star-tmp.m3u)
                    if [ -z "$match" ]
                    then
                            echo "$data" >> /var/tmp/4-star-tmp.m3u
                            ((i++))
                    fi
            fi
    done

    cat /var/tmp/4-star-tmp.m3u | sort -R > /Volumes/Filestore/CDs/playlists/4\ Stars\ +.m3u

    rm /var/tmp/4-star-tmp.m3u

    Those Star Rating lists are called at the beginning of my overall static playlist script, but the Barn playlist and other manually selected ones are built from the "playlists_base" directory. I basically just edit those .m3us in place with Strawberry as we add CDs. They just the files, do a random sort and pull the top 200. This will use any .m3u in .../playlists_base/ and make a daily file from it:


    #!/bin/bash

    #scp xrayspx@pro:~/.config/Clementine/clementine.db /var/tmp/

    ### Switching between Clementine and Strawberry ###
    #cp /Volumes/Filestore/CDs/playlists_base/clementine.db /var/tmp/

    cp /Volumes/Filestore/CDs/playlists_base/strawberry.db /var/tmp/

    /home/xrayspx/bin/3-star-playlist.sh
    /home/xrayspx/bin/4-star-playlist.sh
    /home/xrayspx/bin/5-star-playlist.sh
    /home/xrayspx/bin/get-the-led-out.sh

    ls /Volumes/Filestore/CDs/playlists_base/*.m3u > /Volumes/Filestore/CDs/playlists_base/m3us.txt

    while IFS= read -r file
    do

            filename=$(echo $file | awk -F "/Volumes/Filestore/CDs/playlists_base/" '{print $2}')

            echo Filename: $file

            rm "$file.full"
            rm "$file.scratch"
            rm "/Volumes/Filestore/CDs/playlists/$filename"

            ###Testing a change since Strawberry creates playlists without EXTINF lines ###
    #        array=`grep EXTINF "$file" | sort | uniq`
            array=`grep -v EXTINF "$file" | sort | uniq`

            printf '%s\n' "${array[@]}" | sort -R > "$file.full"
            head -n 200 "$file.full" > "/Volumes/Filestore/CDs/playlists_base/$filename.scratch"

            n=0
            while IFS= read -r extinfo
            do
    #       echo $extinfo
                    term=`echo $extinfo` # | cut -d "," -f 2-`
    #       echo $term

     ###Testing a change since Strawberry creates playlists without EXTINF lines ###
     # grep -A 1 -m 1 "$term" "$file" >> "/Volumes/Filestore/CDs/playlists/$filename"

            grep -m 1 "$term" "$file" >> "/Volumes/Filestore/CDs/playlists/$filename"
            done 

            rm "$file.full"
            rm "$file.scratch"

    done 

    rm /var/tmp/clementine.db
    rm /var/tmp/strawberry.db

    For TV shows it's a bit more complicated. I've got individual scripts for things like Sitcoms, Saturday Morning Cartoons, Buddy-Cop shows, Nick-at-Nite, etc. Each script uses a text file which just lists the relative path to the directories I want to randomize. I just read in that text file then scan each directory and build an array that again I sort -R and dump in an m3u. You'll see a couple of my conventions here, like the "dvd_extras" folders I use for any extras that I want to keep but don't want to have show up in the mix, as well as a bunch of other crap I grep out.

    This script references "./.sitcoms.txt", which looks like this:


    ./Archer (2009)
    ./30 Rock
    ./Absolutely Fabulous
    ./Alexei Sayle's Stuff


    #! /bin/bash

    array=$(
    while read line
    do
            find "$line" -type f;
    done < .sitcoms.txt
    )

    printf '%s\n' "${array[@]}" | sort -R | grep -v -w "batch" | grep -v dvd_extras | grep -v "./$" | grep -v "\.m3u" | grep -v -i ds_store |
     grep -v "\.nzb" | grep -v "\.nfo" | grep -v "\.sub" | grep -v "\.sfv" | grep -v "\.srt" | grep -v -i "\.ifo" | grep -v -i "\.idx" |
     sed 's/^/..\//' > ./1\ -\ Playlists/Sitcoms.m3u

    This dumps out to a folder called "1 - Playlists" inside my TV Shows directory, just so it shows up first. There's a folder in there for Blocks as well, in which I create blocks of 10 random episodes of a bunch of shows. This is built to replicate like TBS/TNT/USA in the evening where you just sit and watch a block of whatever is on. In practice I do this wrong and tend to be too picky about these and just watch blocks until I've worked my way through a whole series and wind up tired of it forever.

    One thing I do for things like Nick at Nite and overall Sitcom lists and stuff is that I mix in commercials. I don't do this very well though, I just treat my directory of commercials like any other TV show. I'd rather do "pull a TV show, toss in two commercials, repeat", but I'm not there yet I guess.

    The last type of lists I build are for music videos. I break this into a few different playlists, one overall catchall that pulls in all videos, a playlist for MTV 120 Minutes, and one for "Arcade / Pizzeria" music. Basically the ubiquitous music you'd hear in a pizza shop or arcade in the '80s or '90s. I do the same commercial thing here as well.

    Example:


    #! /bin/bash

    array=`find ../120\ Minutes -type f;
    find ../../../Commercials -type f`

    printf '%s\n' "${array[@]}" | sort -R | grep -v dvd_extras | grep -v "./$" | grep -v "ERRORS$" | grep -v "\.sh" | grep -v "\.m3u" |
     grep -v -i ds_store | grep -v ".nzb" | grep -v ".srt" > 120\ Minutes.m3u

    Pages

    Subscribe to RSS - Lattice of Convenience