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: Use Listgen to create an on-the-fly Mamewah list  (Read 6648 times)

0 Members and 1 Guest are viewing this topic.

BuZz880

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:November 16, 2023, 02:16:43 pm
  • I'm a llama!
Use Listgen to create an on-the-fly Mamewah list
« on: January 09, 2005, 02:07:40 pm »
I really like this feature and thought I would document it here in case anyone is interested.  It works perfectly so far, very fast and completely silent.

I find sometimes when people are over someone might ask "Hey, do you have anymore football games?" or Horse-Racing or always something I don't seem to have in my 'favorites' list.  I like to keep the Master list hidden and the number of permanent lists manageable so to have one for every category is not for me.  What the following does is let that guest select an existing game in your favorites list and instantly generate a new list containing all other games; including clones, that match that same catver category.

As of Mamewah 1.6b6 it is possible to pass any of several flags on the command line to an external app.  See Mamewah ini.txt for a complete description of each but for this example I use only the [category] flag.

All this does is replace a string called 'var1' in your sql with the [category] from Mamewah to create a gamelist and also name that list based on the [category] flag (example: Action, Puzzle, etc.)

There are a few pieces to this process mainly because I am no programmer and rely upon my own bat files; basic sql knowledge and borrowed vbs scripts. 

You will need:
1.  Buddabing's latest Listgen utility which is bundled with his Movie Maker utility; see the movie maker thread.
2.  SearchAndReplace.vbs by Eric Phelps, from www.ericphelps.com http://www.ericphelps.com/scripting/samples/
3.  My file called list99.bat, contents below.
4.  My gamelist99.sql for use with Buddabing's listgen, see below.
5.  Mamewah 1.6b6 or better installed.

To implement:

**Backup any affected ini or lst files because the changes this script will make are not reversible; make sure you edit any file or pathnames shown below.  If you want to test the output use dummy paths.


  • Create list99.bat and gamelist99.sql in your listgen directory using the code towards the bottom of this post
  • Unzip SearchAndReplace.vbs into your listgen directory
I
  • in your Mamewah\ini directory decide what list number you want to populate with this script and make sure there is an ini file for it (copy an existing one and rename it).  I use 1-mame-7.ini for mine.
  • Copy this ini file (1-Mame-7.ini) to your listgen directory; make sure the list title is "Category" as this will be updated by the script later, as follows:
          list_title    Category
  • Backup your 1-mame.ini (or whatever yours is called) and make sure the following is specified for external app 2 (update paths)
          app_2_executable       c:\arcade\utilities\listgen\list99.bat
          app_2_commandline_format    "[category]"{nodosbox}
  • Make sure in listgen.ini your FRONTEND is specified as MAMEWAH

You should now be able to run Mamewah and execute the script by first highlighting a game on an existing gamelist and then pressing whatever button you have specified to launch external app 2 and then navigate to your new gamelist.  This process takes only a few seconds though you will not see any indication of either its activity or completion.

** Note as of Mamewah 1.6b7 you can only pass a category while viewing your Master list (1-Mame-0.lst) or any other list labelled as either "Favourites", "Most_Played" or "Longest_Played" in the appropriate 1-mame-x.ini file.




list99.bat (edit paths and Mamewah list name as appropriate then copy the following into notepad and save as list99.bat into same directory as listgen.exe)
-----begin list99.bat-------
@--rem this creates gamelist 7 on-the-fly based on the category flag passed from Mamewah

echo off

@--rem listgen needs to use filter.sql
@copy /y gamelist99.sql filter.sql

@--rem this inserts the category parameter into filter.sql
@start /min SearchAndReplace.vbs filter.sql var1 %1

@--rem edit this to be the appropriate path and Mamewah .lst filename
@start /min listgen -output "c:\Program Files\Mamewah\files\1-mame-7.lst"

@--rem this should also change the name that appears in Mamewah on this list - edit paths and filenames as appropriate
@copy /y 1-Mame-7.ini "c:\Program Files\Mamewah\ini\1-Mame-7.ini"
@start /min SearchAndReplace.vbs "c:\program files\mamewah\ini\1-Mame-7.ini" Category %1
-----end list99.bat---------------


gamelist99.sql (use any sql you like or use this one - copy into notepad and save as gamelist99.sql in your listgen directory - make sure you have 'var1' in there somewhere)

-----begin gamelist99.sql---------
select * from gamedata where status not in ('preliminary','imperfect') and catver_category like '%var1%' and full_desc not like '%PlayChoice%' and full_desc not like '%cassette%'
order by full_desc;

-----end gamelist99.sql---------

Again, this will work very well but back up your ini files if you are not sure what you are doing because the changes are not reversible basically gamelist 1-mame-x.lst is destroyed and recreated everytime you run this script as is 1-mame-x.ini

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #1 on: January 09, 2005, 03:01:08 pm »
Wow, nice work!

When I created ListGen I was hoping that someone would extend it like you have.

The list generator code is modular and fast. If any FE authors wish to incorporate my code into their front ends they are free to do so. It's written in the best language for cross-platform compatibility;  ;D C.

The version bundled with the movie maker utility only has support for MAMEWah and 3DArcade, others are forthcoming.

Also, listgen doesn't need to use the file "filter.sql", you can set the sql file in listgen.ini, or in the command line to listgen:

listgen -filter foo.sql
listgen -filter bar.sql

or
filter foo.sql

in the listgen.ini file

Regards,
Buddabing
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

BuZz880

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:November 16, 2023, 02:16:43 pm
  • I'm a llama!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #2 on: January 09, 2005, 03:29:54 pm »
Thanks, I think I knew that but forgot; I won't change my .bat here though because the SearchAndReplace.vbs aspect requires maintaining one pristine copy of the original sql so it is useful to copy it to filter.sql anyway.

)p(

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 964
  • Last login:March 27, 2009, 03:38:15 am
  • We are the Galaxians...
    • Emulaxian:cabinet and frontend
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #3 on: January 09, 2005, 05:05:04 pm »

The version bundled with the movie maker utility only has support for MAMEWah and 3DArcade, others are forthcoming.



I had not seen before that you added support for 3darcade's format in listgen. I gave it a go and seems to work flawlessly  :D

peter


Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #4 on: January 09, 2005, 07:58:36 pm »
Sounds really good, I'll give this a try tomorrow :)

screaming

  • Sweet! I'mma go make me some popovers!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2124
  • Last login:August 14, 2019, 03:15:34 pm
  • Registered lUser
    • shift eight (*) generation
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #5 on: January 09, 2005, 10:35:17 pm »
I really like this feature and thought I would document it here in case anyone is interested.  It works perfectly so far, very fast and completely silent.

  Wow Buzz, this is a pretty clever use of the great new functionality popping up lately!  Great work, I can't wait to check it out!

-Steve

BuZz880

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:November 16, 2023, 02:16:43 pm
  • I'm a llama!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #6 on: January 09, 2005, 11:55:51 pm »
I'm glad you like it Minwah because I could use a tweak or two for b8  ;)

1.  It would be nice to be able to pass a category from any Mamewah custom list considered "normal".  Currently only the favorites, most played, longest played lists do this.
2.  Perhaps more importantly, there is a format inconsistency.  My most_played list passes categories like "Shooter / Space" with spaces on either side of the front slash while my "favorites" list passes the same category as "Shooter/Space" which of course limits the usefulness of this dynamically generated sql.

Aside from that I am very pleased with how this all comes together. 

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #7 on: January 10, 2005, 05:48:05 am »
1.  It would be nice to be able to pass a category from any Mamewah custom list considered "normal".  Currently only the favorites, most played, longest played lists do this.

Aahh, his is what you meant in your email (just replied today).  I don't see why this is happening, since all lists are basically treated the same.  Can you *see* on the screen the category for all lists?  Is it just that the [category] part of the commandlie_format is not working?

All I can think of is to make sure your 'normal' lists have been created since you pointed to catver.ini and generated the main list, since this info is taken from the main list.  'Favourites' lists will be updated on the fly which is why these would not be affected if this is the case...

Quote
2.  Perhaps more importantly, there is a format inconsistency.  My most_played list passes categories like "Shooter / Space" with spaces on either side of the front slash while my "favorites" list passes the same category as "Shooter/Space" which of course limits the usefulness of this dynamically generated sql.

Again, I don't understand why this is happening.  MAMEWAH shouldn't manipulate the strings at all after the main list creation - I do use a routine for some things which remove spaces etc. - I'll check to see if for some reason this is mistakingly (?) being used on it...

Oh, again, do the categories appear as you describe on screen or only when passed to a commandline?

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #8 on: January 10, 2005, 06:48:46 am »
BuZz880: I tried it and it seems to work fine for me...here's a bit of my log file (note list 1 is set to most_played):

10/01/2005 11:38:10 Commandline run: CMD.EXE /c c:\stuff\mame\mame.exe SSRJ -verifyroms > C:\Stuff\MAMEWA~1\files\verify {flags=17}
10/01/2005 11:38:11 Commandline run: c:\stuff\mame\mame.exe SSRJ Driving / Race  {flags=12}
10/01/2005 11:38:12 Games list read: 01-mame-1.lst
10/01/2005 11:38:12 Games list read: 01-mame-0.lst
10/01/2005 11:38:13 Games list read: 01-mame-1.lst
10/01/2005 11:38:14 Commandline run: CMD.EXE /c c:\stuff\mame\mame.exe SSRJ -verifyroms > C:\Stuff\MAMEWA~1\files\verify {flags=17}
10/01/2005 11:38:15 Commandline run: c:\stuff\mame\mame.exe SSRJ Driving / Race  {flags=12}
10/01/2005 11:38:15 Games list read: 01-mame-1.lst
10/01/2005 11:38:15 Games list read: 01-mame-0.lst
10/01/2005 11:38:16 Games list read: 01-mame-1.lst


Edit: the commandline_format I used is '[name] [category] {autodosbox}{nosafelaunch}' for testing purposes only.

BuZz880

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:November 16, 2023, 02:16:43 pm
  • I'm a llama!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #9 on: January 10, 2005, 09:28:26 am »
Ok, I see partly what is going on here.  All of my "normal" lists were created by listgen and show nothing for the category in my mamewah lst files.

But there is also an issue with different Mamewah generated lst's following different rules. 

Does this mean that maybe catver.ini has changed since I created my favorites list and I need to re-add the games to get the current category? 

Notice this game that appears in all 3 lists with minor differences:

from my most_played list:
POLICETR
Police Trainer
1996
P&P Marketing


Raster
Horizontal
Light-Gun
Status Good
Color Good
Sound Good
Shooter / Gun

From my "favorites" lst
POLICETR
Police Trainer
1996
P&P Marketing


Raster
Horizontal
Light-Gun
Status Good
Color Good
Sound Good
Gun

Look at a game like Galaga, the first list will show Shooter / Space, the second will show Shooter/Space.  THe second format yields no results using listgen and my gamelist99.sql above.

Here is from a listgen created lst, notice no category is output and the controls are listed as lightgun as opposed to Light-Gun also the romname is in lower case which I now recall when I was feeding my favorites list into moviem I had to convert everything to lower case (find and replace A with a, B with b in notepad) to select on romname.  I will mention this to Buddabing.

policetr
Police Trainer
1996
P&P Marketing


Raster
Horizontal
lightgun
Status Good
Color Good
Sound Good

« Last Edit: January 10, 2005, 09:50:00 am by BuZz880 »

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #10 on: January 10, 2005, 11:44:57 am »
Does this mean that maybe catver.ini has changed since I created my favorites list and I need to re-add the games to get the current category? 

That is the only explanation I can think of.  most_played or longest_played lists should pull all info from the main list (mame-0.lst) - so these should be correct.  Any custom lists created with previous versions of catver could possibly be outdated - that must be what is going on with your 'favorites' list (I take it you made this by manually adding games?).

Quote
Here is from a listgen created lst, notice no category is output and the controls are listed as lightgun as opposed to Light-Gun also the romname is in lower case which I now recall when I was feeding my favorites list into moviem I had to convert everything to lower case (find and replace A with a, B with b in notepad) to select on romname.  I will mention this to Buddabing.

MAMEWAH converts the control type into something more pleasing to the eye (that's the idea anyway).  That explains that one...not sure why there is no category.  Romname should be in uppers really, MW might get confused sometimes otherwise (while sorting/searching for example).

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #11 on: January 10, 2005, 12:00:52 pm »
Quote
MAMEWAH converts the control type into something more pleasing to the eye (

hehe, pleasing to whom?  ;D

Please post the algorithm you use so that the lists I generate match what you are expecting.

Rom names really should be case-independent. There is no difference between "mame foo" and "mame FOO" on Windows or Linux.

I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Mario

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 278
  • Last login:March 29, 2021, 08:55:12 pm
  • Mmmmm.....arcades!
    • Mario's Arcade Page
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #12 on: January 10, 2005, 01:30:36 pm »
I'm not that familiar with MameWah, so I don't know if this is in the same league.

I created a Perl script which reads in your mame-0.lst and mame.ini files, and the catver.ini file, and generates new MameWah lists with all of the games categorized.

Since catver supports categories and subcategories (e.g., "Sports" is a category and "Soccer" is a subcategory), the lists generated can be set up so that you can choose a category by using the Next/Previous Emulator keys, and then choose a subcategory by using the Next/Previous GameList keys.

It also supports the creation of custom MameWah lists by reading a text file with games that are tagged to be included in the list, or by using a pattern match. I know that some of this functionality is built into MameWah, but I implemented some of this just for the fun of it.

If anyone wants a copy of the script, I'd be happy to mail it or post it somewhere.

Mario

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #13 on: January 10, 2005, 01:46:13 pm »
Please post the algorithm you use so that the lists I generate match what you are expecting.

Sorry for the hassle, this is what it does (I would do this differently in future but hey):

name = (uppercase)
description = (unchanged*)
year = (unchanged, except unknown = 19XX)
manufacturer = (unchanged)
cloneof = (uppercase)
romof = (uppercase)
video: raster = Raster
video: vector = Vector
video: horizontal = Horizontal
video: vertical = Vertical
input: dial = Spinner (or 360

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #14 on: January 10, 2005, 01:55:56 pm »
Not to hijack this thread, but to follow Mario's lead:

 It's not as cool as creating on-the-fly Mamewah lists, but I've written a script to take Mamewah lists and convert it to a listgen sql file.  For me this was useful, because I've had my cab for a while and took a lot of time to add the games in manually before listgen came out.  Now that I have them in a listgen sql file, I can create the movies file for the games I want and I can easily try out other FE's with my game list.

If anybody wants a copy let me know and I'll try to post it on the web somewhere.  Otherwise, I may try to make a patch to integrate it into listgen once the source is released.

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #15 on: January 10, 2005, 01:58:58 pm »
Quote
MAMEWAH converts the control type into something more pleasing to the eye (

hehe, pleasing to whom?  ;D

Please post the algorithm you use so that the lists I generate match what you are expecting.

Rom names really should be case-independent. There is no difference between "mame foo" and "mame FOO" on Windows or Linux.



Buddabing it's a little ironic that you are saying the rom names should be case-independent.  Took me a while with my script, because the romnames in the listgen sql file have to be lowercase :P



Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #16 on: January 10, 2005, 02:02:40 pm »
Buddabing it's a little ironic that you are saying the rom names should be case-independent.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #17 on: January 10, 2005, 02:21:00 pm »
That said, I am coding atm so I will add some stuff in to just convert any lowercase romnames read from a LST file to uppers so you need not worry :)

Done, this'll be in v1.6b8...

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #18 on: January 10, 2005, 03:23:28 pm »
Quote
MAMEWAH converts the control type into something more pleasing to the eye (

hehe, pleasing to whom?  ;D

Please post the algorithm you use so that the lists I generate match what you are expecting.

Rom names really should be case-independent. There is no difference between "mame foo" and "mame FOO" on Windows or Linux.



Buddabing it's a little ironic that you are saying the rom names should be case-independent.  Took me a while with my script, because the romnames in the listgen sql file have to be lowercase :P




ROFL!

If that's the case, I'll fix it!
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

sWampy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 273
  • Last login:February 02, 2010, 04:23:40 pm
  • I want to build my own arcade controls!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #19 on: January 10, 2005, 07:35:30 pm »
This thing really rocks, now to change it where you can select current controller as well.


Minwah, any way you can add an option to mamewah so you can pick a list after this exits so you don't have to manually switch lists after making a new one?

screaming

  • Sweet! I'mma go make me some popovers!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2124
  • Last login:August 14, 2019, 03:15:34 pm
  • Registered lUser
    • shift eight (*) generation
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #20 on: January 10, 2005, 08:40:39 pm »
Minwah, any way you can add an option to mamewah so you can pick a list after this exits so you don't have to manually switch lists after making a new one?

  It is pretty sweet, but I doubt it'll get added to MAMEWAH anytime soon. In order to do it right, you have a couple options:

1) Build support for this functionality in MAMEWAH directly.  It wouldn't be hard, technically, but you'd have to really think about what the best way to do it.  Do you have a new type of list that's 'dynamic', in addition to favorites, longest_played, etc? Do you have 1 list of every type and have a key defined for each one? How about a dynamic key for a dynamic list (meaning, a definition in ctrlr.ini JUMP_BUTTON and whatever game is selected in MAMEWAH in which ever list, it jumps to a menu that will allow you to pick what you want to 'filter' on, category, video, etc.).  I like the idea of dynamic filtering, but that's all it really is.
 
2) Add a full blown scripting language to MAMEWAH

3) Expose objects in MAMEWAH for external scripts to control.

Hmm.. I'm thinking out loud here. Forgive me :)

-Steve

BuZz880

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:November 16, 2023, 02:16:43 pm
  • I'm a llama!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #21 on: January 10, 2005, 10:04:22 pm »
This thing really rocks, now to change it where you can select current controller as well.


Minwah, any way you can add an option to mamewah so you can pick a list after this exits so you don't have to manually switch lists after making a new one?

It is trivial to modify what I have given you to select on controller or status or romof or whatever you want.  All you need to do is re-write gamelist99.sql to select on the flag you want for example

select * from gamedata where input like '%var1%'

Then modify your 1-mame.ini file to use command line format of :
[input]

The only qualifier here is you need to wait until Buddabing standardizes the format of the input/controller names in listgen to match Mamewah - which he is working on right now.


sWampy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 273
  • Last login:February 02, 2010, 04:23:40 pm
  • I want to build my own arcade controls!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #22 on: January 10, 2005, 10:54:38 pm »
  It is pretty sweet, but I doubt it'll get added to MAMEWAH anytime soon. In order to do it right, you have a couple options:


-Steve


I wasn't thinking something super fancy,  maybe just have the batch file return an error code of 8 if it's list 8 you just changed, and mamewah knows to change to list 8.   It might take a little more thought than that, like make the error code 43218, 43217, 43216... where it's not likely for some real error to jump you to a real list.

BuZz880

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:November 16, 2023, 02:16:43 pm
  • I'm a llama!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #23 on: January 10, 2005, 11:14:34 pm »

I wasn't thinking something super fancy,  maybe just have the batch file return an error code of 8 if it's list 8 you just changed, and mamewah knows to change to list 8.   It might take a little more thought than that, like make the error code 43218, 43217, 43216... where it's not likely for some real error to jump you to a real list.


I always thought Mamewah should have a "Home" position (platform # and list #) to which it could return on restart or when a particular key were pressed just to keep guests on track.  This probably is more complicated than it sounds.  If it had this you could probably use the new exit and launch app feature (1.6b8) and have it launch your bat file to create your gamelist, exit mamewah then restart mamewah; on its home position, which of course you conveniently set to gamelist 8 or whatever.  I assume this could happen quickly enough not to be annoying.  Anything fancier than that would have to be an integrated solution.


)p(

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 964
  • Last login:March 27, 2009, 03:38:15 am
  • We are the Galaxians...
    • Emulaxian:cabinet and frontend
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #24 on: January 11, 2005, 02:10:25 am »
Maybe Buddabing could add a indexing function to listgen of all the database columns. then minwah could use the index to setup filters. I do this with the on the fly filters in 3darcade and it works great.

peter

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #25 on: January 11, 2005, 10:58:48 am »
Quote
MAMEWAH converts the control type into something more pleasing to the eye (

hehe, pleasing to whom?
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #26 on: January 11, 2005, 11:01:25 am »
Maybe Buddabing could add a indexing function to listgen of all the database columns. then minwah could use the index to setup filters. I do this with the on the fly filters in 3darcade and it works great.

peter

I'm not sure exactly what you mean by an "indexing function" Is that like a SQL index?
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #27 on: January 11, 2005, 12:09:52 pm »
Quote
MAMEWAH converts the control type into something more pleasing to the eye (

hehe, pleasing to whom?  ;D

Please post the algorithm you use so that the lists I generate match what you are expecting.

Rom names really should be case-independent. There is no difference between "mame foo" and "mame FOO" on Windows or Linux.



Buddabing it's a little ironic that you are saying the rom names should be case-independent.  Took me a while with my script, because the romnames in the listgen sql file have to be lowercase :P




Part of the problem may be in your SQL:

select * from gamedata where romname = 'PaCmAn' will not work, but
select * from gamedata where romname like 'pAcMaN' will work.

Without major surgery to the SQLite engine, I cannot change this behavior.


Doh! you are right. I have an = sign.

Sorry for you having to waste your time with that.

vibez

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 411
  • Last login:February 09, 2011, 08:33:20 am
  • I want to build my own arcade controls!
Re: Use Listgen to create an on-the-fly Mamewah list
« Reply #28 on: January 25, 2005, 04:12:50 pm »
Mario, That perl script looks very interesting. Could you hook me up with it please. I've sent you an email

Thanks in advance