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: gamelist editor bug (fixed)  (Read 3092 times)

0 Members and 1 Guest are viewing this topic.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
gamelist editor bug (fixed)
« on: March 28, 2009, 01:58:38 pm »
I'm trying to import a mameui style ini folder, and it doesn't like it when the section has a "_" in it, like "[ROOT_FOLDER]". It just ignores sections that have that, but since that's what mameui uses, it makes the mameui import useless (unless you know to manually edit the file and remove the "_").

Really, what I'm trying to do is find a way to import a list of rom names from a text file to create a game list. Is this the only way to do this? It would be nice if you could import a plain text file, without having to create an ini-style file to do it through the mameui import. Or even if you could add games by pasting a comma separated list into a text box.

Do you think either of these ideas would be good to add? And can you fix the "_" bug?

Thanks!
« Last Edit: March 28, 2009, 08:17:39 pm by loadman »
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: gamelist editor bug
« Reply #1 on: March 28, 2009, 06:01:35 pm »
I'm trying to import a mameui style ini folder, and it doesn't like it when the section has a "_" in it, like "[ROOT_FOLDER]". It just ignores sections that have that, but since that's what mameui uses, it makes the mameui import useless (unless you know to manually edit the file and remove the "_").
Really, what I'm trying to do is find a way to import a list of rom names from a text file to create a game list. Is this the only way to do this? It would be nice if you could import a plain text file, without having to create an ini-style file to do it through the mameui import. Or even if you could add games by pasting a comma separated list into a text box.
Do you think either of these ideas would be good to add? And can you fix the "_" bug?

Thanks!

I have not done this before. Are you using Import MAME32 custom list?

I just did a few more quick tests , and it seems to be the name 'ROOT_FOLDER' that causes it to be ignored. [ROOT_folder] , [R_FOLDER], [RO_FOLDER], [ROO_FOLDER], [ROOT_FOLER] are OK

It has nothing to do with underscore

See Code Below. It seems to be deliberate to ignore ??  Why would this be? Could it be you are not supposed to put game in root, only in subfolders?

Here is an ini file in my mame32 :

Code: [Select]
[FOLDER_SETTINGS]
RootFolderIcon cust1
SubFolderIcon cust2

[ROOT_FOLDER]

[Golden Age]
amidar
armora
astdelux
asteroid
astrob
astrof
bagman
berzerk
bosco
btime
bubbles
buckrog
bzone
carnival
cavenger
ccastles


This is the code, so it should not be hard to make a variation to load comma separated , and to allow ROOT_FOLDER to be visible.

While I was in the code I just added:
- Text to remind on items in 'all games' list would be imported
- Stop duplicates being added (eg running the import twice)

What do you think?

This is the unmodified code:

Code: [Select]
procedure TfrmMain.ImportMAME32customlist1Click(Sender: TObject);
var
   inifile, gamestoadd: TStringList;
   dlg: TfrmMAME32Import;
   i, gamesadded: Integer;
   listname, line: string;
   readgame: Boolean;
   game: TGame;
begin
     if dlgImportMAME32List.Execute then begin
        inifile := TStringList.Create;

        inifile.LoadFromFile(dlgImportMAME32List.Filename);

        dlg := TfrmMAME32Import.Create(self);

        for i := 0 to inifile.Count - 1 do begin

            if (Pos('[', inifile.Strings[i]) > 0)
            and (Pos(']', inifile.Strings[i]) > 0)
            and (Pos('FOLDER_SETTINGS', inifile.Strings[i]) = 0)
            and (Pos('ROOT_FOLDER', inifile.Strings[i]) = 0) then
               dlg.lbxLists.Items.Add(Copy(inifile.Strings[i], 2, Length(inifile.Strings[i]) - 2));

        end;

        if dlg.ShowModal = mrOK then begin

           if dlg.lbxLists.ItemIndex > -1 then begin

              gamestoadd := TStringList.Create;

              listname := dlg.lbxLists.Items[dlg.lbxLists.ItemIndex];

              readgame := False;
              // get rom names
              for i := 0 to inifile.Count - 1 do begin
                  line := inifile.Strings[i];

                     if readgame and (Trim(line) <> '') then gamestoadd.Add(Trim(line));

                     if Trim(line) = '[' + listname + ']' then readgame := True
                     else begin
                          if (Pos('[', inifile.Strings[i]) > 0)
                          and (Pos(']', inifile.Strings[i]) > 0)
                          and readgame then readgame := False;
                     end;

              end;

              gamesadded := 0;
              for i := 0 to gamestoadd.Count - 1 do begin
                  if FAllGames.GetIndexFromName(gamestoadd.Strings[i]) > -1 then begin
                     game := FAllGames.GetCopy(FAllGames.GetIndexFromName(gamestoadd.Strings[i]));
                     FGamelist.Add(game);
                     Inc(gamesadded);
                  end;
              end;

              DisplayGamelist;

              gamestoadd.Free;

              ShowMessage('Added ' + IntToStr(gamesadded) + ' games to the list.');
           end;
        end;

        dlg.Free;

        inifile.Free;

     end;
end;
« Last Edit: March 28, 2009, 07:40:50 pm by loadman »

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: gamelist editor bug
« Reply #2 on: March 28, 2009, 06:20:50 pm »
for what it's worth, romlister has a new feature in the latest build which can take your existing ROM zip files and create a new xml file based off that list.  Then you could do a fake search of roms from there, and output it as a mala list.

IWO, if you have the .zip files of the roms you're trying to make a mala list from, romlister can, in a roundabout way, create a mala list off that.

I can step you through the details if you want.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: gamelist editor bug
« Reply #3 on: March 28, 2009, 07:51:06 pm »
OK, I just saw that if I removed "_" it would work. I wouldn't have guessed that it would explicitly filter that section, as that seems to be completely relevant to me. If I put games in the "Favorites" folder and then open favorites.ini in notepad I see this:
Code: [Select]
[FOLDER_SETTINGS]
RootFolderIcon golden
SubFolderIcon golden

[ROOT_FOLDER]
centiped
dkong
pacman
simpsons
spyhunt

I don't think you need to add a special note about it. MaLa still prompts you after you pick the file, and asks which section you want to import. So you still have to choose "ROOT_FOLDER" or some other section, if another one is present.

It should filter out "FOLDER_SETTINGS" though (and it is).

NOP, thanks for the suggestion. I was able to get my list imported just fine by changing the name of the section. I just wanted to raise this issue in an attempt to have it become a little more user friendly with regard to importing.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: gamelist editor bug
« Reply #4 on: March 28, 2009, 08:15:19 pm »
OK I have changed the code to allow ROOT_FOLDER.  Do you still need comma separated?

Attached is the new version

Have a Try!
« Last Edit: March 29, 2009, 12:35:42 am by loadman »

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: gamelist editor bug (fixed)
« Reply #5 on: March 28, 2009, 11:12:48 pm »
Cool.

"Need" is a strong word. I was just posting a couple of different ideas for ways to import a list of games that I might find handy on rare occasions (like today). I'm thinking that perhaps others would find it handy (have you ever heard requests like this?). If you think it would be then it would be a nice feature to have. But it's certainly not something I "need". I can always format a mameui style file and import that, even though it seems kinda silly to have to do that.

I know you have bigger fish to fry! ::)
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: gamelist editor bug (fixed)
« Reply #6 on: March 29, 2009, 12:34:26 am »
Cool.

"Need" is a strong word. I was just posting a couple of different ideas for ways to import a list of games that I might find handy on rare occasions (like today). I'm thinking that perhaps others would find it handy (have you ever heard requests like this?). If you think it would be then it would be a nice feature to have. But it's certainly not something I "need". I can always format a mameui style file and import that, even though it seems kinda silly to have to do that.

I know you have bigger fish to fry! ::)

Yeah I do.  :'(

I was frustrated by the lack of progress with MaLa. I had the great need to achive something.  :P  The MaLa gamelist is nice n easy.  ;D

Did you try the new version attached to the last post?

 ;)

Anyway, I have later today spent some time on mala and have have integrated the new Video Engine. It is running the startup video and the screen saver so far. The old engine is still driving the layouts.

I should have a new MaLa beta tonight (Aus time)
« Last Edit: March 29, 2009, 12:36:22 am by loadman »

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: gamelist editor bug (fixed)
« Reply #7 on: March 29, 2009, 02:16:11 am »
No, I haven't downloaded it. Because attachments are STILL broken on the BYOAC forums! Why is it taking so darn long to fix this? :soapbox: I've already imported the list so it's not something I need at this point, though I'd be glad to test it in the next beta.

And speaking of which... a new beta is coming soon? Coooool. :afro: You know I'll be thrilled just to finally get the fix for "use mouse" after standby! ;D
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: gamelist editor bug (fixed)
« Reply #8 on: March 29, 2009, 04:04:16 am »
You know I'll be thrilled just to finally get the fix for "use mouse" after standby! ;D

Yep, I put a hack fix in there, to not enable the mouse for a few secs after resuming from standby and that worked for me.

GaryMcT

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 745
  • Last login:September 24, 2014, 11:19:27 am
    • GaryMcT's arcade blog
Re: gamelist editor bug (fixed)
« Reply #9 on: August 12, 2009, 01:00:38 am »
Very very useful thread.  Thank you! :)  I now have my mameui favorites list in Mala.  Life is good. :)
My blog on learning how to develop FPGA versions of arcade boards: http://garymct.blogspot.com