Category: music

Gameboy and music

I recently got my music bug again, and with my recent trip to Australia was able to bring back my original Gameboy. Combining the two, I thought I’d check out what music-making capabilities the Gameboy had. The most popular software was “Little sound DJ” (https://www.littlesounddj.com/). I purchased the full version of that, and while I could run that on an emulator, I wanted to run it on the real deal. To do this, I purchased a Gameboy flashing cartridge, “Flash BOY” ( https://www.ebay.com.au/itm/223590080458). This came with few instructions however. I was able to plug it into my laptop’s USB and see that it displayed as a FTDI device, but would need drivers. I installed some from here: https://www.ftdichip.com/Drivers/VCP.htm but after more googling for flashing software, found that this also provided some drivers: https://sourceforge.net/projects/gbcf/

Starting up that tool, I put the flash boy cartridge into the flash boy itself and was greeted with this:

TMNT3? I put the cartridge in my gameboy just to check and – yep! There was TMNT3! I guess they used it as a test ROM.

Anyway, that was soon replaced with the LittleDJ software. I first hit “Erase FLASH” and then “Write FLASH” which gave me a file choice dialog box, where I chose the little sound DJ .gb file. It took a few minutes to flash. I put the cartridge in and was greeted by the text “”CARTRIDGE TEST SRAM FAIL TRY CLEANING PINS OR REPLACE BATTERY”.

I didn’t really know how to fix this, so I reset my FLASH size to be 2048 KB (16 Mb, which is what the Flash BOY supported), and upped the RAM to 32 KB. I did a full erase FLASH and RAM, then reflashed the DJ file, and read back the results:

Success! (Previously I was getting a bad game logo signature and a “Flash chip manufacturer name” of “Xilinx”).

…. or was it? Although this now wrote to the cartridge correctly, the ROM was not that of the DJ software. Looks like I will be needing a part 2 to this post!

Setting up a raspberry pi photo viewer (with music)

I set up a Raspberry Pi photo viewer at work to display photos from members of the photo club.  Members were instructed to put their photos on a Google Drive location (accessible only within the company VPN) and then the viewer would sync down the photos at a predetermined schedule.  To get access to Google Drive, I used rclone.  To display I used ‘feh’, which was also used to put text indicating the name of the photo.

curl https://rclone.org/install.sh | sudo bash

rclone config

// choose google, team drive.  Follow the prompts

// To sync:
rclone sync -v motofoto:SoftwareKitchenPhotos /home/pi/Pictures/SoftwareKitchenPhotos/

// remember: that’s rclone sync -v <source> <destination>!  I have wiped out my local directory by syncing with an empty google drive folder!

// Setting up cronjob:
crontab -e

30 2 * * * /usr/bin/rclone sync motofoto:SoftwareKitchenPhotos /home/pi/Pictures/SoftwareKitchenPhotos/

// this runs the job at 2:30 every morning

Two scripts are set to launch on boot.  One plays music, the other starts feh.

The directory structure was such that from the root folder to be synced, photographers created a folder with their name and put their photos within it.  I requested that the photos have creative names.  Given this format, I could put a watermark on each photo in the bottom left by doing the following:

feh –recursive –slideshow-delay 10 –info “echo %F | rev | cut -d’/’ -f1-2 | rev | sed -r ‘s/[.].*//’ | sed -r ‘s/\// – /'”

I want to get the author name (lowest-level directory) and photo name (name of jpg file), strip off the jpg extension, and replace the directory separate “/” with a spaced hyphen ” – “.  To do this, I:

  • Get the path of the currently displayed photo “echo %F”.
  • To get the lowest level directory, I want to grab the directory and filename at the end.  I don’t know how many directories deep this will be, but if reversed, I know it will be the first and second elements (if “/” is considered as a separator: rev | cut -d’/’ -f1-2
  • I then want to reverse the result back, and strip off the .jpg from the filename (really, anything starting with “.”): rev | sed -r ‘s/[.].*//’
  • Finally, I want to replace the “/” with a hyphen, so it will be “Firstname Lastname – Name of photo”: sed -r ‘s/\// – /’

TODO: Starting photo viewer and music player on boot.

More space-rock, please.

I love me some space-rock. Muse is my favourite band by bloody far, and anyone who knows me just … knows that. I discovered today an unsigned band from New Zealand called “Battle Circus”, and they sound so much like Muse that I love them too. Here is one of their videos.

They have an EP out which is quite good, and are working on an album which is scheduled to be released later this year. Check out their website for links to facebook, twitter, whatever: http://www.battlecircus.com/