PDA

View Full Version : HyperManager



Lashek
11-27-2010, 09:14 AM
OK! Next up on the 3rd party applications list is a tool that I'm loving (so far!).

Thanks to the holidays, all the family came over and the cabinet was a HUGE hit, but there were some glaring issues that I couldn't fix due to it being in use.

As a result, all I could think about was "How can I prevent this and still administrate the cabinet while the cab is in use? Remote desktop is out by default..."

Enter HyperManager, a PHP Web-script run in Windows using EasyPHP, PSTools, and my code. :)

What can it do? Currently, not much. Rebooting the computer, shutting the computer down, starting/stopping HyperSpin on the pc, as well as viewing the System Status.

What is being planned for it to do? Modify HyperSpin configs, manage local databases, scan databases against ROMs, check for completeness, (possibly) compare to HyperList to pull missing information, Manage artwork/themes.

See the attached images for the currently extremely alpha release.

Suggestions? Thoughts? Any graphics artists that can help out or improve what I already have or suggest a better alternative? :)

Dazz
11-27-2010, 10:08 AM
Interesting.

i12b_band
11-27-2010, 11:00 AM
Lashek,

I have been working on a PHP driven page that scans specified directories (per system) and verifies if the files exist or not. It validates against the complete XML databases used by HyperList and looks for box art, cart art, wheel art, videos and ROM files. I already built an admin section as well so the directories can be updated from the users browser. Let me know if you're interested and I can send you the pages so far to see if you can use or modify them for your HyperManager. Below is a screenshot of the page validating my N64 directory. Because the actual scan time can vary based on users hard drive or network speed, I have paginated the page to display 50 titles at a time, it usually takes less than 10 seconds to check all the directories for the 50 items on the page and display the results.

7071

Lashek
11-27-2010, 12:32 PM
Nice. I'm planning on caching a lot of the data into a MySQL database and just pulling the info from there, with the option to refresh the cache. With HyperList, it took all of 10 seconds to fetch all that data for the Completeness and set it to true or false, then only a fraction of a second to pull the cache.

Feel free to post what you want, I might be able to put some of it in to the Manager. Unsure how popular the program is going to be as it's mainly for my own personal use, just opened to everyone. :)

bLAZER
11-27-2010, 12:52 PM
Is this to be used while Hyperspin is running? Otherwise I don't really see the point (yet) of not using remote desktop.

Lashek
11-27-2010, 01:01 PM
Correct, it's for when HyperSpin is running or for when you are not home (if you have port forwarding setup properly) so you can remotely kill the pc or hyperspin as well as configure it (IE: Kids are home and you are at work, you can see that the pc is online and kick it off or close HyperSpin without having to Remote Desktop.... keeps you in compliance with Corporate VPN's as well if you are behind a corporate connection so that you can remote the pc without using the Windows RDC).

jeepguy81
11-27-2010, 07:52 PM
This is a very cool tool i'd be very interested in, being able to remotely administer a machine is always good in my book. While PHP is definitely not my strong suite, i'd help in any way I could. Great idea Lashek!!

djvj
11-27-2010, 07:52 PM
This is exactly what I want and can't wait to see all the features you can throw into it.

What I want is the ability to edit my own databases from a management page. Either being stored in the database, then output to xml, or just editing the xml directly. The ability to output to a backup (or custom named) xml.

I love remote php management, great idea!

brolly
11-27-2010, 09:09 PM
This might end up being a fantastic tool, pretty useful.

But couldn't we have the database editing/validation integrated in HyperHQ as well?
Something like what i12b_band did, but working inside HyperHQ and with the ability to edit the records.

Lashek
11-27-2010, 09:30 PM
Sadly, I'm not skilled enough to take on the HyperHQ development. I can only program some portions of it, and I haven't all of the commercial libraries and tools that Bill uses to develop it.

He's swamped with HS 2.0 currently, and I'm working on this project to resolve a need that I have and improve my PHP skills (which are ok, but there's always room for improvement), as well as to provide to public upon completion.

I've made the default information screen a little more "pretty" on how it displays data instead of just straight text.

http://xeraweb.com/preview.png

bajaresident
11-27-2010, 10:39 PM
As a result, all I could think about was "How can I prevent this and still administrate the cabinet while the cab is in use? Remote desktop is out by default..."


Is there a reason RDP is out of the question? I have a regedit that allows me to RDP into my HTPC running Windows 7 while it is in use. I could upload it to FTP, but a google search will show you many different ways to enable multi-session RDP with Windows 7.

Lashek
11-28-2010, 06:17 AM
Because then you are fighting for control (Can't have the same user logged in twice without having a shared desktop as far as I'm aware), not too mention, you can't use RDP when behind corporate firewalls/vpn's due to security.

The goal of this project is to be able to administrate the HyperSpin setup while it's in use either with people browsing HyperSpin or while using MAME, etc. It also allows administration while at work or on the go (RDP is horrible when a game/HS is running while away from home) to quickly and easily shutdown the computer (or detect if your kid is playing when they shouldn't be). It's not for everyone, but it fills the gap that I have a need for. :)

bajaresident
11-28-2010, 09:32 AM
Because then you are fighting for control (Can't have the same user logged in twice without having a shared desktop as far as I'm aware), not too mention, you can't use RDP when behind corporate firewalls/vpn's due to security.

The goal of this project is to be able to administrate the HyperSpin setup while it's in use either with people browsing HyperSpin or while using MAME, etc. It also allows administration while at work or on the go (RDP is horrible when a game/HS is running while away from home) to quickly and easily shutdown the computer (or detect if your kid is playing when they shouldn't be). It's not for everyone, but it fills the gap that I have a need for. :)

I have always just RDP'd in as Administrator when someone was using it to watch movies or something and moved files around or made changes (the standard HTPC user is locked out of making any changes to the PC at all). I haven't ever tried logging in as the same user, so not sure if that works either. Not sure why you would need to be on the same user either actually.

Anyway, congrats on making a tool that fills a need you had. Wish I could do that :)

bb_neo
11-30-2010, 05:13 AM
Lashek,

I have been working on a PHP driven page that scans specified directories (per system) and verifies if the files exist or not. It validates against the complete XML databases used by HyperList and looks for box art, cart art, wheel art, videos and ROM files. I already built an admin section as well so the directories can be updated from the users browser. Let me know if you're interested and I can send you the pages so far to see if you can use or modify them for your HyperManager. Below is a screenshot of the page validating my N64 directory. Because the actual scan time can vary based on users hard drive or network speed, I have paginated the page to display 50 titles at a time, it usually takes less than 10 seconds to check all the directories for the 50 items on the page and display the results.

7071
Whau! That program would be a excellent addition. Maybe also adding the possibility to download the missing art from the FTP. (just an idea) That would help people to configure HS very easily and keep databases always updated.

i12b_band
11-30-2010, 07:22 AM
bb,
Jhabers contacted me about expanding the usability and features. Hopefully more to come shortly as I have just forwarded the site along to him for review.

I added some other functionality that allows images that you have to be previewed from the page to verify accuracy, quality, etc.

I've been scaling the internet trying to find an embedded FLV player so videos can be previewed as well but so far have come up empty handed as none of the players allow absolute file paths to local files. If anyone has any ideas or workarounds lets hear them.

BadBoyBill
11-30-2010, 07:53 AM
You might need a cross domain policy file to allow the flv preview form another domain.

Lashek
11-30-2010, 12:39 PM
When it comes to HyperManager, absolute paths are doable with flv by using php and AJAX.

When I build the cache, I automatically know where all videos are stored on the machine since I read them from HS Configs, and PHP can work properly with C:\ D:\, etc. So with PHP + AJAX, I have it copy to a temp folder, can play the FLV from this (since it's nolonger absolute, but rather in the website folder), then delete it before copying/loading another. The only downside is there's temp files that take up 2-5mb a piece depending on the flv file but this is usually no more then a second of wait time. :)

There are plenty of ways around limitations whether software or script based. To those in this thread, keep in mind that HyperManager and i12b_band's system are not the same and are completely separate entities.

i12b_band
12-02-2010, 04:45 AM
Great suggestion Lashek, just what I needed. Added code to copy from local directory to temp directory and now I'm in business.

Thanks!

Lashek
12-02-2010, 12:24 PM
Glad I could provide a working theory for you. :)

Lashek
12-03-2010, 04:25 PM
Check out the new Status page when checking for HyperSpin! :)

Now checks for emulators running and also checks validity of the path, rompath, and exe fields.

jhabers
12-03-2010, 05:19 PM
Check out the new Status page when checking for HyperSpin! :)

Now checks for emulators running and also checks validity of the path, rompath, and exe fields.

Looking REAL nice!

ortwin20000
12-05-2010, 01:59 AM
Is there any chance to test this on my own machine?

Lashek
12-05-2010, 06:40 AM
Once all of the modules are "working", I intend on starting the Alpha release. :)

Will be showing another huge update today as I tidy up some things.

ortwin20000
12-05-2010, 09:10 AM
If you need help or someone to test this tool ... :itsme:

Btw - what will be the software requirements? Webserver, PHP, MySQL?

Lashek
12-05-2010, 09:18 AM
There are only two requirements.

The first being a PHP/MySQL server (EasyPHP - Apache/MySQL/PHP), LAMP (For windows), etc.

The second is a copy of PSTools from Microsoft, which are a set of command-line programs that enable remotely launching programs and task management (among other commands). I have to review Microsoft's licensing on this to see if I can distribute them bundled with the code, otherwise I will just provide a separate link in the documentation of instructions to install.

I personally use EasyPHP for testing, but it's not slated as a "production" program. However, for the purpose of a simple remote manager as this, I don't see it being a huge issue. :)

ortwin20000
12-05-2010, 09:45 AM
As I know it is not allowed to redistribute this tool-set.
Found this older article about License http://www.scribd.com/doc/2616933/pstools from 2005 and this article on technet http://technet.microsoft.com/en-us/sysinternals/bb469936.aspx


The software is licensed, not sold. This agreement only gives you some rights to use the software. Sysinternals reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not

work around any technical limitations in the software;
reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;
make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;
publish the software for others to copy;
rent, lease or lend the software;
transfer the software or this agreement to any third party; or
use the software for commercial software hosting services.

Lashek
12-05-2010, 09:57 AM
In that case, I won't be publishing PSTools with my stuff. I will simply post a link to obtain it directly from Microsoft's website and provide instructions on where to copy the specific files to (to keep things legal).

:)

Lashek
12-05-2010, 02:12 PM
As mentioned earlier, another huge update took place today.

I have finished the Database importer and Artwork examination tool.

Basically, it scans each system's Database folder (reads EVERY database xml) and inserts it into a database. To play it safe, it only inserts the entry if it's not already in there, so if you have several xml lists, and some of said lists contain games not in the other, they get inserted instead of ignored.

After inserting the game, I check for png files in the artwork folders, as well as looking at the videos and themes to see what's installed or not. Please note that although artwork folders may be scanned, you do not have to 100% them as these can be bundled inside the theme zip file, etc and I cannot check inside them as well as I would like to for a better count.

Currently, it now takes 3-5 minutes to rebuild the cache, but the completeness pages are REALLY quick in generating. Next step is to make these pages "pretty" as they look bland. See attached pictures! After it's time to add in the editing of the databases and artwork management!

[edit]
Made it pretty! Screenshots changed out! :)

i12b_band
12-07-2010, 08:30 AM
Very nice, this is coming along well.

Lashek
12-07-2010, 06:09 PM
My my my! The time flies fast!

Latest addition (still in alpha stages)... AHK Module loading/editing.

Currently, it uses JavaScript AJAX calls to pull a listing of all modules for the desired system, then loads the contents of the desired module for editing.

The action menu currently consists of "Create new module", "Save", and "Delete" but none of them work (yet).

Fun stuff! :)

[edit on 12/8/2010 11:24PM EST]
Now allows AHK Module creation, Saving, and Deleting. All tested and working.

jackhammersalm
12-11-2010, 04:27 PM
lashek man you have been busy

Lashek
12-14-2010, 08:12 PM
Not really a major update, but I tweaked the "HS Status" screen to now look at AHK modules and display either errors, warnings, or if it checks out fine.

http://xeraweb.com/hmupdated_status.png

djvj
12-14-2010, 11:21 PM
Looks great Lashek, looking forward to a beta test. Maybe a xmas present?

ortwin20000
12-14-2010, 11:31 PM
Excellent work Lashek.
After every status update you give it's getting harder to wait :laugh:

Lashek
12-15-2010, 03:46 AM
Sadly, HyperManager will not be released until HS 2.0 (or slightly later) as it's being written for HS 2.0 configuration files, databases, etc. Backwards compatibility "may" be there if the older variables keep the same name into the new system, but it's not guaranteed.

This is also why I've not been doing any HUGE updates outside of what is currently available (outside of testing some stuff with HS 1.0). I have the new configs and have been programming them into HM, however. :)

Summary? No X-Mas release. :(

nezzah
01-30-2011, 11:11 AM
just a thought, you could use xampp as a .exe for the package.
http://www.apachefriends.org/en/xampp.html

for those that haven't used it, it's a portable wamp server. it launches a windows (portable) version of apache +PHP with MySQL. It runs with its own resources, and when you stop it, it doesnt' leave any residuals. As a bonus (maybe) it also runs it's own sendmail server and ftp. Really small footprint. It occurs to me that you could build your DBs and whatnot entirely into xampp and release that as a self-contained package rather than require individual setups of LAMPs.

Lashek
02-03-2011, 04:55 PM
The goal of the project is to not lock anyone down to a specific program, etc.

The code will be in PHP with an install script and .sql file which should allow for easy installation. However, I cannot share the Microsoft tools with it, so I wouldn't be able to make one bundle regardless.

Personally, I use EasyPHP, as I don't need anything more then Apache + PHP + MySQL. The guide will be based on that with complete instructions on how to install everything once complete. I will probably host the code on Google Code or something to allow it to be open source as well.

Lashek
02-23-2011, 05:44 PM
It's been a long while since I made an update post on this, but then again, it's also been a while since I've touched HyperManager.

The most recent change was a rewrite of the INI importer. With how HS 2.0 works, there is a new feature to the settings (See BBB's posts about 2.0 for more info), and I was checking for individual fields before importing, etc. This is completely the wrong way of doing it and was something that would have HAD to be posted to http://www.thedailywtf.com/ so I yanked it out and rebuilt it.

The new method is one table that consists of 5 fields. System, Section, Node, Value, UseDefault.

Take for example:

MAME.ini:
[exe info]
rompath = C:\joke\path\

This would populate the following values: [MAME System ID number], exe info, rompath, C:\joke\path\, 0

I then use a function called "get_ini_setting" to pull a specific field that I need each systems INI. It was the only way I could think to work it that would allow for future INI expansion of new variables, etc.

Any PHP/MySQL progammers out there have a better idea on how to work it?

The only downside is each INI setting fetch is a separate SQL query with an asynchronous connection. Not really a big deal since it's not a "production" server and is only intended for use by the owner of the cab.

Lashek
02-26-2011, 08:41 PM
When it comes to code, and my "Daily WTF" moments, here's a sample of one of the functions I have to mimic the GameFAQs "A B C D ... #" system when browsing through the database XML for editing.



function alpha($system)
{
global $db;

// Panic! Gtfo if it's not a number.
if (!is_numeric($system))
return;

echo "<center>Browse all Games</center><br>";

// Very Cheap way of doing this. Looping through an alphabet array, all grammar marks will be in #, similar to how GameFAQs does it.
$alphabet = array ("#","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
$num = count($alphabet) - 1;
echo "<center>[ ";
$counter = 0;

while (list(, $ltr) = each($alphabet))
{
$ltr = substr("$ltr", 0,1);

if ($ltr == "#") // Different query for # using RegEx to take into account grammar and digits at the start of the description.
$query = "SELECT COUNT(*) FROM system_game_xml_details WHERE system = ". $system ." AND (description REGEXP '^[[:<:]][[:digit:]]' OR description REGEXP '^[[:<:]][[:punct:]]')";
else
$query = "SELECT COUNT(*) FROM system_game_xml_details WHERE system = ". $system ." AND UPPER(description) LIKE '$ltr%'";

$result = $db->sql_query($query);

$numrows = mysql_fetch_row($result);

if ($numrows[0])
echo "<a href=\"?module=database_edit&action=edit&system=$system&ltr=$ltr\">$ltr</a> ";
else
echo "$ltr ";

$counter++;
}

echo " ]</center><br>\n";
}


Screenshots coming soon.

Lashek
03-17-2011, 07:55 PM
It's not dead (to those who are wondering).

It's alive and well, and here's some current shots of the XML editor in action!

kronic24601
03-18-2011, 08:55 AM
looking good!

jeepguy81
03-18-2011, 04:22 PM
regardless of how long it takes to be released, I'm really looking forward to incorporating this into a system. Great job Lashek

Acidreaction
03-29-2011, 06:31 PM
I just wanted to say I'm really impressed. Your screenshots make me itch to try something similar.

Lashek
04-17-2011, 06:39 PM
Pre-Alpha Dropbox invites have gone out. Development continues!

XML Editor is complete, working on an export system for the "Missing" features (IE: Missing Themes, Missing ROM's, etc).

This will only take a few hours tops as it's just a text list.

After this, I get to get started on the System INI Editor.

If you have PHP and MySQL experience as well as a strong technical background, PM me if you want in. Please note: I provide NO SUPPORT as it's Pre-Alpha and not even public yet.

BladeZX
05-30-2011, 02:04 PM
This looks great!

How can I get in this to try it out?
I have been looking for an app that will tell me what I am missing and that properly uses the HQ settings ini to look for the rom paths because all of my roms on my unraid tower.

Thx

Lashek
05-30-2011, 03:23 PM
To get in, just PM me your email address and I will send you an invite to the Dropbox folder containing the data.

Currently, it is on hiatus as my main pc just had it's Power Supply die, and I had to steal my cab's power supply until I can get a new one. FML. :(

This doesn't stop you from getting what I currently have, but it does halt further progress since I can't test it.

joorge
05-31-2011, 06:03 PM
im very interested w/ this subscribing

tSRDazz
07-12-2011, 02:30 AM
This is a fantastic concept. Will you be able to perhaps develop this in a stand-alone executable?

I would like to give this a try - but I'm pretty stupid. Would I need to install the data on the cabinet computer, as well as my own?

Lashek
07-12-2011, 03:16 AM
The system is comprised of 3 packages.

1) EasyPHP / LAMP / etc (A webserver with MySQL)
2) The HyperManager setup itself
3) Microsoft's tools

Due to licensing with Microsoft's tools, I cannot release a stand-alone executable, but if you set it all up with EasyPHP, you can copy the working setup to any pc and simply run EasyPHP.exe

Installation only needs to be done on the cabinet, then you need to edit the config.php file as well as import the sql file. No installation scripts are written yet, so it's a bit of a rough start.

After installing, you just open up your browser and type in your cabinet's IP address ( http://192.168.1.101/ for example).

mrgrim333
08-09-2011, 09:15 PM
*gasm*
Is there any way I can get my hands on this!?
This is sex in a mame cabinet!

Lashek
08-10-2011, 12:28 PM
The tool is available in a very very alpha stage, and development is at a halt since my cab is out of commission for the time being.

Just private message me an email address and I'll send a Dropbox invite. Support is little to none, but the instructions should be clear enough to work, and I can help a little in answering setup questions.

quasidigital
10-04-2011, 09:15 AM
This is great!
Bravo!