How to create perfect ROMS.txt file for GenPlus

This forum is for discussion pertaining to homebrew and indie software for the Dreamcast, such as homebrew games, emulators/interpreters, and other homebrew software/applications. Porting requests and developmental ideas are not to be made here; you can make those here. If you need any help burning discs for homebrew software, this is the place to ask as well.
Post Reply
wildonrio
DCEmu Cool Newbie
DCEmu Cool Newbie
Posts: 12
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sat Jul 29, 2006 8:45 pm
Has thanked: 0
Been thanked: 0
Contact:

How to create perfect ROMS.txt file for GenPlus

Post by wildonrio »

I don't know if there's an easier way to do this, but I was quite puzzled at first on how I would create a text file to display the names of the games. The format is [filename.zzz] [display name]. Then I noticed that I could implement the GenHave.txt file that GoodGen created for me. I copied all of the text from there into a word document.

First thing I did was replace all spaces with underscores, since a space signifies that you are now designating the display name. Leaving them in would have seriously messed up how they would be displayed. I then had GoodGen rename all of my roms with underscores instead of spaces for the filenames.

Next, I created a macro. I assigned it to the F12 key and I put the cursor after the first rom name and then began recording. It basically went like this:

START RECORDING
1. SHIFT+HOME (Selects ROM name)
2. Control-C (Copies name)
3. END (Goes to end of ROM name).
3. .bin (Adds extension to ROM name to describe filename)
4. SPACE (Separates filename from soon-to-come display name)
5. Control-V (Pastes ROM name to signify display name)
6. Down arrow (Goes to next ROM name)
7. END (Goes to end of next ROM name)
STOP RECORDING

Then I just ran the Macro over and over by holding down F12 until I had a perfect ROMS.txt file to display all of my ROMs perfectly to match up with the right filenames.

I was pround of myself so I thought I'd share. Now someone tell me how I could have made it a lot easier on myself, go ahead ;)
Smurph
DCEmu Super Poster
DCEmu Super Poster
Posts: 1337
Joined: Mon Mar 28, 2005 10:26 am
Has thanked: 0
Been thanked: 0

Post by Smurph »

I wrote a little program that does all that, and replaces the spaces in the zip filenames with underscores... but I haven't finished it.
Image
User avatar
Christuserloeser
Moderator
Moderator
Posts: 5948
Joined: Thu Aug 28, 2003 12:16 am
Location: DCEvolution.net
Has thanked: 10 times
Been thanked: 0
Contact:

Post by Christuserloeser »

I hope you finish it as that sounds very very promising. :)


There are so many methods people are using for creating a ROMS.TXT... and none of them are perfect or exactly newbie/user-friendly.

I'm gonna repost the methods others are using in this thread so we have them all in one place.

LazerTag over at DCEmu posted this method:

LazerTag wrote:I tried using the romlst creator and just found I did not like the output I was getting. And it seemed a really big chore cleaning up after it manually. So without to much manual intervention on the files I came up with this. I hope someone finds it helpful or at least comes up with an even better idea on doing this. It seems a little long, but it is really was easy to move through all of it.

Required Tools

DOS command line (you should have this)
Notepad (you should have this too, :lol: )
GoodGen (if you want your ROMs named correctly)
Excel (some other worksheet application will probably work too)

1) Open a CMD window in your ROM folder

2) goodgen inplace (skip this step if you are not going to use GoodGen)

3) dir /on/b *.zip > roms2.txt

4) goodgen in place nosep (skip this step if you are not going to use GoodGen)

NOTE STEP 4 - This may not be needed, but I didn't want to waste a CD only to find that spaces in file names caused issues in GPDC. If spaces are a non issue, you can skip step 4 and just "copy roms2.txt roms1.txt" and then skip STEP 5 also.

5) dir /on/b *.zip > roms1.txt

So now you have a list of all your ROMS in two different files.

6) Modify roms2.txt to your liking.

You can edit this file however you like really. It is used for the ROM list displayed in GenesisPlusDC. For instance in mine I didn't want to see all the ".zip" extensions and all the various region codes or ROM codes that GoodGen applies. So I did quite a few "replace" commands from Notepad to rid myself of them. Do make sure if you actually remove any of the games that you also remove them from roms1.txt. It's important to keep the two roms TXT files in sequence line by line. Other wise you may end up with a list where you think you are picking one game, but it's loading another. Trust me if you mess that step up you will notice. :P

7) Open Excel, highlight the A column and go to Data > Import External Data > Import Data. Pick your ROMS1.TXT and click Finish

8 ) On Import Data window Click "Existing worksheet" and make sure the selection is "=$A$1" without quotes.

9) Now do the same as step 7 and 8 for the ROMS2.TXT file, but highlight the B column and use select "=$B$1" without quotes

Now column A should contain ROMS1.TXT (unedited list of your ROM ZIP files) and column B should contain ROMS2.TXT (your display list for GPDC)

10) Click in column C1 and type in the calculation '=A1&" "&B1' without the single quotes the double quotes are used.

this should now show you A1+B1 in C1 with a single space between each value.

11) Right click C1 and select copy, the click C2 to select it scroll down to your last used row (let's say it's C60 for the sake of this guide) and shift+click C60. So now C2 through C60 should be selected, right click and select Paste. this will copy your calculation into all the subsequent fields so the concatenate like it did for A1+B1

12) Select the C column now and right click Copy. Then paste into your ROMS.TXT file GPDC


Again I hope someone finds this helpful. I sure thought it was fairly easy, thought it seems like many steps, but now my list looks just like I had wanted and it didn't take hours of typing or editing to get it that way.


GenesisPlusDC is quite awesome too. I'm a first time user of it. I Have not used it much yet, but I have a few games that I have found do not work. Is there a system for reporting these?


gxb posted about a little tool he coded:
gxb wrote:I coded a tiny program to list rom files in VB6.0.
It's quite easy to use, and only zip files are supported.
Pay attention to the filename-length of your roms. Don't be too long (better less than 28 characters).
:)
Screenshot + download: http://www.dcemu.co.uk/vbulletin/showth ... 255&page=2



So far I've been using a combination of Provlist & Renamer myself:
http://www.dcevolution.net/dsdevelopmen ... -tools.zip
Insane homebrew collector.
Smurph
DCEmu Super Poster
DCEmu Super Poster
Posts: 1337
Joined: Mon Mar 28, 2005 10:26 am
Has thanked: 0
Been thanked: 0

Post by Smurph »

If all goes well, I'll be able to work on it more this weekend... my mainboard decided to crap out on me.
Image
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Post by emptythought »

Very simple - grab the game name from the ROM and use that for the description, rename the games in a numeric fashion (since they say long file names don't work) like so: 0001, 0002, 0003 preserving the original file extensions then zip them. As you grab the ROM name from the description, record it to the list with the file name. Another possible feature is renaming the ROMs according to the description since the information in the header is just the game name.
Smurph
DCEmu Super Poster
DCEmu Super Poster
Posts: 1337
Joined: Mon Mar 28, 2005 10:26 am
Has thanked: 0
Been thanked: 0

Post by Smurph »

long file names do in fact work. the filenames just can't contain spaces.
Image
Warmtoe
DC Developer
DC Developer
Posts: 453
Joined: Thu May 16, 2002 8:29 am
Location: ice88's house
Has thanked: 0
Been thanked: 0
Contact:

Post by Warmtoe »

OK... Here is a really quick and dirty Windows batch file that will create a ROMS.txt and ROMS directory.

Code: Select all

@echo off
MKDIR ROMS
set _romnumber=0
if "%2" NEQ "" set _romnumber=%2
for %%V in (%1\*) do (call :S_RENAME "%%V")
goto :EOF

:S_RENAME
  copy %1 ROMS\.
  ren ROMS\%~nx1 %_romnumber%%~x1
  set _romname=%~n1
  rem set _romname=%_romname:_= %
  echo %_romnumber%%~x1 %_romname% >> ROMS.txt
  set /A _romnumber+=1
  goto :EOF
The syntax for the command is:-

ROMTXT.bat <ROMDIR> [START_NUMBER]

The ROMDIR is the existing directory on your machine (or CD) containing the nicely named ROMS.

The batch file copies each of the roms from you existing rom directory to the subdirectory ROMS under which the command was run, the roms are renamed with a simple, incrementing number - START_NUMBER allows you to influence the initial value (0 if not specified).

So, assuming you have your existing files in C:\GENESIS_ROMS, you can do the following to create a ROMS directory and associated ROMS.txt:-

1) cd C:\TEMP
2) ROMTXT.bat C:\GENESIS_ROMS

You will now have a C:\TEMP\ROMS directory and C:\TEMP\ROMS.txt file ready for copying to GPWT\DATA.

The 'rem'd line in the batch file can be 'unrem'd to translate _ in the original filename to <space> in the resulting ROMS.txt file.

If you want to pull roms from multiple different sources, run the ROMTXT.bat twice, with different source directories - remember though, this will just append to ROMS.txt, things won't be nicely sorted.

To create a clean ROMS directory and ROMS.txt, delete C:\TEMP\ROMS and C:\TEMP\ROMS.txt before starting.

Hope this helps!
Smurph
DCEmu Super Poster
DCEmu Super Poster
Posts: 1337
Joined: Mon Mar 28, 2005 10:26 am
Has thanked: 0
Been thanked: 0

Post by Smurph »

I finished a basic but usable lister. Please excuse any GUI crappyness, I am currently stuck in 4-bit 800x600.

more info in readme.

Snag it
Image
User avatar
Christuserloeser
Moderator
Moderator
Posts: 5948
Joined: Thu Aug 28, 2003 12:16 am
Location: DCEvolution.net
Has thanked: 10 times
Been thanked: 0
Contact:

Post by Christuserloeser »

New version:

http://www.dcemulation.org/phpBB/viewtopic.php?p=907665
Smurph wrote:v0.2 released. This will probably be the final release, unless for some reason I want to add more functionality.

Code: Select all

Smurph's GPWT RomLister v0.2


-Product Description-

Copies and renames rom zipfiles from one location to another, and 
creates a romlist according to the filenames of the zips. Optionally,
It strips goodcodes.


-Preamble / Setup-

Written in VB .NET because I hate writing C++ GUI apps and VB is easy 
as hell.

Requires .NET Framework 1.1 or higher. If you get a runtime error when 
you launch the executable, you probably don't have it. You can 
download it off microsoft's site.


-Version History-

v0.2_fix
	Added:
		None
	Fixes:
		Goodcode stripping options
	Other:
		None
v0.2
	Added:
		goodcode stripping
		config saving
		more idiot-proofing
	Fixes:
		None
	Other:
		Changed the name

v0.1
	Initial release. VERY basic.



-Other crap-

Possible future additions:
ROM header reading and listing based on that

That's all for now. Maybe I'll work more on it later.

Snag it here.
Insane homebrew collector.
Post Reply