3RSystem Mstation HT-3000 - 15c2:ffdc - LCD display on Linux

Friday, April 21, 2017



#!/bin/bash
#
# ht3klcd
#
# script by Cleber de Mattos Casali   http://cmcgames.blogspot.com
#  
# This is a bash script to get my LCD display working on Linux.
# It came with the Mstation HT-3000 case from 3RSystem.
# The device is identified as ID 15c2:ffdc SoundGraph Inc. iMON PAD Remote Controller.
# However, the LCD panel is different from the others I have seen around in the internet.
#
# It has:
#  - 12 text characters for messages and the clock;
#  - 3 fan indicators (updated automatically);
#  - a temperature indicator (updated automatically);
#  - a CPU usage bar;
#  - another bar in the left I couldn't get to work.
#
# LCDd does keep the panel on, but it can't update any info, and the clock just keeps frozen at 12:00.
# I've tried both the imon and the imonlcd drivers, same results.
# This script does get it working, however, you need to stop LCDd before running it.
#
#
# Usage:
#
# ht3klcd
#   run in loop mode
#
# ht3klcd "MESSAGE"
#   display a text message (uses a pipe, needs a running instance)
#  


#PROTOCOL INFO - COMMANDS:

#TIME/DATE:  0d 0f < MM/DD HHMM > 00 02

#TEXT MESSAGE: 0d 0f <12 chars="" message=""> 00 02

#CPU USAGE:  02 0e 00 00 00 00 00 00 00 00 00 00 00 00 02

#Windows driver keeps doing this, but I don't know what it does: 02 1b 01 00 00 00 00 00 00 00 00 00 00 00 00 02

#I don't know how to activate the left bar (volume?). Could'n get it to move on Windows either.

#Buffer always ends with 02 on Windows, but it doesn't seem to make a difference.


#parameters
device=/dev/lcd2
pipeurl="/tmp/.ht3klcd-pipe"
interval=2


#command-line parameter: display message and exit
if [ -n "$1" ]
 then
    mkfifo $pipeurl
    echo "$1">$pipeurl
    exit
fi


while true
do

#get CPU usage
CPU_usage=$(cat <(grep 'cpu ' /proc/stat) <(sleep $interval && grep 'cpu ' /proc/stat) | awk -v RS="" '{printf "%.f\n", ($13-$2+$15-$4)*9/($13-$2+$15-$4+$16-$5)}')

#receive message
if [ -e $pipeurl ]
then

    while read getmsg
    do
      msg=$getmsg
    done<$pipeurl
   
    rm $pipeurl

    #display message
    echo -e -n '\x0d\x0f'$msg >$device
   
else 

    #get date/time in the correct format
    msg=$(date +" %m/%d %H%M")

fi

    #display date/time or message
    echo -e -n '\x0d\x0f'$msg >$device

    #display CPU usage
    echo -e -n "\x02\x0e\x0$CPU_usage" >$device

done

Read more...

YAGAC MD demo

Thursday, December 8, 2016



YAGAC MD : new Mega Drive / Sega Genesis game (WIP)

Download demo

Read more...

Aah! Harimanada region patch

Tuesday, July 5, 2016

This is an IPS patch for the japanese game "Aah! Harimanada".

The game is region locked.

With this patch, the game will run in U region Sega Genesis / Mega Drive consoles.



Read more...

Numbezzled

Tuesday, December 30, 2014

Numbezzled was specially developed for the FBGD Numbers Competition

Copyright (C) Cleber M. Casali. All rights reserved.

Numbezzled is a free, open-source game. Please support it by making a donation. Donate any amount, it will be very much appreciated.


Download:
Windows/Linux multiplatform package (.zip)
Ubuntu/Debian installer package (.deb)

Read more...
Easy-Share


template by Ourblogtemplates.com
©Copyright 2009, Cleber de Mattos Casali. All rights reserved.