Jump to content
IGNORED

Custom firmware for Atari Gamestation Pro


Recommended Posts

Greetings Atarians!

 

 For those who have been asking, here is my customized firmware image for the Atari Gamestation Pro.  This is along the same lines as the custom firmwares I have produced for Atari Flashback devices.  It allows you to add games and box art from the SD card to the Gamestation Pro menu and perform other customizations.
 
The filename is Firmware-c.img and you install it using the same method for the official 1.30 firmware.  On successful install it will update your version number to 1.30c

 

To use the new firmware features your SD card should be formatted as exFAT.  The custom firmware will not function correctly with FAT32 currently.

 

The firmware is activated by detecting a "mount_sd.ini" file on the sd card in the /agsp directory.  Extract /agsp folder from the attached agsp.zip archive to your sd card.  When the firmware sees the mount_sd.ini file inside this folder it will dump the internal /data partition to the sd card and remount it there.  The data folder will contain all of the system's game roms and boxart as well as the games.db file for the menu.  Dumping data takes about 40s with my sd card, a Sandisk Extreme UHS-I card that can write up to 90MB/s.  You will see the Loading screen while it is busy writing.  If you are using an old/slow SD card then the operation may take longer for you.  Give it up to 5-10 minutes in the extreme.

 

After dumping the /data partition (if it is not already present on the sd card), the firmware will run the startup.sh script in the agsp folder on the card.  This script will detect if a games.ini file needs to be generated (ie /data/games.ini doesn't exist).  It will run a simple SQL command piped to an awk script to spit out the .ini file.  If the games.ini file does exist, the script will read the first value in the file, "update_db".  If this value is set to 1 then the script will run a couple of SQL statements to truncate the db tables and execute a small binary utility, ini2gamedb, to import the ini file contents back into games.db.  It will then clear the update_db flag back to 0 in the games.ini file.

 

Finally there is a dump_retro flag in mount_sd.ini.  Set it and the script will extract retroarch binary and cores to a folder on the sd_card.  This does not really activate them from the sd card, but will enable the community to play around with using or modifying them as they see fit.  This is more a proof-of-concept of what can be done.  You can modify the startup.sh script as needed, but you'll need to test what works correctly with the busybox variant of ash shell.  Similarly the game launch script "start_local_sd.sh" will now be located under /data on the sd card.  The support for sourcing runme.sh from /agsp from the earlier patched firmware is still present, but you can modify it however you wish.  Of course if you break this script then your games won't launch.

 

--------------------------------------------------------------------------------

 

Adding games should be fairly straightforward.  For each game to display in the menu add a new ini section to /data/games.ini file.  The section name should match the rom file name exactly.  Fill in the rest of the ini sections, copying values from similar existing games where necessary.  For the "about" and "controls" sections, these are text bodies for display in the UI game description screen.  For larger entries that span multiple lines or have line breaks for formatting you need to be sure to start and end the content with a double quote (").  The ini converter generally should ignore entries it does not understand, but if anything goes wrong it should write a small log file under /data.

 

Here is a sample of a new game entry added to the new games.ini file:

 

[Pac-Man]
display_name=Pac-Man
suffix=.a26
release_date=1981
players=1 OR 2
class_type=1
game_type=5
hard=0
save=1
timer=/data/Games/Atari_Games/Atari 2600
about="We know that millions of people all over the world just love the PAC-MAN arcade game.  PAC-MAN has won the hearts of men, women, and children everywhere.  We also know that PAC-MAN has traditionally been an arcade game.  Well, we at ATARI know all about arcade games. After all, we make some of the greatest arcade games in the world, and we know how to bring the same dynamite game play into your home."
controls=Press A, then use the Joystick.
vertical=0

 

Some of the fields are pretty obvious.  The section name must match the rom file name, although it can contain spaces.  The display name can be prettier.  The path to the rom location for some weird reason is called "timer".  The game_type should correspond to what has been documented in the discussion threads already, and as found in the game launch script.  The class_type and hard fields are a little more obscure.  We have attached some information (thanks @Vic20Ian ), but the community may have to experiment with those.  Generally just try to copy values from similar types of games.  I am also providing a .csv dump of the original tbl_game table from games.db.

 

Remember to set the games.ini "update_db" value to 1 (first line of file) any time you want to import new custom entries into the games.db file on startup.

 

Place the matching rom file in the appropriate folder under /data/Games.  Co-located with the game are the menu images.  They each share the same file name as the rom.  There is a .png image for the box art, a .jpg image for the screen shot, and a <GameName>_title.png image for the title banner text/graphic.  Any new games added to the system should have corresponding image files of the same/matching size.

 

--------------------------------------------------------------------------------

 

I have tried to make my implementation reasonably resilient and recoverable, but issues may still occur.

 

If you somehow create a really bad ini file or corrupt the games.db file (not likely but possible) there are different things you can do.  Delete the /data/games.ini file and the startup script will generate a new one from games.db.  Delete the /data/games.db and the system will copy the default one back to the sd card /data folder on startup.  Delete or rename the entire /data folder and the system will regenerate it on startup so long as it sees the /agsp/mount_sd.ini file.  Delete or rename the /agsp folder or mount_sd.ini file, or remove the sd card, and the system will just run off of the default internal /data partition and stock configuration. The functionality related to using a /Games folder on the sd card should remain unaffected.

 

Also it is not known how many games you can add to the UI before it starts to encounter any loading or performance issues.

 

No promises, no warranties.  Use this firmware at your own risk.  But I hope the community gets some utility out of it for enhancing their Atari Gamestation Pros.

Firmware-c.img agsp.zip game_type.txt class_type.txt tbl_game_202401280228.csv

  • Like 16
  • Thanks 5
Link to comment
Share on other sites

Thanks @Brad_from_the_80s, this is really good. I have been using it for a few days.

 

I hope we see some additional emulation and scripts to launch them in this thread.

 

For info:

 

I have tried various values in the field <hard>, none seem to have an effect.

 

Even changing Paddle games from 5 to 0 on Warlords makes no discernible difference.

 

Perhaps this field has been superseded by the Gametype.

Link to comment
Share on other sites

Thank you for your efforts on this!

I haven't peeked at your image file yet.

Some initial questions:

  • Did you replace the default MyArcade build of Retroarch?  If so, what version is there?  Keyboard enabled?
  • With respect to the graphical interface, is there any way currently for me to add my own cores and related roms to that? 
    I know I would be able to run other cores with scripts, but I was curious about adding items with other cores into the graphical menu.  

Thanks again!

Edited by big_guitar
Link to comment
Share on other sites

27 minutes ago, big_guitar said:

Thank you for your efforts on this!

I haven't peeked at your image file yet.

Some initial questions:

  • Did you replace the default MyArcade build of Retroarch?  If so, what version is there?  Keyboard enabled?
  • With respect to the graphical interface, is there any way currently for me to add my own cores and related roms to that? 
    I know I would be able to run other cores with scripts, but I was curious about adding items with other cores into the graphical menu.  

Thanks again!

I have not built or replaced retroarch, although that could be done later.  Right now it is stock.  I added a script to dump the binaries to examine them.  The game launch script is also now on the sd card so it could be modified to use a different RA build and cores.

 

On the GUI, I doubt it is very feasible to do a binary hack to add menu categories that are not already there.  You can look at the class_types which correspond to the menu I think.  For systems that are not explicitly supported you can try just putting them under the 8/16 bit classes.  Or you can experiment with the unused class_type id's, but they likely don't do anything.  But then you can maybe try using the unused game_types (7, 8, maybe 0), as I think these get passed to the game launch script, and therefore you could key off of those to launch additional cores from the menu via start_local_sd.sh.  You'll just have to play with it.

 

Conceivably we could write a whole new replacement UI from scratch to do whatever we want, to be more flexible and more config driven.  A bit of work but very doable I think.  Just gotta find the time.

Edited by Brad_from_the_80s
Link to comment
Share on other sites

Yay, scary a bit at first, and alot of manual editing the _ games.ini _ file, then re-sizing & adding the 3 images per game. And remember to change the first line of _ games.ini _ to '1' before saving the updated file.!

I've worked with the 5200 section so far, replaced some game entries with different ones and added two new ones. Next I'll see what happens if there are more than 10 games on the 5200 page, hoping page 2 will appear....

  • Like 1
Link to comment
Share on other sites

3 hours ago, Boots01 said:

Yay, scary a bit at first, and alot of manual editing the _ games.ini _ file, then re-sizing & adding the 3 images per game. And remember to change the first line of _ games.ini _ to '1' before saving the updated file.!

I've worked with the 5200 section so far, replaced some game entries with different ones and added two new ones. Next I'll see what happens if there are more than 10 games on the 5200 page, hoping page 2 will appear....

Don't forget the screenshots if you want them. There are up to 5 picture files per game.

 

It should not be too daunting and any errors are easily undone if you delete the database and the games.ini file.

 

Extra pages appeared when I added some games.

 

Edited by Vic20Ian
Link to comment
Share on other sites

50 minutes ago, Vic20Ian said:

Don't forget the screenshots if you want them. There are up to 5 picture files per game.

 

Brad_from_the_80s  said;

>> There is a .png image for the box art, a .jpg image for the screen shot, and a <GameName>_title.png image for the title banner text/graphic.

-----------------------------------------------------

 

Looks like 3 images to me..... __ what other filenames?

I do have 1 1/2 pages showing for 5200 so far.

  • Like 1
Link to comment
Share on other sites

6 hours ago, Brad_from_the_80s said:

But then you can maybe try using the unused game_types (7, 8, maybe 0), as I think these get passed to the game launch script, and therefore you could key off of those to launch additional cores from the menu via start_local_sd.sh.  You'll just have to play with it.

We could add different game_type entries into tbl_game of the games.db, but I suppose it depends on which key field (or combination of) determines the game presence in the existing GUI.  The app likely ignores values outside of some predefined specs.

 

When games are added, I suppose gameid auto increments, but "ko_id" and "video_id" seem to skip increments a bit compared to gameid (in the default db), wonder what their purpose is.

Edited by big_guitar
Link to comment
Share on other sites

5 hours ago, rain2591 said:

The flashback console had a windows desktop app for adding games and editing the ini for the games on the SD with the CFW would it be possible for a similar app to do the editing of the ini for the gamestation pro 

I mean the Genesis Flashback HD game manager 

Link to comment
Share on other sites

2 hours ago, big_guitar said:

We could add different game_type entries into tbl_game of the games.db, but I suppose it depends on which key field (or combination of) determines the game presence in the existing GUI.  The app likely ignores values outside of some predefined specs.

 

When games are added, I suppose gameid auto increments, but "ko_id" and "video_id" seem to skip increments a bit compared to gameid (in the default db), wonder what their purpose is.

Per @Vic20Ian investigation the UI categorization is primarily driven by the class_type values.  The UI is probably only going to recognize the ones it knows about.

 

But the game_type is what I think gets passed to the start_local_sd.sh script, so in theory you could try using some of the unused game_type id's for new systems/cores.  You could even try using new game_type values, such as 20, 21, 22, etc. and see if the UI will just pass them through to the script.  Then the script could be modified to launch more new cores as needed.

 

As for ko_id, it is a foreign key to a Korean translation table.  I'm not sure anybody cares about that and it doesn't seem to be used anyway.  Might have been for some of the developers.  There is a similar Chinese translation table.  When I rebuild the game table I just provide incrementing dummy foreign key values.  There is also an English translation table, which is important.  It is used for the display name in the menus, so I just rebuild it from scratch every time.  The video_id references a table of video files, but it seems to have no purpose and some of the id's in the game table weren't even valid.  So again I'm just ignoring it with an incrementing dummy value.

  • Thanks 1
Link to comment
Share on other sites

9 hours ago, Boots01 said:

Brad_from_the_80s  said;

>> There is a .png image for the box art, a .jpg image for the screen shot, and a <GameName>_title.png image for the title banner text/graphic.

-----------------------------------------------------

 

Looks like 3 images to me..... __ what other filenames?

I do have 1 1/2 pages showing for 5200 so far.

For arcade it is 4 images and a zip file for the romset

Link to comment
Share on other sites

18 hours ago, rain2591 said:

The flashback console had a windows desktop app for adding games and editing the ini for the games on the SD with the CFW would it be possible for a similar app to do the editing of the ini for the gamestation pro 

I'm not sure I'm familiar with that tool, may have been for the Legends or Genesis devices, but would have worked for Atari I guess.  I thought of making something similar at one point but haven't had the time.  Even a nice way to import/export settings and graphics for individual or collections of games, could be handy.  The community could put together a repository of all that stuff for anybody to use.

Link to comment
Share on other sites

2 hours ago, Brad_from_the_80s said:

I'm not sure I'm familiar with that tool, may have been for the Legends or Genesis devices, but would have worked for Atari I guess.  I thought of making something similar at one point but haven't had the time.  Even a nice way to import/export settings and graphics for individual or collections of games, could be handy.  The community could put together a repository of all that stuff for anybody to use.

https://gbatemp.net/threads/genesis-flashback-hd-2018-game-manager.529624/

Link to comment
Share on other sites

1 hour ago, jonreddick said:

Man, @Brad_from_the_80s, as I research for a video tutorial on your FW, I'm finding adding missing Atari games with all the beautiful artwork is becoming an addiction. "Just one more! Oh, I forgot about that one! Damn, I can't skip this one!" 🤣

image.thumb.jpeg.d7eceebb874413c4c1a7773d5168928d.jpegimage.thumb.jpeg.21acec90c9816336deaeb6d9557596ad.jpeg

When adding arcade games to the .ini file, can they still be in subfolders like "Arcade_A"  "Arcade_B" along with the graphics images?  Example: /Games/Arcade_A/     /Games/Arcade_B/

Link to comment
Share on other sites

29 minutes ago, Atari8264 said:

When adding arcade games to the .ini file, can they still be in subfolders like "Arcade_A"  "Arcade_B" along with the graphics images?  Example: /Games/Arcade_A/     /Games/Arcade_B/

Thus far what I've found is that @Brad_from_the_80s's firmware isn't about replacing or replicating the functions of the original firmware (i.e. that Games folder with subfolders which still works as before), but allowing you to add new games to the existing menu strucutre while providing your own images & text. There's no simple way to modify that interface and its existing tabs - just add new entries within them.

Link to comment
Share on other sites

30 minutes ago, Atari8264 said:

When adding arcade games to the .ini file, can they still be in subfolders like "Arcade_A"  "Arcade_B" along with the graphics images?  Example: /Games/Arcade_A/     /Games/Arcade_B/

In the ini I think you'd have to say "/sdcard/Games/Arcade_B/" for the "timer" value, but otherwise I think it might work.  But you'd have to try it.

Link to comment
Share on other sites

2 hours ago, jonreddick said:

Man, @Brad_from_the_80s, as I research for a video tutorial on your FW, I'm finding adding missing Atari games with all the beautiful artwork is becoming an addiction. "Just one more! Oh, I forgot about that one! Damn, I can't skip this one!" 🤣

image.thumb.jpeg.d7eceebb874413c4c1a7773d5168928d.jpegimage.thumb.jpeg.21acec90c9816336deaeb6d9557596ad.jpeg

Yeah this was me customizing my Atari Flashback a few years ago.  Having the fully integrated experience is definitely appealing.  Gotta add the licensed games they just can't release, the missing 3rd party, and just the more obscure favorites.  Eventually some people went wild putting together some "everything-and-the-kitchen-sink" collections for those, and maybe there will be some interest in doing something similar for the GSP, as it directly supports a lot more systems and people are working on improving support.

Link to comment
Share on other sites

2 minutes ago, Brad_from_the_80s said:

In the ini I think you'd have to say "/sdcard/Games/Arcade_B/" for the "timer" value, but otherwise I think it might work.  But you'd have to try it.

Ah, I misunderstood the question. I can verify you can keep ROM & image files anywhere within the data folder you'd like (pointing to its home in the "timer" value, as Brad noted). For example, For my own sanity I'm putting Atari 2600 stuff I add myself in an "Atari 2600_c" (for community) folder. But all entries of the same class_type will appear in the menu with no indication of subfolders.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...