Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Info Window for Hi Score (HiToText)  (Read 34083 times)

0 Members and 1 Guest are viewing this topic.

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Info Window for Hi Score (HiToText)
« on: September 07, 2010, 06:40:09 pm »
I'm playing with MaLa and the Info window. I have mine setup to load the Info window with the Alt key and toggle between the various windows with the space bar - typical I think.

What I notice is that every time I do that, the list of "Current Pages" grows - as shown in Options | GUI | Info Window - I now have three sets of "Recommended Games, Controls, History, Snap, Marquee, Control Panel, etc.  If I quit MaLa, the list goes back to a singleton for each page. This may not be a problem, just wanted to make you aware.

I was hoping to use this to display the current hi score info by using the hitotext app (as noted in the thread about hi score plugins) but I see no way to create a new page that I can get the info into. If this were PHP, I'd just cram the output from hiToText into an image and use that.

Any chance we can get an addition to the Type of page that we can add to the info window? A simple text file would work, an HTML file would work better, but either of those would allow display of the current hi score info (if it's been converted by the hiToText app)

I envision a file with the same name as the ROM but with a TXT or HTM extension - I guess we'd also need a place to input a folder location for these files.



« Last Edit: September 10, 2010, 02:35:35 am by loadman »

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window issues
« Reply #1 on: September 07, 2010, 06:55:18 pm »
does anyone know where the info for Recommend Games comes from? maybe I can hack in that way, lol

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window issues
« Reply #2 on: September 07, 2010, 08:19:18 pm »
Quote
What I notice is that every time I do that, the list of "Current Pages" grows - as shown in Options | GUI | Info Window - I now have three sets of "Recommended Games, Controls, History, Snap, Marquee, Control Panel, etc.  If I quit MaLa, the list goes back to a singleton for each page. This may not be a problem, just wanted to make you aware.

Interesting

Quote
I was hoping to use this to display the current hi score info by using the hitotext app (as noted in the thread about hi score plugins) but I see no way to create a new page that I can get the info into. If this were PHP, I'd just cram the output from hiToText into an image and use that.
Any chance we can get an addition to the Type of page that we can add to the info window? A simple text file would work, an HTML file would work better, but either of those would allow display of the current hi score info (if it's been converted by the hiToText app)
I envision a file with the same name as the ROM but with a TXT or HTM extension - I guess we'd also need a place to input a folder location for these files.

hmmm

I could make a window that read a text file sure.

Off the top of my head a simple plugin that ran to refersh the test file (calling hiToText). But would it not be cleaner to have HiToTest create just on file with all teh games in sections?
eg:
[1942]
loadman 3928739204397 Points

[Pacman]
loadman 3232323232323 Points
« Last Edit: September 07, 2010, 08:26:24 pm by loadman »

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window issues
« Reply #3 on: September 07, 2010, 09:29:48 pm »
my thoughts are - and they may be erroneous - that a hi score only changes AFTER you play a game, so that is the time to run a new hiToText for that game just played.

I have this working for the most part. I modified Mala to call MAME via a mame.bat file - that batch file is similar to this

echo off
mame %1
hiToText %1 > %1.txt


this gets the hi score data in to a text file. THere are some other stuff in the batch file to change directories, etc

Right now, I am cramming the %1.txt files in a folder like C:\emulators\mala\scores

I am now working on converting that txt file to an image using imageMagick (free). Then I can just use the "Defineable 1" to hook the image into MaLa

It would be simpler if MaLa allowed us to create a defineable of type TXT and/or HTML, but this should at least work for proof of concept.

« Last Edit: September 07, 2010, 09:54:42 pm by kernelpanic »

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window issues
« Reply #4 on: September 07, 2010, 10:00:43 pm »
I say it would be simpler if MaLa would just read the TXT file, but you get what you pay for so to speak.

The info that is output from hiToText is in the most basic form which is understandable. But using ImageMagick, or HTML, so much more could be done to format the data, and each person could control what they wanted.

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window issues
« Reply #5 on: September 07, 2010, 11:01:02 pm »
I like where you are going with this  ;)

You are doing all the homework and 'Proof of Concept' and that is great as time I am time poor.

So you do get what you pay for if you invest time in this you get paid with MaLa upgrades to support better what you want  ;D'

So if you can work out what MaLa needs to do then we are half way there.

My Thoughts:

I would like to keep my development a bit Generic so it could be applied for other things.

So a definable TXT sounds OK but a extra text window would be easier/quicker for me.

I would probably think a plugin called after game quit would be nicer (even if the plug just calles a .bat file), Easy I can do that.

I really would prefer one test file to read, but a subfolder with many files works too I guess.



« Last Edit: September 07, 2010, 11:06:47 pm by loadman »

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score
« Reply #6 on: September 07, 2010, 11:34:58 pm »
well, perhaps we should stop and try to define what it is we are trying to do here.

Here's where I am (currently) going -

Since each game has a hi score file - it makes sense to me to tie that to the %rom% filename. And displaying it as an available page of the MaLa info (alt key) setup seems like the ideal place to show that info. As I said in the other thread, the current hi score would not affect my choice of games so displaying that in a layout makes no sense for my needs - YMMV.

But, if we create a new page for the MaLa info construct to display hi scores, then if the %rom%.txt file exists in the Mala/scores folder, it will display - if the file does not exist, it won't.

When you play a game, a new %rom%.hi file is created/updated - my mame.bat file would create a new %rom%.txt file using the new .hi file.

Since there is no way to get a text file into the MaLa info construct, I am attempting to use ImageMagick to create a simple PNG file of the %rom%.txt contents and store it as %rom%.png in the same folder. My current issue is that my experience with ImageMagick is via PHP in a web server environment, and using it via a batch file in XP is proving to be a PITA - I keep getting some arcane error saying it's unable to get type metrics  :blah: :blah: :blah:

As far I can see, there will be no real need to change MaLa - at least using my current idea.

Now, for those that want the hi score info to be pluggable into a layout, that's a diff ballgame and would likely require changes to MaLa and/or a plugin.

Anyway - I'm off for the night - will work on this again in the AM when I am fresher - and less toasty, lol :o


« Last Edit: September 07, 2010, 11:37:59 pm by kernelpanic »

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window for Hi Score
« Reply #7 on: September 07, 2010, 11:52:01 pm »
OK.

Let me know if you want help.

I am keen on offering a simple solution for MaLa using HiToText somehow.

Quote
Since there is no way to get a text file into the MaLa info construct,

Possibly I just need to add a new 'Type' Of Hi Scores that reads text files  ???

(See Attached Pic)  
« Last Edit: September 08, 2010, 12:04:16 am by loadman »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Info Window for Hi Score
« Reply #8 on: September 08, 2010, 01:59:22 am »
FYI CPWizard can display HiToText output. Just have it running in the icon tray and when you run a game it will detect it running. Press 'L' and MAME is minimized and a menu is shown then select "My High Scores". CPW also supports output of other MAME related info and it's nicer to be able to bring it up while ingame rather than in the FE.

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window for Hi Score
« Reply #9 on: September 08, 2010, 03:20:26 am »
FYI CPWizard can display HiToText output. Just have it running in the icon tray and when you run a game it will detect it running. Press 'L' and MAME is minimized and a menu is shown then select "My High Scores". CPW also supports output of other MAME related info and it's nicer to be able to bring it up while ingame rather than in the FE.

No question that Headkaze has a fine selection of free tools and gizmos. Highly recommended.    :applaud:

But FYI I am still planning on adding a way to display within the FE (However basic that may end up)

Thanks

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score
« Reply #10 on: September 08, 2010, 08:16:33 am »

Quote
Since there is no way to get a text file into the MaLa info construct,

Possibly I just need to add a new 'Type' Of Hi Scores that reads text files  ???

(See Attached Pic)  


That is what I was thinking too - but when that ability wasn't there, I started down this path of converting the text to an image - which I can hook into MaLa

Having a new type in MaLa simplifies things in that is would not require ImageMagick be installed - many of these MAME cabinets are lean machines - ImageMagick is not, lol.

I also wondered if it could be done as a new type of Definable - same idea, a type of Text or Hi Score - but this would also allow that info to be plugged into a layout. I know the current Definables are "images" so that may not be as easy to change.





kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score
« Reply #11 on: September 08, 2010, 09:07:10 am »
FYI CPWizard can display HiToText output.

Interesting, thanks for the info. I have not gotten far enough in my build to even look at that kind of software.

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window for Hi Score
« Reply #12 on: September 08, 2010, 09:08:26 pm »
Having a new type in MaLa simplifies things in that is would not require ImageMagick be installed - many of these MAME cabinets are lean machines - ImageMagick is not, lol.

Yep I will look at that

Quote
I also wondered if it could be done as a new type of Definable - same idea, a type of Text or Hi Score - but this would also allow that info to be plugged into a layout. I know the current Definables are "images" so that may not be as easy to change.

A bit more work and the need to expand the layout format (which won't be backward compatible)




[/quote]

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score
« Reply #13 on: September 09, 2010, 08:51:51 am »
Having a new type in MaLa simplifies things in that is would not require ImageMagick be installed - many of these MAME cabinets are lean machines - ImageMagick is not, lol.

Yep I will look at that

Quote
I also wondered if it could be done as a new type of Definable - same idea, a type of Text or Hi Score - but this would also allow that info to be plugged into a layout. I know the current Definables are "images" so that may not be as easy to change.

A bit more work and the need to expand the layout format (which won't be backward compatible)


Let's do this the simplest way possible - if it's easier to add "Text" or "Score" type to the MaLa info window, then that's the way to go.

I can do it without any changes to MaLa using the ImageMagick trick. My troubles with that are related to a bad DLL in XP, not to IM. The other problem is that not only is ImageMagick required - ImageMagick requires GhostScript be installed - my rough estimates are that those two installs account for about 50-55 MB of disk space.

Correction: it's more like 85 MB of additional disk space required for ImageMagick and GhostScript
« Last Edit: September 09, 2010, 11:49:50 am by kernelpanic »

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score
« Reply #14 on: September 09, 2010, 10:07:17 pm »
I've given up on the ImageMagick idea - 85MB of disk space just convert a simple text file to an image is overkill.

I'll see about writing a routine to convert a text file to an image that can be imported into MaLa.

Fyrecrypts

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 237
  • Last login:August 19, 2015, 10:50:47 am
  • .hi guy
Re: Info Window for Hi Score
« Reply #15 on: September 09, 2010, 10:41:41 pm »
loadman,

I saw your post on the HiToText thread in the software forum and wanted to let you know I appreciate the work you're putting in to get HiToText incorporated into MaLa. I don't really have anything super productive to add, I like the idea of making it a text-style window. Maybe even have it be variables for any text field, however I'm not sure what variables you allow since the scores can be so wildly different. Some are almost always there: rank, score, and name. And with the XML format you can change those fields to be whatever you want I suppose.

I'm not sure, perhaps I'm just rambling, I'll let the experts sort out the details with programming in MaLa, however I am lurking and excited to see what comes out of these threads. =)
Help us crack more .hi files here:
http://forum.arcadecontrols.com/index.php?topic=83614.0
Generate the newest hiscore.dat here:
http://www.hitotext.com/HiScoreDat/index.php
Sourceforge project page:
https://sourceforge.net/projects/hitotext

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window for Hi Score
« Reply #16 on: September 10, 2010, 12:14:19 am »
Stage1 ) Well at the very least I will put a extra window to allow display of text files in a directory.
I can then alter the required file format and display depending on the feedback I get after this is done.

Stage 2) How will those files be generated and refreshed?

Using HiToText I hope. I am counting on others to find a solution or just give me the basic recipe that I can fire off when you quit a game (either in MaLa code or a new plugin)

Stage 3) I parse the text files and allow these details to be displayed in the layout. Don't feel too enthusiastic about the this. Lot's of effort required for minimum gain I feel at this point.

« Last Edit: September 10, 2010, 12:16:54 am by loadman »

Fyrecrypts

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 237
  • Last login:August 19, 2015, 10:50:47 am
  • .hi guy
Re: Info Window for Hi Score
« Reply #17 on: September 10, 2010, 01:10:59 am »
Stage 2) How will those files be generated and refreshed?

Using HiToText I hope. I am counting on others to find a solution or just give me the basic recipe that I can fire off when you quit a game (either in MaLa code or a new plugin)

The .hi (or nvram, or save state) file will change only on a successful exit of MAME, so the best time to generate these files would be immediately on returning to MaLa from the emulator. Should only take a max of 100 ms for HiToText to decipher the score, and then some other amount of time dependent on hardware to actually write the file to disk. So showing these updated scores may not be available immediately upon returning to your layout.
Help us crack more .hi files here:
http://forum.arcadecontrols.com/index.php?topic=83614.0
Generate the newest hiscore.dat here:
http://www.hitotext.com/HiScoreDat/index.php
Sourceforge project page:
https://sourceforge.net/projects/hitotext

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window for Hi Score (HiToText)
« Reply #18 on: September 10, 2010, 06:37:11 am »
Quote
What I notice is that every time I do that, the list of "Current Pages" grows - as shown in Options | GUI | Info Window - I now have three sets of "Recommended Games, Controls, History, Snap, Marquee, Control Panel, etc.  If I quit MaLa, the list goes back to a singleton for each page. This may not be a problem, just wanted to make you aware.

Yeah that is weird

 ???

Can someone post a few .hi files here so I can see the file structure please

Anyway here is a rough BETA version with a Dummy Hi Score page and options to navigate left and right through info windows. Please give feedback

STALE LINK REMOVED

DownLoad Here
« Last Edit: September 10, 2010, 11:53:01 pm by loadman »

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score (HiToText)
« Reply #19 on: September 10, 2010, 08:10:58 am »
that didn't work for me - left/right keys do nothing and the space bar seems to auto repeat but not access all the screens.

This does allow me to specify a type of "Hi Score" - where do those text files need to be? in a particular folder?


here are 2 files that I created using hiToText

dorunrun is the largest one I've found so far - the pacman one is shown as some games are not supported in the XML file and generated this type of txt file





Fyrecrypts

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 237
  • Last login:August 19, 2015, 10:50:47 am
  • .hi guy
Re: Info Window for Hi Score (HiToText)
« Reply #20 on: September 10, 2010, 09:02:49 am »
here are 2 files that I created using hiToText

dorunrun is the largest one I've found so far - the pacman one is shown as some games are not supported in the XML file and generated this type of txt file

Very odd, pacman is supported, I'll have to look at why it isn't being called correctly. Definitely a bug.

Also, you may want to look at a game like track and field, which has "alternate" scores such as top 4 in 100m dash in addition to a traditional hi score table. As for largest, I would think Crystal Castles is the largest at the moment. Saves 300 individual scores.
Help us crack more .hi files here:
http://forum.arcadecontrols.com/index.php?topic=83614.0
Generate the newest hiscore.dat here:
http://www.hitotext.com/HiScoreDat/index.php
Sourceforge project page:
https://sourceforge.net/projects/hitotext

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score (HiToText)
« Reply #21 on: September 10, 2010, 09:23:43 am »
Very odd, pacman is supported, I'll have to look at why it isn't being called correctly. Definitely a bug.

Also, you may want to look at a game like track and field, which has "alternate" scores such as top 4 in 100m dash in addition to a traditional hi score table. As for largest, I would think Crystal Castles is the largest at the moment. Saves 300 individual scores.

Maybe I'm not doing things right. I downloaded the hiToText.exe and XML files - crammed them into the hi folder under MAME, and my MAME batch file runs it on the game just completed and saves the output to a file named .txt for that rom. All I ever get with pacman is that "not supported" error.

300 is very overkill - dorunrun's saving of 50 is way overkill too - IMHO - 5, maybe 10 seems adequate to me. But I'm a ole pinhead and only used to a top 5, so that may be the problem  :dunno

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window for Hi Score (HiToText)
« Reply #22 on: September 10, 2010, 10:15:44 am »
that didn't work for me - left/right keys do nothing and the space bar seems to auto repeat but not access all the screens.

Did you reallocate the keys?

By default left and right will be the same

Quote
This does allow me to specify a type of "Hi Score" - where do those text files need to be? in a particular folder?
Nothing ...yet

It's just a dummy display. I was after feedback and demo .hi files before I proceeded

« Last Edit: September 10, 2010, 10:18:06 am by loadman »

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score (HiToText)
« Reply #23 on: September 10, 2010, 10:21:46 am »

Did you reallocate the keys?

By default left and right will be the same


:facepalm

yeah sorry, that fixes that - I feel so DOH

I included some .txt files that are made by capturing the hiToText output when it processes the .hi file

Here's a zip file with some random .hi files in it

« Last Edit: September 10, 2010, 10:29:15 am by kernelpanic »

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score (HiToText)
« Reply #24 on: September 10, 2010, 10:38:36 am »

Quote
This does allow me to specify a type of "Hi Score" - where do those text files need to be? in a particular folder?
Nothing ...yet

It's just a dummy display. I was after feedback and demo .hi files before I proceeded


After playing with this idea more, my suggestion would be just looking for a .txt file of the %rom% name in the mame folder for hi scores - if the hi folder does not exist, or the %rom%.txt file does not exist, then just ignore that page. BUt I don't know your code and how it's designed, so may be way off base with that idea.

« Last Edit: September 10, 2010, 06:14:30 pm by kernelpanic »

Fyrecrypts

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 237
  • Last login:August 19, 2015, 10:50:47 am
  • .hi guy
Re: Info Window for Hi Score (HiToText)
« Reply #25 on: September 10, 2010, 11:47:20 am »
Maybe I'm not doing things right. I downloaded the hiToText.exe and XML files - crammed them into the hi folder under MAME, and my MAME batch file runs it on the game just completed and saves the output to a file named .txt for that rom. All I ever get with pacman is that "not supported" error.

300 is very overkill - dorunrun's saving of 50 is way overkill too - IMHO - 5, maybe 10 seems adequate to me. But I'm a ole pinhead and only used to a top 5, so that may be the problem  :dunno

No, you were doing things right, there was a bug. I've fixed it and will release it shortly, probably within the next couple hours.

As for overkill, I agree, 300 scores is a lot, however that is how many scores Crystal Castles saves. I only save what the game saves, and display what the game displays. Thankfully, HiToText output is fairly basic, and you are free to use the information however you see fit. =)
Help us crack more .hi files here:
http://forum.arcadecontrols.com/index.php?topic=83614.0
Generate the newest hiscore.dat here:
http://www.hitotext.com/HiScoreDat/index.php
Sourceforge project page:
https://sourceforge.net/projects/hitotext

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score (HiToText)
« Reply #26 on: September 10, 2010, 11:50:42 am »
here is a preliminary version of my guide to get hi scores displayed via the MaLa info window. This may change depending on how Loadman implements the remaining parts and is currently based on the .txt files being read from the mame/hi folder. Fyrecrypts may want to add to/change the way that hiToText is being called.

Please NOTE that this technique does not currently work and may not ever - depending on Loadman's decision as to how/if he's going to implement this idea!

----------------------------------------------
Step #1:
    Obtain a command line version of MAME that has the "no nag" (optional) and "hi score" (required) hacks compiled into it.

    You have to compile that yourself - there are detailed instructions on the MAME site, so I won't go into those details here

Step #2:
    You need two files from the hiToText project. These can be obtained from this thread

        http://forum.arcadecontrols.com/index.php?topic=83614.0

    download the hiToText.exe and hiToText.xml files

    put both these files in the "hi" folder underneath MAME

Step #3:

    create a hi folder subordinate to your MaLa folder

Step #4:

    create a hi.BAT file that looks like this

    
Code: [Select]
   echo off
    cd c:\emulators\programs\mame\hi
    hitotext -ra %1 > \emulators\mala\hi\%1.txt
    cd\emulators\mala
    

    NOTE: the paths used above are for my config - adjust accordingly to fit yours


Step #5:

    save the BAT file you created in the hi folder you created in Step 3


Step #6:
    Access MaLa options, GUI tab, Info Window tab
    and create a new Info page of type Hi Score

    See mala-options-2.png attached


Step #7: (especially if upgraded from a previous version (<1.713) of MaLa
    Access MaLa options, Controller tab, Advanced tab
    and specify your desired Info Left and Info Right keys

    See mala-options-3.png attached




« Last Edit: October 16, 2010, 03:16:38 am by loadman »

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score (HiToText)
« Reply #27 on: September 10, 2010, 11:53:46 am »
No, you were doing things right, there was a bug. I've fixed it and will release it shortly, probably within the next couple hours.

Cool - thanks for the prompt attention  :applaud:

Quote
As for overkill, I agree, 300 scores is a lot, however that is how many scores Crystal Castles saves. I only save what the game saves, and display what the game displays. Thankfully, HiToText output is fairly basic, and you are free to use the information however you see fit. =)

Yeah, my next thought/project may be a program to massage the .txt file after it comes out of hiToText and maybe trim things down some - as well as do some formatting of those .txt files.

« Last Edit: September 10, 2010, 11:55:37 am by kernelpanic »

Fyrecrypts

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 237
  • Last login:August 19, 2015, 10:50:47 am
  • .hi guy
Re: Info Window for Hi Score (HiToText)
« Reply #28 on: September 10, 2010, 12:06:27 pm »
Fyrecrypts may want to add to/change the way that hiToText is being called.


Step #3:

    create a MAME.BAT file that looks like this

    
Code: [Select]
   echo off
    c:\emulators\programs\mame\mame %1
    cd c:\emulators\programs\mame\hi
    hitotext -r %1 > %1.txt
    cd\emulators\mala
    

    NOTE: the paths used above are for my config - adjust accordingly to fit yours


Only thing I would consider is utilizing the -ra command instead of -r. -ra will get alternate scores in addition to the standard scores. Games like moon patrol that have best times per stage section, or the earlier mentioned track and field event entries. Finding a way to incorporate those as well would be interesting.
Help us crack more .hi files here:
http://forum.arcadecontrols.com/index.php?topic=83614.0
Generate the newest hiscore.dat here:
http://www.hitotext.com/HiScoreDat/index.php
Sourceforge project page:
https://sourceforge.net/projects/hitotext

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score (HiToText)
« Reply #29 on: September 10, 2010, 12:12:26 pm »
Only thing I would consider is utilizing the -ra command instead of -r. -ra will get alternate scores in addition to the standard scores. Games like moon patrol that have best times per stage section, or the earlier mentioned track and field event entries. Finding a way to incorporate those as well would be interesting.

Ok, I changed the above post to reflect that - thanks!

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window for Hi Score (HiToText)
« Reply #30 on: September 10, 2010, 08:22:46 pm »
Did you reallocate the keys?
By default left and right will be the same
:facepalm
yeah sorry, that fixes that - I feel so DOH
I included some .txt files that are made by capturing the hiToText output when it processes the .hi file
Here's a zip file with some random .hi files in it


He He.. I have changed the defaults for next version. Now 'Left' is 'blank' and 'right' is 'space'.  ;D

Quote
What I notice is that every time I do that, the list of "Current Pages" grows - as shown in Options | GUI | Info Window - I now have three sets of "Recommended Games, Controls, History, Snap, Marquee, Control Panel, etc.  If I quit MaLa, the list goes back to a singleton for each page. This may not be a problem, just wanted to make you aware.
A minor bug there. It does not seem to effect functionality though.

Quote
here is a preliminary version of my guide to get hi scores displayed via the MaLa info window. This may change depending on how Loadman implements the remaining parts and is currently based on the .txt files being read from the mame/hi folder.
Step #4:
    make one change in MaLa to use this MAME.BAT file instead of the MAME.EXE file
    See mala-options-1.png attached
    NOTE: again, these are my folder paths, yours may be different, please adjust accordingly

My Knee Jerk reaction is I am not supportive  (Step#4) of putting batch files in the mame exe section.
I think I can either
1) Write a basic plug-in that calls the batch file on MaLa exit
2) Write a sexy plugin that does all this with Config gui for users to set path
3) Add section in options-gui-game start/quit to optionally call a batch file on game exit. I guess it would just call at reduced bat like:
Code: [Select]
cd c:\emulators\programs\mame\hi
    hitotext -r %1 > %1.txt
4) Build most of this into MaLa so you just need to aquire hittotext then set a path to it and the text files it produces

What do you all think/prefer ?

While I wait on your feedback I might fiddle with mala beta to read text files from a subfolder in mala called hi so we can settle display format issues.
« Last Edit: September 10, 2010, 09:05:01 pm by loadman »

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score (HiToText)
« Reply #31 on: September 10, 2010, 08:44:05 pm »
Quote
Quote
What I notice is that every time I do that, the list of "Current Pages" grows - as shown in Options | GUI | Info Window - I now have three sets of "Recommended Games, Controls, History, Snap, Marquee, Control Panel, etc.  If I quit MaLa, the list goes back to a singleton for each page. This may not be a problem, just wanted to make you aware.
A minor bug there. It does not seem to effect functionality though.

Agreed - it had no effect, was just odd
« Last Edit: September 10, 2010, 08:49:52 pm by loadman »

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window for Hi Score (HiToText)
« Reply #32 on: September 10, 2010, 08:46:30 pm »
Quote
here are 2 files that I created using hiToText

dorunrun is the largest one I've found so far - the pacman one is shown as some games are not supported in the XML file and generated this type of txt file

Can you send me some more so I can see variation please.
« Last Edit: September 10, 2010, 08:49:13 pm by loadman »

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score (HiToText)
« Reply #33 on: September 10, 2010, 09:07:31 pm »
Quote
here are 2 files that I created using hiToText

dorunrun is the largest one I've found so far - the pacman one is shown as some games are not supported in the XML file and generated this type of txt file

Can you send me some more so I can see variation please.


do you want the .txt files after processing through hiToText?

or do you want the .hi files before processing through hiToText?


loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window for Hi Score (HiToText)
« Reply #34 on: September 10, 2010, 09:29:28 pm »
Quote
here are 2 files that I created using hiToText

dorunrun is the largest one I've found so far - the pacman one is shown as some games are not supported in the XML file and generated this type of txt file

Can you send me some more so I can see variation please.

do you want the .txt files after processing through hiToText?

or do you want the .hi files before processing through hiToText?

 after processing please as that is what MaLa will load right?


And please get a avitar, your naked!  :laugh2:
« Last Edit: September 10, 2010, 09:36:35 pm by loadman »

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score (HiToText)
« Reply #35 on: September 10, 2010, 09:37:06 pm »

 after processing please as that is what MaLa will load right?


Quote
My Knee Jerk reaction is I am not supportive  (Step#4) of putting batch files in the mame exe section.
I think I can either
1) Write a basic plug-in that calls the batch file on MaLa exit
2) Write a sexy plugin that does all this with Config gui for users to set path
3) Add section in options-gui-game start/quit to optionally call a batch file on game exit. I guess it would just call at reduced bat like:

One of us is coooonfuuuuuuuuuused, lol  :dizzy: prolly me - I'm used to it  :laugh2:

Please find attached the only three that my batch file converted since I put it in place - maybe someone else can chime in here and provide more data :-)



loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window for Hi Score (HiToText)
« Reply #36 on: September 10, 2010, 10:25:30 pm »
Am I right in thinking:

1) You want MaLa to load the appropriate text file (based on rom name) into the info window
2) My suggestions on how to execute HiToTxt on MaLa quit an/or my options on how you should think it should work?

I am sure we can make this work pretty quickly

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score (HiToText)
« Reply #37 on: September 10, 2010, 10:45:10 pm »
Am I right in thinking:

1) You want MaLa to load the appropriate text file (based on rom name) into the info window
2) My suggestions on how to execute HiToTxt on MaLa quit an/or my options on how you should think it should work?

I am sure we can make this work pretty quickly

well, I was under the impression you wanted it simple - IMHO, the batch file idea and just displaying that text file seems that way, but again, I've not seen the code so have no idea what fits the best.

Granted it likely won't be pretty - you could make some basic improvements based on the test data - like a | char equates to a TAB, and center each line (or create tab stops based on the | chars), pick a font that looks like a vid machine, etc.

If you want more control, then you could always write the plugin later to add more value to the text to displayable text conversion.

Seems like there is room to do both - doing the text file now at least gets it working and opens up feedback for new ideas to improve upon it all.

Let me know how if I can help.

kernelpanic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:December 12, 2010, 04:01:00 pm
Re: Info Window for Hi Score (HiToText)
« Reply #38 on: September 10, 2010, 10:53:11 pm »
let me add that I personally have no issue with a DOS based batch file - I cut my teeth on those (and miss those days in a way) - YMMV - not sure a plugin could do that particular task any better. As far as the ability to massage the text file to something more display friendly - yeah, I think a plugin may be better for that idea.

In the end, this is your train robbery ... just let me know if/how I can help.

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Info Window for Hi Score (HiToText)
« Reply #39 on: September 11, 2010, 12:00:24 am »
Quote
One of us is coooonfuuuuuuuuuused, lol  ??? prolly me - I'm used to it  Ha! Ha! Ha! Ha! Ha! Ha!

I'm not saying that that batch file is a bad idea at all. I was simply saying it would be problmatic for other users to enable it using that method of subsittuting the mame.exe path with the batch file. It would be better to call a batch file another way. The reason is MaLa expects a real exe to be there when it tried to creat a mame.ini (if missing) or a mame.xml if missing

I use unix shell scripts at work all the time so I understand the value.

Yep, I am sold on the idea on the batch file generating / updating the .txt files?

I will get MaLa natively to trigger it on game exit. I will work on that. I will write the MaLa code to trigger it.  ;D

Can you finish them appropriate batch file.? It will prbnably be just a sub set of what you have done already I guess?

Is this plan cool with you?  ???

Also Have a look at this MaLa beta to prompt more discussion on the Info Display format.

All it does it display a %ROM.txt file if present in subfolder 'hi' at this point.

No fancy tabs yet , just replacing | with 3 spaces for now.  if you have some Delphi Tabs Stop code do pass it as it will save me time writing my own


-Stale Download Link Removed-
« Last Edit: September 14, 2010, 07:12:48 am by loadman »