PDA

View Full Version : Create Game List Almost Automatically!


Ego-X
08-10-2008, 04:08 PM
After spending a few days creating a game list for HyperSpin I decided there had to be a smarter way than filling out the fields manually.

Here is the result!

You will need Notepad++ to perform these operations.
You will need also need a clrmamepro no-intro gamelist for the system you are creating a list for.

find field and replace field are both references don't type field anywhere, probably obvious but...

Lets get going!

Open the Clrmamepro no-intro gamelist in notepad++

Delete the whole of the header.

CTRL+H to bring up replace dialog.

strip the close tags out(the parentheses at the start of the line)
find field ^\)
replace field leave blank

Delete parentheses at line beginnings($ indicates EOL this elliminates any possibility of inadvertantly removing parentheses we need

find field game \($
replace field blank

Insert the opening game tags

Find field name "
replace field <game name="

Close the tag
find field <(.+)$
replace field <\1>

Put <> around the word beginning
requires extended radio button selected

find \tdescription
replace \t<description>

Find the line with beginning on and add the closing tag </beginning>
<([^>]+)>(.+)$
<\1>\2</\1>

Remove extra rom information from game description
find field (USA, Europe)"</description>
replace field </description>
find field (USA)"</description>
replace field </description>
find field (Europe)"</description>
replace field </description>
find field (world)"</description>
replace field </description>

add extra fields used by HS

find field </description>
replace field </description>\n\t<crc></crc>\n\t<manufacturer></manufacturer>\n\t<year></year>\n\t<genre></genre>

Ditch the line with the crc, md5 etc for now put the closing game tag here

find ^.*crc.*$
replace 4 spaces </game>

Close replace

Add the menu tags to top and bottom of list

You know have a HS gamelist with minimal functionality for now!

I've tested the resulting in HyperSpin works perfectly there are no guarantees my documentation does though :D

Figure there is still room to condence the operations much further by combining actions.

Still beats typing out a thousand game details by hand!

joebells
08-23-2008, 02:30 PM
pretty nice work I worked up something similar myself but hadn't finished it

I have one improvement for you. You have the crc value we can fill it in when we replace that line

just use this instead

^.*crc.(........).*$

\t<crc>\1</crc>\n</game>

and of course omit

\n\t<crc></crc> from </description>\n\t<crc></crc>\n\t<manufacturer></manufacturer>\n\t<year></year>\n\t<genre></genre>

Ego-X
08-23-2008, 03:42 PM
I will try that thx!

I must admit I only got into the fancy search stuff as a solution filling an 800 game long game list, as a n00b I'm more than happy to take on ideas for improvement to this.

I thought about doing it programmatically but I have admit that stuff hurts my head nowadays :D So best leave it to someone who is good at it.

joebells
08-23-2008, 06:39 PM
yeah I had some programming in college a few years back but I can't program much of anything now. I remember thinking at the time there was no way I would forget how to do this stuff so I didn't keep up with it lol

I wish I had kept up with it.