PDA

View Full Version : mame2hyperspin Theme Generator (beta 0.01.9)



fata1err0r
08-09-2008, 02:42 AM
--EDIT--
I have decided that the major functionality HyperSpin is using from this project is the wheel image generation. So I have decided to abandon this project and have started a new project called HyperLogo which focuses solely on just that. It will eventually have lots of font effects and is all wrapped up in a windows gui interface :)

http://www.hyperspin-fe.com/forum/showthread.php?t=384

--EDIT--


Hey guys, It looks like it will be a while before themes are made for every game. And though programmer art is not as sexy as the real thing I have made a basic theme generator that can do your whole MAME collection in one click. Note: It doesn't verify you have the roms, just dumps the whole database.
Let me know if you have any problems, or features you would like to see. I am currently working on getting it to alphabetise the list. I would like to know if an artist could make a better template.xml/png for me? ;)

What does it do? (duplicated in a post below)
The main feature of this program is that it renders the text description for each game to a png image file as hyperspin will have a "no image" for every game in the list. And since making a default.xml and putting it in your themes folder doesn't make it apply for every game (this should be added i think) it basically copies my template.xml for every game and names it romname.xml. As default.png does work for backgrounds, it only copys my template.png once to default.png in the subdirectory. It then copies the snap for every rom it finds to the created subdirectoris. Finally, makes a hyperspin compatible mame.xml database, which I have heard that hyperHQ can do but i haven't been able to get it working on my pc.

Download Link

mame2hyperspin-0.01.9.zip (737 kb) (http://www.danesgames.com/apps/mame2hyperspin-0.01.9.zip)

You may need the visual studio 2005 redist:
redist link (http://www.microsoft.com/downloads/details.aspx?FamilyID=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en)

http://www.danesgames.com/apps/mame2hyperspinscreen1.jpg http://www.danesgames.com/apps/mame2hyperspinscreen2.jpg
http://www.danesgames.com/apps/mame2hyperspinscreen3.jpg

Here is a copy-paste of the readme.txt:

Mame2Hyperspin - By fata1err0r 2008

This program gets Mame's romlist and then carrys out a number of steps
to give you a basic theme and logo for each game in Hyperspin.

Getting started.
1. Open settings.xml and change this line to where your mame.exe is
<mameexe location="C:\yourPathToMame\mame.exe"/>

The next settings is your snaps folder. The snap will be your preview
if you are missing the video file, and as it is on a lower layer wont
intefere if you do have the video.
If you dont have any snaps go here:
http://mameui.classicgaming.gamespy.com/
get snaps.zip from the bottom of the page and unzip it somewhere.
Change <snap location="C:\your\Path\To\Snaps"/>
Note: if you don't want the program to copy snaps change it to this:
<snap location=""/>

Other settings:
<clones enabled="true"/> If you want it to look for clones (not just parent roms)
this should be true
<logo enabled="false" fontSize="80" maxChars="15"/> If enabled it will generate a logo
with the fontSize 80 and cut off any Characters of strings longer than 15. You can
also change the font.ttf file for any of your choice (the included is boring arial).

2. Save settings.xml

3. run mame2hyperspin.exe
The program will create a hyperspin subdirectory with a folder hierarchy that
matches hyperspin. It will then:
a: Ask your mame.exe for the roms list and convert it to a hyperspin compatible .xml
b: Create a .png logo for each game.
c: Copy the available snaps to the subdirectory
d: Duplicate template.ini for each of the above roms.

4. Make a backup of your hyperspin folder! Copy HyperSpin to HyperSpinBACKUP
Since the program generates files that will overwrite your existing themes
if you paste it over the top. you should merge the backed up files back in to
the directory after the next step.

5. Move the mame2hyperspin\hyperspin subdirectory over the top your original hyperspin folder

6. If you want to merge with your original custom themes follow this step:
a: Go to HyperSpinBACKUP\Media\MAME\Images\Artwork1
copy and overwrite all files EXCEPT default.png to your
HyperSpin\Media\MAME\Images\Artwork1
b: Copy all files in HyperSpinBACKUP\Media\MAME\Images\Themes
and overwrite all files in your HyperSpin\Media\MAME\Images\Themes
c: Copy all files in HyperSpinBACKUP\Media\MAME\Images\Wheel
and overwrite all files in your HyperSpin\Media\MAME\Images\Wheel
Done! :)

Ego-X
08-09-2008, 03:03 AM
Nice one!

BadBoyBill
08-09-2008, 05:59 AM
Cool, post some screenies of the result when you get a chance, my one question is does it use default setting for the artwork or are you making a theme.xml for each game?

Dazz
08-09-2008, 06:51 AM
Cool, post some screenies of the result when you get a chance, my one question is does it use default setting for the artwork or are you making a theme.xml for each game?According to this:


d: Duplicate template.ini for each of the above roms.

I am assuming that it appears to create a new theme xml for each individual game.

I am running it right now to see how this looks/works.

mountain
08-09-2008, 07:42 AM
Looking forward to hearing how this works.

joebells
08-09-2008, 08:21 AM
how does this differ from using a default theme. I think I am probably missing some aspect of what is going on here so that is why I am asking.

fata1err0r
08-09-2008, 02:24 PM
The main feature of this program is that it renders the text description for each game to a png image file as hyperspin will have a "no image" for every game in the list. And since making a default.xml and putting it in your themes folder doesn't make it apply for every game (this should be added i think) it basically copies my template.xml for every game and names it romname.xml. As default.png does work for backgrounds, it only copys my template.png once to default.png in the subdirectory. It then copies the snap for every rom it finds to the created subdirectoris. Finally, makes a hyperspin compatible mame.xml database, which I have heard that hyperHQ can do but i haven't been able to get it working on my pc.

BadBoyBill
08-09-2008, 03:11 PM
Every game doesnt need an xml in this case, you can just leave the xml's out and when it finds an images without an xml it will use the ini settings, I did this so people wouldnt have to have an xml for each game when they have a default setup like this.

Now the main reason Im liking this utility is that your screenshot does show that wheel text can look good, nice job!

fata1err0r
08-09-2008, 03:48 PM
Cheers mate :beer:
Thats good to know, I'll probably remove this feature in the next release. For now I recommend everyone should do this:
In your mame2hyperspin settings.xml change this:
<duplicateTemplate enabled="true"/>
to this:
<duplicateTemplate enabled="false"/>

And instead edit your HyperSpin\settings\MAME.ini file in these areas to look like this so it will work with my background:

[video defaults]
width = 400
height = 300
x = 260
y = 405
rotation = 0
animation_time = .3
animation_type = fade
animation_start = none
border_color = 0x000000
border_size = 12
forceaspect = horizontal
belowwheel = false

[sounds]
game_sounds = true
wheel_click = true

[artwork1 defaults]
x = 260
y = 405
rotation = 0
animation_time = .3
animation_type = fade
animation_start = none
animation_rest = none

fata1err0r
08-09-2008, 03:54 PM
Are people finding the generating of the hyperspin compatible mame.xml and the copying of snaps usefull features? Or shall i just reduce this project to a logo renderer?

BadBoyBill
08-09-2008, 04:00 PM
Good question, well for one thing HyperHQ can output a full mame.xml so there might not necessarily be a need for that, and snaps is good for people that don't want emumovies, I think some people dont want to download the huge amount of videos, so it could be good to leave that as an option.

I wanted to ask, what are the possible capabilities of your program in regards to drawing the logos, can it ever do gradients/strokes/glows?

fata1err0r
08-09-2008, 04:37 PM
My program uses SDL and SDL_ttf, to render the font to and SDL surface. It then uses libpng to write that surface to a file. It can open any .ttf file so different fonts for different genre's are a possibility. Since im using SDL any gaming effect could be applied to the surface before it gets outputted. As it stands I have only worked on it one day, and I do plan on adding effect settings eg gradients and glows.

I finally got my HyperHQ to generate the mame.xml, its more featured than my generator as far as options, (worked out how to alphabetise the list). Maybe the logo generator could be added within HyperHQ? If you have room on the dev team my email/msn is danelipscombe@gmail.com.

Also I was wondering what the reason for asking for the catlist.ini is as hyperspin doesn't seem to be using it? Future feature?

BadBoyBill
08-09-2008, 05:51 PM
HS does use the catlist via HQ, you can set genres and create extra lists to go into your MAME folder, then when in HS for player 1 hit "G" or player 2 hit "H" , this will bring up a genre menu and any additional list you made with custom names like "Fighting Games" or "Puzzle Games" or whatever you want will show up on the menu. Then you can visit the genre wheel's by pressing Enter.

We always have room on the team for more members. I will email you when I get home. Thanks for your work on this, saved me some time and it looks good.