Showing posts with label ROMs. Show all posts
Showing posts with label ROMs. Show all posts

Saturday, November 16, 2013

Roms and screenshots

Of Roms and Screenshots

I downloaded my Roms from a  torrent site. It had large number of ROMs from different systems (dreamcast, megadrive/genesis, master system, playstation  etc). However many of the the MAME ROMs didn't work with the version of MAME I had in Puppy linux, nor with the MAME version from Debian.

However, downloading the most up to date ROMs for MAME would be onerous, especially given the low datacap I have. There are 28 thousand games in the current release for MAME. This means 29 gig of ROMs, and about the same in CHD files. CHD files are extra information for the ROM files, eg graphics and music. Sorting through that number of ROMs to get only the few that I really wanted would be crazy, so I'd need to get them another way.


So what I've done instead is pick through the ROMs which work and then re-download the ones from my wishlist. I was considering getting Space Ace and Dragon's Lair, old school laser disc games, but I haven't added them yet. I have the rom files, but not the video files. It could be fun creating a video disc game of my own ( there are editors out there, I don't think it would be hard) but I lack the time and inclination at the moment. Daphne is the emulator for those games.

For my other roms, there are other emulators which I could have used, especially the for the NES, which has quite a variety, but as I said before, these are the ones which worked with all of my roms. 
I only picked 2d systems with a limited number of buttons, since I have four fire buttons and  two other buttons. Unfortunately this excluded the Super NES. I did have a spare 3d card, but since I was testing the setup on a different system (by adding the hard drive to my current computer and rebooting into the harddrive) I decided I couldn't really test it effectively. I've got the setup down now, so if I really wanted to add some more emulators (and buttons) I could.

So I have:

Gens - for Megadrive/Sega Genesis
Fceaux - NES
osmose - Sega Master System
mame - arcade
Gngeo - Neogeo

As stated above, many of the ROMs I had downloaded for MAME didn't work. I had a wishlist of games to get, and so I tried downloading them from a couple of ROM sites.
 The best one I found was http://www.mamest.com/ You can search by game name, ROM name, or the names of files within the zip file. Thats really handy if you have a ROM which isn't going, and you need to download another file to fix it.
Verifying ROMs

MAME and some of the other emulators allow you to verify your ROMs. You run the command against the ROM directory and it will spit out a list of ROMs which will run, and ones which wont. It even gives you the names of the missing files. However, it *doesn't* tell you which ROM file which contains those files though. So, if you have a game called "safety dance" based on "stair dancer", it'll tell you need the file stairdancer.bin, but not that its in the "stair dancer" parent zip file. Thats where the website comes in. It makes fixing games really much easy.

Snaps: aka screenshots or previews

I got my screenshots for the previews from a variety of web sources. I needed to rename some of the files to match the rom names, otherwise advmenu doesn't pick them up.  Here is the (very ugly) script I used to rename the misnamed files.

I downloaded my sega megadrive screenshots from here, and  the NES ones too I think? It looks quite comprehensive for many systems.
 https://www.dropbox.com/sh/8xuhgxahhk6pfk4/umSNUhRGC0

I got my NeoGeo  screenshots by leeching this site (mostly because I wasn't sure the above site had them)
 http://www.neogeosoft.com/?section=artwork&filter=mvs

I leeched this site for the Sega Master System, though many of the files needed to be renamed.
 http://www.vgmuseum.com/

For MAME I used  Hitf12:
http://www.mameworld.info/hitf12/



An ugly script to rename Rom files

This is a bash script to rename snaps (screenshots/previews)  to the corresponding ROM file. it easier than tediously doing it manually.

Be warned! It may be buggy. I basically got it to the state where it would read the snaps and the ROMs. You can go back/forward in the ROM list, and skip back/forward by 10 in the snaps list. It displays one ROM and 10 snaps, you choose from the list which one to rename by typing a number from 1 to 10.

I'd strongly suggest running this against a copy of your snaps directory, and only copying it over once you verify the images are correct.





#!/bin/bash
#rename the file, then increment the lists?

#Neo Geo
Filename_Array=(/Roms/NeoGeo/roms/*)
RenamingThese_Array=(/Roms/NeoGeo/snaps/*)

##variables
#counters
Filename_Start=0
Rename_Start=0

skip_amount=10
array_end=$[${#RenamingThese_Array[@]} -$skip_amount]

function rename_files(){
echo
echo ----Original Rom File ----
echo ${Filename_Array[Filename_Start]}
echo

IFS="^"
a=$Rename_Start
b=$[Rename_Start+1]
c=$[Rename_Start+2]

d=$[Rename_Start+3]
e=$[Rename_Start+4]
f=$[Rename_Start+5]

g=$[Rename_Start+6]
h=$[Rename_Start+7]
i=$[Rename_Start+8]

j=$[Rename_Start+9]

names=(
${RenamingThese_Array[a]}
${RenamingThese_Array[b]}
${RenamingThese_Array[c]}

${RenamingThese_Array[d]}
${RenamingThese_Array[e]}
${RenamingThese_Array[f]}

${RenamingThese_Array[g]}
${RenamingThese_Array[h]}
${RenamingThese_Array[i]}

${RenamingThese_Array[j]}
next5 back5 previous_rom skip_5_roms)
echo ----Rename File ----
echo Press any other key to skip renaming the image file

PS3="Choose an image file (1-$skip_amount) to rename:"

select varname in ${names[*]}; do
   if [[ -n "$varname" ]]; then
       # chop off the filename from $varname, and from ${Filename_Array[0]}
       echo ${Filename_Array[Filename_Start]}
       echo $varname

       if [[ $varname = "next5" ]]; then
        Rename_Start=$[$Rename_Start+$skip_amount]
        if [[ $Rename_Start -gt $array_end ]]; then
      echo $array_end
      echo $Rename_Start
          echo "Reached the end of the list of images"
      Rename_Start=$array_end
    fi
    break
       fi

       if [[ $varname = "back5" ]]; then
    Rename_Start=$[$Rename_Start-$skip_amount]
    if [[ $Rename_Start -lt 0 ]]; then
      echo "Reached the start of the list of images"
      Rename_Start=0
     fi
    break
       fi
   
       if [[ $varname = "previous_rom" ]]; then
    Filename_Start=$[$Filename_Start-1]
    if [[ $Filename_Start -lt 0 ]]; then
      echo "Reached the start of the list of images"
      Filename_Start=0
     fi
    break
       fi

       if [[ $varname = "skip_5_roms" ]]; then
    Filename_Start=$[$Filename_Start+1]
    break
       fi      

       # get only the file name of the file
       FILENAME_AND_EXTN=$(echo ${Filename_Array[Filename_Start]} | rev | cut -d"/" -f1 | rev)
       FILENAME=$( echo $FILENAME_AND_EXTN | cut -d"." -f1)

       VARNAME_AND_EXTN=$(echo $varname | rev | cut -d"/" -f1 | rev)
       EXTENSION=$( echo $varname | cut -d"." -f2)
    #EXTENSION=jpg

       # get the path of the destination directory
       ONLY_PATH=$(echo $varname | rev | cut -d"/" -f2- | rev)
       echo mv "$varname" "$ONLY_PATH/$FILENAME.$EXTENSION"
       mv "$varname" "$ONLY_PATH/$FILENAME.$EXTENSION"
       #increment files to process
       Filename_Start=$[$Filename_Start+1]
       #Rename_Start=$[$Rename_Start+1]             
       # start over   
       #function rename
       break
   else
       echo 'skipped renaming file'
       echo $Rename_Start
       Filename_Start=$[$Filename_Start+1]
       break
   fi
done

#echo $Filename_Start

rename_files
}

rename_files