Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsDiscussion Forum → A little Linux C++ project I've been working on...
A little Linux C++ project I've been working on...
2004-12-28, 9:06 PM #1
A simple proof of concept:
Gamefu - Gaming All-Machine Emulator Frontend for Unix

In my quest to find a decent graphical console emulator frontend for Linux, I came up empty handed. Thanks to some helpful people in the tech forum who hooked me up with some SDL docs, I've been able to start this:

[http://www.doigtsagiles.com/images/menu.jpg]

Props to pheonix for his awesome skinnage. :D

Basically, you'll be able to open any ROM you wish for any system, using your joystick. No need for the keyboard or mouse. This is ideal for a setup where the computer is hooked up to a TV.

An exemple of a ROM listing for NES:

[http://www.doigtsagiles.com/images/list.jpg]

Up top, I'm planning on showing a screenshot of the game (got to work out a little bug and it'll be working) and the meta-data as well (ROM Title, mapper used, switch, CHR size, etc...).

Basically what I want is suggestions for features that should be included, because I know I haven't thought of everything yet.

So get suggesting! :mad:

/me cracks whip
2004-12-28, 9:08 PM #2
I want to see the second screenshot! It looks cool.

Edit: Well now it's there...
2004-12-28, 9:09 PM #3
It would be cool to have a way to categorize games and systems. For example, Dragon Warrior should be placed under NES as well as RPG. So you can choose by game or system. That would rock.
2004-12-28, 9:10 PM #4
You more like a library style browser? Hmmm... that would mean having to categorize thousands of games by hand, because there is no way of reading the genre directly from the ROM. :\

I could always let the user categorize his own ROMs though... :)
2004-12-28, 9:32 PM #5
That's even better. For example, what if someone disagrees with you about whether a certain game is an RPG. Letting people classify their own ROMs is the way to go.
"it is time to get a credit card to complete my financial independance" — Tibby, Aug. 2009
2004-12-28, 9:32 PM #6
Yeah, this is pretty cool, I'm looking forward to running it on my fresh debian system which is installing right now ;)

So get crackin!
D E A T H
2004-12-28, 9:35 PM #7
Awesome.
That painting was a gift, Todd. I'm taking it with me.
2004-12-28, 11:27 PM #8
Quote:
Originally posted by Shintock
Props to pheonix for his awesome skinnage. :D


Again, you're very much welcome. I just like how well it turned out. ;)
"In the beginning, the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move." - Douglas Adams
Are you finding Ling-Ling's head?
Last Stand
2004-12-28, 11:33 PM #9
Shintock's C++ skills are better than mine.

/me causes the header file problem in his code
Code to the left of him, code to the right of him, code in front of him compil'd and thundered. Programm'd at with shot and $SHELL. Boldly he typed and well. Into the jaws of C. Into the mouth of PERL. Debug'd the 0x258.
2004-12-29, 6:47 AM #10
nice!
2004-12-29, 7:25 AM #11
Quote:
Originally posted by JediGandalf
/me causes the header file problem in his code

Hehe, silly me, the function I was trying to define was in the .h instead of in the corresponding .cpp. In other words, I didn't just prototype, I actually had the function typed out in my .h. Stupid n00by mistake. :p

Thanks for the praise guys. :D I might eventually make this portable, but for now the code that gets the ROM list is specific to *nix.

Still need feature suggestions!
2004-12-29, 7:33 AM #12
Does it support gamepads? Ie, controlling the menu's using a gamepad/joystick?

Looks great though :)
TheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWho
SaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTh
eJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSa
ysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJ
k
WhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSays
N
iTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkW
2004-12-29, 7:34 AM #13
It was conceived with the thought of exclusively controlling with a joystick/gamepad in mind. :)
2004-12-29, 7:41 AM #14
For the love of kak, please dont make me use a joystick. :(
And when the moment is right, I'm gonna fly a kite.
2004-12-29, 7:46 AM #15
make him use a joystick!!! :p
2004-12-29, 7:47 AM #16
Kak loves him today, the keyboard is also supported. The dude I'm doing this with can't get his gamepad working in Linux, so we didn't have a choice. :p
2004-12-29, 11:47 AM #17
Quote:
Originally posted by Shintock
You more like a library style browser? Hmmm... that would mean having to categorize thousands of games by hand, because there is no way of reading the genre directly from the ROM. :\

I could always let the user categorize his own ROMs though... :)


The hell there isn't a way.

Almost every single rom has a totally different extension for each system.

Genesis = usually bin or smd
SNES = smc
NES = nes

And on and on and on. The only one that might be a problem is MAME, which uses ZIPs, especially if you allow usage of zipped roms.
2004-12-29, 2:06 PM #18
Make the rom listing a text file, including genres and system. Then when someone does get around to doing all the roms, you can offer that as a seperate file. HUZZAH

Maybe shots of the game could be shown in a preview thumbnail. Say it loaded a .png or .jpg with the same name as the rom, if it exists. Other wise...load a default system-specific image?
</sarcasm>
<Anovis> mmmm I wanna lick your wet, Mentis.
__________
2004-12-29, 5:22 PM #19
Quote:
Originally posted by Cool Matty
The hell there isn't a way.

Almost every single rom has a totally different extension for each system.

Genesis = usually bin or smd
SNES = smc
NES = nes

And on and on and on. The only one that might be a problem is MAME, which uses ZIPs, especially if you allow usage of zipped roms.

The hell are you saying?

Genre as in RPG, Action, Adventure, etc... I know the filename extensions for each system.
2004-12-29, 5:29 PM #20
Quote:
Originally posted by Shintock
The hell are you saying?

Genre as in RPG, Action, Adventure, etc... I know the filename extensions for each system.


MSN. Now.
D E A T H
2004-12-29, 6:25 PM #21
Quote:
Originally posted by Shintock
The hell are you saying?

Genre as in RPG, Action, Adventure, etc... I know the filename extensions for each system.


Sorry, didn't read the entire post about breaking into Genres. But your screenshots do not show any system categorization either, unless you just didn't show it.
2004-12-30, 10:46 AM #22
Hehe. :o

When you select "Play Games," there's a little windows that comes up that asks you what system you want to search for games for. The program then looks up in a configuration file the path you have set for the ROMs for that system, as well as the emulator you wish to use.
2004-12-30, 2:07 PM #23
Here's a good suggestion I thought of:

Add a jukebox ability, using some sort of MP3 player, like XMMS. And if you want to take it even further, add support for visualizations.

Oh, and on top of that, TV Tuner capability. Might as well go for a full entertainment center. Now THAT would be awesome.

If ya put that in, I could quite possibly be very interested :D

Oh, and here's some stuff you might want to add as options (if you haven't already)

  • Overall Volume Control
  • Overall Resolution settings
  • Brightness / Contrast
  • Joystick Calibration (Duh :p)
  • Overall Debug Stats (FPS, etc)
  • Boot OS GUI
  • Options Password (To deny access)
  • Network setup (For Networked Roms, Internet Radio, etc)
  • Check for updates
2004-12-30, 8:13 PM #24
CM, those are all great ideas. Thanks. :D

For the TV tuning, check out MythTV. It's in the portage tree. It also includes an emu frontend much like mine. Definitely what you're looking for.

The network support is going to be an essential, because it is something that I'm going to want to use myself.

The debug stats are going to have to be supported by the emulators themselves, as far as I know. Most emus support displaying the FPS count.

Overall resolution settings: do you mean for just the frontend, or for all the emus at the same time? Changing the resolution for the emus all at once would be kind of complicated, but still fairly easy to accomplish. It would only be a matter of modifying all of the config files at once for each emu.

Music capability is definitely a freakin' good idea. Having it resume a song when exiting the emulator would be pretty cool.

By booting OS gui you mean starting X? Good idea. Won't be needed for my purposes but definitely a feature that should be included.

Thanks for the great ideas, keep them coming if you have any more. :D
2004-12-30, 8:28 PM #25
http://www.mythtv.org/
2004-12-30, 9:19 PM #26
Quote:
Originally posted by Shintock
CM, those are all great ideas. Thanks. :D

For the TV tuning, check out MythTV. It's in the portage tree. It also includes an emu frontend much like mine. Definitely what you're looking for.

The network support is going to be an essential, because it is something that I'm going to want to use myself.

The debug stats are going to have to be supported by the emulators themselves, as far as I know. Most emus support displaying the FPS count.

Overall resolution settings: do you mean for just the frontend, or for all the emus at the same time? Changing the resolution for the emus all at once would be kind of complicated, but still fairly easy to accomplish. It would only be a matter of modifying all of the config files at once for each emu.

Music capability is definitely a freakin' good idea. Having it resume a song when exiting the emulator would be pretty cool.

By booting OS gui you mean starting X? Good idea. Won't be needed for my purposes but definitely a feature that should be included.

Thanks for the great ideas, keep them coming if you have any more. :D


Yes, I know about MythTV, I was just saying, you could make your program do that too, and have EVERYTHING :D

Debug stats - I meant it like the resolution settings. Turn this on, and it enables all those statistics for every emulator (and possibly the mp3 player also, sorta like running in verbose mode)

Overall resolution settings - yes, to change for all emulators, and the main GUI too. Helpful since editing config files isnt exactly easy to do with a joystick :p

Music - Yup, and possibly even do OC Remix based on the game last played or selected, or just by system. :D (if you are THAT bored, that is :D)

Booting OS - If this thing starts every time the computer starts up, you want an easy way to get to the OS in case something goes wrong.

And I'd definately make a password for these things. That way a little brother cant screw with the settings when it stops by.

Let's see, more ideas...

Surround Sound setup...
Backup Save Game files
CD-Rom support for roms, etc
DVD playback? (Could easily be done via mplayer)
Screenshot viewer (For viewing high score screenshots, etc.)
Universal Button for screenshots... (For all emulators. Possibly done outside the emulators themselves via GIMP or something?)
CD playback, complete with CDDA lookup support
Visualizations :D
Random Game option (Picks a random rom and loads it. Possibly just per system and all systems)
Sort games (by name, last played, most played, etc?)
Video Playback (Off network, CD, or hard drive. Perfect for anime!!! woooo. Also easily done with mplayer)
Overall control settings and per-system control settings via a joystick usable menu.
Extensive Cheat library (dunno, in case you want to?)
FLIP SCREEN LAYOUT horizontal/vertical. MUST HAVE FOR SOME MAME GAMES!!!
Skin support (meh, you never know)
IR remote support (up to you, might be stretching it)


That's everything I can think of right now. Also, make sure you get the brightness/contrast, and volume options in there. If they can't access the OS, and its a TV in a cabinet, they might not be able to change that stuff by themselves easily.
2004-12-31, 6:41 PM #27
Ba-bump.
2005-01-01, 12:33 PM #28
I would recommend keeping it simple. Make sure you implement a feature at a time and that the system works in between. The problems with such lofty goals is that it often takes more an investment than just keeping it simple. So make the emulator interface first. Then the cataloging. Then maybe a music player. Make sure to release after each new feature, put a tag in the code so people can grab it from CVS (or whatever). Don't start laying the foundation to take over from MythTV until you've got your emulator program working and stable!
2005-01-01, 1:38 PM #29
Oops, I meant to reply to this. Thanks for the bump.

The TV-tuner capabilities are going to be very, very low priority for now. Although I love the idea, it's not going to be easy and is not really part of my original vision of my frontend. To make things even more complicated, I don't have a TV-tuner, only S-Video and Composite inputs.

The music player shouldn't be too hard, using something like gstreamer, mplayer or arts (probably arts, since it supports more audio formats, IIRC). Once I get the basics working (as Brian said, it's really my priority for now, expecially since I'm so close to making it functional). I've got a class made up that will take care of reading the user config file and check the path for the emus wanted. It also takes care of threading and excuting the proper emu. All I have to do now is test it out with my list. I'll check it out tomorrow, when I'm back home and can get back to my Gentoo box.

CM - I especially like the remote idea. I have an ATi Remote Wonder, so it would be something doable (seeing as I can actually test it, in contrast to the TV-tuner capabilities).

I'm going to save this page, and keep this great list of ideas. Thanks to everybody for their support and interest. :D

Keep the discussion going! :D
2005-01-01, 7:13 PM #30
If you need help with testing or anything like that, let me know. I have a dedicated box just for this type of program, and I also have a TV Tuner card if you ever get around to it. If you need help with anything, let me know. I'd love to see this project succeed.

And yes, I fully agree with Brian. Take it a step at a time, getting the core components done, then moving on. (Although for the more integrated parts, I'd make sure you at least keep it in mind when you are programming, so you don't end up having to redo something to get a new feature to work, like the music integration.)

Oh, and Shintock: For the music, I'd recommend using mplayer, for the following reasons:

A. It plays a whole crapload of formats. As to if it is more than aRTs, I dunno, but it's all that I can think of. MP3, WMA, OGG, etc etc.
B. It has full support for custom GUIs, which means it has the potential to fit right in with your project, meaning less work on your end to get it integrated.
C. It plays videos and DVDs also, meaning a great jumping off point after the other features start to work.
D. It supports LIRC (for your ATi Remote :D)
2005-01-01, 9:12 PM #31
Great CM. :D I'll PM you my MSN address, we can talk.

My and my buddy are getting together tomorrow to code some more, get the menus working, work out the user configuration file, and get the screenshots working. He's the one doing most of the "behind the scenes" work (directory listing, threading, game launching), while I take care of the joystick control and graphical functions.

This is going to be great. :D
2005-01-01, 11:47 PM #32
You should make a small *simple* site to update people on your status. Hell, use the EC, I'll read your entries every day ;)
2005-01-01, 11:52 PM #33
I'm waiting on SourceForge, they're considering approving the project. :)

In the meantime, I could set up another blog on my site or something.
2005-01-02, 7:12 AM #34
Stoopid question, but would i be able to use it with my knoppix disc? It looks coolcoolcool.

:D
2005-01-02, 10:07 AM #35
It's pretty small, so I imagine you could install it to the ram disk, and it would work. I'm not familiar with the inner workings of Knoppix though, but I also don't see why it wouldn't work. :p
2005-01-03, 7:55 PM #36
Hi, I'm the "dude" who helping out Shintock with this project.

Here is the latest progress:
-Game Listing is getting debugged a lot, support less than 8 roms, no more scrolling problems
-Configuration file implanted. Here a snipplet:
Quote:
[SNES]
DisplayName="Super Nintendo Entertainment System"
DisplayImagePath="/usr/share/gamefu/systems/snes.png"
Emulator="zsnes -m"
ImagePath="/mnt/donnee/Shock/Emulation/snes/images"
RomPath="/mnt/donnees/Shock/Emulation/snes/"
RomExtension="smc fig swc zip"

With the configuration file, you can now have many systems as you want. Before, the systems were hard-coded.
Game-fu is checking out for the presente of $HOME/gamefu.cfg.

No, the screenshot previewing isn't implanted yet. We're mostly in a short debugging stage.
2005-01-03, 7:58 PM #37
He's French, forgive his grammar errors.

STAY AWAY, YOU DAMN GRAMMAR NAZIS!!!!111one :mad:

We'll have a new screenshot up later.
2005-01-03, 10:13 PM #38
Here we go. I fixed the scrolling problems, and I had to fix a bug that created a seg fault if there was less than 8 roms (notice that there are 8 roms being shown in the list at once) in the specified folder. The games are running properly using the specified emulator and options specified in gamefu.cfg, thanks to DarkShock, who did all the coding involved for reading the config file and loading the settings.

It's shown here in windowed mode, just to illustrate how it works, but it is our intention to make it a full-screen app, and to launch the games full-screen as well.

↑ Up to the top!